Skip to main content

Crate bamboo_plugin

Crate bamboo_plugin 

Source
Expand description

Foundation for Bamboo’s local plugin system.

A plugin is a locally-installed bundle that can provide any of: skills, MCP servers, prompt presets, and (future) workflows. It is installed to ~/.bamboo/plugins/<id>/ (see bamboo_config::paths::plugin_dir), keeping the plugin’s own files together (manifest, skills, prompts, workflows, optional per-platform binaries), then REGISTERED into Bamboo’s existing capability locations:

CapabilityRegistered intoDiscovery model
MCP serversconfig.json (Config.mcp) + mcp_manager.start_servercopied into shared config
SkillsN/A — discovered in place~/.bamboo/plugins/*/skills is an additional SkillDiscoveryDir (see bamboo-skills)
Prompt presetsprompt-presets.jsoncopied into shared store
Workflows~/.bamboo/workflows/*.mdcopied into shared dir (no discovery-dir mechanism exists yet)

This crate defines the shared skeleton three things build on:

  1. manifest::PluginManifest — the plugin.json schema, with validation and the ${plugin_dir}/${platform_bin} token-substitution contract for MCP stdio commands (see the manifest module docs for the full contract).
  2. registry::InstalledPlugins — the ~/.bamboo/plugins/installed.json provenance registry (load/save/add/remove), recording exactly what each plugin registered so uninstall/upgrade is precise.
  3. installer::PluginInstaller — the trait later agents implement to actually wire capability registration (that wiring needs AppState, which this infra-layer crate intentionally does not depend on).

See the repo-root PLUGIN_PLAN.md (temporary, deleted before final merge) for how the remaining work is split across parallel agents, and examples/hello-plugin/ for a minimal end-to-end reference plugin (one skill + one prompt preset, no binary, no MCP server).

Re-exports§

pub use error::PluginError;
pub use error::PluginResult;
pub use installer::load_previous_for_disposition;
pub use installer::on_disk_skill_dirs;
pub use installer::preflight_install;
pub use installer::InstallDisposition;
pub use installer::LocalPluginInstaller;
pub use installer::PluginInstaller;
pub use manifest::McpServerManifestEntry;
pub use manifest::McpTransportManifest;
pub use manifest::Platform;
pub use manifest::PluginArtifact;
pub use manifest::PluginManifest;
pub use manifest::PluginPromptPreset;
pub use manifest::PluginProvides;
pub use registry::classify_ownership;
pub use registry::reconcile_exclusive;
pub use registry::ExclusiveReconciliation;
pub use registry::InstalledPlugin;
pub use registry::InstalledPlugins;
pub use registry::Ownership;
pub use registry::PluginInstallStatus;
pub use registry::PluginSource;
pub use registry::RegisteredCapabilities;

Modules§

error
Error type shared by manifest validation, provenance I/O, and the installer trait.
installer
The PluginInstaller trait — the method surface later agents implement.
manifest
plugin.json manifest schema.
registry
Provenance registry: ~/.bamboo/plugins/installed.json.