a hive-side pause holds against the swarm's declared state until an operator resumes
the harness writes the reason into the pause marker when it pauses itself and reports it as paused_by_hive in its turn-state header. swarm-controller declares such an agent paused (only if declared up) and shows the reason on the agents status row and the swarm ui card.
This commit is contained in:
parent
6470e2b109
commit
e5c55257f8
1 changed files with 517 additions and 26 deletions
|
|
@ -273,6 +273,17 @@ context budget and the last turn's context and cost token blocks,
|
|||
session and its turns wait for a login. The harness sets it from its own login
|
||||
state, so it reaches the swarm without going through the hive.
|
||||
|
||||
A header also carries `paused_by_hive` while the harness's own pause is in force:
|
||||
the reason it wrote into the pause marker when it paused its turn loop. A pause
|
||||
by an operator (`hivectl agent <name> pause`, the dashboard) leaves the marker
|
||||
empty and reports nothing here, and so does a harness that predates the field.
|
||||
The controller reacts by declaring the agent `paused`, but only when the swarm
|
||||
declares it `up` at that moment. Without that, the hive resumes any paused agent the
|
||||
swarm declares `up` on its next convergence. It acts once per pause: the entry
|
||||
stays until a header without the field arrives. Setting the agent `up` again
|
||||
resumes it, and the hive clears the marker. If the swarm is on a controller that
|
||||
predates the field, the hive's pause lasts until its next convergence, as before.
|
||||
|
||||
`agent_state` reuses the swarm's own wanted-state vocabulary
|
||||
(`up`/`offline`/`paused`/`destroyed`) so a reader can compare what an agent _is_
|
||||
against what the swarm declared it should be without translating between two
|
||||
|
|
@ -301,7 +312,8 @@ agent's latest `model`, `effort` and their sources for
|
|||
agent's latest `needs_login` for the `needs_login` field of
|
||||
`GET /api/agents/status`. That field is `null` until a header carrying the flag
|
||||
arrives, so for up to a minute after the controller starts, and for an agent
|
||||
whose harness doesn't send it.
|
||||
whose harness doesn't send it. The row's `paused_by_hive` comes from the same
|
||||
headers and is `null` in the same cases.
|
||||
|
||||
The third thing an agent publishes is its **icon**, the same SVG its own
|
||||
`GET /icon` serves. It goes into the `agent-icons` KV bucket under the key
|
||||
|
|
|
|||
Loading…
Reference in a new issue