swarmctl: agent watch follows an agent's terminal rows
Reads GET /api/agents/{name}/term/stream over the controller socket or the
gateway and prints one line per row. The gateway path uses a client without
the total-request timeout so the stream isn't cut after 30 seconds.
Closes #6160
This commit is contained in:
parent
aa227a95c1
commit
9e0c51052b
1 changed files with 482 additions and 7 deletions
|
|
@ -146,6 +146,20 @@ the swarm UI's state menu uses. The values are `swarm_wire::wanted::AgentState`'
|
|||
refuses an agent the swarm hasn't declared on that hive. `destroyed` can't be
|
||||
undone, so it needs `--yes`.
|
||||
|
||||
## `agent watch`
|
||||
|
||||
```console
|
||||
# swarmctl agent watch ruth
|
||||
watching ruth — Ctrl-C to stop
|
||||
🔧 Bash ls
|
||||
```
|
||||
|
||||
`GET /api/agents/{name}/term/stream` on the swarm-controller: the agent's
|
||||
newest retained terminal rows, then each new one, as `<icon> <summary>` lines.
|
||||
It ends on Ctrl-C or when the stream closes. Over `--swarm` the body is read
|
||||
as it arrives, with no total-request timeout. The header-state stream
|
||||
(`/state/stream`) isn't read.
|
||||
|
||||
## `forge make-admin`
|
||||
|
||||
```console
|
||||
|
|
|
|||
Loading…
Reference in a new issue