From 9a2b68995954d982df1d76b5cc1d8e92e9ea5f02 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 16 Nov 2026 22:24:34 +0100 Subject: [PATCH] the agent-icons docs name both writers, the controller and the harness --- swarm-queue-client/src/agent_icon.rs | 2 +- swarm-wire/src/agent_icon.rs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/swarm-queue-client/src/agent_icon.rs b/swarm-queue-client/src/agent_icon.rs index 98a65de81..bb17dde7c 100644 --- a/swarm-queue-client/src/agent_icon.rs +++ b/swarm-queue-client/src/agent_icon.rs @@ -15,7 +15,7 @@ pub async fn open_or_create( &js, swarm_wire::agent_icon::BUCKET, "agent-icon", - "Current icon published by each agent".to_owned(), + "Current icon of each agent".to_owned(), ) .await } diff --git a/swarm-wire/src/agent_icon.rs b/swarm-wire/src/agent_icon.rs index 2f1703f5b..200f740f2 100644 --- a/swarm-wire/src/agent_icon.rs +++ b/swarm-wire/src/agent_icon.rs @@ -14,14 +14,18 @@ //! container is stopped: the value's lifetime is the agent's, not its //! placement's. //! -//! **Each agent writes its own key** with its own queue credential. The auth -//! callout grants that credential `$KV.agent-icons.` and no other key. +//! **Two writers, one value.** The swarm controller writes the key from the +//! 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.` 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 //! 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 -//! writer retries. +//! harness retries. /// The KV bucket agent icons are published into, keyed by agent name. ///