swarm: list an agent's bash tasks from their published status
GET /api/agents/{name}/bash-tasks reads the agent's keys of the bash-task-status
bucket and reports each task's state, command and times, with a live task whose
daemon stopped reporting as stale. The swarm UI shows them in a background tasks
section of the agent card, running ones first. The task output stays unread.
This commit is contained in:
parent
cc7b298cf3
commit
5de20f31dd
1 changed files with 625 additions and 11 deletions
|
|
@ -595,6 +595,20 @@ store identity, or no queue address, publishes no subagent terminals.
|
|||
|
||||
</details>
|
||||
|
||||
<details><summary>Where the background task list comes from</summary>
|
||||
|
||||
An opened agent card has a **background tasks** section, below the subagents, listing the
|
||||
tasks the agent started through the bash MCP. Its bash MCP publishes one status per task
|
||||
to the `bash-task-status` bucket, and swarm-controller serves the list as
|
||||
`GET /api/agents/<name>/bash-tasks`: each task's id, command, state, the time the agent queued it and
|
||||
the time it entered its state, and the exit status. The state is the published
|
||||
one, or `stale` for a live task whose daemon stopped reporting. The section lists the running
|
||||
tasks first, then the rest, each newest first. Before the age it says `started`,
|
||||
`finished`, `exited N`, `timed out`, `killed` or `stopped reporting`. It refetches
|
||||
every ten seconds and shows no output, which is a separate stream.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Where an agent's terminal history comes from</summary>
|
||||
|
||||
The harness publishes the agent's terminal rows on `$SWARM.term.<agent>`, into
|
||||
|
|
|
|||
Loading…
Reference in a new issue