bailinghub 0.6.0 → 0.7.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.
Files changed (149) hide show
  1. package/README.en.md +11 -7
  2. package/README.md +10 -7
  3. package/docker-compose.images.yml +2 -2
  4. package/docs/AGENT_AUTH_API.en.md +112 -1
  5. package/docs/AGENT_AUTH_API.md +99 -1
  6. package/docs/AGENT_CLIENT_QUICKSTART.en.md +32 -5
  7. package/docs/AGENT_CLIENT_QUICKSTART.md +27 -4
  8. package/docs/AGENT_CLIENT_RUNTIME_API.md +4 -1
  9. package/docs/AGENT_CONVERSATION_AUDIT.en.md +109 -4
  10. package/docs/AGENT_CONVERSATION_AUDIT.md +84 -3
  11. package/docs/AGENT_SUBJECT_DISPLAY.en.md +95 -0
  12. package/docs/AGENT_SUBJECT_DISPLAY.md +95 -0
  13. package/docs/AGENT_SYSTEM_INFO.en.md +99 -0
  14. package/docs/AGENT_SYSTEM_INFO.md +97 -0
  15. package/docs/CHANGELOG.en.md +25 -2
  16. package/docs/CHANGELOG.md +24 -1
  17. package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
  18. package/docs/INDEPENDENT_VALIDATION.md +4 -4
  19. package/docs/LOCAL_AGENT_SETUP.en.md +116 -0
  20. package/docs/LOCAL_AGENT_SETUP.md +116 -0
  21. package/docs/README.en.md +8 -0
  22. package/docs/README.md +8 -0
  23. package/docs/RELEASE_NOTES_NEXT.en.md +3 -0
  24. package/docs/RELEASE_NOTES_NEXT.md +3 -0
  25. package/docs/RELEASE_NOTES_v0.6.0.en.md +4 -2
  26. package/docs/RELEASE_NOTES_v0.6.0.md +2 -0
  27. package/docs/RELEASE_NOTES_v0.6.1.en.md +53 -0
  28. package/docs/RELEASE_NOTES_v0.6.1.md +53 -0
  29. package/docs/RELEASE_NOTES_v0.7.0.en.md +116 -0
  30. package/docs/RELEASE_NOTES_v0.7.0.md +116 -0
  31. package/docs/SDK.en.md +31 -0
  32. package/docs/user-guide/conversations.en.md +4 -2
  33. package/docs/user-guide/conversations.md +4 -2
  34. package/package.json +1 -1
  35. package/schemas/config/route.schema.json +15 -2
  36. package/scripts/check-doc-links.mjs +2 -0
  37. package/scripts/check-image-tags.sh +1 -1
  38. package/scripts/check-release-consistency.test.mjs +2 -2
  39. package/scripts/install.sh +1 -1
  40. package/scripts/publish-images.sh +1 -1
  41. package/scripts/release-audit.mjs +2 -0
  42. package/scripts/sdk-agent-auth-lifecycle-check.mjs +178 -0
  43. package/scripts/sdk-runtime-test.mjs +5 -2
  44. package/scripts/verify-github-repo.mjs +2 -0
  45. package/sdk/php/README.md +29 -0
  46. package/sdk/php/src/AgentAuth.php +100 -4
  47. package/sdk/php/src/HubClient.php +2 -1
  48. package/sdk/php7/README.md +31 -0
  49. package/sdk/php7/src/AgentAuth.php +99 -4
  50. package/sdk/php7/src/HubClient.php +2 -1
  51. package/sql/058_agent_conversation_member_bindings.sql +9 -0
  52. package/sql/059_agent_subject_display.sql +5 -0
  53. package/sql/README.en.md +15 -0
  54. package/sql/README.md +25 -0
  55. package/src/app/agent-conversation-audit.ts +20 -0
  56. package/src/app/agent-system-info.ts +41 -0
  57. package/src/app/agent-tool-invocations.ts +16 -4
  58. package/src/core/config/agent-setup.ts +37 -0
  59. package/src/core/config/client-agent-setup.ts +25 -0
  60. package/src/core/config/config-schema.test.ts +11 -0
  61. package/src/core/config/route-config.test.ts +28 -0
  62. package/src/core/config/route-config.ts +43 -4
  63. package/src/core/contracts/agent-subject-display.test.ts +19 -0
  64. package/src/core/contracts/agent-subject-display.ts +36 -0
  65. package/src/core/contracts/types.ts +15 -0
  66. package/src/core/runtime/agent-conversation-audit.test.ts +19 -1
  67. package/src/core/runtime/agent-conversation-audit.ts +39 -0
  68. package/src/infrastructure/config/config-agent-auth-business-sessions.test.ts +120 -0
  69. package/src/infrastructure/config/config-agent-auth-lifecycle-race.test.ts +152 -0
  70. package/src/infrastructure/config/config-agent-auth-repository.test.ts +2 -0
  71. package/src/infrastructure/config/config-agent-auth-repository.ts +208 -18
  72. package/src/infrastructure/config/config-agent-conversation-audit-cross-binding.test.ts +120 -0
  73. package/src/infrastructure/config/config-agent-conversation-audit-repository.ts +117 -23
  74. package/src/infrastructure/config/config-agent-subject-display.test.ts +103 -0
  75. package/src/infrastructure/config/config-client-repository.ts +21 -0
  76. package/src/infrastructure/config/config-route-agent-setup.test.ts +59 -0
  77. package/src/infrastructure/config/config-route-repository.ts +24 -0
  78. package/src/infrastructure/config/configstore.ts +7 -3
  79. package/src/infrastructure/schema/core-schema-migrator.test.ts +90 -0
  80. package/src/routes/admin-access.ts +37 -0
  81. package/src/routes/admin-agent-clients.ts +11 -0
  82. package/src/routes/admin-agent-setup.test.ts +130 -0
  83. package/src/routes/admin-agent-setup.ts +68 -0
  84. package/src/routes/admin-client-agent-setup.test.ts +93 -0
  85. package/src/routes/admin-dispatch-config.ts +2 -0
  86. package/src/routes/agent-api.ts +7 -0
  87. package/src/routes/agent-auth-lifecycle-http.test.ts +177 -0
  88. package/src/routes/agent-auth-lifecycle.test.ts +193 -0
  89. package/src/routes/agent-auth.test.ts +1 -1
  90. package/src/routes/agent-auth.ts +206 -16
  91. package/src/routes/agent-conversation-audit-cross-binding-http.test.ts +122 -0
  92. package/src/routes/agent-conversation-audit.ts +8 -2
  93. package/src/routes/agent-subject-display-http.test.ts +145 -0
  94. package/src/routes/agent-system-info.test.ts +132 -0
  95. package/src/test-support/agent-auth-business-query-fixture.ts +43 -0
  96. package/src/test-support/agent-auth-lifecycle-fixture.ts +288 -0
  97. package/src/test-support/agent-conversation-audit-fixture.ts +30 -6
  98. package/src/test-support/agent-conversation-audit-http-fixture.ts +84 -0
  99. package/web/connect/bailing-connect-php.tgz +0 -0
  100. package/web/connect/bailing-connect-php7.tgz +0 -0
  101. package/web/console/assets/{Accounts-Ca_VnSu9.js → Accounts-ChL9k-XA.js} +1 -1
  102. package/web/console/assets/AgentClients-Bs7UgVDj.js +1 -0
  103. package/web/console/assets/AgentClients-DkgPTEbq.css +1 -0
  104. package/web/console/assets/{Approvals-CMvPWacY.js → Approvals-Bs6FGbp2.js} +1 -1
  105. package/web/console/assets/{Audit-CIRqOCnL.js → Audit-4WWYhkFM.js} +1 -1
  106. package/web/console/assets/{BrandLockup-BrytmTTH.js → BrandLockup-D2GhCipL.js} +1 -1
  107. package/web/console/assets/{Channels-CApxH2TB.js → Channels-CmoGpiCJ.js} +1 -1
  108. package/web/console/assets/{ChatEntries-CJon3bWJ.js → ChatEntries-BFRMtwta.js} +1 -1
  109. package/web/console/assets/Clients-CSHIsaWU.css +1 -0
  110. package/web/console/assets/Clients-DGkkSXyA.js +3 -0
  111. package/web/console/assets/{Cost-BbhlQFP8.js → Cost-BmGt0MfS.js} +1 -1
  112. package/web/console/assets/{Credentials-kqr1W0K7.js → Credentials-CR-sYINT.js} +1 -1
  113. package/web/console/assets/{Diagnostics-Kljt9XTH.js → Diagnostics-DAPbKSJp.js} +1 -1
  114. package/web/console/assets/{Executors-DnsB-Xz4.js → Executors-CgpiT3o8.js} +1 -1
  115. package/web/console/assets/{Kb-DLZSAFWP.js → Kb-Cm9dVSQw.js} +1 -1
  116. package/web/console/assets/{Login-DiTjPWmN.js → Login-CyUcsTZ_.js} +1 -1
  117. package/web/console/assets/{Projects-CXcVCgCD.js → Projects-DldFPgWg.js} +1 -1
  118. package/web/console/assets/Routes-DkMIjMQA.css +1 -0
  119. package/web/console/assets/Routes-DubfjlBD.js +124 -0
  120. package/web/console/assets/Runs-1hxgkuR4.js +3 -0
  121. package/web/console/assets/Runs-CvGTV8I-.css +1 -0
  122. package/web/console/assets/{Setup-FqoCKmfZ.js → Setup-DBLOnI2_.js} +1 -1
  123. package/web/console/assets/{Shell-BEqpONiy.js → Shell-gJ5Vz_E7.js} +1 -1
  124. package/web/console/assets/{StorageBuckets-CkORbYXY.js → StorageBuckets-DkDW16tj.js} +1 -1
  125. package/web/console/assets/{SystemSettings-gTQAazu7.js → SystemSettings-cDkudo2y.js} +1 -1
  126. package/web/console/assets/{SystemStatus-DAmUUNqO.js → SystemStatus-DZd6s8OX.js} +1 -1
  127. package/web/console/assets/{Targets-CZmDcjsE.js → Targets-DYNGq1NU.js} +1 -1
  128. package/web/console/assets/{Tools-CIHInlHL.js → Tools-DpWM59vV.js} +1 -1
  129. package/web/console/assets/{index-BkLbd7Cc.js → index-DGqs28gI.js} +2 -2
  130. package/web/console/assets/{request-r7GHVJzw.js → request-B7MLvOqo.js} +1 -1
  131. package/web/console/assets/{schema-BVn_hB7M.js → schema-CMuwjYdJ.js} +1 -1
  132. package/web/console/index.html +1 -1
  133. package/web-admin/scripts/subject-display-ui.mjs +78 -0
  134. package/web-admin/src/components/AgentSetupPanel.vue +262 -0
  135. package/web-admin/src/components/ClientConversations.vue +21 -4
  136. package/web-admin/src/components/conversation-audit.ts +20 -0
  137. package/web-admin/src/pages/AgentClients.vue +97 -23
  138. package/web-admin/src/pages/Clients.vue +4 -1
  139. package/web-admin/src/pages/Routes.vue +10 -1
  140. package/web-admin/tests/conversation-audit.fixture.mjs +13 -10
  141. package/web-admin/tests/conversation-audit.test.mjs +63 -1
  142. package/web/console/assets/AgentClients-BPIvlLYY.js +0 -1
  143. package/web/console/assets/AgentClients-DsWADpzr.css +0 -1
  144. package/web/console/assets/Clients-BSA1rlTB.js +0 -3
  145. package/web/console/assets/Clients-CNIVs7Qn.css +0 -1
  146. package/web/console/assets/Routes-CXGl9SMM.css +0 -1
  147. package/web/console/assets/Routes-DN9_d9Po.js +0 -124
  148. package/web/console/assets/Runs-Cwbe6thL.js +0 -3
  149. package/web/console/assets/Runs-D8UmjP5G.css +0 -1
@@ -0,0 +1,97 @@
1
+ # 让智能体先理解业务系统
2
+
3
+ [English](AGENT_SYSTEM_INFO.en.md) | 简体中文
4
+
5
+ 同一会话连接多个系统时,智能体需要先知道每个系统通常负责什么,才能决定向哪个目标查找工具。例如 Helpdesk 处理客服工单,Inventory 管理库存;两个系统都可以有“查询记录”,但用途不同。
6
+
7
+ 系统说明由中枢管理员在“智能体客户端 → 接入配置”中点击应用行的“配置接入”,进入“系统说明”步骤维护,仍保存在对应业务路由上。用户自己的授权名称或门店名称只是展示标签,不能替代系统身份。读取说明只需要当前 Agent Session 与已选业务路由,不需要先创建业务运行或发送对话正文。
8
+
9
+ 需要从开启接入一路配置到工具范围时,先看[本地智能体集中配置指南](LOCAL_AGENT_SETUP.md)。同一 workspace 的接入方共享这里的说明;同系统多账户无需各写一份产品介绍。
10
+
11
+ ## 管理员填写什么
12
+
13
+ 先在面板中选择工作空间,再填写系统名称、一句话介绍、典型业务方向和系统边界,然后保存工作空间。不配置说明时继续使用既有授权与工具流程。配置对应路由的 `agent_client.system_info`:
14
+
15
+ ```json
16
+ {
17
+ "name": "Helpdesk",
18
+ "summary": "管理客服工单,协助查询处理进度并准备回复。",
19
+ "domains": ["工单查询", "客服回复准备"],
20
+ "boundaries": ["库存调整由库存系统处理。"]
21
+ }
22
+ ```
23
+
24
+ | 字段 | 约束 |
25
+ | --- | --- |
26
+ | `name` | 非空,最多 120 字符 |
27
+ | `summary` | 非空,最多 400 字符 |
28
+ | `domains` | 数组,最多 6 项,每项非空且最多 120 字符;可为空数组 |
29
+ | `boundaries` | 数组,最多 6 项,每项非空且最多 160 字符;可为空数组 |
30
+
31
+ 这四项是产品定位数据,不是额外的模型系统指令。文本字段和每个列表项均使用单行,不包含控制字符。不要填入凭据、业务原文、内部接口地址或权限绕过要求。服务端拒绝未声明字段与超长内容,读取时不会从 `target_config.system_prompt`、路由名称、授权名称或业务工具结果猜补说明。
32
+
33
+ 配置沿用已有 `agent_client` JSON 存储,不需要增加数据库表或迁移。
34
+
35
+ ## 宿主读取契约
36
+
37
+ ```http
38
+ GET /agent-api/v1/workspaces/helpdesk/system-info
39
+ Authorization: Bearer <Agent access token>
40
+ ```
41
+
42
+ 接口仅返回请求中这个路由的说明。服务端重新检查当前 Client、原 Agent Session、双方的路由授权以及路由 audience;撤销或越权仍返回 401/403。已停用或不存在的路由返回 404 `route_unavailable`。不遍历其他路由,也不加载工具目录、知识、记忆或业务上下文,不创建 run,不执行业务工具,不读取请求正文。
43
+
44
+ ```json
45
+ {
46
+ "schema_version": "bailing.agent-system-info.v1",
47
+ "binding": {
48
+ "client_app_id": "helpdesk-client",
49
+ "session_id": "123e4567-e89b-42d3-a456-426614174000",
50
+ "workspace": "helpdesk"
51
+ },
52
+ "metadata_status": "configured",
53
+ "revision": "<sha256>",
54
+ "system": {
55
+ "name": "Helpdesk",
56
+ "summary": "管理客服工单,协助查询处理进度并准备回复。",
57
+ "domains": ["工单查询", "客服回复准备"],
58
+ "boundaries": ["库存调整由库存系统处理。"]
59
+ },
60
+ "tool_status": "not_loaded",
61
+ "availability": "unknown"
62
+ }
63
+ ```
64
+
65
+ `revision` 是规范化说明内容和 schema 的 SHA-256;它标识说明的变化,不替代固定授权身份或工具能力修订。响应使用 `Cache-Control: no-store`。
66
+
67
+ 以下状态必须分开理解:
68
+
69
+ - `system` 说明产品通常做什么,不证明当前授权可以调用所有相关能力。
70
+ - `metadata_status=missing` 表示没有有效说明,`system` 与 `revision` 均为 `null`,不表示没有业务工具。
71
+ - `tool_status=not_loaded` 表示尚未加载工具,不表示工具数量为零。
72
+ - `availability=unknown` 表示本接口没有验证业务服务是否可用。关闭 Runtime 或工具直调时返回 `unavailable`,并使用 `unavailable_reason=agent_client_disabled` 或 `agent_direct_disabled` 表明配置状态。说明仍可读取;工具调用继续服从原开关和权限。
73
+
74
+ 客户端只为本会话明确选定的目标读取说明,并核验返回的 `binding` 与原 Agent Session / Client / workspace 一致,再关联到本地原 `authorization_ref` 和 `system_ref`。单授权、同系统多授权、跨系统授权使用相同的数据结构。不可把未选目标的说明注入模型,也不可因说明更新扩大固定会话范围。
75
+
76
+ 旧 Core 对未知此端点返回 404 `not_found`,宿主可报告说明功能不支持;缺失说明也可显示“系统用途未知”,或使用按受控原绑定关联的本地词典。401/403、`route_unavailable` 与暂时网络故障不能伪装为旧版本不支持。说明功能的降级不替代原授权校验,也不触发默认授权切换。
77
+
78
+ ## 控制台集中配置接口
79
+
80
+ 控制台可使用 `GET /admin/api/routes/:route_key/agent-setup` 读取路由的授权客户端设置、说明、工具源与直调设置。返回仅包含 `route_key`、`name`、`enabled`、`permission`、`revision`、`agent_client`、`tool_sources`、`agent_direct`,不返回路由 `target_config` 或工具源凭据。`permission` 只读;例如 `readonly` 提醒管理员原路由仍不允许写入,不能在此 PUT 中改动。
81
+
82
+ `PUT` 同一路径只接收四个字段:
83
+
84
+ ```json
85
+ {
86
+ "expected_revision": "<GET 返回的 revision>",
87
+ "agent_client": { "enabled": true, "system_info": { "name": "Helpdesk", "summary": "客服工单管理", "domains": [], "boundaries": [] } },
88
+ "tool_sources": [{ "provider": "helpdesk", "allow": ["ticket.read"], "subject_field": "operator_id" }],
89
+ "agent_direct": { "enabled": true }
90
+ }
91
+ ```
92
+
93
+ `agent_client` 与 `agent_direct` 可以显式设为 `null` 来清除;空 `tool_sources` 数组清除工具源选择。编辑界面应保留已有的 `instructions`、`active_tool_limit` 和工具源配置,避免因只填写说明而意外删掉它们。
94
+
95
+ GET 需要 `routes:read`;PUT 需要 `routes:write`,接入方管理权限不能替代路由权限。保存时仍使用既有路由、工具、精确写操作与审批配置校验。数据库事务锁定并比较当前完整路由修订,冲突返回 409 `agent_setup_conflict`;成功只更新 `agent_client`、`tools` 与更新时间,其他配置保持原值。
96
+
97
+ 旧宿主仓储没有实现可选的 `compareAndSetAgentSetup` 时,读取仍可使用,保存返回 503 `agent_setup_unsupported`,不会退回整行覆盖。成功保存返回与 GET 相同的投影及新修订。该配置接口不改变业务 API、审批规则、会话固定范围或归档行为。
@@ -12,6 +12,8 @@ For the current integration contract, use:
12
12
 
