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 `WaveStore` `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 migrate;
22mod paths;
23mod schema;
24mod store;
25
26#[cfg(test)]
27mod tests;
28
29pub use migrate::{migrate_from_sqlite_once, MigrateStats};
30pub use paths::resolve_shared_registry_dir;
31pub use schema::{
32    NamedAgentRecord, NamedAgentRecordV1, ValidationError, MAX_SUPPORTED_SCHEMA,
33    MIN_SUPPORTED_SCHEMA,
34};
35pub use store::{Registry, RegistryError};