pub struct BoundedToolRuntime<R> { /* private fields */ }Expand description
Decorates any ToolRuntime with repair + validation + tracing + a
safety-net output cap. Construct via BoundedToolRuntime::new.
Implementations§
Source§impl<R: ToolRuntime> BoundedToolRuntime<R>
impl<R: ToolRuntime> BoundedToolRuntime<R>
Trait Implementations§
Source§impl<R: Clone> Clone for BoundedToolRuntime<R>
impl<R: Clone> Clone for BoundedToolRuntime<R>
Source§fn clone(&self) -> BoundedToolRuntime<R>
fn clone(&self) -> BoundedToolRuntime<R>
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<R: ToolRuntime> ToolRuntime for BoundedToolRuntime<R>
impl<R: ToolRuntime> ToolRuntime for BoundedToolRuntime<R>
Source§fn repair_invocation(
&self,
inv: &mut ToolInvocation,
) -> Option<Vec<ToolInputRepair>>
fn repair_invocation( &self, inv: &mut ToolInvocation, ) -> Option<Vec<ToolInputRepair>>
Schema-guided repair, the single source of truth. Idempotent:
re-running on already-clean input returns None.
fn specs(&self) -> Vec<ToolSpec>
fn invoke<'life0, 'async_trait>(
&'life0 self,
inv: ToolInvocation,
) -> Pin<Box<dyn Future<Output = Result<ToolOutcome, ToolRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn invoke_cancellable<'life0, 'life1, 'async_trait>(
&'life0 self,
inv: ToolInvocation,
cancel: Option<&'life1 CancellationToken>,
) -> Pin<Box<dyn Future<Output = Result<ToolOutcome, ToolRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invoke_cancellable<'life0, 'life1, 'async_trait>(
&'life0 self,
inv: ToolInvocation,
cancel: Option<&'life1 CancellationToken>,
) -> Pin<Box<dyn Future<Output = Result<ToolOutcome, ToolRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancellation-aware variant of
invoke. When cancel is fired
the runtime SHOULD abort the in-flight tool (e.g. SIGTERM the
shell subprocess for bash) and return ToolRuntimeError:: Runtime("cancelled"). Read moreAuto Trait Implementations§
impl<R> Freeze for BoundedToolRuntime<R>where
R: Freeze,
impl<R> RefUnwindSafe for BoundedToolRuntime<R>where
R: RefUnwindSafe,
impl<R> Send for BoundedToolRuntime<R>where
R: Send,
impl<R> Sync for BoundedToolRuntime<R>where
R: Sync,
impl<R> Unpin for BoundedToolRuntime<R>where
R: Unpin,
impl<R> UnsafeUnpin for BoundedToolRuntime<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for BoundedToolRuntime<R>where
R: UnwindSafe,
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