canact 0.1.1

Probe an LLM and return host policy: max tools, edit format, XML fallback, JSON repair
Documentation
//! Probe an LLM and return host policy (`max_tools`, edit format, XML, JSON).

mod cache;
mod endpoint;
mod error;
mod report;
mod types;

pub use cache::{
    CACHE_TTL_SECS, CacheEntry, DEFAULT_PROBE_EFFORT, DEFAULT_SKIP_EXPENSIVE, DEFAULT_VISION,
    PROBE_SUITE_VERSION, ProbeCache,
};
pub use endpoint::{
    ANTHROPIC_BASE_URL, LMSTUDIO_BASE_URL, OLLAMA_BASE_URL, VLLM_BASE_URL, XAI_BASE_URL,
    cloud_endpoint_requires_key, default_compat_base_url, is_anthropic_cloud_host,
    is_anthropic_provider_label, is_ollama_compat_base, is_xai_provider_label,
    local_provider_base_url, looks_cheap, provider_from_base_url,
};
pub use error::ProbeError;
pub use report::missing_model_message;
pub use types::{
    CORE_DIMENSION_NAMES, CapabilityLevel, CapabilityProfile, DIMENSION_NAMES,
    EditFormatRecommendation, HostPolicyMeta, ProbeResult, REQUIREMENT_DIMENSION_NAMES,
    TOOL_PROBE_NAMES, classify,
};

#[cfg(feature = "runtime")]
mod client;
#[cfg(feature = "runtime")]
mod probes;
#[cfg(feature = "runtime")]
mod runner;

#[cfg(feature = "runtime")]
pub use client::{
    CatalogPriors, MockLlm, ProbeClient, ProbeContent, ProbeContentPart, ProbeFinish, ProbeMessage,
    ProbeRequest, ProbeResponse, ProbeRole, ProbeStreamChunk, ProbeTool, ProbeToolCall, ProbeUsage,
};
#[cfg(feature = "runtime")]
pub use runner::{
    FREE_CONCURRENCY, PAID_CONCURRENCY, ProbeRun, ProbeRunner, is_unreachable_host, resolve_probe,
};

#[cfg(all(feature = "runtime", feature = "openai"))]
mod adapters;
#[cfg(all(feature = "runtime", feature = "openai"))]
pub use adapters::openai::{
    HostCatalogHints, ListedModel, OpenAiCompatClient, advertised_context_for_model,
    advertised_context_from_model_object, advertised_context_from_ollama_show, list_model_ids,
    list_models, lookup_advertised_context, lookup_host_catalog, merge_advertised_context,
    merge_vision_catalog, resolve_advertised_context, resolve_host_catalog,
    vision_from_model_object, vision_from_ollama_show,
};

// Aider/Cline overlays and MCP stay off the Bline pin
// (`default-features = false`, optional `runtime`).
#[cfg(feature = "cli")]
mod export;
#[cfg(feature = "cli")]
pub use export::{
    AiderMetadataEntry, AiderOverlay, AiderSettingsRow, ClineModelInfo, HostOverlay, OverlayFiles,
    aider_edit_format, overlay_context_tokens, overlay_model_name,
};

#[cfg(feature = "cli")]
mod claude_code;
#[cfg(feature = "cli")]
pub use claude_code::{ClaudeCodeKeychainIsolation, claude_code_access_token};

#[cfg(feature = "cli")]
mod mcp;
#[cfg(feature = "cli")]
pub use mcp::run_mcp_stdio;

#[cfg(test)]
mod tests {
    #[test]
    fn crate_name() {
        assert_eq!(env!("CARGO_PKG_NAME"), "canact");
    }

    #[cfg(feature = "cli")]
    #[test]
    fn cli_exports_host_overlay() {
        let _ = crate::HostOverlay::aider;
        let _ = crate::run_mcp_stdio;
    }
}