pub struct LocalToolConfig {
pub cwd: Option<PathBuf>,
pub approval: Arc<dyn ApprovalGate>,
pub emit: EmitFn,
}Expand description
Configuration for LocalToolRuntime.
Fields§
§cwd: Option<PathBuf>Absolute path to the working directory for all tool operations.
Relative paths inside tool arguments are resolved against this.
Defaults to the process’s std::env::current_dir() when None.
approval: Arc<dyn ApprovalGate>Controls which tool calls are allowed and which tool specs are
advertised to the model. Typically YoloApproval, PlanApproval,
or a custom gate (e.g. TauriApproval in a desktop app).
emit: EmitFnReceives structured events produced during tool execution.
Most callers forward these to a UI channel. Pass Arc::new(|_| {})
to discard them.
Auto Trait Implementations§
impl !RefUnwindSafe for LocalToolConfig
impl !UnwindSafe for LocalToolConfig
impl Freeze for LocalToolConfig
impl Send for LocalToolConfig
impl Sync for LocalToolConfig
impl Unpin for LocalToolConfig
impl UnsafeUnpin for LocalToolConfig
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