pub struct SkillRegistry { /* private fields */ }Expand description
Name-indexed collection of skills with override priority.
Later registrations with the same name override earlier ones, implementing the priority chain: Bundled < Managed < Project < User.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
pub fn new() -> Self
Sourcepub fn inject_skills_from_dir(
&mut self,
dir: &Path,
source: SkillSource,
) -> Result<()>
pub fn inject_skills_from_dir( &mut self, dir: &Path, source: SkillSource, ) -> Result<()>
Load all .md files from dir and register them with the given source.
Sourcepub fn load_bundled_skills(&mut self)
pub fn load_bundled_skills(&mut self)
Load all skills bundled with the crate and register them.
Sourcepub fn retrieve(&self, query: &str, limit: usize) -> Vec<&Skill>
pub fn retrieve(&self, query: &str, limit: usize) -> Vec<&Skill>
Retrieve the most relevant skills for a free-text query.
Sourcepub fn render_index_for_prompt(&self) -> String
pub fn render_index_for_prompt(&self) -> String
Render a compact skill index for lightweight prompt injection.
Sourcepub fn render_for_prompt(&self) -> String
pub fn render_for_prompt(&self) -> String
Render the skills list for injection into the system prompt.
Trait Implementations§
Source§impl Clone for SkillRegistry
impl Clone for SkillRegistry
Source§fn clone(&self) -> SkillRegistry
fn clone(&self) -> SkillRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkillRegistry
impl Debug for SkillRegistry
Source§impl Default for SkillRegistry
impl Default for SkillRegistry
Source§fn default() -> SkillRegistry
fn default() -> SkillRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SkillRegistry
impl RefUnwindSafe for SkillRegistry
impl Send for SkillRegistry
impl Sync for SkillRegistry
impl Unpin for SkillRegistry
impl UnsafeUnpin for SkillRegistry
impl UnwindSafe for SkillRegistry
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