@openclaw/gateway-protocol 2026.11.1 → 2026.11.5-beta.1

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +17 -10
  2. package/README.md +10 -2
  3. package/dist/.source-module-urls/5712ecf2b505e1ffe07307c66aedeadc7e26051742412d27b27f0c2a96ba2443.json +1 -0
  4. package/dist/catalog-9MCHFQAi.mjs +23363 -0
  5. package/dist/client-info.d.mts +10 -1
  6. package/dist/client-info.mjs +14 -9
  7. package/dist/connect-error-details.d.mts +2 -1
  8. package/dist/connect-error-details.mjs +5 -7
  9. package/dist/frame-guards.d.mts +2 -1
  10. package/dist/frame-guards.mjs +4 -6
  11. package/dist/{frames-CP0Lw0m-.d.mts → frames-hPoAoltM.d.mts} +18 -62
  12. package/dist/gateway-error-details-BEVjnoxj.d.mts +236 -0
  13. package/dist/gateway-error-details.d.mts +2 -2
  14. package/dist/gateway-error-details.mjs +7 -5
  15. package/dist/index.d.mts +7293 -6515
  16. package/dist/index.mjs +715 -545
  17. package/dist/number-coercion-C3Y6DVez.mjs +9 -0
  18. package/dist/{schema-modules-BnXwKfJT.d.mts → schema-modules-Bdsmijdn.d.mts} +3579 -776
  19. package/dist/schema.d.mts +7 -5
  20. package/dist/schema.mjs +105 -60
  21. package/dist/server-capabilities-CYIhEfgo.d.mts +55 -0
  22. package/dist/{server-capabilities-DRQ3mUjT.mjs → server-capabilities-DA3Gf1Rp.mjs} +3 -0
  23. package/dist/session-row-deltas.d.mts +21 -0
  24. package/dist/session-row-deltas.mjs +8 -0
  25. package/dist/startup-unavailable.d.mts +4 -1
  26. package/dist/startup-unavailable.mjs +3 -1
  27. package/dist/system-agent-context.d.mts +2 -1
  28. package/dist/{theme-BshtYPJX.mjs → theme-DRGRYAgn.mjs} +1 -1
  29. package/dist/theme.d.mts +1 -1
  30. package/dist/theme.mjs +1 -2
  31. package/dist/themes-GZs9U79C.d.mts +293 -0
  32. package/package.json +7 -2
  33. package/protocol.schema.json +36129 -26369
  34. package/dist/catalog-BwKmjIvR.mjs +0 -16822
  35. package/dist/gateway-error-details-BqRYhh5h.d.mts +0 -1489
  36. package/dist/theme-dtBTRSNj.d.mts +0 -109
@@ -82,19 +82,28 @@ export declare const GATEWAY_CLIENT_CAPS: {
82
82
  readonly AGENT_KIND: "agent-kind";
83
83
  readonly APPROVALS: "approvals";
84
84
  readonly CHAT_ONLY_ASSISTANT_TEXT: "chat-only-assistant-text";
85
+ readonly CHAT_QUEUE_STATUS: "chat-queue-status";
85
86
  readonly EXEC_APPROVALS: "exec-approvals";
87
+ readonly HEALTH_SUMMARY: "health-summary";
88
+ readonly HELLO_HEALTH_ON_DEMAND: "hello-health-on-demand";
89
+ readonly HELLO_PRESENCE_SELF: "hello-presence-self";
86
90
  readonly INLINE_WIDGETS: "inline-widgets";
87
91
  readonly MODEL_CATALOG_SNAPSHOT: "model-catalog-snapshot";
88
92
  readonly MODEL_SELECTION_POLICY: "model-selection-policy";
93
+ readonly MODEL_WAIT_STATUS: "model-wait-status";
94
+ readonly NO_QUESTION_INPUT: "no-question-input";
89
95
  readonly RUN_TOOL_BINDINGS: "run-tool-bindings";
96
+ readonly ROSTER_MESSAGE_BODIES_OPTIONAL: "roster-message-bodies-optional";
90
97
  readonly SESSION_SCOPED_EVENTS: "session-scoped-events";
98
+ readonly SESSION_ROW_DELTAS: "session-row-deltas";
99
+ readonly SESSION_EVENT_FIELD_REFS: "session-event-field-refs";
91
100
  readonly PLUGIN_APPROVALS: "plugin-approvals";
101
+ readonly PRESENCE_DELTAS: "presence-deltas";
92
102
  readonly TASK_SUGGESTIONS: "task-suggestions";
93
103
  readonly TERMINAL_OFFSET_SEQ: "terminal-offset-seq";
94
104
  readonly TERMINAL_SESSION_METADATA: "terminal-session-metadata";
95
105
  readonly TERMINAL_UPLOAD_PATH_STYLE: "terminal-upload-path-style";
96
106
  readonly TOOL_EVENTS: "tool-events";
97
- readonly UI_AGENT_GITHUB_SETTINGS: "ui-agent-github-settings";
98
107
  readonly UI_COMMANDS: "ui-commands";
99
108
  readonly ULTRAFAST: "ultrafast";
100
109
  readonly USAGE_REFRESHING: "usage-refreshing";
@@ -46,30 +46,37 @@ const GATEWAY_CLIENT_CAPS = {
46
46
  AGENT_KIND: "agent-kind",
47
47
  APPROVALS: "approvals",
48
48
  CHAT_ONLY_ASSISTANT_TEXT: "chat-only-assistant-text",
49
+ CHAT_QUEUE_STATUS: "chat-queue-status",
49
50
  EXEC_APPROVALS: "exec-approvals",
51
+ HEALTH_SUMMARY: "health-summary",
52
+ HELLO_HEALTH_ON_DEMAND: "hello-health-on-demand",
53
+ HELLO_PRESENCE_SELF: "hello-presence-self",
50
54
  INLINE_WIDGETS: "inline-widgets",
51
55
  MODEL_CATALOG_SNAPSHOT: "model-catalog-snapshot",
52
56
  MODEL_SELECTION_POLICY: "model-selection-policy",
57
+ MODEL_WAIT_STATUS: "model-wait-status",
58
+ NO_QUESTION_INPUT: "no-question-input",
53
59
  RUN_TOOL_BINDINGS: "run-tool-bindings",
60
+ ROSTER_MESSAGE_BODIES_OPTIONAL: "roster-message-bodies-optional",
54
61
  SESSION_SCOPED_EVENTS: "session-scoped-events",
62
+ SESSION_ROW_DELTAS: "session-row-deltas",
63
+ SESSION_EVENT_FIELD_REFS: "session-event-field-refs",
55
64
  PLUGIN_APPROVALS: "plugin-approvals",
65
+ PRESENCE_DELTAS: "presence-deltas",
56
66
  TASK_SUGGESTIONS: "task-suggestions",
57
67
  TERMINAL_OFFSET_SEQ: "terminal-offset-seq",
58
68
  TERMINAL_SESSION_METADATA: "terminal-session-metadata",
59
69
  TERMINAL_UPLOAD_PATH_STYLE: "terminal-upload-path-style",
60
70
  TOOL_EVENTS: "tool-events",
61
- UI_AGENT_GITHUB_SETTINGS: "ui-agent-github-settings",
62
71
  UI_COMMANDS: "ui-commands",
63
72
  ULTRAFAST: "ultrafast",
64
73
  USAGE_REFRESHING: "usage-refreshing"
65
74
  };
66
- const GATEWAY_CLIENT_ID_SET = new Set(Object.values(GATEWAY_CLIENT_IDS));
67
- const GATEWAY_CLIENT_MODE_SET = new Set(Object.values(GATEWAY_CLIENT_MODES));
75
+ const GATEWAY_CLIENT_ID_BY_VALUE = new Map(Object.values(GATEWAY_CLIENT_IDS).map((value) => [value, value]));
76
+ const GATEWAY_CLIENT_MODE_BY_VALUE = new Map(Object.values(GATEWAY_CLIENT_MODES).map((value) => [value, value]));
68
77
  /** Normalizes untrusted client ids and rejects unknown values. */
69
78
  function normalizeGatewayClientId(raw) {
70
- const normalized = normalizeOptionalLowercaseString(raw);
71
- if (!normalized) return;
72
- return GATEWAY_CLIENT_ID_SET.has(normalized) ? normalized : void 0;
79
+ return GATEWAY_CLIENT_ID_BY_VALUE.get(normalizeOptionalLowercaseString(raw) ?? "");
73
80
  }
74
81
  /** Normalizes legacy client-name fields through the canonical client-id registry. */
75
82
  function normalizeGatewayClientName(raw) {
@@ -77,9 +84,7 @@ function normalizeGatewayClientName(raw) {
77
84
  }
78
85
  /** Normalizes untrusted client modes and rejects unknown values. */
79
86
  function normalizeGatewayClientMode(raw) {
80
- const normalized = normalizeOptionalLowercaseString(raw);
81
- if (!normalized) return;
82
- return GATEWAY_CLIENT_MODE_SET.has(normalized) ? normalized : void 0;
87
+ return GATEWAY_CLIENT_MODE_BY_VALUE.get(normalizeOptionalLowercaseString(raw) ?? "");
83
88
  }
84
89
  /** Checks a client-advertised capability list without treating missing caps as errors. */
85
90
  function hasGatewayClientCap(caps, cap) {
@@ -149,4 +149,5 @@ export declare function formatConnectErrorMessage(params: {
149
149
  message?: string;
150
150
  details?: unknown;
151
151
  }): string;
152
- //#endregion
152
+ //#endregion
153
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { r as normalizeOptionalString } from "./string-coerce-BPnmwYe_.mjs";
2
+ import { n as asPositiveInteger } from "./number-coercion-C3Y6DVez.mjs";
2
3
  import { r as isRecord } from "./record-coerce-DVQGe6I0.mjs";
3
4
  //#region packages/normalization-core/src/string-normalization.ts
4
5
  /** Normalizes array-backed string lists and rejects non-array input as empty. */
@@ -326,10 +327,10 @@ function formatConnectErrorMessage(params) {
326
327
  }
327
328
  function formatProtocolMismatchMessage(message, details) {
328
329
  const raw = details;
329
- const clientMin = normalizeProtocolNumber(raw.clientMinProtocol);
330
- const clientMax = normalizeProtocolNumber(raw.clientMaxProtocol);
331
- const expected = normalizeProtocolNumber(raw.expectedProtocol);
332
- const probeMin = normalizeProtocolNumber(raw.minimumProbeProtocol);
330
+ const clientMin = asPositiveInteger(raw.clientMinProtocol);
331
+ const clientMax = asPositiveInteger(raw.clientMaxProtocol);
332
+ const expected = asPositiveInteger(raw.expectedProtocol);
333
+ const probeMin = asPositiveInteger(raw.minimumProbeProtocol);
333
334
  const parts = [];
334
335
  if (clientMin !== void 0 && clientMax !== void 0) parts.push(clientMin === clientMax ? `Control UI v${clientMin}` : `Control UI v${clientMin}-v${clientMax}`);
335
336
  if (expected !== void 0) parts.push(`Gateway v${expected}`);
@@ -337,8 +338,5 @@ function formatProtocolMismatchMessage(message, details) {
337
338
  const normalized = normalizeOptionalString(message) ?? "protocol mismatch";
338
339
  return parts.length > 0 ? `${normalized}: ${parts.join(", ")}` : normalized;
339
340
  }
340
- function normalizeProtocolNumber(value) {
341
- return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : void 0;
342
- }
343
341
  //#endregion
344
342
  export { ConnectErrorDetailCodes, buildPairingConnectCloseReason, buildPairingConnectErrorDetails, buildPairingConnectErrorMessage, buildPairingConnectRecoveryTitle, classifyGatewayConnectFailure, describePairingConnectRequirement, formatConnectErrorMessage, formatConnectPairingRequiredMessage, normalizePairingConnectRequestId, readConnectErrorDetailCode, readConnectErrorRecoveryAdvice, readConnectPairingRequiredMessage, readControlUiBuildMismatchId, readPairingConnectErrorDetails, resolveAuthConnectErrorDetailCode, resolveDeviceAuthConnectErrorDetailCode };
@@ -1,4 +1,5 @@
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-CP0Lw0m-.mjs";
1
+ import { t as GATEWAY_SERVER_CAPS } from "./server-capabilities-CYIhEfgo.mjs";
2
+ import { _ as ErrorShape, a as GatewayFrame, d as ResponseFrame, l as RequestFrame, r as EventFrame, s as HelloOk, t as ConnectParams } from "./frames-hPoAoltM.mjs";
2
3
  //#region packages/gateway-protocol/src/frame-guards.d.ts
3
4
  export declare function isGatewayEventFrame(value: unknown): value is EventFrame;
4
5
  export declare function isGatewayResponseFrame(value: unknown): value is ResponseFrame;
@@ -1,18 +1,16 @@
1
+ import { t as asNonNegativeInteger } from "./number-coercion-C3Y6DVez.mjs";
1
2
  import { r as isRecord } from "./record-coerce-DVQGe6I0.mjs";
2
- import { n as isNonEmptyProtocolString, t as GATEWAY_SERVER_CAPS } from "./server-capabilities-DRQ3mUjT.mjs";
3
+ import { n as isNonEmptyProtocolString, t as GATEWAY_SERVER_CAPS } from "./server-capabilities-DA3Gf1Rp.mjs";
3
4
  //#region packages/gateway-protocol/src/frame-guards.ts
4
- function isNonNegativeInteger(value) {
5
- return typeof value === "number" && Number.isInteger(value) && value >= 0;
6
- }
7
5
  function isGatewayErrorShape(value) {
8
6
  if (!isRecord(value)) return false;
9
7
  if (!isNonEmptyProtocolString(value.code) || !isNonEmptyProtocolString(value.message)) return false;
10
8
  if (value.retryable !== void 0 && typeof value.retryable !== "boolean") return false;
11
- return value.retryAfterMs === void 0 || isNonNegativeInteger(value.retryAfterMs);
9
+ return value.retryAfterMs === void 0 || asNonNegativeInteger(value.retryAfterMs) !== void 0;
12
10
  }
13
11
  function isGatewayEventFrame(value) {
14
12
  if (!isRecord(value) || value.type !== "event" || !isNonEmptyProtocolString(value.event)) return false;
15
- return value.seq === void 0 || isNonNegativeInteger(value.seq);
13
+ return value.seq === void 0 || asNonNegativeInteger(value.seq) !== void 0;
16
14
  }
17
15
  function isGatewayResponseFrame(value) {
18
16
  if (!isRecord(value) || value.type !== "res" || !isNonEmptyProtocolString(value.id) || typeof value.ok !== "boolean") return false;
@@ -1,54 +1,14 @@
1
1
  import { Static, Type } from "typebox";
2
- //#region packages/gateway-protocol/src/server-capabilities.d.ts
3
- /** Stable feature names advertised in Gateway hello responses. */
4
- declare const GATEWAY_SERVER_CAPS: {
5
- readonly AGENT_SESSION_ID_CREATE: "agent-session-id-create-v1";
6
- readonly BOARD_WIDGET_PUT_CANVAS_DOC: "board-widget-put-canvas-doc";
7
- readonly CHAT_SEND_ROUTING_CONTRACT: "chat-send-routing-contract";
8
- readonly CONTROL_UI_BROWSER_FOCUS: "control-ui-browser-focus";
9
- readonly GATEWAY_RESTART_TARGET_SAFE: "gateway-restart-target-safe-v1";
10
- readonly LOCAL_STATE_OWNER_ROUTING: "local-state-owner-routing-v1";
11
- readonly MODELS_AUTH_SET_API_KEY_OWNER: "models-auth-set-api-key-owner-v1";
12
- readonly MODELS_AUTH_LOGIN_OWNER: "models-auth-login-owner-v1";
13
- readonly CHANNELS_PAIRING_LIST_OWNER: "channels-pairing-list-owner-v1";
14
- readonly CHANNELS_PAIRING_APPROVE_OWNER: "channels-pairing-approve-owner-v1";
15
- readonly EXEC_APPROVALS_GET_OWNER: "exec-approvals-get-owner-v1";
16
- readonly EXEC_APPROVALS_SET_OWNER: "exec-approvals-set-owner-v1";
17
- readonly WORKTREES_REMOVE_OWNER: "worktrees-remove-owner-v1";
18
- readonly WORKTREES_RESTORE_OWNER: "worktrees-restore-owner-v1";
19
- readonly WORKTREES_GC_OWNER: "worktrees-gc-owner-v1";
20
- readonly WORKTREES_RECOVER_REMOVAL_OWNER: "worktrees-recover-removal-owner-v1";
21
- readonly WORKTREES_RETIRE_SNAPSHOT_OWNER: "worktrees-retire-snapshot-owner-v1";
22
- readonly MODEL_CATALOG_SNAPSHOT: "model-catalog-snapshot";
23
- readonly NODE_PERMISSION_ERRORS: "node-permission-errors";
24
- readonly NODE_WORKER_BUNDLE_RETENTION: "node-worker-bundle-retention-v1";
25
- readonly NODE_WORKER_BUNDLE_STATUS: "node-worker-bundle-status-v1";
26
- readonly NODE_WORKER_CAPTURED_EXEC_POLICY: "node-worker-captured-exec-policy";
27
- readonly NODE_WORKER_WORKSPACE_QUIESCENCE: "node-worker-workspace-quiescence-v1";
28
- readonly NODE_WORKER_DEVICE_FOLDERS: "node-worker-device-folders-v1";
29
- readonly NODE_WORKER_ENVIRONMENT_SESSION: "node-worker-environment-session-v1";
30
- readonly NODE_WORKER_HOST_DIAGNOSTICS: "node-worker-host-diagnostics-v1";
31
- readonly NODE_WORKER_IDLE_RETENTION: "node-worker-idle-retention-v1";
32
- readonly NODE_WORKER_LAUNCH_TOOL_NAMES: "node-worker-launch-tool-names-v1";
33
- readonly NODE_WORKER_NATIVE_INFERENCE: "node-worker-native-inference-v1";
34
- readonly NODE_WORKER_PORTAL_STREAM: "node-worker-portal-stream-v1";
35
- readonly NODE_WORKER_PROMPT_CONTEXT: "node-worker-prompt-context-v1";
36
- readonly NODE_WORKER_STATUS_WAIT: "node-worker-status-wait-v1";
37
- readonly PUBLISHED_MODEL_CATALOG: "published-model-catalog";
38
- readonly PROFILE_BINDING: "profile-binding-v1";
39
- readonly PROGRESS_CARD_AGENT_SCOPE: "progress-card-agent-scope-v1";
40
- readonly SESSION_SCOPED_CHAT_METADATA: "session-scoped-chat-metadata";
41
- readonly SESSION_SCOPED_MODEL_CATALOG: "session-scoped-model-catalog";
42
- readonly SESSION_UNREAD_ACK_CONTRACT: "session-unread-ack-contract";
43
- readonly SESSION_GOAL_START: "session-goal-start-v1";
44
- readonly SESSION_SETTINGS_CONTRACT: "session-settings-contract";
45
- readonly SESSION_SETTINGS_CAS: "session-settings-cas-v1";
46
- readonly SENDER_RESTRICTED_HIDDEN_HELPERS: "sender-restricted-hidden-helpers-v1";
47
- readonly SYSTEM_AGENT_WIZARD_CANCEL: "openclaw-chat-wizard-cancel";
48
- readonly SYSTEM_AGENT_SETUP_MODEL_REF: "openclaw-setup-model-ref";
49
- readonly TASK_SUGGESTIONS_ACCEPT_MODES: "taskSuggestions.acceptModes";
50
- readonly TALK_SESSION_CLOSE_DISPOSITION: "talk-session-close-disposition";
51
- };
2
+ //#region packages/gateway-protocol/src/schema/error-shape.d.ts
3
+ /** Standard structured error shape used in response frames and connect failures. */
4
+ declare const ErrorShapeSchema: Type.TObject<{
5
+ code: Type.TString;
6
+ message: Type.TString;
7
+ details: Type.TOptional<Type.TUnknown>;
8
+ retryable: Type.TOptional<Type.TBoolean>;
9
+ retryAfterMs: Type.TOptional<Type.TInteger>;
10
+ }>;
11
+ type ErrorShape = Static<typeof ErrorShapeSchema>;
52
12
  //#endregion
53
13
  //#region packages/gateway-protocol/src/schema/frames.d.ts
54
14
  declare const TickEventSchema: Type.TObject<{
@@ -76,6 +36,8 @@ declare const ConnectParamsSchema: Type.TObject<{
76
36
  instanceId: Type.TOptional<Type.TString>;
77
37
  }>;
78
38
  caps: Type.TOptional<Type.TArray<Type.TString>>;
39
+ /** Initial roster-body preference; exact subscriptions always receive complete messages. */
40
+ includeSessionMessageBodies: Type.TOptional<Type.TBoolean>;
79
41
  commands: Type.TOptional<Type.TArray<Type.TString>>;
80
42
  /** Additive Computer Use declaration; the owning core contract validates its bounded shape. */
81
43
  computerUse: Type.TOptional<Type.TUnknown>;
@@ -173,6 +135,7 @@ declare const HelloOkSchema: Type.TObject<{
173
135
  }>>;
174
136
  health: Type.TObject<{
175
137
  ok: Type.TOptional<Type.TLiteral<true>>;
138
+ coreReady: Type.TOptional<Type.TBoolean>;
176
139
  ts: Type.TOptional<Type.TInteger>;
177
140
  durationMs: Type.TOptional<Type.TInteger>;
178
141
  eventLoop: Type.TOptional<Type.TObject<{
@@ -451,7 +414,6 @@ declare const HelloOkSchema: Type.TObject<{
451
414
  }>>;
452
415
  }>;
453
416
  controlUiUrl: Type.TOptional<Type.TString>;
454
- controlUiBasePath: Type.TOptional<Type.TString>;
455
417
  controlUiTabs: Type.TOptional<Type.TArray<Type.TObject<{
456
418
  pluginId: Type.TString;
457
419
  id: Type.TString;
@@ -481,6 +443,8 @@ declare const HelloOkSchema: Type.TObject<{
481
443
  detailMethod: Type.TString;
482
444
  previewMethod: Type.TOptional<Type.TString>;
483
445
  imageMethod: Type.TOptional<Type.TString>;
446
+ sessionScoped: Type.TOptional<Type.TBoolean>;
447
+ progressive: Type.TOptional<Type.TBoolean>;
484
448
  }>;
485
449
  }>>>;
486
450
  pluginSurfaceUrls: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
@@ -491,7 +455,8 @@ declare const HelloOkSchema: Type.TObject<{
491
455
  recoveryScope: Type.TOptional<Type.TString>;
492
456
  role: Type.TString;
493
457
  scopes: Type.TArray<Type.TString>;
494
- sessionCap: Type.TOptional<Type.TUnion<[Type.TLiteral<"write">, Type.TLiteral<"suggest">, Type.TLiteral<"view">, Type.TLiteral<"none">]>>;
458
+ roleAllowsAdmin: Type.TOptional<Type.TBoolean>;
459
+ sessionCap: Type.TOptional<Type.TUnion<[Type.TLiteral<"write">, Type.TLiteral<"suggest">, Type.TLiteral<"view">, Type.TLiteral<"invited">, Type.TLiteral<"none">]>>;
495
460
  issuedAtMs: Type.TOptional<Type.TInteger>;
496
461
  deviceTokens: Type.TOptional<Type.TArray<Type.TObject<{
497
462
  deviceToken: Type.TString;
@@ -512,14 +477,6 @@ declare const HelloOkSchema: Type.TObject<{
512
477
  hasMultipleSessionSharingIdentities: Type.TOptional<Type.TBoolean>;
513
478
  }>;
514
479
  }>;
515
- /** Standard structured error shape used in response frames and connect failures. */
516
- declare const ErrorShapeSchema: Type.TObject<{
517
- code: Type.TString;
518
- message: Type.TString;
519
- details: Type.TOptional<Type.TUnknown>;
520
- retryable: Type.TOptional<Type.TBoolean>;
521
- retryAfterMs: Type.TOptional<Type.TInteger>;
522
- }>;
523
480
  /** Client request frame envelope; `method` selects the payload validator. */
524
481
  declare const RequestFrameSchema: Type.TObject<{
525
482
  type: Type.TLiteral<"req">;
@@ -586,7 +543,6 @@ declare const GatewayFrameSchema: Type.TUnion<[Type.TObject<{
586
543
  }>]>;
587
544
  type ConnectParams = Static<typeof ConnectParamsSchema>;
588
545
  type HelloOk = Static<typeof HelloOkSchema>;
589
- type ErrorShape = Static<typeof ErrorShapeSchema>;
590
546
  type RequestFrame = Static<typeof RequestFrameSchema>;
591
547
  type ResponseFrame = Static<typeof ResponseFrameSchema>;
592
548
  type EventFrame = Static<typeof EventFrameSchema>;
@@ -594,4 +550,4 @@ type GatewayFrame = Static<typeof GatewayFrameSchema>;
594
550
  type TickEvent = Static<typeof TickEventSchema>;
595
551
  type ShutdownEvent = Static<typeof ShutdownEventSchema>;
596
552
  //#endregion
597
- export { TickEvent as _, EventFrame as a, GatewayFrameSchema as c, RequestFrame as d, RequestFrameSchema as f, ShutdownEventSchema as g, ShutdownEvent as h, ErrorShapeSchema as i, HelloOk as l, ResponseFrameSchema as m, ConnectParamsSchema as n, EventFrameSchema as o, ResponseFrame as p, ErrorShape as r, GatewayFrame as s, ConnectParams as t, HelloOkSchema as u, TickEventSchema as v, GATEWAY_SERVER_CAPS as y };
553
+ export { ErrorShape as _, GatewayFrame as a, HelloOkSchema as c, ResponseFrame as d, ResponseFrameSchema as f, TickEventSchema as g, TickEvent as h, EventFrameSchema as i, RequestFrame as l, ShutdownEventSchema as m, ConnectParamsSchema as n, GatewayFrameSchema as o, ShutdownEvent as p, EventFrame as r, HelloOk as s, ConnectParams as t, RequestFrameSchema as u, ErrorShapeSchema as v };
@@ -0,0 +1,236 @@
1
+ import { _ as ErrorShape } from "./frames-hPoAoltM.mjs";
2
+ import { Static, Type } from "typebox";
3
+ //#region packages/gateway-protocol/src/schema/error-codes.d.ts
4
+ declare const CronJobNotFoundErrorDetailsSchema: Type.TObject<{
5
+ code: Type.TLiteral<"CRON_JOB_NOT_FOUND">;
6
+ jobId: Type.TString;
7
+ }>;
8
+ /** Missing operator-scope details shared by WebSocket and HTTP responses. */
9
+ declare const MissingScopeErrorDetailsSchema: Type.TObject<{
10
+ code: Type.TLiteral<"MISSING_SCOPE">;
11
+ missingScope: Type.TString;
12
+ requiredScopes: Type.TArray<Type.TString>;
13
+ }>;
14
+ declare const McpAppViewExpiredErrorDetailsSchema: Type.TObject<{
15
+ code: Type.TLiteral<"MCP_APP_VIEW_EXPIRED">;
16
+ }>;
17
+ declare const OutboundDeliveryQueuedErrorDetailsSchema: Type.TObject<{
18
+ code: Type.TLiteral<"OUTBOUND_DELIVERY_QUEUED">;
19
+ }>;
20
+ declare const UserPrefsLimitExceededErrorDetailsSchema: Type.TObject<{
21
+ code: Type.TLiteral<"USER_PREFS_LIMIT_EXCEEDED">;
22
+ limit: Type.TInteger;
23
+ currentCount: Type.TInteger;
24
+ }>;
25
+ declare const UnknownAgentIdErrorDetailsSchema: Type.TObject<{
26
+ code: Type.TLiteral<"UNKNOWN_AGENT_ID">;
27
+ agentId: Type.TString;
28
+ }>;
29
+ declare const SetupAdmissionBusyErrorDetailsSchema: Type.TObject<{
30
+ code: Type.TLiteral<"SETUP_ADMISSION_BUSY">;
31
+ }>;
32
+ declare const GitHubPublicationSelectionRejectedErrorDetailsSchema: Type.TObject<{
33
+ code: Type.TLiteral<"GITHUB_PUBLICATION_SELECTION_REJECTED">;
34
+ idempotencyKey: Type.TString;
35
+ }>;
36
+ declare const WizardNotFoundErrorDetailsSchema: Type.TObject<{
37
+ code: Type.TLiteral<"WIZARD_NOT_FOUND">;
38
+ }>;
39
+ declare const ProjectCloneErrorDetailsSchema: Type.TObject<{
40
+ code: Type.TLiteral<"PROJECT_CLONE_FAILED">;
41
+ cause: Type.TString;
42
+ }>;
43
+ declare const SessionWorkspaceRecoveryRequiredErrorDetailsSchema: Type.TObject<{
44
+ code: Type.TLiteral<"SESSION_WORKSPACE_RECOVERY_REQUIRED">;
45
+ cause: Type.TLiteral<"device_offline">;
46
+ recoveryAction: Type.TLiteral<"continue_on_gateway">;
47
+ sessionId: Type.TString;
48
+ source: Type.TObject<{
49
+ generation: Type.TInteger;
50
+ environmentId: Type.TString;
51
+ ownerEpoch: Type.TInteger;
52
+ }>;
53
+ }>;
54
+ /** Structured details emitted by method-level failures. */
55
+ declare const TaskWorktreeSourceRequiredErrorDetailsSchema: Type.TObject<{
56
+ code: Type.TLiteral<"TASK_WORKTREE_SOURCE_REQUIRED">;
57
+ cwd: Type.TString;
58
+ }>;
59
+ declare const ClawHubRiskAcknowledgementRequiredErrorDetailsSchema: Type.TObject<{
60
+ code: Type.TLiteral<"CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED">;
61
+ warning: Type.TString;
62
+ }>;
63
+ declare const TemplateReviewRequiredErrorDetailsSchema: Type.TObject<{
64
+ code: Type.TLiteral<"TEMPLATE_REVIEW_REQUIRED">;
65
+ kind: Type.TUnion<[Type.TLiteral<"plugin">, Type.TLiteral<"skill">]>;
66
+ }>;
67
+ declare const PendingInputNotRetiredErrorDetailsSchema: Type.TObject<{
68
+ code: Type.TLiteral<"PENDING_INPUT_NOT_RETIRED">;
69
+ inputIds: Type.TArray<Type.TString>;
70
+ }>;
71
+ /** Structured details emitted by method-level failures. */
72
+ declare const GatewayErrorDetailsSchema: Type.TUnion<[Type.TObject<{
73
+ code: Type.TLiteral<"CRON_JOB_NOT_FOUND">;
74
+ jobId: Type.TString;
75
+ }>, Type.TObject<{
76
+ code: Type.TLiteral<"MISSING_SCOPE">;
77
+ missingScope: Type.TString;
78
+ requiredScopes: Type.TArray<Type.TString>;
79
+ }>, Type.TObject<{
80
+ code: Type.TLiteral<"MCP_APP_VIEW_EXPIRED">;
81
+ }>, Type.TObject<{
82
+ code: Type.TLiteral<"OUTBOUND_DELIVERY_QUEUED">;
83
+ }>, Type.TObject<{
84
+ code: Type.TLiteral<"USER_PREFS_LIMIT_EXCEEDED">;
85
+ limit: Type.TInteger;
86
+ currentCount: Type.TInteger;
87
+ }>, Type.TObject<{
88
+ code: Type.TLiteral<"PROJECT_CLONE_FAILED">;
89
+ cause: Type.TString;
90
+ }>, Type.TObject<{
91
+ code: Type.TLiteral<"UNKNOWN_AGENT_ID">;
92
+ agentId: Type.TString;
93
+ }>, Type.TObject<{
94
+ code: Type.TLiteral<"WIZARD_NOT_FOUND">;
95
+ }>, Type.TObject<{
96
+ code: Type.TLiteral<"SETUP_ADMISSION_BUSY">;
97
+ }>, Type.TObject<{
98
+ code: Type.TLiteral<"GITHUB_PUBLICATION_SELECTION_REJECTED">;
99
+ idempotencyKey: Type.TString;
100
+ }>, Type.TObject<{
101
+ code: Type.TLiteral<"SESSION_WORKSPACE_RECOVERY_REQUIRED">;
102
+ cause: Type.TLiteral<"device_offline">;
103
+ recoveryAction: Type.TLiteral<"continue_on_gateway">;
104
+ sessionId: Type.TString;
105
+ source: Type.TObject<{
106
+ generation: Type.TInteger;
107
+ environmentId: Type.TString;
108
+ ownerEpoch: Type.TInteger;
109
+ }>;
110
+ }>, Type.TObject<{
111
+ code: Type.TLiteral<"TASK_WORKTREE_SOURCE_REQUIRED">;
112
+ cwd: Type.TString;
113
+ }>, Type.TObject<{
114
+ code: Type.TLiteral<"CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED">;
115
+ warning: Type.TString;
116
+ }>, Type.TObject<{
117
+ code: Type.TLiteral<"TEMPLATE_REVIEW_REQUIRED">;
118
+ kind: Type.TUnion<[Type.TLiteral<"plugin">, Type.TLiteral<"skill">]>;
119
+ }>, Type.TObject<{
120
+ code: Type.TLiteral<"PENDING_INPUT_NOT_RETIRED">;
121
+ inputIds: Type.TArray<Type.TString>;
122
+ }>, Type.TObject<{
123
+ code: Type.TLiteral<"TASK_HISTORY_PREVIEW_CAPACITY">;
124
+ }>, Type.TObject<{
125
+ code: Type.TLiteral<"OPENCLAW_CONFIG_READONLY">;
126
+ }>]>;
127
+ /** Builds the canonical gateway error payload while preserving optional retry metadata. */
128
+ declare function errorShape(code: ErrorCode, message: string, opts?: {
129
+ details?: unknown;
130
+ retryable?: boolean;
131
+ retryAfterMs?: number;
132
+ }): ErrorShape;
133
+ /** Builds structured details for a missing operator scope. */
134
+ declare function buildMissingScopeErrorDetails(params: {
135
+ missingScope: string;
136
+ requiredScopes: readonly string[];
137
+ }): MissingScopeErrorDetails;
138
+ /** Builds a forbidden error for a missing operator scope without message parsing. */
139
+ declare function missingScopeErrorShape(params: {
140
+ missingScope: string;
141
+ requiredScopes: readonly string[];
142
+ }): ErrorShape;
143
+ //#endregion
144
+ //#region packages/gateway-protocol/src/gateway-error-details.d.ts
145
+ /** Display projection for an assistant failure without visible reply content. */
146
+ declare const GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT = "The agent run failed before producing a reply.";
147
+ /** Gateway JSON-RPC style error codes shared by clients and server handlers. */
148
+ declare const ErrorCodes: {
149
+ /** @deprecated Retained for source compatibility; no current server emitter. */
150
+ readonly NOT_LINKED: "NOT_LINKED";
151
+ /** Device exists but still needs an explicit pairing approval. */
152
+ readonly NOT_PAIRED: "NOT_PAIRED";
153
+ /** @deprecated Retained for source compatibility; no current server emitter. */
154
+ readonly AGENT_TIMEOUT: "AGENT_TIMEOUT";
155
+ /** Request payload failed protocol validation or method preconditions. */
156
+ readonly INVALID_REQUEST: "INVALID_REQUEST";
157
+ /** Authenticated caller lacks permission for the requested operation. */
158
+ readonly FORBIDDEN: "FORBIDDEN";
159
+ /** Approval resolution referenced a missing or expired approval request. */
160
+ readonly APPROVAL_NOT_FOUND: "APPROVAL_NOT_FOUND";
161
+ /** Gateway service or required backend is temporarily unavailable. */
162
+ readonly UNAVAILABLE: "UNAVAILABLE";
163
+ };
164
+ /** Closed set of canonical gateway error code strings. */
165
+ type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
166
+ /** Stable discriminants for structured method-level failures. */
167
+ declare const GatewayErrorDetailCodes: {
168
+ readonly CRON_JOB_NOT_FOUND: "CRON_JOB_NOT_FOUND";
169
+ readonly MISSING_SCOPE: "MISSING_SCOPE";
170
+ readonly MCP_APP_VIEW_EXPIRED: "MCP_APP_VIEW_EXPIRED";
171
+ readonly OUTBOUND_DELIVERY_QUEUED: "OUTBOUND_DELIVERY_QUEUED";
172
+ readonly USER_PREFS_LIMIT_EXCEEDED: "USER_PREFS_LIMIT_EXCEEDED";
173
+ readonly SESSION_COMPANION_BUSY: "SESSION_COMPANION_BUSY";
174
+ readonly PROJECT_CLONE_FAILED: "PROJECT_CLONE_FAILED";
175
+ readonly UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID";
176
+ readonly WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND";
177
+ readonly SETUP_ADMISSION_BUSY: "SETUP_ADMISSION_BUSY";
178
+ readonly GITHUB_PUBLICATION_SELECTION_REJECTED: "GITHUB_PUBLICATION_SELECTION_REJECTED";
179
+ readonly SESSION_WORKSPACE_RECOVERY_REQUIRED: "SESSION_WORKSPACE_RECOVERY_REQUIRED";
180
+ readonly TASK_WORKTREE_SOURCE_REQUIRED: "TASK_WORKTREE_SOURCE_REQUIRED";
181
+ readonly TASK_HISTORY_PREVIEW_CAPACITY: "TASK_HISTORY_PREVIEW_CAPACITY";
182
+ readonly CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED: "CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED";
183
+ readonly TEMPLATE_REVIEW_REQUIRED: "TEMPLATE_REVIEW_REQUIRED";
184
+ readonly PENDING_INPUT_NOT_RETIRED: "PENDING_INPUT_NOT_RETIRED";
185
+ readonly OPENCLAW_CONFIG_READONLY: "OPENCLAW_CONFIG_READONLY";
186
+ };
187
+ /** Missing cron automation identified by its exact store key. */
188
+ type CronJobNotFoundErrorDetails = Static<typeof CronJobNotFoundErrorDetailsSchema>;
189
+ /** Missing operator-scope details shared by WebSocket and HTTP responses. */
190
+ type MissingScopeErrorDetails = Static<typeof MissingScopeErrorDetailsSchema>;
191
+ type McpAppViewExpiredErrorDetails = Static<typeof McpAppViewExpiredErrorDetailsSchema>;
192
+ type OutboundDeliveryQueuedErrorDetails = Static<typeof OutboundDeliveryQueuedErrorDetailsSchema>;
193
+ /** Per-profile preference quota details returned by users.prefs.set. */
194
+ type UserPrefsLimitExceededErrorDetails = Static<typeof UserPrefsLimitExceededErrorDetailsSchema>;
195
+ /** Unknown agent details carried by agent-scoped method validation failures. */
196
+ type UnknownAgentIdErrorDetails = Static<typeof UnknownAgentIdErrorDetailsSchema>;
197
+ /** Setup rejected before its task or wizard session was admitted. */
198
+ type SetupAdmissionBusyErrorDetails = Static<typeof SetupAdmissionBusyErrorDetailsSchema>;
199
+ /** This invocation rejected its selection before admission; earlier calls may still be pending. */
200
+ type GitHubPublicationSelectionRejectedErrorDetails = Static<typeof GitHubPublicationSelectionRejectedErrorDetailsSchema>;
201
+ /** Missing or expired process-local setup wizard session. */
202
+ type WizardNotFoundErrorDetails = Static<typeof WizardNotFoundErrorDetailsSchema>;
203
+ type ProjectCloneFailureCause = "invalid_url" | "auth_required" | "not_found" | "network" | "target_exists" | "clone_failed";
204
+ type ProjectCloneErrorDetails = {
205
+ code: typeof GatewayErrorDetailCodes.PROJECT_CLONE_FAILED;
206
+ cause: ProjectCloneFailureCause;
207
+ };
208
+ /** Exact retained workspace owner that must be recovered or explicitly abandoned. */
209
+ type SessionWorkspaceRecoveryRequiredErrorDetails = Static<typeof SessionWorkspaceRecoveryRequiredErrorDetailsSchema>;
210
+ /** Structured details emitted by method-level failures. */
211
+ type TaskWorktreeSourceRequiredErrorDetails = Static<typeof TaskWorktreeSourceRequiredErrorDetailsSchema>;
212
+ type ClawHubRiskAcknowledgementRequiredErrorDetails = Static<typeof ClawHubRiskAcknowledgementRequiredErrorDetailsSchema>;
213
+ type TemplateReviewRequiredErrorDetails = Static<typeof TemplateReviewRequiredErrorDetailsSchema>;
214
+ /** Requested pending inputs that are still queued or held by a settling turn. */
215
+ type PendingInputNotRetiredErrorDetails = Static<typeof PendingInputNotRetiredErrorDetailsSchema>;
216
+ /** Structured details emitted by method-level failures. */
217
+ type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails | SetupAdmissionBusyErrorDetails | GitHubPublicationSelectionRejectedErrorDetails | SessionWorkspaceRecoveryRequiredErrorDetails | TaskWorktreeSourceRequiredErrorDetails | ClawHubRiskAcknowledgementRequiredErrorDetails | TemplateReviewRequiredErrorDetails | PendingInputNotRetiredErrorDetails | {
218
+ code: typeof GatewayErrorDetailCodes.TASK_HISTORY_PREVIEW_CAPACITY;
219
+ } | {
220
+ code: typeof GatewayErrorDetailCodes.OPENCLAW_CONFIG_READONLY;
221
+ };
222
+ declare function readClawHubRiskAcknowledgementRequiredError(error: unknown): ClawHubRiskAcknowledgementRequiredErrorDetails | null;
223
+ declare function readTemplateReviewRequiredError(error: unknown): TemplateReviewRequiredErrorDetails | null;
224
+ declare function readGitHubPublicationSelectionRejectedError(error: unknown): GitHubPublicationSelectionRejectedErrorDetails | null;
225
+ /** Reads a typed cron lookup miss without parsing operator-facing prose. */
226
+ declare function readCronJobNotFoundError(error: unknown): CronJobNotFoundErrorDetails | null;
227
+ /** Reads validated missing-scope details from an untrusted protocol payload. */
228
+ declare function readMissingScopeErrorDetails(details: unknown): MissingScopeErrorDetails | null;
229
+ declare function isMcpAppViewExpiredError(error: unknown): boolean;
230
+ /**
231
+ * Reads a method-level missing-scope failure, preferring structured details.
232
+ * The message fallback keeps clients compatible with gateways predating structured details.
233
+ */
234
+ declare function readMissingScopeError(error: unknown): MissingScopeErrorDetails | null;
235
+ //#endregion
236
+ export { CronJobNotFoundErrorDetailsSchema as A, TaskWorktreeSourceRequiredErrorDetailsSchema as B, readClawHubRiskAcknowledgementRequiredError as C, readMissingScopeErrorDetails as D, readMissingScopeError as E, OutboundDeliveryQueuedErrorDetailsSchema as F, buildMissingScopeErrorDetails as G, UnknownAgentIdErrorDetailsSchema as H, PendingInputNotRetiredErrorDetailsSchema as I, errorShape as K, ProjectCloneErrorDetailsSchema as L, GitHubPublicationSelectionRejectedErrorDetailsSchema as M, McpAppViewExpiredErrorDetailsSchema as N, readTemplateReviewRequiredError as O, MissingScopeErrorDetailsSchema as P, SessionWorkspaceRecoveryRequiredErrorDetailsSchema as R, isMcpAppViewExpiredError as S, readGitHubPublicationSelectionRejectedError as T, UserPrefsLimitExceededErrorDetailsSchema as U, TemplateReviewRequiredErrorDetailsSchema as V, WizardNotFoundErrorDetailsSchema as W, TaskWorktreeSourceRequiredErrorDetails as _, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT as a, UserPrefsLimitExceededErrorDetails as b, GitHubPublicationSelectionRejectedErrorDetails as c, OutboundDeliveryQueuedErrorDetails as d, PendingInputNotRetiredErrorDetails as f, SetupAdmissionBusyErrorDetails as g, SessionWorkspaceRecoveryRequiredErrorDetails as h, ErrorCodes as i, GatewayErrorDetailsSchema as j, ClawHubRiskAcknowledgementRequiredErrorDetailsSchema as k, McpAppViewExpiredErrorDetails as l, ProjectCloneFailureCause as m, CronJobNotFoundErrorDetails as n, GatewayErrorDetailCodes as o, ProjectCloneErrorDetails as p, missingScopeErrorShape as q, ErrorCode as r, GatewayErrorDetails as s, ClawHubRiskAcknowledgementRequiredErrorDetails as t, MissingScopeErrorDetails as u, TemplateReviewRequiredErrorDetails as v, readCronJobNotFoundError as w, WizardNotFoundErrorDetails as x, UnknownAgentIdErrorDetails as y, SetupAdmissionBusyErrorDetailsSchema as z };
@@ -1,2 +1,2 @@
1
- import { C as readClawReviewRequiredError, D as readMissingScopeErrorDetails, E as readMissingScopeError, S as readClawHubRiskAcknowledgementRequiredError, T as readGitHubPublicationSelectionRejectedError, _ as TaskWorktreeSourceRequiredErrorDetails, a as ErrorCodes, b as WizardNotFoundErrorDetails, c as GatewayErrorDetails, d as MissingScopeErrorDetails, f as OutboundDeliveryQueuedErrorDetails, g as SetupAdmissionBusyErrorDetails, h as SessionWorkspaceRecoveryRequiredErrorDetails, i as ErrorCode, l as GitHubPublicationSelectionRejectedErrorDetails, m as ProjectCloneFailureCause, n as ClawReviewRequiredErrorDetails, o as GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, p as ProjectCloneErrorDetails, r as CronJobNotFoundErrorDetails, s as GatewayErrorDetailCodes, t as ClawHubRiskAcknowledgementRequiredErrorDetails, u as McpAppViewExpiredErrorDetails, v as UnknownAgentIdErrorDetails, w as readCronJobNotFoundError, x as isMcpAppViewExpiredError, y as UserPrefsLimitExceededErrorDetails } from "./gateway-error-details-BqRYhh5h.mjs";
2
- export { ClawHubRiskAcknowledgementRequiredErrorDetails, ClawReviewRequiredErrorDetails, CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, GatewayErrorDetails, GitHubPublicationSelectionRejectedErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SessionWorkspaceRecoveryRequiredErrorDetails, SetupAdmissionBusyErrorDetails, TaskWorktreeSourceRequiredErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, isMcpAppViewExpiredError, readClawHubRiskAcknowledgementRequiredError, readClawReviewRequiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails };
1
+ import { C as readClawHubRiskAcknowledgementRequiredError, D as readMissingScopeErrorDetails, E as readMissingScopeError, O as readTemplateReviewRequiredError, S as isMcpAppViewExpiredError, T as readGitHubPublicationSelectionRejectedError, _ as TaskWorktreeSourceRequiredErrorDetails, a as GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, b as UserPrefsLimitExceededErrorDetails, c as GitHubPublicationSelectionRejectedErrorDetails, d as OutboundDeliveryQueuedErrorDetails, f as PendingInputNotRetiredErrorDetails, g as SetupAdmissionBusyErrorDetails, h as SessionWorkspaceRecoveryRequiredErrorDetails, i as ErrorCodes, l as McpAppViewExpiredErrorDetails, m as ProjectCloneFailureCause, n as CronJobNotFoundErrorDetails, o as GatewayErrorDetailCodes, p as ProjectCloneErrorDetails, r as ErrorCode, s as GatewayErrorDetails, t as ClawHubRiskAcknowledgementRequiredErrorDetails, u as MissingScopeErrorDetails, v as TemplateReviewRequiredErrorDetails, w as readCronJobNotFoundError, x as WizardNotFoundErrorDetails, y as UnknownAgentIdErrorDetails } from "./gateway-error-details-BEVjnoxj.mjs";
2
+ export { ClawHubRiskAcknowledgementRequiredErrorDetails, CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, GatewayErrorDetails, GitHubPublicationSelectionRejectedErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, PendingInputNotRetiredErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SessionWorkspaceRecoveryRequiredErrorDetails, SetupAdmissionBusyErrorDetails, TaskWorktreeSourceRequiredErrorDetails, TemplateReviewRequiredErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, isMcpAppViewExpiredError, readClawHubRiskAcknowledgementRequiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails, readTemplateReviewRequiredError };
@@ -36,7 +36,9 @@ const GatewayErrorDetailCodes = {
36
36
  TASK_WORKTREE_SOURCE_REQUIRED: "TASK_WORKTREE_SOURCE_REQUIRED",
37
37
  TASK_HISTORY_PREVIEW_CAPACITY: "TASK_HISTORY_PREVIEW_CAPACITY",
38
38
  CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED: "CLAWHUB_RISK_ACKNOWLEDGEMENT_REQUIRED",
39
- CLAW_REVIEW_REQUIRED: "CLAW_REVIEW_REQUIRED"
39
+ TEMPLATE_REVIEW_REQUIRED: "TEMPLATE_REVIEW_REQUIRED",
40
+ PENDING_INPUT_NOT_RETIRED: "PENDING_INPUT_NOT_RETIRED",
41
+ OPENCLAW_CONFIG_READONLY: "OPENCLAW_CONFIG_READONLY"
40
42
  };
41
43
  function readClawHubRiskAcknowledgementRequiredError(error) {
42
44
  const record = asNullableRecord(error);
@@ -47,11 +49,11 @@ function readClawHubRiskAcknowledgementRequiredError(error) {
47
49
  warning
48
50
  } : null;
49
51
  }
50
- function readClawReviewRequiredError(error) {
52
+ function readTemplateReviewRequiredError(error) {
51
53
  const record = asNullableRecord(error);
52
54
  const details = asNullableRecord(record?.details);
53
- return record?.code === ErrorCodes.INVALID_REQUEST && details?.code === GatewayErrorDetailCodes.CLAW_REVIEW_REQUIRED && (details.kind === "plugin" || details.kind === "skill") ? {
54
- code: GatewayErrorDetailCodes.CLAW_REVIEW_REQUIRED,
55
+ return record?.code === ErrorCodes.INVALID_REQUEST && details?.code === GatewayErrorDetailCodes.TEMPLATE_REVIEW_REQUIRED && (details.kind === "plugin" || details.kind === "skill") ? {
56
+ code: GatewayErrorDetailCodes.TEMPLATE_REVIEW_REQUIRED,
55
57
  kind: details.kind
56
58
  } : null;
57
59
  }
@@ -111,4 +113,4 @@ function readMissingScopeError(error) {
111
113
  } : null;
112
114
  }
113
115
  //#endregion
114
- export { ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, isMcpAppViewExpiredError, readClawHubRiskAcknowledgementRequiredError, readClawReviewRequiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails };
116
+ export { ErrorCodes, GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT, GatewayErrorDetailCodes, isMcpAppViewExpiredError, readClawHubRiskAcknowledgementRequiredError, readCronJobNotFoundError, readGitHubPublicationSelectionRejectedError, readMissingScopeError, readMissingScopeErrorDetails, readTemplateReviewRequiredError };