musonda 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/IMPLEMENTATION.md +432 -0
- package/README.md +119 -0
- package/dist/agent/harness.d.ts +25 -0
- package/dist/agent/harness.js +215 -0
- package/dist/agent/harness.js.map +1 -0
- package/dist/agent/openaiResponsesClient.d.ts +35 -0
- package/dist/agent/openaiResponsesClient.js +250 -0
- package/dist/agent/openaiResponsesClient.js.map +1 -0
- package/dist/agent/systemPrompt.d.ts +9 -0
- package/dist/agent/systemPrompt.js +100 -0
- package/dist/agent/systemPrompt.js.map +1 -0
- package/dist/agent/types.d.ts +53 -0
- package/dist/agent/types.js +2 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/cli/commands/chat.d.ts +6 -0
- package/dist/cli/commands/chat.js +8 -0
- package/dist/cli/commands/chat.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +4 -0
- package/dist/cli/commands/doctor.js +336 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/gateway.d.ts +20 -0
- package/dist/cli/commands/gateway.js +135 -0
- package/dist/cli/commands/gateway.js.map +1 -0
- package/dist/cli/commands/help.d.ts +4 -0
- package/dist/cli/commands/help.js +159 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/plugins.d.ts +18 -0
- package/dist/cli/commands/plugins.js +250 -0
- package/dist/cli/commands/plugins.js.map +1 -0
- package/dist/cli/commands/service.d.ts +16 -0
- package/dist/cli/commands/service.js +136 -0
- package/dist/cli/commands/service.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +4 -0
- package/dist/cli/commands/setup.js +8 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/status.d.ts +4 -0
- package/dist/cli/commands/status.js +73 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/update.d.ts +22 -0
- package/dist/cli/commands/update.js +226 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/daemon.d.ts +33 -0
- package/dist/cli/daemon.js +208 -0
- package/dist/cli/daemon.js.map +1 -0
- package/dist/cli/interactiveMenu.d.ts +5 -0
- package/dist/cli/interactiveMenu.js +225 -0
- package/dist/cli/interactiveMenu.js.map +1 -0
- package/dist/cli/musondaCli.d.ts +30 -0
- package/dist/cli/musondaCli.js +269 -0
- package/dist/cli/musondaCli.js.map +1 -0
- package/dist/cli/ui.d.ts +49 -0
- package/dist/cli/ui.js +90 -0
- package/dist/cli/ui.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +315 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/loader.d.ts +12 -0
- package/dist/config/loader.js +217 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/paths.d.ts +11 -0
- package/dist/config/paths.js +18 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/types.d.ts +246 -0
- package/dist/config/types.js +155 -0
- package/dist/config/types.js.map +1 -0
- package/dist/gateway/channels/cli.d.ts +37 -0
- package/dist/gateway/channels/cli.js +298 -0
- package/dist/gateway/channels/cli.js.map +1 -0
- package/dist/gateway/channels/discord.d.ts +18 -0
- package/dist/gateway/channels/discord.js +419 -0
- package/dist/gateway/channels/discord.js.map +1 -0
- package/dist/gateway/channels/slack.d.ts +26 -0
- package/dist/gateway/channels/slack.js +470 -0
- package/dist/gateway/channels/slack.js.map +1 -0
- package/dist/gateway/channels/webhook.d.ts +18 -0
- package/dist/gateway/channels/webhook.js +49 -0
- package/dist/gateway/channels/webhook.js.map +1 -0
- package/dist/gateway/http.d.ts +33 -0
- package/dist/gateway/http.js +605 -0
- package/dist/gateway/http.js.map +1 -0
- package/dist/gateway/server.d.ts +38 -0
- package/dist/gateway/server.js +233 -0
- package/dist/gateway/server.js.map +1 -0
- package/dist/gateway/types.d.ts +28 -0
- package/dist/gateway/types.js +2 -0
- package/dist/gateway/types.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/memory/memoryManager.d.ts +22 -0
- package/dist/memory/memoryManager.js +200 -0
- package/dist/memory/memoryManager.js.map +1 -0
- package/dist/memory/storage.d.ts +24 -0
- package/dist/memory/storage.js +187 -0
- package/dist/memory/storage.js.map +1 -0
- package/dist/memory/types.d.ts +43 -0
- package/dist/memory/types.js +2 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/plugins/manifest.d.ts +23 -0
- package/dist/plugins/manifest.js +185 -0
- package/dist/plugins/manifest.js.map +1 -0
- package/dist/plugins/mcp/mcpBridge.d.ts +31 -0
- package/dist/plugins/mcp/mcpBridge.js +115 -0
- package/dist/plugins/mcp/mcpBridge.js.map +1 -0
- package/dist/plugins/mcp/mcpClient.d.ts +43 -0
- package/dist/plugins/mcp/mcpClient.js +309 -0
- package/dist/plugins/mcp/mcpClient.js.map +1 -0
- package/dist/plugins/mcp/mcpConfig.d.ts +34 -0
- package/dist/plugins/mcp/mcpConfig.js +326 -0
- package/dist/plugins/mcp/mcpConfig.js.map +1 -0
- package/dist/plugins/mcp/types.d.ts +48 -0
- package/dist/plugins/mcp/types.js +2 -0
- package/dist/plugins/mcp/types.js.map +1 -0
- package/dist/plugins/pluginManager.d.ts +164 -0
- package/dist/plugins/pluginManager.js +1016 -0
- package/dist/plugins/pluginManager.js.map +1 -0
- package/dist/plugins/skills/frontmatterParser.d.ts +28 -0
- package/dist/plugins/skills/frontmatterParser.js +189 -0
- package/dist/plugins/skills/frontmatterParser.js.map +1 -0
- package/dist/plugins/skills/skillDiscovery.d.ts +15 -0
- package/dist/plugins/skills/skillDiscovery.js +148 -0
- package/dist/plugins/skills/skillDiscovery.js.map +1 -0
- package/dist/plugins/skills/skillTools.d.ts +8 -0
- package/dist/plugins/skills/skillTools.js +195 -0
- package/dist/plugins/skills/skillTools.js.map +1 -0
- package/dist/plugins/skills/types.d.ts +25 -0
- package/dist/plugins/skills/types.js +2 -0
- package/dist/plugins/skills/types.js.map +1 -0
- package/dist/plugins/types.d.ts +30 -0
- package/dist/plugins/types.js +2 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +25 -0
- package/dist/scheduler/scheduler.js +239 -0
- package/dist/scheduler/scheduler.js.map +1 -0
- package/dist/scheduler/types.d.ts +39 -0
- package/dist/scheduler/types.js +2 -0
- package/dist/scheduler/types.js.map +1 -0
- package/dist/security/childProcessEnv.d.ts +5 -0
- package/dist/security/childProcessEnv.js +42 -0
- package/dist/security/childProcessEnv.js.map +1 -0
- package/dist/security/fileSandbox.d.ts +153 -0
- package/dist/security/fileSandbox.js +779 -0
- package/dist/security/fileSandbox.js.map +1 -0
- package/dist/service/index.d.ts +30 -0
- package/dist/service/index.js +41 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/systemd.d.ts +36 -0
- package/dist/service/systemd.js +409 -0
- package/dist/service/systemd.js.map +1 -0
- package/dist/service/types.d.ts +118 -0
- package/dist/service/types.js +6 -0
- package/dist/service/types.js.map +1 -0
- package/dist/tools/builtin/calcTools.d.ts +2 -0
- package/dist/tools/builtin/calcTools.js +51 -0
- package/dist/tools/builtin/calcTools.js.map +1 -0
- package/dist/tools/builtin/fileTools.d.ts +11 -0
- package/dist/tools/builtin/fileTools.js +352 -0
- package/dist/tools/builtin/fileTools.js.map +1 -0
- package/dist/tools/builtin/memoryTools.d.ts +4 -0
- package/dist/tools/builtin/memoryTools.js +123 -0
- package/dist/tools/builtin/memoryTools.js.map +1 -0
- package/dist/tools/builtin/noteTools.d.ts +4 -0
- package/dist/tools/builtin/noteTools.js +91 -0
- package/dist/tools/builtin/noteTools.js.map +1 -0
- package/dist/tools/builtin/pluginTools.d.ts +29 -0
- package/dist/tools/builtin/pluginTools.js +406 -0
- package/dist/tools/builtin/pluginTools.js.map +1 -0
- package/dist/tools/builtin/scheduleTools.d.ts +4 -0
- package/dist/tools/builtin/scheduleTools.js +156 -0
- package/dist/tools/builtin/scheduleTools.js.map +1 -0
- package/dist/tools/builtin/timeTools.d.ts +2 -0
- package/dist/tools/builtin/timeTools.js +41 -0
- package/dist/tools/builtin/timeTools.js.map +1 -0
- package/dist/tools/builtin/webTools.d.ts +12 -0
- package/dist/tools/builtin/webTools.js +325 -0
- package/dist/tools/builtin/webTools.js.map +1 -0
- package/dist/tools/registry.d.ts +15 -0
- package/dist/tools/registry.js +111 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +41 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/utils/logger.d.ts +29 -0
- package/dist/utils/logger.js +124 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/wizard/onboarding.d.ts +3 -0
- package/dist/wizard/onboarding.js +408 -0
- package/dist/wizard/onboarding.js.map +1 -0
- package/package.json +69 -0
- package/plugins/example-calc/mcp.json +11 -0
- package/plugins/example-calc/plugin.json +12 -0
- package/plugins/example-calc/server.mjs +92 -0
- package/plugins/example-calc/skills/math-assistant/SKILL.md +15 -0
- package/plugins/plugin-builder/plugin.json +12 -0
- package/plugins/plugin-builder/skills/create-plugin/SKILL.md +149 -0
- package/plugins/plugin-builder/skills/manage-plugins/SKILL.md +157 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-plugin
|
|
3
|
+
description: Comprehensive workflow and architectural guide for creating, packaging, and dynamically registering new Agent Plugins, Agent Skills, and MCP tools in Musonda.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Musonda Team
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Agent Plugin & Skill Creation Guide
|
|
11
|
+
|
|
12
|
+
Use this skill whenever the user asks you to:
|
|
13
|
+
- Create, scaffold, or add a new plugin.
|
|
14
|
+
- Create new Agent Skills or teach Musonda new workflows.
|
|
15
|
+
- Integrate Model Context Protocol (MCP) servers or tools.
|
|
16
|
+
- Reload, manage, or inspect plugins in the live runtime.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Plugin Architecture & Structure
|
|
21
|
+
|
|
22
|
+
Every Musonda plugin is a self-contained directory containing a manifest, optional skills, and optional MCP servers according to the open [agent-plugins.org](https://agent-plugins.org) standard:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
plugins/<plugin-name>/
|
|
26
|
+
├── plugin.json # Required: Plugin manifest ($schema: https://agent-plugins.org/schemas/1.0.0/plugin.schema.json)
|
|
27
|
+
├── mcp.json # Optional: MCP server definitions ($schema: https://agent-plugins.org/schemas/1.0.0/mcp.schema.json)
|
|
28
|
+
└── skills/ # Optional: Agent Skills directory
|
|
29
|
+
└── <skill-name>/ # Subdirectory matching the skill name exactly
|
|
30
|
+
├── SKILL.md # Required: Markdown with YAML frontmatter
|
|
31
|
+
├── scripts/ # Optional: Bundled executable scripts
|
|
32
|
+
└── references/ # Optional: Reference documents or examples
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. Plugin Manifest Specifications (`plugin.json`)
|
|
38
|
+
|
|
39
|
+
The manifest file must follow the [agent-plugins.org](https://agent-plugins.org) specification:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
44
|
+
"name": "my-plugin",
|
|
45
|
+
"version": "1.0.0",
|
|
46
|
+
"description": "Clear explanation of what the plugin does.",
|
|
47
|
+
"author": {
|
|
48
|
+
"name": "Your Name",
|
|
49
|
+
"email": "user@example.com"
|
|
50
|
+
},
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"keywords": ["tools", "automation"]
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Critical Rules:
|
|
57
|
+
1. **`name`**: Must be 1–64 characters, lowercase alphanumeric with single hyphens or dots (regex: `^[a-z0-9]+([.-][a-z0-9]+)*$`). Cannot contain uppercase, consecutive hyphens (`--`), consecutive dots (`..`), or leading/trailing hyphens.
|
|
58
|
+
2. **`$schema`**: Must be `"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"`.
|
|
59
|
+
3. **Closed Top-Level**: Unknown fields will generate non-fatal warnings. Client-specific fields must be placed under `extensions`.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3. Designing Agent Skills (`SKILL.md`)
|
|
64
|
+
|
|
65
|
+
Each skill lives under `skills/<skill-name>/SKILL.md`. The directory name **must match** the `name` property in the frontmatter:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
---
|
|
69
|
+
name: my-skill
|
|
70
|
+
description: Concise description used by Musonda for progressive disclosure. Explain WHEN to invoke this skill.
|
|
71
|
+
license: MIT
|
|
72
|
+
metadata:
|
|
73
|
+
author: Musonda
|
|
74
|
+
version: "1.0.0"
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# My Skill Instructions
|
|
78
|
+
|
|
79
|
+
Detailed step-by-step instructions for the assistant.
|
|
80
|
+
|
|
81
|
+
### Guidelines
|
|
82
|
+
1. Step-by-step reasoning or rules.
|
|
83
|
+
2. What tools to call (e.g., connected MCP tools or file tools).
|
|
84
|
+
3. Output format expectations.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Progressive Disclosure:
|
|
88
|
+
- Musonda automatically registers all discovered skills into the runtime.
|
|
89
|
+
- The assistant can browse available skills with `skill_list` and read full instructions on-demand with `skill_read(name: "my-skill")`.
|
|
90
|
+
- Bundled scripts in `scripts/` can be executed using `skill_run_script`.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 4. Model Context Protocol (MCP) Integration (`mcp.json`)
|
|
95
|
+
|
|
96
|
+
MCP servers must be configured in `mcp.json` at the plugin root:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"my-service": {
|
|
103
|
+
"type": "stdio",
|
|
104
|
+
"command": "node",
|
|
105
|
+
"args": ["./server.mjs"],
|
|
106
|
+
"cwd": "${PLUGIN_ROOT}",
|
|
107
|
+
"env": {
|
|
108
|
+
"DATA_PATH": "${PLUGIN_DATA}"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Standard Environment Variables & Placeholder Expansion (agent-plugins.org):
|
|
116
|
+
- `${PLUGIN_ROOT}`: Absolute filesystem path to the plugin root directory.
|
|
117
|
+
- `${PLUGIN_DATA}`: Dedicated writable persistent storage directory (`./data/plugin_data/<plugin-name>`).
|
|
118
|
+
|
|
119
|
+
Transports supported: `stdio`, `streamable-http`, and `sse`.
|
|
120
|
+
When Musonda connects the MCP server, each MCP tool is automatically registered in Musonda's runtime and prefixed as:
|
|
121
|
+
`mcp_<plugin-name>_<server-name>_<tool-name>`
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 5. Finding, Installing, Creating, and Removing Plugins
|
|
126
|
+
|
|
127
|
+
Musonda provides a complete suite of tools to manage Agent Plugins dynamically:
|
|
128
|
+
|
|
129
|
+
### Finding Plugins:
|
|
130
|
+
- Call `plugin_find(query: "...")` to search locally and across the ecosystem (GitHub topic `agent-plugin`, official `agentplugins` org, and npm).
|
|
131
|
+
- Inspect specifications and compatible clients at `https://agent-plugins.org/`.
|
|
132
|
+
|
|
133
|
+
### Installing Plugins:
|
|
134
|
+
- Call `plugin_install(source: "https://github.com/agentplugins/agent-plugins-example.git")` to clone, validate, install dependencies, and immediately activate in the live runtime.
|
|
135
|
+
- You can also install from local folders: `plugin_install(source: "./my-plugin")` or GitHub shorthand `plugin_install(source: "agentplugins/agent-plugins-example")`.
|
|
136
|
+
|
|
137
|
+
### Authoring New Plugins:
|
|
138
|
+
- Call `plugin_create(name, description, skills, mcp)` to scaffold and activate a brand-new plugin instantly.
|
|
139
|
+
|
|
140
|
+
### Inspecting Plugins:
|
|
141
|
+
- Call `plugin_list()` to inspect all currently loaded plugins, skills, and tools.
|
|
142
|
+
- Call `plugin_info(pluginName: "...")` for deep inspection of manifests, skills summaries, and server configurations.
|
|
143
|
+
|
|
144
|
+
### Removing / Uninstalling Plugins:
|
|
145
|
+
- Call `plugin_remove(pluginName: "...", deleteFiles: true, purgeData: false)` to cleanly shut down MCP subprocesses, deregister tools and skills, and remove files from disk.
|
|
146
|
+
|
|
147
|
+
### Reloading:
|
|
148
|
+
- Call `plugin_reload(pluginName: "...")` or `plugin_reload()` to refresh plugins from disk without restarting Musonda Gateway.
|
|
149
|
+
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-plugins
|
|
3
|
+
description: Comprehensive operational guide for finding, evaluating, installing, using, and removing Agent Plugins conforming to https://agent-plugins.org/
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Musonda Team
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Agent Plugins Management & Operational Guide
|
|
11
|
+
|
|
12
|
+
This skill guides Musonda on how to find, evaluate, install, use, and remove portable **Agent Plugins** conforming to version 1.0.0 of the open standard defined at [https://agent-plugins.org/](https://agent-plugins.org/).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. Core Principles of Agent Plugins (v1.0.0)
|
|
17
|
+
|
|
18
|
+
Agent Plugins is an open, vendor-neutral specification (maintained by Amazon, Cursor, Microsoft, OpenAI, and Vercel maintainers) designed to package reusable components into portable plugins:
|
|
19
|
+
|
|
20
|
+
- **Directory-Based Package Unit**: Plugins live in self-contained directories.
|
|
21
|
+
- **Root Manifest (`plugin.json`)**: Required. Identified by canonical `$schema: "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"`. Name must be 1–64 lowercase alphanumeric characters, dots, or single hyphens (`^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$`).
|
|
22
|
+
- **Fixed Component Locations**:
|
|
23
|
+
- `skills/`: Contains Agent Skills (each in a subfolder with `SKILL.md`).
|
|
24
|
+
- `mcp.json`: Defines Model Context Protocol servers (`stdio`, `streamable-http`, `sse`).
|
|
25
|
+
- Reverse-domain extension namespaces (e.g. `com.example.client/`) for client-specific enhancements.
|
|
26
|
+
- **Containment Security**: Files supplied by the package must not resolve outside the plugin root.
|
|
27
|
+
- **Narrow Failure Boundaries**: If one skill or MCP server fails, siblings and other plugins continue operating safely.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 2. How to Find Agent Plugins
|
|
32
|
+
|
|
33
|
+
When the user asks for new capabilities, integrations, or tools (e.g. database access, GitHub operations, weather forecasts, PDF processing, search engines):
|
|
34
|
+
|
|
35
|
+
1. **Use `plugin_find(query: "...")`**:
|
|
36
|
+
- Searches local directories (`./plugins`, `./data/plugins`) for installed or available plugins.
|
|
37
|
+
- Searches official and community ecosystem registries:
|
|
38
|
+
- Curated official reference plugins from `https://agent-plugins.org/`.
|
|
39
|
+
- GitHub search across repositories tagged with topic `agent-plugin` or query `agent-plugin`.
|
|
40
|
+
- npm registry for packages published with keyword `agent-plugin`.
|
|
41
|
+
|
|
42
|
+
2. **Official & Trusted Sources**:
|
|
43
|
+
- **`https://github.com/agentplugins`**: Official GitHub organization.
|
|
44
|
+
- `agentplugins/agent-plugins-example`: Canonical reference implementation.
|
|
45
|
+
- `agentplugins/agent-plugins-spec`: Normative specifications and JSON schemas.
|
|
46
|
+
- `agentplugins/agent-plugins-site`: Documentation and compatible clients list.
|
|
47
|
+
- **`https://agent-plugins.org/compatible-clients`**: Index of compliant tools and frameworks.
|
|
48
|
+
- **GitHub Discussions**: `https://github.com/agentplugins/agent-plugins-spec/discussions` for proposals and ecosystem plugins.
|
|
49
|
+
|
|
50
|
+
3. **Web Search**:
|
|
51
|
+
- Use `web_search(query: "agent plugins github <keyword>")` or `web_search(query: "agent-plugin mcp <keyword>")` when looking for specific community integrations.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. How to Inspect & Evaluate Plugins
|
|
56
|
+
|
|
57
|
+
Before or after installing, always inspect the plugin's metadata and structure:
|
|
58
|
+
|
|
59
|
+
- Call `plugin_info(pluginName: "...")`:
|
|
60
|
+
- Shows manifest metadata (name, version, author, license, description).
|
|
61
|
+
- Lists discovered Agent Skills and their summary instructions.
|
|
62
|
+
- Lists configured MCP servers (stdio commands, URLs, transports).
|
|
63
|
+
- Shows active bridged tools and directory paths.
|
|
64
|
+
- Verify security and containment:
|
|
65
|
+
- Plugins should not attempt to access paths outside their root, except persistent data in `data/plugin_data/<name>`.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 4. How to Add & Install Plugins
|
|
70
|
+
|
|
71
|
+
Musonda can install plugins dynamically into the live Gateway without restarting:
|
|
72
|
+
|
|
73
|
+
1. **Install from Git Repository (GitHub, GitLab, etc.)**:
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"source": "https://github.com/agentplugins/agent-plugins-example.git"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
Or use GitHub shorthand:
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"source": "agentplugins/agent-plugins-example"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
Musonda clones the repository into `./plugins/<name>`, validates the manifest, installs dependencies (`npm install --omit=dev`), and mounts skills and MCP servers immediately.
|
|
86
|
+
|
|
87
|
+
2. **Install from a Local Directory**:
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"source": "./path/to/my-plugin"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
Musonda copies the directory into the active plugins search path and loads it into runtime.
|
|
94
|
+
|
|
95
|
+
3. **Scaffold a Custom Plugin with `plugin_create`**:
|
|
96
|
+
If no existing plugin fits the user's needs, author a brand-new one:
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"name": "custom-tools",
|
|
100
|
+
"description": "Custom automated tools for project tasks",
|
|
101
|
+
"skills": [
|
|
102
|
+
{
|
|
103
|
+
"name": "review-workflow",
|
|
104
|
+
"description": "Steps for reviewing pull requests",
|
|
105
|
+
"content": "Follow these steps when reviewing pull requests..."
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 5. How to Use Discovered Plugins
|
|
114
|
+
|
|
115
|
+
Once installed, a plugin's capabilities are accessible via two mechanisms:
|
|
116
|
+
|
|
117
|
+
### A. Using Agent Skills (Progressive Disclosure)
|
|
118
|
+
1. **Browse Skills**: Use `skill_list` to see all available skills across loaded plugins.
|
|
119
|
+
2. **Read Full Instructions**: Use `skill_read(name: "<skill-name>")` to load detailed workflow instructions and step-by-step guidance into context.
|
|
120
|
+
3. **Execute Skill Scripts**: If a skill bundles helper scripts in `scripts/`, execute them with `skill_run_script(skillName: "...", scriptName: "...")`.
|
|
121
|
+
|
|
122
|
+
### B. Using MCP Tools
|
|
123
|
+
- MCP servers declared in `mcp.json` are automatically started or connected.
|
|
124
|
+
- For `stdio` servers, Musonda provides:
|
|
125
|
+
- `PLUGIN_ROOT`: Root path of the plugin.
|
|
126
|
+
- `PLUGIN_DATA`: Persistent writable data directory (`./data/plugin_data/<plugin-name>`).
|
|
127
|
+
- Bridged tools are available directly in your tool registry, prefixed with `mcp_<plugin>_<server>_<tool>`.
|
|
128
|
+
- Simply call the tool with required arguments like any native tool.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 6. How to Remove Plugins
|
|
133
|
+
|
|
134
|
+
When a plugin is no longer needed or requested to be removed by the user:
|
|
135
|
+
|
|
136
|
+
1. Call `plugin_remove`:
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"pluginName": "unneeded-plugin",
|
|
140
|
+
"deleteFiles": true,
|
|
141
|
+
"purgeData": false
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
2. **What Happens**:
|
|
145
|
+
- MCP subprocesses are gracefully closed with `SIGTERM`.
|
|
146
|
+
- Bridged MCP tools are unregistered from the tool registry.
|
|
147
|
+
- Discovered Agent Skills are removed from memory.
|
|
148
|
+
- The plugin folder in `./plugins/<name>` is deleted from disk.
|
|
149
|
+
- Persistent storage in `data/plugin_data/<name>` is preserved by default (or deleted if `purgeData: true`).
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 7. Troubleshooting & Resilience
|
|
154
|
+
|
|
155
|
+
- **Narrow Failure Boundaries**: If an MCP server fails to start, its error is logged, but sibling servers and skills in the same plugin remain active.
|
|
156
|
+
- **Reloading**: If files are edited manually on disk, run `plugin_reload(pluginName: "...")` to refresh runtime state without restarting the server.
|
|
157
|
+
- **Diagnostics**: Use `plugin_list` and `plugin_info` to inspect loaded status and check for missing dependencies.
|