Repository navigation
One server, every device: devices_list / devices_use in the plugin's cua_repl (plugin 0.3.0) - #71
Merged
Merged
Conversation
…3-18, interfaces, milestones G1-G4, Decision Log)
…; ignore the execution ledger
…usted services refuse it with secret_reserved (#69)
…mand in remote enroll|show --json (#70 G1)
…onsole refuses js (#70 G2)
…e case-insensitive (G1 review)
…nds; an empty mcpServers says so; tests for an unlistable store and an unsafe credential file (G1 review)
…rror over Node's fetch (#70 G2)
…t, a cancellation waits for its request's head, the open and a request's head are bounded at 30 s, an open takes a signal, an unanswered DELETE says its outcome is unknown; tests for the untested branches (#70 G2)
…(sent: false), and an unanswered request reads as one sentence (#70 G3)
…e tools routed to a device session, the device's requests remapped, cancellation, DELETE on end_task, on switching away and at close, the 404 rules, the devices rule in the host notes (#70 G3)
…e tools); the usage test captures its usage line instead of printing it (#70 G3 review)
…task open, stray cua-device ids and device cancellations dropped, a failed end_task says the target is free, the new-session note once per session, a call queued behind a switch is cancellable, calls cut by the close answer connection_closing; src/remote/targets.mjs renamed directory.mjs (#70 G3 review)
…devices, devices_list, devices_use) and keeps the standalone registration second; cua-remote Part B collapsed; relay README names both client routes (#70 G4)
…tured content, and a new session's note joins a structured device result: Claude Code shows the model only the structured content of a successful result (#70 G4 live run)
…h the hosted relay, the structured-content fix the run required, the mini's network outage; tech debt: success-result text Claude Code never shows (#70 G4)
…inside a shell block (#70 G4)
…ain, so it runs on that switch's target and a later devices_use sees its task; a switch that finds the connection closing after the previous device's DELETE ends the new session too (#70 branch review)
This was referenced Oct 7, 2026
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.
Closes #70
Closes #69
One server, every device: the plugin's own
cua_repl(stdiocua serve) reaches every enrolled device itself, so a client needs no per-deviceclaude mcp add. Tool names staymcp__plugin_cua_cua_repl__*; which machine they drive is a per-connection target.devices_list/devices_use.devices_listprobes each registered device without opening a session (one authenticated session-lessping: relay503offline,401unauthorized, the device's400online,Cua-Console: lockedlocked).devices_use <name>switchesjs,js_reset,end_task,profiles_listandsecrets_listto that device, anddevices_use localswitches back. A switch is refused withtask_openwhile a task is open. The device session is DELETEd afterend_task, on switching away and at close.js's schema is unchanged.src/remote/client.mjs. An MCP Streamable HTTP client over Node'sfetch, with no new dependency.Last-Event-ID(1 s doubling to 15 s within 90 s).cua-device-<n>ids, so the local approval hook answers them.device_offline,device_unauthorized,session_limit,device_session_ended,device_failed,device_protocol.~/.config/cua/devices.json(0600). The CLI iscua devices add|remove|list|import;importtakes today's*.mcp.jsonclient configs and writes the credential to the secret store itself. The credential stays in the store underCUA_DEVICE_<id, - as _>and is read by the server process only.CUA_DEVICE_prefix, in any letter case (Secrets: should relay client credentials stored via /secret be substitutable; fixture temp-home cleanup; accept-native PASS on macOS #69). Those keys are hidden fromsecrets_list, and{{secret:…}}refuses them withsecret_reservedin both trusted services.cua secrets liststill shows them.cua-remoteskill's Part B is collapsed. The host notes gain the devices rule within the 2,048-character budget.docs/doperpowers/specs/2026-10-06-remote-and-linux-design.md, with its Decision Log entries, Surprises and Outcomes.Validation Evidence
npm testat 92e879b# tests 780 # pass 779 # fail 0 # skipped 1(704 pass before)node bin/cua.mjs devices import ~/.config/cua-relay/mini.mcp.json, run twice;devices listcredential stored under CUA_DEVICE_nuadM_…, thencredential unchanged;mini … credential stored; the credential appears 0 times in the output (counted, never printed)claude -p --strict-mcp-config --mcp-config /tmp/g70-accept.mcp.json …(worktreecua-shim.mjsascua_repl)devices_listminionline;devices_use miniok with the mini's notes; TextEdit marker typed and read back;schooltab opened, read and closed;devices_use localbeforeend_task→{"status":"error","code":"task_open"}; afterend_task, localjsread the MacBook; the mini'srun/is cleansystemctl restart cua-relay12 s into a 45 sjs; Caddy access logGET 503 Last-Event-Id: 1-0(twice, device not back yet), thenGET 200 Last-Event-Id: 1-0, 25.7 scarrying the answer; no newinitialize. Same in reverse throughLast-Event-Id: 2-0secrets_list;typeText("{{secret:CUA_DEVICE_…}}")[secret_reserved], nothing typedgrep -c -F "$(jq -r … mini.mcp.json | sed 's/^Bearer //')"over every stream-json output, stderr and session transcriptmacbook.mcp.jsonclaude -pwith~/.config/cua-relay/mini.mcp.jsonas-isjsread the mini's host name; tab openedThe full record is in
docs/evidence/2026-10-07-device-multiplexing-acceptance.md.Reviews:
task_opencould race a lazy open.reviewer-highbrief found two seam defects:devices_usecalls ran on the later device.Both are fixed with tests (cbcca48) and re-reviewed as correct. Its review of the last stretch (G4's fix, docs, version) left one doc clause, fixed in 92e879b.
Unresolved Review Findings
These are deferred Minors from the task reviews and the branch review. They are logged in
tech-debt-tracker.mdunder "Phase G task-review minors left".src/cli.mjsis past 700 lines with thedeviceshandler. Splitting it by command family is a refactor outside this ticket.test/remote-devices.test.mjs: the test named "unsafe or unreadable" exercises only an insecure-mode file. The behaviour is correct; only the title overstates it.src/mcp/target.mjs: a deviceend_taskthat fails because the session was lost says both "the next call opens a new session" and "devices_use still works". This is redundant but accurate.src/mcp/target.mjs: a connection that closes whiledevices_usere-awaits in-flight calls answerstask_openrather thanconnection_closing. The client is leaving, so nothing acts on the answer.src/mcp/surface.mjs: the Linuxcomputer,browserhost notes are at 2,045 of 2,048 characters. Every rule fits today, but the next rule needs another tightening.Residue
profiles_listguidance is invisible to the model. Claude Code 2.1.292 shows onlystructuredContentfor a successful result.profiles_list's "not ready, tell the user; do not pick a profile" text has therefore never reached the model since Phase C. It is in the tech-debt tracker; it deserves a fix that puts the guidance into the structured content.Cua-Console: lockedprobe header take effect only when each device's agent runs this version. Both agents ranmainduring acceptance by design. Until then, the mini's 0.2.3 plugin still lists theCUA_DEVICE_jMTkLnzn_…key this acceptance stored there.