pub struct Tools { /* private fields */ }Expand description
Tenant-aware tool capability.
Isolate labels on Tools win over a TenantContext intercept.
Implementations§
Source§impl Tools
impl Tools
Sourcepub fn from_static(tools: impl IntoIterator<Item = Arc<dyn Tool>>) -> Tools
pub fn from_static(tools: impl IntoIterator<Item = Arc<dyn Tool>>) -> Tools
Build Tools from a static tool set. Runtime is unset.
Sourcepub fn validate_runtime_tool_execution_config(
tool_type: &str,
execution_config: &Value,
) -> Result<(), AppError>
pub fn validate_runtime_tool_execution_config( tool_type: &str, execution_config: &Value, ) -> Result<(), AppError>
Validate runtime tool execution_config without exposing the registry.
Sourcepub fn resolve(&self, ctx: &Arc<Context>, name: &str) -> Option<Arc<dyn Tool>>
pub fn resolve(&self, ctx: &Arc<Context>, name: &str) -> Option<Arc<dyn Tool>>
Resolve a tool using the tenant derived from ctx (isolate, then intercept).
Sourcepub fn list(&self, ctx: &Arc<Context>) -> Vec<ToolDefinition>
pub fn list(&self, ctx: &Arc<Context>) -> Vec<ToolDefinition>
List tools using the tenant derived from ctx (isolate, then intercept).
Sourcepub async fn execute(
&self,
ctx: &Arc<Context>,
name: &str,
args: Value,
) -> Result<Value, AppError>
pub async fn execute( &self, ctx: &Arc<Context>, name: &str, args: Value, ) -> Result<Value, AppError>
Execute a named tool, wrapping the call in tools.execute around-middleware
when EventsService is on ctx.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tools
impl !UnwindSafe for Tools
impl Freeze for Tools
impl Send for Tools
impl Sync for Tools
impl Unpin for Tools
impl UnsafeUnpin for Tools
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