Module controller

Module controller 

Source
Expand description

LLM session controller and tool execution. LLM session controller and tool execution framework.

Re-exports§

pub use session::CompactResult;
pub use session::CompactionConfig;
pub use session::LLMProvider;
pub use session::LLMSession;
pub use session::LLMSessionConfig;
pub use session::LLMSessionManager;
pub use session::SessionStatus;
pub use session::TokenUsage;
pub use session::ToolCompaction;
pub use stateless::RequestOptions;
pub use stateless::StatelessConfig;
pub use stateless::StatelessError;
pub use stateless::StatelessExecutor;
pub use stateless::StatelessResult;
pub use tools::Answer;
pub use tools::AskForPermissionsTool;
pub use tools::AskUserQuestionsRequest;
pub use tools::AskUserQuestionsResponse;
pub use tools::AskUserQuestionsTool;
pub use tools::DisplayConfig;
pub use tools::DisplayResult;
pub use tools::Executable;
pub use tools::PendingPermissionInfo;
pub use tools::PendingQuestionInfo;
pub use tools::PermissionCategory;
pub use tools::PermissionError;
pub use tools::PermissionGrant;
pub use tools::PermissionRegistry;
pub use tools::PermissionRequest;
pub use tools::PermissionResponse;
pub use tools::PermissionScope;
pub use tools::Question;
pub use tools::ResultContentType;
pub use tools::ToolBatchResult;
pub use tools::ToolContext;
pub use tools::ToolDefinition;
pub use tools::ToolExecutor;
pub use tools::ToolRegistry;
pub use tools::ToolRequest;
pub use tools::ToolResult;
pub use tools::ToolResultStatus;
pub use tools::ToolType;
pub use tools::UserInteractionError;
pub use tools::UserInteractionRegistry;
pub use tools::ValidationError;
pub use tools::ValidationErrorCode;
pub use tools::ValidationErrorDetail;
pub use tools::LLMTool;
pub use tools::WebSearchTool;
pub use tools::ASK_FOR_PERMISSIONS_TOOL_DESCRIPTION;
pub use tools::ASK_FOR_PERMISSIONS_TOOL_NAME;
pub use tools::ASK_FOR_PERMISSIONS_TOOL_SCHEMA;
pub use tools::ASK_USER_QUESTIONS_TOOL_DESCRIPTION;
pub use tools::ASK_USER_QUESTIONS_TOOL_NAME;
pub use tools::ASK_USER_QUESTIONS_TOOL_SCHEMA;
pub use tools::WEB_SEARCH_TOOL_DESCRIPTION;
pub use tools::WEB_SEARCH_TOOL_NAME;
pub use tools::WEB_SEARCH_TOOL_SCHEMA;
pub use types::ContentBlock;
pub use types::ControlCmd;
pub use types::ControllerEvent;
pub use types::ControllerInputPayload;
pub use types::FromLLMPayload;
pub use types::InputType;
pub use types::LLMRequestType;
pub use types::LLMResponseType;
pub use types::Message;
pub use types::MessageRole;
pub use types::ToLLMPayload;
pub use types::TurnCounter;
pub use types::TurnId;
pub use usage::TokenMeter;
pub use usage::TokenUsageTracker;

Modules§

session
Session management and context compaction. LLM session management with automatic context compaction.
stateless
Stateless execution support. Stateless LLM execution without session management.
tools
Tool execution and user interaction. Tool execution framework with built-in tools.
types
Core types for controller communication. Core types for controller communication and message handling.
usage
Token usage tracking. Token usage tracking and metrics.

Structs§

LLMController
The main LLM controller that manages sessions and coordinates communication

Enums§

ControllerError
Error type for controller operations.

Constants§

DEFAULT_CHANNEL_SIZE
Default channel buffer size for internal communication

Type Aliases§

EventFunc
Callback function type for controller events