pub struct ToolExecutor { /* private fields */ }Implementations§
Source§impl ToolExecutor
impl ToolExecutor
pub fn new(policy: SecurityPolicy) -> Self
pub fn empty(policy: SecurityPolicy) -> Self
pub fn empty_with_security_policy( policy: SecurityPolicy, security: Arc<dyn ToolSecurityPolicy>, ) -> Self
pub fn with_security_policy( policy: SecurityPolicy, security: Arc<dyn ToolSecurityPolicy>, ) -> Self
pub fn registry(&self) -> &ToolRegistry
pub fn registry_mut(&mut self) -> &mut ToolRegistry
Sourcepub fn search_tools(
&self,
query: &str,
max_results: usize,
) -> Vec<ToolDefinition>
pub fn search_tools( &self, query: &str, max_results: usize, ) -> Vec<ToolDefinition>
Searches tools by keyword across name, description, tags, and capabilities.
pub fn set_harness_profile(&mut self, profile: String)
Sourcepub fn set_security_policy(&mut self, policy: SecurityPolicy)
pub fn set_security_policy(&mut self, policy: SecurityPolicy)
Replaces the security policy used for subsequent tool validations.
Sourcepub fn security_policy(&self) -> &SecurityPolicy
pub fn security_policy(&self) -> &SecurityPolicy
Returns a reference to the active security policy.
pub fn register_skill_loader( &mut self, project_dir: PathBuf, data_dir: PathBuf, config: Arc<RwLock<NaviConfig>>, )
pub fn definitions(&self) -> Vec<ToolDefinition>
pub fn all_definitions(&self) -> Vec<ToolDefinition>
pub fn definition(&self, name: &str) -> Option<ToolDefinition>
pub fn parallelism_for(&self, tool_name: &str) -> ToolParallelism
pub fn register_tool(&mut self, tool: Arc<dyn Tool>) -> Option<Arc<dyn Tool>>
pub fn validate_arguments( &self, inv: &ToolInvocation, ) -> Result<(), ToolCallInvalid>
pub fn tool_names(&self) -> Vec<String>
pub fn unregister_plugin_tools(&mut self)
pub fn invalid_tool_result( &self, inv: &ToolInvocation, err: ToolCallInvalid, ) -> ToolResult
pub fn validate(&self, inv: &ToolInvocation) -> SecurityDecision
pub async fn invoke(&self, invocation: ToolInvocation) -> ToolResult
pub async fn invoke_with_event_tx( &self, invocation: ToolInvocation, event_tx: Option<UnboundedSender<AgentEvent>>, ) -> ToolResult
pub async fn invoke_approved_with_event_tx( &self, invocation: ToolInvocation, event_tx: Option<UnboundedSender<AgentEvent>>, ) -> ToolResult
pub async fn invoke_with_full_context( &self, invocation: ToolInvocation, context: ToolInvocationContext, approval_granted: bool, ) -> ToolResult
Sourcepub async fn list_background_commands(&self) -> Vec<BackgroundCommandSnapshot>
pub async fn list_background_commands(&self) -> Vec<BackgroundCommandSnapshot>
Lists all active background bash commands.
Sourcepub async fn poll_background_command(
&self,
task_id: &str,
) -> Option<BackgroundCommandSnapshot>
pub async fn poll_background_command( &self, task_id: &str, ) -> Option<BackgroundCommandSnapshot>
Polls a specific background bash command.
Sourcepub async fn cancel_background_command(
&self,
task_id: &str,
) -> Option<BackgroundCommandSnapshot>
pub async fn cancel_background_command( &self, task_id: &str, ) -> Option<BackgroundCommandSnapshot>
Cancels a specific background bash command.
Auto Trait Implementations§
impl !RefUnwindSafe for ToolExecutor
impl !UnwindSafe for ToolExecutor
impl Freeze for ToolExecutor
impl Send for ToolExecutor
impl Sync for ToolExecutor
impl Unpin for ToolExecutor
impl UnsafeUnpin for ToolExecutor
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
Mutably borrows from an owned value. Read more