Live agent todo list: compact scrollable strip above the composer
Add a todo.update frame (server->app) carrying the agent's full current todo list. The gateway emits it whenever the hermes todo tool completes (the tool result is authoritative even for merge writes) and re-sends a snapshot right after hello so a reconnecting device re-learns the plan. Ephemeral: never outboxed. The app renders it as a compact strip above the composer (max 3 lines, the rest scrollable) mirroring the hermes desktop composer status stack: pending = hollow ring, in_progress = spinner, completed = green check, cancelled = struck through. It auto-scrolls to the current task whenever the active task changes, and hides itself once the list is empty or fully resolved.
This commit is contained in:
1 parent
1ff2ef380c
commit
742916903b
10 files changed
+447
-3
No files matched your search
@@ -140,6 +140,31 @@ short tail (full output is not streamed — it lives in agent history).
|
||||
`emoji` — e.g. `read_file` 📖, `write_file` ✍️, `terminal` 💻). Omitted when
|
||||
the tool is unknown, so the app falls back to its own default glyph.
|
||||
|
||||
### `todo.update`
|
||||
|
||||
The agent's **full current todo list** for a chat/thread lane (last-write-wins).
|
||||
Emitted whenever the `todo` tool completes — the tool *result* is the
|
||||
authoritative list, which also covers `merge` writes (whose args carry only
|
||||
the changed items) and read-only calls — and, as a **snapshot**, right after
|
||||
`hello` when a device opens its event stream.
|
||||
|
||||
```json
|
||||
{"type":"todo.update","chat_id":"default","thread_id":null,"payload":{
|
||||
"todos":[
|
||||
{"id":"1","content":"Scaffold the module","status":"completed"},
|
||||
{"id":"2","content":"Wire the store","status":"in_progress"},
|
||||
{"id":"3","content":"Add tests","status":"pending"}
|
||||
]}}
|
||||
```
|
||||
|
||||
`status` is one of `pending | in_progress | completed | cancelled`. The frame
|
||||
is **ephemeral**: it is never outboxed, so a reconnecting device learns the
|
||||
current list from the snapshot (not a replay), and a gateway restart drops it
|
||||
(the agent re-emits on the next `todo` call). The app renders it as a compact
|
||||
scrollable strip above the composer (max 3 lines; auto-scrolls to the item
|
||||
whose status just changed) and hides it once the list is empty or fully
|
||||
resolved.
|
||||
|
||||
### `typing` / `typing.stop`
|
||||
|
||||
```json
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"tool.start": { "description": "Cosmetic per-tool emoji (resolved server-side via hermes' get_tool_emoji: active-skin overrides, then the tool registry's per-tool emoji); omitted when the tool is unknown so the app falls back to its own default glyph.", "payload": { "index": { "type": "integer" }, "name": { "type": "string" }, "preview": { "type": "string" }, "args": { "type": "object" }, "emoji": { "type": "string" } } },
|
||||
"tool.progress": { "payload": { "index": { "type": "integer" }, "name": { "type": "string" }, "note": { "type": "string" } } },
|
||||
"tool.end": { "payload": { "index": { "type": "integer" }, "name": { "type": "string" }, "ok": { "type": "boolean" }, "duration": { "type": "number" }, "output_preview": { "type": "string" } } },
|
||||
"todo.update": { "description": "The agent's FULL current todo list for a chat/thread lane (last-write-wins). Emitted whenever the `todo` tool completes (the tool result is authoritative even for merge writes, whose args carry only the changed items) and, as a snapshot, right after hello when a device opens its event stream. Ephemeral: never outboxed, so a reconnecting device learns the list from the snapshot, not a replay. The app renders it as a compact scrollable strip above the composer.", "payload": { "todos": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "content": { "type": "string" }, "status": { "type": "string", "enum": ["pending", "in_progress", "completed", "cancelled"] } } } } } },
|
||||
"typing": { "payload": { "on": { "type": "boolean" } } },
|
||||
"notification": { "payload": { "kind": { "type": "string", "enum": ["channel_renamed", "channel_created", "channel_deleted", "cron", "approval", "clarify", "generic"] }, "title": { "type": "string" }, "body": { "type": "string" }, "ts": { "type": "integer" } } },
|
||||
"channel.list": { "description": "Full channel directory (response to a channel.list request).", "payload": { "channels": { "type": "array", "items": { "$ref": "#/definitions/channel" } } } },
|
||||
|
||||
Reference in new issue
Block a user