feat(#2017): add hivectl agents list verb showing agent status + technical state

This commit is contained in:
damocles 2026-06-26 22:12:50 +02:00 committed by mara
commit 70d1cdc859
5 changed files with 186 additions and 0 deletions

View file

@ -99,10 +99,21 @@ Container lifecycle shortcuts that go through the host admin socket.
Requires the `hive-c0re` daemon to be running.
```bash
hivectl agents list # roster: every agent's status + technical state
hivectl agents list --json # same data as raw JSON rows (for scripting)
hivectl agents restart iris # stop + start the `iris` container (no rebuild)
hivectl agents restart-all # stop + start every managed agent container in sequence
```
`list` prints a padded table with one row per managed agent —
`NAME STATUS REV PARENT REMIND`. STATUS collapses the health flags
(`running` / `stopped`, plus ` needs-login` / ` needs-update` when set);
REV is the first 12 chars of the agent's locked config sha; PARENT is its
place in the topology tree (`-` for a root agent); REMIND is the count of
pending reminders. It reuses the same per-agent aggregation the dashboard
renders, so the CLI roster and the web UI never drift. `--json` emits the
raw rows instead of the table.
`restart` is the manual equivalent of the MCP `restart` tool — useful
when you need to kick a container from the host without going through
the agent hierarchy. Failures on `restart-all` are collected and