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

@ -315,6 +315,22 @@ a `nix eval` in its sandbox, and an eval has three outcomes:
and hive-priv keeps what the container's last write chose, as it does for an
agent with no record.
The built reply carries a third option, the agent's icon
(`services.hyperhive.agent.icon`), but the controller doesn't keep it in the
closure record. The same `nix eval` reads the SVG file the option names (the eval
applies `builtins.readFile`, so the builder needs no store path), and the reply's
`icon` is one of:
- `set` with the SVG's text, for an option that names a file of at most 256 KiB;
- `unset`, for a null option or a module that doesn't declare it;
- left out, for a failed eval, a timeout, an empty file or an oversize one.
The controller writes the key `<agent>` of the `agent-icons` KV bucket from a
`set`, deletes it on `unset` and leaves it on a missing field. A write that
fails is logged and doesn't fail the build or the deploy. So an agent's icon
changes when its config is built and deployed, not when its container restarts,
and an agent that has never run has one as soon as its first build succeeds.
Mixed versions:
| builder | controller and hive-c0re | what happens |