feat(domain): add pluggable ai tool system with mcp server lifecycle management#555
Open
feat(domain): add pluggable ai tool system with mcp server lifecycle management#555
Conversation
Contributor
🔒 Security Issues Detected
🤖 Generated by CI Security Scan | View Details |
Contributor
3cb34fc to
393f2da
Compare
Contributor
…stem Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…ugin system Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…l plugin system Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Define Plugin entity, ToolGroup model, and three enums (PluginType, PluginTransport, PluginHealthStatus) in TypeSpec. Add optional activePlugins field to Feature entity for per-feature plugin activation overrides. All generated types compile cleanly with zero test breakage. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…nd repository Introduces the complete persistence foundation for the AI tool plugin system: - Migration 060: CREATE TABLE plugins with all columns matching the Plugin entity, including JSON columns for arrays (server_args, required_env_vars, tool_groups, active_tool_groups) and a UNIQUE index on the name column - Migration 061: ALTER TABLE features ADD COLUMN active_plugins TEXT for per-feature plugin activation overrides (JSON-serialized Record<string, boolean>) - PluginRow mapper: toDatabase/fromDatabase with camelCase/snake_case conversion, JSON serialization for array fields, boolean-to-integer mapping, and Date-to-unix millisecond conversion - IPluginRepository interface: CRUD port (create, findById, findByName, list, update, delete) in application/ports/output/repositories - SQLitePluginRepository: Full implementation with prepared statements - Feature mapper/repository extension: activePlugins field added to FeatureRow, toDatabase, fromDatabase, INSERT column list, and UPDATE SET clause - Comprehensive test coverage: 26 mapper unit tests, 18 repository integration tests, 5 feature mapper activePlugins tests, 4 feature repository activePlugins integration tests — all passing Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Add IMcpServerManager and IPluginHealthChecker port interfaces for MCP server lifecycle and plugin health verification. Create curated plugin catalog with MemPalace, Token Optimizer, and Ruflo entries. Implement seven plugin use cases: GetPluginCatalog, AddPlugin, RemovePlugin, ListPlugins, EnablePlugin, DisablePlugin, and ConfigurePlugin. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…case Implement PluginHealthCheckerService with multi-tier health checks: runtime detection via which/where, env var validation. Add CheckPluginHealthUseCase that runs health checks and persists updated status to the plugin repository. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Wire up IPluginRepository, IPluginHealthChecker, IMcpServerManager (no-op placeholder), 8 plugin use cases, and their string-token aliases for web route resolution. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…ycle McpServerManagerService replaces the no-op placeholder with real child_process.spawn() management. Features: per-feature server start/stop, reference counting for shared servers across concurrent features, temp .mcp.json config file generation, SIGTERM cleanup, and explicit env var passing (PATH + required vars only). Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
New optional mcpConfigPath field on AgentExecutionOptions carries the path to a per-feature .mcp.json temp file through the agent-agnostic interface. Each executor translates this to its own MCP config flag. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
ClaudeCodeExecutorService.buildArgs() now adds --mcp-config <path> when options.mcpConfigPath is set. This tells Claude Code to load plugin MCP servers from the generated per-feature temp file. Works alongside existing --strict-mcp-config (disableMcp) flag. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…ptions builder Wire mcpConfigPath through the feature agent graph state annotation and buildExecutorOptions so plugin MCP server config is forwarded to the agent executor. Update test state fixtures to include the new channel. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…t worker Start enabled MCP plugin servers before graph invocation and pass the generated mcpConfigPath into graph state. Stop servers in the finally block for cleanup. Degrades gracefully if plugin startup fails. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Add shep plugin {add,remove,list,enable,disable,configure,status,catalog}
CLI commands following the settings command group pattern. Each subcommand
resolves its use case from the DI container and provides user-friendly
output with colored status indicators and table formatting.
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
…ure toggles - Add 7 server actions for plugin CRUD operations (list, add, remove, toggle, configure, health check, catalog) - Add PluginList component with health status badges and enable/disable toggles - Add PluginCatalog browser component with install buttons - Add /plugins page with tabbed Installed/Catalog views - Add plugins navigation item to app sidebar with i18n support - Add per-feature plugin activation toggles to the create feature drawer - Wire activePlugins through CreateDrawerClient, server action, and use case layers Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
Rewrote docs(specs) research commit subject from 74 to 54 characters to pass commitlint subject-max-length rule. Co-Authored-By: Shep Bot <shep-agent@users.noreply.github.com>
393f2da to
ce5384b
Compare
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a complete AI-native tool plugin system that lets users register, configure, and activate external tools (MCP servers, CLI tools, hook-based plugins) into Shep's agentic SDLC workflows.
--mcp-configflag support, feature agent worker plugin startup/shutdown lifecycleshep plugincommand group with 8 subcommands (add, remove, list, enable, disable, configure, status, catalog)Evidence
Web UI - Installed Plugins Tab (empty state)
Web UI - Plugin Catalog Browser
Web UI - Sidebar Navigation with Plugins
Web UI - Create Feature Drawer with Plugin Toggles
Test Results
Test Plan
🐑 Built with Shep.bot