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§
- Exclusive
Reconciliation - Result of reconciling a plugin’s declared ids/filenames against a shared store for a REFUSE-on-conflict capability (MCP servers, workflow files).
- Installed
Plugin - A single installed plugin’s provenance record.
- Installed
Plugins - The full
installed.jsondocument:{ "plugins": [ ... ] }. - Registered
Capabilities - 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_idinstead. - Plugin
Install Status - Lifecycle status of a provenance row — the crash-safety journal marker.
- Plugin
Source - 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
existingids and theowned_previouslyids that THIS plugin’s prior install registered. - reconcile_
exclusive - Reconcile
declaredids 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).