feat: MCP 与 SealDice 指令桥接及 OB11 工具重构(4.16.0) - #126
Merged
Conversation
- 移除文档中残留的旧版 /control 插件控制 WS、反向 WS、CORE_URL 描述 - docs/04 拓扑与环境变量改写为:SealDice 正向连接 /core(/core/ws)、协议端 /onebot、插件走 MCP /mcp - docs/08 表格改为「核心正向 WS」并去掉 /control 兼容说明 - docs/09 与 README 同步:通过 MCP 接入、capture.forward 说明 - 新增 docs/11-ob11-core-bridge-使用指南.md:部署/SealDice/协议端/MCP 接入、工具参数、白名单、捕获与转发语义、并发与多核心、排障 - docs/README 导航表补充第 11 篇
error2913
added a commit
that referenced
this pull request
Aug 22, 2026
- 根因:#126 OB11 重构删除了旧 send_msg 工具的标签解析,call_ob11_api 把文本原样发给后端,模型写的 [msg_id:...]/[img:虚拟ID] 直接进群 - dispatchOb11Api 对 send_group_msg/send_private_msg/send_msg 发送前用 resolveSendMessage 把文本渲染标签解析为真实消息段: - 内部标签 [from]/[msg_id]/[system]/[time] 剥离不外发 - [img:]/[avatar:]/[group_avatar:] 解析为图片段,[audio:] 解析为语音段 - [at:]/[poke:]/[quote:]/[face:] 转换为对应消息段 - call_ob11_api 工具把 session 传入,支持按 id 查图(findImage) - 新增单元测试 testSendMessageResolveRenderTags,覆盖字符串/数组消息、内部标签剥离、缺图丢弃
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.
变更概览
本 PR 汇总并整理 4.15.2 以来的 MCP、OB11、SealDice 指令和消息链路改造,并准备发布 4.16.0。
功能增加
mcpServers配置连接服务器,通过tools/list自动发现工具,支持 headers/token、工具重载清理、会话失效自动重连和远端工具冲突处理。run_core_command核心指令桥:经 OB11 核心桥中间件注入假消息,支持多消息收集、空闲窗口、超时、并发 lane 串行化和forward控制。run_ext_command为本地直接调用扩展solve,不再依赖旧的中间件指令转发。run_ext_command/run_core_command增加trigger与at:默认触发用户为当前会话用户,at为用户 ID 数组;核心桥注入平台前缀、sender/user_id、真实昵称/群名片和 CQ at。call_ob11_api,提供 OB11 网络后端与 SealDice 原生后端,统一覆盖消息、媒体、文件、合并转发、用户/群查询和协议 action。st命令,必要时用pc new新建角色并用st查询确认。功能调整与删除
web_read、render_markdown、render_html等旧的内置包装工具改由标准 MCP 工具提供。draw_deck工具入口;牌堆、模组、今日人品等能力统一走扩展指令。call_ob11_api;工具监听改为多消息收集器,工具摘要改为按需加载。修复与配套改造
\\n/\\r\\n发送前还原为真实换行,\\f继续作为多消息分隔符。配置与文档
mcpServersJSON;网页读取和 Markdown/HTML 渲染配置迁移到 MCP 服务器配置。core|...。验证
npm run lintnpx tsc --noEmit --strictnpm run buildnpm run smokenpm run test:ob11npm run package:checkrun_core_command rav,验证trigger=2484294762、at=[2913949387]、CQ at 和真实昵称均正确。