bailinghub 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +6 -9
- package/README.md +6 -9
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_CLIENT_RUNTIME_API.en.md +46 -0
- package/docs/AGENT_CLIENT_RUNTIME_API.md +34 -0
- package/docs/AGENT_TASK_CONTROL.en.md +25 -0
- package/docs/AGENT_TASK_CONTROL.md +94 -0
- package/docs/AGENT_TASK_CONTROL_FOUNDATION.md +134 -0
- package/docs/CHANGELOG.en.md +11 -1
- package/docs/CHANGELOG.md +11 -1
- package/docs/COMPATIBILITY.en.md +2 -0
- package/docs/CONTRACT.en.md +2 -0
- package/docs/CONTRACT.md +2 -0
- package/docs/GENERATED_ARTIFACTS.en.md +46 -0
- package/docs/GENERATED_ARTIFACTS.md +108 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/INVOCATION_RECEIPTS.md +111 -0
- package/docs/README.en.md +3 -0
- package/docs/README.md +3 -0
- package/docs/RELEASE_NOTES_NEXT.en.md +2 -2
- package/docs/RELEASE_NOTES_NEXT.md +2 -2
- package/docs/RELEASE_NOTES_v0.8.0.en.md +40 -0
- package/docs/RELEASE_NOTES_v0.8.0.md +62 -0
- package/docs/TOOL_RATE_LIMITS.md +50 -0
- package/docs/UPGRADE_v0.8.0.en.md +71 -0
- package/docs/UPGRADE_v0.8.0.md +73 -0
- package/docs//345/205/274/345/256/271/346/200/247/344/270/216/345/215/207/347/272/247.md +2 -0
- package/package.json +1 -1
- package/schemas/config/route.schema.json +1 -0
- package/schemas/config/tool-provider.schema.json +2 -1
- package/scripts/check-doc-links.mjs +1 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +2 -2
- package/scripts/e2e-console.mjs +32 -2
- 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/sql/060_agent_artifacts.sql +11 -0
- package/sql/061_tool_rate_limit_policies.sql +3 -0
- package/sql/062_agent_task_control.sql +92 -0
- package/src/adapters/storage/object-storage.ts +15 -3
- package/src/adapters/storage/oss-signature.test.ts +40 -0
- package/src/adapters/storage/oss-signature.ts +21 -0
- package/src/app/agent-artifacts.test.ts +165 -0
- package/src/app/agent-artifacts.ts +85 -0
- package/src/app/agent-client-runtime.test.ts +76 -1
- package/src/app/agent-client-runtime.ts +13 -0
- package/src/app/agent-invocation-snapshot.ts +35 -0
- package/src/app/agent-task-control.ts +187 -0
- package/src/app/agent-task-runtime.ts +68 -0
- package/src/app/agent-tool-invocations.test.ts +329 -1
- package/src/app/agent-tool-invocations.ts +223 -10
- package/src/app/agent-tool-job.test.ts +11 -1
- package/src/app/agent-tool-job.ts +8 -1
- package/src/app/builtin-tools.ts +4 -0
- package/src/app/oss-edition.ts +1 -0
- package/src/app/tool-approvals.ts +4 -0
- package/src/app/tool-assembly.ts +5 -0
- package/src/core/config/artifact-config.ts +15 -0
- package/src/core/config/config-codec.ts +3 -1
- package/src/core/config/config-models.ts +11 -1
- package/src/core/config/route-config.ts +3 -2
- package/src/core/contracts/tool-rate-limits.test.ts +59 -0
- package/src/core/contracts/tool-rate-limits.ts +48 -0
- package/src/core/contracts/tools.ts +122 -43
- package/src/core/contracts/types.ts +3 -1
- package/src/core/runtime/agent-task-control.test.ts +114 -0
- package/src/core/runtime/agent-task-control.ts +227 -0
- package/src/infrastructure/config/config-agent-artifact-repository.ts +32 -0
- package/src/infrastructure/config/config-agent-client-runtime-repository.ts +7 -1
- package/src/infrastructure/config/config-agent-task-control-journal-mysql.test.ts +315 -0
- package/src/infrastructure/config/config-agent-task-control-mysql.test.ts +331 -0
- package/src/infrastructure/config/config-agent-task-control-repository.ts +640 -0
- package/src/infrastructure/config/config-rate-limit-ledger.integration.test.ts +52 -0
- package/src/infrastructure/config/config-rate-limit-ledger.ts +48 -0
- package/src/infrastructure/config/config-storage-bucket-repository.ts +2 -2
- package/src/infrastructure/config/config-tool-provider-repository.ts +4 -4
- package/src/infrastructure/config/configstore.ts +9 -1
- package/src/routes/admin-agent-tasks.ts +32 -0
- package/src/routes/admin-tool-providers.test.ts +22 -0
- package/src/routes/admin-tool-providers.ts +9 -1
- package/src/routes/admin.ts +3 -0
- package/src/routes/agent-api.test.ts +76 -0
- package/src/routes/agent-api.ts +42 -1
- package/src/routes/agent-artifacts.ts +29 -0
- package/src/routes/agent-task-control-http-mysql.test.ts +246 -0
- package/src/routes/private.ts +1 -0
- package/src/routes/run.ts +2 -1
- package/src/test-support/agent-task-control-mysql-fixture.ts +75 -0
- package/web/console/assets/{Accounts-ChL9k-XA.js → Accounts-BRCR3O0P.js} +1 -1
- package/web/console/assets/AgentClients-Bf7sUUs_.js +1 -0
- package/web/console/assets/AgentClients-i52AI6YV.css +1 -0
- package/web/console/assets/AgentTasks--bqL_QKg.js +2 -0
- package/web/console/assets/AgentTasks-C8ox3TyS.css +1 -0
- package/web/console/assets/{Approvals-Bs6FGbp2.js → Approvals-BIbZvInm.js} +1 -1
- package/web/console/assets/{Audit-4WWYhkFM.js → Audit-KyPSmBdZ.js} +1 -1
- package/web/console/assets/{BrandLockup-D2GhCipL.js → BrandLockup-Sv5DU2G6.js} +1 -1
- package/web/console/assets/{Channels-CmoGpiCJ.js → Channels-B9n4fbxg.js} +1 -1
- package/web/console/assets/{ChatEntries-BFRMtwta.js → ChatEntries-xsOCUXi_.js} +1 -1
- package/web/console/assets/{Clients-DGkkSXyA.js → Clients-CI3DBDHf.js} +1 -1
- package/web/console/assets/{Cost-BmGt0MfS.js → Cost-JgNXQPlN.js} +1 -1
- package/web/console/assets/{Credentials-CR-sYINT.js → Credentials-B5UUUdt0.js} +1 -1
- package/web/console/assets/{Diagnostics-DAPbKSJp.js → Diagnostics-BMGciWQb.js} +1 -1
- package/web/console/assets/{Executors-CgpiT3o8.js → Executors-CRbboOCZ.js} +1 -1
- package/web/console/assets/{Kb-Cm9dVSQw.js → Kb-CgLNGjRp.js} +1 -1
- package/web/console/assets/{Login-CyUcsTZ_.js → Login-C52JmXzx.js} +1 -1
- package/web/console/assets/{Projects-DldFPgWg.js → Projects-CDOvHPVS.js} +1 -1
- package/web/console/assets/{Routes-DubfjlBD.js → Routes-X9vHLpKW.js} +1 -1
- package/web/console/assets/{Runs-1hxgkuR4.js → Runs-DYNDXsqk.js} +1 -1
- package/web/console/assets/{Setup-DBLOnI2_.js → Setup-B91P6i1x.js} +1 -1
- package/web/console/assets/Shell-Bj6C8Hgo.css +1 -0
- package/web/console/assets/Shell-BsRa7bQQ.js +1 -0
- package/web/console/assets/StorageBuckets-CVgpZRWY.css +1 -0
- package/web/console/assets/StorageBuckets-DkuDM0oX.js +1 -0
- package/web/console/assets/{SystemSettings-cDkudo2y.js → SystemSettings-B7Mqj3k1.js} +1 -1
- package/web/console/assets/{SystemStatus-DZd6s8OX.js → SystemStatus-Db93b6dc.js} +1 -1
- package/web/console/assets/{Targets-DYNGq1NU.js → Targets-CuuIYeZO.js} +1 -1
- package/web/console/assets/Tools-CHiqz9XZ.js +2 -0
- package/web/console/assets/Tools-DU8ei6sd.css +1 -0
- package/web/console/assets/index-UGvfF3Xr.js +2 -0
- package/web/console/assets/{request-B7MLvOqo.js → request-DeGya810.js} +1 -1
- package/web/console/assets/{schema-CMuwjYdJ.js → schema-BqlqLw1R.js} +1 -1
- package/web/console/index.html +1 -1
- package/web-admin/scripts/agent-task-control-smoke.mjs +120 -0
- package/web-admin/src/components/AgentSetupPanel.vue +13 -0
- package/web-admin/src/components/ToolRateLimitEditor.vue +28 -0
- package/web-admin/src/layout/Shell.vue +1 -1
- package/web-admin/src/pages/AgentClients.vue +3 -1
- package/web-admin/src/pages/AgentTasks.vue +281 -0
- package/web-admin/src/pages/StorageBuckets.vue +6 -6
- package/web-admin/src/pages/Tools.vue +53 -4
- package/web-admin/src/router.ts +2 -0
- package/web/console/assets/AgentClients-Bs7UgVDj.js +0 -1
- package/web/console/assets/AgentClients-DkgPTEbq.css +0 -1
- package/web/console/assets/Shell-D9Uw-fsa.css +0 -1
- package/web/console/assets/Shell-gJ5Vz_E7.js +0 -1
- package/web/console/assets/StorageBuckets-DkDW16tj.js +0 -1
- package/web/console/assets/StorageBuckets-GnXnVvF0.css +0 -1
- package/web/console/assets/Tools-A20oaMaQ.css +0 -1
- package/web/console/assets/Tools-DpWM59vV.js +0 -2
- package/web/console/assets/index-DGqs28gI.js +0 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# 本地智能体附件空间:让生成结果进入业务流程
|
|
2
|
+
|
|
3
|
+
配套版本:Core 0.8.0 / SDK 0.6.0 / DSH 0.6.0。新能力需部署方升级并按宿主契约接入;业务权限、审批和原身份约束保持。
|
|
4
|
+
|
|
5
|
+
## 解决什么问题
|
|
6
|
+
|
|
7
|
+
本地智能体已经能生成图片,但生成结果往往停留在客户端目录中。需要交给业务系统使用时,用户还要下载、上传,再把地址贴回对话。
|
|
8
|
+
|
|
9
|
+
附件空间连接“本地生成结果”和“业务可用地址”:宿主登记当前会话获准使用的图片,智能体按引用选择附件和目标授权,中枢保存图片并返回 URL。智能体随后可把地址交给已经接入的业务工具,无需用户手动搬运。
|
|
10
|
+
|
|
11
|
+
首期交付会话级图片登记、受控上传和原上传结果恢复,支持 PNG、JPEG、WebP。名称中的“附件”描述通用用途,不表示本期已支持 PDF、Word、视频或所有文件格式。
|
|
12
|
+
|
|
13
|
+
| 场景 | 附件空间解决的步骤 | 业务工具负责的步骤 |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| 制作活动海报 | 保存海报并取得可用地址 | 把地址设为活动页或内容封面 |
|
|
16
|
+
| 生成经营图表 | 保存 PNG 图表并取得可用地址 | 将图表关联到报告或运营页面 |
|
|
17
|
+
| 维护商城商品 | 保存多张商品展示图并逐项返回结果 | 设置主图、轮播图或其他图片字段 |
|
|
18
|
+
|
|
19
|
+
这些业务动作需要对应系统已经提供接收图片 URL 的能力,不是中枢内置的业务接口。图片生成服务仍由客户端选用。
|
|
20
|
+
|
|
21
|
+
## 上传完成后发生什么
|
|
22
|
+
|
|
23
|
+
流程为:生成图片 → 登记会话附件 → 上传到所选授权对应的存储 → 取得 ready URL。到这里附件上传已完成,后续业务操作可以直接使用这些 URL。
|
|
24
|
+
|
|
25
|
+
正常成功后不需要为了每次使用而重复查询或上传。只有上传结果不确定、重新打开会话需要恢复回执时,才查询原上传记录。批量上传返回逐项结果,已成功项复用原地址,失败项按原记录恢复。
|
|
26
|
+
|
|
27
|
+
业务工具调用是独立动作,沿用原授权和审批规则,是否完成以业务回执为准。例如设置完整图片列表前先确认所需图片全部 ready,并保留用户未要求删除的已有图片。
|
|
28
|
+
|
|
29
|
+
## 管理员在哪里开启
|
|
30
|
+
|
|
31
|
+
1. 在“媒体存储”登记普通 COS 或 OSS:桶名、地域、凭据、公开访问地址、写入前缀。OSS 使用 V4 签名,地域如 `cn-shanghai`;COS 如 `ap-shanghai`。自定义 endpoint 留空即可;填写时须为完整桶访问主机,包含桶名。
|
|
32
|
+
2. 打开“智能体客户端 → 配置接入 → 工具与审批”,选择工作空间,在“生成图片上传”启用并选择已登记存储。
|
|
33
|
+
3. 客户端安装配套 SDK/DSH,接入生成产物目录与持久恢复记录。业务工具自身仍在原工具源、scope、写操作清单和审批规则中配置。
|
|
34
|
+
|
|
35
|
+
也支持显式登记服务器本地存储。用于本能力时填写能访问该实例 `/uploads` 的完整公开地址;不会因桶缺失或停用自动换到其他存储。
|
|
36
|
+
|
|
37
|
+
文件保留由私有化部署方管理,本功能不设置到期时间,不随会话结束或授权撤销清理文件。没有额外“永久保存”判定。第一期用于公开展示图片;上传对象采用公开读取,不要用来上传私有文档。
|
|
38
|
+
|
|
39
|
+
工作空间配置示例:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"agent_client": {
|
|
44
|
+
"enabled": true,
|
|
45
|
+
"artifact_upload": {
|
|
46
|
+
"enabled": true,
|
|
47
|
+
"bucket": "agent-attachments",
|
|
48
|
+
"max_bytes": 6291456,
|
|
49
|
+
"allowed_mimes": ["image/png", "image/jpeg", "image/webp"]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
默认关闭。第一期 PNG/JPEG/WebP,单图不超过 6 MiB,客户端每批最多 8 张,可配置更小上限。实际文件头、摘要、字节数与声明不符会拒绝;不接收路径、任意远端 URL 或模型上下文中的 base64 文件。
|
|
56
|
+
|
|
57
|
+
## 接口与恢复契约
|
|
58
|
+
|
|
59
|
+
认证使用原 Agent Session Bearer。每次请求重新校验接入方、会话、workspace 与 audience;SDK/DSH 进一步固定并整组验证用户显式选定的授权,任何原成员失效都不切换默认或降级子集。
|
|
60
|
+
|
|
61
|
+
- `POST /agent-api/v1/workspaces/{workspace}/artifacts/{upload_id}`:原始图片字节;`Content-Type` 为 MIME。`x-bailing-artifact` 是下列 JSON 的 UTF-8 base64url 编码(只编码小型元数据,文件不编码进正文)。
|
|
62
|
+
- `GET` 同一路径:查询原上传结果。上传 ID 为 64 位小写十六进制。查询不创建业务 run,不执行业务操作。
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"name": "campaign-banner.png",
|
|
67
|
+
"mime": "image/png",
|
|
68
|
+
"bytes": 12345,
|
|
69
|
+
"sha256": "<64位文件摘要>",
|
|
70
|
+
"client_conversation_id": "<原会话关联>",
|
|
71
|
+
"client_turn_id": "<原轮次关联>"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
可附 `run_id`,必须属于同一原 Session、workspace、会话和轮次。没有业务 run 时可直接上传,以会话/轮次关联记录,上传不会向其他系统广播正文或创建业务 run。
|
|
76
|
+
|
|
77
|
+
`artifact_run_turn_mismatch` 是严格限定的拒绝原因:Core 已确认该 run 属于同一原 Agent Session、接入方、workspace 和会话,且 run 的轮次有效,但与上传轮次不同。此请求在上传记录预留和文件存储之前被拒绝;错误回执不会返回其他轮次的标识或正文。缺失 run、身份/路由/会话不符或旧 run 缺少有效轮次,仍返回 `artifact_run_mismatch`。
|
|
78
|
+
|
|
79
|
+
配套 DSH 仅在收到这个精确错误、查询原 upload_id 明确不存在、原身份和文件仍有效时,才持久保存纠正记录:保留原上传 ID、内容、目标、会话与轮次,移除被确认属于另一轮的可选 run 关联,再补传同一上传。原本地记录仍保留。已有 ready/pending 回执、网络结果不明、泛化 `artifact_run_mismatch` 或恢复记录损坏均不能触发该纠正;上传成功不代表业务动作已执行。旧 SDK 未识别新错误时应保持阻断,升级配套候选后再恢复。
|
|
80
|
+
|
|
81
|
+
返回 `schema_version=bailing.agent-artifact.v1`、原标识/元数据、`visibility=public`、`state=ready|pending`。ready 包含 URL 与 `next_action=use_url`;pending 为 `retry_same_upload`。资源记录不返回桶配置、密钥或服务端诊断正文。
|
|
82
|
+
|
|
83
|
+
同一 Session 的同一 upload_id 固定元数据、内容与存储目标。相同请求重放返回原记录;更换内容或目标返回冲突。网络回包丢失先 GET;ready 直接使用原 URL,pending/未写入才补传原文件。若文件已保存但数据库确认失败,补传可能再次 PUT 同一对象键和相同字节,不生成另一条图片引用;若桶启用版本管理,可能留下存储版本,这是存储层行为。
|
|
84
|
+
|
|
85
|
+
| 错误 | 下一步 |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| artifact_upload_pending / 网络中断 | 查询原 upload_id;必要时补传同一文件到原授权 |
|
|
88
|
+
| artifact_content_mismatch / artifact_type_not_allowed / artifact_too_large | 修正文件或配置;不要把无效数据当成功 |
|
|
89
|
+
| artifact_conflict / artifact_storage_changed | 保留原记录,核对原文件或存储配置,不自动换桶 |
|
|
90
|
+
| artifact_run_turn_mismatch | 使用配套 DSH 的原记录纠正流程;不改文件名、不换授权或新建上传 ID |
|
|
91
|
+
| artifact_run_mismatch | 原执行关联无法确认;保持阻断,不根据错误猜测图片来源或移除关联 |
|
|
92
|
+
| artifact_upload_disabled / artifact_storage_unavailable | 在上述集中入口检查开关与存储 |
|
|
93
|
+
| artifact_unsupported | 安装配套版本;已有业务工具流程不受影响 |
|
|
94
|
+
| 授权失效 | 阻断本会话整组;不换授权重试 |
|
|
95
|
+
|
|
96
|
+
## 升级边界
|
|
97
|
+
|
|
98
|
+
新增 `sql/060_agent_artifacts.sql`,只增加图片上传记录表;工作空间开关保存在既有 agent_client JSON 中。自用实例部署时按原迁移流程应用 060。商业 Host 须单独评估配置仓储、租户迁移清单与版本 pin;旧宿主缺少可选 agentArtifacts 仓储时明确 unsupported,不自动部署或迁移其他环境。
|
|
99
|
+
|
|
100
|
+
商城等业务后端如果已经接收图片 URL,无须为这条链路改变能力声明或审批规则。生成文件的识别、读取与目录持久化由客户端宿主负责,不能假定远端中枢能读取客户端电脑的路径。其他 MCP 宿主/执行器需要各自适配,不因 SDK 新增接口自动获得本地文件权限。
|
|
101
|
+
|
|
102
|
+
## 与附件上传分开跟踪的已知问题
|
|
103
|
+
|
|
104
|
+
本次配套候选已补齐[工具限额配置与原调用恢复](TOOL_RATE_LIMITS.md):按原时间窗口计数,支持继承、自定义或关闭中枢单工具限额;可重试的出站前拒绝保留原参数。恢复仍使用原 invocation,结果不确定的写操作不重发,旧调用丢失的参数也不会被猜补。这不改变 ready 附件的 URL。
|
|
105
|
+
|
|
106
|
+
DSH 的附件列表源错误目前也可能被通用分类简化为 unknown_failure;上传逐项回执不受该提示问题影响。对应候选仍按这两类结果分别验收,不承诺任意业务批量任务自动完成。
|
|
107
|
+
|
|
108
|
+
OSS V4 按[官方签名说明](https://www.alibabacloud.com/help/en/oss/developer-reference/recommend-to-use-signature-version-4)实现,并与官方 ali-oss 6.23.0 的合成签名向量交叉核验。真实桶连通性在部署方配置存储后验收。
|
|
@@ -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.8.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.8.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.8.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.8.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.8.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.8.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.8.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.8.0.md)。
|
|
171
171
|
|
|
172
172
|
扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
|
|
173
173
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# 原调用只读回执 / Read-only invocation receipts
|
|
2
|
+
|
|
3
|
+
## 中文使用说明
|
|
4
|
+
|
|
5
|
+
配套版本:Core 0.8.0 / SDK 0.6.0 / DSH 0.6.0。新能力需部署方升级并按宿主契约接入;业务权限、审批和原身份约束保持。
|
|
6
|
+
|
|
7
|
+
比如,智能体为商城商品提交了上架请求,用户已批准,但客户端还没有继续执行。此时“看看进度”应只显示“已批准,尚未执行”。另一个常见场景是修改商品后连接中断,智能体需要查看原记录,判断中枢是否已经收到了结果。
|
|
8
|
+
|
|
9
|
+
本接口只查看原调用的结果、当前审批和执行日志。查询不执行上架、不消耗审批,也不改变原调用状态。`resume` 仍可能继续原操作,不能用来替代只读查询。回执中的 `business_operation_performed: false` 只表示这次查询没有执行业务,不表示原操作从未执行。
|
|
10
|
+
|
|
11
|
+
调用方必须保留原调用 ID 与原授权,查询时仍需通过当前权限校验。中枢全局暂停期间可以查询;授权撤销后不能换另一把授权读取。网络临时故障可以重试同一次查询;原记录找不到或结果仍未知时,应保留原 ID 核对,不能重新创建一次业务操作。
|
|
12
|
+
|
|
13
|
+
这一片无需数据库迁移,需使用配套 Core 和 SDK 候选。它提供后续任务视图需要的查询基础;任务累计预算、任务暂停按钮和 DSH 模型工具另行接入。下面给出具体请求、返回字段与兼容规则。
|
|
14
|
+
|
|
15
|
+
## Contract overview
|
|
16
|
+
|
|
17
|
+
An assistant may lose the confirmation for a product update, or reopen a conversation while a write is waiting for approval. Reading what the Hub already knows must not silently send the update again.
|
|
18
|
+
|
|
19
|
+
Invocation inspection reads the original Hub record, execution journal and approval state. It does not create a run, invoke a tool, consume an approval, decrypt frozen arguments, reserve a dispatch attempt, or change the original invocation state. This is a separate operation from `POST .../resume`, which may perform the original operation's first dispatch after approval or a confirmed rejection before dispatch.
|
|
20
|
+
|
|
21
|
+
## Negotiate support
|
|
22
|
+
|
|
23
|
+
Use the original Agent Session's Bearer token:
|
|
24
|
+
|
|
25
|
+
```http
|
|
26
|
+
GET /agent-api/v1/tool-invocations/inspection-capabilities
|
|
27
|
+
Authorization: Bearer <agent-access-token>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"schema_version": "bailing.agent-invocation-inspection-capabilities.v1",
|
|
33
|
+
"receipt_schema": "bailing.agent-invocation-receipt.v1",
|
|
34
|
+
"read_only": true
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
An older Hub that does not advertise this exact contract is unsupported. Do not substitute `resume`, invoke a replacement operation, or infer support from a package version. Negotiation authenticates the Agent Session without creating a business run or loading a tool catalog.
|
|
39
|
+
|
|
40
|
+
## Read the original receipt
|
|
41
|
+
|
|
42
|
+
```http
|
|
43
|
+
GET /agent-api/v1/tool-invocations/<original-64-hex-invocation-id>/receipt
|
|
44
|
+
Authorization: Bearer <original-agent-access-token>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Both GET endpoints accept no query parameters and return `Cache-Control: no-store`. The receipt endpoint accepts the original identifier only; it does not accept replacement arguments, a new target, a tool name, or a task identifier.
|
|
48
|
+
|
|
49
|
+
Example: an original update is waiting for its explicit continuation after approval:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"schema_version": "bailing.agent-invocation-receipt.v1",
|
|
54
|
+
"read_only": true,
|
|
55
|
+
"business_operation_performed": false,
|
|
56
|
+
"invocation_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
57
|
+
"agent_run_id": "22222222-2222-4222-8222-222222222222",
|
|
58
|
+
"route": "catalog-agent",
|
|
59
|
+
"tool": "product_update",
|
|
60
|
+
"observed_at": "2026-09-15T00:00:00.000Z",
|
|
61
|
+
"result": {
|
|
62
|
+
"schema_version": "bailing.agent-tool-invocation.v1",
|
|
63
|
+
"invocation_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
64
|
+
"route": "catalog-agent",
|
|
65
|
+
"tool": "product_update",
|
|
66
|
+
"state": "awaiting_approval",
|
|
67
|
+
"ok": false,
|
|
68
|
+
"auto_retry_allowed": false,
|
|
69
|
+
"text": "The governed tool invocation is awaiting approval.",
|
|
70
|
+
"approval_id": 1
|
|
71
|
+
},
|
|
72
|
+
"result_source": "job",
|
|
73
|
+
"dispatch_state": "not_dispatched",
|
|
74
|
+
"approval": { "status": "approved", "approval_id": 1 },
|
|
75
|
+
"journal_state": "absent"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The saved result and the latest approval observation intentionally remain distinct. Approval becoming `approved` does not make the business operation successful and inspection does not continue it.
|
|
80
|
+
|
|
81
|
+
## Interpret the observations
|
|
82
|
+
|
|
83
|
+
| Field | Meaning |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| `read_only`, `business_operation_performed` | This request only inspected records. These fields do not claim that the original operation never ran. |
|
|
86
|
+
| `invocation_id`, `agent_run_id`, `route`, `tool` | Original verified coordinates. A new user turn must not replace the original run or target. |
|
|
87
|
+
| `observed_at` | Observation time, not a dispatch permit or an atomic policy decision. |
|
|
88
|
+
| `result` | An allowlisted original invocation result, a projection of journal evidence, or `null` when no valid result is available. Raw job metadata and frozen arguments are excluded. |
|
|
89
|
+
| `result_source` | `job`, `journal`, or `none`. A completed journal can reveal a saved result even when the job still has an older prefix; inspection does not persist this projection. |
|
|
90
|
+
| `dispatch_state` | `not_dispatched` means existing evidence confirms a rejection or wait before dispatch; `attempted` means an execution attempt may have reached the business system; `unknown` means that distinction cannot be verified. `attempted` is not proof that the business system received or completed it. |
|
|
91
|
+
| `approval.status` | `none`, `pending`, `approved`, or `denied`; the latter three include the original `approval_id`. |
|
|
92
|
+
| `journal_state` | `absent`, `dispatching`, `response_recorded`, `completed`, `uncertain`, `evidence_degraded`, or `unknown`. `response_recorded` alone does not promise completion of the original execution evidence. |
|
|
93
|
+
|
|
94
|
+
Unresolved journal evidence projects `reconciliation_required` with `auto_retry_allowed: false`. Inspecting a malformed stored result returns `result: null`, not a fabricated success. A journal whose completion cannot be verified also remains unresolved.
|
|
95
|
+
|
|
96
|
+
The nested result preserves the existing invocation result contract. In particular, an old `auto_retry_allowed: true` describes that original result; it does not authorize the receipt consumer to automatically invoke or resume anything. Explicit continuation remains a distinct governed operation using the original invocation and original parameters.
|
|
97
|
+
|
|
98
|
+
These are observations of separately persisted records. A concurrent operation or approval can progress while they are read. Refresh the receipt to observe later evidence; never convert this read into a claim that it atomically grants or denies a future dispatch.
|
|
99
|
+
|
|
100
|
+
## Authorization and boundaries
|
|
101
|
+
|
|
102
|
+
- The original Agent Session must still be valid, the Client enabled, and the original route and specific tool currently authorized. Historical parameter schemas and execution fingerprints need not stay unchanged merely to inspect existing evidence.
|
|
103
|
+
- The Hub verifies the original job marker, Agent Session, Client, principal, subject and invocation coordinates. If the original runtime run exists, its session, client, route and thread association must also match. A missing historical runtime row is not reconstructed from conversation text.
|
|
104
|
+
- The host must retain and validate its complete original selected authorization set before using the original connection. This receipt API does not independently claim to implement a task's multi-member authorization ledger, cross-Hub access, or administrator audit permissions.
|
|
105
|
+
- Inspection works while the global Hub execution pause is enabled. Pause still blocks invoke and resume. Authentication can update the existing session `last_seen_at`; this does not update business data, invocation state, approval use, or the dispatch journal.
|
|
106
|
+
- Current authorization failure remains a failure. Do not fall back to another Agent Session, default authorization, remaining subset, or an administrator credential.
|
|
107
|
+
- An authenticated `invocation_not_found` is absence of a verifiable original record, not proof that a previous business write did not happen. Keep the original identifiers and inspect the original evidence through an authorized operator; do not issue a replacement write.
|
|
108
|
+
|
|
109
|
+
## Integration scope
|
|
110
|
+
|
|
111
|
+
The standalone receipt addition requires no migration. The later [paired task-control candidate](AGENT_TASK_CONTROL.en.md) builds on it with migration 062, whole-group verification for managed calls, budgets, pause/cancel and host integration. It still does not automatically reconcile unknown outcomes with a business provider. Non-enrolled original invocation behavior remains unchanged.
|
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.8.0.md](RELEASE_NOTES_v0.8.0.md) · [English](RELEASE_NOTES_v0.8.0.en.md) | v0.8.0: long tasks, original receipts, attachments and upgrade boundaries. |
|
|
9
10
|
| [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. |
|
|
10
11
|
| [user-guide/conversations.en.md](user-guide/conversations.en.md) | Multi-account conversations, full-text review and offline recovery for users. |
|
|
11
12
|
| [QUICKSTART.en.md](QUICKSTART.en.md) | Install BailingHub, run the Docker demo, create the first route, and connect the first business tool. |
|
|
@@ -21,7 +22,9 @@ This directory contains public documentation for the open-source BailingHub proj
|
|
|
21
22
|
| [AGENT_SUBJECT_DISPLAY.en.md](AGENT_SUBJECT_DISPLAY.en.md) | Business authorization display names: responsibilities, new approvals and existing-session synchronization. |
|
|
22
23
|
| [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | Agent Auth v1, PKCE, trusted business identity, and revocation. |
|
|
23
24
|
| [AGENT_AUTH_API.md](AGENT_AUTH_API.md) | Chinese Agent Auth v1 protocol. |
|
|
25
|
+
| [INVOCATION_RECEIPTS.md](INVOCATION_RECEIPTS.md) | Candidate: read an original receipt without continuing its business operation. |
|
|
24
26
|
| [AGENT_CLIENT_RUNTIME_API.en.md](AGENT_CLIENT_RUNTIME_API.en.md) | Agent Client Runtime v1 workspaces, turns, tools, and completion contract. |
|
|
27
|
+
| [AGENT_TASK_CONTROL.en.md](AGENT_TASK_CONTROL.en.md) · [Chinese](AGENT_TASK_CONTROL.md) | Core 0.8.0: cumulative task budgets, actual dispatch, pause and SDK/DSH host integration. |
|
|
25
28
|
| [AGENT_CLIENT_RUNTIME_API.md](AGENT_CLIENT_RUNTIME_API.md) | Chinese Agent Client Runtime v1 contract. |
|
|
26
29
|
| [AGENT_CONVERSATION_AUDIT.en.md](AGENT_CONVERSATION_AUDIT.en.md) | Complete visible conversation audit, member confirmation, run ownership and admin pagination. |
|
|
27
30
|
| [AGENT_CONVERSATION_AUDIT.md](AGENT_CONVERSATION_AUDIT.md) | Chinese complete conversation audit protocol. |
|
package/docs/README.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
| 文档 | 用途 |
|
|
10
10
|
|---|---|
|
|
11
|
+
| [RELEASE_NOTES_v0.8.0.md](RELEASE_NOTES_v0.8.0.md) · [English](RELEASE_NOTES_v0.8.0.en.md) | v0.8.0: long tasks, original receipts, attachments and upgrade boundaries. |
|
|
11
12
|
| [RELEASE_NOTES_v0.7.0.md](RELEASE_NOTES_v0.7.0.md) · [English](RELEASE_NOTES_v0.7.0.en.md) | v0.7.0:商城与库存场景、配套升级和限制。 |
|
|
12
13
|
| [user-guide/conversations.md](user-guide/conversations.md) | 普通用户的多账户对话、完整沟通追溯和离线恢复指南。 |
|
|
13
14
|
| [QUICKSTART.md](QUICKSTART.md) | 从零部署百灵中枢,适合准备接入真实业务系统的开发者。 |
|
|
@@ -25,7 +26,9 @@
|
|
|
25
26
|
| [AGENT_SUBJECT_DISPLAY.md](AGENT_SUBJECT_DISPLAY.md) | 业务授权显示名称:三方职责、新授权与旧会话名称同步。 |
|
|
26
27
|
| [AGENT_AUTH_API.md](AGENT_AUTH_API.md) | Agent Auth v1:业务登录态绑定、PKCE、Token 交换与会话撤销的语言无关契约。 |
|
|
27
28
|
| [AGENT_AUTH_API.en.md](AGENT_AUTH_API.en.md) | English Agent Auth v1 protocol and trusted business-identity boundary. |
|
|
29
|
+
| [INVOCATION_RECEIPTS.md](INVOCATION_RECEIPTS.md) | 只读核对原调用、审批与执行日志;与可能继续业务的 resume 分开。 |
|
|
28
30
|
| [AGENT_CLIENT_RUNTIME_API.md](AGENT_CLIENT_RUNTIME_API.md) | Agent Client Runtime v1:工作区、turn、能力搜索、工具执行与完成回传。 |
|
|
31
|
+
| [AGENT_TASK_CONTROL.md](AGENT_TASK_CONTROL.md) · [English](AGENT_TASK_CONTROL.en.md) | Core 0.8.0:跨轮任务额度、实际派发、暂停及 SDK/DSH 宿主接入。 |
|
|
29
32
|
| [AGENT_CLIENT_RUNTIME_API.en.md](AGENT_CLIENT_RUNTIME_API.en.md) | English Agent Client Runtime v1 contract. |
|
|
30
33
|
| [AGENT_CONVERSATION_AUDIT.md](AGENT_CONVERSATION_AUDIT.md) | 完整可见对话审计:逐授权成员确认、幂等文本事件、run 关联和管理员分页读取。 |
|
|
31
34
|
| [AGENT_CONVERSATION_AUDIT.en.md](AGENT_CONVERSATION_AUDIT.en.md) | English complete conversation audit protocol and authorization boundary. |
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Release notes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Core 0.8.0](RELEASE_NOTES_v0.8.0.en.md) · [Upgrade](UPGRADE_v0.8.0.en.md)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Release notes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Core 0.8.0](RELEASE_NOTES_v0.8.0.md) · [Upgrade](UPGRADE_v0.8.0.md)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# v0.8.0 BailingHub release: continue and control longer business tasks
|
|
2
|
+
|
|
3
|
+
Release 0.8.0. Pairing: Core 0.8.0 / Agent Client SDK 0.6.0 / DSH 0.6.0. Changes below are relative to the preceding public release.
|
|
4
|
+
|
|
5
|
+
Maintaining a shop catalog may involve checking inventory, producing images, editing products and waiting for approval. This update connects those steps with clearer discovery, original-call recovery and task controls. Multi-system authorization, subject display names and visible conversation archives were already available in the preceding release.
|
|
6
|
+
|
|
7
|
+
## What changes
|
|
8
|
+
|
|
9
|
+
**Task-wide budgets and controls.** Administrators can fix a task's authorized members, allowed tools, cumulative write-call budget, concurrent permit limit and optional deadline under Agent Clients → Task Control. A new message, tool search or host restart does not reset its budget. A batch operation affecting 20 products counts as one invocation, not 20 objects; a business rejection with a trustworthy response may also consume the write budget. Reads use concurrent permits but not the write budget. Original permissions and per-call approvals remain in force.
|
|
10
|
+
|
|
11
|
+
Pause blocks subsequent dispatch permits; already permitted work may finish. Continuing a task does not increase its budget or automatically continue an invocation. Cancelling prevents further dispatch and does not roll back completed changes.
|
|
12
|
+
|
|
13
|
+
**Inspect without executing.** A product listing can be approved without having been dispatched. A new read-only receipt keeps result, approval and dispatch facts separate. Refreshing it never submits the listing. Explicit continuation retains the original identity, parameters, run and invocation ID. An uncertain dispatched write is inspected rather than replaced. The paired DSH offers durable original-call recovery and panel APIs that work without an active model turn; hosts implement their own UI.
|
|
14
|
+
|
|
15
|
+
**Configurable tool limits.** Tool Providers → Edit → Governance supports inherited, custom or disabled Hub per-tool limits, including individual overrides. Provider-wide, per-tool and client-app gates remain separate. Hour/day limits keep their original windows. The same provider/tool shares its counter across users and conversations. SDK/DSH preserve retry guidance and original invocation recovery without asking the model to reconstruct write arguments.
|
|
16
|
+
|
|
17
|
+
**Local Agent attachment space, image-first.** An adapted host can register generated images or images explicitly selected by the user for business use. The Agent uploads them to operator-configured COS, OSS or explicit local storage and receives URLs for existing business tools—for example, a campaign cover or shop product image. PNG/JPEG/WebP, up to 6 MiB each and 1–8 images per DSH batch, are supported. Successful URLs are reusable; upload and business-action outcomes are separate. Chat attachments are not uploaded automatically. The host owns file access and image generation; the business system supplies the action accepting the URL.
|
|
18
|
+
|
|
19
|
+
Uploads are disabled by default. Configure storage under Agent Clients → Connection Configuration → Tools and Approval → Generated Image Upload. Images are publicly readable in this first phase. Operators manage retention; ending a conversation does not automatically delete objects.
|
|
20
|
+
|
|
21
|
+
**Clearer discovery and longer tool use.** Returned candidates, loaded tools and authorization-filtered catalog counts have separate meanings; unknown totals stay unknown. Ranked discovery is not exhaustive pagination. Paired DSH retains valid tools across searches within a turn. Adapted hosts can opt into declaration reuse across turns of the same living Session. Current target preparation, identity, permission and revision checks still apply.
|
|
22
|
+
|
|
23
|
+
## Who should upgrade
|
|
24
|
+
|
|
25
|
+
| Role | Action |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Hub operator | Upgrade Core, apply unapplied migrations 060–062 and configure optional storage, rate policies and tasks |
|
|
28
|
+
| Client host developer | Upgrade the paired SDK/DSH, persistent stores and public task/receipt APIs; explicitly opt into cross-turn reuse |
|
|
29
|
+
| Business backend developer | Retain current declarations, authorization, approval and APIs; image use requires an existing URL interface or a separate business import operation |
|
|
30
|
+
| Plugin user | Use an adapted host; installing a package alone grants neither file access nor administrative permissions |
|
|
31
|
+
|
|
32
|
+
## Upgrade and boundaries
|
|
33
|
+
|
|
34
|
+
Follow the [paired upgrade guide](UPGRADE_v0.8.0.en.md). Migrations add attachment receipts, rate-limit policies and task records. Use the official migration ledger and retain configuration, encryption material, object storage and host records.
|
|
35
|
+
|
|
36
|
+
Task enrollment creates a persistent requirement on each original Agent Session, including its other conversations. Cancellation does not remove that requirement. Check every relevant host before enrolling dedicated test authorizations. Do not downgrade an enrolled deployment to a Core that does not enforce this marker.
|
|
37
|
+
|
|
38
|
+
The same-Hub, same-audit-domain boundary remains. This is not cross-system transactions, automatic product mapping, full-plan restart, automatic reconciliation of uncertain writes or business rollback. Documents, video and drive management are outside the first attachment release.
|
|
39
|
+
|
|
40
|
+
Component regression, synthetic integration and bounded client acceptance have been completed. Verify the release Tag and actual package provenance when upgrading. Windows device testing and actual user clicks in the latest panel are not covered by this acceptance; no general model reliability or production-adoption claim is made.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# 百灵中枢 v0.8.0:让业务长任务可继续、可控制
|
|
2
|
+
|
|
3
|
+
发布版本:0.8.0。配套:Core 0.8.0 / Agent Client SDK 0.6.0 / DSH 0.6.0。相对上一公开版本的变化如下。
|
|
4
|
+
|
|
5
|
+
用户让助手整理一批商城商品,过程中可能先查库存、生成展示图、修改商品,再等待业务审批。对话变长后,开发者需要解决的不只是“能不能调用接口”,还包括工具切换是否顺畅、中断后如何核对,以及管理员如何控制整项任务。
|
|
6
|
+
|
|
7
|
+
这一轮更新围绕这些步骤完善中枢和配套客户端。多系统授权、授权主体名称和完整可见对话在上一公开版已经提供,本次延续这些能力。
|
|
8
|
+
|
|
9
|
+
## 更新了什么
|
|
10
|
+
|
|
11
|
+
### 一个任务,跨轮次累计额度
|
|
12
|
+
|
|
13
|
+
管理员可在“智能体客户端 → 任务控制”为任务固定授权成员、允许使用的工具、累计写调用上限、在途许可上限和可选截止时间。例如“核对库存并维护商城商品,最多 20 次写调用”。切换工具、发送下一条消息或重开客户端,不会重新获得一份任务额度。
|
|
14
|
+
|
|
15
|
+
写额度按原业务调用计数,不按商品数或成功次数计数:一个批量接口修改 20 件商品,仍是一笔调用。读操作不消耗写额度,但占用在途许可。已有业务权限和逐笔审批继续生效。
|
|
16
|
+
|
|
17
|
+
暂停阻止后续派发;已经取得许可的请求可能完成。继续任务不增加额度,也不自动继续任何原操作。取消停止后续派发,不能撤回已发生的业务变化或自动回滚。
|
|
18
|
+
|
|
19
|
+
### 核对结果不会顺带执行
|
|
20
|
+
|
|
21
|
+
“商品上架已批准”和“商品已上架”是两件事。新增只读原调用回执,管理端与已适配宿主可以核对执行、审批和派发记录,刷新状态不会提交上架。
|
|
22
|
+
|
|
23
|
+
用户明确继续时,仍使用原授权、参数、运行记录和调用 ID。写请求已经发出而结果未知时,只核对原记录,不另建一次写操作。配套 DSH 提供会话重开后的持久恢复,以及无活跃对话轮次时的面板核对和继续接口;具体界面由客户端宿主接入。
|
|
24
|
+
|
|
25
|
+
### 限额可以按部署规模设置
|
|
26
|
+
|
|
27
|
+
“工具源 → 编辑 → 治理”支持继承业务声明、自定义或关闭中枢单工具限额,并可覆盖指定工具。工具源总闸、单工具限额和接入方限额分别生效。
|
|
28
|
+
|
|
29
|
+
小时、日限额按原时间窗口计算,不再折算为更小的每分钟额度。相同工具源下同一工具由多个用户与会话共享计数。限流等待提示通过 SDK/DSH 传递;明确未派发的可恢复操作继续使用原调用,不要求模型重新拼写入参数。
|
|
30
|
+
|
|
31
|
+
### 本地智能体附件空间,首期支持图片
|
|
32
|
+
|
|
33
|
+
助手可以把生成的活动海报、经营图表,或用户明确指定用于业务的图片,上传到部署方配置的普通 COS、OSS 或显式本地存储,取得 URL 后交给已有业务工具使用。例如把图片设为商城商品主图,或交给内容系统作为活动封面。
|
|
34
|
+
|
|
35
|
+
首期支持 PNG/JPEG/WebP,单图最高 6 MiB,配套 DSH 每批 1–8 张。上传逐项返回结果,成功地址可以直接复用。普通聊天附件不会自动上传;上传成功和业务修改成功分别判断。图片生成服务、业务图片接口和客户端文件权限仍由各自系统提供。
|
|
36
|
+
|
|
37
|
+
上传默认关闭,在“智能体客户端 → 配置接入 → 工具与审批 → 生成图片上传”选择存储并启用。首期对象公开读取,文件保留由部署方管理,不随会话结束自动删除。
|
|
38
|
+
|
|
39
|
+
### 能力发现与错误更容易理解
|
|
40
|
+
|
|
41
|
+
搜索返回数量、当前加载数量和授权目录数量分别表达;无法确定的总数保持未知。搜索是有上限的相关候选检索,不代表完整遍历。
|
|
42
|
+
|
|
43
|
+
配套 DSH 在一轮内保留仍有效的工具;已适配宿主还可启用同一存活会话内的跨轮声明复用。例如“创建商品→查询库存→继续编辑商品”不必因一次新搜索就丢掉前面的工具。每轮仍按需准备当前目标,工具声明缓存不替代授权和权限检查。
|
|
44
|
+
|
|
45
|
+
## 谁需要升级
|
|
46
|
+
|
|
47
|
+
| 使用者 | 需要做什么 |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| 中枢管理员 | 升级 Core、应用未执行的 060–062 迁移;按需配置存储、频率限额和任务控制 |
|
|
50
|
+
| 客户端宿主开发者 | 成套升级 SDK/DSH,接入持久记录、正式任务和原调用接口;跨轮复用需要显式启用 |
|
|
51
|
+
| 业务后端开发者 | 既有声明、授权、审批和业务 API 可沿用;图片使用仍须业务接口能接收 URL,或提供自己的素材导入能力 |
|
|
52
|
+
| 普通插件使用者 | 使用已完成这些接入的宿主;仅升级包不会自动取得本地文件或新增管理权限 |
|
|
53
|
+
|
|
54
|
+
## 升级和限制
|
|
55
|
+
|
|
56
|
+
先看[配套升级指南](UPGRADE_v0.8.0.md)。新增迁移分别保存附件回执、限额策略和任务控制记录。使用正式迁移器检查账本,仅执行未应用文件;保留实例配置、密钥、原存储及客户端持久记录。
|
|
57
|
+
|
|
58
|
+
任务控制按需启用,但纳入任务会为原 Agent Session 设置持续强制标记,影响该授权的其他会话;取消任务也不会解除。先确认全部相关宿主兼容,再用专用测试授权启用。启用后不可回退到不理解该标记的旧 Core。
|
|
59
|
+
|
|
60
|
+
边界仍是同一 Hub、同一审计域。没有跨系统事务、自动商品对应、整项计划自动续跑、未知写结果自动补偿或业务回滚。附件首期不包含文档、视频或网盘管理。
|
|
61
|
+
|
|
62
|
+
已完成分组件回归、合成联测和限定客户端接入核对;发行制品需与对应 Tag 及安装摘要一致。Windows 实机及最新面板的实际用户点击尚未覆盖,不据此宣称任意模型或生产场景都已通过。
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 批量业务操作的限额与恢复
|
|
2
|
+
|
|
3
|
+
例如智能体需要批量更新商城商品资料,管理员可以根据部署规模设置额度。无需修改业务能力声明,也无需取消原有权限与审批。
|
|
4
|
+
|
|
5
|
+
## 在哪里设置
|
|
6
|
+
|
|
7
|
+
进入 **工具源 → 编辑 → 治理**:
|
|
8
|
+
|
|
9
|
+
- **工具源总限额**:该工具源的所有工具、用户、授权与会话,共用每分钟额度。`0` 关闭这一层总闸。
|
|
10
|
+
- **单工具默认策略**:继承业务声明、自定义中枢限额,或关闭中枢单工具限额。
|
|
11
|
+
- **指定工具覆盖**:针对某个工具单独设置,优先于默认策略。“继承业务声明”表示直接使用该工具的声明。
|
|
12
|
+
|
|
13
|
+
自定义支持按秒、分钟、小时或天计数。每个工具分别计数;同一工具源、同一工具的不同用户与会话共享额度,并非每次新建会话获得一份新额度。工具清单详情同时显示原声明、生效限额和来源。刷新清单会保留管理员设置。
|
|
14
|
+
|
|
15
|
+
若要关闭该工具源在中枢的两层工具限额,将总限额设为 `0`,将单工具默认策略设为“关闭中枢单工具限额”,并检查指定工具覆盖。**接入方 → 编辑**中的每分钟限额仍独立生效,它按 `client_app_id` 共享,也支持 `0` 关闭。业务系统自己实施的限流仍由业务系统管理。
|
|
16
|
+
|
|
17
|
+
## 数量代表什么
|
|
18
|
+
|
|
19
|
+
`120 次/小时` 按一小时滑动窗口计数:空窗口中可连续接受 120 次,随后等待最早一笔额度到期。不会折算成每分钟 2 次。计数针对中枢调度闸接受的尝试,不是业务成功数量;接受后进入审批或业务拒绝的尝试也可能占用额度。
|
|
20
|
+
|
|
21
|
+
MySQL 运行时在同一事务中检查工具与工具源两层额度;任一层拒绝,均不增加另一层的计数。内存运行时使用同样的全闸检查。旧扩展若仅实现单桶 `consume` 回调,可继续运行;要获得全闸原子计数,应实现可选 `consumeAll` 接缝。修改配置不主动清空账本,按新窗口及已保留记录计算。
|
|
22
|
+
|
|
23
|
+
## 被限流后如何继续
|
|
24
|
+
|
|
25
|
+
调用尚未派发时,回执仍为 `rejected_before_dispatch`、`auto_retry_allowed=true`,并增加:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"retry_after_ms": 60000,
|
|
30
|
+
"rate_limit": {
|
|
31
|
+
"level": "tool",
|
|
32
|
+
"count": 120,
|
|
33
|
+
"window_sec": 3600,
|
|
34
|
+
"scope": "tool_provider_shared",
|
|
35
|
+
"source": "declaration"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`retry_after_ms` 是当前观察下的等待提示,等待结束后仍会重新核验授权、配置和额度。SDK 保留这些可选字段;DSH 等待后只恢复原 `invocation_id`。等待超过本次自动等待预算时,DSH 返回 `agent_client_wait.state=rate_limited`,保留原调用供稍后恢复,避免高频轮询。
|
|
41
|
+
|
|
42
|
+
Core 在私有执行记录中加密保存原参数,并绑定原授权、run、工具、参数摘要与执行契约。恢复不会让模型重新拼参数。派发前先持久化执行标记;如果写操作可能已发出、但没有可靠结果,则进入 `reconciliation_required`,不重新派发。权限、参数审批与原身份核验照常生效。
|
|
43
|
+
|
|
44
|
+
## 升级与兼容
|
|
45
|
+
|
|
46
|
+
本说明适用于 Core 0.8.0 及配套 SDK/DSH 0.6.0。Core 需执行 `061_tool_rate_limit_policies.sql`;历史配置默认继承原声明。SDK/DSH 配套版本提供等待提示,旧包可忽略新增字段,仍沿用原接口。
|
|
47
|
+
|
|
48
|
+
原参数快照使用实例 `server.token` 派生的专用密钥加密;重启需保留该配置。轮换该令牌后未完成快照无法解密,会严格阻断自动派发。已完成结果与原审批记录仍沿原路径读取。旧版本已丢失的参数不会被猜补,不能承诺修复历史失败调用后自动执行。
|
|
49
|
+
|
|
50
|
+
Business backends keep their existing declarations and APIs. Operators can inherit, override or disable Hub tool limits under **Tool providers → Edit → Governance**. Tool limits are shared per provider/tool; the provider gate is shared across all its tools, and the client gate remains independent. Hour/day windows retain their original duration. Matching SDK/DSH candidates preserve retry hints and resume only the original invocation; an uncertain write is never replayed automatically.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Paired upgrade guide for 0.8.0: longer tasks and attachment delivery
|
|
2
|
+
|
|
3
|
+
Upgrade Core 0.7.0 / SDK 0.5.0 / DSH 0.5.0 to Core 0.8.0 / SDK 0.6.0 / DSH 0.6.0 using the deployment-specific release procedure. Preserve original configuration and persistent records.
|
|
4
|
+
|
|
5
|
+
## Choose the required features
|
|
6
|
+
|
|
7
|
+
| Need | Core | SDK / DSH and host | Business backend |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| Configure Hub tool limits | New Core, migration 061 and policies | Paired packages for retry guidance and original-call recovery | Keep APIs/declarations; backend limits remain independent |
|
|
10
|
+
| Use generated or explicitly selected images | New Core, 060, storage and workspace switch | New SDK, controlled source and durable upload store in the DSH host | Existing URL APIs work; asset IDs/imports remain business operations |
|
|
11
|
+
| Switch tools within a turn | Paired Core for full discovery feedback | New DSH merges valid tools | No new requirement |
|
|
12
|
+
| Reuse declarations across messages | Current-turn preparation and permission checks remain | Opt into `toolLifecycle: 'session'` and handle preparation | No new requirement |
|
|
13
|
+
| Inspect/recover after reopening | New read-only receipt API | New SDK/DSH, durable invocation store and panel methods | Original invocation and approval rules remain |
|
|
14
|
+
| Task budgets, concurrency and pause | New Core, 062 and administrator-created tasks | Paired packages, task store and complete original-scope verification | Counts invocations, not products or monetary impact |
|
|
15
|
+
|
|
16
|
+
Other MCP hosts and adapters do not gain these integrations automatically. Ordinary unenrolled authorizations retain their existing flow. Unsupported interfaces must not cause fallback to a broader or default authorization.
|
|
17
|
+
|
|
18
|
+
## 1. Preserve original state
|
|
19
|
+
|
|
20
|
+
Back up the database, configuration, encryption material, storage settings and objects. Original argument snapshots use a key derived from the instance's `server.token`. Do not combine a normal upgrade with an unplanned rotation: an old snapshot that cannot be decrypted must block recovery rather than be reconstructed.
|
|
21
|
+
|
|
22
|
+
Hosts retain secure credentials, connection instance keys, real Sessions, fixed scopes, events, archive outbox/ACK/CAS, upload and invocation journals, and task bindings. Protect these private stores; do not commit or publish them. An upgrade should not recreate authorizations or conversations.
|
|
23
|
+
|
|
24
|
+
## 2. Upgrade Core and apply migrations
|
|
25
|
+
|
|
26
|
+
Use final released artifacts and the deployment-specific upgrade procedure. Check the intended database, then run the official migration runner (`npm run db:init` for a source installation) for all unapplied files before starting the new service. Startup does not migrate implicitly.
|
|
27
|
+
|
|
28
|
+
| New since Core 0.7.0 | Purpose |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `060_agent_artifacts.sql` | Original image-upload receipts; binary objects stay in operator storage |
|
|
31
|
+
| `061_tool_rate_limit_policies.sql` | Provider defaults and per-tool overrides; existing null settings inherit declarations |
|
|
32
|
+
| `062_agent_task_control.sql` | Six tables for task bindings, enforcement, invocations and budgets/permits |
|
|
33
|
+
|
|
34
|
+
Verify the migration ledger and readiness. Do not manually replay applied SQL. Older baselines also need their missing earlier migrations. Existing candidate deployments must compare migration records and checksums rather than recreate tables.
|
|
35
|
+
|
|
36
|
+
Persistent task control needs the corresponding MySQL repository. Embedded hosts lacking optional support report unsupported. A configured managed flow must block on missing tables or database failure, not fall back to unrestricted dispatch.
|
|
37
|
+
|
|
38
|
+
## 3. Upgrade the actual SDK, DSH and host
|
|
39
|
+
|
|
40
|
+
The released DSH must depend on the exact paired SDK, with a matching lockfile. Editing the source manifest alone does not upgrade a desktop Profile or packaged application. Verify actual consumer resolution and nested copies. An earlier same-numbered candidate is identified by hash; it is not the public 0.5.0 package.
|
|
41
|
+
|
|
42
|
+
- Cross-turn reuse: enable `toolLifecycle: 'session'`, preserve the real Session/runtime and handle preparation with current schemas. `active_turn` remains the default. Restart empties the declaration cache; the separate invocation journal can still recover original operations.
|
|
43
|
+
- Recovery and panels: persist `invocationStore`; use `inspectSessionInvocation` / `resumeSessionInvocation` with the original real Session, ID and cancellation signal. Reads never invoke resume. Null results stay unconfirmed; storage errors and history gaps cannot display stale success.
|
|
44
|
+
- Tasks: persist `taskStore`, obtain original coordinates with `getSessionTaskCoordinates` and bind the administrator-created task. Restore original scope/task/journal. The model does not choose task IDs.
|
|
45
|
+
- Images: connect a controlled `artifactSource` and durable `artifactStore`. Register only files approved for business use in the current conversation. Ordinary chat attachments are not synchronized automatically. The model chooses neither buckets nor arbitrary local paths.
|
|
46
|
+
|
|
47
|
+
Do not reconstruct missing historical bindings or arguments from text. Old SDK/Core versions without read-only receipts report unsupported; inspection must not fall back to resume.
|
|
48
|
+
|
|
49
|
+
## 4. Enable features with a small validation scope
|
|
50
|
+
|
|
51
|
+
Configure Media Storage, then select it under Agent Clients → Connection Configuration → Tools and Approval → Generated Image Upload. Objects are public in the first phase; use an image suitable for public display.
|
|
52
|
+
|
|
53
|
+
Configure provider-wide, default per-tool and individual override limits under Tool Providers → Edit → Governance. A provider gate value of `0` disables only that layer. Client-app, per-tool and backend gates remain independent. The same provider/tool shares its counter across conversations.
|
|
54
|
+
|
|
55
|
+
Create and bind a task using dedicated test authorizations. **Enrollment persists a requirement on each original Agent Session, including its other conversations and older entry points. Cancellation does not remove the marker.** Check all relevant hosts before enrolling ordinary authorizations. A task write budget of `0` means read-only; `null` means no cumulative write cap.
|
|
56
|
+
|
|
57
|
+
## Observable checks
|
|
58
|
+
|
|
59
|
+
1. Ordinary chat does not create business runs just to restore tools or inspect a panel. Unselected targets receive no requests.
|
|
60
|
+
2. Query a shop product, inspect inventory and return to the product: targets remain correct; valid tools are reused or prepared with complete schemas.
|
|
61
|
+
3. Upload a public test image, obtain a ready URL and recover the same upload. The business action using that URL has its own result or approval.
|
|
62
|
+
4. In a synthetic task, counts survive turn changes; pause stops new dispatch permits while original outcomes remain readable.
|
|
63
|
+
5. Reopen a conversation with trustworthy persisted invocations: inspect sends no business action; explicit continuation retains the original ID. Unknown writes are not replaced. Cancelling a wait is not displayed as withdrawing a business request.
|
|
64
|
+
|
|
65
|
+
Synthetic and automated checks do not replace each deployer's actual client acceptance. Focus on the enabled features and final artifacts rather than repeating unrelated tests.
|
|
66
|
+
|
|
67
|
+
## Rollback and limits
|
|
68
|
+
|
|
69
|
+
Before task enrollment, assess rollback against new persistent records and interfaces and retain migration tables/ledger. **Once enforcement markers exist, do not revert to a Core/host that ignores them or delete markers to remove control.** Pause managed dispatch and inspect in-flight calls first; prefer a forward fix. Restoring a backup requires separately reconciling business effects since that backup. Database restoration is not business rollback.
|
|
70
|
+
|
|
71
|
+
Task quotas exclude host-local tools, model inference, attachment uploads and chat archives. They do not measure product count, money or field impact. Cross-Hub tasks, full-plan automatic restart and compensation are not provided. Some host attachment-source listing errors can still surface as `unknown_failure`; they must not be displayed as an empty list. Per-item upload errors and already-ready URLs remain separate.
|