bailinghub 0.5.0 → 0.5.1
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 +1 -1
- package/README.md +1 -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 +65 -14
- package/docs/AGENT_CLIENT_QUICKSTART.md +51 -12
- package/docs/CHANGELOG.en.md +12 -0
- package/docs/CHANGELOG.md +12 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/README.en.md +2 -0
- package/docs/README.md +2 -0
- package/docs/RELEASE_NOTES_v0.5.1.en.md +45 -0
- package/docs/RELEASE_NOTES_v0.5.1.md +45 -0
- package/package.json +1 -1
- package/scripts/check-doc-links.mjs +1 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +5 -5
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +1 -0
- package/scripts/verify-github-repo.mjs +1 -0
- package/src/app/oss-edition.ts +1 -0
- package/src/core/config/agent-direct-console-selection.test.ts +22 -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/routes/admin-agent-clients.test.ts +120 -0
- package/src/routes/admin-agent-clients.ts +161 -0
- package/src/routes/admin.ts +3 -0
- package/web/console/assets/{Accounts-D4RRm5D1.js → Accounts-r10QUjLQ.js} +1 -1
- package/web/console/assets/AgentClients-DsWADpzr.css +1 -0
- package/web/console/assets/AgentClients-UTTqbkjy.js +1 -0
- package/web/console/assets/{Approvals-CsTTKb8o.js → Approvals-BGKkYIya.js} +1 -1
- package/web/console/assets/{Audit-BzvZ7JZw.js → Audit-CQmjOAoO.js} +1 -1
- package/web/console/assets/{BrandLockup-CYcA93wh.js → BrandLockup-BF_0pCa3.js} +1 -1
- package/web/console/assets/{Channels-DRQZggqM.js → Channels-C4yZE67F.js} +1 -1
- package/web/console/assets/{ChatEntries-BUB7BWKU.js → ChatEntries-OqsqLjU6.js} +1 -1
- package/web/console/assets/Clients-CNIVs7Qn.css +1 -0
- package/web/console/assets/Clients-Dv3sv51C.js +3 -0
- package/web/console/assets/{Cost-BZgFf1yM.js → Cost-C_-kiH59.js} +1 -1
- package/web/console/assets/{Credentials-BTe2Q07j.js → Credentials-CPTEAiV6.js} +1 -1
- package/web/console/assets/{Diagnostics-WL-buYli.js → Diagnostics-O-NKFOeI.js} +1 -1
- package/web/console/assets/{Executors-CGZ-7Xmp.js → Executors-GVIAiNgv.js} +1 -1
- package/web/console/assets/{HelpTip-CT07o3kB.js → HelpTip-i-KJhf5s.js} +1 -1
- package/web/console/assets/{Kb-VVw8oGsT.js → Kb-BsCWkJI1.js} +2 -2
- package/web/console/assets/{Login-rwvmBBPl.js → Login-VFjkHNMr.js} +1 -1
- package/web/console/assets/{Projects-CexaCEY1.js → Projects-Ds-sJwfy.js} +1 -1
- package/web/console/assets/Routes-CXGl9SMM.css +1 -0
- package/web/console/assets/Routes-Wwurw2UU.js +124 -0
- package/web/console/assets/{Runs-BzFNPTwD.js → Runs-DLPzXmSy.js} +1 -1
- package/web/console/assets/{Setup-Djh5yadQ.js → Setup-BLelw0_V.js} +1 -1
- package/web/console/assets/Shell-CvaeK4j_.js +1 -0
- package/web/console/assets/Shell-D9Uw-fsa.css +1 -0
- package/web/console/assets/{StorageBuckets-CQBR41W1.js → StorageBuckets-Dv6u47yO.js} +1 -1
- package/web/console/assets/{SystemSettings-DgnopekD.js → SystemSettings-B9K7zaDU.js} +1 -1
- package/web/console/assets/{SystemStatus-Bj8-kPt2.js → SystemStatus-H-oKDo-y.js} +1 -1
- package/web/console/assets/{Targets-BAfCt_nH.js → Targets-CCFhjPKf.js} +1 -1
- package/web/console/assets/{Tools-xjd0NZdE.js → Tools-D0H9xpFH.js} +1 -1
- package/web/console/assets/index-CuoTgf6q.js +2 -0
- package/web/console/assets/{index-DZEQL_yy.js → index-DyX9Bz3V.js} +1 -1
- package/web/console/assets/{request-DkNPOweH.js → request-F5lXa7Ro.js} +1 -1
- package/web/console/assets/{schema-CgPWAu1_.js → schema-DUWaWqPn.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-DvgsHdlx.js → vendor-mammoth-nXG51Cg7.js} +1 -1
- package/web/console/index.html +2 -2
- package/web-admin/src/agent-direct-selection.ts +21 -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/router.ts +2 -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/Shell-BVIjmoY8.css +0 -1
- package/web/console/assets/Shell-kn763smL.js +0 -1
- package/web/console/assets/index-DfJA7iJS.js +0 -2
package/README.en.md
CHANGED
|
@@ -232,7 +232,7 @@ export default buildOpenApiSpec({
|
|
|
232
232
|
- [Tool Governance](docs/TOOLS_DESIGN.en.md)
|
|
233
233
|
- [AI-Friendly Tool Design](docs/AI_FRIENDLY_TOOLS.en.md)
|
|
234
234
|
- [Third-Party Integration](docs/INTEGRATION.en.md)
|
|
235
|
-
- [Latest Release Notes](docs/RELEASE_NOTES_v0.5.
|
|
235
|
+
- [Latest Release Notes](docs/RELEASE_NOTES_v0.5.1.en.md)
|
|
236
236
|
- [v0.1.7 Release Notes](docs/RELEASE_NOTES_v0.1.7.en.md)
|
|
237
237
|
- [v0.1.6 Release Notes](docs/RELEASE_NOTES_v0.1.6.en.md)
|
|
238
238
|
- [v0.1.5 Release Notes](docs/RELEASE_NOTES_v0.1.5.en.md)
|
package/README.md
CHANGED
|
@@ -234,6 +234,7 @@ BAILING_SMOKE_RUN_ROUTE=<route-key> npm run smoke
|
|
|
234
234
|
| `docs/RELEASE_NOTES_v0.3.3.md` | `v0.3.3` npm 发布来源元数据纠偏说明 |
|
|
235
235
|
| `docs/RELEASE_NOTES_v0.3.4.md` | `v0.3.4` 匿名预览与可信业务身份引导说明 |
|
|
236
236
|
| `docs/RELEASE_NOTES_v0.5.0.md` | `v0.5.0` 可撤销本地 Agent 授权与受治理本地编排说明 |
|
|
237
|
+
| `docs/RELEASE_NOTES_v0.5.1.md` | `v0.5.1` 智能体客户端管理中心与批量写操作配置说明 |
|
|
237
238
|
| `docs/RELEASE_NOTES_v0.1.0.md` | 首个公开版本的发布说明 |
|
|
238
239
|
| `docs/兼容性与升级.md` | 版本发布策略:SemVer、稳定契约、数据库结构纪律、发布记录要求 |
|
|
239
240
|
| `sql/` | 中枢**独立**状态库 DDL(`bz_` 前缀,按序号演进);数据库结构演进纪律见 [sql/README.md](sql/README.md) |
|
|
@@ -18,7 +18,7 @@ services:
|
|
|
18
18
|
retries: 30
|
|
19
19
|
|
|
20
20
|
demo-business:
|
|
21
|
-
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.5.
|
|
21
|
+
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.5.1}
|
|
22
22
|
environment:
|
|
23
23
|
DEMO_HOST: 0.0.0.0
|
|
24
24
|
DEMO_PORT: 19080
|
|
@@ -29,7 +29,7 @@ services:
|
|
|
29
29
|
- "${BAILING_DEMO_PUBLIC_PORT:-19080}:19080"
|
|
30
30
|
|
|
31
31
|
bailinghub:
|
|
32
|
-
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.5.
|
|
32
|
+
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.5.1}
|
|
33
33
|
depends_on:
|
|
34
34
|
mysql:
|
|
35
35
|
condition: service_healthy
|
|
@@ -25,10 +25,14 @@ JavaScript, local plugin settings, URLs, screenshots, or logs.
|
|
|
25
25
|
|
|
26
26
|
## 2. Client registration
|
|
27
27
|
|
|
28
|
-
Create a BailingHub client with a stable public `app_id` such as `merchant-agent`,
|
|
29
|
-
|
|
30
|
-
rate limit.
|
|
31
|
-
|
|
28
|
+
Create a BailingHub client with a stable public `app_id` such as `merchant-agent`, one stable,
|
|
29
|
+
account- and tenant-neutral business HTTPS `agent_authorize_url`, the minimum `allowed_routes`,
|
|
30
|
+
`enabled=true`, and a reasonable rate limit. The local plugin never asks for a business URL. If the
|
|
31
|
+
business system has multiple accounts or tenants, this single entry point owns login, account
|
|
32
|
+
switching, and tenant selection. The backend then derives trusted identity from the resulting
|
|
33
|
+
server session; neither the local model nor a URL parameter may select the business subject.
|
|
34
|
+
Production authorization pages require HTTPS. Explicit-port `127.0.0.1` or `::1` HTTP URLs are
|
|
35
|
+
allowed only for local development.
|
|
32
36
|
|
|
33
37
|
## 3. Flow
|
|
34
38
|
|
|
@@ -47,10 +51,11 @@ Local SDK BailingHub business page/backend
|
|
|
47
51
|
```
|
|
48
52
|
|
|
49
53
|
The SDK creates random state, a PKCE verifier/challenge, and a random loopback callback. Core
|
|
50
|
-
appends only `authorization_id` to the registered business page.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
appends only `authorization_id` to the registered business page. That page requires login and, when
|
|
55
|
+
needed, lets the user switch account or select an authorized tenant. The business backend derives
|
|
56
|
+
the trusted principal from the resulting current server session, approves or denies the request,
|
|
57
|
+
and returns the Core-generated redirect. The SDK exchanges the one-time code with PKCE and stores
|
|
58
|
+
the resulting session in a secure local credential store.
|
|
54
59
|
|
|
55
60
|
## 4. Endpoints
|
|
56
61
|
|
|
@@ -154,7 +159,9 @@ authority changes. Business tool endpoints still revalidate current permission o
|
|
|
154
159
|
## 5. Business-page rules
|
|
155
160
|
|
|
156
161
|
- The page belongs to the business system; the SDK does not inject a universal UI.
|
|
157
|
-
-
|
|
162
|
+
- Use one stable entry point for the Client App, not a different URL per account, tenant, or store.
|
|
163
|
+
- Require the normal business login before consent. Let a signed-in user switch account and select
|
|
164
|
+
only a tenant that the backend confirms the account may access.
|
|
158
165
|
- Show the current account, tenant, device, and requested workspace clearly.
|
|
159
166
|
- Keep the Client Token in the backend; the page holds only `authorization_id`.
|
|
160
167
|
- Use `Cache-Control: no-store` and never export tokens to analytics or error reporting.
|
|
@@ -173,3 +180,12 @@ authority changes. Business tool endpoints still revalidate current permission o
|
|
|
173
180
|
|
|
174
181
|
On refresh failure, never fall back to an admin token, Client Token, or anonymous access. Isolate
|
|
175
182
|
the invalid session and require a new browser authorization.
|
|
183
|
+
|
|
184
|
+
A local multi-connection implementation may use `connectionName` as a selector, but it is not a
|
|
185
|
+
trusted identity claim. When a new authorization under the same public binding (Hub +
|
|
186
|
+
`client_app_id` + workspace) yields the same trusted `on_behalf_of`, the SDK may revoke and remove
|
|
187
|
+
the older local connection. Different `on_behalf_of` values remain independent. If the new
|
|
188
|
+
authorization succeeded but revoking or removing the older connection failed, the SDK must retain
|
|
189
|
+
a recoverable state and return `cleanupRequired`. Do not reauthorize in that state; clean up the
|
|
190
|
+
reported old connection first. Core does not turn this local deduplication rule into a global
|
|
191
|
+
cross-device session-uniqueness constraint.
|
package/docs/AGENT_AUTH_API.md
CHANGED
|
@@ -26,11 +26,15 @@ Agent Session。BailingHub 提供协议与服务端 SDK 方法;业务系统负
|
|
|
26
26
|
中枢管理员在“接入方”创建应用并配置:
|
|
27
27
|
|
|
28
28
|
- `app_id`:稳定的公开客户端标识,例如 `merchant-agent`;
|
|
29
|
-
- `agent_authorize_url
|
|
30
|
-
`https://business.example.com/agent/authorize
|
|
29
|
+
- `agent_authorize_url`:业务系统自己的一个稳定、统一 HTTPS 授权入口,例如
|
|
30
|
+
`https://business.example.com/agent/authorize`;它不能绑定具体账号、租户或门店;
|
|
31
31
|
- `allowed_routes`:该应用最多可申请的 route;
|
|
32
32
|
- `enabled=true` 与合理限速。
|
|
33
33
|
|
|
34
|
+
本地插件不会填写业务 URL。业务系统存在多账号或多租户时,统一授权入口负责完成登录、切换账号和
|
|
35
|
+
选择租户;业务后端再从所选结果对应的当前服务端登录态派生可信身份,不能让本地模型或 URL 参数
|
|
36
|
+
直接指定业务主体。
|
|
37
|
+
|
|
34
38
|
生产授权页只允许 HTTPS。本机开发可以使用带显式端口的 `127.0.0.1` 或 `::1` HTTP URL。
|
|
35
39
|
|
|
36
40
|
## 3. 授权流程
|
|
@@ -52,8 +56,8 @@ Agent Session。BailingHub 提供协议与服务端 SDK 方法;业务系统负
|
|
|
52
56
|
1. SDK 生成随机 `state`、PKCE verifier/challenge 和随机 loopback callback;
|
|
53
57
|
2. Core 创建 10 分钟有效的授权请求,返回业务授权页 URL;
|
|
54
58
|
3. Core 只向配置好的授权页追加 `authorization_id`;
|
|
55
|
-
4.
|
|
56
|
-
5. 业务后端用 Client Token
|
|
59
|
+
4. 业务页要求用户先完成业务系统登录,并在需要时切换账号或选择当前账号有权访问的租户;
|
|
60
|
+
5. 业务后端用 Client Token 查询上下文,并从选择完成后的当前服务端登录态推导可信身份;
|
|
57
61
|
6. 批准后 Core 返回锁定 callback 的 `redirect_uri`,浏览器跳转回本机;
|
|
58
62
|
7. SDK 用一次性 code 和 PKCE verifier 换取 Agent Session;
|
|
59
63
|
8. 后续 Runtime 请求使用短期 access token,SDK 用轮换 refresh token 续期。
|
|
@@ -169,7 +173,9 @@ access token 默认 15 分钟有效,refresh session 默认 30 天有效;每
|
|
|
169
173
|
## 5. 业务授权页实现规则
|
|
170
174
|
|
|
171
175
|
- 页面属于业务系统,不由 SDK 自动注入;可以完全继承业务系统自己的 UI 风格;
|
|
172
|
-
-
|
|
176
|
+
- 同一 Client App 使用一个稳定、统一的入口,不为每个账号、租户或门店配置不同 URL;
|
|
177
|
+
- 未登录先跳业务登录,登录完成后回到同一授权请求;已登录用户可在这里切换账号,并从服务端确认
|
|
178
|
+
其有权访问的租户中进行选择;
|
|
173
179
|
- 明确展示当前账号、租户、设备名和申请的 workspace;
|
|
174
180
|
- 授权页前端只持有 `authorization_id`,Client Token 只在后端;
|
|
175
181
|
- 所有响应使用 `Cache-Control: no-store`,不要在分析、监控或错误上报中记录 token;
|
|
@@ -188,3 +194,9 @@ access token 默认 15 分钟有效,refresh session 默认 30 天有效;每
|
|
|
188
194
|
|
|
189
195
|
客户端遇到刷新失败不得回退为管理员 Token、Client Token 或匿名调用;应清理/隔离失效会话并要求
|
|
190
196
|
用户重新执行浏览器授权。
|
|
197
|
+
|
|
198
|
+
本机多连接实现可以用 `connectionName` 选择连接,但它不是可信身份声明。若同一公开绑定
|
|
199
|
+
(Hub + `client_app_id` + workspace)再次授权得到相同可信 `on_behalf_of`,SDK 可撤销并移除旧的
|
|
200
|
+
本机连接;不同 `on_behalf_of` 保持独立。若新授权已成功、但旧会话撤销或本地清理失败,SDK 应保留
|
|
201
|
+
可恢复状态并返回 `cleanupRequired`:此时不要重复授权,应先按返回信息清理旧连接。Core 不把该
|
|
202
|
+
本机去重规则提升为跨设备的全局会话唯一约束。
|
|
@@ -33,8 +33,8 @@ sends its login cookie, password, or API secret to DSH, and DSH never calls busi
|
|
|
33
33
|
| `hubUrl` | host deployer | host plugin settings | No; public BailingHub HTTPS origin |
|
|
34
34
|
| `clientAppId` | host deployer | host plugin settings | No; BailingHub client `app_id` |
|
|
35
35
|
| `workspace` | host deployer | host plugin settings | No; an allowed BailingHub `route_key` |
|
|
36
|
-
| `connectionName` | local user | local SDK registry | No; local
|
|
37
|
-
| Agent authorization URL | business developer / Hub admin | BailingHub client config | No,
|
|
36
|
+
| `connectionName` | local user | local SDK registry | No; readable selector for one local connection instance |
|
|
37
|
+
| Agent authorization URL | business developer / Hub admin | BailingHub client config | No; one neutral entry per app, never entered by end users |
|
|
38
38
|
| business Client Token | business backend | server-side secret store | **Yes; never browser or DSH config** |
|
|
39
39
|
| Tool Provider Secret | business backend and BailingHub | both secret stores | **Yes; never DSH** |
|
|
40
40
|
| Agent access/refresh token | generic SDK | Keychain or explicit secure store | **Yes; never plugin settings** |
|
|
@@ -72,8 +72,10 @@ Client setting.
|
|
|
72
72
|
### 3.3 Configure a route
|
|
73
73
|
|
|
74
74
|
1. Set `tools.agent_direct.enabled=true`.
|
|
75
|
-
2. Add only explicitly allowed write operation IDs to `write_tools
|
|
76
|
-
|
|
75
|
+
2. Add only explicitly allowed write operation IDs to `write_tools`. For a large catalog, use
|
|
76
|
+
**Select all current write operations** in the console; it stores an exact snapshot of the
|
|
77
|
+
current operation IDs and does not authorize future writes automatically. Read-only tools do
|
|
78
|
+
not need to be listed there.
|
|
77
79
|
3. Inherit approval requirements from the ACC declaration. Use `force_approval_tools` only to
|
|
78
80
|
make selected writes stricter.
|
|
79
81
|
4. Enable Local Agent Runtime and optionally set host-specific instructions and an active tool
|
|
@@ -89,7 +91,7 @@ In Clients, create one Agent Client application:
|
|
|
89
91
|
|
|
90
92
|
- a stable public `app_id`, for example `merchant-agent`;
|
|
91
93
|
- the minimum `allowed_routes` set;
|
|
92
|
-
-
|
|
94
|
+
- one stable, account- and tenant-neutral HTTPS business authorization entry point, for example
|
|
93
95
|
`https://business.example.com/agent/authorize`;
|
|
94
96
|
- a reasonable rate limit and `enabled=true`.
|
|
95
97
|
|
|
@@ -97,12 +99,27 @@ BailingHub displays the Client Token once. Give it only to the business backend
|
|
|
97
99
|
the authorization page. Never put it in DSH settings, browser JavaScript, a URL, documentation,
|
|
98
100
|
or screenshots.
|
|
99
101
|
|
|
102
|
+
After creation, open **Agent Clients** in the console to:
|
|
103
|
+
|
|
104
|
+
- inspect which existing clients enable Agent authorization and their allowed workspaces;
|
|
105
|
+
- inspect device label, trusted business principal, last activity, and expiry for Agent Sessions;
|
|
106
|
+
- remotely revoke a lost or no-longer-authorized Agent Session;
|
|
107
|
+
- generate secret-free JSON or DSH commands from
|
|
108
|
+
`hubUrl + clientAppId + workspace + connectionName`;
|
|
109
|
+
- view recent conversation, Agent Run, tool-call, token, failure-rate, and approval aggregates.
|
|
110
|
+
|
|
111
|
+
This page projects the existing client, Agent Session, and Agent Run ledgers. It does not create a
|
|
112
|
+
second Client resource and is not the Executor feature. Generated configuration contains no Client
|
|
113
|
+
Token, Agent token, or model key.
|
|
114
|
+
|
|
100
115
|
## 4. Business developer: bind trusted identity
|
|
101
116
|
|
|
102
117
|
The BailingHub SDK provides server-side Agent Auth methods; it does not inject one universal UI
|
|
103
|
-
into every business system. The business system owns
|
|
104
|
-
permission model.
|
|
105
|
-
|
|
118
|
+
into every business system. The business system owns one stable entry point that follows its normal
|
|
119
|
+
login and permission model. It handles login and, when needed, account switching plus selection
|
|
120
|
+
from tenants the backend confirms are accessible. The backend derives `principal`, `on_behalf_of`,
|
|
121
|
+
and allowed routes from the resulting current authenticated server session. Do not register a
|
|
122
|
+
different authorization URL per account, tenant, or store.
|
|
106
123
|
|
|
107
124
|
1. BailingHub appends only `authorization_id` to the configured page URL.
|
|
108
125
|
2. The page sends only that ID to its own backend.
|
|
@@ -165,7 +182,9 @@ export BAILINGHUB_CONNECTION_NAME='default'
|
|
|
165
182
|
```
|
|
166
183
|
|
|
167
184
|
`hubUrl` is the Hub origin without `/console`, `/agent-api`, or a business path. `workspace` is a
|
|
168
|
-
route key, not a business domain, tenant ID, or chat-entry ID.
|
|
185
|
+
route key, not a business domain, tenant ID, or chat-entry ID. Plugin settings contain no business
|
|
186
|
+
URL: BailingHub returns the registered page for `clientAppId`, and the user confirms the business
|
|
187
|
+
account and tenant only on that page.
|
|
169
188
|
|
|
170
189
|
Run in DSH:
|
|
171
190
|
|
|
@@ -181,12 +200,39 @@ Agent Session fails closed on Windows until a native secure store is available.
|
|
|
181
200
|
Configure the model provider and model API key separately in DSH. The BailingHub plugin neither
|
|
182
201
|
reads nor manages model-provider keys.
|
|
183
202
|
|
|
184
|
-
## 6. Multiple Hubs and
|
|
203
|
+
## 6. Multiple Hubs, workspaces, and same-binding identity instances
|
|
204
|
+
|
|
205
|
+
The public binding is `Hub + clientAppId + workspace`; `connectionName` is only a local connection
|
|
206
|
+
selector and cannot name an account, tenant, or store. The unreleased multi-connection candidate
|
|
207
|
+
permits multiple instances on the same public binding, but every instance requires separate
|
|
208
|
+
browser authorization. Core does not trust the local instance name or id: the trusted subject
|
|
209
|
+
still comes only from business-backend approval as `principal` and `on_behalf_of`.
|
|
210
|
+
|
|
211
|
+
Each login requests one workspace for least privilege. For another Hub, route, or business identity
|
|
212
|
+
on the same public binding, use a console-generated command or run these user commands in DSH:
|
|
213
|
+
|
|
214
|
+
```text
|
|
215
|
+
/bailinghub connections add "identity-a" https://hub-a.example.com merchant-agent order-assistant
|
|
216
|
+
/bailinghub connections list
|
|
217
|
+
/bailinghub connections use "identity-a"
|
|
218
|
+
/bailinghub login
|
|
219
|
+
```
|
|
185
220
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
221
|
+
Connection selection is a user command, not a model tool. It affects only newly created Agent
|
|
222
|
+
sessions; existing sessions stay pinned to their original connection. `/bailinghub use
|
|
223
|
+
<workspace>` moves only within workspaces already granted to the current authorization and is not
|
|
224
|
+
a multi-connection selector. `/bailinghub connections remove <name>` first revokes the remote
|
|
225
|
+
Agent Session and deletes that instance's local credentials only after success; a failed remote
|
|
226
|
+
revoke keeps that instance for retry. Never copy access or refresh-token files between connections.
|
|
227
|
+
|
|
228
|
+
On one device, when a newly authorized connection under the same public binding yields the same
|
|
229
|
+
trusted `on_behalf_of` as an older connection, the SDK revokes and removes the older local
|
|
230
|
+
connection after the new authorization succeeds. Different identities remain independent. If the
|
|
231
|
+
new authorization succeeded but revoking or removing the older connection failed, the result marks
|
|
232
|
+
`cleanupRequired` and retains a recoverable state. Do not reauthorize; clean up the reported old
|
|
233
|
+
connection first. Core still keys `bz_agent_sessions` by `session_id` and performs no global
|
|
234
|
+
cross-device identity deduplication, so sessions on different devices can be revoked and audited
|
|
235
|
+
independently.
|
|
190
236
|
|
|
191
237
|
## 7. Minimum acceptance
|
|
192
238
|
|
|
@@ -204,6 +250,11 @@ copy access/refresh-token files between connections.
|
|
|
204
250
|
- **`invalid_client`:** check `clientAppId`, enabled state, authorization URL, and allowed route.
|
|
205
251
|
- **Authorization page does not open:** production requires HTTPS; only loopback development may
|
|
206
252
|
use port-qualified `127.0.0.1` or `::1` HTTP.
|
|
253
|
+
- **A fixed tenant or store opens:** `agent_authorize_url` is misconfigured. Register the business
|
|
254
|
+
system's neutral authorization entry point, perform account/tenant choice inside that page, and
|
|
255
|
+
do not add a business URL to plugin settings.
|
|
256
|
+
- **`cleanupRequired`:** the new identity authorization already succeeded. Do not authorize again;
|
|
257
|
+
retry revoke or removal for the reported old connection.
|
|
207
258
|
- **Authorized but no tools:** check the Tool Provider, `tools.agent_direct.enabled`, audience
|
|
208
259
|
policy, and Local Agent Runtime switch.
|
|
209
260
|
- **A write requires approval:** inspect the ACC declaration first. `force_approval_tools` may
|
|
@@ -30,8 +30,8 @@ BailingHub 负责可信业务身份、能力裁剪、审批、幂等、业务调
|
|
|
30
30
|
| `hubUrl` | DSH/宿主部署者 | 宿主插件配置 | 否;只填中枢公开 HTTPS 根地址 |
|
|
31
31
|
| `clientAppId` | DSH/宿主部署者 | 宿主插件配置 | 否;对应中枢“接入方”的 `app_id` |
|
|
32
32
|
| `workspace` | DSH/宿主部署者 | 宿主插件配置 | 否;对应允许的 BailingHub `route_key` |
|
|
33
|
-
| `connectionName` | 最终用户或宿主部署者 | 本机 SDK 连接注册表 |
|
|
34
|
-
| Agent 授权页 URL | 业务开发者/中枢管理员 | BailingHub 接入方配置 |
|
|
33
|
+
| `connectionName` | 最终用户或宿主部署者 | 本机 SDK 连接注册表 | 否;选择一个本机连接实例的可读名称 |
|
|
34
|
+
| Agent 授权页 URL | 业务开发者/中枢管理员 | BailingHub 接入方配置 | 否;同一应用只配一个中立入口,不让最终用户手填 |
|
|
35
35
|
| 接入方 Client Token | 业务后端 | 服务端 Secret/环境变量 | **是;不得进入浏览器、DSH 或公开配置** |
|
|
36
36
|
| Tool Provider Secret | 业务后端与 BailingHub | 两端 Secret/凭据管理 | **是;不得进入 DSH** |
|
|
37
37
|
| Agent access/refresh token | 通用 SDK | Keychain 或显式启用的安全存储 | **是;不得显示或写入插件配置** |
|
|
@@ -72,7 +72,7 @@ Secret 只存在于业务后端与中枢凭据管理中,不进入 route、知
|
|
|
72
72
|
在“路由”中选择刚才的工具源,并配置:
|
|
73
73
|
|
|
74
74
|
1. `tools.agent_direct.enabled=true`,显式开放本地 Agent 工具面;
|
|
75
|
-
2. 只把允许本地 Agent 调用的写操作精确列入 `write_tools
|
|
75
|
+
2. 只把允许本地 Agent 调用的写操作精确列入 `write_tools`;写操作较多时可在控制台点击“全选当前写操作”,它会保存当前目录的 operationId 快照,不会自动授权未来新增写操作;只读能力无需逐项加入该数组;
|
|
76
76
|
3. 工具审批默认继承业务侧 ACC 声明;只有确需额外收紧时才加入 `force_approval_tools`;
|
|
77
77
|
4. 开启“本地 Agent Runtime”,按需填写补充指令和每轮主动工具数(1–12,默认 8);
|
|
78
78
|
5. 配置 route 的受众、租户和角色边界,不使用 `*` 代替生产授权设计。
|
|
@@ -85,18 +85,30 @@ Agent Client 不会收到模型凭据、Tool Provider Secret、业务 API 地址
|
|
|
85
85
|
|
|
86
86
|
- `app_id`:稳定的公开 `clientAppId`,例如 `merchant-agent`;
|
|
87
87
|
- `allowed_routes`:只选择要开放的 route;
|
|
88
|
-
- `agent_authorize_url
|
|
89
|
-
`https://business.example.com/agent/authorize
|
|
88
|
+
- `agent_authorize_url`:业务系统实现的一个稳定、统一 HTTPS 授权入口,例如
|
|
89
|
+
`https://business.example.com/agent/authorize`;不要配置成绑定具体账号、租户或门店的 URL;
|
|
90
90
|
- `enabled=true`,并设置合理限速。
|
|
91
91
|
|
|
92
92
|
中枢创建接入方时会显示一次 Client Token。它只交给业务后端,用于业务授权页服务端调用
|
|
93
93
|
BailingHub Agent Auth 接口。不要把它写入 DSH 配置、网页 JavaScript、URL、README 或截图。
|
|
94
94
|
|
|
95
|
+
创建完成后可打开控制台“智能体客户端”:
|
|
96
|
+
|
|
97
|
+
- 查看哪些既有接入方已经开放 Agent 授权,以及允许的 workspace;
|
|
98
|
+
- 查看 Agent Session 的设备名、可信业务主体、最后活跃与有效期;
|
|
99
|
+
- 远程撤销遗失设备或不再允许的 Agent Session;
|
|
100
|
+
- 按 `hubUrl + clientAppId + workspace + connectionName` 生成不含秘密的 JSON 或 DSH 命令;
|
|
101
|
+
- 查看近期会话、Agent Run、工具调用、Token、失败率与审批状态聚合。
|
|
102
|
+
|
|
103
|
+
该页面复用现有接入方、Agent Session 和 Agent Run 账本,不会创建第二套 Client,也不等同于
|
|
104
|
+
“执行器”。生成的配置不包含 Client Token、Agent Token 或模型 Key。
|
|
105
|
+
|
|
95
106
|
## 4. 业务开发者:建立可信身份授权页
|
|
96
107
|
|
|
97
108
|
BailingHub SDK 提供的是服务端 Agent Auth 方法,不会在任意业务系统中自动生成统一样式的页面。
|
|
98
|
-
|
|
99
|
-
|
|
109
|
+
业务系统负责提供一个符合自身登录和权限体系的稳定统一入口;页面必须先要求用户登录,并在需要
|
|
110
|
+
时允许切换账号、从服务端确认有权访问的租户中进行选择,再由业务后端从选择完成后的当前服务端
|
|
111
|
+
登录态推导 `principal`、`on_behalf_of` 和可授权 route。不要为每个租户或门店创建不同授权 URL。
|
|
100
112
|
|
|
101
113
|
### 4.1 浏览器与后端边界
|
|
102
114
|
|
|
@@ -159,7 +171,8 @@ export BAILINGHUB_CONNECTION_NAME='default'
|
|
|
159
171
|
```
|
|
160
172
|
|
|
161
173
|
`hubUrl` 只填中枢根地址,不带 `/console`、`/agent-api` 或业务接口路径;`workspace` 填 route
|
|
162
|
-
标识,不填业务域名、租户 ID 或聊天入口 ID
|
|
174
|
+
标识,不填业务域名、租户 ID 或聊天入口 ID。插件配置没有业务 URL 字段:授权地址始终由中枢按
|
|
175
|
+
`clientAppId` 返回,业务账号与租户只在该业务授权页中由用户确认。
|
|
163
176
|
|
|
164
177
|
在 DSH 中执行:
|
|
165
178
|
|
|
@@ -175,11 +188,34 @@ Windows 在具备原生安全存储前对 Agent Session 失败关闭。
|
|
|
175
188
|
DSH 的模型提供方和模型 API Key 需要在 DSH 自己的模型设置中单独配置。BailingHub 插件既不读取
|
|
176
189
|
也不代管模型 Key。
|
|
177
190
|
|
|
178
|
-
## 6. 多 Hub
|
|
191
|
+
## 6. 多 Hub、多 workspace 与同绑定身份实例
|
|
192
|
+
|
|
193
|
+
公开绑定由 `Hub + clientAppId + workspace` 组成;`connectionName` 只是一个本机连接选择器,不能
|
|
194
|
+
指定账号、租户或门店。未发布的多连接候选允许多个实例使用同一公开绑定,但每个实例都必须单独
|
|
195
|
+
完成浏览器授权。Core 不信任本机实例名或实例 ID,可信主体仍只来自业务后端批准得到的
|
|
196
|
+
`principal` 与 `on_behalf_of`。
|
|
197
|
+
|
|
198
|
+
每次登录按最小权限原则申请一个 workspace。需要连接另一套中枢、另一条 route,或在同一公开
|
|
199
|
+
绑定下授权另一业务身份时,可由控制台生成命令,或由用户在 DSH 中执行:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
/bailinghub connections add "identity-a" https://hub-a.example.com merchant-agent order-assistant
|
|
203
|
+
/bailinghub connections list
|
|
204
|
+
/bailinghub connections use "identity-a"
|
|
205
|
+
/bailinghub login
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
连接切换是用户命令,不是模型工具;它只影响之后新建的 Agent 会话,已有会话保持原连接不漂移。
|
|
209
|
+
`/bailinghub use <workspace>` 只在当前授权已经允许的 workspace 内切换,不能替代多连接选择。
|
|
210
|
+
删除连接时使用 `/bailinghub connections remove <名称>`:SDK 会先远程撤销 Agent Session,成功
|
|
211
|
+
后再删除该实例的本地凭据;远程撤销失败则保留该实例和凭据供重试。不要复制 access/refresh token
|
|
212
|
+
文件。
|
|
179
213
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
214
|
+
同一台设备上,如果新连接在相同公开绑定下最终得到与旧连接相同的可信 `on_behalf_of`,SDK 会在
|
|
215
|
+
新授权成功后撤销并移除旧连接,避免同一身份留下重复本机连接;若身份不同,则两个连接保持独立。
|
|
216
|
+
如果新授权已经成功、但旧会话撤销或本地清理失败,结果会标记 `cleanupRequired` 并保留可恢复状态。
|
|
217
|
+
此时不要重新授权,应先按结果列出的旧连接完成清理。Core 的 `bz_agent_sessions` 仍以 `session_id`
|
|
218
|
+
为主键,不执行跨设备的全局身份去重,因此不同设备上的授权仍可独立失效和审计。
|
|
183
219
|
|
|
184
220
|
## 7. 最小验收
|
|
185
221
|
|
|
@@ -198,6 +234,9 @@ DSH 的模型提供方和模型 API Key 需要在 DSH 自己的模型设置中
|
|
|
198
234
|
- **`invalid_client`**:检查 `clientAppId`、接入方是否启用、是否配置授权页,以及 workspace 是否在
|
|
199
235
|
`allowed_routes` 中。
|
|
200
236
|
- **授权页打不开**:生产授权页必须是 HTTPS;仅本机开发允许带端口的 `127.0.0.1`/`::1` HTTP。
|
|
237
|
+
- **打开了固定租户或门店**:`agent_authorize_url` 配错了;应改成业务系统的统一授权入口,并在页面
|
|
238
|
+
内依据当前登录态完成切号或选租户,插件端不要增加业务 URL 配置。
|
|
239
|
+
- **`cleanupRequired`**:新身份授权已经成功,不要再次授权;先按返回的旧连接名称重试撤销或移除。
|
|
201
240
|
- **登录成功但没有业务工具**:检查 route 的工具源、`tools.agent_direct.enabled`、受众策略和
|
|
202
241
|
“本地 Agent Runtime”开关。
|
|
203
242
|
- **写操作要求审批**:先查看业务侧 ACC 声明;route 的 `force_approval_tools` 只能额外收紧,不能
|
package/docs/CHANGELOG.en.md
CHANGED
|
@@ -22,6 +22,18 @@ Each public version should describe:
|
|
|
22
22
|
|
|
23
23
|
## Unreleased
|
|
24
24
|
|
|
25
|
+
## v0.5.1 - Agent Client Management and Bulk Write-Operation Configuration
|
|
26
|
+
|
|
27
|
+
Planned release date: 2026-09-01.
|
|
28
|
+
|
|
29
|
+
- **Agent Client management center**: adds a dedicated console page that summarizes applications with business authorization enabled, available workspaces, Agent Session state, and recent run statistics without creating a second Client, route, or executor resource model.
|
|
30
|
+
- **Session governance**: administrators can filter Agent Sessions by client and state and revoke an individual session. The projection never returns access tokens, refresh tokens, prompts, tool arguments, or business results.
|
|
31
|
+
- **Bulk write-operation configuration**: the route page can select or clear every writable operationId currently declared by the selected tool sources. The stored policy remains an exact operationId list, rejects wildcards, and cannot weaken ACC approval or final business authorization.
|
|
32
|
+
- **Neutral business authorization entry**: the bilingual guides define `agent_authorize_url` as one account- and tenant-neutral entry. The business page still owns login, account switching, and explicit tenant selection, while the business backend derives trusted `principal` and `on_behalf_of` values from the current session. Local `connectionName` only selects a local connection instance.
|
|
33
|
+
- **Database and runtime contracts**: no migration is added, and Agent Client Runtime, Client API, Kernel API, business SDK, Widget, tool-signature, approval, and final-authorization semantics remain unchanged.
|
|
34
|
+
- **Validation**: 612 Core tests, console build and E2E, Client API ecosystem consumers, SDK contracts, Docker Demo, security audit, OSS export, and npm artifact checks.
|
|
35
|
+
- **Related docs**: [RELEASE_NOTES_v0.5.1.en.md](RELEASE_NOTES_v0.5.1.en.md), [Agent Client v1 Integration Guide](AGENT_CLIENT_QUICKSTART.en.md), and [Agent Auth v1](AGENT_AUTH_API.en.md).
|
|
36
|
+
|
|
25
37
|
## v0.5.0 - Revocable Local-Agent Authorization and Governed Local Planning
|
|
26
38
|
|
|
27
39
|
Released on 2026-08-26.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,18 @@
|
|
|
15
15
|
|
|
16
16
|
## Unreleased
|
|
17
17
|
|
|
18
|
+
## v0.5.1 - 智能体客户端管理中心与批量写操作配置
|
|
19
|
+
|
|
20
|
+
计划发布日期:2026-09-01。
|
|
21
|
+
|
|
22
|
+
- **智能体客户端管理中心**:新增独立控制台菜单,汇总已启用业务授权的客户端应用、可用工作区、Agent Session 状态与最近运行统计,不创建第二套 Client、路由或执行器资源。
|
|
23
|
+
- **会话治理**:管理员可按客户端和状态查看 Agent Session,并逐个撤销;投影不返回 access token、refresh token、提示词、工具参数或业务结果。
|
|
24
|
+
- **批量写操作配置**:路由页可一次选择或清除当前工具源声明的全部可写 operationId;保存结果仍是精确 operationId 列表,不接受通配符,也不放宽 ACC 审批或业务系统最终授权。
|
|
25
|
+
- **统一业务授权入口**:中英文文档明确 `agent_authorize_url` 是账号与租户中立的统一入口。业务页面继续负责登录、换号与显式租户选择,业务后端从当前会话派生可信 `principal` 与 `on_behalf_of`;本地 `connectionName` 只选择本机连接实例。
|
|
26
|
+
- **数据库与运行契约**:没有新增 migration,也不改变 Agent Client Runtime、Client API、Kernel API、业务 SDK、Widget、工具签名、审批与最终业务授权语义。
|
|
27
|
+
- **验证方式**:Core 612 项单测、控制台构建与 E2E、Client API 生态消费者、SDK 契约、Docker Demo、安全审计、OSS 导出和 npm 制品检查。
|
|
28
|
+
- **相关文档**:[RELEASE_NOTES_v0.5.1.md](RELEASE_NOTES_v0.5.1.md)、[Agent Client v1 接入指南](AGENT_CLIENT_QUICKSTART.md) 与 [Agent Auth v1](AGENT_AUTH_API.md)。
|
|
29
|
+
|
|
18
30
|
## v0.5.0 - 可撤销本地 Agent 授权与受治理本地编排
|
|
19
31
|
|
|
20
32
|
发布日期:2026-08-26。
|
|
@@ -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.5.
|
|
10
|
+
- Stable baseline: `v0.5.1`;
|
|
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.5.
|
|
35
|
+
The installer pulls the official `v0.5.1` 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.5.
|
|
49
|
+
git clone --depth 1 --branch v0.5.1 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.5.
|
|
170
|
+
- [Current stable release notes](RELEASE_NOTES_v0.5.1.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.5.
|
|
10
|
+
- 稳定基线:`v0.5.1`;
|
|
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.5.
|
|
35
|
+
脚本默认拉取 `v0.5.1` 官方镜像,生成随机 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.5.
|
|
49
|
+
git clone --depth 1 --branch v0.5.1 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.5.
|
|
170
|
+
- [当前稳定版发布说明](RELEASE_NOTES_v0.5.1.md)。
|
|
171
171
|
|
|
172
172
|
扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
|
|
173
173
|
|
package/docs/README.en.md
CHANGED
|
@@ -107,6 +107,8 @@ This directory contains public documentation for the open-source BailingHub proj
|
|
|
107
107
|
| [RELEASE_NOTES_v0.3.4.md](RELEASE_NOTES_v0.3.4.md) | Chinese `v0.3.4` release notes. |
|
|
108
108
|
| [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. |
|
|
109
109
|
| [RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md) | Chinese `v0.5.0` release notes. |
|
|
110
|
+
| [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. |
|
|
111
|
+
| [RELEASE_NOTES_v0.5.1.md](RELEASE_NOTES_v0.5.1.md) | Chinese `v0.5.1` release notes. |
|
|
110
112
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | First public release notes. |
|
|
111
113
|
| [CHANGELOG.en.md](CHANGELOG.en.md) | Public changelog format and current release summary. |
|
|
112
114
|
| [COMPATIBILITY.en.md](COMPATIBILITY.en.md) | Versioning, compatibility, migration, and schema discipline. |
|
package/docs/README.md
CHANGED
|
@@ -120,6 +120,8 @@
|
|
|
120
120
|
| [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
121
|
| [RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md) | `v0.5.0` 可撤销本地 Agent 授权与受治理本地编排说明。 |
|
|
122
122
|
| [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. |
|
|
123
|
+
| [RELEASE_NOTES_v0.5.1.md](RELEASE_NOTES_v0.5.1.md) | `v0.5.1` 智能体客户端管理中心与批量写操作配置说明。 |
|
|
124
|
+
| [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. |
|
|
123
125
|
| [RELEASE_NOTES_v0.1.0.md](RELEASE_NOTES_v0.1.0.md) | 首个公开版本的 GitHub Release 草稿。 |
|
|
124
126
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | English release notes. |
|
|
125
127
|
| [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)
|