Expand description
DefinitionStore — file-per-definition CRUD on <root>/<id>.json
with a sibling retired/<id>.json tombstone tree.
Sibling of store.rs (the named-instance Registry). Same on-disk
discipline: atomic rename for cross-process safety, a forward-compat
merge that preserves unknown fields, refuses schema downgrades, and
never clobbers an unparseable file. Holds the GLOBAL agent-definition
roster so any channel/version sees the same agents (P0.2 of
docs/specs/SPEC_CROSS_CHANNEL_AGENT_PERSISTENCE_2026-06-13.md).
The forward-compat merge helpers below intentionally parallel the
private ones in store.rs. They are kept separate (not shared) so
this addition is fully isolated from the in-production instance
registry; a later cleanup can extract a generic file-store both use.
Structs§
Enums§
Functions§
- merge_
for_ 🔒write - Merge an in-memory record into an on-disk file’s raw JSON, preserving
fields beyond this binary’s struct shape. Returns
Ok(None)(skip, leave file intact) on corrupt JSON, missingschema_version, orschema_versionaboveDEF_MAX_SUPPORTED_SCHEMA. Parallelsstore.rs::merge_for_write(see module docs). - merge_
known 🔒 - Overwrite
target‘s top-level keys withupdates’ keys, preserving keys absent fromupdates; recurses intodata. - read_
and_ 🔒validate - to_
pretty 🔒