pub struct ToolExecutor { /* private fields */ }Implementations§
Source§impl ToolExecutor
impl ToolExecutor
pub fn with_components( backend_registry: Arc<BackendRegistry>, validators: Arc<ValidatorRegistry>, ) -> Self
pub fn with_all_components( backend_registry: Arc<BackendRegistry>, validators: Arc<ValidatorRegistry>, llm_config_provider: LlmConfigProvider, ) -> Self
pub fn with_static_tools( self, registry: Arc<ToolRegistry>, services: Arc<ToolServices>, ) -> Self
pub async fn requires_approval(&self, tool_name: &str) -> Result<bool>
pub async fn get_tool_schemas(&self) -> Vec<ToolSchema>
pub async fn get_tool_schemas_with_resolver( &self, session_resolver: Option<&dyn BackendResolver>, ) -> Vec<ToolSchema>
pub async fn get_tool_schemas_with_capabilities( &self, capabilities: Capabilities, ) -> Vec<ToolSchema>
pub async fn get_tool_schemas_with_capabilities_and_resolver( &self, capabilities: Capabilities, session_resolver: Option<&dyn BackendResolver>, ) -> Vec<ToolSchema>
pub fn is_static_tool(&self, tool_name: &str) -> bool
Sourcepub async fn supported_tools(&self) -> Vec<String>
pub async fn supported_tools(&self) -> Vec<String>
Get the list of supported tools
Sourcepub fn backend_registry(&self) -> &Arc<BackendRegistry>
pub fn backend_registry(&self) -> &Arc<BackendRegistry>
Get the backend registry
pub fn workspace(&self) -> Option<Arc<dyn Workspace>>
pub async fn execute_tool_with_session( &self, tool_call: &ToolCall, session_id: SessionId, token: CancellationToken, ) -> Result<ToolResult, ToolError>
pub async fn execute_tool_with_session_resolver( &self, tool_call: &ToolCall, session_id: SessionId, token: CancellationToken, session_resolver: Option<&dyn BackendResolver>, ) -> Result<ToolResult, ToolError>
pub async fn execute_tool_with_cancellation( &self, tool_call: &ToolCall, token: CancellationToken, ) -> Result<ToolResult, ToolError>
pub async fn execute_tool_with_resolver( &self, tool_call: &ToolCall, token: CancellationToken, session_resolver: Option<&dyn BackendResolver>, ) -> Result<ToolResult, ToolError>
Sourcepub async fn execute_tool_direct(
&self,
tool_call: &ToolCall,
token: CancellationToken,
) -> Result<ToolResult, ToolError>
pub async fn execute_tool_direct( &self, tool_call: &ToolCall, token: CancellationToken, ) -> Result<ToolResult, ToolError>
Execute a tool directly without validation - for user-initiated bash commands
Trait Implementations§
Source§impl Clone for ToolExecutor
impl Clone for ToolExecutor
Source§fn clone(&self) -> ToolExecutor
fn clone(&self) -> ToolExecutor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolExecutor
impl !RefUnwindSafe for ToolExecutor
impl Send for ToolExecutor
impl Sync for ToolExecutor
impl Unpin for ToolExecutor
impl !UnwindSafe 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request