feat(gateway): land console C1 stream-salvage + C3 ask_choice bridge#82
Conversation
These power the Aurelius web console under ultracode but were running ONLY as uncommitted floating patches on the live detached gateway worktree (backed up at origin/backup/gateway-patches-2026-06-22), NOT on main: - C1: salvage clean assistant text from leaked raw Claude-CLI stream-json (salvageClaudeStreamJsonText in agent-event-assistant-text.ts, applied in writeAssistantContentChunk). - C3: bridge a native AskUserQuestion into the console's openclaw_ask_choice card (buildAskChoiceFromArgs + request-scope blob buffering in the /v1/chat/completions handler) + extractAskUserQuestionFromClaudeStreamJson. Merged onto current main (#81); #79's read-only-tools enforcement is preserved (additive, different code paths). agent-event-assistant-text.ts + cli-runner/ execute.ts were untouched by main so taken whole; openai-http.ts merged (import superset + salvage in writeAssistantContentChunk + the ask_choice bridge). Companion to the gateway durability reconcile: once merged, both live gateways rebuild from this main commit and stop running uncommitted detached patches. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Operator-directed merge (Cory, 2026-06-22): the Anvil codex review starved out twice under mono-PR contention (2× 45-min runaway-cap reaps, no verdict). This PR only commits C1 stream-salvage + C3 ask_choice that are already live and battle-tested in the running gateway dist on both machines — main is catching up to prod, not introducing new behavior. Built onto #81 preserving #79 read-only enforcement (4 refs intact / 9 C1·C3 added; +289/-2). Un-drafted to run the full CI shards; merging on green via operator one-liner. 🤖 Generated with Claude Code |
|
CI note: the single red check |
What
Lands the Aurelius web-console C1 stream-salvage + C3 ask_choice bridge gateway patches onto
main. They power the console under ultracode but were running only as uncommitted floating patches on the live detached gateway worktree (backed up atorigin/backup/gateway-patches-2026-06-22) — not on main. Part of the gateway durability reconcile.salvageClaudeStreamJsonText(agent-event-assistant-text.ts) recovers clean assistant text from leaked raw Claude-CLI stream-json, applied inwriteAssistantContentChunk(openai-http.ts).buildAskChoiceFromArgs+ request-scope blob buffering bridge a nativeAskUserQuestioninto the console'sopenclaw_ask_choicecard;extractAskUserQuestionFromClaudeStreamJsonrecovers it from leaked blobs.Merge notes
main(P1d: ship the claude-code-bridge runtime (cloud-mirror) to brew devices #81). feat(gateway): hard-enforce read-only tools for plan/review mode (P4b gateway) #79's read-only-tools enforcement is preserved (additive patches, different code paths — verified: 4 read-only refs intact, 9 C1/C3 refs added).agent-event-assistant-text.ts+cli-runner/execute.tswere untouched by main → taken whole.openai-http.tsmerged (import superset + salvage inwriteAssistantContentChunkusing the salvagedcontent+ the ask_choice bridge).+289/-2; pre-commit hooks passed.Verification
openai-http.tsmerge. The patches are equivalent to what's running live in prod today.🤖 Generated with Claude Code