Skip to main content

Module registry

Module registry 

Source
Expand description

Provenance registry: ~/.bamboo/plugins/installed.json.

Records, for each installed plugin, EXACTLY what it registered (which mcpServers ids, which skill dir names, which prompt preset ids, which workflow filenames) so uninstall/upgrade can precisely undo only what a given plugin added — never touching a user’s own hand-added entries that happen to share a config file with plugin-registered ones.

This module only defines the schema + load/save/add/remove helpers. Wiring when to call add/remove relative to actually registering/ deregistering capabilities (MCP servers, prompt presets, workflow files) is the installer’s job (see crate::installer and PLUGIN_PLAN.md).

Structs§

ExclusiveReconciliation
Result of reconciling a plugin’s declared ids/filenames against a shared store for a REFUSE-on-conflict capability (MCP servers, workflow files).
InstalledPlugin
A single installed plugin’s provenance record.
InstalledPlugins
The full installed.json document: { "plugins": [ ... ] }.
RegisteredCapabilities
Exactly what an installed plugin registered into Bamboo’s shared capability stores. Every id/name here MUST have actually been written by the installer for THIS plugin — never a superset (that would risk clobbering or removing a user’s own entries on uninstall) and never a subset (uninstall would leak orphaned registrations).

Enums§

Ownership
Ownership classification of one declared capability id/filename against a shared store, for the REFUSE-on-conflict capability kinds (MCP servers, workflow files). Prompt presets do NOT use this — they rename on collision via bamboo-server’s ensure_unique_preset_id instead.
PluginInstallStatus
Lifecycle status of a provenance row — the crash-safety journal marker.
PluginSource
Where a plugin’s installed bundle came from. Recorded verbatim so update/reinstall can re-fetch from the same place.

Functions§

classify_ownership
Classify one id against the shared store’s current existing ids and the owned_previously ids that THIS plugin’s prior install registered.
reconcile_exclusive
Reconcile declared ids against the shared store for a REFUSE-on-conflict capability. existing = every id currently in the shared store; owned_previously = the ids THIS plugin’s prior install recorded (empty for a fresh install). Pure — the caller supplies the store state (which, for MCP/workflows, only the app layer can read).