capo-agent 0.6.0

Coding-agent library built on motosan-agent-loop. Composable, embeddable.
Documentation
//! Settings overrides supplied by the binary's CLI parser.
//!
//! Lives in `capo-agent` (not `capo`) so the lib doesn't pull `clap`.
//! The binary constructs this struct manually from its `Cli` after
//! `clap::Parser::parse()`; capo-agent never imports clap.

#[derive(Debug, Default, Clone)]
pub struct CliOverrides {
    /// `--model <NAME>` — overrides `Settings::model.name`.
    pub model: Option<String>,
}

impl CliOverrides {
    /// Returns true when no overrides are set; loader can skip the cli layer.
    pub fn is_empty(&self) -> bool {
        self.model.is_none()
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn empty_when_no_fields_set() {
        assert!(CliOverrides::default().is_empty());
    }

    #[test]
    fn not_empty_when_model_present() {
        let o = CliOverrides {
            model: Some("claude-opus-4-7".into()),
        };
        assert!(!o.is_empty());
    }
}