Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-queue-client/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas e974194e3a swarm: let an agent publish its own icon
The auth callout grants an agent that presents its own queue credential
one more subject, `$KV.agent-icons.<agent>`: its own key in the
agent-icons bucket and no other. The hive's shared agent client is
granted none of the bucket, since every agent on a hive presents it.

hive-agent writes `/etc/hyperhive/icon.svg`, the file its `GET /icon`
serves, to that key once per start, as a JetStream publish straight to
the subject (what `kv::Store::put` sends, minus the bucket lookup), so
the one subject is the whole grant. No icon deletes the key. A failed
write, including one that arrives before the bucket exists, is retried
with backoff until acked. An agent connected with the hive's shared
client publishes nothing.

swarm-controller creates the bucket as soon as its queue connection is
up, instead of on the first icon read, so an agent's write does not
wait for someone to look.

Measured against a local nats-server with a user allowed publish on
`$KV.agent-icons.atlas` only: the write to its own key is stored and
readable, a write to `$KV.agent-icons.argus` is refused (the ack times
out), the DEL marker makes the key read as absent, and a write before
the bucket exists fails with "no responders".
2026-09-28 13:47:37 +02:00
..
agent_icon.rs swarm: let an agent publish its own icon 2026-09-28 13:47:37 +02:00
agent_status.rs refactor(#4006): one wanted-state bucket per hive, so a watch can be scoped 2026-09-02 21:53:56 +02:00
agent_token.rs swarm-queue-client: one agent-token spelling, and no hive in AgentCredential 2026-09-28 08:24:52 +02:00
lib.rs swarm: let an agent publish its own icon 2026-09-28 13:47:37 +02:00
notices.rs swarm-queue-client: drop notices::PREFIX, reuse STREAM 2026-08-24 14:34:37 +02:00
status.rs refactor(#4006): one wanted-state bucket per hive, so a watch can be scoped 2026-09-02 21:53:56 +02:00
wanted.rs remove as_str() legacy wrappers, callers use .into() directly 2026-09-12 00:06:31 +02:00