feat: real channel-bridge client + reply tool

- WS client to OpenclawPlugin's bridge (auto-reconnect with exponential
  backoff)
- On hello: send (openclaw_session, claude_session, pid) — no auth token
- On inbound frame: emit notifications/claude/channel into MCP so Claude
  Code opens a new turn
- Single MCP tool `reply(text, final?)` — model calls it to send a
  reply back via the bridge. final=false streams progress chunks
- Capability declared under `experimental.claude/channel` (top-level was
  silently ignored — bug confirmed against Anthropic's discord plugin)
- Dropped auth handshake + permission_request reverse channel per the
  same-machine, full-perms design call

Add .mcp.json so the package is also a valid Claude Code plugin (for
potential plugin: form deployment later).
This commit is contained in:
zhi
2026-05-14 13:28:14 +00:00
parent cb94464060
commit 813f81af9a
4 changed files with 125 additions and 164 deletions

View File

@@ -9,8 +9,7 @@
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0",
"ws": "^8.18.0",
"zod": "^3.23.0"
"ws": "^8.18.0"
},
"devDependencies": {
"@types/ws": "^8.5.10"