Skip to main content

vtcode_core/cli/args/
schema.rs

1use clap::{Subcommand, ValueEnum};
2
3/// Output format options for the `schema` command.
4#[derive(Copy, Clone, Debug, PartialEq, Eq, ValueEnum)]
5pub enum SchemaOutputFormat {
6    /// Emit one JSON document with all selected schemas.
7    Json,
8    /// Emit one JSON object per line.
9    Ndjson,
10}
11
12/// Documentation detail level for the `schema` command.
13#[derive(Copy, Clone, Debug, PartialEq, Eq, ValueEnum)]
14pub enum SchemaMode {
15    /// Minimal descriptions and compact parameter metadata.
16    Minimal,
17    /// Balanced descriptions for agent discovery.
18    Progressive,
19    /// Full descriptions and full parameter metadata.
20    Full,
21}
22
23/// Schema-focused subcommands.
24#[derive(Subcommand, Debug, Clone)]
25pub enum SchemaCommands {
26    /// List built-in VT Code tool schemas.
27    Tools {
28        /// Documentation detail level for tool descriptions.
29        #[arg(long, value_enum, default_value_t = SchemaMode::Progressive)]
30        mode: SchemaMode,
31        /// Output format for schema payloads.
32        #[arg(long, value_enum, default_value_t = SchemaOutputFormat::Json)]
33        format: SchemaOutputFormat,
34        /// Filter by tool name (repeatable).
35        #[arg(long = "name", value_name = "TOOL")]
36        names: Vec<String>,
37    },
38    /// Emit the VT Code ACP lifecycle extension wire contract
39    /// (`session/fork`, `session/rollback`, `session/compact`).
40    Acp,
41}