Skip to content

feat(plugins): wire contributed skills / commands / agents / mcpServers#132

Merged
oratis merged 1 commit into
mainfrom
feat/plugin-contributions
May 31, 2026
Merged

feat(plugins): wire contributed skills / commands / agents / mcpServers#132
oratis merged 1 commit into
mainfrom
feat/plugin-contributions

Conversation

@oratis
Copy link
Copy Markdown
Owner

@oratis oratis commented May 31, 2026

Summary

Plugins could declare 7 contribution points but only hooks were wired into a live session — contributed skills / commands / agents / mcpServers were parsed and then ignored (the audit's gap). Now the trusted+enabled plugins' contributions load.

Changes

core:

  • collectPluginContributions({home,disabled}){ dirs, mcpServers } for trusted+enabled plugins (untrusted excluded — same security gate as discoverPlugins). Single helper both hosts reuse.
  • loadSlashCommands gains pluginDirs (+ a 'plugin' command source): plugin <dir>/commands/*.md load, overridable by user/project on a name clash.
  • runAgent gains pluginDirs, threaded into the Task tool's loadSubAgents so plugin-bundled sub-agents resolve. (loadSkills already supported pluginDirs.)

cli (repl.ts + headless.ts): collect contributions early; pass pluginDirs to loadSkills + loadSlashCommands + runAgent; merge plugin-contributed mcpServers into the connect set (user settings win on a clash).

Now wired: hooks + skills + commands + sub-agents + mcpServers (5 of 7). statusLines + modes remain — they'd need live registries that don't exist yet.

Tests

+3: loadSlashCommands plugin source + project-override; collectPluginContributions returns dirs+mcpServers for a trusted plugin and excludes an untrusted one. Core suite 604 green; full repo green via pre-commit.

🤖 Generated with Claude Code

Plugins could contribute 7 things but only hooks were wired into the live
session; contributed skills/commands/agents/mcpServers were parsed and ignored.
Now the trusted+enabled plugins' contributions load:

core:
- collectPluginContributions({home,disabled}) → { dirs, mcpServers } for the
  trusted+enabled plugins (untrusted ones excluded — same security gate as
  discoverPlugins). One place both hosts reuse.
- loadSlashCommands gains `pluginDirs` (+ a 'plugin' command source); plugin
  `<dir>/commands/*.md` load, overridable by user/project.
- runAgent gains `pluginDirs`, threaded into the Task tool's loadSubAgents so
  plugin-bundled sub-agents resolve. (loadSkills already supported pluginDirs.)

cli (repl.ts + headless.ts):
- collect contributions early; pass pluginDirs to loadSkills + loadSlashCommands
  + runAgent; merge plugin-contributed mcpServers into the MCP connect set
  (user settings win on a name clash).

Now wired: hooks + skills + commands + sub-agents + mcpServers (5 of 7).
statusLines + modes remain (they need live registries that don't exist yet).

Tests: +3 — loadSlashCommands plugin source (+ project override),
collectPluginContributions returns dirs+mcpServers for trusted / excludes
untrusted. Core 604 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit cdce610 into main May 31, 2026
3 checks passed
@oratis oratis deleted the feat/plugin-contributions branch May 31, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant