pub struct AdapterToolDispatcher { /* private fields */ }Expand description
Runs a model tool call by mapping "{adapter}__{actionId}" back to an
adapter action: it synthesizes a node from the model’s args (plus the AI
node’s workspace as workspaceRoot/cwd) and executes it through the bound
adapter, so all existing sandboxing/policy applies.
Implementations§
Source§impl AdapterToolDispatcher
impl AdapterToolDispatcher
pub fn new(adapters: Arc<AdapterRegistry>, workspace: Option<String>) -> Self
Sourcepub fn with_observer(self, observer: ToolObserver) -> Self
pub fn with_observer(self, observer: ToolObserver) -> Self
Attach a ToolObserver so each dispatched call emits a ToolCall
event for live UI granularity.
Trait Implementations§
Source§impl ToolDispatcher for AdapterToolDispatcher
impl ToolDispatcher for AdapterToolDispatcher
Auto Trait Implementations§
impl Freeze for AdapterToolDispatcher
impl !RefUnwindSafe for AdapterToolDispatcher
impl Send for AdapterToolDispatcher
impl Sync for AdapterToolDispatcher
impl Unpin for AdapterToolDispatcher
impl UnsafeUnpin for AdapterToolDispatcher
impl !UnwindSafe for AdapterToolDispatcher
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