pub struct SaveSkillTool { /* private fields */ }Expand description
save_skill: writes a skill the user asked to keep. It changes later behavior, so the
agent should always ask first (hob also refuses after untrusted web content in the
same message; that check belongs to the agent, which knows).
Implementations§
Trait Implementations§
Source§impl Clone for SaveSkillTool
impl Clone for SaveSkillTool
Source§impl Debug for SaveSkillTool
impl Debug for SaveSkillTool
Source§impl Tool for SaveSkillTool
impl Tool for SaveSkillTool
Source§fn access(&self, _args: &Value) -> Access
fn access(&self, _args: &Value) -> Access
Writes outside the workspace and changes later behavior: always ask.
fn spec(&self) -> ToolSpec
Source§fn title(&self, args: &Value) -> String
fn title(&self, args: &Value) -> String
Short human title for the finished call, e.g. “Wrote notes.md”.
args is untrusted.Source§fn run(&self, args: &Value, _ctx: &ToolContext<'_>) -> ToolOutput
fn run(&self, args: &Value, _ctx: &ToolContext<'_>) -> ToolOutput
Do it.
args is untrusted model output: validate everything, never panic.Source§fn pending_title(&self, _args: &Value) -> String
fn pending_title(&self, _args: &Value) -> String
Title for the call before and while it runs, and on approval cards, e.g.
“Write notes.md”. Defaults to “Run ”.
Source§fn preview(&self, args: &Value, _workspace: &Path) -> Option<Preview>
fn preview(&self, args: &Value, _workspace: &Path) -> Option<Preview>
A readable account of what the call would do, for approval cards: e.g. a diff for a
file write. Reads only, no side effects; bounded. Defaults to the key arguments.
Source§fn always_ask(&self, _args: &Value) -> Option<String>
fn always_ask(&self, _args: &Value) -> Option<String>
Some(warning) if this call must be approved by a person every time: no policy,
“always allow” grant or --auto-approve lets it run (e.g. installing system-wide).
The warning is shown on the approval card.Source§fn card(&self, _args: &Value) -> Option<Card>
fn card(&self, _args: &Value) -> Option<Card>
The card a person confirms this call on, in plain words (
Card); None: the
preview, then the arguments in full. Only used for calls that must be confirmed.Source§fn concurrent(&self) -> bool
fn concurrent(&self) -> bool
Calls of this tool start before the other calls of the same round and run side by
side, each on a thread of its own (results still go back in call order). For tools
that mostly wait, like
delegate.Source§fn repeatable(&self, _args: &Value) -> bool
fn repeatable(&self, _args: &Value) -> bool
The same call can mean something new each time, so the turn’s repeat guard (“you
already called this”) lets it through: reads of state that changes, or undo.
Auto Trait Implementations§
impl Forget for SaveSkillTool
impl Freeze for SaveSkillTool
impl Move for SaveSkillTool
impl RefUnwindSafe for SaveSkillTool
impl Send for SaveSkillToolwhere
RawVecInner: Send,
impl Sync for SaveSkillToolwhere
RawVecInner: Sync,
impl Unpin for SaveSkillTool
impl UnsafeUnpin for SaveSkillTool
impl UnwindSafe for SaveSkillToolwhere
RawVecInner: 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