//! Arguments for `mcptest workbench` (WOR-1429).

use std::path::PathBuf;

use clap::Args;

/// Gather saved artifacts (or a live capture) into a self-contained, local
/// HTML workbench: capability, trace, results, security, and evidence panes.
///
/// Everything is local: no account, no network, no telemetry. The page opens
/// from `file://`. A live capture needs explicit consent (`--allow-stdio`)
/// before mcptest launches the target command.
#[derive(Debug, Args)]
pub struct WorkbenchArgs {
    /// A tools/list-style JSON snapshot (tools, resources, prompts).
    #[arg(long, value_name = "FILE")]
    pub snapshot: Option<PathBuf>,

    /// A recorded cassette JSON (the JSON-RPC trace).
    #[arg(long, value_name = "FILE")]
    pub cassette: Option<PathBuf>,

    /// A run report JSON (`mcptest run --format json`).
    #[arg(long, value_name = "FILE")]
    pub report: Option<PathBuf>,

    /// A security report JSON (`mcptest security --format json`).
    #[arg(long, value_name = "FILE")]
    pub security: Option<PathBuf>,

    /// An evidence pack JSON (`mcptest evidence pack`).
    #[arg(long, value_name = "FILE")]
    pub evidence: Option<PathBuf>,

    /// Capture a live target by command instead of (or alongside) artifacts.
    /// Requires `--allow-stdio` consent before the command is launched.
    #[arg(long, value_name = "CMD", requires = "allow_stdio")]
    pub target: Option<String>,

    /// Explicit consent to launch the `--target` stdio command locally.
    #[arg(long)]
    pub allow_stdio: bool,

    /// Write the workbench HTML here.
    #[arg(long, value_name = "PATH", default_value = "workbench.html")]
    pub out: PathBuf,

    /// Overwrite the output if it already exists (off by default so a re-run
    /// cannot silently clobber a tracked or hand-edited file).
    #[arg(long)]
    pub force: bool,

    /// Open the generated workbench in the default browser.
    #[arg(long)]
    pub open: bool,
}
