feat: 添加了工具桥接器,并在插件系统中添加了对应的方法#261
Merged
lioensky merged 2 commits intolioensky:mainfrom Mar 26, 2026
Merged
Conversation
为支持 VCP 原生工具向外部系统(如 AIO Hub)导出,新增了一个桥接器插件。该插件通过拦截 WebSocket 消息,实现了工具清单的同步与远程执行能力,避免了工具循环调用问题。 - 新增 VCPToolBridge 插件,包含完整的配置、实现与清单文件 - 通过 Monkey Patch 劫持 WebSocket 消息,拦截 `get_vcp_manifests` 和 `execute_vcp_tool` 请求 - 提供可配置的黑名单与关键词过滤,排除日志、信息提供器及外部同步工具 - 修改 WebSocketServer.js,导出 `handleDistributedServerMessage` 函数供插件调用
本次变更为插件系统引入了基于事件驱动的异步任务状态推送机制,解决了插件异步执行结果和进度日志无法实时反馈给调用端的问题。 - PluginManager 继承 EventEmitter 并新增 `vcp_log` 和 `vcp_info` 事件 - VCPToolBridge 插件监听核心事件并转发异步任务结果和进度日志 - 在插件回调端点广播 `plugin_async_callback` 事件以通知任务完成 - 建立 taskId 到 serverId 的映射关系,确保消息准确路由
Owner
|
这个导出方法和直接走admintool与vcpHumantool有啥优势? |
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.
为支持 VCP 原生工具向外部系统(如 AIO Hub)导出,新增了一个桥接器插件。该插件通过拦截 WebSocket 消息,实现了工具清单的同步与远程执行能力,且避免了工具循环调用问题。
该插件的配置是默认关闭
新增 VCPToolBridge 插件,包含完整的配置、实现与清单文件
通过 Monkey Patch 劫持 WebSocket 消息,拦截 get_vcp_manifests 和 execute_vcp_tool 请求
提供可配置的黑名单与关键词过滤,排除日志、信息提供器及外部同步工具
修改 WebSocketServer.js,导出 handleDistributedServerMessage 函数供插件调用
PluginManager 继承 EventEmitter 并新增 vcp_log 和 vcp_info 事件
VCPToolBridge 插件监听核心事件并转发异步任务结果和进度日志
在插件回调端点广播 plugin_async_callback 事件以通知任务完成
建立 taskId 到 serverId 的映射关系,确保消息准确路由