pub struct LocalToolRuntime { /* private fields */ }Expand description
Tool runtime that executes bash, read, write, edit, glob and grep directly on the local filesystem.
All tool output is capped at MAX_TOOL_CHARS characters so large
files and noisy commands don’t blow out the model’s context window.
Glob/grep skip dependency and build directories automatically.
Implementations§
Source§impl LocalToolRuntime
impl LocalToolRuntime
pub fn new(config: LocalToolConfig) -> Self
Trait Implementations§
Source§impl Clone for LocalToolRuntime
impl Clone for LocalToolRuntime
Source§fn clone(&self) -> LocalToolRuntime
fn clone(&self) -> LocalToolRuntime
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 ToolRuntime for LocalToolRuntime
impl ToolRuntime for LocalToolRuntime
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 moreSource§fn repair_invocation(
&self,
_invocation: &mut ToolInvocation,
) -> Option<Vec<ToolInputRepair>>
fn repair_invocation( &self, _invocation: &mut ToolInvocation, ) -> Option<Vec<ToolInputRepair>>
Apply schema-guided input repair in place, returning the repairs made
(or
None when the input is already clean / no schema matches). Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LocalToolRuntime
impl !UnwindSafe for LocalToolRuntime
impl Freeze for LocalToolRuntime
impl Send for LocalToolRuntime
impl Sync for LocalToolRuntime
impl Unpin for LocalToolRuntime
impl UnsafeUnpin for LocalToolRuntime
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