feat: Introduce unified tooling system for plugins and MCP
- Added a new `tooling` module to define a unified model for tool declarations, invocations, and execution results, facilitating compatibility between plugins, legacy actions, and MCP tools. - Implemented `ToolProvider` interface for various tool providers including built-in tools, MCP tools, and plugin runtime tools. - Enhanced `MCPManager` and `MCPConnection` to support unified tool invocation and execution results. - Updated `ComponentRegistry` and related classes to accommodate the new tool specifications and descriptions. - Refactored existing components to utilize the new tooling system, ensuring backward compatibility with legacy actions. - Improved error handling and logging for tool invocations across different providers.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
from maibot_sdk import Command, MaiBotPlugin
|
||||
|
||||
|
||||
_VALID_COMPONENT_TYPES = ("action", "command", "event_handler")
|
||||
_VALID_COMPONENT_TYPES = ("tool", "command", "event_handler")
|
||||
|
||||
HELP_ALL = (
|
||||
"管理命令帮助\n"
|
||||
@@ -37,7 +37,7 @@ HELP_COMPONENT = (
|
||||
"/pm component enable local <component_name> <component_type> 本聊天启用组件\n"
|
||||
"/pm component disable global <component_name> <component_type> 全局禁用组件\n"
|
||||
"/pm component disable local <component_name> <component_type> 本聊天禁用组件\n"
|
||||
" - <component_type> 可选项: action, command, event_handler\n"
|
||||
" - <component_type> 可选项: tool, command, event_handler\n"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user