bailinghub 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +5 -0
- package/README.en.md +5 -2
- package/README.md +5 -2
- package/SECURITY.md +11 -0
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_AUTH_API.en.md +175 -0
- package/docs/AGENT_AUTH_API.md +190 -0
- package/docs/AGENT_CLIENT_QUICKSTART.en.md +212 -0
- package/docs/AGENT_CLIENT_QUICKSTART.md +206 -0
- package/docs/AGENT_CLIENT_RUNTIME_API.en.md +157 -0
- package/docs/AGENT_CLIENT_RUNTIME_API.md +107 -0
- package/docs/CHANGELOG.en.md +13 -0
- package/docs/CHANGELOG.md +13 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/README.en.md +8 -2
- package/docs/README.md +8 -2
- package/docs/RELEASE_NOTES_v0.5.0.en.md +41 -0
- package/docs/RELEASE_NOTES_v0.5.0.md +41 -0
- package/package.json +3 -2
- package/schemas/config/client.schema.json +7 -0
- package/schemas/config/common.schema.json +30 -0
- package/schemas/config/route.schema.json +11 -0
- package/scripts/check-doc-links.mjs +1 -1
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +5 -5
- package/scripts/e2e-console.mjs +144 -0
- package/scripts/export-oss.mjs +5 -12
- package/scripts/install.sh +1 -1
- package/scripts/public-content-denylist.mjs +82 -0
- package/scripts/public-content-denylist.test.mjs +53 -0
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +8 -13
- package/scripts/sdk-runtime-test.mjs +171 -7
- package/scripts/security-scan.mjs +8 -5
- package/scripts/validate-examples.mjs +3 -1
- package/scripts/verify-github-repo.mjs +7 -12
- package/scripts/verify-oss-export.mjs +6 -12
- package/sdk/php/README.md +27 -1
- package/sdk/php/src/AgentAuth.php +78 -0
- package/sdk/php/src/HubClient.php +3 -0
- package/sdk/php7/README.md +32 -2
- package/sdk/php7/src/AgentAuth.php +77 -0
- package/sdk/php7/src/HubClient.php +3 -0
- package/sql/055_agent_auth.sql +72 -0
- package/sql/056_agent_client_runtime.sql +60 -0
- package/src/adapters/channels/wecom-api.ts +1 -1
- package/src/app/agent-client-runtime.test.ts +221 -0
- package/src/app/agent-client-runtime.ts +408 -0
- package/src/app/agent-tool-invocations.test.ts +462 -0
- package/src/app/agent-tool-invocations.ts +795 -0
- package/src/app/agent-tool-job.test.ts +62 -0
- package/src/app/agent-tool-job.ts +41 -0
- package/src/app/auth.ts +2 -1
- package/src/app/kernel.ts +2 -0
- package/src/app/runtime-context.ts +8 -0
- package/src/app/tool-approvals.ts +5 -1
- package/src/app/tool-assembly.ts +19 -1
- package/src/app/tool-context.ts +2 -1
- package/src/core/config/config-codec.ts +2 -1
- package/src/core/config/config-models.test.ts +10 -0
- package/src/core/config/config-models.ts +21 -0
- package/src/core/config/config-schema.test.ts +6 -0
- package/src/core/config/route-config.test.ts +15 -0
- package/src/core/config/route-config.ts +36 -0
- package/src/core/config/tools-config.test.ts +58 -1
- package/src/core/config/tools-config.ts +84 -0
- package/src/core/contracts/tools.ts +162 -29
- package/src/core/contracts/types.ts +36 -0
- package/src/core/runtime/agent-client-trace.test.ts +154 -0
- package/src/core/runtime/agent-client-trace.ts +288 -0
- package/src/core/runtime/launch-runtime.ts +13 -0
- package/src/core/runtime/trace-runtime.test.ts +18 -1
- package/src/core/runtime/trace-runtime.ts +28 -3
- package/src/core/state/state-codec.ts +2 -0
- package/src/infrastructure/config/config-agent-auth-repository.test.ts +147 -0
- package/src/infrastructure/config/config-agent-auth-repository.ts +356 -0
- package/src/infrastructure/config/config-agent-client-runtime-repository.ts +253 -0
- package/src/infrastructure/config/config-approval-ledger.test.ts +32 -0
- package/src/infrastructure/config/config-approval-ledger.ts +16 -0
- package/src/infrastructure/config/config-client-repository.ts +3 -3
- package/src/infrastructure/config/config-conversation-ledger.test.ts +69 -0
- package/src/infrastructure/config/config-conversation-ledger.ts +8 -7
- package/src/infrastructure/config/config-observability-ledger.test.ts +50 -0
- package/src/infrastructure/config/config-observability-ledger.ts +65 -10
- package/src/infrastructure/config/config-route-repository.ts +4 -3
- package/src/infrastructure/config/configstore.ts +14 -3
- package/src/infrastructure/state/state-mysql.ts +2 -2
- package/src/kernel-api/v1/contracts.ts +8 -0
- package/src/routes/admin-runtime.test.ts +214 -0
- package/src/routes/admin-runtime.ts +82 -2
- package/src/routes/agent-api.test.ts +379 -0
- package/src/routes/agent-api.ts +251 -0
- package/src/routes/agent-auth.test.ts +276 -0
- package/src/routes/agent-auth.ts +395 -0
- package/src/routes/approvals.ts +4 -1
- package/src/routes/critical-routes.test.ts +235 -1
- package/src/routes/private-default.ts +2 -1
- package/src/routes/private.ts +16 -1
- package/src/routes/run.ts +79 -13
- package/web/connect/bailing-connect-php.tgz +0 -0
- package/web/connect/bailing-connect-php7.tgz +0 -0
- package/web/console/assets/{Accounts-DuUY2UJU.js → Accounts-D4RRm5D1.js} +1 -1
- package/web/console/assets/{Approvals-B11mo1dy.js → Approvals-CsTTKb8o.js} +1 -1
- package/web/console/assets/{Audit-CQwJRIJT.js → Audit-BzvZ7JZw.js} +1 -1
- package/web/console/assets/{BrandLockup-BIF-h1pi.js → BrandLockup-CYcA93wh.js} +1 -1
- package/web/console/assets/{Channels-BIploUT-.js → Channels-DRQZggqM.js} +1 -1
- package/web/console/assets/{ChatEntries-Cpg_WV-o.js → ChatEntries-BUB7BWKU.js} +1 -1
- package/web/console/assets/Clients-CQ_MonGL.css +1 -0
- package/web/console/assets/Clients-HhCyrxfz.js +3 -0
- package/web/console/assets/{Cost-BF52tfU2.js → Cost-BZgFf1yM.js} +1 -1
- package/web/console/assets/{Credentials-SwfmQAv6.js → Credentials-BTe2Q07j.js} +1 -1
- package/web/console/assets/{Diagnostics-CJfbI_8p.js → Diagnostics-WL-buYli.js} +1 -1
- package/web/console/assets/{Executors-CzlZlznA.js → Executors-CGZ-7Xmp.js} +1 -1
- package/web/console/assets/{Kb-CVX22U4k.js → Kb-VVw8oGsT.js} +1 -1
- package/web/console/assets/{Login-PoUVsBI-.js → Login-rwvmBBPl.js} +1 -1
- package/web/console/assets/{Projects-DYlbjLQy.js → Projects-CexaCEY1.js} +1 -1
- package/web/console/assets/Routes-B9ZHbQAp.js +124 -0
- package/web/console/assets/Routes-BbkFpi6Y.css +1 -0
- package/web/console/assets/Runs-4zDD9VOC.css +1 -0
- package/web/console/assets/Runs-BzFNPTwD.js +3 -0
- package/web/console/assets/{Setup-xiPXit_b.js → Setup-Djh5yadQ.js} +1 -1
- package/web/console/assets/{Shell-DNiWZOYB.js → Shell-kn763smL.js} +1 -1
- package/web/console/assets/{StorageBuckets-Bjsc3pLd.js → StorageBuckets-CQBR41W1.js} +1 -1
- package/web/console/assets/{SystemSettings-CcKF2lJ9.js → SystemSettings-DgnopekD.js} +1 -1
- package/web/console/assets/{SystemStatus-Oj1xjxJn.js → SystemStatus-Bj8-kPt2.js} +1 -1
- package/web/console/assets/{Targets-y1KllVXT.js → Targets-BAfCt_nH.js} +1 -1
- package/web/console/assets/{Tools-DoEP_y9x.js → Tools-xjd0NZdE.js} +1 -1
- package/web/console/assets/{index-CxPIS6G7.js → index-DfJA7iJS.js} +2 -2
- package/web/console/assets/{request-CBLNpLth.js → request-DkNPOweH.js} +1 -1
- package/web/console/assets/{schema-DzwLpuOy.js → schema-CgPWAu1_.js} +1 -1
- package/web/console/index.html +1 -1
- package/web-admin/src/pages/Clients.vue +11 -3
- package/web-admin/src/pages/Routes.vue +282 -16
- package/web-admin/src/pages/Runs.vue +159 -38
- package/web/console/assets/Clients--D7NQJKk.css +0 -1
- package/web/console/assets/Clients-DS29eUi2.js +0 -3
- package/web/console/assets/Routes-DSEvGujN.js +0 -124
- package/web/console/assets/Routes-DWGQN5Pv.css +0 -1
- package/web/console/assets/Runs-B-TsYZEt.js +0 -3
- package/web/console/assets/Runs-CUtSsPW-.css +0 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Agent Client Runtime v1
|
|
2
|
+
|
|
3
|
+
本版本化接口让已完成 Agent Auth 网页授权的本地智能体在本地承担规划,同时继续复用 BailingHub 的身份重验、工具治理、审批、审计与对话总账。它不替代现有 `/run`、聊天入口或执行器协议。配套的部署、业务授权页和宿主接入步骤见 [Agent Client v1 接入指南](AGENT_CLIENT_QUICKSTART.md),身份授权契约见 [Agent Auth v1](AGENT_AUTH_API.md)。
|
|
4
|
+
|
|
5
|
+
所有接口只接受 `Authorization: Bearer <Agent access token>`,响应均 `Cache-Control: no-store`。工作区授权面始终取以下交集:Client `allowed_routes` ∩ Agent Session `allowed_routes` ∩ 启用且 audience 允许的 route ∩ `tools.agent_direct`。`agent_client.enabled=false` 只关闭本页接口,不关闭旧 `/agent-api/v1/tools`。
|
|
6
|
+
|
|
7
|
+
## 端点
|
|
8
|
+
|
|
9
|
+
- `GET /agent-api/v1/workspaces`
|
|
10
|
+
- `GET /agent-api/v1/workspaces/:route/bootstrap`
|
|
11
|
+
- `POST /agent-api/v1/workspaces/:route/turns`
|
|
12
|
+
- `POST /agent-api/v1/workspaces/:route/capabilities/search`
|
|
13
|
+
- `POST /agent-api/v1/runs/:run_id/complete`
|
|
14
|
+
- 工具执行继续使用 `POST /agent-api/v1/tool-invocations` 与既有 resume 端点。
|
|
15
|
+
|
|
16
|
+
`turns` 与 `complete` 的原始 JSON 请求上限为 512 KiB。该上限可覆盖 64000 字符 Unicode 文本的 JSON 编码、Turn 的 16 KiB `page_context` 以及合理 envelope;解析后仍按各字段的字符上限严格校验。
|
|
17
|
+
|
|
18
|
+
## 工具审批语义
|
|
19
|
+
|
|
20
|
+
`tools.agent_direct.write_tools` 只负责按精确 operationId 开放本地 Agent 可调用的写工具;工具是否需要审批默认继续以业务侧 ACC 的 `risk`、`approval.required` 和 `approval.when` 声明为准。路由只有把工具精确列入 `tools.agent_direct.force_approval_tools` 时,才会在 ACC 之外额外强制审批。高风险、ACC 明示审批和条件审批不会被路由覆盖掉。
|
|
21
|
+
|
|
22
|
+
早期私有候选的 `unattended_write_tools` 仅保留兼容读取:存在该字段时,`write_tools` 中未列入它的工具仍按旧语义强制审批。新配置不得与 `force_approval_tools` 同时使用;删除旧字段表示默认继承 ACC,迁移为新字段时应填写旧 `write_tools` 与 `unattended_write_tools` 的差集,而不是原样复制旧列表。
|
|
23
|
+
|
|
24
|
+
## Bootstrap
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"schema_version": "bailing.agent-runtime-profile.v1",
|
|
29
|
+
"workspace": { "route": "tenant-agent", "name": "门店助手", "description": "" },
|
|
30
|
+
"profile": {
|
|
31
|
+
"revision": "<sha256>",
|
|
32
|
+
"instructions": "【路由系统规则】\n...\n\n【本地 Agent 补充规则】\n...",
|
|
33
|
+
"memory": { "recent_messages": 12, "recent_budget_chars": 8000, "per_message_chars": 2000, "summary_enabled": false, "summary_max_chars": 1200 },
|
|
34
|
+
"knowledge": { "enabled": true, "sources": 1, "mode": "chunk", "top_k": 5, "max_docs": 4, "page_boost": false },
|
|
35
|
+
"governance": {
|
|
36
|
+
"planner": "local_agent",
|
|
37
|
+
"execution": "bailinghub_governed",
|
|
38
|
+
"authorization": "server_revalidated",
|
|
39
|
+
"knowledge_trust": "reference_only",
|
|
40
|
+
"tool_results_trust": "untrusted_data",
|
|
41
|
+
"hidden_reasoning_sync": false,
|
|
42
|
+
"max_tool_calls": 5,
|
|
43
|
+
"permission": "full"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"capabilities": { "revision": "<sha256>", "authorized_total": 312, "active_limit": 8, "readonly": 311, "writes": 1, "approval_required": 0 }
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Bootstrap 只逐字段抽取 `target_config.system_prompt`,再拼接可选 `agent_client.instructions`。不会返回 `credential`、`model`、其他 `target_config`、ToolProvider base URL/secret 或业务工具出站配置。
|
|
51
|
+
|
|
52
|
+
## Turn
|
|
53
|
+
|
|
54
|
+
请求的四个标识/输入字段必填;`page_context` 与 `renderers` 可选。未知字段拒绝。
|
|
55
|
+
`user_input` 最多 64000 字符;`renderers` 最多 20 个,名称必须合法且不能重复。客户端文本出现不允许的控制字符、超长或非法 renderer 时直接返回 `400`,服务端不会截断、替换或静默丢弃。
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"client_conversation_id": "local-conversation-1",
|
|
60
|
+
"client_turn_id": "turn-1",
|
|
61
|
+
"user_message_id": "message-1",
|
|
62
|
+
"user_input": "帮我查一下员工 Ada",
|
|
63
|
+
"page_context": { "url": "/staff", "title": "员工" },
|
|
64
|
+
"renderers": ["markdown", "bailing-form.v1"]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"schema_version": "bailing.agent-turn-context.v1",
|
|
71
|
+
"run_id": "<uuid>",
|
|
72
|
+
"profile_revision": "<sha256>",
|
|
73
|
+
"capability_revision": "<sha256>",
|
|
74
|
+
"context": {
|
|
75
|
+
"instructions": "...",
|
|
76
|
+
"page_context": {},
|
|
77
|
+
"renderers": [],
|
|
78
|
+
"memory": { "summary": null, "recent": [] },
|
|
79
|
+
"memory_refs": [{ "thread_id": 7, "summary_upto_id": 0, "prior_messages": 0 }],
|
|
80
|
+
"knowledge": [{ "ref": "knowledge:1", "title": "...", "content": "..." }],
|
|
81
|
+
"knowledge_refs": [{ "ref": "knowledge:1", "doc_id": 9, "title": "...", "score": 0.82 }],
|
|
82
|
+
"governance": { "planner": "local_agent", "execution": "bailinghub_governed", "authorization": "server_revalidated", "knowledge_trust": "reference_only", "tool_results_trust": "untrusted_data", "hidden_reasoning_sync": false, "max_tool_calls": 5, "permission": "full" }
|
|
83
|
+
},
|
|
84
|
+
"active_tools": []
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
同一 Agent Session + route + conversation + turn,以及同一 `user_message_id`,会冻结到同一个 `run_id` 和上下文快照;同键不同请求返回 `409`。服务端先读取本轮之前的 memory,再把用户可见消息追加到总账。
|
|
89
|
+
|
|
90
|
+
能力搜索最多返回 12 个完整 typed tools,schema 为 `bailing.agent-capability-search.v1`。检索只在当前授权集内进行;任一工具源的 embedding 不可用时,整次搜索确定性退回 lexical 排序。
|
|
91
|
+
能力搜索必须提供非空 `query`,或者提供属于当前 Agent Session 与 route 的合法 `run_id`,由服务端回退使用该 run 的 `user_input`。
|
|
92
|
+
|
|
93
|
+
## Complete
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"assistant_message_id": "assistant-message-1",
|
|
98
|
+
"status": "completed",
|
|
99
|
+
"content": "已完成。",
|
|
100
|
+
"model": "optional-model-name",
|
|
101
|
+
"runtime": "optional-runtime-name",
|
|
102
|
+
"usage": { "input_tokens": 120, "cached_input_tokens": 80, "output_tokens": 30, "total_tokens": 150, "tool_calls": 1 }
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`assistant_message_id`、状态、可见正文、model/runtime/usage 共同参与幂等指纹;完全相同的重放返回 `200`,任一字段改变返回 `409`。接口不接收、不同步、也不落库 hidden reasoning。
|
|
107
|
+
`content` 最多 64000 字符,`model` 与 `runtime` 各最多 191 字符;超长或包含不允许控制字符时返回 `400`,不会静默规范化后落库。
|
package/docs/CHANGELOG.en.md
CHANGED
|
@@ -22,6 +22,19 @@ Each public version should describe:
|
|
|
22
22
|
|
|
23
23
|
## Unreleased
|
|
24
24
|
|
|
25
|
+
## v0.5.0 - Revocable Local-Agent Authorization and Governed Local Planning
|
|
26
|
+
|
|
27
|
+
Released on 2026-08-26.
|
|
28
|
+
|
|
29
|
+
- **Agent Auth v1**: adds browser + PKCE authorization in which the business system reuses its existing authenticated session to approve a trusted subject and routes. Access tokens are short-lived, refresh tokens rotate with replay fail-closed behavior, and sessions can be revoked locally or by the business backend.
|
|
30
|
+
- **Agent Client Runtime v1**: the local Agent owns planning and multi-step selection while Core continues to provide bounded prompts, memory, knowledge, and tools and owns identity revalidation, approval, idempotency, business invocation, recovery, and audit.
|
|
31
|
+
- **Constrained capability and approval policy**: the route page adds structured `tools.agent_direct` configuration. Writable tools are exposed by exact operation ID; approval inherits business-side ACC by default, and `force_approval_tools` may only tighten policy.
|
|
32
|
+
- **Visible conversation and trace**: user messages, visible final answers, tool requests, and governance outcomes from local planning enter the Core ledger. Hidden reasoning is not accepted, synchronized, or persisted.
|
|
33
|
+
- **Business-side SDKs**: both the PHP 8.1+ and PHP 7.3-compatible SDKs add the same server-side `AgentAuth` thin client. The Client Token remains only in the business backend and never enters a browser, local plugin, or public configuration.
|
|
34
|
+
- **Database schema**: adds `055_agent_auth.sql` and `056_agent_client_runtime.sql`. Apply every pending migration through the official migrator; do not modify an applied file or copy another instance's state database.
|
|
35
|
+
- **Compatibility**: the new capability is an optional additive surface. Existing `/run`, chat entries, Client API v1, Kernel Host API v1, Executor Protocol, ACC, tool signatures, and final business authorization remain compatible.
|
|
36
|
+
- **Related docs**: [RELEASE_NOTES_v0.5.0.en.md](RELEASE_NOTES_v0.5.0.en.md), [Agent Client v1 Integration Guide](AGENT_CLIENT_QUICKSTART.en.md), [Agent Auth v1](AGENT_AUTH_API.en.md), [Agent Client Runtime v1](AGENT_CLIENT_RUNTIME_API.en.md), and [Compatibility](COMPATIBILITY.en.md).
|
|
37
|
+
|
|
25
38
|
## v0.4.0 - Native Conversational Forms and Chat-Entry Controls
|
|
26
39
|
|
|
27
40
|
Released on 2026-08-25.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,19 @@
|
|
|
15
15
|
|
|
16
16
|
## Unreleased
|
|
17
17
|
|
|
18
|
+
## v0.5.0 - 可撤销本地 Agent 授权与受治理本地编排
|
|
19
|
+
|
|
20
|
+
发布日期:2026-08-26。
|
|
21
|
+
|
|
22
|
+
- **Agent Auth v1**:新增浏览器 + PKCE 授权,由业务系统复用现有登录态批准可信主体和 route;access token 短期有效,refresh token 轮换并对重放失败关闭,会话可由本地或业务后端撤销。
|
|
23
|
+
- **Agent Client Runtime v1**:本地 Agent 负责规划与多步选择;Core 继续提供受限的提示词、记忆、知识和工具面,并负责身份重验、审批、幂等、业务调用、恢复和审计。
|
|
24
|
+
- **能力与审批收敛**:路由页新增 `tools.agent_direct` 结构化配置。可写工具按精确 operationId 开放;审批默认继承业务侧 ACC,`force_approval_tools` 只能额外收紧。
|
|
25
|
+
- **会话和轨迹可见**:本地编排的用户消息、可见最终回复、工具申请和治理结果进入 Core 总账;不接收、不同步也不持久化 hidden reasoning。
|
|
26
|
+
- **业务侧 SDK**:PHP 8.1+ 与 PHP 7.3 兼容 SDK 都增加同语义的服务端 `AgentAuth` 薄客户端。Client Token 仍只存业务后端,不进入浏览器、本地插件或公开配置。
|
|
27
|
+
- **数据库结构**:新增 `055_agent_auth.sql` 和 `056_agent_client_runtime.sql`。升级时必须通过正式迁移器执行全部未应用 migration,不得修改已应用文件或复制其他实例的状态库。
|
|
28
|
+
- **兼容性**:新能力为可选增量接口;现有 `/run`、聊天入口、Client API v1、Kernel Host API v1、Executor Protocol、ACC、工具签名和业务最终授权语义保持兼容。
|
|
29
|
+
- **相关文档**:[RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md)、[Agent Client v1 接入指南](AGENT_CLIENT_QUICKSTART.md)、[Agent Auth v1](AGENT_AUTH_API.md)、[Agent Client Runtime v1](AGENT_CLIENT_RUNTIME_API.md) 与[兼容性与升级](兼容性与升级.md)。
|
|
30
|
+
|
|
18
31
|
## v0.4.0 - 原生对话表单与聊天入口控制
|
|
19
32
|
|
|
20
33
|
发布日期:2026-08-25。
|
|
@@ -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.
|
|
10
|
+
- Stable baseline: `v0.5.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.
|
|
35
|
+
The installer pulls the official `v0.5.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.
|
|
49
|
+
git clone --depth 1 --branch v0.5.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.
|
|
170
|
+
- [Current stable release notes](RELEASE_NOTES_v0.5.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.
|
|
10
|
+
- 稳定基线:`v0.5.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.
|
|
35
|
+
脚本默认拉取 `v0.5.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.
|
|
49
|
+
git clone --depth 1 --branch v0.5.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.
|
|
170
|
+
- [当前稳定版发布说明](RELEASE_NOTES_v0.5.0.md)。
|
|
171
171
|
|
|
172
172
|
扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
|
|
173
173
|
|
package/docs/README.en.md
CHANGED
|
@@ -10,6 +10,12 @@ This directory contains public documentation for the open-source BailingHub proj
|
|
|
10
10
|
| [DEMO.en.md](DEMO.en.md) | Docker demo walkthrough: hub, MySQL, demo business system, tool provider, audit, and trace. |
|
|
11
11
|
| [INDEPENDENT_VALIDATION.en.md](INDEPENDENT_VALIDATION.en.md) | Independent Docker demo task with objective pass criteria and a standard report path. |
|
|
12
12
|
| [INDEPENDENT_VALIDATION.md](INDEPENDENT_VALIDATION.md) | Chinese independent validation task. |
|
|
13
|
+
| [AGENT_CLIENT_QUICKSTART.en.md](AGENT_CLIENT_QUICKSTART.en.md) | End-to-end Agent Client setup and configuration ownership. |
|
|
14
|
+
| [AGENT_CLIENT_QUICKSTART.md](AGENT_CLIENT_QUICKSTART.md) | Chinese Agent Client integration guide. |
|
|
15
|
+
| [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | Agent Auth v1, PKCE, trusted business identity, and revocation. |
|
|
16
|
+
| [AGENT_AUTH_API.md](AGENT_AUTH_API.md) | Chinese Agent Auth v1 protocol. |
|
|
17
|
+
| [AGENT_CLIENT_RUNTIME_API.en.md](AGENT_CLIENT_RUNTIME_API.en.md) | Agent Client Runtime v1 workspaces, turns, tools, and completion contract. |
|
|
18
|
+
| [AGENT_CLIENT_RUNTIME_API.md](AGENT_CLIENT_RUNTIME_API.md) | Chinese Agent Client Runtime v1 contract. |
|
|
13
19
|
| [user-guide/README.en.md](user-guide/README.en.md) | User and product-owner guide: business goals, console concepts, and scenario-based setup. |
|
|
14
20
|
| [CONTRACT.en.md](CONTRACT.en.md) | Stable HTTP and wire contract between business systems and the hub. |
|
|
15
21
|
| [INTEGRATION.en.md](INTEGRATION.en.md) | Third-party integration guide for tools, signatures, authorization, and callback handling. |
|
|
@@ -99,8 +105,8 @@ This directory contains public documentation for the open-source BailingHub proj
|
|
|
99
105
|
| [RELEASE_NOTES_v0.3.3.md](RELEASE_NOTES_v0.3.3.md) | Chinese `v0.3.3` release notes. |
|
|
100
106
|
| [RELEASE_NOTES_v0.3.4.en.md](RELEASE_NOTES_v0.3.4.en.md) | `v0.3.4` anonymous-preview and trusted-business-identity guidance. |
|
|
101
107
|
| [RELEASE_NOTES_v0.3.4.md](RELEASE_NOTES_v0.3.4.md) | Chinese `v0.3.4` release notes. |
|
|
102
|
-
| [RELEASE_NOTES_v0.
|
|
103
|
-
| [RELEASE_NOTES_v0.
|
|
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
|
+
| [RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md) | Chinese `v0.5.0` release notes. |
|
|
104
110
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | First public release notes. |
|
|
105
111
|
| [CHANGELOG.en.md](CHANGELOG.en.md) | Public changelog format and current release summary. |
|
|
106
112
|
| [COMPATIBILITY.en.md](COMPATIBILITY.en.md) | Versioning, compatibility, migration, and schema discipline. |
|
package/docs/README.md
CHANGED
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
| [DEMO.en.md](DEMO.en.md) | English Docker demo walkthrough. |
|
|
15
15
|
| [INDEPENDENT_VALIDATION.md](INDEPENDENT_VALIDATION.md) | 陌生开发者仅凭公开资料验证 Docker demo 的任务卡、通过标准与反馈方式。 |
|
|
16
16
|
| [INDEPENDENT_VALIDATION.en.md](INDEPENDENT_VALIDATION.en.md) | English independent validation task, pass criteria, and report path. |
|
|
17
|
+
| [AGENT_CLIENT_QUICKSTART.md](AGENT_CLIENT_QUICKSTART.md) | 智能体客户端从 Core、业务授权页、通用 SDK 到本地宿主插件的完整接入路径。 |
|
|
18
|
+
| [AGENT_CLIENT_QUICKSTART.en.md](AGENT_CLIENT_QUICKSTART.en.md) | English end-to-end Agent Client integration guide and configuration ownership. |
|
|
19
|
+
| [AGENT_AUTH_API.md](AGENT_AUTH_API.md) | Agent Auth v1:业务登录态绑定、PKCE、Token 交换与会话撤销的语言无关契约。 |
|
|
20
|
+
| [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | English Agent Auth v1 protocol and trusted business-identity boundary. |
|
|
21
|
+
| [AGENT_CLIENT_RUNTIME_API.md](AGENT_CLIENT_RUNTIME_API.md) | Agent Client Runtime v1:工作区、turn、能力搜索、工具执行与完成回传。 |
|
|
22
|
+
| [AGENT_CLIENT_RUNTIME_API.en.md](AGENT_CLIENT_RUNTIME_API.en.md) | English Agent Client Runtime v1 contract. |
|
|
17
23
|
| [user-guide/README.md](user-guide/README.md) | 使用者/产品经理视角:从业务需求出发,理解为什么需要中枢、后台菜单怎么配、配完交给开发者什么。 |
|
|
18
24
|
| [CONTRACT.md](CONTRACT.md) | 业务系统和中枢之间的稳定网络契约,接入前应先读。 |
|
|
19
25
|
| [CONTRACT.en.md](CONTRACT.en.md) | English HTTP and wire contract summary. |
|
|
@@ -112,8 +118,8 @@
|
|
|
112
118
|
| [RELEASE_NOTES_v0.3.3.en.md](RELEASE_NOTES_v0.3.3.en.md) | English `v0.3.3` npm publication provenance-metadata correction. |
|
|
113
119
|
| [RELEASE_NOTES_v0.3.4.md](RELEASE_NOTES_v0.3.4.md) | `v0.3.4` 匿名预览与可信业务身份引导说明。 |
|
|
114
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. |
|
|
115
|
-
| [RELEASE_NOTES_v0.
|
|
116
|
-
| [RELEASE_NOTES_v0.
|
|
121
|
+
| [RELEASE_NOTES_v0.5.0.md](RELEASE_NOTES_v0.5.0.md) | `v0.5.0` 可撤销本地 Agent 授权与受治理本地编排说明。 |
|
|
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. |
|
|
117
123
|
| [RELEASE_NOTES_v0.1.0.md](RELEASE_NOTES_v0.1.0.md) | 首个公开版本的 GitHub Release 草稿。 |
|
|
118
124
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | English release notes. |
|
|
119
125
|
| [CHANGELOG.md](CHANGELOG.md) | 公开发布后的对外变更记录。 |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# BailingHub v0.5.0: Revocable Local-Agent Authorization and Governed Local Planning
|
|
2
|
+
|
|
3
|
+
`v0.5.0` adds Agent Auth v1 and Agent Client Runtime v1. A local Agent may now own understanding, planning, and multi-step tool selection while BailingHub continues to own revocable business identity, route and capability filtering, approvals, idempotency, business invocation, recovery, audit, and the visible conversation ledger. These are optional additive surfaces; they do not replace `/run`, chat entries, or the executor protocol.
|
|
4
|
+
|
|
5
|
+
## Main changes
|
|
6
|
+
|
|
7
|
+
- **Agent Auth v1**: a local SDK starts browser authorization with PKCE S256 and a locked loopback callback. The business system continues to use its own authenticated session, user/tenant/role model, and permission tables when deciding whether to approve.
|
|
8
|
+
- **Revocable Agent Sessions**: access tokens are short-lived, refresh tokens rotate, and replay of an old refresh token fails closed. Core stores only SHA-256 token digests and supports user denial, local revocation, and business-backend session revocation.
|
|
9
|
+
- **Agent Client Runtime v1**: adds workspace discovery, bounded bootstrap, turn snapshots, authorized capability search, governed tool invocation, and visible completion reporting. Prompts, memory, knowledge, and capability configuration remain centrally managed by Core while planning runs locally.
|
|
10
|
+
- **Exact capability and approval semantics**: an effective workspace is the intersection of the client, Agent Session, route audience, and `tools.agent_direct` policies. `write_tools` explicitly exposes writable operation IDs. Approval continues to inherit business-side ACC by default, while `force_approval_tools` may only tighten the policy.
|
|
11
|
+
- **Visible conversation and governance trace**: user messages, visible final answers, tool requests, and governance outcomes enter the Core ledger. Hidden reasoning is neither accepted, synchronized, nor persisted.
|
|
12
|
+
- **Business-side SDKs**: both the PHP 8.1+ and PHP 7.3-compatible SDKs provide the same server-side `AgentAuth` thin client for context, approve, deny, and session revoke. Non-PHP systems may implement the same HTTP contract directly.
|
|
13
|
+
- **Console configuration**: the route page configures `tools.agent_direct` structurally and reads operation ID, scope, read-only status, and ACC approval metadata from the selected tool provider. Writable-tool allowlists cannot use `*`.
|
|
14
|
+
|
|
15
|
+
## Security and responsibility boundaries
|
|
16
|
+
|
|
17
|
+
- The authorization page belongs to the business system. The BailingHub SDK provides server-side methods; it does not inject a universal UI or replace business login and final authorization.
|
|
18
|
+
- The Client Token is supplied only to the business backend. It must not enter browser JavaScript, URLs, local-plugin settings, logs, or screenshots. The local Agent also receives no Tool Provider Secret, business password, cookie, business API address, or model key.
|
|
19
|
+
- Agent Auth binds revocable business identity, device, and routes. It carries no plan, payment, entitlement, or usage semantics.
|
|
20
|
+
- Tool invocation still revalidates the session and policy in BailingHub and follows the existing idempotency, approval, uncertain-outcome freezing, and audit paths. Every business tool endpoint must still verify the request signature and current business permission.
|
|
21
|
+
- Host plugins, the generic Agent SDK/MCP package, and model providers are not bundled with BailingHub Core. Install them independently according to their public compatibility matrices.
|
|
22
|
+
|
|
23
|
+
## Compatibility and upgrade
|
|
24
|
+
|
|
25
|
+
- This release adds `055_agent_auth.sql` and `056_agent_client_runtime.sql`. Back up the state database, upgrade code or images, run `npm run db:init`, and start or switch traffic only after every pending migration succeeds. Never edit an applied migration or copy a state database from another instance.
|
|
26
|
+
- Agent Auth v1 and Agent Client Runtime v1 are additive. Existing `/run`, chat entries, Client API v1, Kernel Host API v1, Executor Protocol, ACC, tickets, tool signatures, and final business authorization remain compatible.
|
|
27
|
+
- Deployments that do not use Agent Client need no authorization page or `tools.agent_direct` configuration. Existing chat-entry and executor flows keep their original behavior.
|
|
28
|
+
- The early private-candidate `unattended_write_tools` field remains read-compatible only. New configuration uses `force_approval_tools`; migrate it with the set-difference rule documented by the public Runtime contract.
|
|
29
|
+
|
|
30
|
+
## Validation
|
|
31
|
+
|
|
32
|
+
The stable release gate requires the complete `npm run release:check`, type checks, focused Core and Agent Auth/Runtime coverage, console builds, database migration checks, bilingual documentation, OSS-boundary and security scans, npm artifact consistency, and a clean-host acceptance flow using only public dependencies. That acceptance covers browser authorization, a read-only invocation, a reversible write, and conversation/trace inspection. Before publication, both source and actual package artifacts must also be checked for private domains, local paths, credentials, and local dependencies.
|
|
33
|
+
|
|
34
|
+
## Related documentation
|
|
35
|
+
|
|
36
|
+
- [Agent Client v1 Integration Guide](AGENT_CLIENT_QUICKSTART.en.md)
|
|
37
|
+
- [Agent Auth v1](AGENT_AUTH_API.en.md)
|
|
38
|
+
- [Agent Client Runtime v1](AGENT_CLIENT_RUNTIME_API.en.md)
|
|
39
|
+
- [Business-side PHP SDK](../sdk/php/README.md) / [PHP 7.3 SDK](../sdk/php7/README.md)
|
|
40
|
+
- [Compatibility and upgrade](COMPATIBILITY.en.md)
|
|
41
|
+
- [中文发布说明](RELEASE_NOTES_v0.5.0.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# BailingHub v0.5.0:可撤销本地 Agent 授权与受治理本地编排
|
|
2
|
+
|
|
3
|
+
`v0.5.0` 新增 Agent Auth v1 与 Agent Client Runtime v1,让本地智能体可以承担理解、规划和多步工具选择,同时继续由 BailingHub 负责可撤销业务身份、route 与能力裁剪、审批、幂等、业务调用、恢复、审计和可见会话总账。这是新增的可选接入面,不替代现有 `/run`、聊天入口或执行器协议。
|
|
4
|
+
|
|
5
|
+
## 主要变化
|
|
6
|
+
|
|
7
|
+
- **Agent Auth v1**:本地 SDK 使用浏览器、PKCE S256 和锁定的 loopback callback 发起授权;业务系统继续使用自己的登录态、用户/租户/角色与权限表决定是否批准。
|
|
8
|
+
- **可撤销 Agent Session**:access token 短期有效,refresh token 逐次轮换,旧 token 重放失败关闭;Core 只持久化 token 的 SHA-256 摘要,并支持用户拒绝、本地撤销和业务后端按 session 撤销。
|
|
9
|
+
- **Agent Client Runtime v1**:提供 workspace 发现、受限 bootstrap、turn 快照、授权能力搜索、治理工具调用和可见结果回传。提示词、记忆、知识库与能力配置仍由 Core 统一管理,规划在本地完成。
|
|
10
|
+
- **精确能力和审批语义**:有效工作区取接入方、Agent Session、route 受众与 `tools.agent_direct` 的交集。`write_tools` 只精确开放可写 operationId;是否需审批默认继承业务侧 ACC,`force_approval_tools` 只能额外收紧。
|
|
11
|
+
- **可见会话与治理轨迹**:本地编排的用户消息、可见最终回复、工具申请与治理结果进入 Core 总账;不接收、不同步、不持久化 hidden reasoning。
|
|
12
|
+
- **业务侧 SDK**:PHP 8.1+ 与 PHP 7.3 兼容 SDK 都提供同语义的服务端 `AgentAuth` 薄客户端,用于 context、approve、deny 和 session revoke。非 PHP 系统可直接实现同一 HTTP 契约。
|
|
13
|
+
- **控制台配置**:路由页可结构化配置 `tools.agent_direct`,并从选定工具源读取 operationId、scope、只读与 ACC 审批元数据;不允许用 `*` 代替可写工具白名单。
|
|
14
|
+
|
|
15
|
+
## 安全与责任边界
|
|
16
|
+
|
|
17
|
+
- 业务授权页属于业务系统。BailingHub SDK 只提供服务端方法,不自动注入通用 UI,也不代替业务登录和最终权限判定。
|
|
18
|
+
- Client Token 只交给业务后端;不进入浏览器 JavaScript、URL、本地插件配置、日志或截图。本地 Agent 也不获取 Tool Provider Secret、业务密码、Cookie、业务 API 地址或模型 Key。
|
|
19
|
+
- Agent Auth 只绑定可撤销业务身份、设备和 route,不承载套餐、付费、权益或用量语义。
|
|
20
|
+
- 工具调用仍由 BailingHub 重验会话和权限面,并经过现有幂等、审批、不确定结果冻结与审计路径;业务工具端点每次仍须验签并查当前权限。
|
|
21
|
+
- 本地宿主插件、通用 Agent SDK/MCP 包和模型提供方不包含在 BailingHub Core 制品中,应按各自公开兼容矩阵独立安装。
|
|
22
|
+
|
|
23
|
+
## 兼容性与升级
|
|
24
|
+
|
|
25
|
+
- 新增 `055_agent_auth.sql` 和 `056_agent_client_runtime.sql`。升级前备份状态库,升级代码或镜像后运行 `npm run db:init`,确认所有未应用 migration 成功后再启动或切流。不得修改已应用 migration 或从其他实例复制状态库。
|
|
26
|
+
- Agent Auth v1 和 Agent Client Runtime v1 是增量接口。原有 `/run`、聊天入口、Client API v1、Kernel Host API v1、Executor Protocol、ACC、票据、工具签名和业务最终授权语义保持兼容。
|
|
27
|
+
- 不使用 Agent Client 的部署无需配置授权页或 `tools.agent_direct`;现有聊天入口和执行器继续按原路径运行。
|
|
28
|
+
- 早期私有候选的 `unattended_write_tools` 仅保留兼容读取。新配置使用 `force_approval_tools`,迁移时按公开 Runtime 文档的差集规则处理。
|
|
29
|
+
|
|
30
|
+
## 验证
|
|
31
|
+
|
|
32
|
+
稳定发布门禁要求完整 `npm run release:check`、类型检查、Core 与 Agent Auth/Runtime 定向测试、控制台构建、数据库迁移、双语文档、OSS 边界、安全扫描、npm 制品一致性,以及从干净宿主安装公开依赖后完成浏览器授权、只读调用、可回滚写入、会话与轨迹回查。发布前还必须检查源码与实际包制品不包含私有域名、本机路径、凭据或本地依赖。
|
|
33
|
+
|
|
34
|
+
## 相关文档
|
|
35
|
+
|
|
36
|
+
- [Agent Client v1 接入指南](AGENT_CLIENT_QUICKSTART.md)
|
|
37
|
+
- [Agent Auth v1](AGENT_AUTH_API.md)
|
|
38
|
+
- [Agent Client Runtime v1](AGENT_CLIENT_RUNTIME_API.md)
|
|
39
|
+
- [业务侧 PHP SDK](../sdk/php/README.md) / [PHP 7.3 SDK](../sdk/php7/README.md)
|
|
40
|
+
- [兼容性与升级](兼容性与升级.md)
|
|
41
|
+
- [English release notes](RELEASE_NOTES_v0.5.0.en.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bailinghub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Open-source ACC runtime and agent control plane for existing business systems.",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"package:artifact:check": "node scripts/check-package-artifact.mjs",
|
|
72
72
|
"prepack": "npm run package:build",
|
|
73
73
|
"security:scan": "node scripts/security-scan.mjs",
|
|
74
|
+
"public-content:denylist:test": "node --test scripts/public-content-denylist.test.mjs",
|
|
74
75
|
"notices:generate": "node scripts/generate-third-party-notices.mjs",
|
|
75
76
|
"notices:check": "node scripts/generate-third-party-notices.mjs --check",
|
|
76
77
|
"assets:generate": "node scripts/generate-readme-assets.mjs",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"oss:verify": "node scripts/verify-oss-export.mjs",
|
|
88
89
|
"release:consistency": "node scripts/check-release-consistency.mjs",
|
|
89
90
|
"release:consistency:test": "node --test scripts/check-release-consistency.test.mjs",
|
|
90
|
-
"release:audit": "npm run release:consistency && npm run release:consistency:test && npm run images:policy:test && npm run security:scan && npm run oss:guard && node scripts/release-audit.mjs && npm run package:artifact:check",
|
|
91
|
+
"release:audit": "npm run release:consistency && npm run release:consistency:test && npm run images:policy:test && npm run public-content:denylist:test && npm run security:scan && npm run oss:guard && node scripts/release-audit.mjs && npm run package:artifact:check",
|
|
91
92
|
"github:verify": "node scripts/verify-github-repo.mjs",
|
|
92
93
|
"release:check": "npm run notices:check && npm run assets:check && npm run audit:deps && npm run client-api:contract && npm run client-api:ecosystem:clone && npm run typecheck && npm test && npm run widget:renderer:test && npm run web-admin:check && npm run docs:check && npm run examples:check && npm run sdk:test && npm run sdk:test7 && npm run sdk:test-node && npm run sdk:test-python && npm run sdk:test-runtime && npm run sdk:test-p1 && npm run release:audit && npm run oss:verify && npm run github:verify",
|
|
93
94
|
"images:build": "sh scripts/publish-images.sh",
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
"title": "名称",
|
|
18
18
|
"description": "后台展示的人类可读名称。"
|
|
19
19
|
},
|
|
20
|
+
"agent_authorize_url": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "uri",
|
|
23
|
+
"maxLength": 2048,
|
|
24
|
+
"title": "Agent 授权页",
|
|
25
|
+
"description": "可选。本地 Agent 发起登录时打开的业务系统授权页 URL;未配置时不开放 Agent Auth。"
|
|
26
|
+
},
|
|
20
27
|
"allowed_routes": {
|
|
21
28
|
"type": "array",
|
|
22
29
|
"items": { "type": "string", "minLength": 1 },
|
|
@@ -198,6 +198,36 @@
|
|
|
198
198
|
"url": { "type": "string" },
|
|
199
199
|
"to": { "type": "string" }
|
|
200
200
|
}
|
|
201
|
+
},
|
|
202
|
+
"agent_direct": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"required": ["enabled"],
|
|
206
|
+
"not": { "required": ["force_approval_tools", "unattended_write_tools"] },
|
|
207
|
+
"properties": {
|
|
208
|
+
"enabled": { "type": "boolean" },
|
|
209
|
+
"write_tools": {
|
|
210
|
+
"type": "array",
|
|
211
|
+
"minItems": 1,
|
|
212
|
+
"uniqueItems": true,
|
|
213
|
+
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$" }
|
|
214
|
+
},
|
|
215
|
+
"force_approval_tools": {
|
|
216
|
+
"description": "Route-level exact operationIds that require approval in addition to the ACC declaration. Omit to inherit ACC approval semantics.",
|
|
217
|
+
"type": "array",
|
|
218
|
+
"minItems": 1,
|
|
219
|
+
"uniqueItems": true,
|
|
220
|
+
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$" }
|
|
221
|
+
},
|
|
222
|
+
"unattended_write_tools": {
|
|
223
|
+
"description": "Deprecated private-candidate compatibility field. When present, every write_tools entry not listed here is forced to approval. Remove it to inherit ACC, or migrate its complement within write_tools to force_approval_tools.",
|
|
224
|
+
"deprecated": true,
|
|
225
|
+
"type": "array",
|
|
226
|
+
"minItems": 1,
|
|
227
|
+
"uniqueItems": true,
|
|
228
|
+
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$" }
|
|
229
|
+
}
|
|
230
|
+
}
|
|
201
231
|
}
|
|
202
232
|
},
|
|
203
233
|
"not": {
|
|
@@ -128,6 +128,17 @@
|
|
|
128
128
|
"title": "对话记忆",
|
|
129
129
|
"description": "路由会话历史装配、逐字窗口和滚动摘要配置。"
|
|
130
130
|
},
|
|
131
|
+
"agent_client": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"title": "本地 Agent Runtime",
|
|
134
|
+
"description": "本地 Agent 编排的显式开关、补充指令和每轮主动工具上限;缺省时兼容 tools.agent_direct.enabled。",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"properties": {
|
|
137
|
+
"enabled": { "type": "boolean" },
|
|
138
|
+
"instructions": { "type": "string", "maxLength": 20000 },
|
|
139
|
+
"active_tool_limit": { "type": "integer", "minimum": 1, "maximum": 12 }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
131
142
|
"budget": {
|
|
132
143
|
"$ref": "common.schema.json#/$defs/budgetPolicy",
|
|
133
144
|
"title": "成本预算闸",
|
|
@@ -101,7 +101,7 @@ const englishCompanions = {
|
|
|
101
101
|
'docs/RELEASE_NOTES_v0.3.2.md': 'docs/RELEASE_NOTES_v0.3.2.en.md',
|
|
102
102
|
'docs/RELEASE_NOTES_v0.3.3.md': 'docs/RELEASE_NOTES_v0.3.3.en.md',
|
|
103
103
|
'docs/RELEASE_NOTES_v0.3.4.md': 'docs/RELEASE_NOTES_v0.3.4.en.md',
|
|
104
|
-
'docs/RELEASE_NOTES_v0.
|
|
104
|
+
'docs/RELEASE_NOTES_v0.5.0.md': 'docs/RELEASE_NOTES_v0.5.0.en.md',
|
|
105
105
|
'docs/TOOLS_DESIGN.md': 'docs/TOOLS_DESIGN.en.md',
|
|
106
106
|
'docs/TOOLS_MODEL.md': 'docs/TOOLS_MODEL.en.md',
|
|
107
107
|
'docs/AI友好工具设计指南.md': 'docs/AI_FRIENDLY_TOOLS.en.md',
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.5.0"
|
|
13
13
|
MYSQL_TAG="${BAILING_MYSQL_IMAGE_TAG:-8.4}"
|
|
14
14
|
MYSQL_IMAGE="${BAILING_MYSQL_IMAGE:-$REGISTRY/$NAMESPACE/bailing-mysql:$MYSQL_TAG}"
|
|
15
15
|
PLATFORM="${BAILING_IMAGE_PLATFORM:-linux/amd64}"
|
|
@@ -38,8 +38,8 @@ function updateJson(root, relativePath, update) {
|
|
|
38
38
|
test('current release surface is internally consistent', () => {
|
|
39
39
|
const result = checkReleaseConsistency({ root: repoRoot });
|
|
40
40
|
assert.deepEqual(result.findings, []);
|
|
41
|
-
assert.equal(result.version, '0.
|
|
42
|
-
assert.equal(result.stableVersion, '0.
|
|
41
|
+
assert.equal(result.version, '0.5.0');
|
|
42
|
+
assert.equal(result.stableVersion, '0.5.0');
|
|
43
43
|
assert.equal(result.publishTag, 'latest');
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -51,13 +51,13 @@ for (const [label, tag] of [
|
|
|
51
51
|
const root = createFixture();
|
|
52
52
|
try {
|
|
53
53
|
updateJson(root, 'package.json', (pkg) => {
|
|
54
|
-
pkg.version = '0.
|
|
54
|
+
pkg.version = '0.5.0-rc.1';
|
|
55
55
|
if (tag === undefined) delete pkg.publishConfig;
|
|
56
56
|
else pkg.publishConfig = { tag };
|
|
57
57
|
});
|
|
58
58
|
updateJson(root, 'package-lock.json', (lock) => {
|
|
59
|
-
lock.version = '0.
|
|
60
|
-
lock.packages[''].version = '0.
|
|
59
|
+
lock.version = '0.5.0-rc.1';
|
|
60
|
+
lock.packages[''].version = '0.5.0-rc.1';
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
const result = checkReleaseConsistency({ root });
|