use clap::Subcommand;

use crate::commands;

#[derive(Subcommand)]
pub enum DevCommands {
    /// Check API health
    Health,
    /// Direct API access (like gh api — works with any endpoint)
    Api(commands::api::ApiArgs),
    /// Execute one request from a JSON envelope file (defaults to stdin)
    Exec(commands::exec::ExecArgs),
    /// Emit machine-readable schema for CLI commands/args
    Schema {
        /// Optional command path, e.g. `dev api` or `record_activity`
        #[arg(value_name = "COMMAND", num_args = 0..)]
        path: Vec<String>,
    },
    /// Event operations (create, list, batch)
    Event {
        #[command(subcommand)]
        command: commands::event::EventCommands,
    },
    /// Projection operations (get, list)
    Projection {
        #[command(subcommand)]
        command: commands::projection::ProjectionCommands,
    },
    /// Agent diagnostics, context, evidence, preferences, and visualization surfaces
    Agent {
        #[command(subcommand)]
        command: commands::agent::AgentCommands,
    },
    /// Observation workflows (draft visibility + promotion)
    Observation {
        #[command(subcommand)]
        command: commands::observation::ObservationCommands,
    },
    /// MCP server operations (Model Context Protocol over stdio)
    Mcp {
        #[command(subcommand)]
        command: commands::mcp::McpCommands,
    },
    /// External import job operations
    Import {
        #[command(subcommand)]
        command: commands::imports::ImportCommands,
    },
    /// Provider connection operations
    Provider {
        #[command(subcommand)]
        command: commands::provider::ProviderCommands,
    },
    /// Offline replay evaluation wrappers (worker-backed)
    Eval {
        #[command(subcommand)]
        command: commands::eval::EvalCommands,
    },
    /// Get all projections in one call (agent bootstrap snapshot)
    Snapshot,
    /// Get system configuration (dimensions, conventions, event types)
    Config,
    /// Diagnose setup: API, auth, worker, system config
    Doctor,
}
