pub struct SetScopeTool { /* private fields */ }Expand description
Declare/replace the working scope enforced by the shared ScopeGuard.
Implementations§
Source§impl SetScopeTool
impl SetScopeTool
Sourcepub fn new(guard: Arc<ScopeGuard>) -> Self
pub fn new(guard: Arc<ScopeGuard>) -> Self
guard must be the SAME guard registered in the runner’s guardrails.
Sourcepub fn with_workspace(self, root: impl Into<PathBuf>) -> Self
pub fn with_workspace(self, root: impl Into<PathBuf>) -> Self
Set the host workspace root enabling the outside-scope redirect. Also shared with the guard so it anchors relative file paths against the same root (set_scope declares ABSOLUTE roots; the file tools pass workspace-RELATIVE paths — without a common anchor the guard falsely denied in-scope writes).
Trait Implementations§
Source§impl Tool for SetScopeTool
impl Tool for SetScopeTool
Source§fn definition(&self) -> ToolDefinition
fn definition(&self) -> ToolDefinition
Return the tool’s definition (name, description, input schema) for the LLM.
Auto Trait Implementations§
impl !Freeze for SetScopeTool
impl RefUnwindSafe for SetScopeTool
impl Send for SetScopeTool
impl Sync for SetScopeTool
impl Unpin for SetScopeTool
impl UnsafeUnpin for SetScopeTool
impl UnwindSafe for SetScopeTool
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