supercode-runtime 0.4.11

Optional native model and tool runtime for Supercode
Documentation
//! Optional native model and tool runtime for Supercode.
//!
//! This package owns provider request/event/usage contracts, the
//! OpenAI-compatible streaming transport, cache planning, request budgeting,
//! and bounded background state. The complete Agent and tool composition lives
//! in `supercode-harness`; foreign session codecs live in
//! `supercode-interchange`; reversible reduction is optional.

#![warn(missing_docs)]

pub mod background;
mod cache_plan;
mod error;
mod event;
mod model_limits;
mod policy;
mod provider;
mod request;
mod tokens;
mod usage;

pub use cache_plan::CachePlan;
pub use error::{Result, RuntimeError};
pub use event::{AgentEvent, EventSink};
pub use model_limits::{model_context_limit, UNKNOWN_MODEL_CONTEXT_FLOOR};
pub use policy::glob_match;
pub use provider::{
    apply_cache_plan, cache_cold_reason, is_anthropic_family_model, tier_change_is_cache_bust,
    CacheColdReason, HttpOptions, OpenAiProvider, Provider,
};
pub use request::{ChatRequest, ToolSchema};
pub use tokens::{
    context_guard, estimate_deferred_schema_tokens, estimate_request_tokens, estimate_tokens,
    estimate_view_tokens, fmt_approx_tokens, with_guard_margin, CONTEXT_RESPONSE_RESERVE_TOKENS,
};
pub use usage::{PromptTokensDetails, Usage};