Expand description
AgentMux’s own record of Global Memory (SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md §2.1.6, phase M4).
Global Memory lives in db_bundles (is_global = 1) in the channel’s
identity store: per channel on an isolated channel, shared/store.db
otherwise. This record, in the global transcript store, is what it can
later follow agents from — into a new isolated channel’s import step, and
to other machines (M5). db_bundles stays the cache every reader uses;
nothing here changes what an agent receives.
Zone global-memory:<scope>, <scope> being shared for channels that
share their identity store and channel:<id> for an isolated one — the
same boundary isolation draws today, so an isolated test channel’s edits
never reach the real record.
log.jsonl:entryevents (a version of an entry, by its stable id — the bundle id; a tombstone when it stops being Global Memory) andorderevents (the full id list).blob/<sha>:{name, instructions}per distinct version.heads.json: each entry’s head, and the current order.
Write-through. The store’s Global Memory write methods tell an
observer after each change (attach); the observer only queues the
change, and a worker thread reads the committed row and records it —
never blocking a write. The record only appends when content differs, so
several srv processes on one store record each change once. The source is
the latest db_bundle_versions row’s when that matches the content.
Older builds write db_bundles without it; each start compares every
entry with the record and records what differs as legacy-build (as
baseline the first time).
Structs§
- Body 🔒
- Entry
Head 🔒 - Entry
Version 🔒 - Heads 🔒
- Import
Entry 🔒 - Import
Report 🔒 - Import
Source 🔒 - Another scope whose record holds entries this channel lacks.
- Import
Sources 🔒 - Issued
Import 🔒 - Recorder 🔒
- Handle for queueing the start-up comparison once seeding is done.
Enums§
Constants§
Functions§
- attach 🔒
- Start recording
store’s Global Memory intofs: attach the observer and start the worker thread. - attribution 🔒
- Who wrote what an entry now holds: the latest version row, when it holds this content.
- heads 🔒
- import 🔒
- Bring source
indexof listlist_idinto this channel’s Global Memory: the entries it still lacks, each keeping its id, after the ones here. An entry already here is never overwritten; a name another entry here has is taken as<name> (<id short>). - import_
sources 🔒 - import_
sources_ 🔒in - The other scopes this channel could import Global Memory from, under a
new
list_id. Empty unless this channel is isolated. - issued_
imports 🔒 - line 🔒
- missing_
from 🔒 - The live, non-system entries of the record in
zonethatstoredoesn’t have as Global Memory, in that record’s order. - process 🔒
- read_
heads 🔒 - scope 🔒
- This channel’s Global Memory scope:
shared, orchannel:<id>when it is isolated. - sync_
all 🔒 - At start: record every entry and the order as the store has them —
baselinethe first time,legacy-buildfor what an older build (or a change the worker never reached) left different. Returns how many entries were recorded. - sync_
entry 🔒 - Record entry
idas the store now has it, if the record differs: a new version while it is Global Memory, a tombstone once it isn’t.sourceoverrides the attribution (the startup comparison). Returns whether anything was recorded. - sync_
order 🔒 - Record the Global Memory order if it differs from the record’s.
- zone 🔒