|
| 1 | +# Changelog — @openclaw/gateway-protocol |
| 2 | + |
| 3 | +Wire-protocol and schema contracts for the OpenClaw Gateway (WebSocket JSON-RPC-style |
| 4 | +frames, handshake, and method/event payload schemas). Protocol version is negotiated |
| 5 | +per connection via `minProtocol`/`maxProtocol`. This log covers the wire protocol |
| 6 | +version and the additive schema surface. Dates are authoring dates (2026). |
| 7 | + |
| 8 | +## Unreleased |
| 9 | + |
| 10 | +- Rename structured-question item `id` to `questionId` and flatten keyed answer arrays. |
| 11 | +- Slim worker and session-catalog payloads to the active wire contract. |
| 12 | +- Remove dead protocol surfaces and add since-vintage metadata to retained schemas and methods. |
| 13 | + |
| 14 | +## Protocol v4 (current) |
| 15 | + |
| 16 | +Introduced 2026-05-07 (commit `330ba1f`). The stable, current wire version. |
| 17 | + |
| 18 | +Wire contract: |
| 19 | +- Frame envelopes: `req` / `res` / `event`, discriminated on `type`. |
| 20 | +- Handshake: client sends `ConnectParams` (advertises `minProtocol`/`maxProtocol`, |
| 21 | + client identity, `caps`, `commands`, `permissions`, `role`/`scopes`, optional signed |
| 22 | + `device` identity, and an `auth` bag: token / bootstrapToken / deviceToken / password / |
| 23 | + approvalRuntimeToken / agentRuntimeIdentityToken). |
| 24 | +- Server replies `hello-ok` with the negotiated `protocol`, server identity, the live |
| 25 | + `features` map (`methods`, `events`, `capabilities`), initial `snapshot`, minted `auth` |
| 26 | + device tokens, and connection `policy` (maxPayload / maxBufferedBytes / tickIntervalMs). |
| 27 | +- Server events: `tick` heartbeat and `shutdown` notice; event frames may carry `seq` |
| 28 | + and `stateVersion` for ordered state sync. |
| 29 | + |
| 30 | +Changed vs v3: |
| 31 | +- `hello-ok` handshake replaced the single `canvasHostUrl` string with a |
| 32 | + `pluginSurfaceUrls` map (canvas generalized into arbitrary plugin surfaces). This |
| 33 | + field change is the breaking bump behind v4. |
| 34 | +- Later additively extended (no bump) with `controlUiTabs` (plugin-declared Control UI |
| 35 | + tabs) and multi-`deviceTokens` in the handshake auth block. |
| 36 | + |
| 37 | +Compatibility window (`version.ts`): |
| 38 | +- `MIN_CLIENT_PROTOCOL_VERSION = 4` — general clients must speak v4. |
| 39 | +- `MIN_NODE_PROTOCOL_VERSION = 3` and `MIN_PROBE_PROTOCOL_VERSION = 3` — authenticated |
| 40 | + nodes and lightweight probes are accepted at N-1 (v3) to stay manageable during |
| 41 | + rolling upgrades. Added 2026-07-06 (#101109). |
| 42 | +- A transient v5 (2026-05-16, `07f05e9`) renamed `inboundTurnKind` -> `inboundEventKind`; |
| 43 | + it was reverted the next day (2026-05-17, `ad155fb`, "restore v4 message action |
| 44 | + protocol"). v5 never shipped as a stable ceiling; v4 remains current. |
| 45 | + |
| 46 | +## Protocol v3 |
| 47 | + |
| 48 | +Baseline wire version. Present since repo genesis (2026-04-21) as an inline literal in |
| 49 | +`protocol-schemas.ts`; extracted into `version.ts` unchanged on 2026-05-04 (`2949171`). |
| 50 | +The first externally-relevant version — there is no 2->3 bump in tracked history. |
| 51 | + |
| 52 | +Established the still-current shape: `req`/`res`/`event` frame envelopes, the |
| 53 | +`ConnectParams` -> `hello-ok` handshake with protocol negotiation, `snapshot` state sync, |
| 54 | +and the founding method/event families: sessions, agent chat, cron, devices, nodes, |
| 55 | +channels, config, commands, logs-chat, exec-approvals, plugin-approvals, secrets, push, |
| 56 | +wizard. (v3 `hello-ok` carried `canvasHostUrl`; v4 replaced it — see above.) |
| 57 | + |
| 58 | +## Schema surface history |
| 59 | + |
| 60 | +Additive method/event/schema families added over time. Pure refactors, test-only, and |
| 61 | +docs commits are omitted. The package was extracted from `src/gateway/protocol` to |
| 62 | +`packages/gateway-protocol` on 2026-05-29 (#87797); paths before that date lived under |
| 63 | +the old tree. |
| 64 | + |
| 65 | +### 2026-04 (v3 baseline era) |
| 66 | + |
| 67 | +- Ship baseline families: frames/handshake, sessions, agent chat, cron, devices, nodes, |
| 68 | + channels, config, commands, logs-chat, exec-approvals, plugin-approvals, secrets, push, |
| 69 | + wizard, snapshot, primitives, agents-models-skills. |
| 70 | +- Add WhatsApp `replyToMode` quoting (#62305). |
| 71 | +- Add browser realtime Talk and transports — origin of the talk/voice families. |
| 72 | +- Add Control UI PWA web push support (#44590). |
| 73 | +- Add plugins and artifacts schema modules. |
| 74 | +- Add OpenClaw SDK package and authenticated iOS background presence beacon (#73330). |
| 75 | + |
| 76 | +### 2026-05 |
| 77 | + |
| 78 | +- Add environments discovery RPCs (#74867) and task-ledger RPCs (#74847) — tasks family. |
| 79 | +- Add unified Talk gateway sessions, realtime active-run control, and typed `sessionKey` |
| 80 | + on the wake protocol. |
| 81 | +- Add SDK `tools.invoke` RPC; extend cron with agentId filtering (#77602), run |
| 82 | + diagnostics (#75928), and direct job lookup. |
| 83 | +- Add Skill Workshop gateway methods: proposal files, revision requests, persisted origin. |
| 84 | +- Add core session goals (#87469). |
| 85 | +- Add heartbeat flag on agent event broadcast (#80610), warm-MCP effective inventory, and |
| 86 | + plugin approval action metadata. |
| 87 | +- Harden auth/device identity: bind approval access to requester metadata (#81380); |
| 88 | + require approval for setup-code device pairing (#81292); scope Talk session to resolver. |
| 89 | +- Introduce and revert transient protocol v5 (`07f05e9` / `ad155fb`). |
| 90 | + |
| 91 | +### 2026-06 |
| 92 | + |
| 93 | +Enhancement-only month (no new schema modules): |
| 94 | +- Extend cron with command jobs, compact list responses (#93395), and an on-exit |
| 95 | + schedule kind that fires when a watched command exits. |
| 96 | +- Forward-port fast-Talks auto mode (#85104); add session workspace rail (#92856). |
| 97 | + |
| 98 | +### 2026-07 (largest expansion) |
| 99 | + |
| 100 | +- Add terminal family: `terminal.*` RPC methods/events, detach/reattach with output |
| 101 | + replay, `terminal.list`/`terminal.text`, and file uploads into terminals (#107364). |
| 102 | +- Add managed git worktrees: lifecycle create/provision/snapshot/restore/GC (#100535), |
| 103 | + new-session-in-worktree (#100788), session worktree targeting and branch listing |
| 104 | + (#103432); add read-only `agents.workspace` browsing RPCs (#100738). |
| 105 | +- Add audit family: metadata-only message audit events (#103903), native-search audit |
| 106 | + correlation (#98704), and audit-activity schema. |
| 107 | +- Add `tts.speak` returning synthesized audio inline (#100770). |
| 108 | +- Add cooperative host suspension / gateway-suspend prepare/status/resume RPCs (#103618). |
| 109 | +- Add durable approvals: persisted operator approvals (#103579), typed cross-surface |
| 110 | + approval actions (#103679), approval-id, and the durable-approvals stack (#104837). |
| 111 | +- Add cloud-workers stack: durable environments + lifecycle RPCs (#104401), worker bundle |
| 112 | + + SSH bootstrap + admission handshake (#104532), authenticated worker protocol with |
| 113 | + minted credentials (#104688), durable transcript commit (#104809), live-event streaming |
| 114 | + (#105275), inference proxy (#105719), and session placement/dispatch (#106332). |
| 115 | +- Add session catalog: sessions-catalog + sessions-create with external-session |
| 116 | + pagination unification (#104717). |
| 117 | +- Add fs family: `sessions.files.set` hash-CAS writes (#104757) and gateway/node folder |
| 118 | + browsing (#105114). |
| 119 | +- Add node-hosted plugins — dynamic tools, MCP servers, skills (#90431) — plus node |
| 120 | + invoke/presence protocol schemas. |
| 121 | +- Add migrations family: log-migration protocol schemas and Codex/Claude memory import |
| 122 | + (#106406). |
| 123 | +- Add durable device rename for human-friendly device names (#94517). |
| 124 | +- Add follow-up task suggestions (#102422) and task-suggestions schema. |
| 125 | +- Add cron event triggers via polled condition-watcher scripts (#101195) and native |
| 126 | + mobile Automations parity (#106355). |
| 127 | +- Add system-agent conversational onboarding (#99935); rename `crestodian.*` methods to |
| 128 | + `openclaw.chat` / `openclaw.setup.*` (2026-07-14, `a6a0716`). |
| 129 | +- Add typed structured questions / `ask_user` with live option cards (#109922, #110242) |
| 130 | + and the questions schema module. |
| 131 | +- Add ui-command / screen-tool Control UI layout control and capability-gated |
| 132 | + `show_widget` inline web chat widgets (#101840). |
| 133 | +- Add direct watch/watchOS node connect to Gateway (#102893); widen node/probe protocol |
| 134 | + acceptance to N-1 (#101109). |
| 135 | + |
| 136 | +## Notes for external versioning |
| 137 | + |
| 138 | +- Post-v4 changes are additive except: the transient v5 rename (reverted, net-zero) and |
| 139 | + the 2026-07-14 `crestodian.*` -> `openclaw.*` method rename. The renamed feature was |
| 140 | + introduced only 9 days earlier (2026-07-05, #99935), never left the v4 window, and |
| 141 | + predates public publish, so no released method name changed under v4. |
| 142 | +- `schema/types.ts` was removed 2026-07-11 (#103679); it re-exported compile-time type |
| 143 | + aliases only and has no wire impact. |
0 commit comments