Skip to main content

sim_lib_agent_runner_core/
lib.rs

1//! Provider-neutral runner contracts for SIM model fabrics.
2//!
3//! This crate defines the shared in-process objects used by SIM model runners:
4//!
5//! - [`ModelRequest`] for normalized task and transcript input
6//! - [`ModelResponse`] for final content and usage output
7//! - [`ModelEvent`] and [`ModelEventSink`] for streaming progress
8//! - [`ModelCard`] and [`ModelBid`] for routing and selection
9//! - [`ModelRunner`] for executable runner implementations
10//!
11//! Higher-level crates install concrete runners, policies, markets, and
12//! agent-model adapters on top of these contracts.
13
14#![forbid(unsafe_code)]
15#![deny(missing_docs)]
16
17mod card;
18mod ceiling;
19mod events;
20mod expr;
21mod fence;
22mod grammar;
23mod model;
24mod output;
25mod terminal;
26
27/// Cookbook recipes embedded from this crate's `recipes/` directory.
28pub static RECIPES: sim_cookbook::EmbeddedDir =
29    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
30
31pub use card::{ModelBid, ModelCard, model_bid_class_symbol, model_card_class_symbol};
32pub use ceiling::effective_ceiling;
33pub use events::{ModelEvent, ModelEventSink, VecEventSink, model_request_kernel_event};
34pub use fence::{FENCE_DATA_RULE, InjectionFence};
35pub use grammar::shape_to_grammar;
36pub use model::{
37    ModelRequest, ModelResponse, ModelRunner, ModelUsage, model_request_class_symbol,
38    model_response_class_symbol, model_usage_class_symbol,
39};
40pub use output::{
41    OUTPUT_GRAMMAR_EXTRA, OUTPUT_GRAMMAR_REQUIRED_EXTRA, OutputContract, RETURN_CODEC_EXTRA,
42    RETURN_SHAPE_EXTRA,
43};
44pub use terminal::terminal_model_content;