feat(chat): dispatch OpenClaw turns through Gateway - #3866
feat(chat): dispatch OpenClaw turns through Gateway#3866CompleteDotTech wants to merge 14 commits into
Conversation
|
do not merge work in progress. |
|
Frontend build blocker: stale The Frontend build fails (not stale/flaky — it tested the current head Affected assertions (each encodes intended stop/cancel semantics for the send route — a design call, not a rubber-stamp bump):
Question for the author: should the new Gateway dispatch path behave identically to the other two adapters (register with the stop registry, persist |
8eab170 to
64ad296
Compare
e718bbc to
2ac1180
Compare
|
Closing as superseded by #3905. The newer draft carries the Gateway scope on current main with stable Cave-run idempotency, reconnect fencing, capability checks, credential isolation, and the explicit fail-closed blockers. This older branch remains on a stale base, includes unrelated commits, and its retry/sequence handling can duplicate or accept uncorrelated side effects, so it should not be merged. |
DO NOT MERGE - WORK IN PROGRESS
Summary
Implements the first production slice of direct OpenClaw Gateway dispatch. Cave now uses the supported v4 Gateway client as the authoritative transport when explicitly configured, captures the Gateway-accepted run ID, and never starts a duplicate CLI turn once a dispatch might have been accepted.
What changed
2026.7.2-beta.4, plus the published TypeBox runtime validator.OPENCLAW_GATEWAY_DISPATCH=1) with challenge-bound authentication, exact v4 negotiation, operator read/write scope checks, capability checks, idempotentchat.send, accepted-run binding, and run-sequence enforcement.chat.abortso queued or late results cannot turn a cancelled run into success.Deliberate compatibility boundary
The current published protocol package validates the run-scoped
chatevent but does not publish a stablesession.toolpayload schema. This change therefore requests the capability but fails closed for tool-card projection rather than interpreting undocumented frames. The retained CLI/plain-chat stop point from #3852 remains available.Linked work
Validation
node --experimental-strip-types src/lib/openclaw-gateway.test.tsnode --experimental-strip-types src/app/api/chat/send/harness-routing-tool-events.test.tspnpm check:tests-wiredpnpm exec tsc --noEmit --pretty falsepnpm lintgit diff --check