//! The connection side of the subagent status KV bucket: opening it. The //! bucket's name, keys and value are `swarm_wire::subagent_status`. /// Open the subagent status bucket, creating it if nothing has yet. /// /// `history: 1`: a reader wants each subagent's current state, not every /// state it has ever been in. #[cfg(feature = "kv")] pub async fn open_or_create( client: &async_nats::Client, ) -> Result { let js = async_nats::jetstream::new(client.clone()); crate::kv::open_or_create( &js, swarm_wire::subagent_status::BUCKET, "subagent-status", "Whether each subagent is running, as its daemon last published".to_owned(), ) .await }