Repository navigation
feat: activate remote reverse-MCP connection — config file + WS transport + UI button (Part B) - #43
Merged
Merged
Conversation
… + commands The operator-triggered remote reverse-MCP-over-ACP connection (reverse-MCP client ADR, Part B): Studio dials the /acp endpoint, declares its `oab` server, and relays tunnelled MCP to the running oab-mcp sidecar. - acp-tunnel::config::RemoteConfig — the remote.toml schema (url/token/cwd), parse/serialize/validate. Unit-tested (5 cases; empty=not-configured, bad scheme rejected, cwd defaults). aws-free, runs locally. - src-tauri/remote.rs — the WS transport: dial /acp (tokio-tungstenite, bearer sub-protocol), drive the acp-tunnel Session (initialize → session/new declaring oab → resume on reconnect), and serve the gateway-initiated tunnel by relaying initialize (answered locally) / tools/list / tools/call to the sidecar McpClient. Reconnect with backoff; abort on disconnect. Config file IO with validate-before-write. - commands: remote_config / remote_config_write (editable remote.toml, same pattern as fleets.toml) / remote_connect (the explicit Activate) / remote_disconnect; `remote-status` events. McpClient::request made pub so the tunnel relays raw MCP results. Verification: `cargo test -p acp-tunnel` 18/18 (13 protocol + 5 config) locally. The src-tauri transport compiles under desktop.yml (macOS); its end-to-end wire behaviour is validated against the live gateway once the §5 endpoint exists (exact ACP initialize/session params + TLS provider are live-validation items). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…l editor (Part B) The UI for the operator-triggered reverse-MCP connection: - A `remote` panel: live status badge (disconnected/connecting/connected/error), the /acp endpoint, and an explicit **Activate remote connection** / Disconnect button (Activate disabled until url+token are configured). - Editing: the existing CodeMirror TOML editor is generalized to two targets (fleets.toml + remote.toml); "Edit config" on the panel opens remote.toml. - Live status: subscribes to the backend `remote-status` event so the badge reflects the real transport state without polling. - `RemoteConfig` view type + Source methods (remoteConfig / writeRemoteConfig / remoteConnect / remoteDisconnect), with MockSource for the browser build. Verification: tsc clean; vitest 41/41 (7 new remote-panel cases: configured vs not, connected→Disconnect, error, edit action, escaping); vite build clean. 🤖 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).The operator-triggered remote reverse-MCP-over-ACP connection (reverse-MCP client ADR, Part B) — the piece that makes path (i) real. Studio dials the configured
/acpendpoint, declares itsoabserver, and relays tunnelled MCP to the runningoab-mcpsidecar (§4.3). Connection is explicit (a button), configured via an editable file, per operator direction.What
acp_tunnel::config::RemoteConfig(~/.config/oab-studio/remote.toml:url/token/cwd), parse/serialize/validate. editable in-app via the same CodeMirror TOML editor asfleets.toml.src-tauri/remote.rs: dial/acp(tokio-tungstenite, bearer sub-protocol), drive theacp-tunnelSession(initialize→session/newdeclaringoab→resumeon reconnect), and serve the gateway-initiated tunnel by relayinginitialize(answered locally) /tools/list/tools/callto the sidecarMcpClient. Reconnect w/ backoff; abort on disconnect.remote_config/remote_config_write/remote_connect(the Activate) /remote_disconnect;remote-statusevents.remotepanel: status badge, endpoint, Activate remote connection / Disconnect button (disabled until configured), Edit config. Live status via theremote-statusevent.Verification
cargo test -p acp-tunnel— 18/18 (13 protocol + 5 config), local.tsc+vite buildclean; vitest 41/41 (7 new remote-panel cases).src-tauri/remote.rscompiles underdesktop.yml(macOS) — not locally (webkit). Its end-to-end wire behaviour is validated against the live gateway once the §5 endpoint exists (the Jelly thread on endpoint + bearer). Live-validation items flagged in-code: exact ACPinitialize/session/newparams, and the rustls crypto-provider at dial time.Security note
The
/acpbearer lives inremote.toml(plaintext, editable) and is surfaced in the editor — acceptable for a local single-operator desktop tool (same posture as any editable secret-bearing config); a keychain-backed token is a possible follow-up.🤖 Generated with Claude Code