13
13
  ## Recording Rules
14
14
 
15
+ Lead each release with a familiar shop, product-maintenance or inventory scenario: the previous problem, changed behavior, affected users and developers, upgrade steps, observable checks and limits. Keep English and Chinese facts aligned and distinguish additions, fixes and existing features. See [the release scenario notes](RELEASE_NOTES_v0.7.0.en.md).
16
+
15
17
  Each public version should describe:
16
18
 
17
19
  - new capabilities;
@@ -20,7 +22,28 @@ Each public version should describe:
20
22
  - validation commands;
21
23
  - related docs.
22
24
 
23
- ## Unreleased
25
+ ## v0.7.0 - cross-system conversations, authorization names and centralized setup
26
+
27
+ Release date: 2026-09-10. These additions extend Core 0.6.1 and pair with SDK/DSH 0.5.0. See [shop and inventory scenarios](RELEASE_NOTES_v0.7.0.en.md).
28
+
29
+ - **New: cross-system conversation associations on one Hub.** Distinct original Sessions from different Client Apps/workspaces confirm independently, with whole-group identity checks. Execution, approval, invocation and memory ownership remain separate. Existing same-system scope and visible archives continue to work.
30
+ - **New: system descriptions before first capability search.** Controlled metadata explains selling versus inventory responsibilities for selected targets only. Description reads send no user text, create no business run and grant no tool permissions.
31
+ - **New: generic authorization subject display.** Backends provide a name at approval or update an original active Session. Clients and the console can display an organization, account, project or location separately from system purpose, device label and identity. Duplicate names and renames preserve authorizations and historical associations.
32
+ - **Improved: centralized setup.** Agent Clients → Setup brings authorization, descriptions, tools/approvals and connection checks together while retaining the original Client/route and administrator permissions. It does not enable writes automatically.
33
+ - **New: authorization lifecycle lookup and revocation.** Applications can page through their own Sessions, obtain a consumed authorization's Session link and revoke by original authorization. Revocation and exchange are atomic. Backends integrate account-disable events themselves; queries return no credentials.
34
+ - **SDK and upgrade impact.** PHP/PHP7 retain the existing `approve()` arguments and add optional names, `updateSubjectDisplay()`, `listSessions()` and `revokeAuthorization()`. Display and cross-system experiences require matched SDK/hosts. Missing old-version support remains explicit and never widens authority.
35
+ - **Database.** Relative to 0.6.1, only 058 member bindings and 059's two nullable JSON columns are added. Existing migrations are unchanged and old names are not guessed. Apply all outstanding migrations through the official migrator. Custom hosts must check optional repository support; unavailable features remain disabled.
36
+ - **Validation.** Regression coverage includes original bindings, per-system execution, revocation/offline recovery, ACK idempotency, cancellation, display rename/duplicate cases, old-version behavior, SDKs and console. Final artifacts and CI remain release gates; tests are not production-adoption evidence.
37
+
38
+ ## v0.6.1 - Conversation Release and Package Source Verification
39
+
40
+ Planned release date: 2026-09-08.
41
+
42
+ - **User experience**: carries forward the visible conversations, authorization trace links and same-system multi-account clients from 0.6.0. The recommended set is Core 0.6.1 + SDK 0.4.0 + DSH 0.4.0.
43
+ - **Release correction**: the 0.6.0 source tag and npm package exist, but missing source-commit metadata prevented the formal Release gate from passing. 0.6.1 uses an independent clone and checks that metadata before publishing; the original 0.6.0 artifacts remain unchanged.
44
+ - **Integration and schema**: no business behavior, API, dependency or migration changes relative to 0.6.0. Upgrades from 0.5.1 still explicitly apply migration 057; installations that already applied 057 do not recreate its tables.
45
+ - **Validation**: retain the release gates for the exact tag, CI, images, npm version, content digest and gitHead before creating the GitHub Release.
46
+ - **Related docs**: [v0.6.1 release notes](RELEASE_NOTES_v0.6.1.en.md) and [user guide](user-guide/conversations.en.md).
24
47
 
25
48
  ## v0.6.0 - Follow the Conversation Through Its Business Actions
26
49
 
@@ -29,7 +52,7 @@ Planned release date: 2026-09-08.
29
52
  - **One conversation view**: inspect synchronized user messages, intermediate explanations and final replies by turn, then open each account's original execution record.
30
53
  - **Multiple accounts in a conversation**: with SDK / DSH 0.4.0, select authorized accounts from the same business system before chatting; the agent chooses the appropriate authorization for each action.
31
54
  - **Existing authority stays intact**: identities, approvals and account memory remain separate. Full text is restricted to the Hub administration audit domain and is not broadcast into each account's memory.
