Skip to main content

PluginInstaller

Trait PluginInstaller 

Source
pub trait PluginInstaller {
    // Required methods
    fn install<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        manifest: &'life1 PluginManifest,
        plugin_dir: &'life2 Path,
        source: PluginSource,
        disposition: InstallDisposition,
        installed_at: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = PluginResult<InstalledPlugin>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn uninstall<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<InstalledPlugin>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The installer method surface. install/uninstall/list are the verbs the CLI (bamboo plugin install/list/remove/update) and the HTTP routes (/api/v1/plugins) both call through.

Required Methods§

Source

fn install<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, manifest: &'life1 PluginManifest, plugin_dir: &'life2 Path, source: PluginSource, disposition: InstallDisposition, installed_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = PluginResult<InstalledPlugin>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Install (or, with InstallDisposition::Upgrade, upgrade) a plugin already unpacked at plugin_dir (source handling — copying a local dir, unpacking a .tar.gz, fetching+verifying a URL + selecting the per-platform artifact — happens BEFORE this is called; by the time install runs, plugin_dir already contains plugin.json plus the skills//prompts//workflows//bin/ layout the manifest declares).

Contract (see the module docs for the full rationale):

Source

fn uninstall<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reverse everything install registered for id (stop + remove MCP servers, remove prompt presets, remove workflow files), then remove the provenance entry and delete plugin_dir from disk. Safe by construction: the provenance registered set only ever names plugin-created entries (invariant 1 in the module docs).

Source

fn list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<InstalledPlugin>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

All currently-installed plugins (a thin read of installed.json).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§