BailingHub MCP / SDK 0.4.0:连接对话与业务执行记录
BailingHub MCP / Agent Client SDK 0.4.0
简体中文
把用户请求、助手可见回复和业务执行记录连起来。
例如,用户在一段对话里比较两家已经分别授权的门店。接入本版 SDK 的客户端可以把整段可见对话归档到 BailingHub,让管理员追溯“问了什么、回答了什么、每家门店实际执行了什么”,同时保留各份授权独立的执行和审批记录。
新增归档功能推荐配合 BailingHub Core 0.6.1,以及负责记录和同步对话的客户端使用;接口最低需要 Core 0.6.0。SDK 提供同步接口;它本身不会自动采集聊天或增加账号选择界面。
谁该升级,如何开始
-
**使用 DSH 等原生客户端:**通过客户端的配套版本升级,按其指南选择会话可用账号。单独安装 MCP 命令不会增加多账号会话界面。
-
**开发自己的 Agent 客户端:**使用 Node.js 20.15 或更新版本,安装精确 SDK 版本,再按中文 SDK 指南接入:
npm install --save-exact bailinghub-mcp-server@0.4.0
SDK 从
bailinghub-mcp-server/sdk导入。新增syncConversationArchive支持授权成员确认、可见文本与原运行记录关联、分批上传及幂等补传;客户端负责持久保存待发送事件和恢复状态。 -
**在 MCP 应用中连接固定业务路由:**原 Client Token 和 Agent Session 用法继续兼容。按中文 MCP 安装指南将包版本固定为
0.4.0。独立 MCP 工具和 Registry 入口不会自动采集对话。
升级不需要改写业务 API 声明。低于 0.6.0 的 Core 可以继续使用既有调用流程,但不支持新增归档;客户端应明确提示,而不是显示同步成功。对话补传不会重新执行业务动作,也不会放宽原有授权。合并正文仅供有权限的管理员审计,不提供 Agent Session 读取入口,不上传隐藏推理、凭据或任意工具载荷。
验证
发布提交 CI 已通过:Ubuntu 115 项测试通过,4 项 Windows 专用测试按平台跳过;Windows 4 项原生 DPAPI、重启恢复和多连接隔离测试全部通过。Client API 契约、依赖审计和打包检查通过;另已验证独立目录安装后的 SDK 导入。
English
Follow the user's request, the assistant's visible replies and the resulting business actions together.
For example, one conversation can compare two separately authorized stores. A host using this SDK can archive the visible conversation in BailingHub, so an administrator can trace what was asked, what was answered and what each store actually executed. Each authorization keeps its own execution and approval records.
Use BailingHub Core 0.6.1 with a host that captures and synchronizes the conversation. The archive API minimum is Core 0.6.0. The SDK provides the synchronization API; it does not automatically record chats or add an account-selection interface.
Who should upgrade, and where to start
-
Native Agent Client users, including DSH: upgrade through the host's matching release and follow its account-selection guide. Installing the MCP command alone does not add a multi-account conversation UI.
-
Agent Client developers: use Node.js 20.15 or newer, install the exact SDK version, and follow the SDK guide:
npm install --save-exact bailinghub-mcp-server@0.4.0
Import the SDK from
bailinghub-mcp-server/sdk. The newsyncConversationArchiveAPI supports member confirmation, text-to-run association, bounded uploads and idempotent retries. The host owns durable pending events and recovery status. -
MCP users with a fixed business route: existing Client Token and Agent Session flows remain compatible. Pin the package to
0.4.0using the MCP installation guide. The standalone MCP tools and Registry entry do not automatically capture conversations.
This upgrade does not require changes to business API declarations. Existing calls can continue on Core installations below 0.6.0, but the new archive API is unsupported there and hosts must report that status accurately. Archive retries never repeat business actions or broaden authorization. Combined text is available only to authorized administrators for auditing, with no Agent Session read endpoint. Hidden reasoning, credentials and arbitrary tool payloads are excluded.
Validation
Release commit CI passed: Ubuntu ran 115 passing tests and skipped four Windows-only tests; all four native Windows DPAPI, restart-recovery and connection-isolation tests passed on Windows. Client API compatibility, dependency audit and package checks passed. An isolated package installation and SDK import were also verified.