pub struct SkillHandler { /* private fields */ }Expand description
Skill registry owner with hot-reload support.
Implements Hook — on_build_agent enriches the system prompt with
matching skills based on agent tags. Tools and dispatch are no-ops
(skills inject behavior via prompt, not via tools).
Implementations§
Source§impl SkillHandler
impl SkillHandler
Sourcepub fn load(skills_dir: PathBuf) -> Result<Self>
pub fn load(skills_dir: PathBuf) -> Result<Self>
Load skills from the given directory. Tolerates a missing directory by creating an empty registry.
Sourcepub async fn reload(&self) -> Result<usize>
pub async fn reload(&self) -> Result<usize>
Reload skills from disk, replacing the entire registry. Returns the number of skills loaded.
Sourcepub fn registry(&self) -> &RwLock<SkillRegistry>
pub fn registry(&self) -> &RwLock<SkillRegistry>
Access the skill registry lock for read.
Trait Implementations§
Source§impl Hook for SkillHandler
impl Hook for SkillHandler
Source§fn on_build_agent(&self, config: AgentConfig) -> AgentConfig
fn on_build_agent(&self, config: AgentConfig) -> AgentConfig
Source§fn on_event(&self, _agent: &str, _event: &AgentEvent)
fn on_event(&self, _agent: &str, _event: &AgentEvent)
Called by Runtime after each agent step during execution. Read more
Source§fn on_register_tools(
&self,
_tools: &mut ToolRegistry,
) -> impl Future<Output = ()> + Send
fn on_register_tools( &self, _tools: &mut ToolRegistry, ) -> impl Future<Output = ()> + Send
Called by
Runtime::new() to register tools into the shared registry. Read moreAuto Trait Implementations§
impl !Freeze for SkillHandler
impl !RefUnwindSafe for SkillHandler
impl Send for SkillHandler
impl Sync for SkillHandler
impl Unpin for SkillHandler
impl UnsafeUnpin for SkillHandler
impl UnwindSafe for SkillHandler
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