Watch
0
0
Fork
You've already forked hyperhive
0

the builder reads an agent's icon from its config and the controller writes the swarm's copy

This commit is contained in:
iris 2026-11-16 22:21:21 +01:00 • committed by mara
commit 181ef5f421

View file

@ -266,13 +266,15 @@ arrives, so for up to a minute after the controller starts, and for an agent
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
The third thing a hive's agent has is its **icon**, the same SVG its own
`GET /icon` serves. It's in the `agent-icons` KV bucket under the key
`<agent>`, with no hive in it, so the swarm can show the icon of an agent that's
stopped or has moved hives. The queue grants the agent's own credential
`$KV.agent-icons.<agent>` and no other key of that bucket. The harness writes
once per start, because a config change reaches an agent by restarting its
container. An agent with no icon deletes its key. Swarm-side,
stopped or has moved hives. The [builder](builder.md) reads it from the agent's
evaluated config when it builds the agent for a deploy, and the controller writes
the key from the reply: an agent with no icon has its key deleted. The harness
still publishes the same file once per start, with its own credential's grant of
`$KV.agent-icons.<agent>`; the controller's write is the one that matters, since it
doesn't need the agent running. Swarm-side,
`GET /api/agents/<name>/icon` serves
the stored bytes, and 404 means the agent has no icon. swarm-ui's agent cards
load it as an `<img>` and show the dimmed default agent icon (a robot head in a