agentmux_srv\registry/
mod.rs

1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Shared, cross-version named-agent registry. File-per-agent JSON
5//! tree at `<shared_home>/agents/registry/`. See
6//! `docs/specs/SPEC_SHARED_AGENT_REGISTRY_2026_05_12.md`.
7//!
8//! PR A — Parallel-write only. The `Store` `instance_*` mutators
9//! call `Registry::{upsert,retire,unretire,hard_delete}` after their
10//! SQL execute() succeeds. Frontend RPCs still source rows from
11//! SQLite; the registry files are populated but not yet read.
12//!
13//! `MIN_SUPPORTED_SCHEMA`, `ValidationError`, `RegistryError`, and
14//! `Registry::list_active` are part of the registry's stable surface
15//! but are only consumed by tests + by PR B's read-path swap. The
16//! `allow(dead_code)` on the re-exports keeps that intent explicit.
17
18#![allow(dead_code, unused_imports)]
19
20mod atomic;
21mod def_migrate;
22mod def_schema;
23mod def_store;
24mod migrate;
25mod paths;
26mod schema;
27mod store;
28
29#[cfg(test)]
30mod tests;
31
32pub use migrate::{
33    backfill_source_bases_once, migrate_from_sqlite_once, MigrateStats, SourceBackfillStats,
34};
35pub use paths::{
36    resolve_shared_definitions_dir, resolve_shared_registry_dir, resolve_shared_transcripts_dir,
37};
38pub use def_migrate::{migrate_definitions_global_once, DefMigrateStats};
39pub use def_schema::{
40    DefContentBlob, DefSkillBlob, DefValidationError, DefinitionRecord, DefinitionRecordV1,
41    DEF_MAX_SUPPORTED_SCHEMA, DEF_MIN_SUPPORTED_SCHEMA,
42};
43pub use def_store::{DefStoreError, DefinitionStore};
44pub use schema::{
45    NamedAgentRecord, NamedAgentRecordV1, ValidationError, MAX_SUPPORTED_SCHEMA,
46    MIN_SUPPORTED_SCHEMA,
47};
48pub use store::{Registry, RegistryError};