Skip to main content

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 Store 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 unreadable::UnreadableRecord;
pub use migrate::backfill_source_bases_once;
pub use migrate::enumerate_objects_dbs;
pub use migrate::migrate_from_sqlite_once;
pub use migrate::MigrateStats;
pub use migrate::SourceBackfillStats;
pub use paths::resolve_identity_store_path;
pub use paths::resolve_isolated_work_store_path;
pub use paths::resolve_shared_definitions_dir;
pub use paths::resolve_shared_instances_dir;
pub use paths::resolve_shared_lan_instances_dir;
pub use paths::resolve_shared_reactive_dir;
pub use paths::resolve_shared_registry_dir;
pub use paths::resolve_shared_store_path;
pub use paths::resolve_shared_transcripts_dir;
pub use paths::resolve_global_shared_root;
pub use paths::shared_root_ignoring_deferral;
pub use complete_enumeration::enumerate_objects_dbs_complete;
pub use def_migrate::migrate_definitions_global_once;
pub use def_migrate::DefMigrateStats;
pub use def_schema::DefContentBlob;
pub use def_schema::DefSkillBlob;
pub use def_schema::DefValidationError;
pub use def_schema::DefinitionRecord;
pub use def_schema::DefinitionRecordV1;
pub use def_schema::FormerSlug;
pub use def_schema::AgentSeat;
pub use def_schema::Handover;
pub use def_schema::DEF_MAX_SUPPORTED_SCHEMA;
pub use def_schema::DEF_MIN_SUPPORTED_SCHEMA;
pub use def_slug_index::SlugEntry;
pub use def_store::record_bytes;
pub use def_store::DefStoreError;
pub use def_store::DefinitionStore;
pub use def_store::LockedRecord;
pub use def_store::SlugAllocationLock;
pub use leases::ClaimantInfo;
pub use leases::Lease;
pub use leases::LeaseError;
pub use leases::LeaseHolder;
pub use leases::LeaseStore;
pub use leases::LEASE_TTL_MS;
pub use leases::RENEW_INTERVAL_MS;
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::RecordScope;
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.
complete_enumeration
Listing every channel’s objects.db, or saying the list is partial.
def_migrate
Global migration: backfill user-agent DEFINITIONS (with their content + skills) from every channel’s per-version objects.db — and every dev/ branch DB — into the GLOBAL definition store, so EXISTING agents become cross-channel without waiting for the next edit. Read-only on every scanned SQLite.
def_record_lock
A cross-process lock per shared definition record (docs/specs/SPEC_FORK_SLUG_MIGRATION_2026_10_22.md P0.2).
def_schema
Global agent-definition registry file format + per-row validation.
def_slug_index
A cached index of every shared definition’s slug and former slugs, for the slug-to-uid reads that run on every message (docs/specs/SPEC_FORK_SLUG_MIGRATION_2026_10_22.md P0.1).
def_store
DefinitionStore — file-per-definition CRUD on <root>/<id>.json with a sibling retired/<id>.json tombstone tree.
leases
Cross-process session-ownership leases — at most one live process may drive turns for a given agent instance_id at a time.
migrate
One-shot SQLite → file-registry migration for named instances.
paths
Resolve the shared registry directory (<shared_home>/agents/registry/).
schema
Registry file format + per-row validation.
shared_guard
Two AgentMux installs of different versions must not write the shared stores together.
store
Registry — file-per-agent CRUD on <root>/<uuid>.json with a sibling retired/<uuid>.json tombstone tree.
unreadable
Records this build cannot fully read, said instead of skipped.
work_store
Whether a build keeps its own work store: the Kanban queue and what hangs off it (cards, events, Presence claims, coordination posts, the Jobs run ledger, scheduled jobs).