//! # klawd-code
//!
//! High-performance, model-agnostic AI terminal harness.
//! Core library powering the Aegis Safety Engine.

/// Placeholder for v0.1.0 registry claim.
///
/// Returns the engine version string.
pub fn hello() -> &'static str {
    "klawd-code v0.1.0 — Aegis Engine"
}

/// Placeholder module for the Aegis 2-stage safety classifier.
pub mod aegis {
    /// Evaluates a proposed action against the safety policy.
    ///
    /// This will house the XML-based classifier that gates
    /// autonomous tool execution (the "YOLO" architecture).
    pub fn evaluate(_action: &str) -> bool {
        // TODO: Implement 2-stage safety classifier
        false // fail-closed by default
    }
}

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

    #[test]
    fn aegis_defaults_to_deny() {
        // Fail-closed: unknown actions must be denied.
        assert!(!aegis::evaluate("rm -rf /"));
    }
}
