Module registry

Module registry 

Source
Expand description

Shared, cross-version named-agent registry. File-per-agent JSON tree at <shared_home>/agents/registry/. See docs/specs/SPEC_SHARED_AGENT_REGISTRY_2026_05_12.md.

PR A — Parallel-write only. The WaveStore instance_* mutators call Registry::{upsert,retire,unretire,hard_delete} after their SQL execute() succeeds. Frontend RPCs still source rows from SQLite; the registry files are populated but not yet read.

MIN_SUPPORTED_SCHEMA, ValidationError, RegistryError, and Registry::list_active are part of the registry’s stable surface but are only consumed by tests + by PR B’s read-path swap. The allow(dead_code) on the re-exports keeps that intent explicit.

Re-exports§

pub use migrate::migrate_from_sqlite_once;
pub use migrate::MigrateStats;
pub use paths::resolve_shared_registry_dir;
pub use schema::NamedAgentRecord;
pub use schema::NamedAgentRecordV1;
pub use schema::ValidationError;
pub use schema::MAX_SUPPORTED_SCHEMA;
pub use schema::MIN_SUPPORTED_SCHEMA;
pub use store::Registry;
pub use store::RegistryError;

Modules§

atomic 🔒
Atomic file write + rename helpers. All registry mutations route through these so readers never observe a half-written file.
migrate 🔒
One-shot SQLite → file-registry migration. Runs at most once per <root>/.migrated_from_sqlite marker; idempotent and read-only on every SQLite it touches. See SPEC §8.
paths 🔒
Resolve the shared registry directory (<shared_home>/agents/registry/).
schema 🔒
Registry file format + per-row validation.
store 🔒
Registry — file-per-agent CRUD on <root>/<uuid>.json with a sibling retired/<uuid>.json tombstone tree.