Skip to main content

Module plugin_assets

Module plugin_assets 

Source
Expand description

Plugin-contributed assets beyond skills: MCP servers (manifest.mcp), slash-command prompts (manifest.prompts), and agent types (manifest.agents).

One loader, one store read: load() walks the installed-plugin store once (enabled plugins only — the same trust boundary as hooks: enabling a plugin that declares MCP servers grants command execution, an explicit mermaid plugin enable decision) and apply() folds the result into the ALREADY-MERGED Config at the top of both entrypoints. Deliberately NOT a config layer: the project layer forbids mcp_servers/agents, and plugin trust is a different boundary than file trust. Everything downstream rides free — State::new seeds plugin servers, MCP init starts them (and PR-1 deferral bounds their tools), subagents see the merged agent types, and the recording header captures the merged config (replay-faithful). Like skills, changes require a restart.

Structs§

PluginAssets
Everything enabled plugins contribute (besides skills), plus the warnings the startup path should surface.

Functions§

apply
Fold plugin assets into the already-merged Config. Config-defined entries always win (a user’s [mcp_servers.x] / [agents.types.x] beats a plugin’s); returns the warnings to surface at startup.
load
Load every enabled plugin’s assets from the runtime store. Degrades to empty on store/parse failure (the skills precedent — a broken plugin must not kill startup). Plugins are visited in sorted-name order so plugin-vs-plugin collisions resolve deterministically.