32
- - **Upgrade impact**: migration057 adds three archive tables. Business capability declarations and approval rules do not change. Clients need explicit conversation scope and durable history; follow the upgrade guide.
55
+ - **Upgrade impact**: migration 057 adds three archive tables. Business capability declarations and approval rules do not change. Clients need explicit conversation scope and durable history; follow the upgrade guide.
33
56
  - **Verification focus**: recovery in the same runtime after an offline reopening, acknowledgement-loss deduplication, whole-group revocation, visible history gaps and late cancellation responses. A successful business action alone does not prove complete transcript capture.
34
57
  - **Related docs**: [v0.6.0 release notes](RELEASE_NOTES_v0.6.0.en.md), [multi-account conversation guide](user-guide/conversations.en.md) and [integration contract](AGENT_CONVERSATION_AUDIT.en.md).
35
58
 
package/docs/CHANGELOG.md CHANGED
@@ -5,6 +5,8 @@
5
5
 
6
6
  ## 记录规则
7
7
 
8
+ 每次先用商城、商品维护或库存等常见场景说明原问题与本版行为,再按使用者、业务后端与客户端开发者交代升级影响。中英文使用同一事实,新增能力、修复和已有能力分别标明;参考[本版场景说明](RELEASE_NOTES_v0.7.0.md)。
9
+
8
10
  每个公开版本至少说明:
9
11
 
10
12
  - **新增能力**:新增的端点、控制台能力、工具注解、SDK 能力;
@@ -13,7 +15,28 @@
13
15
  - **验证方式**:部署方如何确认该版本运行正常;
14
16
  - **相关文档**:对应的契约、指南或示例。
15
17
 
16
- ## Unreleased
18
+ ## v0.7.0 - 多系统会话、授权名称与集中配置
19
+
20
+ 发布日期:2026-09-10。相对 Core 0.6.1 新增以下能力,完整配套为 SDK/DSH 0.5.0。见[商城与库存场景说明](RELEASE_NOTES_v0.7.0.md)。
21
+
22
+ - **新增:同中枢跨系统会话关联。** 不同 Client App/workspace 的独立原 Session 可加入一段可见会话;每个目标独立确认,整组身份重验,原执行、审批、调用和记忆归属保留。现有同系统多授权和完整归档继续使用。
23
+ - **新增:首次能力搜索前的系统说明。** 受控配置说明商城负责售卖、库存系统负责库存等定位;只提供已选目标信息,说明本身不发送用户正文、不创建业务 run、不授予工具权限。
24
+ - **新增:通用授权主体展示信息。** 业务后端在批准授权时提交名称,或给原有效 Session 补名、改名;客户端和控制台可展示实际组织、账户、项目或门店。名称与系统说明、设备名及身份独立,同名与改名不改变原授权和历史关联。
25
+ - **改进:集中接入配置。** “智能体客户端 → 接入配置”汇总授权入口、系统说明、工具/审批与连接检查,沿用原 Client/route 和管理员权限,不自动开放写操作。
26
+ - **新增:授权生命周期查询和撤销。** 接入方分页查询自己的 Session,已换码授权返回最终 Session 关联,并可按原授权撤销;撤销与换码原子互斥。业务后端负责将其接入账号停用等事件;不返回凭据。
27
+ - **SDK 与升级影响。** PHP/PHP7 的 `approve()` 保留原参数兼容,增加可选名称及 `updateSubjectDisplay()`、`listSessions()`、`revokeAuthorization()`。新展示与跨系统体验需配套 SDK/宿主;旧版本缺少支持时明确降级,不扩大授权。
28
+ - **数据库。** 相对 0.6.1 仅新增 058 成员绑定和 059 两列可空 JSON;旧迁移不改写,旧名称不猜补。按正式迁移器执行全部未应用文件。自定义 Host 需核对可选仓储接口,缺少支持时关闭对应新能力。
29
+ - **验证范围。** 权限与原成员绑定、逐系统执行归属、撤销与离线恢复、ACK 幂等、取消、名称同名/改名、旧版本兼容、SDK 与控制台均有回归覆盖。正式发布仍需最终制品与 CI 检查,不以这些验证宣称生产采用。
30
+
31
+ ## v0.6.1 - 完整对话配套正式发布与来源校验
32
+
33
+ 计划发布日期:2026-09-08。
34
+
35
+ - **使用体验**:延续0.6.0的完整可见对话、逐授权执行回链与同系统多授权客户端配套,推荐Core0.6.1 + SDK0.4.0 + DSH0.4.0。
36
+ - **发布修正**:0.6.0的源码标签和npm包已生成,但包缺少来源提交元数据,未通过正式Release门禁。0.6.1从独立克隆发布并预检源码关联;原0.6.0制品保持不变。
37
+ - **对接与数据库**:相对0.6.0不改变业务行为、接口、依赖或迁移。从0.5.1升级仍需显式应用057迁移;已有057无需重复建表。
38
+ - **验证**:保留原发布门禁,核对Tag、CI、镜像、npm版本、内容摘要与gitHead后创建Release。
39
+ - **相关文档**:[v0.6.1发布说明](RELEASE_NOTES_v0.6.1.md)与[使用者指南](user-guide/conversations.md)。
17
40
 
18
41
  ## v0.6.0 - 看完整沟通,再追到每次业务操作
19
42
 
@@ -7,7 +7,7 @@ It is not certification, a benchmark, or evidence of production adoption. Passin
7
7
  ## Scope
8
8
 
9
9
  - Target: the open-source BailingHub Docker demo;
10
- - Stable baseline: `v0.6.0`;
10
+ - Stable baseline: `v0.7.0`;
11
11
  - Data: the bundled demo orders, tickets, refunds, and failure probe;
12
12
  - Expected time: about 20 minutes after images and dependencies are available;
13
13
  - Not required: a real model key, production API, production credential, or real business data.
@@ -32,7 +32,7 @@ curl -fsSL https://www.bailinghub.com/install.sh | sh
32
32
  cd "$HOME/bailinghub"
33
33
  ```
34
34
 
35
- The installer pulls the official `v0.6.0` images by default, generates random tokens and an admin password, starts the services, and runs the smoke test. The initial administrator is created only when the administrator table is empty; restarting, upgrading, recreating containers, or reinstalling against the same persistent database does not overwrite a changed password. The optional `/metrics` endpoint remains disabled and does not affect core validation. Keep the reported version, install mode, elapsed time, and the commands printed under `常用命令`, but never include passwords or tokens in your report. After Docker is installed, the current non-root login usually still needs the printed `sudo docker compose ...` commands; Docker group membership may not take effect until the next login.
35
+ The installer pulls the official `v0.7.0` images by default, generates random tokens and an admin password, starts the services, and runs the smoke test. The initial administrator is created only when the administrator table is empty; restarting, upgrading, recreating containers, or reinstalling against the same persistent database does not overwrite a changed password. The optional `/metrics` endpoint remains disabled and does not affect core validation. Keep the reported version, install mode, elapsed time, and the commands printed under `常用命令`, but never include passwords or tokens in your report. After Docker is installed, the current non-root login usually still needs the printed `sudo docker compose ...` commands; Docker group membership may not take effect until the next login.
36
36
 
37
37
  If the default directory is already in use, choose a new empty directory instead of overwriting an existing deployment:
38
38
 
@@ -46,7 +46,7 @@ cd "$HOME/bailinghub-validation"
46
46
  ### Path B: local source reproduction
47
47
 
48
48
  ```bash
49
- git clone --depth 1 --branch v0.6.0 https://github.com/bailinghub/bailinghub.git
49
+ git clone --depth 1 --branch v0.7.0 https://github.com/bailinghub/bailinghub.git
50
50
  cd bailinghub
51
51
  git rev-parse HEAD
52
52
  export BAILING_TOKEN="$(openssl rand -hex 32)"
@@ -167,7 +167,7 @@ After the core task passes, you may continue with:
167
167
  - [Trusted rich rendering and chat reliability](RELEASE_NOTES_v0.1.15.en.md).
168
168
  - [Bounded tool runtime and resilient semantic retrieval](RELEASE_NOTES_v0.1.16.en.md).
