pub struct SkillCatalog { /* private fields */ }Expand description
Registry of available skills.
In the progressive-disclosure model the catalog has one responsibility:
know what skills exist (name + description) and build the dynamic
skill meta-tool schema that is included in every CallLLM action so
the model can invoke any skill by name.
Skill content is never held here — it is returned to the LLM as a regular tool-call result by the SDK layer (read from disk on demand).
Implementations§
Source§impl SkillCatalog
impl SkillCatalog
pub fn new() -> Self
Sourcepub fn set_available(&mut self, skills: Vec<SkillMetadata>)
pub fn set_available(&mut self, skills: Vec<SkillMetadata>)
Replace the full available-skills set in one shot.
Sourcepub fn upsert_available(&mut self, skill: SkillMetadata)
pub fn upsert_available(&mut self, skill: SkillMetadata)
Add or replace a single skill entry.
pub fn available_count(&self) -> usize
Sourcepub fn allowed_tools(&self, name: &str) -> &[CompactString]
pub fn allowed_tools(&self, name: &str) -> &[CompactString]
P1-B tool gating: the tool ids the named skill declares it needs. Empty when the skill is
unknown or declares none (⇒ that skill does not narrow the toolset). The kernel unions these
across the active-skill set in emit_call_llm.
pub fn is_empty(&self) -> bool
Sourcepub fn build_tool_schema(&self) -> Option<ToolSchema>
pub fn build_tool_schema(&self) -> Option<ToolSchema>
Build the dynamic skill meta-tool schema to inject into every LLM call.
Returns None when no skills are registered (nothing to inject).
The description field embeds the full <available_skills> XML so
the model learns what is available without a separate system message.