Skip to content

Conversation

@yaonyan
Copy link
Contributor

@yaonyan yaonyan commented Nov 2, 2025

This pull request introduces a major refactor to the execution mode system for the MCP compose server, moving from hardcoded handling of agentic and workflow modes to a flexible plugin-based architecture. Execution modes are now implemented as plugins, allowing for easier extensibility and customization. The changes include new plugin hooks, type updates, and the registration of built-in mode plugins.

Plugin System Refactor (most important):

  • Added a new registerAgentTool hook to the ToolPlugin interface, enabling plugins to register custom agent tool implementations for different execution modes.
  • Refactored the server to trigger the registerAgentTool plugin hook instead of directly registering agentic or workflow tools; throws an error if no plugin handles the mode.
  • Implemented built-in plugins for "agentic" and "agentic_workflow" modes, replacing previous direct registration logic. (mode-agentic-plugin.ts, mode-workflow-plugin.ts) [1] [2] [3] [4]

Type System Improvements:

  • Updated all relevant types and interfaces to use the new ExecutionMode type instead of string literals for mode selection. [1] [2] [3] [4] [5] [6] [7] [8]

Plugin Utility and Manager Enhancements:

  • Modified plugin application logic to match modes exactly and added support for the new hook in plugin validation. [1] [2]
  • Added triggerRegisterAgentTool method to the PluginManager for handling agent tool registration via plugins.

Exports and Imports:

  • Updated module exports to include new plugin types and built-in plugins in mod.ts and built-in/index.ts. [1] [2]

Minor Fixes and Improvements:

  • Passed toolName to planning prompts in AgenticExecutor to improve context. [1] [2]

…ng plugins

fix: wrong placeholder handling of planning prompt
@yaonyan yaonyan self-assigned this Nov 2, 2025
@yaonyan yaonyan added the enhancement New feature or request label Nov 2, 2025
@yaonyan yaonyan merged commit 7ae11cc into main Nov 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants