pub struct ToolRegistryV1 { /* private fields */ }Implementations§
Source§impl ToolRegistryV1
impl ToolRegistryV1
pub fn register_enabled( &mut self, descriptor: ToolDescriptorV1, enabled: bool, ) -> bool
pub fn register_enabled_with_repo_read_dispatcher( &mut self, descriptor: ToolDescriptorV1, enabled: bool, sandbox_root: impl AsRef<Path>, ) -> Result<bool>
Sourcepub fn register_enabled_with_custom_executor(
&mut self,
descriptor: ToolDescriptorV1,
enabled: bool,
executor: Arc<dyn CustomToolExecutor>,
) -> bool
pub fn register_enabled_with_custom_executor( &mut self, descriptor: ToolDescriptorV1, enabled: bool, executor: Arc<dyn CustomToolExecutor>, ) -> bool
Register a tool with a custom async executor.
The executor implements CustomToolExecutor and will be called
when the tool is dispatched during the agent loop.
pub fn with_sandbox_root(self, sandbox_root: impl AsRef<Path>) -> Result<Self>
pub fn sandbox_root(&self) -> Option<&Path>
pub fn contains_tool_id(&self, tool_id: &str) -> bool
pub fn descriptor(&self, tool_id: &str) -> Option<&ToolDescriptorV1>
pub fn descriptors(&self) -> Vec<ToolDescriptorV1>
pub fn tool_ids(&self) -> Vec<String>
pub fn executable_tool_ids(&self) -> Vec<String>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn expose_read_only(&self) -> ToolExposureSetV1
pub fn can_execute(&self, tool_id: &str) -> bool
pub fn plan_exposure(&self, policy: &ToolExposurePolicyV1) -> ToolExposureSetV1
pub fn plan_exposure_with_declarations( &self, policy: &ToolExposurePolicyV1, declarations: Vec<ToolDescriptorV1>, ) -> ToolExposureSetV1
pub fn declared_not_registered_tool_ids( &self, declarations: &[ToolDescriptorV1], ) -> Vec<String>
pub fn safe_coding_with_dispatchers( sandbox_root: impl AsRef<Path>, ) -> Result<Self>
Trait Implementations§
Source§impl Clone for ToolRegistryV1
impl Clone for ToolRegistryV1
Source§fn clone(&self) -> ToolRegistryV1
fn clone(&self) -> ToolRegistryV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolRegistryV1
impl Debug for ToolRegistryV1
Source§impl Default for ToolRegistryV1
impl Default for ToolRegistryV1
Source§fn default() -> ToolRegistryV1
fn default() -> ToolRegistryV1
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ToolRegistryV1
impl !UnwindSafe for ToolRegistryV1
impl Freeze for ToolRegistryV1
impl Send for ToolRegistryV1
impl Sync for ToolRegistryV1
impl Unpin for ToolRegistryV1
impl UnsafeUnpin for ToolRegistryV1
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