pub struct SkillTool { /* private fields */ }Expand description
Load a discovered skill package’s body on demand.
Holds the discovered INDEX (names, descriptions, manifest paths) that
crate::tools::ToolRegistry::from_config resolved for this config —
never a body. The set is fixed for the tool’s lifetime, the same way the
prompt’s index section is: a skill installed mid-session appears after
the next agent construction, exactly as it would in the harnesses this
transcribes.
Implementations§
Source§impl SkillTool
impl SkillTool
Sourcepub fn new(skills: Vec<LoopSkill>) -> Self
pub fn new(skills: Vec<LoopSkill>) -> Self
Build the tool over an already-discovered skill set. Loads bodies
with no shell injection — see Self::with_shell.
Sourcepub fn with_shell(self, shell: ShellInjection) -> Self
pub fn with_shell(self, shell: ShellInjection) -> Self
BP-5: the same tool, loading bodies under shell’s authorization —
what crate::tools::ToolRegistry::from_config builds, so the tool
door and the /name door expand a body identically.
Trait Implementations§
Source§impl Tool for SkillTool
impl Tool for SkillTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
The built-in description. May be overridden via
crate::Config.Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema describing the tool’s input object.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run the tool. Returns text to feed back to the model.
Source§fn structured_output(&self) -> bool
fn structured_output(&self) -> bool
Whether a successful textual result is also a complete JSON value
that protocol adapters should expose as structured output. Text
remains the model-facing representation, preserving compatibility.
Auto Trait Implementations§
impl Freeze for SkillTool
impl RefUnwindSafe for SkillTool
impl Send for SkillTool
impl Sync for SkillTool
impl Unpin for SkillTool
impl UnsafeUnpin for SkillTool
impl UnwindSafe for SkillTool
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