Skip to content

One server, every device: the plugin's cua_repl reaches remote devices itself (devices_list / devices_use) #70

Closed

Description

@SSFSKIM

Goal (owner decision 2026-10-07)

One server, every device. The plugin's plugin:cua:cua_repl server reaches remote devices itself, so a client needs no per-device claude mcp add: the tool names stay mcp__plugin_cua_cua_repl__*, and which machine they drive is a per-connection target.

Design

  • Target per connection. New tools devices_list (local + every configured device with online/offline/locked as the relay reports it) and devices_use {device} (switch the connection's target; refused while a task is open on the current target, task_open; default target local). js, js_reset, end_task, profiles_list, secrets_list route to the target. Host notes gain one rule (budget 2,048 chars incl. the vendor's first line).
  • Remote target = an MCP Streamable HTTP client inside cua serve (src/remote/client.mjs): initialize, POST with SSE parsing, Last-Event-ID resumption on a dropped stream, DELETE on end_task/close; elicitations from the device are relayed to the local client unchanged (the plugin's approval hook answers them). Relay errors map to classified codes (device_offline, console_locked, device_unauthorized, session_limit).
  • Device registry ~/.config/cua/devices.json (0600): {name: {deviceId, relayUrl}}; CLI cua devices add <name> --relay <url> --device <id>, remove, list, and import <mcp.json> for the ~/.config/cua-relay/*.mcp.json files that exist today (writes the credential to the secret store itself).
  • Credential read by the server from the secret store under the key CUA_DEVICE_<id with - as _> (the owner stores it with /secret). The CUA_DEVICE_ prefix is reserved: excluded from secrets_list and from {{secret:…}} substitution (closes Secrets: should relay client credentials stored via /secret be substitutable; fixture temp-home cleanup; accept-native PASS on macOS #69's decision).
  • The standalone HTTP registration (claude mcp add --transport http cua_repl …) stays supported for clients without the plugin.
  • Skill cua-remote Part B collapses to: store the credential, cua devices add (or import), reconnect, devices_list/devices_use.

Acceptance

From this MacBook's plugin server: devices_list shows mini online; devices_use mini, a TextEdit marker typed/read on the mini and a Chrome school tab; devices_use local after end_task; relay restart mid-js delivers the in-flight result; the credential appears nowhere in the transcript; secrets_list hides CUA_DEVICE_*; {{secret:CUA_DEVICE_…}} is refused. Same from the mini to the MacBook. Spec: new Phase G section + Decision Log in 2026-10-06-remote-and-linux-design.md.

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P1
    status:in-progress
    and removed
    status:ready-for-implementer
    on Oct 7, 2026
  2. added
    status:in-review
    and removed
    status:in-progress
    on Oct 7, 2026
  3. SSFSKIM commented on Oct 7, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: PR open: acceptance 13-18 passed both directions; reviews clean

  4. removed
    status:in-review
    on Oct 7, 2026
  5. SSFSKIM commented on Oct 7, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: PR #71 merged: devices_list/devices_use in the plugin server, cua devices CLI, CUA_DEVICE_ reserved; live both directions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions