Skip to main content

tea_context/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4//! Deterministic prompt modules, context providers, compilation, and
5//! inspection for `tea-rs`.
6//!
7//! This pure context layer performs no filesystem, process, network, provider,
8//! executor, clock, or async-runtime work. Trust labels preserve provenance for
9//! inspection; they do not claim to prevent prompt injection.
10
11mod budget;
12mod compiler;
13mod diagnostic;
14mod error;
15mod identity;
16mod inspection;
17mod module;
18mod provenance;
19mod provider;
20mod providers;
21mod segment;
22mod skill;
23
24pub use budget::{PROMPT_SEPARATOR, PromptBudget, TRUNCATION_MARKER, estimate_tokens};
25pub use compiler::{CompiledPrompt, MAX_COMPILE_MODULES, PromptCompiler};
26pub use diagnostic::{PromptDiagnostic, PromptDiagnosticCode};
27pub use error::{ContextError, ContextErrorCode};
28pub use identity::{
29    ConflictKey, ContextIdentityError, ContextProviderId, PromptModuleId, PromptSegmentId, SkillId,
30};
31pub use inspection::{PromptInspectionEntry, SegmentDisposition};
32pub use module::{MAX_MODULE_SEGMENTS, ModuleError, PromptModule, PromptPriority};
33pub use provenance::{CacheScope, PromptAuthority, PromptProvenance, ProvenanceError, TrustLevel};
34pub use provider::{
35    ContextProvider, ContextProviderFuture, ContextRequest, MAX_CONTEXT_TOOLS,
36    StaticContextProvider,
37};
38pub use providers::{
39    SessionSummaryProvider, SkillMetadataProvider, ToolHintProvider, WorkspaceInstruction,
40    WorkspaceInstructionProvider,
41};
42pub use segment::{
43    BudgetBehavior, ConflictClaim, ConflictMode, MAX_SEGMENT_BYTES, PromptSegment, SegmentError,
44};
45pub use skill::{MAX_SKILL_DESCRIPTION_BYTES, SkillError, SkillInvocation, SkillMetadata};