docs: rework channels proposal around local mcp bridge#706
Conversation
Reframe the Claude Code channels proposal: the primary use case is notifying a local user-driven Claude Code session that orchestrates xagent tasks through the user-facing MCP server, not pushing into in-container agents. Replace the new task_events table and PollEvents RPC with reuse of the existing apiserver -> notifyserver SSE pipeline. Introduce a local stdio "xagent mcp" bridge that proxies the user-facing tools and translates model.Notification events into notifications/claude/channel. Update channel docs facts to match the current research preview, and re-weigh Go vs TS/Bun for the bridge now that the in-container Node objection no longer applies.
|
@icholy-bot Follow-up findings from investigating the Go SDK gap directly against the vendored source — a few things in the proposal are now stale and should be updated: 1. SDK version is wrong. The proposal says "Go SDK v1.2.0". The repo is pinned at v1.4.1, latest is v1.6.1, and the gap persists in all of them (still only 2. The "Go MCP SDK Gap" section should be reframed from open → mostly resolved.
3. Option 1 (upstream 4. The Go-vs-Bun open question now resolves toward Go. The only thing that made Bun attractive was sidestepping the SDK gap — the transport wrapper eliminates that, so Go (reusing The receive-side concern @jba raised only matters to us if/when we add channel permission relay (Claude Code → bridge); for the v1 one-way "task updated" push, send-only via the transport wrapper is sufficient. |
Fold in review findings from PR #706: - Correct vendored Go MCP SDK version: v1.4.1 (v1.6.1 latest); gap persists in all of them. - Split the prior "SDK gap" section into two: declaring the claude/channel capability is already supported by the public ServerOptions.Capabilities.Experimental and needs no patch; sending notifications/claude/channel is handled by a ~30-line transport wrapper over the public mcp.Transport, mcp.Connection, and jsonrpc.Request APIs. - Drop upstream ServerSession.Notify as the preferred path: the send-only design was rejected by maintainer @jba on go-sdk #898; combined send+receive design is tracked in go-sdk #745. - Drop the temporary-fork option entirely. - Resolve the Go-vs-TS/Bun open question toward Go now that the transport wrapper eliminates Bun's only structural advantage. - Update the xagent mcp skeleton to thread the wrapped transport to the SSE->channel goroutine.
|
Thanks — all four points folded in (commit 23b8ea2). Summary of the changes:
The "Future work: pushing into in-container agents" section now says the transport wrapper is reusable as-is for the in-container agent server. (task 668) |
Summary
proposals/draft/claude-code-channels.mdto reflect the new design direction: channels are about notifying a local user-driven Claude Code session that orchestrates xagent through the user-facing MCP server, not pushing into in-container agents.xagent mcpbridge that re-exposes the user-facing tools (via a sharedmcpserver.AddToolsrefactor) and translates the existingapiserver→notifyserverSSE notification stream intonotifications/claude/channelevents.task_eventstable andPollEventsRPC — the existing pubsub/SSE pipeline already carries every change needed.metaidentifier rule, fire-and-forget delivery, allowlist, auth/platform constraints).This is a docs-only change. No Go code is modified.
Related to #466
Test plan
proposalskill (.claude/skills/proposal/SKILL.md).mcpserver.go,apiserver.go'ss.publish,notifyserver,model.Notification,internal/x/sse,xagentclient.