Watch
0
0
Fork
You've already forked hyperhive
0

add a /clear-todos command that marks the agent's todos done

This commit is contained in:
damocles 2026-11-16 00:34:38 +01:00 • committed by mara
commit dc0d08b7fb
2 changed files with 200 additions and 43 deletions

View file

@ -30,9 +30,11 @@ updates the agent, from the moment the update stops its container until the
container is back up, so the stopped agent doesn't read as lost.
Type `/` in an agent's message box and a menu lists what that agent accepts:
the swarm's own commands (`/compact`) and the skills the agent's harness
published. Arrow keys move, Tab completes, Esc closes. Skills are per agent, so
two agents can offer different lists.
the swarm's own commands (`/compact`, `/clear-todos`) and the skills the
agent's harness published. Arrow keys move, Tab completes, Esc closes. Skills
are per agent, so two agents can offer different lists. `/clear-todos` marks all
of the agent's todos done without starting a turn, and the terminal shows how
many it cleared.
Each page, its controls and what they send are in
[the swarm UI reference](../../4-implementation/web-ui/swarm-ui.md).

View file

@ -284,10 +284,12 @@ publishes the list that claude reports in a turn's `system`/`init` event, with e
skill's `SKILL.md`. It writes when the first turn reports a list and again only when a later turn reports a
different one, and retries a failed write in the background. The value is a
list of `{name, description}`. `GET /api/agents/<name>/commands` answers with the swarm's own commands first (a
table in `agent_commands.rs`, today `compact`), then the agent's skills sorted by name. The skills come from the
table in `agent_commands.rs`, today `compact` and `clear-todos`), then the agent's skills sorted by name. The skills come from the
agent, so the controller drops a name that isn't one plain word, a repeat, and any that takes a command's name,
keeps at most 200, and cuts each description to one line of 200 characters. An agent that published nothing gets
just the swarm's commands.
just the swarm's commands. A command is plain operator input to the harness, which reads it: an input message whose
body is exactly `/clear-todos` marks every open todo done (an ack, like the agent's own `mark_todos_done`) and
writes a note with the count to the terminal, and starts no turn.
The fourth is its **`AGENTS.md`**, which goes into the `agents-md` bucket under
the key `<agent>`, writable by the agent's own credential alone