feat(features,host,desktop): the desktop reads one agent as its own page by its id, through the gateway

Merged
DA
4d ago
+311-0

Step 8 (first half) of the automations plan (docs/proposals/automations-scope.md). It is stacked on #2705.

What changes

The desktop can now read one agent whole as its own page, through the same layers every coding-agent read takes:

  • Hosted client: HostedCodingAgentClient.agent(agentId) reads GET /api/agents/{id} (#2701) with codingAgentPageAnswerSchema, and its refusals map as every row read's do.
  • View: codingAgentPageParamsSchema ({ agentId }) and codingAgentPageAnswerViewSchema (the page, or failed).
  • Gateway: the codingAgents.page method, handled in compose-coding-agents.ts.
  • Host operator: codingAgentPage(params).
  • Desktop: the codingAgents.page act, refused unless from a panel, routed in coding-agent-acts.ts.

Nothing draws it yet. The second half adds the agent page itself: a window place standing where the plan would, as the Inbox does, drawing AgentTab's body for an agent with no plan. It opens from the agent's Inbox item, its notice, and the command palette.

Wire goldens: codingAgentPageParamsSchema and codingAgentPageAnswerViewSchema are new, recorded with LUKE_UPDATE_FIXTURES=1. No existing golden changes.

Tests

  • coding-agent-client.test.ts: agent() reads a planless agent's page as the service answered it, and a 404 as not-found.
  • compose-coding-agents.test.ts: the gateway method asks the service once and carries the page whole.
  • coding-agent-acts.test.ts: the host fake gains the method.

pnpm check:affected passes. This adds desktop plumbing only (no drawing); CI cannot verify the Mac UI, and ./scripts/verify.sh was not run (LUKE-159 stands in before the first release).

🤖 Generated with Claude Code


Open workspace in Conductor


Devin Review


Summary by cubic

Adds desktop plumbing to read one agent whole as its own page by its ID through the hosted client, gateway, and host operator—the first half of step 8 of the automations plan; nothing draws the page yet. Also makes automation runs start their agents in the automation's workspace on no plan, and automations that archive their successful runs archive each run's agent once it finishes well.

Notes

  • codingAgentPageParamsSchema and codingAgentPageAnswerViewSchema are new wire goldens, recorded with LUKE_UPDATE_FIXTURES=1; no existing goldens change.
  • The codingAgents.page act is refused unless it comes from a panel.
  • A run's agent is archived only while its lines stand as the sweep read them.
  • pnpm check:affected passes; CI cannot verify the Mac UI.