openmoat 0.14.0

Policy checks for AI coding agents: decides allow, defer, review or deny for every tool call from Claude Code, Codex, Cursor, OpenClaw, GitHub Copilot CLI, pi and Gemini CLI, configures Claude Code's, Codex's and Cursor's own OS sandboxes from the same policy, and keeps a local audit log.
//! Advisory host-owned trust inspection for status and doctor only.

use super::HostConfig;

pub(super) fn warning(config: &HostConfig) -> Option<String> {
    let reader = config.host.spec().install.as_ref()?.hook_trust?;
    let document = std::fs::read_to_string(config.dir().join(reader.toml_file()))
        .ok()
        .and_then(|text| text.parse::<toml_edit::DocumentMut>().ok())
        .map_or(serde_json::Value::Null, |doc| {
            crate::mcp::servers::toml_to_json(doc.as_item())
        });
    reader.warning(
        &config.read().ok()?,
        &document,
        &config.settings_path.display().to_string(),
        crate::integrity::sha256_hex,
    )
}