169
169
  - [Composable Core and Kernel Host API v1](RELEASE_NOTES_v0.3.0.en.md).
170
- - [Current stable release notes](RELEASE_NOTES_v0.6.0.en.md).
170
+ - [Current stable release notes](RELEASE_NOTES_v0.7.0.en.md).
171
171
 
172
172
  Select the relevant track in the same Issue form and disclose whether you received direct maintainer assistance.
173
173
 
@@ -7,7 +7,7 @@
7
7
  ## 验证范围
8
8
 
9
9
  - 验证对象:BailingHub 开源版 Docker demo;
10
- - 稳定基线:`v0.6.0`;
10
+ - 稳定基线:`v0.7.0`;
11
11
  - 数据范围:仓库自带的 demo 订单、工单、退款和故障工具;
12
12
  - 预计用时:镜像和依赖下载完成后约 20 分钟;
13
13
  - 不需要:真实大模型 Key、生产 API、生产凭据或真实业务数据。
@@ -32,7 +32,7 @@ curl -fsSL https://www.bailinghub.com/install.sh | sh
32
32
  cd "$HOME/bailinghub"
33
33
  ```
34
34
 
35
- 脚本默认拉取 `v0.6.0` 官方镜像,生成随机 Token 与后台密码,启动服务并自动运行基础体检。首次管理员只在数据库管理员表为空时创建;对同一持久化数据库进行重启、升级、容器重建或重新安装,不会覆盖已经修改的管理员密码。可选 `/metrics` 端点默认关闭,不影响基础验证。请保留终端输出中的版本、安装模式、耗时和“常用命令”,但不要把密码或 Token 写入反馈。新安装 Docker 后,当前非 root 会话通常仍需使用脚本打印的 `sudo docker compose ...` 命令;重新登录后 Docker 组权限才可能生效。
35
+ 脚本默认拉取 `v0.7.0` 官方镜像,生成随机 Token 与后台密码,启动服务并自动运行基础体检。首次管理员只在数据库管理员表为空时创建;对同一持久化数据库进行重启、升级、容器重建或重新安装,不会覆盖已经修改的管理员密码。可选 `/metrics` 端点默认关闭,不影响基础验证。请保留终端输出中的版本、安装模式、耗时和“常用命令”,但不要把密码或 Token 写入反馈。新安装 Docker 后,当前非 root 会话通常仍需使用脚本打印的 `sudo docker compose ...` 命令;重新登录后 Docker 组权限才可能生效。
36
36
 
37
37
  如果默认目录已被占用,请使用一个新的空目录,不要覆盖现有部署:
38
38
 
@@ -46,7 +46,7 @@ cd "$HOME/bailinghub-validation"
46
46
  ### 路径 B:本地源码复现
47
47
 
48
48
  ```bash
49
- git clone --depth 1 --branch v0.6.0 https://github.com/bailinghub/bailinghub.git
49
+ git clone --depth 1 --branch v0.7.0 https://github.com/bailinghub/bailinghub.git
50
50
  cd bailinghub
51
51
  git rev-parse HEAD
52
52
  export BAILING_TOKEN="$(openssl rand -hex 32)"
@@ -167,7 +167,7 @@ docker compose exec -T bailinghub npm run demo:e2e
167
167
  - [可信富内容渲染与聊天可靠性](RELEASE_NOTES_v0.1.15.md)。
168
168
  - [工具运行时收敛与语义检索韧性](RELEASE_NOTES_v0.1.16.md)。
169
169
  - [可组合 Core 与 Kernel Host API v1](RELEASE_NOTES_v0.3.0.md)。
170
- - [当前稳定版发布说明](RELEASE_NOTES_v0.6.0.md)。
170
+ - [当前稳定版发布说明](RELEASE_NOTES_v0.7.0.md)。
171
171
 
172
172
  扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
173
173
 
