Subagents (C4): the tree in the activity panel, read-only sessions, findings, stop; agent chats' setting
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>
This commit is contained in:
22 files changed
+1400
-181
No files matched your search
@@ -0,0 +1 @@
|
||||
LLeMbas origin/dev (5d7b79c5c9dc0d9c3df9a8b401c02fdd67927c2d) tests/fixtures/api_v2
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"id": "chat2",
|
||||
"kind": "agent",
|
||||
"title": "Waybread",
|
||||
"model": "qwen",
|
||||
"folder_id": null,
|
||||
"pinned": false,
|
||||
"archived": false,
|
||||
"temporary": false,
|
||||
"unread": true,
|
||||
"running": true,
|
||||
"mode": "edit",
|
||||
"effort": "low",
|
||||
"device": {
|
||||
"token_id": "token1",
|
||||
"directory": "/home/dev/project"
|
||||
},
|
||||
"device_session_id": "ses_01waybread",
|
||||
"parent_chat_id": null,
|
||||
"agents": {
|
||||
"min": 1,
|
||||
"max": 4
|
||||
},
|
||||
"subagents": {
|
||||
"offered": true,
|
||||
"named_only": false,
|
||||
"cap": 32
|
||||
},
|
||||
"created_at": "2026-01-02T03:04:05+00:00",
|
||||
"updated_at": "2026-01-02T03:04:05+00:00"
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"text": "Running bake --slow",
|
||||
"progress": {
|
||||
"phase": "running_tool",
|
||||
"since": 1767323045000,
|
||||
"tool": "bash",
|
||||
"what": "bake --slow"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"text": "",
|
||||
"progress": null
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"text": "Waiting for you to allow bash…",
|
||||
"progress": {
|
||||
"phase": "waiting_for_person",
|
||||
"since": 1767323045000,
|
||||
"what": "question"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"text": "",
|
||||
"progress": {
|
||||
"phase": "stopped",
|
||||
"since": 1767323045000,
|
||||
"reason": "person"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"tree": {
|
||||
"min": 1,
|
||||
"max": 4,
|
||||
"size": 2,
|
||||
"open_slots": 1,
|
||||
"agents": [
|
||||
{
|
||||
"id": "lead",
|
||||
"name": "lead",
|
||||
"position": "the main agent",
|
||||
"parent": null,
|
||||
"state": "working",
|
||||
"model": "qwen-27b",
|
||||
"mode": "edit",
|
||||
"request": [],
|
||||
"manager": true,
|
||||
"context": {
|
||||
"used": 41200,
|
||||
"window": 131072
|
||||
},
|
||||
"progress": {
|
||||
"phase": "thinking",
|
||||
"since": 1767323045000
|
||||
},
|
||||
"findings": 0,
|
||||
"messages": 2
|
||||
},
|
||||
{
|
||||
"id": "s2",
|
||||
"name": "parser",
|
||||
"position": "reviews the parser",
|
||||
"parent": "lead",
|
||||
"state": "working",
|
||||
"model": "qwen-27b",
|
||||
"mode": "manual",
|
||||
"task": "Review src/parse.ts.",
|
||||
"request": [
|
||||
"write"
|
||||
],
|
||||
"manager": false,
|
||||
"context": {
|
||||
"used": 9100,
|
||||
"window": 131072
|
||||
},
|
||||
"progress": {
|
||||
"phase": "running_tool",
|
||||
"since": 1767323045000,
|
||||
"tool": "read",
|
||||
"what": "src/parse.ts"
|
||||
},
|
||||
"findings": 2,
|
||||
"messages": 3
|
||||
}
|
||||
],
|
||||
"ended": [
|
||||
{
|
||||
"id": "s1",
|
||||
"name": "scout",
|
||||
"position": "maps the code",
|
||||
"parent": "lead",
|
||||
"state": "done",
|
||||
"model": "qwen-27b",
|
||||
"mode": "edit",
|
||||
"task": "Map it.",
|
||||
"request": [],
|
||||
"manager": false,
|
||||
"progress": null,
|
||||
"findings": 1,
|
||||
"messages": 1,
|
||||
"ended": 1767323045000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"id": "qwen",
|
||||
"name": "Qwen",
|
||||
"vision": false,
|
||||
"tools": true,
|
||||
"efforts": [
|
||||
"medium"
|
||||
],
|
||||
"thinking_switch": true,
|
||||
"levels": [
|
||||
"off",
|
||||
"medium"
|
||||
],
|
||||
"effort": "medium",
|
||||
"control": "switch",
|
||||
"parallel": 2,
|
||||
"context": 131072,
|
||||
"image": "/api/v2/models/images/0a1b2c3d4e5f.png",
|
||||
"default": true,
|
||||
"subagents": {
|
||||
"offered": true,
|
||||
"named_only": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "gpt-oss",
|
||||
"name": "gpt-oss",
|
||||
"vision": false,
|
||||
"tools": true,
|
||||
"efforts": [
|
||||
"low",
|
||||
"medium",
|
||||
"high"
|
||||
],
|
||||
"thinking_switch": false,
|
||||
"levels": [
|
||||
"low",
|
||||
"medium",
|
||||
"high"
|
||||
],
|
||||
"effort": "high",
|
||||
"control": "slider",
|
||||
"parallel": 1,
|
||||
"context": 0,
|
||||
"image": null,
|
||||
"default": false,
|
||||
"subagents": {
|
||||
"offered": true,
|
||||
"named_only": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "vision-small",
|
||||
"name": "Vision",
|
||||
"vision": true,
|
||||
"tools": false,
|
||||
"efforts": [],
|
||||
"thinking_switch": false,
|
||||
"levels": [
|
||||
"default"
|
||||
],
|
||||
"effort": "default",
|
||||
"control": "none",
|
||||
"parallel": null,
|
||||
"context": 8192,
|
||||
"image": null,
|
||||
"default": false,
|
||||
"subagents": {
|
||||
"offered": true,
|
||||
"named_only": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"subagents_cap": 32,
|
||||
"agent_subagents": {
|
||||
"offered": true,
|
||||
"device_runs": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "s2",
|
||||
"findings": [
|
||||
{
|
||||
"n": 1,
|
||||
"text": "Login is POST /session.",
|
||||
"time": 1767323045000
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "s2",
|
||||
"state": "working",
|
||||
"turns": [
|
||||
{
|
||||
"role": "user",
|
||||
"text": "Write the routes.",
|
||||
"machine": true
|
||||
},
|
||||
{
|
||||
"role": "assistant",
|
||||
"text": "Reading the API first.",
|
||||
"tools": [
|
||||
{
|
||||
"name": "read",
|
||||
"title": "src/api.py",
|
||||
"isError": false
|
||||
}
|
||||
],
|
||||
"error": "",
|
||||
"running": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"tree": {
|
||||
"min": 2,
|
||||
"max": 4,
|
||||
"size": 3,
|
||||
"open_slots": 0,
|
||||
"agents": [
|
||||
{
|
||||
"id": "lead",
|
||||
"name": "lead",
|
||||
"position": "the main agent",
|
||||
"parent": null,
|
||||
"state": "working",
|
||||
"model": "local/qwen",
|
||||
"mode": "auto",
|
||||
"request": [],
|
||||
"manager": true,
|
||||
"progress": {
|
||||
"phase": "waiting_for_subagents",
|
||||
"since": 1767323045000,
|
||||
"running": 2
|
||||
},
|
||||
"findings": 0,
|
||||
"messages": 1
|
||||
},
|
||||
{
|
||||
"id": "s1",
|
||||
"name": "area",
|
||||
"position": "owns the API",
|
||||
"parent": "lead",
|
||||
"state": "working",
|
||||
"model": "local/qwen",
|
||||
"mode": "auto",
|
||||
"request": [],
|
||||
"manager": true,
|
||||
"task": "Direct it.",
|
||||
"progress": null,
|
||||
"findings": 0,
|
||||
"messages": 1
|
||||
},
|
||||
{
|
||||
"id": "s2",
|
||||
"name": "routes",
|
||||
"position": "writes the routes",
|
||||
"parent": "area",
|
||||
"state": "working",
|
||||
"model": "local/qwen",
|
||||
"mode": "edit",
|
||||
"request": [
|
||||
"execute"
|
||||
],
|
||||
"manager": false,
|
||||
"task": "Write the routes.",
|
||||
"context": {
|
||||
"used": 9100,
|
||||
"window": 131072
|
||||
},
|
||||
"progress": {
|
||||
"phase": "running_tool",
|
||||
"since": 1767323045000,
|
||||
"tool": "read",
|
||||
"what": "src/api.py"
|
||||
},
|
||||
"findings": 1,
|
||||
"messages": 1
|
||||
}
|
||||
],
|
||||
"ended": [
|
||||
{
|
||||
"id": "s3",
|
||||
"name": "scout",
|
||||
"position": "maps the code",
|
||||
"parent": "lead",
|
||||
"state": "done",
|
||||
"model": "local/qwen",
|
||||
"mode": "auto",
|
||||
"request": [],
|
||||
"manager": false,
|
||||
"task": "Map it.",
|
||||
"progress": null,
|
||||
"findings": 0,
|
||||
"messages": 1,
|
||||
"ended": 1767323045000
|
||||
}
|
||||
]
|
||||
},
|
||||
"room": [
|
||||
{
|
||||
"n": 1,
|
||||
"from": "routes",
|
||||
"to": [
|
||||
"area"
|
||||
],
|
||||
"text": "Routes are in.",
|
||||
"report": false,
|
||||
"kind": "message",
|
||||
"time": 1767323045000
|
||||
},
|
||||
{
|
||||
"n": 2,
|
||||
"from": "scout",
|
||||
"to": [
|
||||
"lead"
|
||||
],
|
||||
"text": "Mapped: see map.md.",
|
||||
"report": true,
|
||||
"kind": "report",
|
||||
"time": 1767323045000
|
||||
}
|
||||
],
|
||||
"live": true
|
||||
}
|
||||
Reference in new issue
Block a user