bailinghub 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +146 -185
- package/README.md +135 -206
- package/THIRD_PARTY_NOTICES.md +6 -7
- package/assets/readme-demo-evidence.en-dark.svg +82 -0
- package/assets/readme-demo-evidence.en.svg +82 -0
- package/assets/readme-demo-evidence.zh-CN-dark.svg +82 -0
- package/assets/readme-demo-evidence.zh-CN.svg +82 -0
- package/assets/readme-entry-points.en-dark.svg +71 -0
- package/assets/readme-entry-points.en.svg +71 -0
- package/assets/readme-entry-points.zh-CN-dark.svg +71 -0
- package/assets/readme-entry-points.zh-CN.svg +71 -0
- package/assets/readme-product-overview.en-dark.svg +87 -0
- package/assets/readme-product-overview.en.svg +87 -0
- package/assets/readme-product-overview.zh-CN-dark.svg +87 -0
- package/assets/readme-product-overview.zh-CN.svg +87 -0
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_AUTH_API.en.md +25 -9
- package/docs/AGENT_AUTH_API.md +17 -5
- package/docs/AGENT_CLIENT_QUICKSTART.en.md +90 -18
- package/docs/AGENT_CLIENT_QUICKSTART.md +74 -16
- package/docs/AGENT_CONVERSATION_AUDIT.en.md +194 -0
- package/docs/AGENT_CONVERSATION_AUDIT.md +111 -0
- package/docs/CHANGELOG.en.md +23 -0
- package/docs/CHANGELOG.md +23 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/README.en.md +7 -0
- package/docs/README.md +7 -0
- package/docs/RELEASE_NOTES_v0.5.1.en.md +45 -0
- package/docs/RELEASE_NOTES_v0.5.1.md +45 -0
- package/docs/RELEASE_NOTES_v0.6.0.en.md +51 -0
- package/docs/RELEASE_NOTES_v0.6.0.md +51 -0
- package/docs/user-guide/README.en.md +1 -0
- package/docs/user-guide/README.md +1 -0
- package/docs/user-guide/console-map.en.md +2 -0
- package/docs/user-guide/console-map.md +2 -1
- package/docs/user-guide/conversations.en.md +40 -0
- package/docs/user-guide/conversations.md +40 -0
- package/package.json +1 -1
- package/scripts/check-doc-links.mjs +3 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +5 -5
- package/scripts/e2e-console.mjs +89 -0
- package/scripts/generate-readme-assets.mjs +488 -7
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +2 -0
- package/scripts/verify-github-repo.mjs +2 -0
- package/sql/057_agent_conversation_audit.sql +55 -0
- package/src/app/agent-conversation-audit.ts +30 -0
- package/src/app/oss-edition.ts +1 -0
- package/src/core/config/agent-direct-console-selection.test.ts +22 -0
- package/src/core/runtime/agent-conversation-audit.test.ts +38 -0
- package/src/core/runtime/agent-conversation-audit.ts +159 -0
- package/src/infrastructure/config/config-agent-auth-repository.test.ts +36 -0
- package/src/infrastructure/config/config-agent-auth-repository.ts +97 -0
- package/src/infrastructure/config/config-agent-client-runtime-repository.test.ts +38 -0
- package/src/infrastructure/config/config-agent-client-runtime-repository.ts +54 -0
- package/src/infrastructure/config/config-agent-conversation-audit-repository.test.ts +146 -0
- package/src/infrastructure/config/config-agent-conversation-audit-repository.ts +262 -0
- package/src/infrastructure/config/configstore.ts +5 -0
- package/src/routes/admin-agent-clients.test.ts +120 -0
- package/src/routes/admin-agent-clients.ts +161 -0
- package/src/routes/admin-conversation-audit.ts +46 -0
- package/src/routes/admin-runtime.test.ts +38 -0
- package/src/routes/admin-runtime.ts +14 -3
- package/src/routes/admin.ts +6 -0
- package/src/routes/agent-api.ts +2 -0
- package/src/routes/agent-conversation-audit.test.ts +131 -0
- package/src/routes/agent-conversation-audit.ts +33 -0
- package/src/test-support/agent-conversation-audit-fixture.ts +123 -0
- package/web/console/assets/{Accounts-D4RRm5D1.js → Accounts-Ca_VnSu9.js} +1 -1
- package/web/console/assets/AgentClients-BPIvlLYY.js +1 -0
- package/web/console/assets/AgentClients-DsWADpzr.css +1 -0
- package/web/console/assets/{Approvals-CsTTKb8o.js → Approvals-CMvPWacY.js} +1 -1
- package/web/console/assets/{Audit-BzvZ7JZw.js → Audit-CIRqOCnL.js} +1 -1
- package/web/console/assets/{BrandLockup-CYcA93wh.js → BrandLockup-BrytmTTH.js} +1 -1
- package/web/console/assets/{Channels-DRQZggqM.js → Channels-CApxH2TB.js} +1 -1
- package/web/console/assets/{ChatEntries-BUB7BWKU.js → ChatEntries-CJon3bWJ.js} +1 -1
- package/web/console/assets/Clients-BSA1rlTB.js +3 -0
- package/web/console/assets/Clients-CNIVs7Qn.css +1 -0
- package/web/console/assets/{Cost-BZgFf1yM.js → Cost-BbhlQFP8.js} +1 -1
- package/web/console/assets/{Credentials-BTe2Q07j.js → Credentials-kqr1W0K7.js} +1 -1
- package/web/console/assets/{Diagnostics-WL-buYli.js → Diagnostics-Kljt9XTH.js} +1 -1
- package/web/console/assets/{Executors-CGZ-7Xmp.js → Executors-DnsB-Xz4.js} +1 -1
- package/web/console/assets/{HelpTip-CT07o3kB.js → HelpTip-i-KJhf5s.js} +1 -1
- package/web/console/assets/{Kb-VVw8oGsT.js → Kb-DLZSAFWP.js} +2 -2
- package/web/console/assets/{Login-rwvmBBPl.js → Login-DiTjPWmN.js} +1 -1
- package/web/console/assets/{Projects-CexaCEY1.js → Projects-CXcVCgCD.js} +1 -1
- package/web/console/assets/Routes-CXGl9SMM.css +1 -0
- package/web/console/assets/Routes-DN9_d9Po.js +124 -0
- package/web/console/assets/Runs-Cwbe6thL.js +3 -0
- package/web/console/assets/Runs-D8UmjP5G.css +1 -0
- package/web/console/assets/{Setup-Djh5yadQ.js → Setup-FqoCKmfZ.js} +1 -1
- package/web/console/assets/Shell-BEqpONiy.js +1 -0
- package/web/console/assets/Shell-D9Uw-fsa.css +1 -0
- package/web/console/assets/{StorageBuckets-CQBR41W1.js → StorageBuckets-CkORbYXY.js} +1 -1
- package/web/console/assets/{SystemSettings-DgnopekD.js → SystemSettings-gTQAazu7.js} +1 -1
- package/web/console/assets/{SystemStatus-Bj8-kPt2.js → SystemStatus-DAmUUNqO.js} +1 -1
- package/web/console/assets/{Targets-BAfCt_nH.js → Targets-CZmDcjsE.js} +1 -1
- package/web/console/assets/{Tools-xjd0NZdE.js → Tools-CIHInlHL.js} +1 -1
- package/web/console/assets/index-BkLbd7Cc.js +2 -0
- package/web/console/assets/{index-DZEQL_yy.js → index-QnmD7N7F.js} +1 -1
- package/web/console/assets/{request-DkNPOweH.js → request-r7GHVJzw.js} +1 -1
- package/web/console/assets/{schema-CgPWAu1_.js → schema-BVn_hB7M.js} +1 -1
- package/web/console/assets/{util-SiQC2MJh.js → util-4bN2dv7B.js} +1 -1
- package/web/console/assets/{vendor-element-D7WRzHhy.js → vendor-element-CZoEjZr8.js} +1 -1
- package/web/console/assets/vendor-mammoth-BUEEDX6A.js +231 -0
- package/web/console/index.html +2 -2
- package/web-admin/package-lock.json +3 -3
- package/web-admin/src/agent-direct-selection.ts +21 -0
- package/web-admin/src/components/ClientConversations.vue +244 -0
- package/web-admin/src/components/conversation-audit.ts +121 -0
- package/web-admin/src/layout/Shell.vue +1 -1
- package/web-admin/src/pages/AgentClients.vue +254 -0
- package/web-admin/src/pages/Clients.vue +4 -2
- package/web-admin/src/pages/Routes.vue +54 -5
- package/web-admin/src/pages/Runs.vue +73 -17
- package/web-admin/src/router.ts +2 -0
- package/web-admin/tests/conversation-audit.fixture.mjs +182 -0
- package/web-admin/tests/conversation-audit.test.mjs +93 -0
- package/web/console/assets/Clients-CQ_MonGL.css +0 -1
- package/web/console/assets/Clients-HhCyrxfz.js +0 -3
- package/web/console/assets/Routes-B9ZHbQAp.js +0 -124
- package/web/console/assets/Routes-BbkFpi6Y.css +0 -1
- package/web/console/assets/Runs-4zDD9VOC.css +0 -1
- package/web/console/assets/Runs-BzFNPTwD.js +0 -3
- package/web/console/assets/Shell-BVIjmoY8.css +0 -1
- package/web/console/assets/Shell-kn763smL.js +0 -1
- package/web/console/assets/index-DfJA7iJS.js +0 -2
- package/web/console/assets/vendor-mammoth-DvgsHdlx.js +0 -231
package/docs/README.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
| 文档 | 用途 |
|
|
10
10
|
|---|---|
|
|
11
|
+
| [user-guide/conversations.md](user-guide/conversations.md) | 普通用户的多账户对话、完整沟通追溯和离线恢复指南。 |
|
|
11
12
|
| [QUICKSTART.md](QUICKSTART.md) | 从零部署百灵中枢,适合准备接入真实业务系统的开发者。 |
|
|
12
13
|
| [QUICKSTART.en.md](QUICKSTART.en.md) | English quickstart for Docker demo, first route, and first business tool. |
|
|
13
14
|
| [DEMO.md](DEMO.md) | Docker demo 闭环:中枢、MySQL、demo 业务系统、工具源、审计与 trace。 |
|
|
@@ -20,6 +21,8 @@
|
|
|
20
21
|
| [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | English Agent Auth v1 protocol and trusted business-identity boundary. |
|
|
21
22
|
| [AGENT_CLIENT_RUNTIME_API.md](AGENT_CLIENT_RUNTIME_API.md) | Agent Client Runtime v1:工作区、turn、能力搜索、工具执行与完成回传。 |
|
|
22
23
|
| [AGENT_CLIENT_RUNTIME_API.en.md](AGENT_CLIENT_RUNTIME_API.en.md) | English Agent Client Runtime v1 contract. |
|
|
24
|
+
| [AGENT_CONVERSATION_AUDIT.md](AGENT_CONVERSATION_AUDIT.md) | 完整可见对话审计:逐授权成员确认、幂等文本事件、run 关联和管理员分页读取。 |
|
|
25
|
+
| [AGENT_CONVERSATION_AUDIT.en.md](AGENT_CONVERSATION_AUDIT.en.md) | English complete conversation audit protocol and authorization boundary. |
|
|
23
26
|
| [user-guide/README.md](user-guide/README.md) | 使用者/产品经理视角:从业务需求出发,理解为什么需要中枢、后台菜单怎么配、配完交给开发者什么。 |
|
|
24
27
|
| [CONTRACT.md](CONTRACT.md) | 业务系统和中枢之间的稳定网络契约,接入前应先读。 |
|
|
25
28
|
| [CONTRACT.en.md](CONTRACT.en.md) | English HTTP and wire contract summary. |
|
|
@@ -120,6 +123,10 @@
|
|
|
120
123
|
| [RELEASE_NOTES_v0.3.4.en.md](RELEASE_NOTES_v0.3.4.en.md) | English `v0.3.4` anonymous-preview and trusted-business-identity guidance. |
|
|
121
124
|
| [RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md) | `v0.5.0` 可撤销本地 Agent 授权与受治理本地编排说明。 |
|
|
122
125
|
| [RELEASE_NOTES_v0.5.0.en.md](RELEASE_NOTES_v0.5.0.en.md) | English `v0.5.0` revocable local-Agent authorization and governed local planning release notes. |
|
|
126
|
+
| [RELEASE_NOTES_v0.5.1.md](RELEASE_NOTES_v0.5.1.md) | `v0.5.1` 智能体客户端管理中心与批量写操作配置说明。 |
|
|
127
|
+
| [RELEASE_NOTES_v0.5.1.en.md](RELEASE_NOTES_v0.5.1.en.md) | English `v0.5.1` Agent Client management center and bulk write-operation configuration release notes. |
|
|
128
|
+
| [RELEASE_NOTES_v0.6.0.md](RELEASE_NOTES_v0.6.0.md) | `v0.6.0` 看完整沟通,再追到每次业务操作;配套多授权客户端升级。 |
|
|
129
|
+
| [RELEASE_NOTES_v0.6.0.en.md](RELEASE_NOTES_v0.6.0.en.md) | English `v0.6.0` release notes and upgrade guide. |
|
|
123
130
|
| [RELEASE_NOTES_v0.1.0.md](RELEASE_NOTES_v0.1.0.md) | 首个公开版本的 GitHub Release 草稿。 |
|
|
124
131
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | English release notes. |
|
|
125
132
|
| [CHANGELOG.md](CHANGELOG.md) | 公开发布后的对外变更记录。 |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# BailingHub v0.5.1: Agent Client Management and Bulk Write-Operation Configuration
|
|
2
|
+
|
|
3
|
+
`v0.5.1` is a compatible management increment for the Agent Client v1 surface introduced in `v0.5.0`. It lets deployers inspect client applications, authorized devices and Agent Sessions, recent runtime statistics, and workspaces in one BailingHub console page, and bulk-select writable operations declared by current tool sources. Existing identity, approval, idempotency, business invocation, and final-authorization governance remains in force.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- **Dedicated management center**: the console adds an Agent Client menu backed by the existing Client App, route, Agent Auth, and Agent Client Runtime ledgers. It does not create another client or executor resource model.
|
|
8
|
+
- **Application and workspace overview**: shows client state, whether a neutral business authorization entry is configured, allowed routes, last use, and workspaces enabled for Agent Client access.
|
|
9
|
+
- **Session list and revocation**: filters Agent Sessions by client and active, expired, or revoked state. An administrator with client write permission may revoke one session, and the action is appended to the audit ledger.
|
|
10
|
+
- **Runtime statistics**: aggregates runs, conversations, completed and failed runs, tool calls, tokens, and approval states over a bounded time window. Failure rate is derived from Agent Runs already recorded by Core.
|
|
11
|
+
- **Bulk write-operation selection**: the route editor can select or clear all writable operationIds currently declared by selected tool sources. The persisted policy remains an exact operationId allowlist and never accepts `*`.
|
|
12
|
+
- **Neutral business authorization entry**: each Client App configures one account- and tenant-neutral `agent_authorize_url`. The business page uses its current login session to handle account switching, explicit tenant selection, approval, or denial, and the business backend derives the trusted identity.
|
|
13
|
+
|
|
14
|
+
## Security and Responsibility Boundaries
|
|
15
|
+
|
|
16
|
+
- The management APIs remain behind existing Core administrator permissions. Session projections do not select or return access-token hashes, refresh tokens, authorization codes, prompts, tool arguments, or business results.
|
|
17
|
+
- Bulk selection only removes repetitive console work. An operation remains unavailable unless the tool source declares it, the route exact allowlist contains it, and the Agent Session allows the route.
|
|
18
|
+
- Approval continues to inherit business-side ACC metadata and Core risk policy. `force_approval_tools` may only tighten approval; bulk selection cannot weaken it.
|
|
19
|
+
- The business system still verifies every tool request and checks the current user, tenant, role, and permissions. A BailingHub administrator does not replace final business authorization.
|
|
20
|
+
- `connectionName` is only a local host selector. It is not a trusted identity, business URL, account, or tenant declaration.
|
|
21
|
+
|
|
22
|
+
## Compatibility and Upgrade
|
|
23
|
+
|
|
24
|
+
- No SQL migration is added or modified. This release reuses the Agent Auth and Agent Client Runtime tables published in `v0.5.0`.
|
|
25
|
+
- Agent Client Runtime, Client API, Kernel API, the business-side PHP SDKs, Widget, Executor Protocol, tool signatures, and approval protocol remain compatible.
|
|
26
|
+
- The management center requires the MySQL Agent Auth and Runtime ledgers. A deployment without those ledgers does not receive fabricated session or runtime data.
|
|
27
|
+
- Deployments that do not use Agent Client require no new configuration. Existing `/run`, chat-entry, and executor paths are unchanged.
|
|
28
|
+
|
|
29
|
+
## Validation
|
|
30
|
+
|
|
31
|
+
The release candidate must pass:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run release:check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The gate covers Core type checking and 612 tests, management-API permissions and redacted projections, session revocation, bulk operationId selection, console build and E2E, Client API ecosystem consumers, all SDK contracts, Docker Demo, OSS boundaries, security and dependency audits, release consistency, and npm artifact inspection. Before publication, the public diff and package must also be checked for private domains, credentials, local paths, and environment-specific data.
|
|
38
|
+
|
|
39
|
+
## Related Documentation
|
|
40
|
+
|
|
41
|
+
- [Agent Client v1 Integration Guide](AGENT_CLIENT_QUICKSTART.en.md)
|
|
42
|
+
- [Agent Auth v1](AGENT_AUTH_API.en.md)
|
|
43
|
+
- [Agent Client Runtime v1](AGENT_CLIENT_RUNTIME_API.en.md)
|
|
44
|
+
- [Compatibility and Upgrade](COMPATIBILITY.en.md)
|
|
45
|
+
- [中文发布说明](RELEASE_NOTES_v0.5.1.md)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# BailingHub v0.5.1:智能体客户端管理中心与批量写操作配置
|
|
2
|
+
|
|
3
|
+
`v0.5.1` 是 `v0.5.0` Agent Client v1 的兼容性管理增量。它让部署者能在 BailingHub 控制台集中查看客户端应用、已授权设备与 Agent Session、运行统计和工作区,并为路由批量选择当前工具源声明的可写操作。身份、审批、幂等、业务调用与最终授权仍沿用既有治理链路。
|
|
4
|
+
|
|
5
|
+
## 主要变化
|
|
6
|
+
|
|
7
|
+
- **独立管理中心**:控制台新增“智能体客户端”菜单,复用既有 Client App、触发路由、Agent Auth 与 Agent Client Runtime 账本,不新增第二套客户端或执行器资源。
|
|
8
|
+
- **应用与工作区概览**:展示客户端启停状态、是否配置统一业务授权入口、允许路由、最近使用时间,以及启用 Agent Client 的工作区。
|
|
9
|
+
- **会话列表与撤销**:支持按客户端和 active、expired、revoked 状态查看 Agent Session,并由具备客户端写权限的管理员逐个撤销。撤销操作进入审计记录。
|
|
10
|
+
- **运行统计**:按时间窗口聚合运行数、会话数、完成/失败、工具调用、Token 与审批状态。失败率按 Core 已记录的 Agent Run 计算。
|
|
11
|
+
- **批量写操作选择**:路由编辑页可选择或清除当前工具源中全部可写 operationId,避免逐项配置大量能力。保存结果仍是精确 operationId 白名单,不支持 `*`。
|
|
12
|
+
- **统一业务授权入口**:文档明确每个 Client App 只配置一个账号与租户中立的 `agent_authorize_url`。用户打开该入口后,由业务页面基于当前登录态完成换号、租户选择、批准或拒绝;业务后端负责派生可信身份。
|
|
13
|
+
|
|
14
|
+
## 安全与责任边界
|
|
15
|
+
|
|
16
|
+
- 管理 API 只向已有 Core 管理员权限开放。会话投影不选择或返回 access token hash、refresh token、授权码、提示词、工具参数和业务结果。
|
|
17
|
+
- 批量选择只减少控制台重复操作,不改变能力声明。未由工具源声明、未进入路由精确白名单或不在 Agent Session 允许范围内的操作仍不可见。
|
|
18
|
+
- 是否需要审批继续继承业务侧 ACC 与 Core 风险规则;`force_approval_tools` 只能额外收紧,不能通过批量选择放宽。
|
|
19
|
+
- 业务系统仍须在每次工具调用时验签并检查当前用户、租户、角色和权限;BailingHub 管理员不能替代业务最终授权。
|
|
20
|
+
- `connectionName` 是宿主本机的连接实例选择器,不是可信身份、业务 URL、账号或租户声明。
|
|
21
|
+
|
|
22
|
+
## 兼容性与升级
|
|
23
|
+
|
|
24
|
+
- 没有新增或修改 SQL migration;沿用 `v0.5.0` 已发布的 Agent Auth 与 Agent Client Runtime 表。
|
|
25
|
+
- Agent Client Runtime、Client API、Kernel API、业务侧 PHP SDK、Widget、Executor Protocol、工具签名和审批协议保持兼容。
|
|
26
|
+
- 新管理中心依赖 MySQL Agent Auth 与 Runtime 账本。没有这些账本的部署不会获得虚构的会话或统计数据。
|
|
27
|
+
- 不使用 Agent Client 的部署无需新增配置,既有 `/run`、聊天入口和执行器路径不变。
|
|
28
|
+
|
|
29
|
+
## 验证
|
|
30
|
+
|
|
31
|
+
发布候选应完成:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run release:check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
重点覆盖 Core 类型检查与 612 项单测、管理 API 权限与脱敏投影、会话撤销、批量 operationId 选择、控制台构建和 E2E、Client API 生态消费者、全部 SDK 契约、Docker Demo、OSS 边界、安全扫描、依赖审计、版本一致性和 npm 制品检查。发布前还必须确认公开差异与制品不包含私有域名、凭据、本机路径或环境专属信息。
|
|
38
|
+
|
|
39
|
+
## 相关文档
|
|
40
|
+
|
|
41
|
+
- [Agent Client v1 接入指南](AGENT_CLIENT_QUICKSTART.md)
|
|
42
|
+
- [Agent Auth v1](AGENT_AUTH_API.md)
|
|
43
|
+
- [Agent Client Runtime v1](AGENT_CLIENT_RUNTIME_API.md)
|
|
44
|
+
- [兼容性与升级](兼容性与升级.md)
|
|
45
|
+
- [English release notes](RELEASE_NOTES_v0.5.1.en.md)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# BailingHub v0.6.0: Follow the Conversation Through Its Business Actions
|
|
2
|
+
|
|
3
|
+
A conversation may query account A and then update account B. Previously, administrators had to inspect separate execution records to find out what each account did. With a compatible client, they can now read the conversation first, then follow it into the original actions and approvals.
|
|
4
|
+
|
|
5
|
+
## What changes for users
|
|
6
|
+
|
|
7
|
+
- **Read the conversation in one place**: Tasks → Conversations adds a client-conversation view with synchronized user requests, intermediate explanations and final replies grouped by turn.
|
|
8
|
+
- **Follow a reply into its actions**: expand each account's original execution record to inspect calls, approvals and results. The existing authorization-scoped view remains available.
|
|
9
|
+
- **Keep account choices visible**: with the new SDK and DSH plugin, select accounts A and B from the same business system before chatting. The agent chooses the appropriate authorization for each action; identities, approvals and memory remain separate.
|
|
10
|
+
- **Recognize missing records**: business completion and transcript synchronization have separate status. Clients can upload saved events after reconnecting, and a lost acknowledgement does not duplicate them. Missing original text is reported as a gap rather than replaced with an execution summary.
|
|
11
|
+
|
|
12
|
+
Start with the [user guide](user-guide/conversations.en.md). Client developers can continue with the [integration contract](AGENT_CONVERSATION_AUDIT.en.md).
|
|
13
|
+
|
|
14
|
+
## Who should upgrade
|
|
15
|
+
|
|
16
|
+
| How you use BailingHub | What to prepare |
|
|
17
|
+
|---|---|
|
|
18
|
+
| You operate a Hub and want full local-agent conversations in its console | Upgrade Core to0.6.0, apply the new migration, and use a client that synchronizes visible conversations. |
|
|
19
|
+
| You use DeepSeek Harness with several business accounts | Install the separate `dsh-bailinghub@0.4.0` package, which pins `bailinghub-mcp-server@0.4.0`. Authorize each account and select the conversation scope before the first message. |
|
|
20
|
+
| You build a desktop or other agent client | Use Agent Client SDK0.4.0 and integrate scope, original visible history, durable capture and status. Changing a dependency version alone does not complete host integration. |
|
|
21
|
+
| You use web chat, Client API, Dify/n8n tasks or static MCP | Existing entry points remain usable without a new local client. Other adapters retain their independent release cycles. |
|
|
22
|
+
|
|
23
|
+
Prepare Core first, then the SDK and client. Upgrading Core alone cannot make older clients send their missing text; updating a plugin cannot add archive APIs to an older Core. Multi-account scope currently covers one business system and workspace, not cross-system or cross-route orchestration.
|
|
24
|
+
|
|
25
|
+
## Upgrade an existing deployment
|
|
26
|
+
|
|
27
|
+
1. Back up the database and retain the previous code or images, following the [operations guide](OPERATIONS.en.md).
|
|
28
|
+
2. Use the exact `v0.6.0` code or images. Run migrations from one deployment step: `sql/057_agent_conversation_audit.sql` adds three archive tables without rewriting previous migrations. Runtime startup does not apply it automatically.
|
|
29
|
+
3. Start the new version, check `/health/ready`, and open Tasks → Conversations. Verify new client text and its links to original execution records.
|
|
30
|
+
4. Upgrade clients using their SDK/plugin migration instructions. **A new conversation without selected authorizations is ordinary chat.** Scope becomes fixed with the first message; start a new conversation to change it. Reopening restores only the original authorizations.
|
|
31
|
+
5. With test data, check same-runtime recovery after reopening offline, whole-scope blocking after revocation, and cancellation without reactivating ended actions. Never repeat business writes merely to repair an archive.
|
|
32
|
+
|
|
33
|
+
When reverting code, retain the new tables and pending client events. Existing clients can use their original APIs; a client encountering an older Core should report the unsupported archive without discarding its original records.
|
|
34
|
+
|
|
35
|
+
## Permissions and recording boundaries
|
|
36
|
+
|
|
37
|
+
Full text is readable by administrators with task-read permission in the current Hub administration audit domain. There is no Agent read endpoint for the combined transcript, and combined replies do not flow back into each account's model memory. Business permissions, approvals and final checks remain with their original owners.
|
|
38
|
+
|
|
39
|
+
The archive covers visible client text and original execution links, not hidden reasoning, attachments or arbitrary local tool output. It cannot reconstruct text that was never saved, nor can scope restoration recover lost business tasks across process restarts. Existing business declarations, business-side SDKs and approval rules require no change for this archive feature.
|
|
40
|
+
|
|
41
|
+
ACC, ecosystem adapters, independent clients and hosted deployments remain separate projects; they are not bundled into Core or automatically upgraded by this release.
|
|
42
|
+
|
|
43
|
+
## Verification and further reading
|
|
44
|
+
|
|
45
|
+
The release commit must pass `npm run release:check`, covering permissions, membership, event idempotency, run links, console behavior, existing Client API/SDK compatibility, security and artifact boundaries. Client regressions additionally cover offline recovery, local storage failure and cancellation races. These checks use public tests or isolated synthetic data, not production-adoption evidence.
|
|
46
|
+
|
|
47
|
+
- [User guide](user-guide/conversations.en.md)
|
|
48
|
+
- [Client integration guide](AGENT_CLIENT_QUICKSTART.en.md)
|
|
49
|
+
- [Conversation archive API](AGENT_CONVERSATION_AUDIT.en.md)
|
|
50
|
+
- [SDK and plugin compatibility](https://github.com/bailinghub/bailinghub-dsh-plugin/blob/main/docs/COMPATIBILITY.md)
|
|
51
|
+
- [中文发布说明](RELEASE_NOTES_v0.6.0.md)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# BailingHub v0.6.0:看完整沟通,再追到每次业务操作
|
|
2
|
+
|
|
3
|
+
一次对话可能先查询 A 账户,再修改 B 账户。以前,管理员需要打开各自的执行记录,看到的往往只是各自做了什么。现在,使用支持的新客户端,可以先阅读完整沟通过程,再追到每份授权的具体操作和审批。
|
|
4
|
+
|
|
5
|
+
## 你会看到什么变化
|
|
6
|
+
|
|
7
|
+
- **一处看沟通经过**:控制台“任务→会话”新增客户端完整对话视图,按轮显示已同步的用户输入、中间说明和最终回复。
|
|
8
|
+
- **从回复追到操作**:每轮可展开各授权对应的原执行记录,继续查看工具调用、审批和结果;原来的授权记录入口仍保留。
|
|
9
|
+
- **多账户也能看清对象**:配套新 SDK 与 DSH 插件后,用户先选择同一业务系统的 A、B 授权,Agent 再为每次操作选用对应权限。账户的业务身份、审批和记忆保持独立。
|
|
10
|
+
- **缺记录时如实提示**:业务完成与对话同步分别判断。客户端断网后可以补传已保存事件;确认回包丢失不会重复写入。原文没有保存完整时,界面必须显示缺口,不把执行摘要当成原文。
|
|
11
|
+
|
|
12
|
+
[先看使用者指南](user-guide/conversations.md),再按需要阅读[开发者接入契约](AGENT_CONVERSATION_AUDIT.md)。
|
|
13
|
+
|
|
14
|
+
## 谁需要升级,哪些组件要一起准备
|
|
15
|
+
|
|
16
|
+
| 你的使用方式 | 此次升级建议 |
|
|
17
|
+
|---|---|
|
|
18
|
+
| 运行 BailingHub,想在后台追溯完整的本地智能体对话 | 升级 Core 到0.6.0并应用新增迁移;确认客户端已接入可见对话同步。 |
|
|
19
|
+
| 使用 DeepSeek Harness 操作多个业务账户 | 使用独立的 `dsh-bailinghub@0.4.0`;其精确依赖 `bailinghub-mcp-server@0.4.0`。按插件说明分别授权,并在首消息前选择本次范围。 |
|
|
20
|
+
| 自研桌面或其他智能体客户端 | 使用 Agent Client SDK0.4.0,接入会话范围、真实可见历史、持久归档与状态显示。只更换包版本不足以完成宿主接入。 |
|
|
21
|
+
| 只用网页聊天、Client API、Dify/n8n任务或静态MCP | 原入口继续使用,不要求新增本地客户端。其他适配器仍是独立发布项目。 |
|
|
22
|
+
|
|
23
|
+
先准备 Core,再升级 SDK 和客户端。单独升级 Core 不能让旧客户端自动上传完整原文;单独升级插件也不能让旧 Core 获得归档接口。此次多授权体验限同一业务系统、同一工作区,不宣称跨系统或跨路由编排。
|
|
24
|
+
|
|
25
|
+
## 已有部署如何升级
|
|
26
|
+
|
|
27
|
+
1. 按[运维升级指南](OPERATIONS.md)备份数据库,并保留旧代码或镜像。
|
|
28
|
+
2. 使用精确的 `v0.6.0` 代码或镜像,由一个部署步骤运行迁移。新增 `sql/057_agent_conversation_audit.sql` 只创建三张归档表;已有迁移不改写,运行时启动也不会自动执行迁移。
|
|
29
|
+
3. 启动新版并确认 `/health/ready` 正常,打开控制台“任务→会话”。使用新的客户端对话验证完整文本与原执行记录之间的关联。
|
|
30
|
+
4. 按 SDK/插件的迁移说明升级客户端。**新会话未选择授权时只有普通聊天**;首次发送后范围固定,改选需要新会话。重开原会话只恢复原授权。
|
|
31
|
+
5. 用测试数据验证断网重开后在同一运行时恢复、撤销原授权仍阻断、取消后不重新启用已结束操作。不要通过重复业务写操作来补齐审计。
|
|
32
|
+
|
|
33
|
+
回退旧代码时保留新增表和客户端待传事件。旧客户端仍可使用原接口;旧 Core 不支持新归档时,客户端应明确显示不支持,不丢弃原记录。
|
|
34
|
+
|
|
35
|
+
## 权限与记录边界
|
|
36
|
+
|
|
37
|
+
完整文本供当前中枢管理审计域中具有任务读取权限的管理员查看。Agent 没有读取聚合正文的接口,混合回复也不会回流到每个账户的模型记忆。每份授权的业务权限与审批仍按原规则执行,业务系统继续做最终校验。
|
|
38
|
+
|
|
39
|
+
归档只覆盖客户端实际可见的文本和原执行关联,不包含隐藏推理、附件或任意本地工具原始输出。无法还原过去没有保存的原文;范围恢复也不表示能跨进程恢复丢失的业务任务。业务后端的能力声明、业务 SDK 和审批规则无需为本次归档功能调整。
|
|
40
|
+
|
|
41
|
+
ACC规范、各生态适配器、独立客户端与托管环境保持各自边界;它们不被合并为Core的一部分,也不因Core发布而自动升级。
|
|
42
|
+
|
|
43
|
+
## 检查与进一步阅读
|
|
44
|
+
|
|
45
|
+
发布提交须通过 `npm run release:check`,覆盖权限与成员校验、事件幂等、执行关联、控制台、现有Client API/SDK兼容性、安全与制品边界。配套客户端另有离线恢复、保存失败和取消竞态回归。验证使用公开测试或隔离合成数据,不表示生产采用。
|
|
46
|
+
|
|
47
|
+
- [使用者指南](user-guide/conversations.md)
|
|
48
|
+
- [客户端接入指南](AGENT_CLIENT_QUICKSTART.md)
|
|
49
|
+
- [完整对话接口](AGENT_CONVERSATION_AUDIT.md)
|
|
50
|
+
- [SDK与插件各自的配套说明](https://github.com/bailinghub/bailinghub-dsh-plugin/blob/main/docs/COMPATIBILITY.md)
|
|
51
|
+
- [English release notes](RELEASE_NOTES_v0.6.0.en.md)
|
|
@@ -15,6 +15,7 @@ It does not replace developer documentation. Developer docs explain HTTP, signat
|
|
|
15
15
|
|
|
16
16
|
| Document | Question answered |
|
|
17
17
|
|---|---|
|
|
18
|
+
| [conversations.en.md](conversations.en.md) | Select several accounts, follow the full conversation into its actions, and handle offline or missing records. |
|
|
18
19
|
| [overview.en.md](overview.en.md) | Why does an existing system need an Agent control plane? |
|
|
19
20
|
| [concepts.en.md](concepts.en.md) | How do routes, callers, targets, tools, knowledge, and channels relate? |
|
|
20
21
|
| [console-map.en.md](console-map.en.md) | What does each console menu do and what does it produce? |
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
| 文档 | 解决的问题 |
|
|
17
17
|
|---|---|
|
|
18
|
+
| [conversations.md](conversations.md) | 在一个对话里选择多个账户,并从完整沟通追到具体操作;解释断网与记录缺口。 |
|
|
18
19
|
| [overview.md](overview.md) | 为什么需要百灵中枢,它解决传统系统接 Agent 时的哪些具体问题。 |
|
|
19
20
|
| [concepts.md](concepts.md) | 路由、接入方、工具源、调度目标、模型凭证、知识库、聊天入口之间是什么关系。 |
|
|
20
21
|
| [console-map.md](console-map.md) | 后台每个菜单是干什么的、什么时候会用、配好后能拿到什么。 |
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Use Jobs as the normal operational home page. It shows conversations, runs, trace events, tool calls, approvals, model usage, errors, and delivery. It produces evidence for quality review and incident diagnosis.
|
|
6
6
|
|
|
7
|
+
The client-conversation view groups synchronized user and assistant text by turn and links to each account’s original execution record. Authorization-scoped records remain separate. Unsynchronized or missing older text is not presented as a complete transcript. See the [conversation guide](conversations.en.md).
|
|
8
|
+
|
|
7
9
|
## Routes
|
|
8
10
|
|
|
9
11
|
Routes define Agent scenarios. Configure target, model, context, one or more tool providers, global tool-call budget, approval delivery, retry, memory, audience, budget, and result delivery. The route row produces a stable `route_key` and generated call examples.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Use Multiple Accounts in One Conversation and Follow the Full Story
|
|
2
|
+
|
|
3
|
+
[简体中文](conversations.md) · [User guide](README.en.md)
|
|
4
|
+
|
|
5
|
+
If you manage stores A and B in the same business system, you can select both authorizations for a conversation, then let the agent use the appropriate account for each action. Stores are an example: these may be any two authorized accounts in the same system.
|
|
6
|
+
|
|
7
|
+
## What you need
|
|
8
|
+
|
|
9
|
+
Deploy **BailingHub 0.6.0** and use **dsh-bailinghub 0.4.0**, which depends on the independent **bailinghub-mcp-server 0.4.0** SDK. A custom client must integrate conversation scope, original visible history and archive APIs. Upgrading only the Hub does not make an older client upload a full transcript.
|
|
10
|
+
|
|
11
|
+
Your business system must already expose the operations you need, and you must authorize A and B separately. This upgrade does not require rewriting existing business capabilities or approval rules. Start with the [public Docker demo](../DEMO.en.md) to learn query, approval and execution; that demo does not replace client installation and account authorization.
|
|
12
|
+
|
|
13
|
+
## A complete session
|
|
14
|
+
|
|
15
|
+
1. **Start a conversation and select accounts.** Choose A and B in a compatible client's scope selector. Selecting only A permits only A; selecting nothing means ordinary chat. For DSH commands, follow the [plugin getting-started guide](https://github.com/bailinghub/bailinghub-dsh-plugin/blob/main/docs/GETTING_STARTED.md).
|
|
16
|
+
2. **Name the intended account in your request.** For example: “Check orders for A and B, but update the contact for A only.” The agent chooses within the selected scope; available actions still depend on the business system and current permissions.
|
|
17
|
+
3. **Follow existing approvals.** Distinguish completed, awaiting-approval and failed actions. A conversational reply alone does not prove business success; inspect the original call or business result when needed.
|
|
18
|
+
4. **Follow the conversation into each action.** A Hub administrator opens **Tasks → Conversations → Client conversations**, reads each turn, then opens the original account's calls and approvals. The authorization-scoped records remain available separately.
|
|
19
|
+
|
|
20
|
+
The account selection is fixed after the first message. Start a new conversation to change it. Reopening an existing conversation restores the original scope, never today's default or every registered account.
|
|
21
|
+
|
|
22
|
+
## When something goes wrong
|
|
23
|
+
|
|
24
|
+
| Situation | Meaning and next step |
|
|
25
|
+
|---|---|
|
|
26
|
+
| Pending synchronization | Business may already be complete. Reconnect and retry synchronization in the original conversation; do not repeat a write merely to repair its record. |
|
|
27
|
+
| Authorization cannot yet be verified | Business tools stay closed. Retry in the same session after reconnecting; every original account must pass verification before recovery. |
|
|
28
|
+
| An original account is revoked or its identity changes | The whole original scope stays blocked. The client does not silently fall back to the remaining account. |
|
|
29
|
+
| Local storage failure or a history gap | A saved prefix is not the full history. Display unsaved counts or missing history; never invent the missing text. |
|
|
30
|
+
| Unsupported version | Check the Hub, SDK and plugin versions. Existing business features do not automatically disappear because the optional archive is unsupported. |
|
|
31
|
+
|
|
32
|
+
“Synced” means the currently saved events were uploaded. A separate history-gap or unverified-history indication still matters. Archive recovery does not reconstruct lost business tasks or repeat business writes.
|
|
33
|
+
|
|
34
|
+
## Who can read it
|
|
35
|
+
|
|
36
|
+
Full text belongs to the deployed Hub's administration audit domain, readable by administrators with task-read permission. Account identities, approvals and memory remain separate; a combined reply is not copied into each account's model memory.
|
|
37
|
+
|
|
38
|
+
The archive currently covers visible text and original execution links, not hidden reasoning, attachments or arbitrary local tool output. Older records containing only execution summaries continue to identify missing transcript text.
|
|
39
|
+
|
|
40
|
+
See the [v0.6.0 upgrade notes](../RELEASE_NOTES_v0.6.0.en.md). Client developers can continue with the [integration guide](../AGENT_CLIENT_QUICKSTART.en.md) and [conversation archive API](../AGENT_CONVERSATION_AUDIT.en.md).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# 在一次对话里使用多个账户,并看清完整过程
|
|
2
|
+
|
|
3
|
+
[English](conversations.en.md) · [返回使用者指南](README.md)
|
|
4
|
+
|
|
5
|
+
如果你管理同一系统里的 A、B 两家门店,过去可能要先切换账户,再分别提问。配套的新客户端可以让你先选好本次对话允许使用的授权,再由 Agent 为每次操作选择对应账户。门店只是示例;它也可以是同一系统中的两个业务账户。
|
|
6
|
+
|
|
7
|
+
## 开始前需要什么
|
|
8
|
+
|
|
9
|
+
部署者准备 BailingHub **0.6.0**;本地客户端使用 **dsh-bailinghub 0.4.0**,它依赖独立的 **bailinghub-mcp-server 0.4.0** SDK。使用自研客户端时,开发者需要接入会话范围、原始可见历史和归档接口。单独升级中枢,不会让旧客户端自动上传完整对话。
|
|
10
|
+
|
|
11
|
+
业务系统已经接入并开放了需要的操作,你也已经分别完成 A、B 的业务授权。此次升级不要求重写既有业务能力或审批规则。还没有接入业务系统时,先运行[公开 Docker Demo](../DEMO.md)了解查询、审批和执行;该 Demo 不替代多账户客户端的安装与授权。
|
|
12
|
+
|
|
13
|
+
## 一次完整使用流程
|
|
14
|
+
|
|
15
|
+
1. **新建对话并选择账户。** 在支持选择范围的客户端中选择 A、B。只选 A 就只能使用 A;不选账户就是普通聊天。DSH 命令行的选择方法见[插件上手指南](https://github.com/bailinghub/bailinghub-dsh-plugin/blob/main/docs/GETTING_STARTED.zh-CN.md)。
|
|
16
|
+
2. **说清操作对象。** 例如“分别查询 A、B 的订单,只修改 A 的联系人”。Agent 在本次已选范围里使用对应授权;可以执行什么,仍取决于业务系统开放的能力与当前权限。
|
|
17
|
+
3. **按原流程处理审批。** 已完成、待审批与失败的动作分别判断。完整回复不是业务成功的证明,需要时进入原调用或业务后台核对。
|
|
18
|
+
4. **从完整沟通进入具体动作。** 中枢管理员打开“任务→会话→客户端完整对话”,先按轮阅读沟通,再打开 A 或 B 的执行记录、工具调用和审批轨迹。“原授权记录”保留原来的查询入口。
|
|
19
|
+
|
|
20
|
+
首次发出消息后,本次对话的账户范围固定。想换账户就新建对话;重新打开旧对话时恢复原范围,不能自动换成当前默认账户或扩大为全部授权。
|
|
21
|
+
|
|
22
|
+
## 断网、撤销或保存失败时会怎样
|
|
23
|
+
|
|
24
|
+
| 看到的情况 | 应如何理解和处理 |
|
|
25
|
+
|---|---|
|
|
26
|
+
| 待同步 | 业务可能已经完成,沟通记录还没传完。联网后在原会话重试同步,不要为了补记录重新执行修改。 |
|
|
27
|
+
| 授权暂时无法核验 | 业务工具保持关闭;联网后在同一会话重试。必须重新核验全部原账户,才能继续补传。 |
|
|
28
|
+
| 某个原账户已撤销或身份改变 | 整个原范围保持阻断,不会悄悄只剩另一个账户。 |
|
|
29
|
+
| 本地保存失败或历史存在缺口 | 已保存的前半段不代表完整历史。客户端应显示未保存数量或缺口,不能猜补缺失的文字。 |
|
|
30
|
+
| 版本不支持 | 检查中枢、SDK和插件配套版本。旧版本的原业务能力不因此自动消失。 |
|
|
31
|
+
|
|
32
|
+
“已同步”表示当前已保存的事件已上传;还要留意历史缺口或“尚未核对完整历史”的提示。补传只恢复对话归档,不恢复重启后丢失的业务任务,也不会重新发起业务写操作。
|
|
33
|
+
|
|
34
|
+
## 谁能看到这些记录
|
|
35
|
+
|
|
36
|
+
完整文字进入你所部署中枢的管理审计空间,供具备任务读取权限的管理员查看。各账户的业务身份、审批与记忆仍分开,混合回复不会被复制到每个账户的模型记忆中。
|
|
37
|
+
|
|
38
|
+
当前归档范围是客户端实际可见的文本与原执行关联,不包含隐藏推理、附件或任意本地工具的原始输出。只看到了某份授权的执行摘要、却没有完整原文的旧记录,仍会明确表示原文缺失。
|
|
39
|
+
|
|
40
|
+
部署与升级请看 [v0.6.0 说明](../RELEASE_NOTES_v0.6.0.md);客户端开发者请看[接入指南](../AGENT_CLIENT_QUICKSTART.md)及[完整对话接口](../AGENT_CONVERSATION_AUDIT.md)。
|
package/package.json
CHANGED
|
@@ -102,6 +102,8 @@ const englishCompanions = {
|
|
|
102
102
|
'docs/RELEASE_NOTES_v0.3.3.md': 'docs/RELEASE_NOTES_v0.3.3.en.md',
|
|
103
103
|
'docs/RELEASE_NOTES_v0.3.4.md': 'docs/RELEASE_NOTES_v0.3.4.en.md',
|
|
104
104
|
'docs/RELEASE_NOTES_v0.5.0.md': 'docs/RELEASE_NOTES_v0.5.0.en.md',
|
|
105
|
+
'docs/RELEASE_NOTES_v0.5.1.md': 'docs/RELEASE_NOTES_v0.5.1.en.md',
|
|
106
|
+
'docs/RELEASE_NOTES_v0.6.0.md': 'docs/RELEASE_NOTES_v0.6.0.en.md',
|
|
105
107
|
'docs/TOOLS_DESIGN.md': 'docs/TOOLS_DESIGN.en.md',
|
|
106
108
|
'docs/TOOLS_MODEL.md': 'docs/TOOLS_MODEL.en.md',
|
|
107
109
|
'docs/AI友好工具设计指南.md': 'docs/AI_FRIENDLY_TOOLS.en.md',
|
|
@@ -112,6 +114,7 @@ const englishCompanions = {
|
|
|
112
114
|
'docs/user-guide/concepts.md': 'docs/user-guide/concepts.en.md',
|
|
113
115
|
'docs/user-guide/console-map.md': 'docs/user-guide/console-map.en.md',
|
|
114
116
|
'docs/user-guide/scenarios.md': 'docs/user-guide/scenarios.en.md',
|
|
117
|
+
'docs/user-guide/conversations.md': 'docs/user-guide/conversations.en.md',
|
|
115
118
|
'brain/README.md': 'brain/README.en.md',
|
|
116
119
|
'sql/README.md': 'sql/README.en.md',
|
|
117
120
|
};
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.6.0"
|
|
13
13
|
MYSQL_TAG="${BAILING_MYSQL_IMAGE_TAG:-8.4}"
|
|
14
14
|
MYSQL_IMAGE="${BAILING_MYSQL_IMAGE:-$REGISTRY/$NAMESPACE/bailing-mysql:$MYSQL_TAG}"
|
|
15
15
|
PLATFORM="${BAILING_IMAGE_PLATFORM:-linux/amd64}"
|
|
@@ -38,8 +38,8 @@ function updateJson(root, relativePath, update) {
|
|
|
38
38
|
test('current release surface is internally consistent', () => {
|
|
39
39
|
const result = checkReleaseConsistency({ root: repoRoot });
|
|
40
40
|
assert.deepEqual(result.findings, []);
|
|
41
|
-
assert.equal(result.version, '0.
|
|
42
|
-
assert.equal(result.stableVersion, '0.
|
|
41
|
+
assert.equal(result.version, '0.6.0');
|
|
42
|
+
assert.equal(result.stableVersion, '0.6.0');
|
|
43
43
|
assert.equal(result.publishTag, 'latest');
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -51,13 +51,13 @@ for (const [label, tag] of [
|
|
|
51
51
|
const root = createFixture();
|
|
52
52
|
try {
|
|
53
53
|
updateJson(root, 'package.json', (pkg) => {
|
|
54
|
-
pkg.version = '0.5.
|
|
54
|
+
pkg.version = '0.5.1-rc.1';
|
|
55
55
|
if (tag === undefined) delete pkg.publishConfig;
|
|
56
56
|
else pkg.publishConfig = { tag };
|
|
57
57
|
});
|
|
58
58
|
updateJson(root, 'package-lock.json', (lock) => {
|
|
59
|
-
lock.version = '0.5.
|
|
60
|
-
lock.packages[''].version = '0.5.
|
|
59
|
+
lock.version = '0.5.1-rc.1';
|
|
60
|
+
lock.packages[''].version = '0.5.1-rc.1';
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
const result = checkReleaseConsistency({ root });
|
package/scripts/e2e-console.mjs
CHANGED
|
@@ -108,6 +108,46 @@ const agentRunId = '123e4567-e89b-42d3-a456-426614174000';
|
|
|
108
108
|
const agentToolJobId = '223e4567-e89b-42d3-a456-426614174000';
|
|
109
109
|
const incompleteAgentRunId = '323e4567-e89b-42d3-a456-426614174000';
|
|
110
110
|
const incompleteAgentToolJobId = '423e4567-e89b-42d3-a456-426614174000';
|
|
111
|
+
const conversationId = '523e4567-e89b-42d3-a456-426614174000';
|
|
112
|
+
const conversationTurnId = 'demo-conversation-turn-1';
|
|
113
|
+
const conversationUser = '对比演示账户 A、B,只更新 A 的资料。';
|
|
114
|
+
const conversationReply = '账户 A 更新成功;账户 B 的审批已通过,仍需客户端继续处理。';
|
|
115
|
+
const conversationMembers = ['A', 'B'].map((label, index) => ({
|
|
116
|
+
session_id: `623e4567-e89b-42d3-a456-42661417400${index}`,
|
|
117
|
+
display_label: `演示账户 ${label}`,
|
|
118
|
+
confirmed: true,
|
|
119
|
+
principal: { id: `demo-user-${index}`, tenant: `demo-account-${label}`, roles: ['operator'] },
|
|
120
|
+
}));
|
|
121
|
+
const conversation = {
|
|
122
|
+
conversation_id: conversationId,
|
|
123
|
+
client_archive_id: '723e4567-e89b-42d3-a456-426614174000',
|
|
124
|
+
client_conversation_id: 'demo-client-conversation',
|
|
125
|
+
client_app_id: 'demo-app',
|
|
126
|
+
route_key: 'demo_support',
|
|
127
|
+
state: 'ready',
|
|
128
|
+
member_count: 2,
|
|
129
|
+
confirmed_count: 2,
|
|
130
|
+
last_sequence: 6,
|
|
131
|
+
message_count: 2,
|
|
132
|
+
turn_count: 1,
|
|
133
|
+
last_turn_status: 'completed',
|
|
134
|
+
created_at: new Date().toISOString(),
|
|
135
|
+
updated_at: new Date().toISOString(),
|
|
136
|
+
};
|
|
137
|
+
const conversationEvents = [
|
|
138
|
+
{ kind: 'turn_start' },
|
|
139
|
+
{ kind: 'user_message', content: conversationUser },
|
|
140
|
+
{ kind: 'run_link', run_id: agentRunId, member_session_id: conversationMembers[0].session_id, thread_id: 2 },
|
|
141
|
+
{ kind: 'run_link', run_id: incompleteAgentRunId, member_session_id: conversationMembers[1].session_id, thread_id: 3 },
|
|
142
|
+
{ kind: 'assistant_message', content: conversationReply },
|
|
143
|
+
{ kind: 'turn_end', status: 'completed' },
|
|
144
|
+
].map((event, index) => ({
|
|
145
|
+
event_id: `823e4567-e89b-42d3-a456-42661417400${index}`,
|
|
146
|
+
sequence: index + 1,
|
|
147
|
+
client_turn_id: conversationTurnId,
|
|
148
|
+
created_at: conversation.created_at,
|
|
149
|
+
...event,
|
|
150
|
+
}));
|
|
111
151
|
|
|
112
152
|
let smokeRequests = 0;
|
|
113
153
|
|
|
@@ -132,6 +172,8 @@ function agentRunTracePayload() {
|
|
|
132
172
|
run: {
|
|
133
173
|
run_id: agentRunId,
|
|
134
174
|
thread_id: 2,
|
|
175
|
+
conversation_audit_id: conversationId,
|
|
176
|
+
client_turn_id: conversationTurnId,
|
|
135
177
|
client_app_id: 'demo-app',
|
|
136
178
|
route_key: 'demo_support',
|
|
137
179
|
status: 'completed',
|
|
@@ -172,6 +214,8 @@ function incompleteAgentRunTracePayload() {
|
|
|
172
214
|
run: {
|
|
173
215
|
run_id: incompleteAgentRunId,
|
|
174
216
|
thread_id: 3,
|
|
217
|
+
conversation_audit_id: conversationId,
|
|
218
|
+
client_turn_id: conversationTurnId,
|
|
175
219
|
client_app_id: 'demo-app',
|
|
176
220
|
route_key: 'demo_support',
|
|
177
221
|
status: 'context_ready',
|
|
@@ -252,6 +296,13 @@ async function mockApi(context) {
|
|
|
252
296
|
if (url.pathname === '/admin/api/clients') return route.fulfill({ json: fixtures.clients });
|
|
253
297
|
if (url.pathname === '/admin/api/routes') return route.fulfill({ json: fixtures.routes });
|
|
254
298
|
if (url.pathname === '/admin/api/runs') return route.fulfill({ json: fixtures.runs });
|
|
299
|
+
if (url.pathname === '/admin/api/conversation-audits') return route.fulfill({ json: {
|
|
300
|
+
schema: 'bailing.agent-conversation-audit-list.v1', items: [conversation], has_more: false, next_offset: null,
|
|
301
|
+
} });
|
|
302
|
+
if (url.pathname === `/admin/api/conversation-audits/${conversationId}`) return route.fulfill({ json: {
|
|
303
|
+
schema: 'bailing.agent-conversation-audit-detail.v1', conversation, members: conversationMembers,
|
|
304
|
+
events: conversationEvents, has_more: false, next_after_sequence: null,
|
|
305
|
+
} });
|
|
255
306
|
if (/^\/admin\/api\/runs\/[^/]+\/trace$/.test(url.pathname)) return route.fulfill({ json: tracePayload() });
|
|
256
307
|
if (url.pathname === `/admin/api/threads/2/agent-runs/${agentRunId}/trace`) return route.fulfill({ json: agentRunTracePayload() });
|
|
257
308
|
if (url.pathname === `/admin/api/threads/3/agent-runs/${incompleteAgentRunId}/trace`) return route.fulfill({ json: incompleteAgentRunTracePayload() });
|
|
@@ -351,6 +402,44 @@ try {
|
|
|
351
402
|
await page.getByRole('button', { name: '取消' }).click();
|
|
352
403
|
|
|
353
404
|
await page.getByRole('menuitem', { name: '任务' }).click();
|
|
405
|
+
const auditRadio = page.getByRole('radio', { name: '客户端完整对话', exact: true });
|
|
406
|
+
if (!await auditRadio.isChecked()) throw new Error('任务会话页应默认展示客户端完整对话');
|
|
407
|
+
const auditList = page.locator('aside[aria-label="客户端对话列表"]');
|
|
408
|
+
await auditList.getByRole('button', { name: /demo-client-conversation/ }).click();
|
|
409
|
+
const auditTurn = page.locator(`section[data-turn-id="${conversationTurnId}"]`);
|
|
410
|
+
await expectVisible(page, conversationReply);
|
|
411
|
+
if (await auditTurn.locator('.userMessage .messageText').innerText() !== conversationUser ||
|
|
412
|
+
await auditTurn.locator('.assistantMessage .messageText').innerText() !== conversationReply) {
|
|
413
|
+
throw new Error('客户端对话必须展示原始可见正文,不能以授权执行摘要替代');
|
|
414
|
+
}
|
|
415
|
+
await expectVisible(page, '已接收 1 轮 / 2 条消息');
|
|
416
|
+
await expectVisible(page, '旧历史或未同步内容可能缺失');
|
|
417
|
+
if (await auditTurn.locator('.authorizationRun').count() !== 2) throw new Error('本轮应保留两项独立授权执行');
|
|
418
|
+
const accountA = auditTurn.locator('.authorizationRun').filter({ hasText: agentRunId });
|
|
419
|
+
const accountB = auditTurn.locator('.authorizationRun').filter({ hasText: incompleteAgentRunId });
|
|
420
|
+
await accountA.getByText('演示账户 A', { exact: true }).waitFor();
|
|
421
|
+
await accountB.getByText('演示账户 B', { exact: true }).waitFor();
|
|
422
|
+
await accountA.getByRole('button', { name: '查看授权轨迹', exact: true }).click();
|
|
423
|
+
await accountA.locator('.invocation').getByText('staff_edit', { exact: true }).waitFor();
|
|
424
|
+
await accountA.getByRole('button', { name: '原授权记录', exact: true }).click();
|
|
425
|
+
await expectVisible(page, '把员工资料改成新的姓名');
|
|
426
|
+
if (!await page.getByRole('radio', { name: '原授权记录', exact: true }).isChecked()) {
|
|
427
|
+
throw new Error('授权执行必须能回到原授权记录');
|
|
428
|
+
}
|
|
429
|
+
await page.locator('.tracetoggle').filter({ hasText: '执行轨迹' }).first().click();
|
|
430
|
+
await page.getByRole('button', { name: '查看客户端完整对话', exact: true }).click();
|
|
431
|
+
await page.waitForURL((url) => url.searchParams.get('conversation') === conversationId &&
|
|
432
|
+
url.searchParams.get('turn') === conversationTurnId);
|
|
433
|
+
await auditTurn.locator('.assistantMessage .messageText').waitFor({ state: 'visible' });
|
|
434
|
+
if (!await auditRadio.isChecked() || await auditTurn.locator('.assistantMessage .messageText').innerText() !== conversationReply) {
|
|
435
|
+
throw new Error('原执行轨迹必须返回同一客户端对话与原始答复');
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// Keep the existing business-entry and authorization-scoped trace checks.
|
|
439
|
+
await page.locator('.conversationViewSwitch').getByText('原授权记录', { exact: true }).click();
|
|
440
|
+
if (!await page.getByRole('radio', { name: '原授权记录', exact: true }).isChecked()) {
|
|
441
|
+
throw new Error('切换后应展示原授权记录');
|
|
442
|
+
}
|
|
354
443
|
await expectVisible(page, '查询订单 SO-1001');
|
|
355
444
|
await page.getByText('查询订单 SO-1001').first().click();
|
|
356
445
|
await expectVisible(page, '订单 SO-1001 已查询完成');
|