@@ -0,0 +1,116 @@
1
+ # Configure a local agent in one place
2
+
3
+ English | [简体中文](LOCAL_AGENT_SETUP.md)
4
+
5
+ Open **Agent Clients → Connection Setup**, then choose **Configure Connection** on the application's row, to connect an existing business system to a local agent. The panel brings authorization, system descriptions, tools and approvals, and connection checks into four steps.
6
+
7
+ Settings stay in their existing Client and business route records. The older pages retain advanced controls and link to this entry point; there is no second set of application identities or business capabilities to maintain.
8
+
9
+ ## Understand the three roles
10
+
11
+ | Name | What it controls | Example |
12
+ | --- | --- | --- |
13
+ | Client | Which application connects, where users authorize, and which workspaces it may use | The client identifier and fixed authorization page for a support application |
14
+ | Workspace (business route) | System purpose, tool sources, and local-agent execution settings | Customer support or inventory operations |
15
+ | Agent Session | The authorized user, tenant/account, and permitted business scope | An operator acting for a particular account |
16
+
17
+ Allowing a Client to use a workspace does not give every user all its business permissions. Requests still use the original business identity and pass scope checks, approvals, and final authorization in the business system.
18
+
19
+ Several Clients may share a workspace. Changes to its descriptions or tool sources affect other entry points using that route. Decide whether a separate workspace is needed before introducing independent settings.
20
+
21
+ ## Step 1: Authorization entry
22
+
23
+ Find the existing Client and choose **Configure Connection**. If the application is not registered yet, use **New Client** first.
24
+
25
+ Check that it is enabled, enter the fixed HTTPS authorization page supplied by the business system, choose the permitted workspaces, and save. The business page handles login, account selection, and permission confirmation. Do not duplicate a Client record for every user or store.
26
+
27
+ The Client enabled switch is shared with its other entry points. Disabling it can affect an embedded chat or another integration using the same Client. To stop local-agent tool calls only, use the tool switch in step 3.
28
+
29
+ ## Step 2: System description
30
+
31
+ Select the workspace, enable the local agent, and fill in four fields:
32
+
33
+ - **System name:** the product or module name, such as “Customer Support”.
34
+ - **Short purpose:** what it usually handles, such as customer questions, tickets, and follow-ups.
35
+ - **Typical domains:** a few useful categories, such as ticket lookup or response preparation.
36
+ - **Boundaries:** work handled elsewhere, such as inventory adjustments.
37
+
38
+ Save the workspace. Compatible clients provide these descriptions for the conversation's selected targets before the first tool search, helping the model choose where to look. Single-account, multiple-account, and multiple-system conversations use the same structure.
39
+
40
+ Missing metadata, older versions, or temporary description failures may display “System purpose unknown”; existing authorization and on-demand tool discovery remain available through their original flow. A description is not a permission grant or an instruction to bypass rules. See the [system information contract](AGENT_SYSTEM_INFO.en.md).
41
+
42
+ ## Step 3: Tools and approvals
43
+
44
+ Enable local-agent tool calls, select registered tool providers and allowed scopes, and choose exact write operations when needed.
45
+
46
+ | Setting | Meaning |
47
+ | --- | --- |
48
+ | Local agent enabled | Enables local conversation orchestration; tool access has a separate switch |
49
+ | Tool calls enabled | Opens discovery and invocation, still subject to providers and authorization |
50
+ | Provider scope allowlist | Selects capabilities from the business declarations |
51
+ | Allowed write operations | Explicit operation IDs; empty means no writes, and `*` is not accepted |
52
+ | Additional approvals | Can tighten existing approval requirements, never remove them |
53
+
54
+ An existing read-only route permission still prevents writes even if operations are selected. The panel shows this setting; the route's permission and audience rules remain in advanced route configuration.
55
+
56
+ Choose **Read Tool Catalog** to see a table of business-action descriptions and operation IDs, whether each is a read or write, and its current configuration. Review these actions before adjusting scopes, allowed writes, and approvals.
57
+
58
+ Reading the catalog does not execute an operation or prove that an end user may execute it. Additional orchestration rules and active-tool limits remain under advanced runtime settings, separate from the product description.
59
+
60
+ Save the workspace. Steps 2 and 3 edit the same workspace settings; save changes you want to keep before switching workspaces.
61
+
62
+ ## Step 4: Check the connection
63
+
64
+ Review the saved Client, authorization page, and workspace states, then generate connection settings. These tell the local client where the Hub is and which Client and workspace to use, plus a local display label. They contain no tokens and do not authorize a user automatically.
65
+
66
+ Give these public settings to the local client. The user then signs in and confirms authorization on the business page. A new conversation explicitly selects its authorization scope and keeps it fixed after the first message; changing scope follows the client's new-conversation flow.
67
+
68
+ “Connection settings ready” is not proof that tools are available or that business work has executed. The client must validate the user and actual authorization. After that, use your test process to verify a permitted read, a controlled action, and approval when required.
69
+
70
+ Authorized devices, runs, and usage remain under **Devices and Activity** on the same page.
71
+
72
+ ## Resolve setup problems
73
+
74
+ | State | Next step |
75
+ | --- | --- |
76
+ | Description missing | Use existing discovery and add a product description later |
77
+ | Connection ready, tool calls disabled | Check the step 3 switch, providers, and scope |
78
+ | Workspace disabled or read-only | Review advanced route settings; the panel does not silently change them |
79
+ | Permission denied | Use an administrator with the relevant Client or route permissions |
80
+ | Configuration changed concurrently | Close and reopen the panel, review current values, and save again |
81
+ | Host cannot save these settings | Upgrade its matching persistence implementation; do not fall back to overwriting the whole record |
82
+
83
+ ## API appendix: narrow updates
84
+
85
+ These endpoints use administrator authentication and RBAC, not an end user's Agent bearer. Client and route settings are saved separately; the panel does not provide a transaction across both records.
86
+
87
+ ### Client settings
88
+
89
+ `GET /admin/api/clients/:app_id/agent-setup` returns `app_id`, `name`, `enabled`, `agent_authorize_url`, `allowed_routes`, and `revision`, without the Client Token.
90
+
91
+ `PUT` to the same path requires exactly these four fields:
92
+
93
+ ```json
94
+ {
95
+ "expected_revision": "<revision returned by GET>",
96
+ "enabled": true,
97
+ "agent_authorize_url": "https://business.example.com/agent/authorize",
98
+ "allowed_routes": ["helpdesk"]
99
+ }
100
+ ```
101
+
102
+ Set `agent_authorize_url` to `null` to clear it. `allowed_routes` accepts up to 256 entries and retains the existing workspace/`*` meaning; explicit workspaces make the affected scope easier to assess. The revision covers these three editable settings. Saving updates only them, without rotating tokens or changing other Client properties.
103
+
104
+ GET requires `clients:read`; PUT requires `clients:write`. Errors include 403 `forbidden`, 404 `client_not_found`, and 400 `invalid_agent_setup` or an existing configuration validation error.
105
+
106
+ ### Workspace settings
107
+
108
+ `GET /admin/api/routes/:route_key/agent-setup` returns `route_key`, `name`, `enabled`, `permission`, `revision`, `agent_client`, `tool_sources`, and `agent_direct`. `permission` is read-only and must not be sent in a PUT.
109
+
110
+ `PUT` requires exactly `expected_revision`, `agent_client`, `tool_sources`, and `agent_direct`. `agent_client` and `agent_direct` may be `null`; `tool_sources: []` clears source selection. Edit freshly read values while preserving existing instructions, tool limits, and extra source settings. See the [complete example](AGENT_SYSTEM_INFO.en.md#console-configuration-api).
111
+
112
+ GET requires `routes:read`; PUT requires `routes:write`. The full route revision is compared, but only `agent_client`, `tools`, and the update timestamp are written. Target, permission, audience, memory, knowledge, and unrelated settings remain unchanged. Errors include 404 `route_not_found` and 400 `invalid_request` or an existing route validation error.
113
+
114
+ Both revision formats are 64 hexadecimal characters. A concurrent edit returns 409 `agent_setup_conflict`; a host without the corresponding atomic persistence operation returns 503 `agent_setup_unsupported`. Neither path silently overwrites a conflicting record. Successful saves return the new projection and revision.
115
+
116
+ This feature uses existing storage fields and adds no migration. Business APIs, approval rules, fixed conversation scope, and archive protocols remain unchanged.
@@ -0,0 +1,116 @@
1
+ # 在一个入口配置本地智能体
2
+
3
+ [English](LOCAL_AGENT_SETUP.en.md) | 简体中文
4
+
5
+ 希望让用户在本地智能体里操作已有业务系统时,打开 **智能体客户端 → 接入配置**,在应用行点击“配置接入”。面板把授权入口、系统说明、工具与审批、连接检查放在一起,按四步完成即可。
6
+
7
+ 这些设置继续保存在原接入方和业务路由中。旧页面保留高级配置,并提供返回集中入口的链接;无需重复创建一套接入方或业务能力。
8
+
9
+ ## 先分清三个角色
10
+
11
+ | 名称 | 决定什么 | 例子 |
12
+ | --- | --- | --- |
13
+ | 接入方(Client) | 哪个应用来连接、去哪里确认业务身份、最多能连接哪些工作空间 | 客服应用的接入标识与固定授权页 |
14
+ | 工作空间(workspace,对应业务路由) | 这个业务范围负责什么、使用哪些工具源、允许本地智能体怎样调用 | 客服工单空间、库存空间 |
15
+ | 用户的业务授权(Agent Session) | 当前是谁、属于哪个租户或账户、这次实际允许哪些业务范围 | 某位操作员在某个账户下的授权 |
16
+
17
+ 接入方允许连接一个空间,不等于其中每个用户都拥有全部业务权限。调用时仍使用原业务身份,经过范围裁剪、审批与业务系统最终授权。
18
+
19
+ 一个工作空间可以被多个接入方使用。修改其中的工具源或系统说明会影响所有使用这条路由的入口;如果需要独立配置,应先由管理员明确是否使用不同工作空间。
20
+
21
+ ## 第一步:授权入口
22
+
23
+ 在应用列表找到已有接入方,点击“配置接入”。尚未登记应用时,先通过“新建接入方”完成登记。
24
+
25
+ 确认接入方启用,填写业务系统提供的固定 HTTPS 授权页,再选择允许连接的工作空间,点击“保存授权入口”。授权页应由业务系统负责登录、选择业务账户并确认权限;不为每个用户或门店复制一个中枢接入方。
26
+
27
+ “允许此接入方连接中枢”是接入方的共用开关。关闭它也可能影响同一接入方的网页聊天或其他入口;只想停止本地工具调用时,应调整第三步的工具开关。
28
+
29
+ ## 第二步:系统说明
30
+
31
+ 选择要配置的工作空间,开启“启用本地智能体”,填写四项说明:
32
+
33
+ - **业务系统名称**:产品或业务模块的正式名称,例如“客户服务系统”。
34
+ - **一句话介绍**:它通常负责什么,例如“处理客户咨询、服务工单和售后跟进”。
35
+ - **典型业务方向**:几项便于理解的业务领域,例如“工单查询”“回复准备”。
36
+ - **系统边界**:哪些事情应交给其他系统,例如“库存调整由库存系统处理”。
37
+
38
+ 保存后,支持此功能的客户端会在首次搜索工具之前,把本会话已选目标的说明提供给智能体。它就能先分清目标,再查询具体允许的动作。单授权、同系统多授权和跨系统授权都使用同一套说明结构。
39
+
40
+ 说明没有填写、旧版本尚不支持或暂时读取失败时,可以显示“系统用途未知”;已有授权和按需工具查询继续使用原流程。说明不是权限承诺,也不能写成要求模型绕过规则的指令。详细字段见[系统说明契约](AGENT_SYSTEM_INFO.md)。
41
+
42
+ ## 第三步:工具与审批
43
+
44
+ 打开“允许本地智能体调用工具”,选择已经登记的业务工具源和允许使用的 scope,再按需要勾选精确的写操作。
45
+
46
+ | 设置 | 实际含义 |
47
+ | --- | --- |
48
+ | 本地智能体已启用 | 允许本地会话编排;工具通道还需单独开启 |
49
+ | 允许调用工具 | 开放工具发现和调用通道;仍需有效工具源与授权 |
50
+ | 工具源的 scope 范围 | 从业务声明中筛选可进入此空间的能力 |
51
+ | 允许的写操作 | 精确指定写动作;留空不开放写入,不能填 `*` |
52
+ | 额外要求审批 | 在原规则上进一步收紧,不会取消业务声明中的审批 |
53
+
54
+ 如果原工作空间的权限档是只读,即使选择写操作仍不会开放写入。页面会显示这个状态,原权限档与受众规则继续在路由高级配置中管理。
55
+
56
+ 点击“读取工具目录”后,简表会列出每项业务动作的说明和操作标识、类型是查询还是写入,以及当前配置状态。可以先看懂动作,再调整 scope、写入清单和审批设置。
57
+
58
+ 读取目录不会执行业务动作,也不等于最终用户已获准执行。补充编排规则和每轮工具上限放在“高级运行设置”,与第二步的产品介绍分别维护。
59
+
60
+ 点击“保存工作空间”。第二步和第三步编辑的是同一工作空间配置;切换工作空间前先保存需要保留的修改。
61
+
62
+ ## 第四步:检查连接
63
+
64
+ 检查已保存的接入方、授权页和各工作空间状态,再点击“生成连接配置”。生成内容用于告诉客户端 **中枢在哪里、连接哪个应用和工作空间**,以及本机连接的显示名称;它不包含 Token,也不会自动替用户完成业务授权。
65
+
66
+ 把这些公开连接参数交给本地客户端,随后由用户在业务授权页登录并确认。新会话显式选择授权范围,首消息后保持原范围;更换范围时按客户端规则新建会话。
67
+
68
+ “连接条件已配置”不表示工具一定可用,更不表示已经执行了业务。客户端仍要重新核对身份和实际授权。业务授权确认完成后,再按自己的测试流程验证一个允许的查询、一个受控动作及需要时的审批。
69
+
70
+ 授权设备、运行记录和用量仍在同页的“设备与运行”查看。
71
+
72
+ ## 保存或连接没有成功时
73
+
74
+ | 页面状态 | 下一步 |
75
+ | --- | --- |
76
+ | 系统说明未提供 | 可先使用原工具查询,再补充定位说明 |
77
+ | 可连接,但工具通道未开启 | 在第三步检查工具开关、工具源和范围 |
78
+ | 工作空间已停用或权限档只读 | 在原路由高级配置中核对;集中面板不会暗中改变它们 |
79
+ | 没有读取或保存权限 | 使用具备对应接入方、路由权限的管理员账户 |
80
+ | 配置已被其他操作更新 | 关闭面板重新打开,核对最新值后再保存 |
81
+ | 当前宿主不支持集中保存 | 升级配套宿主实现;不要回退为整行覆盖配置 |
82
+
83
+ ## 接口附录:集中配置的保存边界
84
+
85
+ 下列接口仅供管理控制台使用,沿用管理员认证与 RBAC,不使用终端用户的 Agent bearer。两类配置分别保存,不是跨接入方和路由的整体事务。
86
+
87
+ ### 接入方设置
88
+
89
+ `GET /admin/api/clients/:app_id/agent-setup` 返回 `app_id`、`name`、`enabled`、`agent_authorize_url`、`allowed_routes`、`revision`。响应不包含 Client Token。
90
+
91
+ `PUT` 同一路径必须且只能提供以下四个字段:
92
+
93
+ ```json
94
+ {
95
+ "expected_revision": "<GET 返回的 revision>",
96
+ "enabled": true,
97
+ "agent_authorize_url": "https://business.example.com/agent/authorize",
98
+ "allowed_routes": ["helpdesk"]
99
+ }
100
+ ```
101
+
102
+ `agent_authorize_url` 可设为 `null` 清除。`allowed_routes` 最多 256 项,沿用现有 workspace 与 `*` 语义;显式选择空间便于判断影响范围。`revision` 比较上述三个可编辑设置,保存只更新这三项,不轮换 Token,不改其他接入方属性。
103
+
104
+ GET 需要 `clients:read`,PUT 需要 `clients:write`。无权限为 403 `forbidden`;不存在为 404 `client_not_found`;格式错误为 400 `invalid_agent_setup` 或现有配置校验错误。
105
+
106
+ ### 工作空间设置
107
+
108
+ `GET /admin/api/routes/:route_key/agent-setup` 返回 `route_key`、`name`、`enabled`、`permission`、`revision`、`agent_client`、`tool_sources`、`agent_direct`。`permission` 是只读展示字段,不允许随 PUT 修改。
109
+
110
+ `PUT` 同一路径必须且只能提供 `expected_revision`、`agent_client`、`tool_sources`、`agent_direct`。`agent_client` 和 `agent_direct` 可以为 `null`;`tool_sources: []` 清除工具源选择。请求应基于刚读取的值编辑,保留已有指令、工具上限及工具源附加选项。完整示例见[系统说明接口](AGENT_SYSTEM_INFO.md#控制台集中配置接口)。
111
+
112
+ GET 需要 `routes:read`,PUT 需要 `routes:write`。保存比较完整路由修订,仅更新 `agent_client`、`tools` 和更新时间;路由目标、权限档、受众、记忆、知识与其他配置保持原值。不存在为 404 `route_not_found`;无效输入为 400 `invalid_request` 或现有路由配置校验错误。
113
+
114
+ 两类保存的修订均为 64 位十六进制字符串。并发冲突返回 409 `agent_setup_conflict`;缺少对应宿主原子保存实现返回 503 `agent_setup_unsupported`,不会静默覆盖。成功返回最新投影与修订。
115
+
116
+ 集中配置和系统说明沿用现有存储字段,本轮功能不新增数据库迁移,不改变业务 API、审批、固定会话范围或归档协议。
package/docs/README.en.md CHANGED
@@ -6,6 +6,7 @@ This directory contains public documentation for the open-source BailingHub proj
6
6
 
7
7
  | Document | Purpose |
8
8
  |---|---|
9
+ | [RELEASE_NOTES_v0.7.0.md](RELEASE_NOTES_v0.7.0.md) · [English](RELEASE_NOTES_v0.7.0.en.md) | v0.7.0 shop/inventory scenarios, upgrade steps and limits. |
9
10
  | [user-guide/conversations.en.md](user-guide/conversations.en.md) | Multi-account conversations, full-text review and offline recovery for users. |
10
11
  | [QUICKSTART.en.md](QUICKSTART.en.md) | Install BailingHub, run the Docker demo, create the first route, and connect the first business tool. |
11
12
  | [DEMO.en.md](DEMO.en.md) | Docker demo walkthrough: hub, MySQL, demo business system, tool provider, audit, and trace. |
@@ -13,6 +14,11 @@ This directory contains public documentation for the open-source BailingHub proj
13
14
  | [INDEPENDENT_VALIDATION.md](INDEPENDENT_VALIDATION.md) | Chinese independent validation task. |
14
15
  | [AGENT_CLIENT_QUICKSTART.en.md](AGENT_CLIENT_QUICKSTART.en.md) | End-to-end Agent Client setup and configuration ownership. |
15
16
  | [AGENT_CLIENT_QUICKSTART.md](AGENT_CLIENT_QUICKSTART.md) | Chinese Agent Client integration guide. |
17
+ | [LOCAL_AGENT_SETUP.en.md](LOCAL_AGENT_SETUP.en.md) | Four-step console setup: authorization, descriptions, tools/approvals, and connection checks. |
18
+ | [LOCAL_AGENT_SETUP.md](LOCAL_AGENT_SETUP.md) | Chinese local-agent setup guide. |
19
+ | [AGENT_SYSTEM_INFO.en.md](AGENT_SYSTEM_INFO.en.md) | Controlled descriptions before first tool discovery, with original binding and compatibility rules. |
20
+ | [AGENT_SYSTEM_INFO.md](AGENT_SYSTEM_INFO.md) | Chinese system-information contract. |
21
+ | [AGENT_SUBJECT_DISPLAY.en.md](AGENT_SUBJECT_DISPLAY.en.md) | Business authorization display names: responsibilities, new approvals and existing-session synchronization. |
16
22
  | [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | Agent Auth v1, PKCE, trusted business identity, and revocation. |
17
23
  | [AGENT_AUTH_API.md](AGENT_AUTH_API.md) | Chinese Agent Auth v1 protocol. |
18
24
  | [AGENT_CLIENT_RUNTIME_API.en.md](AGENT_CLIENT_RUNTIME_API.en.md) | Agent Client Runtime v1 workspaces, turns, tools, and completion contract. |
@@ -111,7 +117,9 @@ This directory contains public documentation for the open-source BailingHub proj
111
117
  | [RELEASE_NOTES_v0.5.0.en.md](RELEASE_NOTES_v0.5.0.en.md) | `v0.5.0` revocable local-Agent authorization and governed local planning. |
112
118
  | [RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md) | Chinese `v0.5.0` release notes. |
113
119
  | [RELEASE_NOTES_v0.5.1.en.md](RELEASE_NOTES_v0.5.1.en.md) | `v0.5.1` Agent Client management center and bulk write-operation configuration. |
120
+ | [RELEASE_NOTES_v0.6.1.en.md](RELEASE_NOTES_v0.6.1.en.md) | `v0.6.1`: follow a conversation through its business actions, with compatible multi-account clients. |
114
121
  | [RELEASE_NOTES_v0.6.0.en.md](RELEASE_NOTES_v0.6.0.en.md) | `v0.6.0`: follow a conversation through its business actions, with compatible multi-account clients. |
122
+ | [RELEASE_NOTES_v0.6.1.md](RELEASE_NOTES_v0.6.1.md) | Chinese `v0.6.1` release notes and upgrade guide. |
115
123
  | [RELEASE_NOTES_v0.6.0.md](RELEASE_NOTES_v0.6.0.md) | Chinese `v0.6.0` release notes and upgrade guide. |
116
124
  | [RELEASE_NOTES_v0.5.1.md](RELEASE_NOTES_v0.5.1.md) | Chinese `v0.5.1` release notes. |
117
125
  | [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | First public release notes. |
package/docs/README.md CHANGED
@@ -8,6 +8,7 @@
8
8
 
9
9
  | 文档 | 用途 |
10
10
  |---|---|
11
+ | [RELEASE_NOTES_v0.7.0.md](RELEASE_NOTES_v0.7.0.md) · [English](RELEASE_NOTES_v0.7.0.en.md) | v0.7.0:商城与库存场景、配套升级和限制。 |
11
12
  | [user-guide/conversations.md](user-guide/conversations.md) | 普通用户的多账户对话、完整沟通追溯和离线恢复指南。 |
12
13
  | [QUICKSTART.md](QUICKSTART.md) | 从零部署百灵中枢,适合准备接入真实业务系统的开发者。 |
13
14
  | [QUICKSTART.en.md](QUICKSTART.en.md) | English quickstart for Docker demo, first route, and first business tool. |
@@ -17,6 +18,11 @@
17
18
  | [INDEPENDENT_VALIDATION.en.md](INDEPENDENT_VALIDATION.en.md) | English independent validation task, pass criteria, and report path. |
18
19
  | [AGENT_CLIENT_QUICKSTART.md](AGENT_CLIENT_QUICKSTART.md) | 智能体客户端从 Core、业务授权页、通用 SDK 到本地宿主插件的完整接入路径。 |
19
20
  | [AGENT_CLIENT_QUICKSTART.en.md](AGENT_CLIENT_QUICKSTART.en.md) | English end-to-end Agent Client integration guide and configuration ownership. |
21
+ | [LOCAL_AGENT_SETUP.md](LOCAL_AGENT_SETUP.md) | 管理员四步集中配置:授权入口、系统说明、工具与审批、连接检查。 |
22
+ | [LOCAL_AGENT_SETUP.en.md](LOCAL_AGENT_SETUP.en.md) | English local-agent setup guide and narrow configuration APIs. |
23
+ | [AGENT_SYSTEM_INFO.md](AGENT_SYSTEM_INFO.md) | 首次能力搜索前的受控系统定位,包含授权绑定与兼容降级契约。 |
24
+ | [AGENT_SYSTEM_INFO.en.md](AGENT_SYSTEM_INFO.en.md) | English selected-system descriptions and host read contract. |
25
+ | [AGENT_SUBJECT_DISPLAY.md](AGENT_SUBJECT_DISPLAY.md) | 业务授权显示名称:三方职责、新授权与旧会话名称同步。 |
20
26
  | [AGENT_AUTH_API.md](AGENT_AUTH_API.md) | Agent Auth v1:业务登录态绑定、PKCE、Token 交换与会话撤销的语言无关契约。 |
21
27
  | [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | English Agent Auth v1 protocol and trusted business-identity boundary. |
22
28
  | [AGENT_CLIENT_RUNTIME_API.md](AGENT_CLIENT_RUNTIME_API.md) | Agent Client Runtime v1:工作区、turn、能力搜索、工具执行与完成回传。 |
@@ -125,7 +131,9 @@
125
131
  | [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
132
  | [RELEASE_NOTES_v0.5.1.md](RELEASE_NOTES_v0.5.1.md) | `v0.5.1` 智能体客户端管理中心与批量写操作配置说明。 |
127
133
  | [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. |
134
+ | [RELEASE_NOTES_v0.6.1.md](RELEASE_NOTES_v0.6.1.md) | `v0.6.1` 看完整沟通,再追到每次业务操作;配套多授权客户端升级。 |
128
135
  | [RELEASE_NOTES_v0.6.0.md](RELEASE_NOTES_v0.6.0.md) | `v0.6.0` 看完整沟通,再追到每次业务操作;配套多授权客户端升级。 |
136
+ | [RELEASE_NOTES_v0.6.1.en.md](RELEASE_NOTES_v0.6.1.en.md) | English `v0.6.1` release notes and upgrade guide. |
129
137
  | [RELEASE_NOTES_v0.6.0.en.md](RELEASE_NOTES_v0.6.0.en.md) | English `v0.6.0` release notes and upgrade guide. |
130
138
  | [RELEASE_NOTES_v0.1.0.md](RELEASE_NOTES_v0.1.0.md) | 首个公开版本的 GitHub Release 草稿。 |
131
139
  | [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | English release notes. |
@@ -0,0 +1,3 @@
1
+ # Versioned release notes
2
+
3
+ See [BailingHub v0.7.0](RELEASE_NOTES_v0.7.0.en.md).
@@ -0,0 +1,3 @@
1
+ # 本期说明已归入正式版本
2
+
3
+ 请阅读 [BailingHub v0.7.0 发布说明](RELEASE_NOTES_v0.7.0.md)。
@@ -1,5 +1,7 @@
1
1
  # BailingHub v0.6.0: Follow the Conversation Through Its Business Actions
2
2
 
3
+ > This source tag and npm package remain historical artifacts; the formal Release source check did not complete. Use [v0.6.1](RELEASE_NOTES_v0.6.1.en.md) for new installations.
4
+
3
5
  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
6
 
5
7
  ## What changes for users
@@ -15,9 +17,9 @@ Start with the [user guide](user-guide/conversations.en.md). Client developers c
15
17
 
16
18
  | How you use BailingHub | What to prepare |
17
19
  |---|---|
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. |
20
+ | You operate a Hub and want full local-agent conversations in its console | Upgrade Core to 0.6.0, apply the new migration, and use a client that synchronizes visible conversations. |
19
21
  | 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. |
22
+ | You build a desktop or other agent client | Use Agent Client SDK 0.4.0 and integrate scope, original visible history, durable capture and status. Changing a dependency version alone does not complete host integration. |
21
23
  | 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
24
 
23
25
  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.
@@ -1,5 +1,7 @@
1
1
  # BailingHub v0.6.0:看完整沟通,再追到每次业务操作
2
2
 
3
+ > 此版本的源码Tag和npm包作为历史制品保留,未完成正式Release来源校验。新安装请使用[v0.6.1](RELEASE_NOTES_v0.6.1.md)。
4
+
3
5
  一次对话可能先查询 A 账户,再修改 B 账户。以前,管理员需要打开各自的执行记录,看到的往往只是各自做了什么。现在,使用支持的新客户端,可以先阅读完整沟通过程,再追到每份授权的具体操作和审批。
4
6
 
5
7
  ## 你会看到什么变化