On the server's /api/v2 (3.4.0, server dev 5d7b79c):
- The activity panel reads GET /chats/{chat}/tree beside the activity and
draws ui/js/tree.js's rows in a Subagents section, the server panel's words
and layout: nested by parent, position, phase, context %, state, model,
mode + request options, messages and the last one, open slots, the ended
ones folded and dimmed. A team's members are no longer drawn again among
the tasks. The stream's `tree` frame redraws it.
- A subagent's conversation (/subagents/{id}/transcript, read again every 3 s
while it works) and its findings open read-only in the panel; Stop asks,
then POSTs /stop. With an agent chat's device away: the kept tree with the
server's note, and its 409 sentence for the rest.
- A new agent chat's Subagents chip from /models?kind=agent&device= (each
model's `subagents`, `agent_subagents.offered` and `device_runs`); an open
agent chat's from its own `subagents`, as before.
- An approval item's `subagent` names it on the card.
- Progress keys are the spec's own ({{field}}), as the server's catalogues
have them; SERVER_PENDING is gone, every sentence is translated.
tests/ui reads the server's contract fixtures (scripts/fetch-fixtures.sh ->
tests/ui/fixtures, SOURCE says the commit): status frames, tree, tree frame,
transcript, findings, models?kind=agent, a subagent's approval; six C4 cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
163 lines
3.8 KiB
JSON
163 lines
3.8 KiB
JSON
{
|
|
"cards": [
|
|
{
|
|
"id": "card1",
|
|
"kind": "question",
|
|
"why": "",
|
|
"dismissable": false,
|
|
"expires_in": null,
|
|
"items": [
|
|
{
|
|
"index": 0,
|
|
"key": "q0",
|
|
"kind": "question",
|
|
"tool": "ask_user",
|
|
"title": "Honey or not?",
|
|
"header": "Taste",
|
|
"detail": "",
|
|
"reason": "",
|
|
"purpose": "",
|
|
"options": [
|
|
{
|
|
"label": "Honey",
|
|
"description": "",
|
|
"recommended": true
|
|
},
|
|
{
|
|
"label": "Plain",
|
|
"description": "As the elves have it",
|
|
"recommended": false
|
|
}
|
|
],
|
|
"multiple": false,
|
|
"free_text": true,
|
|
"editable": false,
|
|
"plan": null,
|
|
"mode_choice": true,
|
|
"job": "",
|
|
"subagent": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "card2",
|
|
"kind": "approval",
|
|
"why": "",
|
|
"dismissable": false,
|
|
"expires_in": null,
|
|
"items": [
|
|
{
|
|
"index": 0,
|
|
"key": "0",
|
|
"kind": "approval",
|
|
"tool": "bash",
|
|
"title": "Run a command",
|
|
"header": "",
|
|
"detail": "rm -rf build",
|
|
"reason": "Edit mode asks before anything that runs a command.",
|
|
"purpose": "Start clean",
|
|
"options": [],
|
|
"multiple": false,
|
|
"free_text": false,
|
|
"editable": true,
|
|
"plan": null,
|
|
"mode_choice": true,
|
|
"job": "explore (job1)",
|
|
"subagent": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "card3",
|
|
"kind": "plan",
|
|
"why": "",
|
|
"dismissable": true,
|
|
"expires_in": null,
|
|
"items": [
|
|
{
|
|
"index": 0,
|
|
"key": "p0",
|
|
"kind": "plan",
|
|
"tool": "plan_submit",
|
|
"title": "Bake lembas",
|
|
"header": "",
|
|
"detail": "",
|
|
"reason": "",
|
|
"purpose": "",
|
|
"options": [],
|
|
"multiple": false,
|
|
"free_text": true,
|
|
"editable": false,
|
|
"plan": {
|
|
"version": 2,
|
|
"title": "Bake lembas",
|
|
"summary": "",
|
|
"findings": [],
|
|
"objectives": [],
|
|
"phases": [
|
|
{
|
|
"id": "p1",
|
|
"title": "Plan",
|
|
"status": "pending",
|
|
"tasks": [
|
|
{
|
|
"id": "t1",
|
|
"text": "Gather mallorn leaves",
|
|
"status": "todo",
|
|
"note": ""
|
|
},
|
|
{
|
|
"id": "t2",
|
|
"text": "Bake slowly",
|
|
"status": "todo",
|
|
"note": ""
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"steps": [
|
|
"Gather mallorn leaves",
|
|
"Bake slowly"
|
|
]
|
|
},
|
|
"mode_choice": true,
|
|
"job": "",
|
|
"subagent": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "card4",
|
|
"kind": "approval",
|
|
"why": "",
|
|
"dismissable": false,
|
|
"expires_in": null,
|
|
"items": [
|
|
{
|
|
"index": 0,
|
|
"key": "0",
|
|
"kind": "approval",
|
|
"tool": "bash",
|
|
"title": "Run a command",
|
|
"header": "",
|
|
"detail": "git push",
|
|
"reason": "Edit mode asks before anything that runs a command.",
|
|
"purpose": "",
|
|
"options": [],
|
|
"multiple": false,
|
|
"free_text": false,
|
|
"editable": true,
|
|
"plan": null,
|
|
"mode_choice": true,
|
|
"job": "",
|
|
"subagent": {
|
|
"id": "s1",
|
|
"name": "parser",
|
|
"position": "reviews the parser"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|