Files
SynthesisAgent/STATUS.md
zhi 57fc8610ed chore: bump submodules + update wire protocol + STATUS
Submodules now have real implementations of the HTTP+WS bridge and the
channel-side MCP server. STATUS reflects locked architecture decisions
and the laptop smoke-test plan. wire-protocol.md updated to drop the
auth token and permission_request descriptions (no longer in scope).
2026-05-14 13:28:22 +00:00

40 lines
2.6 KiB
Markdown

# SynthesisAgent — Status (in development, 2026-05-14)
## Architecture decisions (locked)
- **HTTP provider pattern**: OpenclawPlugin registers as model provider `synthesis-claude-bridge`. OpenClaw routes agent turns via `POST /v1/chat/completions`. (Mirrors contractor-agent.)
- **WebSocket bridge**: ClaudePlugin (in spawned claude) dials back into OpenclawPlugin's WS. Single long-lived connection per Claude process.
- **Session granularity**: `agent_id::chat_id` (matches contractor-agent's `buildSessionKey`).
- **Reply channel**: ClaudePlugin exposes a `reply(text, final?)` MCP tool. Model calls it. ClaudePlugin → WS → OpenclawPlugin → SSE → OpenClaw.
- **Channel dev mode**: `--dangerously-load-development-channels server:synthesis`. Process-manager pipes "1\n" to stdin to auto-confirm the dev dialog.
- **No auth, no permission_request reverse**: same-machine deployment, full perms.
- **Tool catalog v1**: ClaudePlugin only exposes `reply`. Claude Code's built-in tools (Read/Edit/Bash) do everything else. OpenClaw tool proxy deferred to v2.
## Implementation status
- ✅ Scaffold for both submodules + parent repo
- ✅ Submodules are separate gitea repos, referenced by SHA from parent
- ✅ Capability declaration uses `experimental.claude/channel` (validated bug fix)
- ✅ OpenclawPlugin: HTTP + WS server, process manager, session mapping, FIFO queue, SSE heartbeat, `--channels` spawn with dev-confirm auto-pipe
- ✅ ClaudePlugin: WS client, MCP server, `reply` tool, `notifications/claude/channel` emission, reconnect
- ✅ Wire protocol doc reflects current behavior
- ⏳ Not yet tested end-to-end on laptop — next step
## Laptop smoke test plan
See `SynthesisAgent.OpenclawPlugin/README.md` for the exact commands. Summary:
1. `claude mcp add --scope user synthesis -- bun run <path>/server.ts`
2. `bun index.ts` in OpenclawPlugin (standalone mode)
3. `curl POST /v1/chat/completions` with a "say READY" prompt
4. Watch for "READY" in the SSE stream
## Deferred to v2
- OpenClaw tool proxy via MCP (read/edit/etc. forwarded as MCP tools instead of using Claude Code's built-ins) — only matters if we want OpenClaw-specific tools (memory_*, wiki_*, canvas) to be accessible from the bridged session
- Full session-key extraction from OpenClaw "Conversation info" block (currently using HTTP headers)
- `plugin:` channel form for marketplace distribution (currently `server:` + dev flag)
- Permission_request reverse channel (skipped per design)
- Install / uninstall script (mirrors contractor-agent's `scripts/install.mjs`)
- Better stop-hook integration for graceful shutdown
- Multi-machine deployment (currently same-host only)