Watch
0
0
Fork
You've already forked hyperhive
0

the agent-icons docs name both writers, the controller and the harness

This commit is contained in:
iris 2026-11-16 22:24:34 +01:00 • committed by mara
commit 9a2b689959
2 changed files with 9 additions and 5 deletions

View file

@ -15,7 +15,7 @@ pub async fn open_or_create(
&js, &js,
swarm_wire::agent_icon::BUCKET, swarm_wire::agent_icon::BUCKET,
"agent-icon", "agent-icon",
"Current icon published by each agent".to_owned(), "Current icon of each agent".to_owned(),
) )
.await .await
} }

View file

@ -14,14 +14,18 @@
//! container is stopped: the value's lifetime is the agent's, not its //! container is stopped: the value's lifetime is the agent's, not its
//! placement's. //! placement's.
//! //!
//! **Each agent writes its own key** with its own queue credential. The auth //! **Two writers, one value.** The swarm controller writes the key from the
//! callout grants that credential `$KV.agent-icons.<agent>` and no other key. //! builder's reply when it builds the agent for a deploy: the builder reads the
//! icon from the agent's config, so this write needs no running agent. The
//! agent's harness writes the same key, from the same config, with its own
//! queue credential, which the auth callout grants `$KV.agent-icons.<agent>` and
//! no other key. On either side an icon that is not set deletes the key.
//! //!
//! The writer publishes to [`subject`] directly instead of opening the //! The harness publishes to [`subject`] directly instead of opening the
//! bucket, so that one subject is its whole grant. Creating the bucket is left //! bucket, so that one subject is its whole grant. Creating the bucket is left
//! to the reader (`swarm_queue_client::agent_icon::open_or_create`). A write //! to the reader (`swarm_queue_client::agent_icon::open_or_create`). A write
//! that arrives before the bucket exists is refused with "no stream", and the //! that arrives before the bucket exists is refused with "no stream", and the
//! writer retries. //! harness retries.
/// The KV bucket agent icons are published into, keyed by agent name. /// The KV bucket agent icons are published into, keyed by agent name.
/// ///