pub enum PluginError {
InvalidManifest(String),
NotFound(String),
AlreadyInstalled(String),
Conflict {
kind: &'static str,
name: String,
plugin_id: String,
},
UnsupportedPlatform {
plugin_id: String,
platform: String,
},
NotImplemented(String),
Registration(String),
ArtifactVerificationFailed(String),
Io(Error),
Json(Error),
}Variants§
InvalidManifest(String)
plugin.json failed structural validation (see
crate::manifest::PluginManifest::validate) — includes bad ids,
bad semver shape, path-traversal attempts, duplicate ids, etc.
NotFound(String)
No installed plugin with this id (uninstall/lookup).
AlreadyInstalled(String)
A plugin with this id is already installed and install was called
with crate::installer::InstallDisposition::FailIfInstalled (the
bamboo plugin install verb). Re-run as an upgrade
(bamboo plugin update / crate::installer::InstallDisposition::Upgrade)
to replace it in place.
Conflict
A capability the plugin declares collides with an existing entry in a
shared store that is NOT owned by this plugin (a user’s own entry, or
another plugin’s). For MCP servers and workflows the install REFUSES
rather than clobbering — an MCP server id / workflow filename is
referenced elsewhere, so silently overwriting (and later deleting on
uninstall) would destroy the user’s entry. kind is a short label
such as "mcp server" or "workflow".
UnsupportedPlatform
The manifest’s platforms gate excludes the current OS.
NotImplemented(String)
A step this foundation crate deliberately leaves for a later agent
(capability-registration wiring — see PLUGIN_PLAN.md). Returned
instead of panicking so a partially-stacked branch fails a request
cleanly rather than crashing the process.
Registration(String)
A capability failed to register/deregister against AppState for a
reason OTHER than an ownership conflict (e.g. config.json couldn’t
be persisted, a network fetch during source-staging failed). Kept
distinct from Self::Conflict (a deliberate REFUSAL, not a
failure) so callers/HTTP status mapping can tell “your plugin
collides with something” apart from “something broke while trying to
register/fetch it”.
ArtifactVerificationFailed(String)
A downloaded artifact’s sha256 did not match the manifest’s declared
hash. Checked BEFORE unpacking (supply-chain: a URL-installed plugin
ships a binary that will be executed) — never surfaced as a generic
Registration/InvalidManifest error so callers can distinguish “the
author’s manifest is malformed” from “the bytes served at that URL do
not match what the manifest promised”.
Io(Error)
Json(Error)
Trait Implementations§
Source§impl Debug for PluginError
impl Debug for PluginError
Source§impl Display for PluginError
impl Display for PluginError
Source§impl Error for PluginError
impl Error for PluginError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()