feat(features,host,desktop): the desktop reads one agent as its own page by its id, through the gateway
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)readsGET /api/agents/{id}(#2701) withcodingAgentPageAnswerSchema, and its refusals map as every row read's do. - View:
codingAgentPageParamsSchema({ agentId }) andcodingAgentPageAnswerViewSchema(the page, orfailed). - Gateway: the
codingAgents.pagemethod, handled incompose-coding-agents.ts. - Host operator:
codingAgentPage(params). - Desktop: the
codingAgents.pageact, refused unless from a panel, routed incoding-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 asnot-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
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
codingAgentPageParamsSchemaandcodingAgentPageAnswerViewSchemaare new wire goldens, recorded withLUKE_UPDATE_FIXTURES=1; no existing goldens change.- The
codingAgents.pageact 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:affectedpasses; CI cannot verify the Mac UI.