1pub mod budget;
40pub mod config;
41pub mod error;
42pub mod event;
43pub mod exec;
44pub mod history;
45pub mod plugin;
46pub mod plugins;
47pub mod protocol;
48pub mod reasoning;
49pub mod run;
50pub mod stream;
51pub mod thinking_filter;
52pub mod tokens;
53pub mod tool;
54pub mod tool_identity;
55pub mod tool_result_budget;
56pub mod trajectory;
57pub mod types;
58
59pub use budget::TokenBudget;
60pub use config::{AgentBuilder, LoopConfig, PluginNames};
61pub use error::{LoopError, StreamError, ToolError, ToolValidationError};
62pub use event::ChannelSink;
63pub use event::{AgentEvent, EventSink, ProviderRequestSummary};
64pub use history::{normalize_tool_call_ids, ToolCallIdNormalization, UniqueToolCallIds};
65pub use plugin::PluginCapabilities;
66pub use plugin::{
67 AfterToolCall, AfterToolDecision, BeforeToolCall, BeforeToolDecision, ContextOverflowRecovery,
68 ContextTransform, EventObserver, FollowUpSource, Plugin, SteeringSource, TransformContext,
69};
70pub use protocol::{
71 DefaultProtocolPolicy, HiddenToolContext, HiddenToolError, PlainTextRecoveryContext,
72 ProtocolPolicy, DEFAULT_PLAIN_TEXT_RECOVERY_PROMPT,
73};
74pub use reasoning::{
75 audit_replay, OpenRouterReasoningCodec, ReasoningCodec, ReasoningFormat, ReasoningItem,
76 ReplayAudit, ReplayContract, ReplayViolation,
77};
78pub use run::{run, run_continue, LoopOutcome, RunResult};
79pub use stream::{
80 AssistantStreamChunk, ReasoningEffort, StreamEvent, StreamFn, StreamRequest, StreamResponse,
81};
82pub use thinking_filter::{strip_thinking_tags, ThinkingTagStreamFilter};
83pub use tokens::{CharHeuristicEstimator, TokenEstimator, CHAR_HEURISTIC};
84pub use tool::{
85 arg_parse_error_value, detect_arg_parse_error, AgentTool, ExecutionMode, ToolCall,
86 ToolHistoryPolicy, ToolRegistry, ToolResult, ToolUpdateSink, TypedAgentTool,
87 ARG_PARSE_ERROR_MARKER, ARG_PARSE_RAW_MARKER,
88};
89pub use tool_identity::{
90 extract_args_key, extract_operation_key, extract_target, ArgsKeyFn, TargetExtractor, TargetFn,
91 ToolIdentityPolicy,
92};
93pub use tool_result_budget::{ToolResultBudget, DEFAULT_PER_TOOL_CHARS};
94pub use trajectory::{
95 InMemoryTrajectorySink, TrajectoryError, TrajectoryPayload, TrajectoryRecord,
96 TrajectoryRecorder, TrajectorySink, TRAJECTORY_SCHEMA_VERSION,
97};
98pub use types::{
99 AgentContext, AgentMessage, AssistantBlock, AssistantContent, ImageContent,
100 ReasoningDetailsContent, RunIdentity, StopReason, TextContent, ToolResultBlock,
101 ToolResultContent, UserBlock, UserContent,
102};