Watch
0
0
Fork
You've already forked hyperhive
0

gate each deploy on a swarm build of the agent from internal/meta

This commit is contained in:
atlas 2026-10-26 16:40:06 +01:00
commit 5e64048e53

View file

@ -0,0 +1,19 @@
//! The connection side of the per-agent closure KV bucket. The bucket's names
//! and stored type are `swarm_wire::agent_closures`.
/// Open the closures bucket for writing, creating it if nothing has yet.
///
/// **Controller-side only.** `history: 1`: a reader wants the latest build.
#[cfg(feature = "kv")]
pub async fn open_or_create(
client: &async_nats::Client,
) -> Result<async_nats::jetstream::kv::Store, crate::Error> {
let js = async_nats::jetstream::new(client.clone());
crate::kv::open_or_create(
&js,
swarm_wire::agent_closures::BUCKET,
"agent-closures",
"The latest system closure the swarm builder built for each agent".to_owned(),
)
.await
}