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, collect_command_ids, duplicate_command_ids, render_introspect_document,
15};
16pub use document::*;
17pub use registry::{CommandMeta, CommandRegistry};
18
19/// Stable schema id for the introspect document.
20pub const INTROSPECT_SCHEMA_ID: &str = "foundry:introspect@v1";
21
22/// Schema version for the introspect document.
23pub const INTROSPECT_SCHEMA_VERSION: u32 = 1;