//! Server subcommand - run the makima server.

use clap::Args;

/// Run the makima server.
#[derive(Args, Debug)]
pub struct ServerArgs {
    /// Server port
    #[arg(long, env = "PORT", default_value = "8080")]
    pub port: u16,

    /// Path to parakeet model directory
    #[arg(
        long,
        env = "PARAKEET_MODEL_DIR",
        default_value = "models/parakeet-tdt-0.6b-v3"
    )]
    pub parakeet_model_dir: String,

    /// Path to parakeet EOU model directory
    #[arg(
        long,
        env = "PARAKEET_EOU_DIR",
        default_value = "models/realtime_eou_120m-v1-onnx"
    )]
    pub parakeet_eou_dir: String,

    /// Path to sortformer model
    #[arg(
        long,
        env = "SORTFORMER_MODEL_PATH",
        default_value = "models/diarization/diar_streaming_sortformer_4spk-v2.1.onnx"
    )]
    pub sortformer_model_path: String,

    /// PostgreSQL connection URI
    #[arg(long, env = "POSTGRES_CONNECTION_URI")]
    pub database_url: Option<String>,

    /// Log level (trace, debug, info, warn, error)
    #[arg(short, long, default_value = "info")]
    pub log_level: String,
}
