Skip to main content

AgentPlugin

Trait AgentPlugin 

Source
pub trait AgentPlugin: Send + Sync {
    // Required methods
    fn manifest(&self) -> &PluginManifest;
    fn lease(
        &self,
        context: &PluginMountContext,
        config: &Value,
    ) -> Box<dyn PluginLease>;
    fn activate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        context: &'life1 PluginMountContext,
        config: &'life2 Value,
        registrar: &'life3 mut AgentRegistrar<'life4>,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
}
Expand description

Trusted deployment-time extension compiled into the host.

Required Methods§

Source

fn manifest(&self) -> &PluginManifest

Static manifest.

Source

fn lease( &self, context: &PluginMountContext, config: &Value, ) -> Box<dyn PluginLease>

Creates the cleanup lease before activation performs any side effects. The lease must be safe to unmount before, during, or after activation.

Source

fn activate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, context: &'life1 PluginMountContext, config: &'life2 Value, registrar: &'life3 mut AgentRegistrar<'life4>, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Contribute prompts, tools, contexts and hooks for one mount.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§