Skip to main content

Crate tea_kernel

Crate tea_kernel 

Source
Expand description

Tokio-native headless agent state machine for tea-rs.

The kernel coordinates provider-neutral model streams, validated tools, pure policy, durable sessions, cooperative cancellation, and awaited canonical observations. It contains no product prompt, live provider, UI, filesystem, process, or network implementation.

Structs§

AgentKernel
Headless coordinator for model, tool, policy, session, and observation ports.
DiscardEventSink
Event sink that intentionally discards observations after awaiting the call.
KernelError
Bounded safe failure returned by the agent kernel.
KernelInputQueue
Thread-safe bounded steering and follow-up queue applied between turns.
KernelRunConfig
Immutable product-independent context frozen for one run.
KernelRunOutcome
Terminal result of one kernel invocation.
Lane
One scheduler lane containing invocations that share an execution rule.
ModelRetryPolicy
Deterministic provider-neutral model retry policy.
NeverCompactPolicy
Default policy that never compacts automatically.
RunLimits
Hard deterministic limits applied to one kernel run.
SchedulePlan
Immutable plan of lane assignments for one model turn.
Scheduler
Effect-aware tool scheduler producing lane assignments only.
StateTransitionError
Invalid runtime-state transition.
TokioKernelClock
Production clock backed by system UTC and Tokio deadlines.
TurnRequestSnapshot
Immutable model request plus the durable tail used to construct it.
UuidV7KernelIdSource
Production UUIDv7 identity source.

Enums§

KernelErrorCode
Stable machine-readable kernel failure classification.
RunState
Explicit lifecycle state of one kernel run.
TurnState
Explicit lifecycle state of one model/tool turn.

Traits§

CompactionPolicy
Policy deciding whether a context overflow should trigger automatic compaction before the next model request.
CompactionSummarizer
Product-supplied source of compaction summaries.
KernelClock
Replaceable source of canonical time and deterministic deadlines.
KernelEventSink
Awaited observation destination with explicit backpressure.
KernelIdSource
Replaceable source of typed UUIDv7 runtime identities.

Type Aliases§

CompactionSummaryFuture
Boxed future returned by a compaction summarizer.
KernelDeadlineFuture
Boxed deadline future returned by a kernel clock.
KernelEventFuture
Boxed future returned by an awaited event sink.