Skip to main content

SkillSource

Trait SkillSource 

Source
pub trait SkillSource: Send + Sync {
    // Required methods
    fn list(&self) -> Vec<SkillManifestRef>;
    fn fetch(&self, id: &str) -> Result<Skill, String>;
    fn layer(&self) -> Layer;
    fn describe(&self) -> String;
}
Expand description

Abstract skill source. Implementations are Send so we can hand them to async code paths in the future; today everything is sync.

Required Methods§

Source

fn list(&self) -> Vec<SkillManifestRef>

Enumerate skills without loading bodies. Callers use this to produce the shadowing table before paying to read every file.

Source

fn fetch(&self, id: &str) -> Result<Skill, String>

Load a specific skill by id. Must be deterministic for the id returned by list().

Source

fn layer(&self) -> Layer

Layer this source represents. Used for shadowing + provenance.

Source

fn describe(&self) -> String

Human-readable label for diagnostics (e.g. the root directory).

Implementors§