car_engine/lib.rs
1//! Core runtime engine for Common Agent Runtime.
2//!
3//! The runtime loop:
4//! 1. Receive a proposal (batch of actions from a model)
5//! 2. Build a DAG from state_dependencies
6//! 3. Execute each level (concurrent if no ABORT actions, sequential otherwise)
7//! 4. Validate, execute with idempotency + timeout + retry, commit
8//! 5. On abort: rollback state to pre-proposal snapshot
9
10pub mod cache;
11pub mod capabilities;
12pub mod checkpoint;
13mod executor;
14pub mod rate_limit;
15
16pub use cache::ResultCache;
17pub use capabilities::CapabilitySet;
18pub use checkpoint::Checkpoint;
19pub use executor::{format_tool_result, CostBudget, Runtime, ToolExecutor};
20pub use rate_limit::{RateLimit, RateLimiter};
21
22#[cfg(test)]
23mod tests;