Remove pre-1.0 bridge governance scaffolding
This commit is contained in:
+1
-55
@@ -46,7 +46,6 @@ export type RunCapability =
|
||||
| "remote.run.db.sqlite.query"
|
||||
| "remote.run.logs.transfer"
|
||||
| "remote.run.rcon.command"
|
||||
| "remote.run.protected.sql"
|
||||
| "remote.run.program.command"
|
||||
| "client-manager.deploy"
|
||||
| "client-manager.control"
|
||||
@@ -150,7 +149,6 @@ export type PluginProductionLifecyclePayload = Record<string, string> & {
|
||||
operation: ProductionPluginLifecycleOperation;
|
||||
targetVersion: string;
|
||||
idempotencyKey: string;
|
||||
confirmed: "true" | "false";
|
||||
};
|
||||
|
||||
export type PluginRemoteAccessPayload = Record<string, string> & {
|
||||
@@ -218,15 +216,12 @@ export interface GamePluginRemoteAccess {
|
||||
logTransfer?: boolean;
|
||||
}
|
||||
|
||||
export type GameClientBridgeApprovalLevel = "none" | "operator" | "platform-admin";
|
||||
export type GameClientBridgeApprovalState = "not_required" | "pending" | "approved" | "rejected";
|
||||
export type GameClientBridgeCommandState = "pending" | "claimed" | "succeeded" | "failed" | "unknown" | "cancelled" | "expired";
|
||||
|
||||
export interface GameClientBridgeCommandDeclaration {
|
||||
type: string;
|
||||
title: string;
|
||||
permission: PluginPermission;
|
||||
approvalLevel: GameClientBridgeApprovalLevel;
|
||||
payloadSchemaRef: string;
|
||||
resultSchemaRef?: string;
|
||||
timeoutSeconds: number;
|
||||
@@ -299,52 +294,11 @@ export interface GameClientBridgeDataPackDeclaration {
|
||||
configMapRefs: string[];
|
||||
}
|
||||
|
||||
export type GameClientBridgeOperationKind = "rcon" | "sqlite-mutation";
|
||||
|
||||
export interface GameClientBridgeOperationSafety {
|
||||
requiresApproval?: boolean;
|
||||
requiresOfflinePlayer?: boolean;
|
||||
requiresMaintenanceWindow?: boolean;
|
||||
requiresBeforeValue?: boolean;
|
||||
requiresConfirmation?: boolean;
|
||||
backupRequired?: boolean;
|
||||
}
|
||||
|
||||
export interface GameClientBridgeOperationMutationDeclaration {
|
||||
fieldKey: string;
|
||||
tableKey: string;
|
||||
identityKey: string;
|
||||
valueKey: string;
|
||||
confirmationQueryKey: string;
|
||||
allowedValueType: "integer" | "number" | "string" | "boolean";
|
||||
minValue?: number;
|
||||
maxValue?: number;
|
||||
}
|
||||
|
||||
export interface GameClientBridgeOperationTemplateDeclaration {
|
||||
key: string;
|
||||
title: string;
|
||||
permission: PluginPermission;
|
||||
approvalLevel: Exclude<GameClientBridgeApprovalLevel, "none">;
|
||||
kind: GameClientBridgeOperationKind;
|
||||
transportKey: string;
|
||||
targetKey: string;
|
||||
payloadSchemaRef: string;
|
||||
resultSchemaRef?: string;
|
||||
confirmationSchemaRef?: string;
|
||||
timeoutSeconds: number;
|
||||
maxPayloadBytes: number;
|
||||
maxRowsAffected?: number;
|
||||
mutation?: GameClientBridgeOperationMutationDeclaration;
|
||||
safety?: GameClientBridgeOperationSafety;
|
||||
}
|
||||
|
||||
export interface GameClientBridgePageContract {
|
||||
pageKey: string;
|
||||
commandTypes?: string[];
|
||||
snapshotTypes?: string[];
|
||||
queryTemplateKeys?: string[];
|
||||
operationKeys?: string[];
|
||||
featureKeys?: string[];
|
||||
}
|
||||
|
||||
@@ -372,7 +326,6 @@ export interface GameClientBridgeManifest {
|
||||
queryTemplates?: GameClientBridgeQueryTemplateDeclaration[];
|
||||
logProjections?: GameClientBridgeLogProjectionDeclaration[];
|
||||
dataPacks?: GameClientBridgeDataPackDeclaration[];
|
||||
operationTemplates?: GameClientBridgeOperationTemplateDeclaration[];
|
||||
commandRetentionSeconds: number;
|
||||
maxCommands: number;
|
||||
pages?: GameClientBridgePageContract[];
|
||||
@@ -418,7 +371,6 @@ export interface GameClientBridgeCommand {
|
||||
commandType: string;
|
||||
priority: number;
|
||||
state: GameClientBridgeCommandState;
|
||||
approvalState: GameClientBridgeApprovalState;
|
||||
result?: GameClientBridgeCommandResult;
|
||||
expiresAt: string;
|
||||
createdAt: string;
|
||||
@@ -760,7 +712,6 @@ export interface GamePluginManifest {
|
||||
productionLifecycle: {
|
||||
operations: ProductionPluginLifecycleOperation[];
|
||||
dependencyPolicy: "required" | "optional";
|
||||
approvalRequired: Array<"disable" | "rollback" | "retire">;
|
||||
};
|
||||
pages?: GamePluginPage[];
|
||||
ai?: {
|
||||
@@ -870,14 +821,10 @@ export function createProductionPluginLifecycleRequest(input: {
|
||||
operation: ProductionPluginLifecycleOperation;
|
||||
targetVersion?: string;
|
||||
idempotencyKey: string;
|
||||
confirmed?: boolean;
|
||||
}): PluginBridgeExecutionRequest<PluginProductionLifecyclePayload> {
|
||||
if (!input.context.serverInstanceId) {
|
||||
throw new Error("serverInstanceId is required for plugin lifecycle requests");
|
||||
}
|
||||
if (["disable", "rollback", "retire"].includes(input.operation) && !input.confirmed) {
|
||||
throw new Error("disruptive plugin lifecycle requests require confirmation");
|
||||
}
|
||||
return createBridgeExecutionRequest({
|
||||
requestId: input.requestId,
|
||||
context: input.context,
|
||||
@@ -885,8 +832,7 @@ export function createProductionPluginLifecycleRequest(input: {
|
||||
payload: {
|
||||
operation: input.operation,
|
||||
targetVersion: input.targetVersion ?? "",
|
||||
idempotencyKey: input.idempotencyKey,
|
||||
confirmed: input.confirmed ? "true" : "false"
|
||||
idempotencyKey: input.idempotencyKey
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user