pub struct ToolRegistry { /* private fields */ }Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub async fn suggest_fallback_tool(&self, failed_tool: &str) -> Option<String>
pub async fn suggest_fallback_tool(&self, failed_tool: &str) -> Option<String>
Suggest a fallback tool for a failed invocation using lightweight heuristics.
Sourcepub async fn available_tools(&self) -> Vec<String>
pub async fn available_tools(&self) -> Vec<String>
Get a list of all available tools, including MCP tools.
Sourcepub async fn get_tool_schema(&self, tool_name: &str) -> Option<Value>
pub async fn get_tool_schema(&self, tool_name: &str) -> Option<Value>
Get the schema for a specific tool.
Source§impl ToolRegistry
impl ToolRegistry
pub fn new(workspace_root: PathBuf) -> impl Future<Output = Self>
pub fn new_with_config( workspace_root: PathBuf, pty_config: PtyConfig, ) -> impl Future<Output = Self>
pub fn new_with_custom_policy( workspace_root: PathBuf, policy_manager: ToolPolicyManager, ) -> impl Future<Output = Self>
pub fn new_with_custom_policy_and_config( workspace_root: PathBuf, pty_config: PtyConfig, policy_manager: ToolPolicyManager, ) -> impl Future<Output = Self>
Source§impl ToolRegistry
impl ToolRegistry
pub async fn cache_stats(&self) -> Value
pub async fn clear_cache(&self)
Source§impl ToolRegistry
impl ToolRegistry
pub async fn public_tool_names( &self, surface: SessionSurface, capability_level: CapabilityLevel, ) -> Vec<String>
pub async fn schema_entries( &self, config: SessionToolsConfig, ) -> Vec<ToolSchemaEntry>
pub async fn function_declarations( &self, config: SessionToolsConfig, ) -> Vec<FunctionDeclaration>
pub async fn model_tools( &self, config: SessionToolsConfig, ) -> Vec<ToolDefinition>
pub async fn schema_for_public_name( &self, name: &str, config: SessionToolsConfig, ) -> Option<ToolSchemaEntry>
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub async fn enable_cgp_pipeline(&self, mode: CgpRuntimeMode)
pub async fn enable_cgp_pipeline(&self, mode: CgpRuntimeMode)
Enable the CGP pipeline for all registered tools.
This replaces each eligible tool’s handler with a CGP ToolFacade
determined by the runtime mode. Registrations that provide a native CGP
factory use that directly; TraitObject handlers are wrapped with
registration-backed metadata before entering the passthrough bridge, and
RegistryFn handlers are projected through a concrete RegistryFnTool.
Sourcepub async fn register_cgp_tool(
&self,
tool: Arc<dyn Tool>,
capability: CapabilityLevel,
mode: CgpRuntimeMode,
) -> Result<()>
pub async fn register_cgp_tool( &self, tool: Arc<dyn Tool>, capability: CapabilityLevel, mode: CgpRuntimeMode, ) -> Result<()>
Wrap a single tool through the CGP pipeline and register it.
This is the preferred path for new tool registrations that should participate in the CGP approval/sandbox/logging/cache/retry pipeline.
Source§impl ToolRegistry
impl ToolRegistry
pub fn apply_commands_config(&self, commands_config: &CommandsConfig)
pub fn commands_config(&self) -> CommandsConfig
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub async fn execute_tool_dual(
&self,
name: &str,
args: Value,
) -> Result<SplitToolResult>
pub async fn execute_tool_dual( &self, name: &str, args: Value, ) -> Result<SplitToolResult>
Execute tool with dual-channel output (Phase 4: Split Tool Results).
This method enables significant token savings by separating:
llm_content: Concise summary sent to LLM context (token-optimized)ui_content: Rich output displayed to user (full details)
For tools with registered summarizers, this can achieve 90-97% token reduction on tool outputs while preserving full details for the UI.
§Example
let result = registry.execute_tool_dual("grep_file", args).await?;
// result.llm_content: "Found 127 matches in 15 files. Key: src/tools/grep.rs (3)"
// result.ui_content: [Full formatted output with all 127 matches]
// Savings: ~98% token reductionSource§impl ToolRegistry
impl ToolRegistry
pub fn safety_gateway(&self) -> Arc<SafetyGateway> ⓘ
Sourcepub fn execute_public_tool_request(
&self,
request: ToolExecutionRequest,
) -> impl Future<Output = ToolExecutionOutcome> + '_
pub fn execute_public_tool_request( &self, request: ToolExecutionRequest, ) -> impl Future<Output = ToolExecutionOutcome> + '_
Inline-delegating wrapper that returns the inner future directly to avoid an extra coroutine state machine (audit section 16).
pub async fn execute_prepared_public_tool_request( &self, prepared: &PreparedToolCall, policy: ExecutionPolicySnapshot, ) -> ToolExecutionOutcome
pub fn preflight_validate_call( &self, name: &str, args: &Value, ) -> Result<ToolPreflightOutcome>
pub fn admit_public_tool_call( &self, name: &str, args: &Value, ) -> Result<PreparedToolCall>
pub async fn execute_tool(&self, name: &str, args: Value) -> Result<Value>
Sourcepub async fn execute_public_tool_ref(
&self,
name: &str,
args: &Value,
) -> Result<Value>
pub async fn execute_public_tool_ref( &self, name: &str, args: &Value, ) -> Result<Value>
Execute a model-originated tool call through the public routing assembly.
Sourcepub async fn execute_tool_ref(&self, name: &str, args: &Value) -> Result<Value>
pub async fn execute_tool_ref(&self, name: &str, args: &Value) -> Result<Value>
Reference-taking version of execute_tool to avoid cloning by callers
that already have access to an existing Value.
Sourcepub async fn execute_tool_ref_prevalidated(
&self,
name: &str,
args: &Value,
) -> Result<Value>
pub async fn execute_tool_ref_prevalidated( &self, name: &str, args: &Value, ) -> Result<Value>
Reference-taking execution entrypoint for calls that were already preflight-validated.
This avoids re-running argument/schema/path/command preflight in hot paths where validation already happened in the runloop.
Sourcepub async fn execute_public_tool_ref_prevalidated(
&self,
name: &str,
args: &Value,
) -> Result<Value>
pub async fn execute_public_tool_ref_prevalidated( &self, name: &str, args: &Value, ) -> Result<Value>
Prevalidated model-originated execution that still routes through the public assembly.
pub async fn execute_prepared_public_tool_ref_with_mode( &self, prepared: &PreparedToolCall, exec_settlement_mode: ExecSettlementMode, ) -> Result<Value>
Source§impl ToolRegistry
impl ToolRegistry
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn read_file(&self, args: Value) -> impl Future<Output = Result<Value>> + '_
pub fn read_file(&self, args: Value) -> impl Future<Output = Result<Value>> + '_
Inline-delegating wrapper that returns the inner future directly to avoid an extra coroutine state machine (audit section 16).
Sourcepub fn write_file(
&self,
args: Value,
) -> impl Future<Output = Result<Value>> + '_
pub fn write_file( &self, args: Value, ) -> impl Future<Output = Result<Value>> + '_
Inline-delegating wrapper. See Self::read_file.
Sourcepub fn create_file(
&self,
args: Value,
) -> impl Future<Output = Result<Value>> + '_
pub fn create_file( &self, args: Value, ) -> impl Future<Output = Result<Value>> + '_
Inline-delegating wrapper. See Self::read_file.
pub async fn edit_file(&self, args: Value) -> Result<Value>
Sourcepub fn delete_file(
&self,
args: Value,
) -> impl Future<Output = Result<Value>> + '_
pub fn delete_file( &self, args: Value, ) -> impl Future<Output = Result<Value>> + '_
Inline-delegating wrapper. See Self::read_file.
pub async fn grep_file(&self, args: Value) -> Result<Value>
pub fn last_grep_file_result(&self) -> Option<GrepSearchResult>
pub async fn list_files(&self, args: Value) -> Result<Value>
Source§impl ToolRegistry
impl ToolRegistry
pub fn apply_permissions_config(&self, permissions: &PermissionsConfig)
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn set_harness_session(&self, session_id: impl Into<String>)
pub fn set_harness_session(&self, session_id: impl Into<String>)
Update harness session identifier used for structured tool telemetry
Sourcepub fn set_harness_task(&self, task_id: Option<String>)
pub fn set_harness_task(&self, task_id: Option<String>)
Update current task identifier used for structured tool telemetry
Sourcepub fn harness_context_snapshot(&self) -> HarnessContextSnapshot
pub fn harness_context_snapshot(&self) -> HarnessContextSnapshot
Snapshot harness context metadata.
Attach the runloop’s shared per-tool circuit breaker.
Return the shared per-tool circuit breaker when configured.
Sourcepub async fn execute_harness_unified_exec(&self, args: Value) -> Result<Value>
pub async fn execute_harness_unified_exec(&self, args: Value) -> Result<Value>
Execute a harness-owned verification command through the same exec/sandbox
runtime used by the public unified_exec tool while bypassing the
model-facing full-auto allow-list gate.
Sourcepub async fn execute_harness_unified_exec_terminal_run(
&self,
args: Value,
) -> Result<Value>
pub async fn execute_harness_unified_exec_terminal_run( &self, args: Value, ) -> Result<Value>
Start a harness-owned PTY command session while retaining the session metadata even when the command exits immediately. ACP terminal sessions use explicit release semantics.
pub async fn read_harness_exec_session_output( &self, session_id: &str, drain: bool, ) -> Result<Option<String>>
Sourcepub fn harness_exec_session_completed<'a>(
&'a self,
session_id: &'a str,
) -> impl Future<Output = Result<Option<i32>>> + 'a
pub fn harness_exec_session_completed<'a>( &'a self, session_id: &'a str, ) -> impl Future<Output = Result<Option<i32>>> + 'a
Inline-delegating wrapper over
Self::harness_exec_session_completed.
Returns the inner future directly (audit section 16).
Sourcepub fn terminate_harness_exec_session<'a>(
&'a self,
session_id: &'a str,
) -> impl Future<Output = Result<()>> + 'a
pub fn terminate_harness_exec_session<'a>( &'a self, session_id: &'a str, ) -> impl Future<Output = Result<()>> + 'a
Inline-delegating wrapper over
Self::terminate_harness_exec_session.
pub async fn close_harness_exec_session(&self, session_id: &str) -> Result<()>
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn get_recent_tool_records(&self, count: usize) -> Vec<ToolExecutionRecord>
pub fn get_recent_tool_records(&self, count: usize) -> Vec<ToolExecutionRecord>
Get recent tool executions (successes and failures).
Sourcepub fn get_recent_tool_failures(&self, count: usize) -> Vec<ToolExecutionRecord>
pub fn get_recent_tool_failures(&self, count: usize) -> Vec<ToolExecutionRecord>
Get recent tool execution failures.
Sourcepub fn find_recent_spooled_output(
&self,
tool_name: &str,
args: &Value,
max_age: Duration,
) -> Option<Value>
pub fn find_recent_spooled_output( &self, tool_name: &str, args: &Value, max_age: Duration, ) -> Option<Value>
Find a recent spooled output for a tool call with identical args.
Sourcepub fn find_recent_successful_output(
&self,
tool_name: &str,
args: &Value,
max_age: Duration,
) -> Option<Value>
pub fn find_recent_successful_output( &self, tool_name: &str, args: &Value, max_age: Duration, ) -> Option<Value>
Find a recent successful output for a tool call with identical args.
Sourcepub fn find_recent_read_file_spool_progress(
&self,
path: &str,
max_age: Duration,
) -> Option<(usize, usize)>
pub fn find_recent_read_file_spool_progress( &self, path: &str, max_age: Duration, ) -> Option<(usize, usize)>
Find continuation metadata from a recent chunked file-read result for the same path.
Supports both read_file and unified_file (read action) history records.
Sourcepub fn clear_execution_history(&self)
pub fn clear_execution_history(&self)
Clear the execution history.
Sourcepub fn execution_history_len(&self) -> usize
pub fn execution_history_len(&self) -> usize
Get the current number of stored execution records.
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn get_tool(&self, name: &str) -> Option<Arc<dyn Tool>>
pub fn get_tool(&self, name: &str) -> Option<Arc<dyn Tool>>
Get a tool by name from the inventory (with hot cache optimization).
pub fn workspace_root(&self) -> &PathBuf
Sourcepub fn workspace_root_owned(&self) -> PathBuf
pub fn workspace_root_owned(&self) -> PathBuf
Get the workspace root as an owned PathBuf.
pub fn file_ops_tool(&self) -> &FileOpsTool
Sourcepub fn edited_file_monitor_ref(&self) -> &EditedFileMonitor
pub fn edited_file_monitor_ref(&self) -> &EditedFileMonitor
Borrow the edited-file monitor without exposing shared ownership.
Sourcepub fn edited_file_monitor(&self) -> &Arc<EditedFileMonitor> ⓘ
pub fn edited_file_monitor(&self) -> &Arc<EditedFileMonitor> ⓘ
Get the shared edited-file monitor handle for callers that need to clone it.
pub fn grep_file_manager(&self) -> Arc<GrepSearchManager> ⓘ
Source§impl ToolRegistry
impl ToolRegistry
pub async fn initialize_async(&self) -> Result<()>
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub async fn with_mcp_client(self, mcp_client: Arc<McpClient>) -> Self
pub async fn with_mcp_client(self, mcp_client: Arc<McpClient>) -> Self
Set the MCP client for this registry.
Sourcepub async fn set_mcp_client(&self, mcp_client: Arc<McpClient>)
pub async fn set_mcp_client(&self, mcp_client: Arc<McpClient>)
Attach an MCP client without consuming the registry.
Sourcepub fn mcp_client(&self) -> Option<Arc<McpClient>>
pub fn mcp_client(&self) -> Option<Arc<McpClient>>
Get the MCP client if available.
Sourcepub async fn list_mcp_tools(&self) -> Result<Vec<McpToolInfo>>
pub async fn list_mcp_tools(&self) -> Result<Vec<McpToolInfo>>
List all MCP tools.
Sourcepub async fn has_mcp_tool(&self, tool_name: &str) -> bool
pub async fn has_mcp_tool(&self, tool_name: &str) -> bool
Check if an MCP tool exists.
Sourcepub async fn execute_mcp_tool(
&self,
tool_name: &str,
args: Value,
) -> Result<Value>
pub async fn execute_mcp_tool( &self, tool_name: &str, args: Value, ) -> Result<Value>
Execute an MCP tool.
Sourcepub async fn refresh_mcp_tools(&self) -> Result<()>
pub async fn refresh_mcp_tools(&self) -> Result<()>
Refresh MCP tools (reconnect to providers and update tool lists).
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn metrics_collector(&self) -> Arc<MetricsCollector> ⓘ
pub fn metrics_collector(&self) -> Arc<MetricsCollector> ⓘ
Return the shared metrics collector for this registry instance.
Sourcepub fn tool_call_count(&self) -> u64
pub fn tool_call_count(&self) -> u64
Get total tool calls made in current session (for observability).
Sourcepub fn pty_poll_count(&self) -> u64
pub fn pty_poll_count(&self) -> u64
Get total PTY poll iterations (for CPU monitoring).
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn has_optimizations_enabled(&self) -> bool
pub fn has_optimizations_enabled(&self) -> bool
Check if optimizations are enabled.
Sourcepub fn memory_pool_ref(&self) -> &MemoryPool
pub fn memory_pool_ref(&self) -> &MemoryPool
Borrow the memory pool for optimized allocations.
Sourcepub fn memory_pool(&self) -> &Arc<MemoryPool> ⓘ
pub fn memory_pool(&self) -> &Arc<MemoryPool> ⓘ
Get the shared memory pool handle for callers that need to clone it.
Sourcepub fn clear_hot_cache(&self)
pub fn clear_hot_cache(&self)
Clear the hot tool cache (useful for testing or memory management).
Sourcepub fn hot_cache_stats(&self) -> (usize, usize)
pub fn hot_cache_stats(&self) -> (usize, usize)
Get hot cache statistics.
Sourcepub fn configure_optimizations(&mut self, config: OptimizationConfig)
pub fn configure_optimizations(&mut self, config: OptimizationConfig)
Configure performance optimizations for this registry.
Sourcepub fn optimization_config(&self) -> &OptimizationConfig
pub fn optimization_config(&self) -> &OptimizationConfig
Get the current optimization configuration.
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn is_mutating_tool(&self, name: &str) -> bool
pub fn is_mutating_tool(&self, name: &str) -> bool
Check if a tool is mutating (modifies files or environment).
Returns true if the tool is mutating or unknown (conservative default).
Sourcepub fn is_plan_mode_allowed(&self, tool_name: &str, args: &Value) -> bool
pub fn is_plan_mode_allowed(&self, tool_name: &str, args: &Value) -> bool
Check if a tool is allowed to run in plan mode without switching modes.
Returns true for non-mutating tools and plan-safe exceptions like
writing to active plan storage (/tmp/vtcode-plans/ by default) or read-only unified tool actions.
Sourcepub fn is_retry_safe_call(&self, tool_name: &str, args: &Value) -> bool
pub fn is_retry_safe_call(&self, tool_name: &str, args: &Value) -> bool
Check whether a tool invocation is safe to retry.
Retries are allowed for read-only operations and for unified tools when
their specific action is read-only (unified_file:read, unified_exec:poll|list).
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn enable_plan_mode(&self)
pub fn enable_plan_mode(&self)
Enable plan mode (read-only enforcement).
When enabled, mutating tools (unified_file writes/edits, apply_patch,
unified_exec runs, etc.)
are blocked and the agent can only read/analyze the codebase.
PlanModeState is the single source of truth; this method delegates to it
so that is_plan_mode() and plan_mode_state().is_active() are always in
agreement.
Sourcepub fn disable_plan_mode(&self)
pub fn disable_plan_mode(&self)
Disable plan mode (allow mutating tools again).
Sourcepub fn is_plan_mode(&self) -> bool
pub fn is_plan_mode(&self) -> bool
Check if plan mode is currently enabled.
Reads directly from PlanModeState — the single authoritative flag.
Sourcepub fn plan_mode_state(&self) -> PlanModeState
pub fn plan_mode_state(&self) -> PlanModeState
Get the shared Plan Mode state (used by plan mode tools and pipeline transitions).
Source§impl ToolRegistry
impl ToolRegistry
pub async fn enable_full_auto_mode(&self, allowed_tools: &[String])
pub async fn disable_full_auto_mode(&self)
pub async fn set_enforce_safe_mode_prompts(&self, enabled: bool)
pub async fn current_full_auto_allowlist(&self) -> Option<Vec<String>>
pub async fn is_allowed_in_full_auto(&self, tool_name: &str) -> bool
pub async fn set_policy_manager(&self, manager: ToolPolicyManager)
pub async fn set_tool_policy( &self, tool_name: &str, policy: ToolPolicy, ) -> Result<()>
pub async fn persist_approval_cache_key(&self, approval_key: &str) -> Result<()>
pub async fn persist_approval_cache_prefix( &self, prefix_entry: &str, ) -> Result<()>
pub async fn has_persisted_approval(&self, approval_key: &str) -> bool
pub async fn find_persisted_shell_approval_prefix( &self, command_words: &[String], scope_signature: &str, ) -> Option<String>
pub async fn get_tool_policy(&self, tool_name: &str) -> ToolPolicy
pub async fn reset_tool_policies(&self) -> Result<()>
pub async fn allow_all_tools(&self) -> Result<()>
pub async fn deny_all_tools(&self) -> Result<()>
pub async fn print_policy_status(&self)
pub async fn apply_config_policies( &self, tools_config: &ToolsConfig, ) -> Result<()>
Sourcepub async fn preflight_tool_permission(&self, name: &str) -> Result<bool>
pub async fn preflight_tool_permission(&self, name: &str) -> Result<bool>
Prompt for permission before starting long-running tool executions to avoid spinner conflicts
pub async fn evaluate_tool_policy( &self, name: &str, ) -> Result<ToolPermissionDecision>
Sourcepub async fn mark_tool_preapproved(&self, name: &str)
pub async fn mark_tool_preapproved(&self, name: &str)
Mark a tool as pre-approved for a single execution after the permission flow already granted it.
pub async fn persist_mcp_tool_policy( &self, name: &str, policy: ToolPolicy, ) -> Result<()>
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn replace_progress_callback(
&self,
callback: Option<ToolProgressCallback>,
) -> Option<ToolProgressCallback>
pub fn replace_progress_callback( &self, callback: Option<ToolProgressCallback>, ) -> Option<ToolProgressCallback>
Replace the callback for streaming tool output and progress, returning the previous callback.
Sourcepub fn set_progress_callback(&self, callback: ToolProgressCallback)
pub fn set_progress_callback(&self, callback: ToolProgressCallback)
Set the callback for streaming tool output and progress
Sourcepub fn clear_progress_callback(&self)
pub fn clear_progress_callback(&self)
Clear the progress callback
Sourcepub fn progress_callback(&self) -> Option<ToolProgressCallback>
pub fn progress_callback(&self) -> Option<ToolProgressCallback>
Get the current progress callback if set
Source§impl ToolRegistry
impl ToolRegistry
pub fn pty_manager(&self) -> &PtyManager
pub fn pty_config(&self) -> &PtyConfig
pub fn can_start_pty_session(&self) -> bool
pub fn start_pty_session(&self) -> Result<PtySessionGuard>
pub fn end_pty_session(&self)
pub fn active_pty_sessions(&self) -> usize
pub fn terminate_all_pty_sessions(&self)
Sourcepub fn terminate_all_pty_sessions_async(
&self,
) -> impl Future<Output = Result<()>> + '_
pub fn terminate_all_pty_sessions_async( &self, ) -> impl Future<Output = Result<()>> + '_
Inline-delegating wrapper over pty::PtySessionManager::terminate_all_async.
Returns the inner future directly to avoid an extra coroutine state machine
(per the async-state-machine bloat audit, section 16).
Sourcepub fn terminate_all_exec_sessions_async(
&self,
) -> impl Future<Output = Result<()>> + '_
pub fn terminate_all_exec_sessions_async( &self, ) -> impl Future<Output = Result<()>> + '_
Inline-delegating wrapper over
Self::terminate_all_exec_sessions_async.
pub fn exec_session_manager(&self) -> ExecSessionManager
Sourcepub fn set_active_pty_sessions(&self, counter: Arc<AtomicUsize>)
pub fn set_active_pty_sessions(&self, counter: Arc<AtomicUsize>)
Set the active PTY sessions counter for tracking
Sourcepub fn increment_active_pty_sessions(&self)
pub fn increment_active_pty_sessions(&self)
Increment active PTY sessions count
Sourcepub fn decrement_active_pty_sessions(&self)
pub fn decrement_active_pty_sessions(&self)
Decrement active PTY sessions count
Sourcepub fn active_pty_sessions_count(&self) -> usize
pub fn active_pty_sessions_count(&self) -> usize
Get the current active PTY sessions count
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub async fn register_tool(&self, registration: ToolRegistration) -> Result<()>
pub async fn register_tool(&self, registration: ToolRegistration) -> Result<()>
Sourcepub async fn unregister_tool(&self, name: &str) -> Result<bool>
pub async fn unregister_tool(&self, name: &str) -> Result<bool>
Unregister a tool from the registry.
Source§impl ToolRegistry
impl ToolRegistry
pub async fn apply_tool_runtime_config( &self, commands_config: &CommandsConfig, tools_config: &ToolsConfig, ) -> Result<()>
pub async fn apply_session_runtime_config( &self, commands_config: &CommandsConfig, permissions_config: &PermissionsConfig, sandbox_config: &SandboxConfig, timeouts: &TimeoutsConfig, tools_config: &ToolsConfig, ) -> Result<()>
Source§impl ToolRegistry
impl ToolRegistry
pub fn apply_sandbox_config(&self, sandbox_config: &SandboxConfig)
pub fn sandbox_config(&self) -> SandboxConfig
Source§impl ToolRegistry
impl ToolRegistry
pub async fn create_session_prompt_task( &self, name: Option<String>, prompt: String, schedule: ScheduleSpec, created_at: DateTime<Utc>, ) -> Result<ScheduledTaskSummary>
pub async fn list_session_tasks(&self) -> Vec<ScheduledTaskSummary>
pub async fn delete_session_task( &self, query: &str, ) -> Option<ScheduledTaskSummary>
pub async fn collect_due_session_prompts( &self, now: DateTime<Utc>, ) -> Result<Vec<DueSessionPrompt>>
Source§impl ToolRegistry
impl ToolRegistry
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn output_spooler(&self) -> &ToolOutputSpooler
pub fn output_spooler(&self) -> &ToolOutputSpooler
Get the output spooler for external access.
Sourcepub async fn spooled_files_count(&self) -> usize
pub async fn spooled_files_count(&self) -> usize
Get the count of currently spooled files (for TUI status).
Source§impl ToolRegistry
impl ToolRegistry
pub fn set_subagent_controller(&self, controller: Arc<SubagentController>)
pub fn subagent_controller(&self) -> Option<Arc<SubagentController>>
pub fn has_subagent_controller(&self) -> bool
Source§impl ToolRegistry
impl ToolRegistry
pub async fn timeout_category_for(&self, name: &str) -> ToolTimeoutCategory
Source§impl ToolRegistry
impl ToolRegistry
pub fn apply_timeout_policy(&self, timeouts: &TimeoutsConfig)
pub fn timeout_policy(&self) -> ToolTimeoutPolicy
pub fn rate_limit_per_minute(&self) -> Option<usize>
Source§impl ToolRegistry
impl ToolRegistry
pub fn tool_catalog_state(&self) -> Arc<SessionToolCatalogState> ⓘ
Trait Implementations§
Source§impl Clone for ToolRegistry
impl Clone for ToolRegistry
Source§fn clone(&self) -> ToolRegistry
fn clone(&self) -> ToolRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ToolExecutor for ToolRegistry
impl ToolExecutor for ToolRegistry
Source§fn execute_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn execute_tool_ref<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_tool_ref<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn available_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn available_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn has_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for ToolRegistry
impl !UnwindSafe for ToolRegistry
impl Freeze for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl UnsafeUnpin for ToolRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CacheValue for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more