Skip to content

feat(v2): the where-step gains "On my computer" — pick a machine, watch the agent come up - #1564

Merged
lilyshen0722 merged 2 commits into
mainfrom
feat/byo-machine-picker
Sep 6, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
feat/byo-machine-picker

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

ADR-026 Phase 2, slice 3 — the UI end of the daemon loop. With #1562 (server work surface) and #1563 (commonly daemon run), this closes the arc Sam named: adding an agent to your own computer is now a UI act. Merge order: #1562 → #1563 → this (it degrades gracefully before then — the card only renders when GET /api/machines returns machines).

What changed

  • When the user has daemon-registered machines, the BYO where-step shows a third mode card, On my computer, beside "Run it here" and "Bring your own", with a machine picker (name + online/offline).
  • Submit installs the agent (runtimeType: 'wrapper', persona carried through exactly like the other two modes) and files the placement request (POST /api/agent-binding/request) — a directive, never a binding: the daemon on that machine adopts via the D3 CAS, mints the runtime credential server-side, and starts the agent. No secret ever renders in the browser on this path.
  • The result panel is the D2 promise: instead of "now run this command," the page polls the machine list until the daemon's heartbeat reports the agent running, then flips live. After ~2 minutes it says honestly: check commonly daemon run on that machine — the agent starts the moment it's back.
  • Users with no registered machines see the page exactly as before (no card, no noise). en + zh-CN keys added.

Verification

3 new tests (card gated on machines existing; wrapper-install + request payloads asserted; waiting-not-live honesty) — full frontend suite 89/89, eslint 0 errors.

Known residue, deliberately out of scope: model choice from the UI needs the runtime config to flow into the daemon's token record environment (next slice), and machine registration is still CLI-side (commonly daemon register) until daemon install (D1) ships.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EtwYLMJAYuZ3grLQoXWMWT

lilyshen0722 and others added 2 commits September 5, 2026 19:34
…ch the agent come up

ADR-026 Phase 2, slice 3. When the user has daemon-registered machines
(GET /api/machines), the BYO where-step offers a third mode beside hosted and
bring-your-own: pick a computer, and submit installs the agent (runtimeType
'wrapper', persona carried through like the other modes) then files a
placement request (POST /api/agent-binding/request) — a directive, never a
binding; the daemon on that machine performs the adopt CAS, mints the
credential server-side, and starts the agent. Nothing secret renders in the
browser on this path either.

The result panel replaces "now run this command" with watching: it polls the
machine list until the daemon's heartbeat reports the agent running, and
after ~2 minutes says honestly to check `commonly daemon run` on that
machine. Users with no registered machines see the page exactly as before.

3 new tests: card gated on machines existing, wrapper-install + request
payloads, honest waiting state. Full frontend suite 89/89 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EtwYLMJAYuZ3grLQoXWMWT
@lilyshen0722
lilyshen0722 merged commit e885645 into main Sep 6, 2026
14 checks passed
@lilyshen0722
lilyshen0722 deleted the feat/byo-machine-picker branch September 6, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant