@openclaw/gateway-protocol 2026.8.1-beta.3 → 2026.8.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.
- package/CHANGELOG.md +111 -17
- package/dist/client-info.d.mts +34 -23
- package/dist/client-info.mjs +2 -1
- package/dist/connect-error-details.d.mts +20 -21
- package/dist/frame-guards.d.mts +4 -5
- package/dist/{frames-BKvowx_k.d.mts → frames-CAy_vx4s.d.mts} +15 -14
- package/dist/{gateway-error-details-DR-CyzeW.d.mts → gateway-error-details-GvUeus2z.d.mts} +20 -8
- package/dist/gateway-error-details.d.mts +2 -2
- package/dist/gateway-error-details.mjs +2 -1
- package/dist/index.d.mts +1329 -440
- package/dist/index.mjs +75 -5
- package/dist/restart-unavailable.d.mts +8 -0
- package/dist/restart-unavailable.mjs +13 -0
- package/dist/{schema-modules-CriS_x5c.d.mts → schema-modules-Ci4vzz1h.d.mts} +4527 -835
- package/dist/schema.d.mts +3163 -44
- package/dist/schema.mjs +38 -2
- package/dist/startup-unavailable.d.mts +9 -10
- package/dist/{worktrees-D1V7ClOO.mjs → worktrees-DGAMd4T8.mjs} +1033 -159
- package/package.json +8 -3
- package/protocol.schema.json +22491 -1589
package/CHANGELOG.md
CHANGED
|
@@ -3,18 +3,29 @@
|
|
|
3
3
|
Wire-protocol and schema contracts for the OpenClaw Gateway (WebSocket JSON-RPC-style
|
|
4
4
|
frames, handshake, and method/event payload schemas). Protocol version is negotiated
|
|
5
5
|
per connection via `minProtocol`/`maxProtocol`. This log covers the wire protocol
|
|
6
|
-
version and
|
|
6
|
+
version and schema surface, including removals and semantic changes. Dates are
|
|
7
|
+
authoring dates (2026), not package publication dates.
|
|
7
8
|
|
|
8
9
|
## Unreleased
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
No changes outside the dated history below.
|
|
12
|
+
|
|
13
|
+
## Deferred to the next wire version
|
|
14
|
+
|
|
15
|
+
Changes that are agreed but intentionally NOT shipped, because they alter the
|
|
16
|
+
negotiated shape of the current wire version. A version bump is an explicit
|
|
17
|
+
breaking event for third-party clients (see "Notes for external versioning"), so
|
|
18
|
+
each entry stays here until an owner approves the bump and lands it together with
|
|
19
|
+
client follow-through. Add an entry whenever you defer a shape change; remove it
|
|
20
|
+
in the commit that bumps the version.
|
|
21
|
+
|
|
22
|
+
- **Remove `execSecurity` / `execAsk` from `SessionsPatchMutation`.** Retired in
|
|
23
|
+
favour of `permissionMode` (PR #132740, landed `a151c1e0d35`). The properties
|
|
24
|
+
remain declared in the closed v4 mutation schema so existing v4 callers keep a
|
|
25
|
+
valid request shape; the applier rejects either field before any mutation with
|
|
26
|
+
guidance naming `permissionMode` and `/exec`. Deleting the properties changes
|
|
27
|
+
the closed-object shape, so it waits for the bump. Code marker:
|
|
28
|
+
`packages/gateway-protocol/src/schema/sessions-patch.ts`.
|
|
18
29
|
|
|
19
30
|
## Protocol v4 (current)
|
|
20
31
|
|
|
@@ -62,7 +73,7 @@ wizard. (v3 `hello-ok` carried `canvasHostUrl`; v4 replaced it — see above.)
|
|
|
62
73
|
|
|
63
74
|
## Schema surface history
|
|
64
75
|
|
|
65
|
-
|
|
76
|
+
Method/event/schema changes over time. Pure refactors, test-only, and
|
|
66
77
|
docs commits are omitted. The package was extracted from `src/gateway/protocol` to
|
|
67
78
|
`packages/gateway-protocol` on 2026-05-29 (#87797); paths before that date lived under
|
|
68
79
|
the old tree.
|
|
@@ -103,7 +114,8 @@ Enhancement-only month (no new schema modules):
|
|
|
103
114
|
### 2026-07 (largest expansion)
|
|
104
115
|
|
|
105
116
|
- Add terminal family: `terminal.*` RPC methods/events, detach/reattach with output
|
|
106
|
-
replay, `terminal.list`/`terminal.text`, and file uploads into terminals (#107364
|
|
117
|
+
replay, `terminal.list`/`terminal.text`, and file uploads into terminals (#107364;
|
|
118
|
+
`terminal.text` removed in August by #121387).
|
|
107
119
|
- Add managed git worktrees: lifecycle create/provision/snapshot/restore/GC (#100535),
|
|
108
120
|
new-session-in-worktree (#100788), session worktree targeting and branch listing
|
|
109
121
|
(#103432); add read-only `agents.workspace` browsing RPCs (#100738).
|
|
@@ -130,20 +142,102 @@ Enhancement-only month (no new schema modules):
|
|
|
130
142
|
- Add cron event triggers via polled condition-watcher scripts (#101195) and native
|
|
131
143
|
mobile Automations parity (#106355).
|
|
132
144
|
- Add system-agent conversational onboarding (#99935); rename `crestodian.*` methods to
|
|
133
|
-
`openclaw.chat` / `openclaw.setup.*` (2026-07-14, `a6a0716`)
|
|
134
|
-
steps and answers to `openclaw.chat` (#114631).
|
|
145
|
+
`openclaw.chat` / `openclaw.setup.*` (2026-07-14, `a6a0716`).
|
|
135
146
|
- Add typed structured questions / `ask_user` with live option cards (#109922, #110242)
|
|
136
147
|
and the questions schema module.
|
|
137
148
|
- Add ui-command / screen-tool Control UI layout control and capability-gated
|
|
138
149
|
`show_widget` inline web chat widgets (#101840).
|
|
139
150
|
- Add direct watch/watchOS node connect to Gateway (#102893); widen node/probe protocol
|
|
140
151
|
acceptance to N-1 (#101109).
|
|
152
|
+
- Add session boards: `board.get` / `board.update`, widget put/grant and event schemas; pinned MCP apps, `board.widget.appView`, lease re-mint, declared network/tool grants, and ticketed widget actions (#110960, #111524, #111687).
|
|
153
|
+
- Add session visibility (`shared`, `read-only`, `suggest`, `draft`), `session.members.*`, `session.visibility.set`, and server-enforced participation (#112787).
|
|
154
|
+
- Add canonical session lineage and typed `SessionRow`: creation provenance, fork ancestry, generation links, and catalog `createdBy` renamed to `createdActor`; remove writable spawn-lineage fields from `sessions.patch` (#111861).
|
|
155
|
+
- Add durable `users.*` profiles with email aliases, display names, and avatars (#111224).
|
|
156
|
+
- Add `session.discussion.info` / `session.discussion.open` with discussion state and URLs (#111337).
|
|
157
|
+
- Add paginated `openclaw.changes.list` with typed change sources and summaries (#111286).
|
|
158
|
+
- Add durable client voice sessions: `voiceSessionId`, `voice-transcript` capability, `talk.client.transcript`, and `talk.client.close` (#111216).
|
|
159
|
+
- Add `session.suggestions.*`, suggestion resolution events, and `session.typing` indicators (#113173).
|
|
160
|
+
- Add machine-readable `FORBIDDEN` / `MISSING_SCOPE` errors with `missingScope` and `requiredScopes` (#110925, #111013).
|
|
161
|
+
- Add Skill Workshop evaluation and lifecycle replay through `skills.proposals.evaluate` / `skills.proposals.events.list`, revision hashes, and evaluation outcomes (#115606).
|
|
162
|
+
- Add `channels.pairing.list` / `approve` / `dismiss` for pending DM sender access requests (#112401).
|
|
163
|
+
- Add custom session `icon` values (emoji, named icon, or SVG; removed in August by #121263) (#110682).
|
|
164
|
+
- Add semantic `agent` / `system` roster kinds negotiated through the `agent-kind` client capability (#111920).
|
|
165
|
+
- Rename structured-question item `id` to `questionId`, flatten keyed answer arrays, and cap input headers at 12 characters; rename catalog `openClawSessionKey` to `sessionKey`, make cursor maps optional, and type the health snapshot (#111041).
|
|
166
|
+
- Add release-vintage metadata to core methods and selected schemas; consolidate worker schema/type exports without changing their payload shape (#111041).
|
|
167
|
+
|
|
168
|
+
### 2026-08
|
|
169
|
+
|
|
170
|
+
#### Removed
|
|
171
|
+
|
|
172
|
+
- Remove `terminal.text`, `sessions.compaction.get`, `sessions.unsubscribe`, `doctor.memory.remHarness`, and `voicewake.routing.set` (#121387). `terminal.list` remains; `gateway.restart.preflight` was removed in the same change and restored by #121757.
|
|
173
|
+
- Remove `talk.session.join` / `startTurn` / `endTurn` / `cancelTurn` and their unused join/turn/cancel-turn schemas (#121387). `TalkSessionTurnParams` / `TalkSessionTurnResult` disappear; `TalkEvent` and `talk.event` remain. `talk.session.cancelOutput` remains, with a new result contract described below.
|
|
174
|
+
- Remove the July custom session `icon` contract (#121263); restore emoji icons and then named glyphs with a new shape, without the former SVG support (#124034, #124629).
|
|
175
|
+
- Remove `hello-ok.deviceAuthMigration` (#124667) and beta-only `chat.send.expectedRunId` (#125921; introduced by #120285); active-run start-or-steer becomes Gateway-owned (#125808).
|
|
176
|
+
- Replace same-month `sessions.archiveMany` with `sessions.patchMany` (#120493, #120629), and `node.protocolFeatures.update` with `node.runnerInventory.update` (#122939, #123094).
|
|
177
|
+
- Remove same-month `users.setGitHubIdentity` / `users.clearGitHubIdentity` in favor of authenticated sign-in facts (#125827, #126114); remove `delivery.failures.resubmit` and retained failed-delivery payloads (#123410, #123642).
|
|
178
|
+
- Replace `audit.run.inspect.decisions` with required bounded `decisionDisplays` (#126007); replace flat GitHub status fields with `selected` / `effective` identity facts and require `selectedScope` (#126474).
|
|
179
|
+
- Replace worker machine-option `description` with `cpu` / `memoryGb` (#125696), and participant actor arrays with tagged `SessionParticipant.identity` records (#130986).
|
|
180
|
+
- Remove `acknowledgeClawHubRisk` from skill install/update and plugin install, plus `clawhub_risk_acknowledgement_required`; expose security-audit metadata instead (#131233).
|
|
181
|
+
- Retire session `execSecurity` / `execAsk`: both stay wire-valid in v4 but `sessions.patch` / `sessions.patchMany` now reject them with guidance naming `permissionMode` (#132740). Schema deletion remains deferred above.
|
|
182
|
+
|
|
183
|
+
#### Handshake and capabilities
|
|
184
|
+
|
|
185
|
+
- Add optional `hello-ok.policy.attachments` with required `maxBytes` / `maxImageBytes` decoded per-attachment ceilings (#116188).
|
|
186
|
+
- Add `hello-ok.auth.recoveryMigrationAllowed` / `recoveryScope` (#121671), connect `computerUse` (#123544), client/server `buildId` and server `controlUiBuildSource` (#123660), server `bootId` (#128365), and client/presence `timeZone` (#128438).
|
|
187
|
+
- Add node `workerRuns` admission metadata (#122966), then deprecate that envelope in favor of runner inventory while retaining its accepted v1 shape (#124356); add bundle-prewarm negotiation (#124427).
|
|
188
|
+
- Project plugin tab `placement` in `hello-ok` so active plugins can target native Control UI routes (#125473).
|
|
189
|
+
- Add the client `usage-refreshing` capability (#121799), `CONTROL_UI_BUILD_MISMATCH` reload details (#123882), identity-header-required errors (#125132, #125700), and structured `gateway-restarting` / `gateway-suspending` unavailability reasons (#130025).
|
|
190
|
+
- Advertise server capabilities through `hello-ok.features.capabilities`: `gateway-restart-target-safe-v1`, `node-worker-bundle-retention-v1`, `node-worker-bundle-status-v1`, `node-worker-environment-session-v1`, `node-worker-portal-stream-v1`, `session-scoped-chat-metadata`, `session-unread-ack-contract`, `session-goal-start-v1`, `openclaw-chat-wizard-cancel`, `openclaw-setup-model-ref`, `taskSuggestions.acceptModes`, `board-widget-put-canvas-doc`, and `chat-send-routing-contract` (current `GATEWAY_SERVER_CAPS`; additions span #121173, #123920, #124590, #124640, #129386, #130105, #131370).
|
|
191
|
+
- Replace advertised worker `worker-launch-v2` with execution-context negotiation (#120534); advance `worker-execution-context-v1` to `worker-execution-context-v2` for permission context (#125326). These are worker-dialect tokens, not changes to `PROTOCOL_VERSION`.
|
|
192
|
+
|
|
193
|
+
#### Method and event families
|
|
194
|
+
|
|
195
|
+
- Add bounded `sessions.patchMany` mutation orchestration with per-target outcomes (#120629), restart recovery through `sessions.recover` (#122644), and folder defaults through `sessions.groups.defaults` / `update` (#123276).
|
|
196
|
+
- Add projects: `projects.list` / `register` / `remove` / `add` / `searchRemote`, typed records/checkouts/remotes, session project targeting, clone progress/errors, and per-project worker-profile defaults (#121465, #120804, #121818, #126238, #130192).
|
|
197
|
+
- Add `secrets.store.list` / `set` / `delete`, redacted entry metadata, destination-bound `allowedHosts`, and credential-question `secretStore` / `secretStoreExisting` bindings (#121559, #121724, #123216, #129670).
|
|
198
|
+
- Add `users.prefs.get` / `set`, `users.prefs.changed`, bounded preference-limit errors, appearance/font preferences, and `users.setRole` with optional profile `role` (#121816, #128548, #130340, #131275).
|
|
199
|
+
- Add GitHub identity facts, per-agent `tools.github.status` / `configure` and `tools.github.authorize.start` / `poll` / `cancel`, plus brokered `sessions.github.publish` outcomes; project verified participant co-author identities and their preference (#125199, #125827, #126114, #126474, #126306, #131964).
|
|
200
|
+
- Add `worker.desktop.observe` / `launch` and local/paired-node `desktop.observe` / `launch` with `DesktopSource` and app-launch results (#120727, #121475, #122545, #122724).
|
|
201
|
+
- Add `portal.list` / `open` / `close` and `portal.changed`, including portals on node-backed workers (#122536, #130105).
|
|
202
|
+
- Add `sessions.move` between Gateway and runners, machine-class targeting, optional device/automatic-device dispatch, and atomic `node.runnerInventory.update` / `node.runnerInventory.changed` (#125036, #125292, #122769, #128421, #123094).
|
|
203
|
+
- Add `sessions.assignOwner`, `SessionOwner`, participant/person projections, and owner/participant roster filters; add `session.members.listEvidence` and `session.sharing.evidence` (#125057, #125579, #125645, #129093, #130986).
|
|
204
|
+
- Add `progressCard.get` / `put` and `progressCard.changed`, typed steps/statuses, and dismissal (#125125, #126102); add `sessions.goal.update` / `clear` and goal-start `chat.send.intent` (#131370).
|
|
205
|
+
- Add `device.scopes.requestUpgrade` / `waitUpgrade`, one-paste pairing links, `device.pair.setupStatus`, `device.pair.setup.completed` / `device.pair.setup.deliveryUncertain`, and `device.pair.changed` after device edits (#121459, #120768, #122499, #120933, #126432).
|
|
206
|
+
- Add `exec.approval.grants.list` / `revoke`, standing-grant expiry/revocation records, typed `ApprovalScope`, and reviewer/grant-term fields (#129526, #130116, #131602).
|
|
207
|
+
- Add `plugins.inspect`, declared capability surfaces, artifact-bound operator grants, install/enable consent, and install security-audit metadata (#130168, #131233).
|
|
208
|
+
- Add `push.web.preferences.get` / `set`, notification category/detail level, quiet hours, and approval-notification preferences (#129348).
|
|
209
|
+
- Add `hooks.status` (#118288), `audit.run.inspect` with execution identity/receipt/display contracts (#117034, #120534, #126007, #126082), and command-lane `diagnostics.lanes` (#125591).
|
|
210
|
+
- Add `tasks.retry` / `dismiss` with `TasksRecoveryParams` / `Result` and delivery outcomes (`d9393bd3cbe`, `1f78c39bd82`, `6ca16f7f3d2`, `d0439b9ce0f`); add task-suggestion acceptance `mode` / `cloudProfileId` and reject whitespace-only title/prompt/TLDR values (#121173, #120940).
|
|
211
|
+
- Extend worker RPCs with `worker.sessions.spawn` / `send`, `worker.github.publish`, and `worker.portal`, negotiated by `worker-session-tools-v1`, `worker-github-publication-v1`, and `worker-portal-v1` (#121846, #126306, #130105); add public `/__openclaw__/worker` ingress and `admission-rejected` close reason (#122578).
|
|
212
|
+
- Add scheduled-update `update.hold`, `UpdateScheduleState`, update status/availability projections, checkout-lag `refreshCheckout`, and exact update/restart targets (#120506, #120769, #118518, #124891, #128868); extend cooperative suspension with terminal policy and renewable `draining` results (#121601, #130003).
|
|
213
|
+
- Add `sessions.catalog.startTerminal` plans (#121020), `controlUi.sessionPreview` (#125014), and short-reference/candidate results on existing `sessions.resolve` (#120512, #128778).
|
|
214
|
+
|
|
215
|
+
#### Fields and payload contracts
|
|
216
|
+
|
|
217
|
+
- Preserve required legacy agent-default fields while adding honest `ownership` and `selectionRequired` state to agent lists and initial snapshots; carry explicit `agentId` through session, board, companion, discussion, plugin, and UI requests, and require nonempty model-list agent IDs when supplied (#114388). Add agent creation hierarchy, resolved-name provenance, and purge-failure results (#124967, #122463, #125217).
|
|
218
|
+
- Project optional `defaultPermissionMode` on agent rows so clients can label the inherited session permission default; omitted whenever the effective policy cannot be stated truthfully (#132989).
|
|
219
|
+
- Add session `permissionMode` (`SessionPermissionMode`) on create/patch/rows (#124909), emoji/glyph icons (#124034, #124629), and `color` on patch/row/catalog projections (#132570).
|
|
220
|
+
- Extend session rows with classification/peer-kind facts (#106832), conversation avatar (#125668), restart recovery and terminal placement reasons (#122644, #121122, #120976), `lastRunId` (#126180), inherited-model provenance (#120805), and queued `SessionRunStatus` (#125654, #131444). Add roster bootstrap/people projections and remove the implicit row cap (#130294, #131202).
|
|
221
|
+
- Extend session creation with `forkFrom`, category, tool overrides, idempotency, context-window and fast-mode selection, and worktree startup phases (#123718, #123276, #128081, #128661, #127951, #131272, #131559); carry catalog `sourceHomeId` and explicit owner targeting (#123899).
|
|
222
|
+
- Allow write-scoped folder browsing/session creation within configured agent workspaces; arbitrary host and node paths remain admin-scoped (#121417).
|
|
223
|
+
- Add chat-history cursors with delta/reset results, delta `inFlightRun`, pending-input pagination and steering status (`ChatPendingInputsPage`), and session-scoped chat metadata plus `chat.metadata.changed` (#125606, #129640, #132887, #131697, #132179). Add `markedUnreadAt` / `expectedMarkedUnreadAt` acknowledgment fencing (#129386), bounded typing previews (#126994), and terminal-open `sessionKey` with agent-owned terminal detach semantics (#125758).
|
|
224
|
+
- Add typed hosted-wizard answers and optional `SystemAgentChatResult.step` (#114631), wizard cancellation (`890a4b0089f`, `2300de71627`), prepared-model references (`dea04651b9c`), snapshot `modelConfigured` (#128135), setup `agentId` (#123429), restart-required activation (#127713), and terminal `modelActivation` / `SetupAdmissionBusyErrorDetails` (#131757).
|
|
225
|
+
- Add gateway-owned realtime `gateway-control-v1` / `clientControl.owner` (#121054); add `TalkSessionCancelOutputResult` with `applied` / `stale` / `idle` status and optional `turnId` (#127186).
|
|
226
|
+
- Extend model catalogs with per-agent availability/provider outcomes, mutually exclusive `preparedOnly: true` / `refresh: true` requests, thinking choices/defaults, tags, context-window choices/defaults, effective fast mode, and auth-unavailability reasons/deadlines (#121852, #122125, #126194, #127951, #131272, #131697; `d83f7b815db`, `639e7718f39`). Align fallback-reason values across cron, sessions, and worker events (#117909, #121285, #121334, #121898).
|
|
227
|
+
- Extend worker/environment placements with desktop apps, disk-space facts, offline host presence/trust, runtime-target issues, worker profiles/execution modes, bundle status/retention, exact slot counts, and service/profile/runner projections (#121475, #122531, #123177, #123198, #124037, #124864, #124640, #124590, #125708, #127752, #132405). Add runtime cloud/device support, `invocableCommands`/slot requirements, and local-or-reclaimed results; make dispatch `profileId` optional for mutually exclusive device/automatic targeting and add offline-runner `abandonSource` (#123743, #122769, #124791, #126067, #126284, #126585, #127202, #128421).
|
|
228
|
+
- Add worker transcript/inference `providerReplay`, expand its bounded replay budget, and add versioned compaction-token provenance (#120457, #120803, #120497); raise worker transcript image-data ceiling to 25 MiB (#132114).
|
|
229
|
+
- Extend session diffs with commit/scope selection, commits, merge base and ahead count (#122470); record worktree run-end cleanup, removal `snapshotError` even when removal stops, and typed preserved-worktree deletion outcomes (#120434, #126174, #126347). Add live task `lastActivity` / `diffStat` (#121549).
|
|
230
|
+
- Add generated board-widget identities and canonical put results (#117132), registered/A2UI content and content-owner projections (#125803, #128489); add command client presentation and skill display names (#120855, #124017).
|
|
231
|
+
- Extend cron with auto-disable state, Date-range timestamp bounds, `if-enabled` run mode and trigger filtering, typed delivery traces/completion status/suppression reasons, and system-owned skill-review status (#118113, #121394, #125170, #126534, #124856, #126164, #130811, #130030). Add missing-job `CronJobNotFoundErrorDetails` (#124663).
|
|
232
|
+
- Require source-qualified skill-search `installRef`, distinguish install-only/unscanned results, carry install-policy warnings and update conflicts, and require `expectedRevisionHash` for proposal apply/reject/revision requests (#119672, #121697, #124250, #120900, #118190, #126156). Report curator collection/experience reviews; retired curator actions remain wire-valid but return guidance (#129769).
|
|
233
|
+
- Require `avatarRevision` in avatar-save results (#120791) and nullable `githubIdentity` in user profiles (#125827). Add bounded user preference values and default-on co-author credit for verified identities (#121816, #131964).
|
|
234
|
+
- Extend channel/health snapshots with nullable status timestamps/errors, credential/audience/webhook and active-run facts, event-loop degradation age, ingress failure/pressure, and heartbeat session targeting (#117817, #118193, #123234, #121892). Add presence activity timestamps and qualified profile/viewer identities (#130664, #132038, #132250).
|
|
235
|
+
- Add outbound-delivery audit/error details, typed queued-delivery outcomes, reply metadata, and payload-free failed-row retention (#123709, #128202, #126205, #123410, #123642); reject impossible audit filter combinations (#124513). Bind approval requests to channel accounts, project resolved exec defaults, and surface controlling-chat source sessions (#121673, #125756, #131829); clarify other-device token-rotation delivery in `DeviceTokenRotateResult` (#121361).
|
|
141
236
|
|
|
142
237
|
## Notes for external versioning
|
|
143
238
|
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
predates public publish, so no released method name changed under v4.
|
|
239
|
+
- Removals and semantic breaks have shipped in v4 builds without a wire-version bump, including the July question/catalog reshaping and August RPC/field removals above. The negotiated version remains `4`, with minimum client/node/probe versions `4` / `3` / `3`; it does not identify a fixed schema vintage. Monthly history records authoring, not a guarantee that every intermediate shape reached a stable package release.
|
|
240
|
+
- Discover current methods, events, and capabilities through `hello-ok.features`; consult the matching release's schemas for payload contracts. The Deferred section records shape changes still waiting for an owner-approved version bump, not changes already made under v4.
|
|
241
|
+
- Core method `since` values are release-train metadata (`<=2026.7` predates tracking), not exact authoring dates. Use the method table for retained methods, generated Kotlin catalog history for method/event changes, and schema/generated Swift diffs for field changes; the sparse `x-openclaw-since` annotations are not a complete schema history.
|
|
148
242
|
- `schema/types.ts` was removed 2026-07-11 (#103679); it re-exported compile-time type
|
|
149
243
|
aliases only and has no wire impact.
|
package/dist/client-info.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/client-info.d.ts
|
|
2
2
|
/** Canonical client ids accepted in gateway hello/connect payloads. */
|
|
3
|
-
declare const GATEWAY_CLIENT_IDS: {
|
|
3
|
+
export declare const GATEWAY_CLIENT_IDS: {
|
|
4
4
|
readonly WEBCHAT_UI: "webchat-ui";
|
|
5
5
|
readonly CONTROL_UI: "openclaw-control-ui";
|
|
6
6
|
readonly BROWSER_COPILOT: "openclaw-browser-copilot";
|
|
@@ -20,8 +20,8 @@ declare const GATEWAY_CLIENT_IDS: {
|
|
|
20
20
|
readonly PROBE: "openclaw-probe";
|
|
21
21
|
};
|
|
22
22
|
/** Stable gateway client ids used on the wire during hello/connect handshakes. */
|
|
23
|
-
type GatewayClientId = (typeof GATEWAY_CLIENT_IDS)[keyof typeof GATEWAY_CLIENT_IDS];
|
|
24
|
-
declare const GATEWAY_CLIENT_NAMES: {
|
|
23
|
+
export type GatewayClientId = (typeof GATEWAY_CLIENT_IDS)[keyof typeof GATEWAY_CLIENT_IDS];
|
|
24
|
+
export declare const GATEWAY_CLIENT_NAMES: {
|
|
25
25
|
readonly WEBCHAT_UI: "webchat-ui";
|
|
26
26
|
readonly CONTROL_UI: "openclaw-control-ui";
|
|
27
27
|
readonly BROWSER_COPILOT: "openclaw-browser-copilot";
|
|
@@ -41,9 +41,9 @@ declare const GATEWAY_CLIENT_NAMES: {
|
|
|
41
41
|
readonly PROBE: "openclaw-probe";
|
|
42
42
|
};
|
|
43
43
|
/** Compatibility alias for internal callers that still use "name" terminology. */
|
|
44
|
-
type GatewayClientName = GatewayClientId;
|
|
44
|
+
export type GatewayClientName = GatewayClientId;
|
|
45
45
|
/** Coarse modes let policy group clients without matching every product id. */
|
|
46
|
-
declare const GATEWAY_CLIENT_MODES: {
|
|
46
|
+
export declare const GATEWAY_CLIENT_MODES: {
|
|
47
47
|
readonly WEBCHAT: "webchat";
|
|
48
48
|
readonly CLI: "cli";
|
|
49
49
|
readonly UI: "ui";
|
|
@@ -54,21 +54,32 @@ declare const GATEWAY_CLIENT_MODES: {
|
|
|
54
54
|
readonly TEST: "test";
|
|
55
55
|
};
|
|
56
56
|
/** Coarse client category used for gateway policy and diagnostics. */
|
|
57
|
-
type GatewayClientMode = (typeof GATEWAY_CLIENT_MODES)[keyof typeof GATEWAY_CLIENT_MODES];
|
|
57
|
+
export type GatewayClientMode = (typeof GATEWAY_CLIENT_MODES)[keyof typeof GATEWAY_CLIENT_MODES];
|
|
58
58
|
/** Client metadata sent during gateway connection setup. */
|
|
59
|
-
type GatewayClientInfo = {
|
|
60
|
-
/** Stable product/client identifier from `GATEWAY_CLIENT_IDS`. */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
export type GatewayClientInfo = {
|
|
60
|
+
/** Stable product/client identifier from `GATEWAY_CLIENT_IDS`. */
|
|
61
|
+
id: GatewayClientId;
|
|
62
|
+
/** Human-readable label for diagnostics; not used for policy decisions. */
|
|
63
|
+
displayName?: string;
|
|
64
|
+
/** Client app or package version reported by the connecting process. */
|
|
65
|
+
version: string;
|
|
66
|
+
/** Exact immutable artifact identity when the client can report one. */
|
|
67
|
+
buildId?: string;
|
|
68
|
+
/** Runtime platform string, such as `darwin`, `ios`, `android`, or `web`. */
|
|
69
|
+
platform: string;
|
|
70
|
+
/** Optional device family used by native clients for display and routing hints. */
|
|
71
|
+
deviceFamily?: string;
|
|
72
|
+
/** Native hardware/model identifier when available. */
|
|
73
|
+
modelIdentifier?: string;
|
|
74
|
+
/** Self-reported IANA time zone, such as `Europe/Vienna`, for presence display. */
|
|
75
|
+
timeZone?: string;
|
|
76
|
+
/** Coarse category from `GATEWAY_CLIENT_MODES` for policy and diagnostics. */
|
|
77
|
+
mode: GatewayClientMode;
|
|
78
|
+
/** Per-installation or per-process id used to distinguish same-product clients. */
|
|
68
79
|
instanceId?: string;
|
|
69
80
|
};
|
|
70
81
|
/** Capability flags a client may advertise during the gateway handshake. */
|
|
71
|
-
declare const GATEWAY_CLIENT_CAPS: {
|
|
82
|
+
export declare const GATEWAY_CLIENT_CAPS: {
|
|
72
83
|
readonly AGENT_KIND: "agent-kind";
|
|
73
84
|
readonly APPROVALS: "approvals";
|
|
74
85
|
readonly EXEC_APPROVALS: "exec-approvals";
|
|
@@ -80,16 +91,16 @@ declare const GATEWAY_CLIENT_CAPS: {
|
|
|
80
91
|
readonly TERMINAL_OFFSET_SEQ: "terminal-offset-seq";
|
|
81
92
|
readonly TOOL_EVENTS: "tool-events";
|
|
82
93
|
readonly UI_COMMANDS: "ui-commands";
|
|
94
|
+
readonly USAGE_REFRESHING: "usage-refreshing";
|
|
83
95
|
};
|
|
84
96
|
/** Optional capability advertised by clients during gateway handshake. */
|
|
85
|
-
type GatewayClientCap = (typeof GATEWAY_CLIENT_CAPS)[keyof typeof GATEWAY_CLIENT_CAPS];
|
|
97
|
+
export type GatewayClientCap = (typeof GATEWAY_CLIENT_CAPS)[keyof typeof GATEWAY_CLIENT_CAPS];
|
|
86
98
|
/** Normalizes untrusted client ids and rejects unknown values. */
|
|
87
|
-
declare function normalizeGatewayClientId(raw?: string | null): GatewayClientId | undefined;
|
|
99
|
+
export declare function normalizeGatewayClientId(raw?: string | null): GatewayClientId | undefined;
|
|
88
100
|
/** Normalizes legacy client-name fields through the canonical client-id registry. */
|
|
89
|
-
declare function normalizeGatewayClientName(raw?: string | null): GatewayClientName | undefined;
|
|
101
|
+
export declare function normalizeGatewayClientName(raw?: string | null): GatewayClientName | undefined;
|
|
90
102
|
/** Normalizes untrusted client modes and rejects unknown values. */
|
|
91
|
-
declare function normalizeGatewayClientMode(raw?: string | null): GatewayClientMode | undefined;
|
|
103
|
+
export declare function normalizeGatewayClientMode(raw?: string | null): GatewayClientMode | undefined;
|
|
92
104
|
/** Checks a client-advertised capability list without treating missing caps as errors. */
|
|
93
|
-
declare function hasGatewayClientCap(caps: string[] | null | undefined, cap: GatewayClientCap): boolean;
|
|
94
|
-
//#endregion
|
|
95
|
-
export { GATEWAY_CLIENT_CAPS, GATEWAY_CLIENT_IDS, GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES, GatewayClientCap, GatewayClientId, GatewayClientInfo, GatewayClientMode, GatewayClientName, hasGatewayClientCap, normalizeGatewayClientId, normalizeGatewayClientMode, normalizeGatewayClientName };
|
|
105
|
+
export declare function hasGatewayClientCap(caps: string[] | null | undefined, cap: GatewayClientCap): boolean;
|
|
106
|
+
//#endregion
|
package/dist/client-info.mjs
CHANGED
|
@@ -53,7 +53,8 @@ const GATEWAY_CLIENT_CAPS = {
|
|
|
53
53
|
TASK_SUGGESTIONS: "task-suggestions",
|
|
54
54
|
TERMINAL_OFFSET_SEQ: "terminal-offset-seq",
|
|
55
55
|
TOOL_EVENTS: "tool-events",
|
|
56
|
-
UI_COMMANDS: "ui-commands"
|
|
56
|
+
UI_COMMANDS: "ui-commands",
|
|
57
|
+
USAGE_REFRESHING: "usage-refreshing"
|
|
57
58
|
};
|
|
58
59
|
const GATEWAY_CLIENT_ID_SET = new Set(Object.values(GATEWAY_CLIENT_IDS));
|
|
59
60
|
const GATEWAY_CLIENT_MODE_SET = new Set(Object.values(GATEWAY_CLIENT_MODES));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/connect-error-details.d.ts
|
|
2
2
|
/** Structured connect-error codes carried in gateway error `details.code`. */
|
|
3
|
-
declare const ConnectErrorDetailCodes: {
|
|
3
|
+
export declare const ConnectErrorDetailCodes: {
|
|
4
4
|
readonly AUTH_REQUIRED: "AUTH_REQUIRED";
|
|
5
5
|
readonly AUTH_UNAUTHORIZED: "AUTH_UNAUTHORIZED";
|
|
6
6
|
readonly AUTH_TOKEN_MISSING: "AUTH_TOKEN_MISSING";
|
|
@@ -41,7 +41,7 @@ declare const ConnectPairingRequiredReasons: {
|
|
|
41
41
|
readonly SCOPE_UPGRADE: "scope-upgrade";
|
|
42
42
|
readonly METADATA_UPGRADE: "metadata-upgrade";
|
|
43
43
|
};
|
|
44
|
-
type ConnectPairingRequiredReason = (typeof ConnectPairingRequiredReasons)[keyof typeof ConnectPairingRequiredReasons];
|
|
44
|
+
export type ConnectPairingRequiredReason = (typeof ConnectPairingRequiredReasons)[keyof typeof ConnectPairingRequiredReasons];
|
|
45
45
|
/** Suggested client-side recovery action for structured connect errors. */
|
|
46
46
|
type ConnectRecoveryNextStep = "retry_with_device_token" | "update_auth_configuration" | "update_auth_credentials" | "wait_then_retry" | "review_auth_configuration";
|
|
47
47
|
/** Optional retry guidance extracted from gateway connect-error details. */
|
|
@@ -65,27 +65,27 @@ type PairingConnectErrorDetails = {
|
|
|
65
65
|
approvedScopes?: string[];
|
|
66
66
|
};
|
|
67
67
|
/** Compact pairing-required subset used by reconnect/status surfaces. */
|
|
68
|
-
type ConnectPairingRequiredDetails = Pick<PairingConnectErrorDetails, "reason" | "requestId">;
|
|
68
|
+
export type ConnectPairingRequiredDetails = Pick<PairingConnectErrorDetails, "reason" | "requestId">;
|
|
69
69
|
/** Maps internal auth failure reasons to public connect-error detail codes. */
|
|
70
|
-
declare function resolveAuthConnectErrorDetailCode(reason: string | undefined): ConnectErrorDetailCode;
|
|
70
|
+
export declare function resolveAuthConnectErrorDetailCode(reason: string | undefined): ConnectErrorDetailCode;
|
|
71
71
|
/** Maps device-auth verifier reasons to public connect-error detail codes. */
|
|
72
|
-
declare function resolveDeviceAuthConnectErrorDetailCode(reason: string | undefined): ConnectErrorDetailCode;
|
|
72
|
+
export declare function resolveDeviceAuthConnectErrorDetailCode(reason: string | undefined): ConnectErrorDetailCode;
|
|
73
73
|
/** Reads a non-empty detail code from an untrusted error details payload. */
|
|
74
|
-
declare function readConnectErrorDetailCode(details: unknown): string | null;
|
|
74
|
+
export declare function readConnectErrorDetailCode(details: unknown): string | null;
|
|
75
75
|
/** Read the exact target artifact from an untrusted reload-required rejection. */
|
|
76
|
-
declare function readControlUiBuildMismatchId(details: unknown): string | null;
|
|
76
|
+
export declare function readControlUiBuildMismatchId(details: unknown): string | null;
|
|
77
77
|
/** Extracts normalized retry advice from untrusted connect-error details. */
|
|
78
|
-
declare function readConnectErrorRecoveryAdvice(details: unknown): ConnectErrorRecoveryAdvice;
|
|
78
|
+
export declare function readConnectErrorRecoveryAdvice(details: unknown): ConnectErrorRecoveryAdvice;
|
|
79
79
|
/** Normalizes pairing request ids before echoing them in close reasons or UI text. */
|
|
80
|
-
declare function normalizePairingConnectRequestId(value: unknown): string | undefined;
|
|
80
|
+
export declare function normalizePairingConnectRequestId(value: unknown): string | undefined;
|
|
81
81
|
/** Human-readable requirement summary for a pairing-required reason. */
|
|
82
|
-
declare function describePairingConnectRequirement(reason: ConnectPairingRequiredReason | undefined): string;
|
|
82
|
+
export declare function describePairingConnectRequirement(reason: ConnectPairingRequiredReason | undefined): string;
|
|
83
83
|
/** Builds the gateway close/error message for a pairing-required connect failure. */
|
|
84
|
-
declare function buildPairingConnectErrorMessage(reason: ConnectPairingRequiredReason | undefined): string;
|
|
84
|
+
export declare function buildPairingConnectErrorMessage(reason: ConnectPairingRequiredReason | undefined): string;
|
|
85
85
|
/** Short user-facing recovery title for pairing-required connect failures. */
|
|
86
|
-
declare function buildPairingConnectRecoveryTitle(reason: ConnectPairingRequiredReason | undefined): string;
|
|
86
|
+
export declare function buildPairingConnectRecoveryTitle(reason: ConnectPairingRequiredReason | undefined): string;
|
|
87
87
|
/** Builds sanitized structured details for a pairing-required connect failure. */
|
|
88
|
-
declare function buildPairingConnectErrorDetails(params: {
|
|
88
|
+
export declare function buildPairingConnectErrorDetails(params: {
|
|
89
89
|
reason: ConnectPairingRequiredReason | undefined;
|
|
90
90
|
requestId?: string;
|
|
91
91
|
remediationHint?: string;
|
|
@@ -99,16 +99,16 @@ declare function buildPairingConnectErrorDetails(params: {
|
|
|
99
99
|
approvedScopes?: string[];
|
|
100
100
|
}): PairingConnectErrorDetails;
|
|
101
101
|
/** Builds a sanitized close reason string for WebSocket pairing rejections. */
|
|
102
|
-
declare function buildPairingConnectCloseReason(params: {
|
|
102
|
+
export declare function buildPairingConnectCloseReason(params: {
|
|
103
103
|
reason: ConnectPairingRequiredReason | undefined;
|
|
104
104
|
requestId?: string;
|
|
105
105
|
}): string;
|
|
106
106
|
/** Reads and backfills pairing-required details from an untrusted details object. */
|
|
107
|
-
declare function readPairingConnectErrorDetails(details: unknown): PairingConnectErrorDetails | null;
|
|
107
|
+
export declare function readPairingConnectErrorDetails(details: unknown): PairingConnectErrorDetails | null;
|
|
108
108
|
/** Parses legacy/string-only pairing-required messages into structured details. */
|
|
109
|
-
declare function readConnectPairingRequiredMessage(message: string | null | undefined): ConnectPairingRequiredDetails | null;
|
|
109
|
+
export declare function readConnectPairingRequiredMessage(message: string | null | undefined): ConnectPairingRequiredDetails | null;
|
|
110
110
|
/** Classifies Gateway connect failures from structured details, with one legacy text fallback. */
|
|
111
|
-
declare function classifyGatewayConnectFailure(input: {
|
|
111
|
+
export declare function classifyGatewayConnectFailure(input: {
|
|
112
112
|
details?: unknown;
|
|
113
113
|
reason?: string | null;
|
|
114
114
|
message?: string | null;
|
|
@@ -126,11 +126,10 @@ declare function classifyGatewayConnectFailure(input: {
|
|
|
126
126
|
userMessage: string;
|
|
127
127
|
};
|
|
128
128
|
/** Formats pairing-required details into the canonical user-facing message. */
|
|
129
|
-
declare function formatConnectPairingRequiredMessage(details: unknown): string;
|
|
129
|
+
export declare function formatConnectPairingRequiredMessage(details: unknown): string;
|
|
130
130
|
/** Formats connect errors using structured details before falling back to raw messages. */
|
|
131
|
-
declare function formatConnectErrorMessage(params: {
|
|
131
|
+
export declare function formatConnectErrorMessage(params: {
|
|
132
132
|
message?: string;
|
|
133
133
|
details?: unknown;
|
|
134
134
|
}): string;
|
|
135
|
-
//#endregion
|
|
136
|
-
export { ConnectErrorDetailCodes, ConnectPairingRequiredDetails, ConnectPairingRequiredReason, buildPairingConnectCloseReason, buildPairingConnectErrorDetails, buildPairingConnectErrorMessage, buildPairingConnectRecoveryTitle, classifyGatewayConnectFailure, describePairingConnectRequirement, formatConnectErrorMessage, formatConnectPairingRequiredMessage, normalizePairingConnectRequestId, readConnectErrorDetailCode, readConnectErrorRecoveryAdvice, readConnectPairingRequiredMessage, readControlUiBuildMismatchId, readPairingConnectErrorDetails, resolveAuthConnectErrorDetailCode, resolveDeviceAuthConnectErrorDetailCode };
|
|
135
|
+
//#endregion
|
package/dist/frame-guards.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as EventFrame,
|
|
2
|
-
|
|
1
|
+
import { a as EventFrame, d as RequestFrame, l as HelloOk, p as ResponseFrame, r as ErrorShape, s as GatewayFrame, t as ConnectParams } from "./frames-CAy_vx4s.mjs";
|
|
3
2
|
//#region src/frame-guards.d.ts
|
|
4
|
-
declare function isGatewayEventFrame(value: unknown): value is EventFrame;
|
|
5
|
-
declare function isGatewayResponseFrame(value: unknown): value is ResponseFrame;
|
|
3
|
+
export declare function isGatewayEventFrame(value: unknown): value is EventFrame;
|
|
4
|
+
export declare function isGatewayResponseFrame(value: unknown): value is ResponseFrame;
|
|
6
5
|
//#endregion
|
|
7
|
-
export {
|
|
6
|
+
export type { ConnectParams, ErrorShape, EventFrame, GatewayFrame, HelloOk, RequestFrame, ResponseFrame };
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { Static, Type } from "typebox";
|
|
2
|
-
|
|
3
2
|
//#region src/schema/frames.d.ts
|
|
4
|
-
declare const GATEWAY_SERVER_CAPS: {
|
|
5
|
-
readonly BOARD_WIDGET_PUT_CANVAS_DOC: "board-widget-put-canvas-doc";
|
|
6
|
-
readonly CHAT_SEND_ROUTING_CONTRACT: "chat-send-routing-contract";
|
|
7
|
-
readonly GATEWAY_RESTART_TARGET_SAFE: "gateway-restart-target-safe-v1";
|
|
8
|
-
readonly NODE_WORKER_BUNDLE_RETENTION: "node-worker-bundle-retention-v1";
|
|
9
|
-
readonly NODE_WORKER_BUNDLE_STATUS: "node-worker-bundle-status-v1";
|
|
10
|
-
readonly SYSTEM_AGENT_WIZARD_CANCEL: "openclaw-chat-wizard-cancel";
|
|
11
|
-
readonly SYSTEM_AGENT_SETUP_MODEL_REF: "openclaw-setup-model-ref";
|
|
12
|
-
readonly TASK_SUGGESTIONS_ACCEPT_MODES: "taskSuggestions.acceptModes";
|
|
13
|
-
};
|
|
14
3
|
/**
|
|
15
4
|
* Top-level gateway frame schemas.
|
|
16
5
|
*
|
|
@@ -38,12 +27,16 @@ declare const ConnectParamsSchema: Type.TObject<{
|
|
|
38
27
|
platform: Type.TString;
|
|
39
28
|
deviceFamily: Type.TOptional<Type.TString>;
|
|
40
29
|
modelIdentifier: Type.TOptional<Type.TString>;
|
|
30
|
+
/** Self-reported IANA zone. Bounded because the longest real name is well under this cap. */
|
|
31
|
+
timeZone: Type.TOptional<Type.TString>;
|
|
41
32
|
mode: Type.TEnum<["webchat", "cli", "worker", "test", "probe", "ui", "backend", "node"]>;
|
|
42
33
|
instanceId: Type.TOptional<Type.TString>;
|
|
43
34
|
}>;
|
|
44
35
|
caps: Type.TOptional<Type.TArray<Type.TString>>;
|
|
45
|
-
commands: Type.TOptional<Type.TArray<Type.TString>>;
|
|
46
|
-
|
|
36
|
+
commands: Type.TOptional<Type.TArray<Type.TString>>;
|
|
37
|
+
/** Additive Computer Use declaration; the owning core contract validates its bounded shape. */
|
|
38
|
+
computerUse: Type.TOptional<Type.TUnknown>;
|
|
39
|
+
/** @deprecated Accepted for the shipped v1 node-host envelope; current hosts use runner inventory. */
|
|
47
40
|
workerRuns: Type.TOptional<Type.TObject<{
|
|
48
41
|
bundleHash: Type.TString;
|
|
49
42
|
openclawVersion: Type.TString;
|
|
@@ -79,6 +72,7 @@ declare const HelloOkSchema: Type.TObject<{
|
|
|
79
72
|
server: Type.TObject<{
|
|
80
73
|
version: Type.TString;
|
|
81
74
|
buildId: Type.TOptional<Type.TString>;
|
|
75
|
+
bootId: Type.TOptional<Type.TString>;
|
|
82
76
|
controlUiBuildSource: Type.TOptional<Type.TUnion<[Type.TLiteral<"bundled">, Type.TLiteral<"configured">]>>;
|
|
83
77
|
connId: Type.TString;
|
|
84
78
|
}>;
|
|
@@ -95,18 +89,25 @@ declare const HelloOkSchema: Type.TObject<{
|
|
|
95
89
|
platform: Type.TOptional<Type.TString>;
|
|
96
90
|
deviceFamily: Type.TOptional<Type.TString>;
|
|
97
91
|
modelIdentifier: Type.TOptional<Type.TString>;
|
|
92
|
+
timeZone: Type.TOptional<Type.TString>;
|
|
98
93
|
mode: Type.TOptional<Type.TString>;
|
|
99
94
|
lastInputSeconds: Type.TOptional<Type.TInteger>;
|
|
100
95
|
reason: Type.TOptional<Type.TString>;
|
|
101
96
|
tags: Type.TOptional<Type.TArray<Type.TString>>;
|
|
102
97
|
text: Type.TOptional<Type.TString>;
|
|
103
98
|
ts: Type.TInteger;
|
|
99
|
+
onlineSince: Type.TOptional<Type.TInteger>;
|
|
100
|
+
lastActivityAt: Type.TOptional<Type.TInteger>;
|
|
104
101
|
deviceId: Type.TOptional<Type.TString>;
|
|
105
102
|
roles: Type.TOptional<Type.TArray<Type.TString>>;
|
|
106
103
|
scopes: Type.TOptional<Type.TArray<Type.TString>>;
|
|
107
104
|
instanceId: Type.TOptional<Type.TString>;
|
|
108
105
|
user: Type.TOptional<Type.TObject<{
|
|
109
106
|
id: Type.TString;
|
|
107
|
+
identity: Type.TOptional<Type.TObject<{
|
|
108
|
+
type: Type.TLiteral<"profile">;
|
|
109
|
+
id: Type.TString;
|
|
110
|
+
}>>;
|
|
110
111
|
email: Type.TOptional<Type.TString>;
|
|
111
112
|
name: Type.TOptional<Type.TString>;
|
|
112
113
|
avatarUrl: Type.TOptional<Type.TString>;
|
|
@@ -443,4 +444,4 @@ type GatewayFrame = Static<typeof GatewayFrameSchema>;
|
|
|
443
444
|
type TickEvent = Static<typeof TickEventSchema>;
|
|
444
445
|
type ShutdownEvent = Static<typeof ShutdownEventSchema>;
|
|
445
446
|
//#endregion
|
|
446
|
-
export {
|
|
447
|
+
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 };
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
//#region src/gateway-error-details.d.ts
|
|
2
2
|
/** Gateway JSON-RPC style error codes shared by clients and server handlers. */
|
|
3
3
|
declare const ErrorCodes: {
|
|
4
|
-
/** @deprecated Retained for source compatibility; no current server emitter. */
|
|
5
|
-
readonly
|
|
6
|
-
|
|
7
|
-
readonly
|
|
8
|
-
|
|
9
|
-
readonly
|
|
4
|
+
/** @deprecated Retained for source compatibility; no current server emitter. */
|
|
5
|
+
readonly NOT_LINKED: "NOT_LINKED";
|
|
6
|
+
/** Device exists but still needs an explicit pairing approval. */
|
|
7
|
+
readonly NOT_PAIRED: "NOT_PAIRED";
|
|
8
|
+
/** @deprecated Retained for source compatibility; no current server emitter. */
|
|
9
|
+
readonly AGENT_TIMEOUT: "AGENT_TIMEOUT";
|
|
10
|
+
/** Request payload failed protocol validation or method preconditions. */
|
|
11
|
+
readonly INVALID_REQUEST: "INVALID_REQUEST";
|
|
12
|
+
/** Authenticated caller lacks permission for the requested operation. */
|
|
13
|
+
readonly FORBIDDEN: "FORBIDDEN";
|
|
14
|
+
/** Approval resolution referenced a missing or expired approval request. */
|
|
15
|
+
readonly APPROVAL_NOT_FOUND: "APPROVAL_NOT_FOUND";
|
|
16
|
+
/** Gateway service or required backend is temporarily unavailable. */
|
|
10
17
|
readonly UNAVAILABLE: "UNAVAILABLE";
|
|
11
18
|
};
|
|
12
19
|
/** Closed set of canonical gateway error code strings. */
|
|
@@ -23,6 +30,7 @@ declare const GatewayErrorDetailCodes: {
|
|
|
23
30
|
readonly PROJECT_CLONE_FAILED: "PROJECT_CLONE_FAILED";
|
|
24
31
|
readonly UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID";
|
|
25
32
|
readonly WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND";
|
|
33
|
+
readonly SETUP_ADMISSION_BUSY: "SETUP_ADMISSION_BUSY";
|
|
26
34
|
};
|
|
27
35
|
/** Missing cron automation identified by its exact store key. */
|
|
28
36
|
type CronJobNotFoundErrorDetails = {
|
|
@@ -52,6 +60,10 @@ type UnknownAgentIdErrorDetails = {
|
|
|
52
60
|
code: typeof GatewayErrorDetailCodes.UNKNOWN_AGENT_ID;
|
|
53
61
|
agentId: string;
|
|
54
62
|
};
|
|
63
|
+
/** Setup rejected before its task or wizard session was admitted. */
|
|
64
|
+
type SetupAdmissionBusyErrorDetails = {
|
|
65
|
+
code: typeof GatewayErrorDetailCodes.SETUP_ADMISSION_BUSY;
|
|
66
|
+
};
|
|
55
67
|
/** Missing or expired process-local setup wizard session. */
|
|
56
68
|
type WizardNotFoundErrorDetails = {
|
|
57
69
|
code: typeof GatewayErrorDetailCodes.WIZARD_NOT_FOUND;
|
|
@@ -68,7 +80,7 @@ type SkillProposalRevisionChangedErrorDetails = {
|
|
|
68
80
|
currentRevisionHash: string;
|
|
69
81
|
};
|
|
70
82
|
/** Structured details emitted by method-level failures. */
|
|
71
|
-
type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | SkillProposalRevisionChangedErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails;
|
|
83
|
+
type GatewayErrorDetails = CronJobNotFoundErrorDetails | MissingScopeErrorDetails | McpAppViewExpiredErrorDetails | OutboundDeliveryQueuedErrorDetails | UserPrefsLimitExceededErrorDetails | SkillProposalRevisionChangedErrorDetails | ProjectCloneErrorDetails | UnknownAgentIdErrorDetails | WizardNotFoundErrorDetails | SetupAdmissionBusyErrorDetails;
|
|
72
84
|
/** Reads a typed cron lookup miss without parsing operator-facing prose. */
|
|
73
85
|
declare function readCronJobNotFoundError(error: unknown): CronJobNotFoundErrorDetails | null;
|
|
74
86
|
/** Builds the canonical stale-draft details shared by Skill Workshop RPCs. */
|
|
@@ -87,4 +99,4 @@ declare function isMcpAppViewExpiredError(error: unknown): boolean;
|
|
|
87
99
|
*/
|
|
88
100
|
declare function readMissingScopeError(error: unknown): MissingScopeErrorDetails | null;
|
|
89
101
|
//#endregion
|
|
90
|
-
export {
|
|
102
|
+
export { isMcpAppViewExpiredError as _, GatewayErrorDetails as a, readMissingScopeErrorDetails as b, OutboundDeliveryQueuedErrorDetails as c, SetupAdmissionBusyErrorDetails as d, SkillProposalRevisionChangedErrorDetails as f, buildSkillProposalRevisionChangedErrorDetails as g, WizardNotFoundErrorDetails as h, GatewayErrorDetailCodes as i, ProjectCloneErrorDetails as l, UserPrefsLimitExceededErrorDetails as m, ErrorCode as n, McpAppViewExpiredErrorDetails as o, UnknownAgentIdErrorDetails as p, ErrorCodes as r, MissingScopeErrorDetails as s, CronJobNotFoundErrorDetails as t, ProjectCloneFailureCause as u, readCronJobNotFoundError as v, readSkillProposalRevisionChangedError as x, readMissingScopeError as y };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GatewayErrorDetailCodes, GatewayErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SkillProposalRevisionChangedErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, buildSkillProposalRevisionChangedErrorDetails, isMcpAppViewExpiredError, readCronJobNotFoundError, readMissingScopeError, readMissingScopeErrorDetails, readSkillProposalRevisionChangedError };
|
|
1
|
+
import { _ as isMcpAppViewExpiredError, a as GatewayErrorDetails, b as readMissingScopeErrorDetails, c as OutboundDeliveryQueuedErrorDetails, d as SetupAdmissionBusyErrorDetails, f as SkillProposalRevisionChangedErrorDetails, g as buildSkillProposalRevisionChangedErrorDetails, h as WizardNotFoundErrorDetails, i as GatewayErrorDetailCodes, l as ProjectCloneErrorDetails, m as UserPrefsLimitExceededErrorDetails, n as ErrorCode, o as McpAppViewExpiredErrorDetails, p as UnknownAgentIdErrorDetails, r as ErrorCodes, s as MissingScopeErrorDetails, t as CronJobNotFoundErrorDetails, u as ProjectCloneFailureCause, v as readCronJobNotFoundError, x as readSkillProposalRevisionChangedError, y as readMissingScopeError } from "./gateway-error-details-GvUeus2z.mjs";
|
|
2
|
+
export { CronJobNotFoundErrorDetails, ErrorCode, ErrorCodes, GatewayErrorDetailCodes, GatewayErrorDetails, McpAppViewExpiredErrorDetails, MissingScopeErrorDetails, OutboundDeliveryQueuedErrorDetails, ProjectCloneErrorDetails, ProjectCloneFailureCause, SetupAdmissionBusyErrorDetails, SkillProposalRevisionChangedErrorDetails, UnknownAgentIdErrorDetails, UserPrefsLimitExceededErrorDetails, WizardNotFoundErrorDetails, buildSkillProposalRevisionChangedErrorDetails, isMcpAppViewExpiredError, readCronJobNotFoundError, readMissingScopeError, readMissingScopeErrorDetails, readSkillProposalRevisionChangedError };
|
|
@@ -28,7 +28,8 @@ const GatewayErrorDetailCodes = {
|
|
|
28
28
|
SKILL_PROPOSAL_REVISION_CHANGED: "SKILL_PROPOSAL_REVISION_CHANGED",
|
|
29
29
|
PROJECT_CLONE_FAILED: "PROJECT_CLONE_FAILED",
|
|
30
30
|
UNKNOWN_AGENT_ID: "UNKNOWN_AGENT_ID",
|
|
31
|
-
WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND"
|
|
31
|
+
WIZARD_NOT_FOUND: "WIZARD_NOT_FOUND",
|
|
32
|
+
SETUP_ADMISSION_BUSY: "SETUP_ADMISSION_BUSY"
|
|
32
33
|
};
|
|
33
34
|
const LEGACY_MISSING_SCOPE_PATTERN = /\bmissing scope:\s*([a-z0-9._-]+)/i;
|
|
34
35
|
const SHA256_PATTERN = /^[a-fA-F0-9]{64}$/;
|