Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller: state route refuses an agent the swarm has not declared on that hive

A placing state is accepted only for an agent declared or queued on the hive; anything else gets 404 telling the caller to create it at swarm level. swarm-ui's wanted badge no longer offers a first declaration for an undeclared row.
This commit is contained in:
atlas 2026-10-25 15:58:24 +01:00
commit 716290e4d2
3 changed files with 131 additions and 40 deletions

View file

@ -33,6 +33,14 @@ Pages that refresh on a timer share one polling rule: the page sends no new
request while the last one is still running, so an older answer never overtakes
a slow one, and a failed refresh keeps the rows already on screen under an
error.
The **wanted** badge changes the state of an agent the swarm has declared. For an
agent the swarm never declared on its hive, such as one only its hive knows
about, the badge reads **no declaration** and does not open: create the agent
with `swarmctl agent create` or **+ agent**, which declares it `paused`. The API
answers `PUT /api/hives/{hive}/agents/{agent}/state` for such an agent with
404 and says to create it at swarm level.
An agent created here or with `swarmctl agent create` starts `paused`; set it
`up` from its card. A card shows **login needed** when the agent's own
turn-state header says its claude has no session, and a **log in** button