docs: the swarm UI reference on /clear and the new-session route
This commit is contained in:
parent
750535db8a
commit
503a56853a
1 changed files with 12 additions and 1 deletions
|
|
@ -108,7 +108,9 @@ An opened card has six sections, and each reads nothing until you open it.
|
|||
link), and its open config PR.
|
||||
- **terminal**: the live terminal with its message box. Typing `/` opens a menu
|
||||
filled from `GET /api/agents/<name>/commands`, which lists the swarm's own
|
||||
commands and the skills the agent published.
|
||||
commands and the skills the agent published. Sending exactly `/clear` isn't a
|
||||
message: the box POSTs `/api/agents/<name>/new-session` instead of `/input` (see
|
||||
the command paragraph below).
|
||||
- **open todos**: the agent's open todos from `GET /api/agents/<name>/todos`, newest first, each with
|
||||
its subsystem, one line of text and how long ago it changed. Read only; refetched every ten seconds.
|
||||
- **subagents**: the agent's subagents and their terminal preview (next section).
|
||||
|
|
@ -561,6 +563,15 @@ Unlike input, the harness answers a command, so swarm-controller returns that
|
|||
answer as 200, 503 for no subscriber, and 504 when the harness held the command
|
||||
and didn't answer within ten seconds. A 504 means unknown, not cancelled.
|
||||
|
||||
`POST /api/agents/<name>/new-session` is the second command, sent for `/clear` in
|
||||
the message box. It sends `"new_session"` on the same subject, and the harness
|
||||
queues the session reset its own page's button queues, which takes effect at the
|
||||
agent's next turn; it always answers `{acted: true}`. The statuses are the cancel
|
||||
route's, and a 504 means it's unknown whether the command took effect. The box
|
||||
sends a command only when the served command list has `/clear` as a swarm
|
||||
command: while the list hasn't loaded, or its request fails, `/clear` goes out
|
||||
as a plain message.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Where the subagent list and rows come from</summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue