Skip to main content

Module agent_bundle_sidecar

Module agent_bundle_sidecar 

Source
Expand description

Which bundle is an agent’s own bundle (its ABF bundle), across channels (SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md §2.1.6, phase M4).

db_agents.default_memory_id lives in each channel’s object store, so migration m0021 minted a new bundle for an agent in every channel it ran in — “Name — ABF”, “Name — ABF (2)”, … in the one shared store. The id belongs with the agent, but not in DefinitionRecordV1: that would need a schema bump older builds reject. So it goes in a sidecar zone in the global store, agent-uid:<uid>:bundle, holding {memory_id}: the first channel to provision the agent records it, and m0021 reads it before minting.

Structs§

Sidecar 🔒

Constants§

FILE 🔒

Functions§

claim 🔒
Record memory_id as the agent’s bundle unless one is recorded already. Returns the id now recorded — the caller’s, or the one another channel recorded first.
claim_unless_live 🔒
claim, but a recorded bundle is_live says doesn’t exist (for the caller) is replaced by memory_id. A channel whose bundles live in a store others can’t see (an isolated dev channel) could record an id first; with plain first-wins every other channel then failed to find it, minted its own bundle, lost the claim to the invisible one, and couldn’t bind its own — 17 orphaned bundles per fresh channel on one host (AgentA had 11).
get 🔒
The agent’s recorded bundle id, if any.
open_global 🔒
The global store, opened directly — for migrations, which run before srv attaches it. None when it can’t be resolved or opened.
record 🔒
Record a freshly provisioned bundle at runtime, best-effort (the global store may be off).
zone 🔒