Skip to main content

Module global_store

Module global_store 

Source
Expand description

Cross-channel transcript singleton + block-meta zone resolution.

Statics§

GLOBAL_TRANSCRIPT_STORE 🔒
Process-global handle to the GLOBAL transcript FileStore (the one rooted at <shared>/agents/transcripts, opened once in main.rs). Backs the agent:<defId>:current zone so a conversation loads when the agent is opened from any build/channel — finishing the cross-channel arc (#1387–#1396). None until set_global_transcript_store runs (or never, in unit tests / when the shared root can’t be resolved), in which case the hot-path mirror is a no-op and reads fall back to the per-channel store.

Functions§

agent_zone_for_block_meta
Resolve the agent’s GLOBAL agent:<defId>:current zone from a block’s meta.
global_transcript_store
Borrow the global transcript store, if installed.
set_global_transcript_store
Install the global transcript store. Called once at startup from bootstrap/stores.rs. Idempotent — a second call is ignored (the first store wins).