Repository navigation
feat(acp-tunnel): inbound tunnel dispatch — parse frames + build replies (Part B slice 4) - #41
Closed
brettchien wants to merge 1 commit into
Closed
brettchien wants to merge 1 commit into
brettchien wants to merge 1 commit into
Conversation
…ies (Part B slice 4) The gateway-initiated tunnel routing, kept **pure** so the async work (forwarding an inner MCP call to the running oab-mcp sidecar and awaiting it) stays in the src-tauri transport and the routing is unit-testable without a runtime. - `Inbound` classification of an `/acp` frame: `Connect` / `Message` (request vs notification by presence of the outer id) / `Disconnect` / `Cancel` / `Other` (ACP chat + unknown are ignored by the tunnel). - `parse_inbound` (never fails; lenient sub-field reads) and the reply builders `connect_reply` / `message_reply` / `message_error` / `disconnect_reply`. - Correlation is always by the OUTER ACP frame id; the inner MCP result becomes the ACP response result verbatim; an inner error becomes an outer JSON-RPC error (tunnel contract §4). Verification: `cargo test -p acp-tunnel` — 13/13 pass locally (7 lifecycle + 6 dispatch), no aws / no Tauri. Remaining for path (i): the src-tauri WS transport — dial `/acp` (tokio-tungstenite), drive the `Session`, and on each `Inbound::Message` relay to the sidecar `McpClient` and reply. That half compiles only under desktop.yml (macOS) and runs end-to-end only against a real gateway (ADR §5, pending). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drafted by Orca (
ecs-claude) — flagging authorship (shared GitHub identity).Slice 4 of the reverse-MCP client ADR (#36) — the protocol half.⚠️ Stacked on #40 (slice 3) — base is
feat/acp-tunnel-session-lifecycle; merge #40 first (I'll rebase onto main after).The gateway-initiated tunnel routing, kept pure so the async work (forwarding an inner MCP call to the running
oab-mcpsidecar and awaiting it) stays in the transport, and routing is unit-testable without a runtime.What
Inboundclassification of an/acpframe:Connect/Message(request vs notification by presence of the outer id) /Disconnect/Cancel/Other(ACP chat + unknown ignored).parse_inbound(never fails; lenient sub-field reads) + reply buildersconnect_reply/message_reply/message_error/disconnect_reply.resultverbatim; an inner error → an outer JSON-RPC error (contract §4).Verification
cargo test -p acp-tunnel— 13/13 pass locally (7 lifecycle + 6 dispatch), no aws / no Tauri.Remaining for path (i) — the src-tauri WS transport (follow-up)
Dial
/acp(tokio-tungstenite), drive theSession, and on eachInbound::Messagerelay to the sidecarMcpClientand reply (§4.3). That half:desktop.yml(macOStauri build) — not locally here (webkit/gtk), so it's CI-only-verifiable;I've split it out so the tested protocol lands now; the transport pairs naturally with the endpoint arriving.
🤖 Generated with Claude Code