arcature-cli 2026.2.0

Developer lifecycle CLI for Arcature applications.
Documentation
//! Shared UAG inspection — pure extractors over the Unified Application
//! Graph consumed by both `arc inspect` (the human-facing CLI) and `arc mcp`
//! (the machine-facing JSON-RPC tools).
//!
//! This is the **single** implementation of the read-side projections over
//! the UAG (master Reservation #6): `arc inspect` and `arc mcp` must not
//! fork two parallel inspection implementations. Every function here takes
//! a borrowed [`Uag`] (already loaded via [`crate::metadata::load_uag`]) and
//! returns a borrowed or owned projection. None of them read the
//! filesystem, walk the source tree, or grep the project — the cardinal
//! rule (PROGRAM.md AP2.1-9): the UAG is the single source of truth.
//!
//! The projections are deliberately small, pure functions over `&Uag` so the
//! MCP tools can compose them into JSON-RPC responses without duplicating
//! the "find the route by name" / "summarize the app" logic.

mod route;
mod summary;

pub(crate) use route::find_routes_by_name;
// `summarize` is the live projection consumed by the `application_info` MCP
// tool and `arc inspect app`. `AppSummary` (the return type) is named only
// inside `summary.rs` and its tests, so it is not re-exported here — a
// smaller internal surface (AGENTS.md §22).
pub(crate) use summary::summarize;

#[cfg(test)]
pub(crate) mod tests {
    use arcature_build::uag::schema::ModuleEntry;

    /// A minimal named module entry with no bindings — shared fixture for the
    /// inspection projections' unit tests.
    pub(crate) fn empty_module(name: &str) -> ModuleEntry {
        ModuleEntry {
            name: name.to_owned(),
            imports: vec![],
            exports: vec![],
            controllers: vec![],
            services: vec![],
            policies: vec![],
            routes: vec![],
            listeners: vec![],
            jobs: vec![],
            commands: vec![],
            schedules: vec![],
        }
    }
}