pub struct PluginManifest {
pub id: String,
pub name: String,
pub version: String,
pub capabilities: Vec<PluginCapability>,
pub permissions: PluginPermissions,
pub resources: PluginResourceConfig,
pub wasm_module: Option<String>,
pub skills: Vec<String>,
pub tools: Vec<String>,
}Expand description
Plugin manifest parsed from clawft.plugin.json or .yaml.
Fields§
§id: StringUnique plugin identifier (reverse-domain, e.g., "com.example.my-plugin").
name: StringHuman-readable plugin name.
version: StringSemantic version string (must be valid semver).
capabilities: Vec<PluginCapability>Capabilities this plugin provides.
permissions: PluginPermissionsPermissions the plugin requests.
resources: PluginResourceConfigResource limits configuration.
wasm_module: Option<String>Path to the WASM module (relative to plugin directory).
skills: Vec<String>Skills provided by this plugin.
tools: Vec<String>Tools provided by this plugin.
Implementations§
Source§impl PluginManifest
impl PluginManifest
Sourcepub fn validate(&self) -> Result<(), PluginError>
pub fn validate(&self) -> Result<(), PluginError>
Validate the manifest. Returns an error describing the first
validation failure, or Ok(()) if the manifest is valid.
Sourcepub fn from_json(json: &str) -> Result<Self, PluginError>
pub fn from_json(json: &str) -> Result<Self, PluginError>
Parse a manifest from a JSON string.
Sourcepub fn from_yaml(_yaml: &str) -> Result<Self, PluginError>
pub fn from_yaml(_yaml: &str) -> Result<Self, PluginError>
Parse a manifest from a YAML string.
Note: serde_yaml is NOT a dependency of clawft-plugin to keep the
crate lightweight. YAML manifest parsing is handled in the loader
layer (C3) which calls serde_yaml::from_str() and then constructs a
PluginManifest. This method is a convenience stub.
Trait Implementations§
Source§impl Clone for PluginManifest
impl Clone for PluginManifest
Source§fn clone(&self) -> PluginManifest
fn clone(&self) -> PluginManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more