Expand description
Multi-mem routing, visibility filtering, mem config.
Writable/visible mem tracking. The engine loads multiple mems; some may be read-only (from –read-mem paths or JSON imports).
The router is structured as a snapshot (MemRouterSnapshot) —
a Clone-able value that the engine holds behind an Arc. Lifecycle
operations mutate by cloning the snapshot, editing the clone, and
swapping the Arc pointer on Engine. Readers that hold an Arc
before the swap observe the pre-swap snapshot for their lifetime; no
torn reads are possible. The MCP-level memstead_mem_create /
memstead_mem_delete tools flip state at runtime.
Structs§
- MemRouter
Snapshot - Mem configuration for the engine runtime — cloneable snapshot.
- Writable
Entry - Per-writable-mem origin + directory payload held inside
MemRouterSnapshot. Cloned along with the snapshot on every lifecycle mutation; clone cost is O(1).
Enums§
- MemOrigin
- Provenance record attached to every writable-mem registration.
Constants§
- MEM_
META_ DIR - The per-mem engine-internal directory under a folder mem’s
root —
<mem_root>/.memstead/holdsconfig.jsonandchanges.jsonl. Defined here (rather than inmemstead-base) because mem-config loading lives in this crate andmemstead-basedepends on it;memstead-basere-exports the constant for downstream consumers. Distinct from the workspace store directory (memstead_base::WORKSPACE_STORE_DIR) and from the in-zip member paths inside sealed archives (ARCHIVE_META_DIR), which are a separate on-disk format and never use this constant.
Functions§
- is_
visible - Convenience: check if an entity is visible. Returns true if router is None (no filtering).
- is_
writable - Convenience: check if a mem is writable. Returns true if router is None.