use std::path::PathBuf;
use clap::{Args, Subcommand};
#[derive(Debug, Subcommand)]
pub enum McpCommand {
Accept(McpAcceptArgs),
Proxy(McpProxyArgs),
Wrap(McpWrapArgs),
Unwrap(McpUnwrapArgs),
}
#[derive(Debug, Args)]
pub struct McpAcceptArgs {
pub server: Option<String>,
}
#[derive(Debug, Args)]
pub struct McpProxyArgs {
#[arg(long)]
pub server: String,
#[arg(long)]
pub sandbox: bool,
#[arg(long = "write", value_name = "PATH", requires = "sandbox")]
pub writes: Vec<PathBuf>,
#[arg(required = true, last = true, value_name = "COMMAND")]
pub command: Vec<std::ffi::OsString>,
}
#[derive(Debug, Args)]
pub struct McpWrapArgs {
pub servers: Vec<String>,
#[arg(long)]
pub sandbox: bool,
#[arg(long, conflicts_with = "sandbox")]
pub no_sandbox: bool,
#[arg(long)]
pub dry_run: bool,
}
impl McpWrapArgs {
pub fn sandbox_choice(&self) -> Option<bool> {
match (self.sandbox, self.no_sandbox) {
(true, _) => Some(true),
(_, true) => Some(false),
_ => None,
}
}
}
#[derive(Debug, Args)]
pub struct McpUnwrapArgs {
pub servers: Vec<String>,
}