mneme/plugins/manifest.rs
1use serde::{Deserialize, Serialize};
2
3/// Manifest declared by a WASM plugin via its `plugin_manifest` export.
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct PluginManifest {
6 /// Unique plugin identifier.
7 pub name: String,
8 /// Semver version string.
9 pub version: String,
10 /// Human-readable description.
11 pub description: String,
12 /// MCP tools this plugin exposes.
13 pub tools: Vec<PluginTool>,
14 /// Memory lifecycle hooks: "pre_save", "post_get".
15 #[serde(default)]
16 pub hooks: Vec<String>,
17}
18
19/// A single MCP tool declared by a plugin.
20#[derive(Debug, Clone, Serialize, Deserialize)]
21pub struct PluginTool {
22 /// Tool name (must be globally unique, e.g. "myplugin_summarize").
23 pub name: String,
24 /// Human-readable description shown to MCP clients.
25 pub description: String,
26 /// JSON Schema for the tool's input parameters.
27 pub input_schema: serde_json::Value,
28}