Repository navigation
feat(acp-tunnel): reverse-MCP-over-ACP session lifecycle (Part B slice 3) - #40
Merged
Merged
Conversation
…e 3) New aws-free root-workspace crate holding the Studio-side reverse-MCP-over-ACP protocol as pure logic — so it is unit-tested in `cargo test --workspace` (and locally, unlike the aws-linked crates) and reused by src-tauri's WS transport (and any future headless client) without pulling protocol code into the Tauri build. Slice 3 = the session lifecycle: - The bearer sub-protocol builder (`openab.bearer.<token>, acp.v1`) and the protocol `limits` (frame/timeout/server caps) from the tunnel contract. - `ServerDecl` / `oab_server` — the single `type:"acp"` `oab` server Studio declares (D1), in wire form. - JSON-RPC 2.0 envelope helpers (request/notification/response/error). - `Session` state machine: New → Initializing → Initialized → SessionActive, producing `initialize` → `session/new` (declaring the oab server) → `session/resume` (re-presenting the whole set with fresh per-connection ids on reconnect, per contract §7). Monotonic request ids. Contract-specified parts (declaration, envelope, methods, limits) are owned here; the standard-ACP `initialize` params are passed through by the transport against the ACP version in use. Inbound tunnel dispatch is slice 4; the src-tauri WS glue relays tool calls to the running oab-mcp sidecar (no in-process aws link — see the ADR §4 update). Verification: `cargo test -p acp-tunnel` — 7/7 pass locally (no aws, no Tauri). 🤖 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 3 of the reverse-MCP client ADR (#36). A new aws-free root-workspace crate holding the Studio-side reverse-MCP-over-ACP protocol as pure logic — so it is unit-tested by
cargo test --workspace(and locally, unlike the aws-linked crates) and reused by src-tauri's WS transport (and any future headless client) without pulling protocol code into the Tauri build.Why a separate crate
src-tauriis its own workspace, built only bydesktop.yml(macOStauri build) and not locally compilable here (webkit/gtk). Putting the protocol + state machine incrates/acp-tunnelkeeps it in the fastci.ymlgate and fully testable.Slice 3 — the session lifecycle
openab.bearer.<token>, acp.v1) + protocollimits(frame/timeout/server caps) from the tunnel contract §1/§7.ServerDecl/oab_server— the singletype:"acp"oabserver Studio declares (D1), in wire form.Sessionstate machine:New → Initializing → Initialized → SessionActive, producinginitialize→session/new(declaring the oab server) →session/resume(re-presenting the whole set with fresh per-connection ids on reconnect, contract §7). Monotonic request ids.Contract-specified parts (declaration, envelope, methods, limits) are owned here; the standard-ACP
initializeparams are passed through by the transport against the ACP version in use.Design note (corrects ADR §4.3 — update incoming on #36)
The desktop reaches
oab-mcponly via the stdio sidecar (McpClient), keeping aws out of the Tauri build (desktop-core-sidecar ADR). So slice 4's tunnel dispatch will relay inner MCP to that running sidecar, not linkoab-mcpin-process. Slice 2's lib split is still fine (and serves a future headless client); the desktop path is a WS↔sidecar relay.Verification
cargo test -p acp-tunnel— 7/7 pass locally (no aws, no Tauri). Also runs inci.ymlcargo test --workspace.Next: slice 4 — inbound
mcp/connect/mcp/message/mcp/disconnect/mcp/canceldispatch (in this crate, with aToolBackendtrait) + the src-tauri WS transport implementing it over the sidecar.🤖 Generated with Claude Code