Skip to main content

Module sqlite_store

Module sqlite_store 

Source
Expand description

Bundled per-realm SQLite agent-memory store (§7.3).

One database per realm at <root>/<pct-encoded-realm>.sqlite3 — the same directory and encoding scheme the markdown store uses (deliberately NOT <persistent_state>/memory/, which belongs to meerkat’s session semantic memory). WAL journaling, busy-timeout, plain B-tree lookups only: the bright-line ratchet (§12) forbids retrieval-index machinery here, and recall quality is the LLM Selector’s job, not the store’s.

Every write path — including remember/forget and the markdown import — flows through the staged-batch validator and a single-transaction apply with one audit row per op (§8.5 crash semantics).

Structs§

DreamRunAudit
One steward dream run reconstructed from its audit rows (every committed op records its Steward { run_id } author in the audit detail).
PanelRecordsPage
One page of panel records: strictly-descending (updated_at_ms, memory_id) keyset pagination.
PendingHarvest
One retired identity awaiting an exit-interview harvest (§8.5).
PendingPromotion
One gated quarantine-promotion (§10.2): the staged batch commits only on gating approval.
PendingProposal
One pending (or held) mob/operator-scope proposal awaiting a dream verdict (§8.5 promotion).
ScopeOverview
Per-scope store overview row for the dream’s orient phase (§8.5) and the P3b console Memory panel.
SqliteAgentMemoryStore
Bundled SQLite store. Cheap to clone; connections are cached per realm and shared across clones.

Constants§

DEFAULT_SCOPE_FLOOR_BYTES
DEFAULT_SCOPE_FLOOR_RECORDS
Per-scope retention floors (§7.3): exceeded floors WARN the steward via tracing; deterministic code never evicts.

Traits§

EvidenceRefResolver
§10.2 P3: whether an [EvidenceRef] resolves against the persistent session store (session exists; a cited range lies within the persisted transcript). The semantic endorsement half of an agent_verified retier is the dream’s judgment (recorded in the op rationale); this is the mechanical half.