Skip to main content

foundry_cli/introspect/
mod.rs

1//! Machine-readable introspection for Foundry CLIs.
2//!
3//! This module implements the `--introspect` flag described in
4//! [`docs/agents/spec.md`](../../../../docs/agents/spec.md). It walks a
5//! `clap::Command` tree, merges in metadata from a per-binary
6//! [`CommandRegistry`], and emits an [`IntrospectDocument`] suitable for
7//! agent consumption.
8
9mod build;
10mod document;
11mod registry;
12
13pub use build::{
14    build_document, capability_violations, collect_command_ids, duplicate_command_ids,
15    render_introspect_document,
16};
17pub use document::*;
18pub use registry::{CommandMeta, CommandRegistry, RegistryEntry};
19
20/// Stable schema id for the introspect document.
21pub const INTROSPECT_SCHEMA_ID: &str = "foundry:introspect@v1";
22
23/// Schema version for the introspect document.
24pub const INTROSPECT_SCHEMA_VERSION: u32 = 1;