pub struct SkillContribution {
pub name: String,
pub description: String,
pub instructions: String,
pub files: Vec<(String, String)>,
pub user_invocable: bool,
pub disable_model_invocation: bool,
}Expand description
A skill contributed by a capability in code.
Fields§
§name: StringSkill name and mount-directory name.
description: StringShort description shown in capability catalogs.
instructions: StringSKILL.md instruction body.
files: Vec<(String, String)>Bundled files mounted alongside SKILL.md.
user_invocable: boolWhether this skill is user-invocable.
disable_model_invocation: boolWhether automatic model invocation is disabled.
Implementations§
Source§impl SkillContribution
impl SkillContribution
Sourcepub fn new(
name: impl Into<String>,
description: impl Into<String>,
instructions: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, description: impl Into<String>, instructions: impl Into<String>, ) -> Self
Create a contribution with user invocation enabled and model invocation allowed.
Sourcepub fn with_files(self, files: Vec<(String, String)>) -> Self
pub fn with_files(self, files: Vec<(String, String)>) -> Self
Attach bundled files mounted alongside SKILL.md.
Sourcepub fn with_user_invocable(self, flag: bool) -> Self
pub fn with_user_invocable(self, flag: bool) -> Self
Set whether the skill is user-invocable.
Sourcepub fn with_disable_model_invocation(self, flag: bool) -> Self
pub fn with_disable_model_invocation(self, flag: bool) -> Self
Set whether model invocation is disabled.
Sourcepub fn to_mount(&self, owner_id: &str) -> MountPoint
pub fn to_mount(&self, owner_id: &str) -> MountPoint
Normalize the contribution into the read-only mount consumed by skill implementations.
Trait Implementations§
Source§impl Clone for SkillContribution
impl Clone for SkillContribution
Source§fn clone(&self) -> SkillContribution
fn clone(&self) -> SkillContribution
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 moreAuto Trait Implementations§
impl Freeze for SkillContribution
impl RefUnwindSafe for SkillContribution
impl Send for SkillContribution
impl Sync for SkillContribution
impl Unpin for SkillContribution
impl UnsafeUnpin for SkillContribution
impl UnwindSafe for SkillContribution
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