pub struct InMemorySkillRegistry { /* private fields */ }Expand description
Default in-memory SkillRegistry.
An empty skill id is rejected with SkillError::InvalidRequest.
Registering an id that is already present replaces the previous
descriptor and handler. list returns descriptors in ascending id
order.
Implementations§
Trait Implementations§
Source§impl Default for InMemorySkillRegistry
impl Default for InMemorySkillRegistry
Source§impl SkillRegistry for InMemorySkillRegistry
impl SkillRegistry for InMemorySkillRegistry
Source§fn register_manifest<'life0, 'async_trait>(
&'life0 self,
card: SkillCard,
handler: Arc<dyn SkillHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_manifest<'life0, 'async_trait>(
&'life0 self,
card: SkillCard,
handler: Arc<dyn SkillHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register a manifest-backed skill. The
params_schema field of the
returned descriptor is derived from card.input_schema (single
source of truth).Source§fn register_programmatic<'life0, 'async_trait>(
&'life0 self,
agent_skill: AgentSkill,
params_schema: Option<Value>,
handler: Arc<dyn SkillHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_programmatic<'life0, 'async_trait>(
&'life0 self,
agent_skill: AgentSkill,
params_schema: Option<Value>,
handler: Arc<dyn SkillHandler>,
) -> Pin<Box<dyn Future<Output = Result<(), SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register a programmatic skill with an optional one-shot schema.
The supplied schema becomes
params_schema; there is no second
surface that can override it.Source§fn describe<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<SkillDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn describe<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<SkillDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Describe a registered skill.
Auto Trait Implementations§
impl !Freeze for InMemorySkillRegistry
impl Forget for InMemorySkillRegistry
impl Move for InMemorySkillRegistry
impl RefUnwindSafe for InMemorySkillRegistry
impl Send for InMemorySkillRegistry
impl Sync for InMemorySkillRegistry
impl Unpin for InMemorySkillRegistry
impl UnsafeUnpin for InMemorySkillRegistry
impl UnwindSafe for InMemorySkillRegistry
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