//! Arguments for `mcptest migrate`.

use std::path::PathBuf;

use clap::Args;

/// Rewrite YAML suites toward the chosen MCP spec revision, applying
/// the  migration corpus actions.
///
/// v1 covers YAML annotation: every deprecated-feature hit gets a
/// `# TODO(mcptest-migrate)` line inserted above it pointing at the
/// replacement, and the mechanical `-32002` legacy error code rewrites
/// to `-32602`. Dry-run by default; pass `--write` to apply in place.
/// Cassettes are out of scope for v1; the v2 follow-up updates them
/// alongside the streamable-HTTP transport rerouting.
#[derive(Debug, Args, Default)]
pub struct MigrateArgs {
    /// Spec revision to migrate toward. v1 supports `2026-07-28` only;
    /// any other value is a clear error.
    #[arg(long, value_name = "VERSION", default_value = "2026-07-28")]
    pub to: String,

    /// Paths to migrate. Files are processed directly; directories are
    /// walked recursively for `*.yaml` and `*.yml` files. Defaults to
    /// the current directory.
    #[arg(value_name = "PATH")]
    pub paths: Vec<PathBuf>,

    /// Apply changes in place. Default is dry-run (print a unified diff
    /// of the proposed rewrites per file).
    #[arg(long)]
    pub write: bool,
}
