//! meerkat-mcp - MCP client for Meerkat
//!
//! Connect to MCP servers and route tool calls.

mod adapter;
mod connection;
mod error;
pub mod external_tool_surface_authority;
pub mod generated;
mod protocol;
mod router;
mod transport;

pub use adapter::McpRouterAdapter;
pub use connection::McpConnection;
pub use error::McpError;
pub use meerkat_core::{ExternalToolDelta, ExternalToolDeltaPhase};
pub use protocol::McpProtocol;
pub use router::{
    McpApplyDelta, McpApplyResult, McpLifecycleAction, McpLifecyclePhase, McpReloadTarget,
    McpRouter, McpServerLifecycleState,
};

// Capability registration
inventory::submit! {
    meerkat_capabilities::CapabilityRegistration {
        id: meerkat_capabilities::CapabilityId::McpLive,
        description: "Live MCP server mutation (add/remove/reload on running sessions)",
        scope: meerkat_capabilities::CapabilityScope::Universal,
        requires_feature: Some("mcp"),
        prerequisites: &[],
        status_resolver: None,
    }
}

// Skill registration
inventory::submit! {
    meerkat_skills::SkillRegistration {
        id: "mcp-server-setup",
        name: "MCP Server Setup",
        description: "How to configure MCP servers in .rkat/mcp.toml",
        scope: meerkat_core::skills::SkillScope::Builtin,
        requires_capabilities: &[],
        body: include_str!("../skills/mcp-server-setup/SKILL.md"),
        extensions: &[],
    }
}
