Skip to main content

tea_kernel/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4//! Tokio-native headless agent state machine for `tea-rs`.
5//!
6//! The kernel coordinates provider-neutral model streams, validated tools,
7//! pure policy, durable sessions, cooperative cancellation, and awaited
8//! canonical observations. It contains no product prompt, live provider, UI,
9//! filesystem, process, or network implementation.
10
11mod approval;
12mod clock;
13mod compaction;
14mod config;
15mod context_window;
16mod error;
17mod event;
18mod id;
19mod kernel;
20mod model_turn;
21mod observe;
22mod policy;
23mod queue;
24mod record;
25mod request;
26mod retry;
27mod scheduler;
28mod state;
29mod tool_call;
30mod tool_execution;
31
32pub use clock::{KernelClock, KernelDeadlineFuture, TokioKernelClock};
33pub use compaction::{
34    CompactionPolicy, CompactionSummarizer, CompactionSummaryFuture, NeverCompactPolicy,
35};
36pub use config::{KernelRunConfig, RunLimits};
37pub(crate) use context_window::ContextWindowAccountant;
38pub use error::{KernelError, KernelErrorCode};
39pub use event::{DiscardEventSink, KernelEventFuture, KernelEventSink};
40pub use id::{KernelIdSource, UuidV7KernelIdSource};
41pub use kernel::{AgentKernel, KernelRunOutcome};
42pub use queue::KernelInputQueue;
43pub use request::TurnRequestSnapshot;
44pub use retry::ModelRetryPolicy;
45pub use scheduler::{Lane, SchedulePlan, Scheduler};
46pub use state::{RunState, StateTransitionError, TurnState};