@openclaw/gateway-protocol 2026.9.5 → 2026.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,6 +81,14 @@ console.log(frame.id, frame.method);
81
81
  the validator for the selected method's `params`; the root entry point exports those
82
82
  validators as `validate*Params` functions.
83
83
 
84
+ External lifecycle controllers can validate suspension responses with
85
+ `validateGatewaySuspendPrepareResult` and `validateGatewaySuspendStatusResult`.
86
+ These use the canonical result schemas without changing the payload. Preserve
87
+ optional `writeCustody`: absence means unknown custody, not an empty list. Phase
88
+ names are open strings; consumers must not discard an unfamiliar owner phase.
89
+ Validation does not authorize a stop or replace lease, process-identity, and
90
+ readiness checks owned by the controller.
91
+
84
92
  ## Guard an event without TypeBox
85
93
 
86
94
  Use the lightweight guards when code only needs safe frame discrimination. They
@@ -88,6 +88,7 @@ export declare const GATEWAY_CLIENT_CAPS: {
88
88
  readonly MODEL_SELECTION_POLICY: "model-selection-policy";
89
89
  readonly RUN_TOOL_BINDINGS: "run-tool-bindings";
90
90
  readonly SESSION_SCOPED_EVENTS: "session-scoped-events";
91
+ readonly SKILL_CURATOR_LIVE_INVENTORY: "skill-curator-live-inventory";
91
92
  readonly PLUGIN_APPROVALS: "plugin-approvals";
92
93
  readonly TASK_SUGGESTIONS: "task-suggestions";
93
94
  readonly TERMINAL_OFFSET_SEQ: "terminal-offset-seq";
@@ -48,6 +48,7 @@ const GATEWAY_CLIENT_CAPS = {
48
48
  MODEL_SELECTION_POLICY: "model-selection-policy",
49
49
  RUN_TOOL_BINDINGS: "run-tool-bindings",
50
50
  SESSION_SCOPED_EVENTS: "session-scoped-events",
51
+ SKILL_CURATOR_LIVE_INVENTORY: "skill-curator-live-inventory",
51
52
  PLUGIN_APPROVALS: "plugin-approvals",
52
53
  TASK_SUGGESTIONS: "task-suggestions",
53
54
  TERMINAL_OFFSET_SEQ: "terminal-offset-seq",
@@ -1,5 +1,5 @@
1
- import { r as isRecord } from "./record-coerce-BVp8Dr-B.mjs";
2
1
  import { n as normalizeOptionalString } from "./string-coerce-BJ6bjzdv.mjs";
2
+ import { r as isRecord } from "./record-coerce-BVp8Dr-B.mjs";
3
3
  //#region ../normalization-core/src/string-normalization.ts
4
4
  /** Normalizes array-backed string lists and rejects non-array input as empty. */
5
5
  function normalizeTrimmedStringList(value) {
@@ -1,4 +1,4 @@
1
- import { a as EventFrame, d as RequestFrame, l as HelloOk, p as ResponseFrame, r as ErrorShape, s as GatewayFrame, t as ConnectParams, y as GATEWAY_SERVER_CAPS } from "./frames-X2k-UkK8.mjs";
1
+ import { a as EventFrame, d as RequestFrame, l as HelloOk, p as ResponseFrame, r as ErrorShape, s as GatewayFrame, t as ConnectParams, y as GATEWAY_SERVER_CAPS } from "./frames-DrA9fYYy.mjs";
2
2
  //#region src/frame-guards.d.ts
3
3
  export declare function isGatewayEventFrame(value: unknown): value is EventFrame;
4
4
  export declare function isGatewayResponseFrame(value: unknown): value is ResponseFrame;
@@ -1,6 +1,6 @@
1
1
  import { r as isRecord } from "./record-coerce-BVp8Dr-B.mjs";
2
2
  import { t as isNonEmptyProtocolString } from "./protocol-value-normalization-DfM01tqg.mjs";
3
- import { t as GATEWAY_SERVER_CAPS } from "./server-capabilities-Gfkxm7Ho.mjs";
3
+ import { t as GATEWAY_SERVER_CAPS } from "./server-capabilities-CBMEqI9z.mjs";
4
4
  //#region src/frame-guards.ts
5
5
  function isNonNegativeInteger(value) {
6
6
  return typeof value === "number" && Number.isInteger(value) && value >= 0;
@@ -8,6 +8,7 @@ declare const GATEWAY_SERVER_CAPS: {
8
8
  readonly MODEL_CATALOG_SNAPSHOT: "model-catalog-snapshot";
9
9
  readonly NODE_WORKER_BUNDLE_RETENTION: "node-worker-bundle-retention-v1";
10
10
  readonly NODE_WORKER_BUNDLE_STATUS: "node-worker-bundle-status-v1";
11
+ readonly NODE_WORKER_CAPTURED_EXEC_POLICY: "node-worker-captured-exec-policy";
11
12
  readonly NODE_WORKER_ENVIRONMENT_SESSION: "node-worker-environment-session-v1";
12
13
  readonly NODE_WORKER_PORTAL_STREAM: "node-worker-portal-stream-v1";
13
14
  readonly PUBLISHED_MODEL_CATALOG: "published-model-catalog";
@@ -165,6 +166,13 @@ declare const HelloOkSchema: Type.TObject<{
165
166
  delayMaxMs: Type.TNumber;
166
167
  utilization: Type.TNumber;
167
168
  cpuCoreRatio: Type.TNumber;
169
+ cpuBreakdown: Type.TOptional<Type.TObject<{
170
+ mainThreadCoreRatio: Type.TOptional<Type.TNumber>;
171
+ workerCoreRatio: Type.TOptional<Type.TNumber>;
172
+ otherThreadsCoreRatio: Type.TOptional<Type.TNumber>;
173
+ hostUtilization: Type.TOptional<Type.TNumber>;
174
+ hostCpuCount: Type.TOptional<Type.TInteger>;
175
+ }>>;
168
176
  }>>;
169
177
  plugins: Type.TOptional<Type.TObject<{
170
178
  loaded: Type.TArray<Type.TString>;
@@ -297,6 +305,7 @@ declare const HelloOkSchema: Type.TObject<{
297
305
  currentSha: Type.TOptional<Type.TString>;
298
306
  upstreamRef: Type.TOptional<Type.TString>;
299
307
  upstreamSha: Type.TOptional<Type.TString>;
308
+ repositoryUrl: Type.TOptional<Type.TString>;
300
309
  commitsBehind: Type.TOptional<Type.TInteger>;
301
310
  commits: Type.TOptional<Type.TArray<Type.TObject<{
302
311
  sha: Type.TString;
@@ -379,6 +388,19 @@ declare const HelloOkSchema: Type.TObject<{
379
388
  kind: Type.TString;
380
389
  label: Type.TString;
381
390
  }>>>;
391
+ controlUiLinkReaders: Type.TOptional<Type.TArray<Type.TObject<{
392
+ pluginId: Type.TString;
393
+ id: Type.TString;
394
+ label: Type.TString;
395
+ icon: Type.TOptional<Type.TString>;
396
+ linkReader: Type.TObject<{
397
+ hosts: Type.TArray<Type.TString>;
398
+ pathPattern: Type.TString;
399
+ detailMethod: Type.TString;
400
+ previewMethod: Type.TOptional<Type.TString>;
401
+ imageMethod: Type.TOptional<Type.TString>;
402
+ }>;
403
+ }>>>;
382
404
  pluginSurfaceUrls: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
383
405
  auth: Type.TObject<{
384
406
  method: Type.TOptional<Type.TUnion<[Type.TLiteral<"none">, Type.TLiteral<"token">, Type.TLiteral<"password">, Type.TLiteral<"tailscale">, Type.TLiteral<"device-token">, Type.TLiteral<"bootstrap-token">, Type.TLiteral<"trusted-proxy">]>>;
@@ -1256,6 +1256,7 @@ declare const GatewayErrorDetailCodes: {
1256
1256
  readonly SETUP_ADMISSION_BUSY: "SETUP_ADMISSION_BUSY";
1257
1257
  readonly GITHUB_PUBLICATION_SELECTION_REJECTED: "GITHUB_PUBLICATION_SELECTION_REJECTED";
1258
1258
  readonly SESSION_WORKSPACE_RECOVERY_REQUIRED: "SESSION_WORKSPACE_RECOVERY_REQUIRED";
1259
+ readonly TASK_WORKTREE_SOURCE_REQUIRED: "TASK_WORKTREE_SOURCE_REQUIRED";
1259
1260
  };
1260
1261
  /** Missing cron automation identified by its exact store key. */
1261
1262
  type CronJobNotFoundErrorDetails = {
@@ -1318,7 +1319,12 @@ type SessionWorkspaceRecoveryRequiredErrorDetails = {
1318
1319
  source: SessionMoveExpectedSource;
1319
1320
  };
1320
1321
  /** Structured details emitted by method-level failures. */
1321
- type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | SkillProposalRevisionChangedErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails | SetupAdmissionBusyErrorDetails | GitHubPublicationSelectionRejectedErrorDetails | SessionWorkspaceRecoveryRequiredErrorDetails;
1322
+ type TaskWorktreeSourceRequiredErrorDetails = {
1323
+ code: typeof GatewayErrorDetailCodes.TASK_WORKTREE_SOURCE_REQUIRED;
1324
+ cwd: string;
1325
+ };
1326
+ /** Structured details emitted by method-level failures. */
1327
+ type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | SkillProposalRevisionChangedErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails | SetupAdmissionBusyErrorDetails | GitHubPublicationSelectionRejectedErrorDetails | SessionWorkspaceRecoveryRequiredErrorDetails | TaskWorktreeSourceRequiredErrorDetails;
1322
1328
  declare function readGitHubPublicationSelectionRejectedError(error: unknown): GitHubPublicationSelectionRejectedErrorDetails | null;
1323
1329
  /** Reads a typed cron lookup miss without parsing operator-facing prose. */
1324
1330
  declare function readCronJobNotFoundError(error: unknown): CronJobNotFoundErrorDetails | null;
@@ -1338,4 +1344,4 @@ declare function isMcpAppViewExpiredError(error: unknown): boolean;
1338
1344
  */
1339
1345
  declare function readMissingScopeError(error: unknown): MissingScopeErrorDetails | null;
1340
1346
  //#endregion
1341
- export { SessionsMoveParams as $, SessionMovePlacement as A, SessionPlacementMachine as B, readMissingScopeError as C, SessionMoveExpectedSource as D, SessionMoveDeviceTargetSchema as E, SessionMoveTarget as F, SessionPlacementRunner as G, SessionPlacementMove as H, SessionMoveTargetSchema as I, SessionPlacementStateSchema as J, SessionPlacementRunnerSchema as K, SessionPlacement as L, SessionMovePlacementState as M, SessionMovePlacementStateSchema as N, SessionMoveExpectedSourceSchema as O, SessionMoveProfileTargetSchema as P, SessionsDispatchResultSchema as Q, SessionPlacementDiskSpace as R, readGitHubPublicationSelectionRejectedError as S, readSkillProposalRevisionChangedError as T, SessionPlacementMoveSchema as U, SessionPlacementMachineSchema as V, SessionPlacementProtocolSchemas as W, SessionsDispatchParamsSchema as X, SessionsDispatchParams as Y, SessionsDispatchResult as Z, UserPrefsLimitExceededErrorDetails as _, GatewayErrorDetailCodes as a, SessionsReclaimResult as at, isMcpAppViewExpiredError as b, McpAppViewExpiredErrorDetails as c, SessionsReclaimResultSchema as ct, ProjectCloneErrorDetails as d, SessionsMoveParamsSchema as et, ProjectCloneFailureCause as f, UnknownAgentIdErrorDetails as g, SkillProposalRevisionChangedErrorDetails as h, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT as i, SessionsReclaimParamsSchema as it, SessionMovePlacementSchema as j, SessionMoveGatewayTargetSchema as k, MissingScopeErrorDetails as l, SetupAdmissionBusyErrorDetails as m, ErrorCode as n, SessionsMoveResultSchema as nt, GatewayErrorDetails as o, SessionsReclaimResultPlacement as ot, SessionWorkspaceRecoveryRequiredErrorDetails as p, SessionPlacementSchema as q, ErrorCodes as r, SessionsReclaimParams as rt, GitHubPublicationSelectionRejectedErrorDetails as s, SessionsReclaimResultPlacementSchema as st, CronJobNotFoundErrorDetails as t, SessionsMoveResult as tt, OutboundDeliveryQueuedErrorDetails as u, WizardNotFoundErrorDetails as v, readMissingScopeErrorDetails as w, readCronJobNotFoundError as x, buildSkillProposalRevisionChangedErrorDetails as y, SessionPlacementDiskSpaceSchema as z };
1347
+ export { SessionsDispatchResultSchema as $, SessionMoveGatewayTargetSchema as A, SessionPlacementDiskSpaceSchema as B, readGitHubPublicationSelectionRejectedError as C, SessionMoveDeviceTargetSchema as D, readSkillProposalRevisionChangedError as E, SessionMoveProfileTargetSchema as F, SessionPlacementProtocolSchemas as G, SessionPlacementMachineSchema as H, SessionMoveTarget as I, SessionPlacementSchema as J, SessionPlacementRunner as K, SessionMoveTargetSchema as L, SessionMovePlacementSchema as M, SessionMovePlacementState as N, SessionMoveExpectedSource as O, SessionMovePlacementStateSchema as P, SessionsDispatchResult as Q, SessionPlacement as R, readCronJobNotFoundError as S, readMissingScopeErrorDetails as T, SessionPlacementMove as U, SessionPlacementMachine as V, SessionPlacementMoveSchema as W, SessionsDispatchParams as X, SessionPlacementStateSchema as Y, SessionsDispatchParamsSchema as Z, UnknownAgentIdErrorDetails as _, GatewayErrorDetailCodes as a, SessionsReclaimParamsSchema as at, buildSkillProposalRevisionChangedErrorDetails as b, McpAppViewExpiredErrorDetails as c, SessionsReclaimResultPlacementSchema as ct, ProjectCloneErrorDetails as d, SessionsMoveParams as et, ProjectCloneFailureCause as f, TaskWorktreeSourceRequiredErrorDetails as g, SkillProposalRevisionChangedErrorDetails as h, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT as i, SessionsReclaimParams as it, SessionMovePlacement as j, SessionMoveExpectedSourceSchema as k, MissingScopeErrorDetails as l, SessionsReclaimResultSchema as lt, SetupAdmissionBusyErrorDetails as m, ErrorCode as n, SessionsMoveResult as nt, GatewayErrorDetails as o, SessionsReclaimResult as ot, SessionWorkspaceRecoveryRequiredErrorDetails as p, SessionPlacementRunnerSchema as q, ErrorCodes as r, SessionsMoveResultSchema as rt, GitHubPublicationSelectionRejectedErrorDetails as s, SessionsReclaimResultPlacement as st, CronJobNotFoundErrorDetails as t, SessionsMoveParamsSchema as tt, OutboundDeliveryQueuedErrorDetails as u, UserPrefsLimitExceededErrorDetails as v, readMissingScopeError as w, isMcpAppViewExpiredError as x, WizardNotFoundErrorDetails as y, SessionPlacementDiskSpace as z };
@@ -1,2 +1,2 @@
1
- import { C as readMissingScopeError, S as readGitHubPublicationSelectionRejectedError, T as readSkillProposalRevisionChangedError, _ as UserPrefsLimitExceededErrorDetails, a as GatewayErrorDetailCodes, b as isMcpAppViewExpiredError, c as McpAppViewExpiredErrorDetails, d as ProjectCloneErrorDetails, f as ProjectCloneFailureCause, g as UnknownAgentIdErrorDetails, h as SkillProposalRevisionChangedErrorDetails, i as GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, l as MissingScopeErrorDetails, m as SetupAdmissionBusyErrorDetails, n as ErrorCode, o as GatewayErrorDetails, p as SessionWorkspaceRecoveryRequiredErrorDetails, r as ErrorCodes, s as GitHubPublicationSelectionRejectedErrorDetails, t as CronJobNotFoundErrorDetails, u as OutboundDeliveryQueuedErrorDetails, v as WizardNotFoundErrorDetails, w as readMissingScopeErrorDetails, x as readCronJobNotFoundError, y as buildSkillProposalRevisionChangedErrorDetails } from "./gateway-error-details-Djlwga0B.mjs";
2
- export { CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, GatewayErrorDetails, GitHubPublicationSelectionRejectedErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SessionWorkspaceRecoveryRequiredErrorDetails, SetupAdmissionBusyErrorDetails, SkillProposalRevisionChangedErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, buildSkillProposalRevisionChangedErrorDetails, isMcpAppViewExpiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails, readSkillProposalRevisionChangedError };
1
+ import { C as readGitHubPublicationSelectionRejectedError, E as readSkillProposalRevisionChangedError, S as readCronJobNotFoundError, T as readMissingScopeErrorDetails, _ as UnknownAgentIdErrorDetails, a as GatewayErrorDetailCodes, b as buildSkillProposalRevisionChangedErrorDetails, c as McpAppViewExpiredErrorDetails, d as ProjectCloneErrorDetails, f as ProjectCloneFailureCause, g as TaskWorktreeSourceRequiredErrorDetails, h as SkillProposalRevisionChangedErrorDetails, i as GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, l as MissingScopeErrorDetails, m as SetupAdmissionBusyErrorDetails, n as ErrorCode, o as GatewayErrorDetails, p as SessionWorkspaceRecoveryRequiredErrorDetails, r as ErrorCodes, s as GitHubPublicationSelectionRejectedErrorDetails, t as CronJobNotFoundErrorDetails, u as OutboundDeliveryQueuedErrorDetails, v as UserPrefsLimitExceededErrorDetails, w as readMissingScopeError, x as isMcpAppViewExpiredError, y as WizardNotFoundErrorDetails } from "./gateway-error-details-B0Ms-xqB.mjs";
2
+ export { CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, GatewayErrorDetails, GitHubPublicationSelectionRejectedErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SessionWorkspaceRecoveryRequiredErrorDetails, SetupAdmissionBusyErrorDetails, SkillProposalRevisionChangedErrorDetails, TaskWorktreeSourceRequiredErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, buildSkillProposalRevisionChangedErrorDetails, isMcpAppViewExpiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails, readSkillProposalRevisionChangedError };
@@ -33,7 +33,8 @@ const GatewayErrorDetailCodes = {
33
33
  WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND",
34
34
  SETUP_ADMISSION_BUSY: "SETUP_ADMISSION_BUSY",
35
35
  GITHUB_PUBLICATION_SELECTION_REJECTED: "GITHUB_PUBLICATION_SELECTION_REJECTED",
36
- SESSION_WORKSPACE_RECOVERY_REQUIRED: "SESSION_WORKSPACE_RECOVERY_REQUIRED"
36
+ SESSION_WORKSPACE_RECOVERY_REQUIRED: "SESSION_WORKSPACE_RECOVERY_REQUIRED",
37
+ TASK_WORKTREE_SOURCE_REQUIRED: "TASK_WORKTREE_SOURCE_REQUIRED"
37
38
  };
38
39
  const LEGACY_MISSING_SCOPE_PATTERN = /\bmissing scope:\s*([a-z0-9._-]+)/i;
39
40
  const SHA256_PATTERN = /^[a-fA-F0-9]{64}$/;