pub struct SkillLayer { /* private fields */ }Expand description
Optional Agent Skills extension layer.
The layer assembles progressive-disclosure prompt text and tools without
making ReActAgent own skill policy or execution.
Skill scripts are never executed by this layer.
Implementations§
Source§impl SkillLayer
impl SkillLayer
Sourcepub fn new(registry: Arc<SkillRegistry>) -> SkillLayer
pub fn new(registry: Arc<SkillRegistry>) -> SkillLayer
Constructs a progressive skill layer over a registry.
Sourcepub fn with_enabled_skills(self, names: &[&str]) -> SkillLayer
pub fn with_enabled_skills(self, names: &[&str]) -> SkillLayer
Restricts visible skills by name.
Sourcepub fn with_enabled_set(
self,
enabled: Option<Arc<HashSet<String>>>,
) -> SkillLayer
pub fn with_enabled_set( self, enabled: Option<Arc<HashSet<String>>>, ) -> SkillLayer
Restricts visible skills using a shared allowlist.
Sourcepub fn with_mode(self, mode: SkillMode) -> SkillLayer
pub fn with_mode(self, mode: SkillMode) -> SkillLayer
Sets assembly mode.
Sourcepub fn with_config(self, config: SkillLayerConfig) -> SkillLayer
pub fn with_config(self, config: SkillLayerConfig) -> SkillLayer
Sets assembly configuration.
Sourcepub fn with_layer_id(self, layer_id: impl Into<String>) -> SkillLayer
pub fn with_layer_id(self, layer_id: impl Into<String>) -> SkillLayer
Sets the layer id used in source metadata.
Sourcepub fn activation_state(&self) -> SkillActivationState
pub fn activation_state(&self) -> SkillActivationState
Returns the shared activation state.
Sourcepub fn registry(&self) -> Arc<SkillRegistry> ⓘ
pub fn registry(&self) -> Arc<SkillRegistry> ⓘ
Returns the registry backing this layer.
Sourcepub fn is_enabled(&self, name: &str) -> bool
pub fn is_enabled(&self, name: &str) -> bool
Whether a skill is visible in this layer.
Sourcepub fn activate_skill(&self, name: &str) -> bool
pub fn activate_skill(&self, name: &str) -> bool
Pins a skill into the prompt.
Sourcepub fn deactivate_skill(&self, name: &str) -> bool
pub fn deactivate_skill(&self, name: &str) -> bool
Removes a pinned skill from the prompt.
Sourcepub fn assemble(&self) -> SkillLayerAssembly
pub fn assemble(&self) -> SkillLayerAssembly
Assembles prompt text and tools for the current registry snapshot.
Sourcepub fn load_skill_source(&self) -> ToolSource
pub fn load_skill_source(&self) -> ToolSource
Source metadata for the load_skill tool produced by this layer.
Trait Implementations§
Source§impl Clone for SkillLayer
impl Clone for SkillLayer
Source§fn clone(&self) -> SkillLayer
fn clone(&self) -> SkillLayer
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 SkillLayer
impl RefUnwindSafe for SkillLayer
impl Send for SkillLayer
impl Sync for SkillLayer
impl Unpin for SkillLayer
impl UnsafeUnpin for SkillLayer
impl UnwindSafe for SkillLayer
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