bailinghub 0.3.0 → 0.3.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +3 -0
- package/README.en.md +2 -2
- package/README.md +2 -1
- package/THIRD_PARTY_NOTICES.md +14 -14
- package/demo/business/server.mjs +107 -59
- package/docker-compose.images.yml +2 -2
- package/docs/CHANGELOG.en.md +10 -0
- package/docs/CHANGELOG.md +10 -0
- package/docs/DEMO.md +25 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -3
- package/docs/INDEPENDENT_VALIDATION.md +4 -3
- package/docs/README.en.md +2 -0
- package/docs/README.md +2 -0
- package/docs/RELEASE_NOTES_v0.3.1.en.md +44 -0
- package/docs/RELEASE_NOTES_v0.3.1.md +44 -0
- package/package.json +5 -2
- package/scripts/check-doc-links.mjs +1 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-package-artifact.mjs +2 -1
- package/scripts/check-release-consistency.mjs +57 -23
- package/scripts/check-release-consistency.test.mjs +58 -3
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +1 -0
- package/scripts/seed-demo.ts +24 -99
- package/scripts/validate-examples.mjs +6 -4
- package/scripts/verify-github-repo.mjs +2 -1
- package/sql/054_demo_dataset_state.sql +12 -0
- package/src/adapters/llm/file.ts +2 -2
- package/src/app/kernel.ts +3 -0
- package/src/core/config/config.test.ts +69 -0
- package/src/core/config/config.ts +54 -0
- package/src/infrastructure/config/config-chat-repository.ts +12 -1
- package/src/infrastructure/config/config-client-repository.ts +21 -2
- package/src/infrastructure/config/config-route-repository.ts +12 -1
- package/src/infrastructure/config/config-target-repository.ts +12 -1
- package/src/infrastructure/config/config-tool-provider-repository.ts +12 -1
- package/src/routes/admin-default.ts +2 -0
- package/src/routes/admin-demo-dataset.test.ts +93 -0
- package/src/routes/admin-demo-dataset.ts +83 -0
- package/src/routes/admin-host.test.ts +10 -1
- package/src/routes/admin.ts +14 -0
- package/src/services/demo-business-profile.test.ts +230 -0
- package/src/services/demo-dataset.test.ts +369 -0
- package/src/services/demo-dataset.ts +872 -0
- package/web/console/assets/{Accounts-Dwzm4D_V.js → Accounts-08VltF2i.js} +1 -1
- package/web/console/assets/{Approvals-BxhuI0ku.js → Approvals-CqgmsMau.js} +1 -1
- package/web/console/assets/{Audit-dFAbGynl.js → Audit-bPlpSQt3.js} +1 -1
- package/web/console/assets/{BrandLockup-BtZyvkM5.js → BrandLockup-DhX07g3G.js} +1 -1
- package/web/console/assets/{Channels-Dqg4-_yr.js → Channels-BZe0pLgx.js} +1 -1
- package/web/console/assets/{ChatEntries-CEGZ3NnJ.js → ChatEntries-Ca0lcGqn.js} +1 -1
- package/web/console/assets/{Clients-C0QD1x7g.js → Clients-BVVZfX3r.js} +1 -1
- package/web/console/assets/{Cost-BAJqLhpK.js → Cost-DANcjr_p.js} +1 -1
- package/web/console/assets/{Credentials-D_GDRgWi.js → Credentials-D_8tP2Xa.js} +1 -1
- package/web/console/assets/{Diagnostics-BWYnDxRj.js → Diagnostics-Bw1WImFe.js} +1 -1
- package/web/console/assets/{Executors-Cmryk4Vk.js → Executors-fuieN2Sl.js} +1 -1
- package/web/console/assets/{Kb-BSXQE0Fa.js → Kb-BaMi_7xf.js} +1 -1
- package/web/console/assets/{Login-BnBPqC8Z.js → Login-Cmz2ppY8.js} +1 -1
- package/web/console/assets/{Projects-CNHx4L_7.js → Projects-D6xIgFB3.js} +1 -1
- package/web/console/assets/{Routes-u5cEAEXQ.js → Routes-B90i3ZNa.js} +1 -1
- package/web/console/assets/{Runs-BeFUR77_.js → Runs-9qpwotOj.js} +1 -1
- package/web/console/assets/Setup-BIjCiA2i.js +1 -0
- package/web/console/assets/Setup-BuyKFofL.css +1 -0
- package/web/console/assets/Shell-BVIjmoY8.css +1 -0
- package/web/console/assets/Shell-Dm6eFcl1.js +1 -0
- package/web/console/assets/{StorageBuckets-DMXRJxUA.js → StorageBuckets-DY8WuJlM.js} +1 -1
- package/web/console/assets/{SystemSettings-B72F-loY.js → SystemSettings-O_NMPzq_.js} +1 -1
- package/web/console/assets/{SystemStatus-hOj_TPYE.js → SystemStatus-Cok3S7S3.js} +1 -1
- package/web/console/assets/{Targets-UVVf7twC.js → Targets-YWBoxqvy.js} +1 -1
- package/web/console/assets/{Tools-ihkr9R9x.js → Tools-BgXDw7Mg.js} +1 -1
- package/web/console/assets/{index-DxvruykG.js → index-S_J0I0Zh.js} +2 -2
- package/web/console/assets/{request-BisL2T9B.js → request-FM608Kfz.js} +1 -1
- package/web/console/assets/{schema-CzpUpoLk.js → schema-DWnFqTkB.js} +1 -1
- package/web/console/index.html +1 -1
- package/web-admin/package-lock.json +3 -3
- package/web-admin/src/layout/Shell.vue +5 -4
- package/web-admin/src/pages/Setup.vue +12 -9
- package/web/console/assets/Setup-BjZfrmfN.js +0 -1
- package/web/console/assets/Setup-QjlHZKdB.css +0 -1
- package/web/console/assets/Shell-CbGNTN91.css +0 -1
- package/web/console/assets/Shell-EJuYf3OO.js +0 -1
package/.env.example
CHANGED
|
@@ -55,13 +55,16 @@
|
|
|
55
55
|
# BAILING_BOOTSTRAP_ADMIN_PASSWORD=replace-with-a-strong-password
|
|
56
56
|
|
|
57
57
|
# Docker demo 内置 MySQL 与 demo 业务系统密钥。一键安装脚本会自动生成强随机值。
|
|
58
|
+
# 共享体验环境请使用 stateless-readonly:business URL 指向本机回环服务,tool secret 至少 24 位且独立随机。
|
|
58
59
|
# BAILING_DEMO_ADMIN_PASSWORD=bailing-demo-admin
|
|
59
60
|
# BAILING_DEMO_MYSQL_ROOT_PASSWORD=bailing-root-pass
|
|
60
61
|
# BAILING_DEMO_MYSQL_DATABASE=bailinghub
|
|
61
62
|
# BAILING_DEMO_MYSQL_USER=bailing
|
|
62
63
|
# BAILING_DEMO_MYSQL_PASSWORD=bailing-pass
|
|
64
|
+
# DEMO_BUSINESS_URL=http://demo-business:19080
|
|
63
65
|
# DEMO_TOOL_SECRET=demo-tool-secret-change-me
|
|
64
66
|
# DEMO_CLIENT_TOKEN=bailing-demo-client-token
|
|
67
|
+
# DEMO_PROFILE=full-local
|
|
65
68
|
|
|
66
69
|
# 展示时区。
|
|
67
70
|
# BAILING_DISPLAY_TZ=Asia/Shanghai
|
package/README.en.md
CHANGED
|
@@ -57,7 +57,7 @@ If you need to serve multiple isolated organizations, run separate hub deploymen
|
|
|
57
57
|
|
|
58
58
|
## 10-Minute Demo
|
|
59
59
|
|
|
60
|
-
> **Prefer to look around before installing?** Open the [online experience](https://trial.bailinghub.com/
|
|
60
|
+
> **Prefer to look around before installing?** Open the [online experience](https://trial.bailinghub.com/register/), create an account, inspect the console, import demo data, and run diagnostics. This environment is for understanding the product and validating its configuration model. Do not upload production credentials or sensitive data, and do not connect real workloads. Self-host the open-source edition for actual use.
|
|
61
61
|
|
|
62
62
|
To validate the complete loop in your own environment:
|
|
63
63
|
|
|
@@ -229,7 +229,7 @@ export default buildOpenApiSpec({
|
|
|
229
229
|
- [Tool Governance](docs/TOOLS_DESIGN.en.md)
|
|
230
230
|
- [AI-Friendly Tool Design](docs/AI_FRIENDLY_TOOLS.en.md)
|
|
231
231
|
- [Third-Party Integration](docs/INTEGRATION.en.md)
|
|
232
|
-
- [Latest Release Notes](docs/RELEASE_NOTES_v0.3.
|
|
232
|
+
- [Latest Release Notes](docs/RELEASE_NOTES_v0.3.1.en.md)
|
|
233
233
|
- [v0.1.7 Release Notes](docs/RELEASE_NOTES_v0.1.7.en.md)
|
|
234
234
|
- [v0.1.6 Release Notes](docs/RELEASE_NOTES_v0.1.6.en.md)
|
|
235
235
|
- [v0.1.5 Release Notes](docs/RELEASE_NOTES_v0.1.5.en.md)
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ In short: BailingHub is not another chatbot or agent framework. It is a self-hos
|
|
|
28
28
|
|
|
29
29
|
## 10 分钟体验
|
|
30
30
|
|
|
31
|
-
> **不想先部署?** 打开 [在线体验](https://trial.bailinghub.com/
|
|
31
|
+
> **不想先部署?** 打开 [在线体验](https://trial.bailinghub.com/register/),注册后可直接查看控制台、导入演示数据并运行系统体检。该环境只用于了解产品和验证配置心智,请勿上传生产凭据、敏感数据或接入真实业务;正式使用请自行部署开源版。
|
|
32
32
|
|
|
33
33
|
需要在自己的环境验证完整闭环时:
|
|
34
34
|
|
|
@@ -226,6 +226,7 @@ BAILING_SMOKE_RUN_ROUTE=<route-key> npm run smoke
|
|
|
226
226
|
| `docs/RELEASE_NOTES_v0.1.16.md` | `v0.1.16` 工具运行时收敛与语义检索韧性说明 |
|
|
227
227
|
| `docs/RELEASE_NOTES_v0.2.0.md` | `v0.2.0` 工具清单访问保护与主动核验说明 |
|
|
228
228
|
| `docs/RELEASE_NOTES_v0.3.0.md` | `v0.3.0` 可组合 Core 与 Kernel Host API v1 说明 |
|
|
229
|
+
| `docs/RELEASE_NOTES_v0.3.1.md` | `v0.3.1` PDF 解析安全更新说明 |
|
|
229
230
|
| `docs/RELEASE_NOTES_v0.1.0.md` | 首个公开版本的发布说明 |
|
|
230
231
|
| `docs/兼容性与升级.md` | 版本发布策略:SemVer、稳定契约、数据库结构纪律、发布记录要求 |
|
|
231
232
|
| `sql/` | 中枢**独立**状态库 DDL(`bz_` 前缀,按序号演进);数据库结构演进纪律见 [sql/README.md](sql/README.md) |
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -128,7 +128,7 @@ The package license texts and copyright notices remain in the installed package
|
|
|
128
128
|
| Console | [magic-string](https://www.npmjs.com/package/magic-string) | 0.30.21 | MIT | runtime |
|
|
129
129
|
| Console | [mammoth](https://www.npmjs.com/package/mammoth) | 1.12.0 | BSD-2-Clause | runtime |
|
|
130
130
|
| Console | [memoize-one](https://www.npmjs.com/package/memoize-one) | 6.0.0 | MIT | runtime |
|
|
131
|
-
| Console | [nanoid](https://www.npmjs.com/package/nanoid) | 3.3.
|
|
131
|
+
| Console | [nanoid](https://www.npmjs.com/package/nanoid) | 3.3.18 | MIT | runtime |
|
|
132
132
|
| Console | [normalize-wheel-es](https://www.npmjs.com/package/normalize-wheel-es) | 1.2.0 | BSD-3-Clause | runtime |
|
|
133
133
|
| Console | [option](https://www.npmjs.com/package/option) | 0.2.4 | BSD-2-Clause | runtime |
|
|
134
134
|
| Console | [pako](https://www.npmjs.com/package/pako) | 1.0.11 | (MIT AND Zlib) | runtime |
|
|
@@ -182,18 +182,18 @@ The package license texts and copyright notices remain in the installed package
|
|
|
182
182
|
| Hub | [@esbuild/win32-arm64](https://www.npmjs.com/package/@esbuild/win32-arm64) | 0.28.1 | MIT | runtime |
|
|
183
183
|
| Hub | [@esbuild/win32-ia32](https://www.npmjs.com/package/@esbuild/win32-ia32) | 0.28.1 | MIT | runtime |
|
|
184
184
|
| Hub | [@esbuild/win32-x64](https://www.npmjs.com/package/@esbuild/win32-x64) | 0.28.1 | MIT | runtime |
|
|
185
|
-
| Hub | [@napi-rs/canvas](https://www.npmjs.com/package/@napi-rs/canvas) | 0.
|
|
186
|
-
| Hub | [@napi-rs/canvas-android-arm64](https://www.npmjs.com/package/@napi-rs/canvas-android-arm64) | 0.
|
|
187
|
-
| Hub | [@napi-rs/canvas-darwin-arm64](https://www.npmjs.com/package/@napi-rs/canvas-darwin-arm64) | 0.
|
|
188
|
-
| Hub | [@napi-rs/canvas-darwin-x64](https://www.npmjs.com/package/@napi-rs/canvas-darwin-x64) | 0.
|
|
189
|
-
| Hub | [@napi-rs/canvas-linux-arm-gnueabihf](https://www.npmjs.com/package/@napi-rs/canvas-linux-arm-gnueabihf) | 0.
|
|
190
|
-
| Hub | [@napi-rs/canvas-linux-arm64-gnu](https://www.npmjs.com/package/@napi-rs/canvas-linux-arm64-gnu) | 0.
|
|
191
|
-
| Hub | [@napi-rs/canvas-linux-arm64-musl](https://www.npmjs.com/package/@napi-rs/canvas-linux-arm64-musl) | 0.
|
|
192
|
-
| Hub | [@napi-rs/canvas-linux-riscv64-gnu](https://www.npmjs.com/package/@napi-rs/canvas-linux-riscv64-gnu) | 0.
|
|
193
|
-
| Hub | [@napi-rs/canvas-linux-x64-gnu](https://www.npmjs.com/package/@napi-rs/canvas-linux-x64-gnu) | 0.
|
|
194
|
-
| Hub | [@napi-rs/canvas-linux-x64-musl](https://www.npmjs.com/package/@napi-rs/canvas-linux-x64-musl) | 0.
|
|
195
|
-
| Hub | [@napi-rs/canvas-win32-arm64-msvc](https://www.npmjs.com/package/@napi-rs/canvas-win32-arm64-msvc) | 0.
|
|
196
|
-
| Hub | [@napi-rs/canvas-win32-x64-msvc](https://www.npmjs.com/package/@napi-rs/canvas-win32-x64-msvc) | 0.
|
|
185
|
+
| Hub | [@napi-rs/canvas](https://www.npmjs.com/package/@napi-rs/canvas) | 1.0.3 | MIT | runtime |
|
|
186
|
+
| Hub | [@napi-rs/canvas-android-arm64](https://www.npmjs.com/package/@napi-rs/canvas-android-arm64) | 1.0.3 | MIT | runtime |
|
|
187
|
+
| Hub | [@napi-rs/canvas-darwin-arm64](https://www.npmjs.com/package/@napi-rs/canvas-darwin-arm64) | 1.0.3 | MIT | runtime |
|
|
188
|
+
| Hub | [@napi-rs/canvas-darwin-x64](https://www.npmjs.com/package/@napi-rs/canvas-darwin-x64) | 1.0.3 | MIT | runtime |
|
|
189
|
+
| Hub | [@napi-rs/canvas-linux-arm-gnueabihf](https://www.npmjs.com/package/@napi-rs/canvas-linux-arm-gnueabihf) | 1.0.3 | MIT | runtime |
|
|
190
|
+
| Hub | [@napi-rs/canvas-linux-arm64-gnu](https://www.npmjs.com/package/@napi-rs/canvas-linux-arm64-gnu) | 1.0.3 | MIT | runtime |
|
|
191
|
+
| Hub | [@napi-rs/canvas-linux-arm64-musl](https://www.npmjs.com/package/@napi-rs/canvas-linux-arm64-musl) | 1.0.3 | MIT | runtime |
|
|
192
|
+
| Hub | [@napi-rs/canvas-linux-riscv64-gnu](https://www.npmjs.com/package/@napi-rs/canvas-linux-riscv64-gnu) | 1.0.3 | MIT | runtime |
|
|
193
|
+
| Hub | [@napi-rs/canvas-linux-x64-gnu](https://www.npmjs.com/package/@napi-rs/canvas-linux-x64-gnu) | 1.0.3 | MIT | runtime |
|
|
194
|
+
| Hub | [@napi-rs/canvas-linux-x64-musl](https://www.npmjs.com/package/@napi-rs/canvas-linux-x64-musl) | 1.0.3 | MIT | runtime |
|
|
195
|
+
| Hub | [@napi-rs/canvas-win32-arm64-msvc](https://www.npmjs.com/package/@napi-rs/canvas-win32-arm64-msvc) | 1.0.3 | MIT | runtime |
|
|
196
|
+
| Hub | [@napi-rs/canvas-win32-x64-msvc](https://www.npmjs.com/package/@napi-rs/canvas-win32-x64-msvc) | 1.0.3 | MIT | runtime |
|
|
197
197
|
| Hub | [@types/node](https://www.npmjs.com/package/@types/node) | 22.19.20 | MIT | runtime |
|
|
198
198
|
| Hub | [@xmldom/xmldom](https://www.npmjs.com/package/@xmldom/xmldom) | 0.8.13 | MIT | runtime |
|
|
199
199
|
| Hub | [ajv](https://www.npmjs.com/package/ajv) | 8.20.0 | MIT | build/test |
|
|
@@ -229,7 +229,7 @@ The package license texts and copyright notices remain in the installed package
|
|
|
229
229
|
| Hub | [option](https://www.npmjs.com/package/option) | 0.2.4 | BSD-2-Clause | runtime |
|
|
230
230
|
| Hub | [pako](https://www.npmjs.com/package/pako) | 1.0.11 | (MIT AND Zlib) | runtime |
|
|
231
231
|
| Hub | [path-is-absolute](https://www.npmjs.com/package/path-is-absolute) | 1.0.1 | MIT | runtime |
|
|
232
|
-
| Hub | [pdfjs-dist](https://www.npmjs.com/package/pdfjs-dist) |
|
|
232
|
+
| Hub | [pdfjs-dist](https://www.npmjs.com/package/pdfjs-dist) | 6.2.108 | Apache-2.0 | runtime |
|
|
233
233
|
| Hub | [playwright](https://www.npmjs.com/package/playwright) | 1.61.1 | Apache-2.0 | build/test |
|
|
234
234
|
| Hub | [playwright-core](https://www.npmjs.com/package/playwright-core) | 1.61.1 | Apache-2.0 | build/test |
|
|
235
235
|
| Hub | [process-nextick-args](https://www.npmjs.com/package/process-nextick-args) | 2.0.1 | MIT | runtime |
|
package/demo/business/server.mjs
CHANGED
|
@@ -3,9 +3,22 @@ import { createServer } from 'node:http';
|
|
|
3
3
|
|
|
4
4
|
const host = process.env.DEMO_HOST || '127.0.0.1';
|
|
5
5
|
const port = Number(process.env.DEMO_PORT || 19080);
|
|
6
|
+
const profile = process.env.DEMO_PROFILE || 'full-local';
|
|
7
|
+
if (profile !== 'full-local' && profile !== 'stateless-readonly') {
|
|
8
|
+
throw new Error('DEMO_PROFILE 只支持 full-local 或 stateless-readonly');
|
|
9
|
+
}
|
|
10
|
+
const statelessReadonly = profile === 'stateless-readonly';
|
|
11
|
+
if (statelessReadonly && !['127.0.0.1', '::1', 'localhost'].includes(host.toLowerCase())) {
|
|
12
|
+
throw new Error('stateless-readonly 模式的 DEMO_HOST 必须是本机回环地址');
|
|
13
|
+
}
|
|
6
14
|
const secret = process.env.DEMO_TOOL_SECRET || 'demo-tool-secret-change-me';
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
if (statelessReadonly && (secret.trim().length < 24 || secret !== secret.trim()
|
|
16
|
+
|| /^(?:replace|change|demo|test|example|sample)(?:[_-]|$)/i.test(secret))) {
|
|
17
|
+
throw new Error('stateless-readonly 模式的 DEMO_TOOL_SECRET 不安全:请使用至少 24 位的独立随机密钥');
|
|
18
|
+
}
|
|
19
|
+
// 公共只读 profile 不需要回调 Hub,因此不读取也不使用客户端 token/Hub URL。
|
|
20
|
+
const clientToken = statelessReadonly ? '' : (process.env.DEMO_CLIENT_TOKEN || 'bailing-demo-client-token');
|
|
21
|
+
const hubUrl = statelessReadonly ? '' : (process.env.DEMO_HUB_URL || 'http://localhost:18900').replace(/\/+$/, '');
|
|
9
22
|
|
|
10
23
|
const principals = new Map([
|
|
11
24
|
['demo-user-001', { uid: 'demo-user-001', tenant: 'demo-shop', name: 'Alice' }],
|
|
@@ -47,11 +60,8 @@ function acc(scope, opts = {}) {
|
|
|
47
60
|
return capability;
|
|
48
61
|
}
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
info: { title: 'Bailing demo business tools', version: '1.0.0' },
|
|
53
|
-
'x-bailing-authz-probe': { method: 'POST', path: '/.well-known/bailing/authz-probe' },
|
|
54
|
-
paths: {
|
|
63
|
+
function buildToolSpec(selectedProfile) {
|
|
64
|
+
const paths = {
|
|
55
65
|
'/orders': {
|
|
56
66
|
get: {
|
|
57
67
|
operationId: 'list_demo_orders',
|
|
@@ -59,84 +69,79 @@ const toolSpec = {
|
|
|
59
69
|
description: '按订单号或客户名查询 demo 订单。无过滤条件时返回当前主体可见的最近订单。',
|
|
60
70
|
'x-agent-capability': acc('demo.order.read', {
|
|
61
71
|
requiresSubject: true,
|
|
72
|
+
readonly: true,
|
|
62
73
|
whenToUse: '用户询问订单状态、付款状态、物流状态或历史订单时使用。',
|
|
63
74
|
returns: '订单号、客户、商品、金额、状态、物流状态。',
|
|
64
75
|
}),
|
|
65
76
|
parameters: [
|
|
66
|
-
{ name: 'order_no', in: 'query', required: false, description: '订单号,例如 SO-1001
|
|
77
|
+
{ name: 'order_no', in: 'query', required: false, description: '订单号,例如 SO-1001。', schema: { type: 'string' } },
|
|
67
78
|
{ name: 'customer', in: 'query', required: false, description: '客户名,可用于模糊过滤。', schema: { type: 'string' } },
|
|
68
79
|
],
|
|
80
|
+
responses: { '200': { description: 'OK' } },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
'/failure-demo': {
|
|
84
|
+
get: {
|
|
85
|
+
operationId: 'demo_failure_probe',
|
|
86
|
+
summary: '触发一个可观测失败',
|
|
87
|
+
description: '用于演示中枢 trace 如何记录业务工具 5xx、错误正文和排障路径。',
|
|
88
|
+
'x-agent-capability': acc('demo.failure.read', { requiresSubject: true, readonly: true }),
|
|
89
|
+
responses: { '500': { description: 'Intentional demo failure' } },
|
|
69
90
|
},
|
|
70
91
|
},
|
|
71
|
-
|
|
92
|
+
};
|
|
93
|
+
if (selectedProfile === 'full-local') {
|
|
94
|
+
paths['/tickets'] = {
|
|
72
95
|
post: {
|
|
73
96
|
operationId: 'create_demo_ticket',
|
|
74
97
|
summary: '为当前操作主体创建售后工单',
|
|
75
98
|
description: '当用户明确要求登记问题、创建工单或需要人工跟进时使用。',
|
|
76
99
|
'x-agent-capability': acc('demo.ticket.create', {
|
|
77
|
-
risk: 'medium',
|
|
78
|
-
requiresSubject: true,
|
|
79
|
-
idempotent: false,
|
|
100
|
+
risk: 'medium', requiresSubject: true, idempotent: false,
|
|
80
101
|
whenToUse: '用户要求人工处理、售后跟进、开工单或记录问题时使用。',
|
|
81
102
|
returns: '工单编号与当前状态。',
|
|
82
103
|
}),
|
|
83
104
|
requestBody: {
|
|
84
105
|
required: true,
|
|
85
|
-
content: {
|
|
86
|
-
'
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
order_no: { type: 'string', description: '关联订单号,例如 SO-1001。' },
|
|
91
|
-
title: { type: 'string', description: '工单标题,简短概括用户问题。' },
|
|
92
|
-
message: { type: 'string', description: '工单正文,记录用户诉求和已查询到的关键信息。' },
|
|
93
|
-
},
|
|
94
|
-
required: ['title', 'message'],
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
106
|
+
content: { 'application/json': { schema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: { order_no: { type: 'string' }, title: { type: 'string' }, message: { type: 'string' } },
|
|
109
|
+
required: ['title', 'message'],
|
|
110
|
+
} } },
|
|
98
111
|
},
|
|
112
|
+
responses: { '200': { description: 'OK' } },
|
|
99
113
|
},
|
|
100
|
-
}
|
|
101
|
-
'/refunds'
|
|
114
|
+
};
|
|
115
|
+
paths['/refunds'] = {
|
|
102
116
|
post: {
|
|
103
117
|
operationId: 'request_demo_refund',
|
|
104
118
|
summary: '提交退款申请',
|
|
105
|
-
description: '
|
|
119
|
+
description: '本地单组织 demo 的高风险工具:会产生内存中的退款申请,必须进入审批车道。',
|
|
106
120
|
'x-agent-capability': acc('demo.refund.request', {
|
|
107
|
-
risk: 'high',
|
|
108
|
-
confirm: true,
|
|
109
|
-
requiresSubject: true,
|
|
110
|
-
confirmPrompt: '确认要为订单 {{order_no}} 申请退款 {{amount}} 元吗?',
|
|
121
|
+
risk: 'high', requiresSubject: true,
|
|
122
|
+
confirm: true, confirmPrompt: '确认要为订单 {{order_no}} 申请退款 {{amount}} 元吗?',
|
|
111
123
|
}),
|
|
112
124
|
requestBody: {
|
|
113
125
|
required: true,
|
|
114
|
-
content: {
|
|
115
|
-
'
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
order_no: { type: 'string', description: '订单号。' },
|
|
120
|
-
amount: { type: 'number', description: '退款金额。' },
|
|
121
|
-
reason: { type: 'string', description: '退款原因。' },
|
|
122
|
-
},
|
|
123
|
-
required: ['order_no', 'amount', 'reason'],
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
126
|
+
content: { 'application/json': { schema: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: { order_no: { type: 'string' }, amount: { type: 'number' }, reason: { type: 'string' } },
|
|
129
|
+
required: ['order_no', 'amount', 'reason'],
|
|
130
|
+
} } },
|
|
127
131
|
},
|
|
132
|
+
responses: { '202': { description: 'Accepted' } },
|
|
128
133
|
},
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
openapi: '3.1.0',
|
|
138
|
+
info: { title: 'Bailing demo business tools', version: '1.0.0' },
|
|
139
|
+
'x-bailing-authz-probe': { method: 'POST', path: '/.well-known/bailing/authz-probe' },
|
|
140
|
+
paths,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const toolSpec = buildToolSpec(profile);
|
|
140
145
|
|
|
141
146
|
function json(res, status, data) {
|
|
142
147
|
const body = JSON.stringify(data);
|
|
@@ -259,6 +264,40 @@ async function sendApprovalDecision(approval, decision) {
|
|
|
259
264
|
return body;
|
|
260
265
|
}
|
|
261
266
|
|
|
267
|
+
function renderReadonlyPage() {
|
|
268
|
+
const orderRows = orders.map((o) => `<tr><td>${o.order_no}</td><td>${o.customer}</td><td>${o.item}</td><td>${o.amount}</td><td>${o.status}</td><td>${o.logistics}</td></tr>`).join('');
|
|
269
|
+
return `<!doctype html>
|
|
270
|
+
<html lang="zh-CN">
|
|
271
|
+
<head>
|
|
272
|
+
<meta charset="utf-8" />
|
|
273
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
274
|
+
<title>Bailing Demo Business</title>
|
|
275
|
+
<style>
|
|
276
|
+
:root { color-scheme: dark; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0b0d10; color: #e8eaed; }
|
|
277
|
+
body { margin: 0; padding: 28px; }
|
|
278
|
+
main { max-width: 980px; margin: 0 auto; }
|
|
279
|
+
p { color: #a7adb7; line-height: 1.7; }
|
|
280
|
+
a { color: #57d178; margin-right: 14px; text-decoration: none; }
|
|
281
|
+
section { margin-top: 20px; border: 1px solid #252a33; border-radius: 8px; background: #12151a; padding: 16px; }
|
|
282
|
+
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
283
|
+
th, td { border-bottom: 1px solid #252a33; padding: 8px; text-align: left; }
|
|
284
|
+
th { color: #a7adb7; font-weight: 500; }
|
|
285
|
+
</style>
|
|
286
|
+
</head>
|
|
287
|
+
<body>
|
|
288
|
+
<main>
|
|
289
|
+
<h1>Demo 业务系统</h1>
|
|
290
|
+
<p>公共体验环境仅提供无副作用的订单查询和故障 trace 演示,不创建工单、退款或审批状态。</p>
|
|
291
|
+
<nav><a href="/health">Health</a><a href="/.well-known/bailing/tools.json">Tools Spec</a></nav>
|
|
292
|
+
<section>
|
|
293
|
+
<h2>固定演示订单</h2>
|
|
294
|
+
<table><thead><tr><th>订单号</th><th>客户</th><th>商品</th><th>金额</th><th>状态</th><th>物流</th></tr></thead><tbody>${orderRows}</tbody></table>
|
|
295
|
+
</section>
|
|
296
|
+
</main>
|
|
297
|
+
</body>
|
|
298
|
+
</html>`;
|
|
299
|
+
}
|
|
300
|
+
|
|
262
301
|
function renderPage() {
|
|
263
302
|
const orderRows = orders.map((o) => `<tr><td>${o.order_no}</td><td>${o.customer}</td><td>${o.item}</td><td>${o.amount}</td><td>${o.status}</td><td>${o.logistics}</td></tr>`).join('');
|
|
264
303
|
const ticketRows = tickets.slice().reverse().map((t) => `<tr><td>${t.ticket_id}</td><td>${t.order_no || '-'}</td><td>${escapeHtml(t.title)}</td><td>${t.status}</td></tr>`).join('') || '<tr><td colspan="4" class="muted">暂无工单</td></tr>';
|
|
@@ -357,17 +396,26 @@ function renderPage() {
|
|
|
357
396
|
createServer(async (req, res) => {
|
|
358
397
|
const url = new URL(req.url || '/', `http://${req.headers.host || 'localhost'}`);
|
|
359
398
|
if (req.method === 'GET' && url.pathname === '/') {
|
|
360
|
-
html(res, 200, renderPage());
|
|
399
|
+
html(res, 200, statelessReadonly ? renderReadonlyPage() : renderPage());
|
|
361
400
|
return;
|
|
362
401
|
}
|
|
363
402
|
if (req.method === 'GET' && url.pathname === '/health') {
|
|
364
|
-
json(res, 200, { ok: true, app: 'demo-business' });
|
|
403
|
+
json(res, 200, { ok: true, app: 'demo-business', profile });
|
|
365
404
|
return;
|
|
366
405
|
}
|
|
367
406
|
if (req.method === 'GET' && url.pathname === '/.well-known/bailing/tools.json') {
|
|
368
407
|
json(res, 200, toolSpec);
|
|
369
408
|
return;
|
|
370
409
|
}
|
|
410
|
+
if (statelessReadonly && !(
|
|
411
|
+
(req.method === 'POST' && url.pathname === '/.well-known/bailing/authz-probe')
|
|
412
|
+
|| (req.method === 'GET' && url.pathname === '/orders')
|
|
413
|
+
|| (req.method === 'GET' && url.pathname === '/failure-demo')
|
|
414
|
+
)) {
|
|
415
|
+
// 在公共体验环境中先于读 body/验签返回 404,不暴露也不触发任何可变逻辑。
|
|
416
|
+
json(res, 404, { error: 'not found' });
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
371
419
|
if (req.method === 'GET' && url.pathname === '/api/state') {
|
|
372
420
|
json(res, 200, { orders, tickets, refunds, approvals });
|
|
373
421
|
return;
|
|
@@ -479,5 +527,5 @@ createServer(async (req, res) => {
|
|
|
479
527
|
|
|
480
528
|
json(res, 404, { error: 'not found' });
|
|
481
529
|
}).listen(port, host, () => {
|
|
482
|
-
console.log(`[demo-business] listening http://${host}:${port}`);
|
|
530
|
+
console.log(`[demo-business] listening http://${host}:${port} profile=${profile}`);
|
|
483
531
|
});
|
|
@@ -18,7 +18,7 @@ services:
|
|
|
18
18
|
retries: 30
|
|
19
19
|
|
|
20
20
|
demo-business:
|
|
21
|
-
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.3.
|
|
21
|
+
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.3.1}
|
|
22
22
|
environment:
|
|
23
23
|
DEMO_HOST: 0.0.0.0
|
|
24
24
|
DEMO_PORT: 19080
|
|
@@ -29,7 +29,7 @@ services:
|
|
|
29
29
|
- "${BAILING_DEMO_PUBLIC_PORT:-19080}:19080"
|
|
30
30
|
|
|
31
31
|
bailinghub:
|
|
32
|
-
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.3.
|
|
32
|
+
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.3.1}
|
|
33
33
|
depends_on:
|
|
34
34
|
mysql:
|
|
35
35
|
condition: service_healthy
|
package/docs/CHANGELOG.en.md
CHANGED
|
@@ -24,6 +24,16 @@ Each public version should describe:
|
|
|
24
24
|
|
|
25
25
|
There are no unreleased changes.
|
|
26
26
|
|
|
27
|
+
## v0.3.1 - PDF Parsing Security Update
|
|
28
|
+
|
|
29
|
+
Released on 2026-08-07.
|
|
30
|
+
|
|
31
|
+
- Upgraded `pdfjs-dist`, used for uploaded-PDF text extraction, from `5.7.284` to `6.2.108` to fix the arbitrary JavaScript execution risk described in GHSA-hq66-cqwq-w95j.
|
|
32
|
+
- Adapted to the PDF.js 6 lifecycle API and destroys the loading task on both success and failure paths.
|
|
33
|
+
- No database migration or configuration change is required. The Client API, Kernel Host API v1, chat protocol, Executor Protocol, ACC, tool signatures, approval semantics, and final business authorization are unchanged.
|
|
34
|
+
- Validation: `npm audit --audit-level=low`, real PDF extraction tests, and the complete `npm run release:check` gate.
|
|
35
|
+
- Related docs: [RELEASE_NOTES_v0.3.1.en.md](RELEASE_NOTES_v0.3.1.en.md), [Security policy](../SECURITY.md), and [Compatibility](COMPATIBILITY.en.md).
|
|
36
|
+
|
|
27
37
|
## v0.3.0 - Composable Core and Kernel Host API v1
|
|
28
38
|
|
|
29
39
|
Released on 2026-08-06.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
|
|
18
18
|
当前无待发布变更。
|
|
19
19
|
|
|
20
|
+
## v0.3.1 - PDF 解析安全更新
|
|
21
|
+
|
|
22
|
+
发布日期:2026-08-07。
|
|
23
|
+
|
|
24
|
+
- 将上传 PDF 文本抽取所使用的 `pdfjs-dist` 从 `5.7.284` 升级到 `6.2.108`,修复 GHSA-hq66-cqwq-w95j 所述的任意 JavaScript 执行风险。
|
|
25
|
+
- 适配 PDF.js 6 的生命周期接口,在成功和失败路径都销毁加载任务并释放解析资源。
|
|
26
|
+
- 没有数据库迁移或配置变化;Client API、Kernel Host API v1、聊天协议、Executor Protocol、ACC、工具签名、审批语义和业务最终授权不变。
|
|
27
|
+
- **验证方式**:`npm audit --audit-level=low`、真实 PDF 抽取测试与完整 `npm run release:check`。
|
|
28
|
+
- **相关文档**:[RELEASE_NOTES_v0.3.1.md](RELEASE_NOTES_v0.3.1.md)、[安全策略](../SECURITY.md) 与 [兼容性与升级](兼容性与升级.md)。
|
|
29
|
+
|
|
20
30
|
## v0.3.0 - 可组合 Core 与 Kernel Host API v1
|
|
21
31
|
|
|
22
32
|
发布日期:2026-08-06。
|
package/docs/DEMO.md
CHANGED
|
@@ -78,6 +78,31 @@ curl -fsSL https://www.bailinghub.com/install.sh | env \
|
|
|
78
78
|
- token:`bailing-demo-client-token`
|
|
79
79
|
- 可调用路由:`demo_support`
|
|
80
80
|
|
|
81
|
+
## 控制台导入与无状态只读 profile
|
|
82
|
+
|
|
83
|
+
Core 同时提供一套可从“上手向导”导入的演示数据集。它只导入调度目标、工具源、路由和接入方等配置;不伪造任务、审批、成本或审计记录。导入后运行 smoke,才会由真实调用生成 job 和 trace。
|
|
84
|
+
|
|
85
|
+
配置由运行环境注入:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
DEMO_BUSINESS_URL=http://127.0.0.1:19080
|
|
89
|
+
DEMO_TOOL_SECRET=<independent-random-secret>
|
|
90
|
+
DEMO_PROFILE=stateless-readonly
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- `full-local`:Docker 本地完整演示,包含查单、工单、退款审批和故障工具;
|
|
94
|
+
- `stateless-readonly`:共享或宿主式体验环境,`demo-business` 必须绑定本机回环地址,只声明订单查询与故障观测工具,不保存请求状态、不使用 Hub 回调,也不创建公开聊天入口。
|
|
95
|
+
|
|
96
|
+
Core 用 `bz_demo_datasets` 中的持久 ownership manifest 记录它实际创建的固定对象和指纹。再次导入只刷新已证明归属的对象;同名占用、指纹漂移或其他配置引用都会返回 `409`,不猜测所有权。清理只删除 manifest 能证明且未被修改的演示配置,任务、消息、trace 和审计账本会继续保留。
|
|
97
|
+
|
|
98
|
+
对应的 Core 后台 API 为:
|
|
99
|
+
|
|
100
|
+
- `GET /admin/api/demo-dataset/status`
|
|
101
|
+
- `POST /admin/api/demo-dataset/import`
|
|
102
|
+
- `DELETE /admin/api/demo-dataset`
|
|
103
|
+
|
|
104
|
+
导入与清理同时要求 `targets:write`、`tools:write`、`routes:write` 和 `clients:write`;查看状态要求审计读权限或上述聚合写权限。
|
|
105
|
+
|
|
81
106
|
## 触发一条任务
|
|
82
107
|
|
|
83
108
|
```bash
|
|
@@ -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.3.
|
|
10
|
+
- Stable baseline: `v0.3.1`;
|
|
11
11
|
- Data: the bundled demo orders, tickets, refunds, and failure probe;
|
|
12
12
|
- Expected time: about 20 minutes after images and dependencies are available;
|
|
13
13
|
- Not required: a real model key, production API, production credential, or real business data.
|
|
@@ -32,7 +32,7 @@ curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
|
32
32
|
cd "$HOME/bailinghub"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The installer pulls the official `v0.3.
|
|
35
|
+
The installer pulls the official `v0.3.1` images by default, generates random tokens and an admin password, starts the services, and runs the smoke test. The initial administrator is created only when the administrator table is empty; restarting, upgrading, recreating containers, or reinstalling against the same persistent database does not overwrite a changed password. The optional `/metrics` endpoint remains disabled and does not affect core validation. Keep the reported version, install mode, elapsed time, and the commands printed under `常用命令`, but never include passwords or tokens in your report. After Docker is installed, the current non-root login usually still needs the printed `sudo docker compose ...` commands; Docker group membership may not take effect until the next login.
|
|
36
36
|
|
|
37
37
|
If the default directory is already in use, choose a new empty directory instead of overwriting an existing deployment:
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ cd "$HOME/bailinghub-validation"
|
|
|
46
46
|
### Path B: local source reproduction
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
git clone --depth 1 --branch v0.3.
|
|
49
|
+
git clone --depth 1 --branch v0.3.1 https://github.com/bailinghub/bailinghub.git
|
|
50
50
|
cd bailinghub
|
|
51
51
|
git rev-parse HEAD
|
|
52
52
|
export BAILING_TOKEN="$(openssl rand -hex 32)"
|
|
@@ -164,6 +164,7 @@ After the core task passes, you may continue with:
|
|
|
164
164
|
- [Trusted rich rendering and chat reliability](RELEASE_NOTES_v0.1.15.en.md).
|
|
165
165
|
- [Bounded tool runtime and resilient semantic retrieval](RELEASE_NOTES_v0.1.16.en.md).
|
|
166
166
|
- [Composable Core and Kernel Host API v1](RELEASE_NOTES_v0.3.0.en.md).
|
|
167
|
+
- [PDF parsing security update](RELEASE_NOTES_v0.3.1.en.md).
|
|
167
168
|
|
|
168
169
|
Select the relevant track in the same Issue form and disclose whether you received direct maintainer assistance.
|
|
169
170
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## 验证范围
|
|
8
8
|
|
|
9
9
|
- 验证对象:BailingHub 开源版 Docker demo;
|
|
10
|
-
- 稳定基线:`v0.3.
|
|
10
|
+
- 稳定基线:`v0.3.1`;
|
|
11
11
|
- 数据范围:仓库自带的 demo 订单、工单、退款和故障工具;
|
|
12
12
|
- 预计用时:镜像和依赖下载完成后约 20 分钟;
|
|
13
13
|
- 不需要:真实大模型 Key、生产 API、生产凭据或真实业务数据。
|
|
@@ -32,7 +32,7 @@ curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
|
32
32
|
cd "$HOME/bailinghub"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
脚本默认拉取 `v0.3.
|
|
35
|
+
脚本默认拉取 `v0.3.1` 官方镜像,生成随机 Token 与后台密码,启动服务并自动运行基础体检。首次管理员只在数据库管理员表为空时创建;对同一持久化数据库进行重启、升级、容器重建或重新安装,不会覆盖已经修改的管理员密码。可选 `/metrics` 端点默认关闭,不影响基础验证。请保留终端输出中的版本、安装模式、耗时和“常用命令”,但不要把密码或 Token 写入反馈。新安装 Docker 后,当前非 root 会话通常仍需使用脚本打印的 `sudo docker compose ...` 命令;重新登录后 Docker 组权限才可能生效。
|
|
36
36
|
|
|
37
37
|
如果默认目录已被占用,请使用一个新的空目录,不要覆盖现有部署:
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ cd "$HOME/bailinghub-validation"
|
|
|
46
46
|
### 路径 B:本地源码复现
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
git clone --depth 1 --branch v0.3.
|
|
49
|
+
git clone --depth 1 --branch v0.3.1 https://github.com/bailinghub/bailinghub.git
|
|
50
50
|
cd bailinghub
|
|
51
51
|
git rev-parse HEAD
|
|
52
52
|
export BAILING_TOKEN="$(openssl rand -hex 32)"
|
|
@@ -164,6 +164,7 @@ docker compose exec -T bailinghub npm run demo:e2e
|
|
|
164
164
|
- [可信富内容渲染与聊天可靠性](RELEASE_NOTES_v0.1.15.md)。
|
|
165
165
|
- [工具运行时收敛与语义检索韧性](RELEASE_NOTES_v0.1.16.md)。
|
|
166
166
|
- [可组合 Core 与 Kernel Host API v1](RELEASE_NOTES_v0.3.0.md)。
|
|
167
|
+
- [PDF 解析安全更新](RELEASE_NOTES_v0.3.1.md)。
|
|
167
168
|
|
|
168
169
|
扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
|
|
169
170
|
|
package/docs/README.en.md
CHANGED
|
@@ -91,6 +91,8 @@ This directory contains public documentation for the open-source BailingHub proj
|
|
|
91
91
|
| [RELEASE_NOTES_v0.2.0.md](RELEASE_NOTES_v0.2.0.md) | Chinese `v0.2.0` release notes. |
|
|
92
92
|
| [RELEASE_NOTES_v0.3.0.en.md](RELEASE_NOTES_v0.3.0.en.md) | `v0.3.0` composable Core and Kernel Host API v1 release notes. |
|
|
93
93
|
| [RELEASE_NOTES_v0.3.0.md](RELEASE_NOTES_v0.3.0.md) | Chinese `v0.3.0` release notes. |
|
|
94
|
+
| [RELEASE_NOTES_v0.3.1.en.md](RELEASE_NOTES_v0.3.1.en.md) | `v0.3.1` PDF parsing security update. |
|
|
95
|
+
| [RELEASE_NOTES_v0.3.1.md](RELEASE_NOTES_v0.3.1.md) | Chinese `v0.3.1` release notes. |
|
|
94
96
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | First public release notes. |
|
|
95
97
|
| [CHANGELOG.en.md](CHANGELOG.en.md) | Public changelog format and current release summary. |
|
|
96
98
|
| [COMPATIBILITY.en.md](COMPATIBILITY.en.md) | Versioning, compatibility, migration, and schema discipline. |
|
package/docs/README.md
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
| [RELEASE_NOTES_v0.2.0.en.md](RELEASE_NOTES_v0.2.0.en.md) | English `v0.2.0` tool catalog access protection and active verification release notes. |
|
|
105
105
|
| [RELEASE_NOTES_v0.3.0.md](RELEASE_NOTES_v0.3.0.md) | `v0.3.0` 可组合 Core 与 Kernel Host API v1 说明。 |
|
|
106
106
|
| [RELEASE_NOTES_v0.3.0.en.md](RELEASE_NOTES_v0.3.0.en.md) | English `v0.3.0` composable Core and Kernel Host API v1 release notes. |
|
|
107
|
+
| [RELEASE_NOTES_v0.3.1.md](RELEASE_NOTES_v0.3.1.md) | `v0.3.1` PDF 解析安全更新说明。 |
|
|
108
|
+
| [RELEASE_NOTES_v0.3.1.en.md](RELEASE_NOTES_v0.3.1.en.md) | English `v0.3.1` PDF parsing security update. |
|
|
107
109
|
| [RELEASE_NOTES_v0.1.0.md](RELEASE_NOTES_v0.1.0.md) | 首个公开版本的 GitHub Release 草稿。 |
|
|
108
110
|
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | English release notes. |
|
|
109
111
|
| [CHANGELOG.md](CHANGELOG.md) | 公开发布后的对外变更记录。 |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# BailingHub v0.3.1: PDF Parsing Security Update
|
|
2
|
+
|
|
3
|
+
`v0.3.1` is a security patch on top of `v0.3.0`. It upgrades the server-side `pdfjs-dist` dependency used to extract text from uploaded PDFs, fixes the arbitrary JavaScript execution risk described in [GHSA-hq66-cqwq-w95j](https://github.com/advisories/GHSA-hq66-cqwq-w95j), and adapts resource cleanup to PDF.js 6.
|
|
4
|
+
|
|
5
|
+
## Who Should Upgrade
|
|
6
|
+
|
|
7
|
+
Every `v0.3.0` deployment that accepts PDF uploads from users or business workflows should upgrade promptly. Deployments that do not currently expose PDF uploads should also update so that a known-vulnerable parser is not carried into future use.
|
|
8
|
+
|
|
9
|
+
## Changes
|
|
10
|
+
|
|
11
|
+
- Upgraded `pdfjs-dist` from `5.7.284` to `6.2.108`.
|
|
12
|
+
- Always destroys the `PDFDocumentLoadingTask` after successful or failed parsing, matching the PDF.js 6 API and releasing resources reliably.
|
|
13
|
+
- Restored the dependency audit to zero known vulnerabilities and synchronized the third-party notice with the lockfile.
|
|
14
|
+
|
|
15
|
+
## Compatibility and Boundaries
|
|
16
|
+
|
|
17
|
+
- No database migration or new configuration is required.
|
|
18
|
+
- The Client API, Kernel Host API v1, chat protocol, Executor Protocol, ACC, tool signatures, approval semantics, and final business authorization are unchanged.
|
|
19
|
+
- Plain-text, Word document, and other existing file paths are unchanged.
|
|
20
|
+
- This patch does not raise the Node.js runtime floor; the dependency continues to require a supported Node.js release at or above `22.13.0`.
|
|
21
|
+
|
|
22
|
+
## Upgrade
|
|
23
|
+
|
|
24
|
+
Docker deployments should pull the `0.3.1` images and restart through their existing procedure. Hosts that compose the Core npm package should update the exact version and lockfile:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install --save-exact bailinghub@0.3.1
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Validation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm audit --audit-level=low
|
|
34
|
+
npm run release:check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Validation covers real PDF text extraction, failure-path cleanup, type checking, dependency audit, OSS boundaries, the npm artifact, and image-version consistency.
|
|
38
|
+
|
|
39
|
+
## Related Documentation
|
|
40
|
+
|
|
41
|
+
- [v0.3.0 Composable Core and Kernel Host API v1](RELEASE_NOTES_v0.3.0.en.md)
|
|
42
|
+
- [Compatibility and upgrades](COMPATIBILITY.en.md)
|
|
43
|
+
- [Security policy](../SECURITY.md)
|
|
44
|
+
- [中文发布说明](RELEASE_NOTES_v0.3.1.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# BailingHub v0.3.1:PDF 解析安全更新
|
|
2
|
+
|
|
3
|
+
`v0.3.1` 是基于 `v0.3.0` 的安全补丁版本。它升级服务端用于提取上传 PDF 文本的 `pdfjs-dist`,修复 [GHSA-hq66-cqwq-w95j](https://github.com/advisories/GHSA-hq66-cqwq-w95j) 所述的任意 JavaScript 执行风险,并适配 PDF.js 6 的资源释放接口。
|
|
4
|
+
|
|
5
|
+
## 谁需要升级
|
|
6
|
+
|
|
7
|
+
所有运行 `v0.3.0`、且允许用户或业务流程上传 PDF 的部署都应尽快升级。即使当前没有主动使用 PDF 上传,也建议统一升级,避免未来启用文件解析时继续携带已知风险版本。
|
|
8
|
+
|
|
9
|
+
## 主要变化
|
|
10
|
+
|
|
11
|
+
- `pdfjs-dist` 从 `5.7.284` 升级到 `6.2.108`。
|
|
12
|
+
- PDF 解析完成或失败后统一销毁 `PDFDocumentLoadingTask`,适配 PDF.js 6 并确保资源释放。
|
|
13
|
+
- 依赖审计恢复为 0 漏洞,第三方依赖清单同步到实际锁定版本。
|
|
14
|
+
|
|
15
|
+
## 兼容性与边界
|
|
16
|
+
|
|
17
|
+
- 没有新增数据库迁移或配置项。
|
|
18
|
+
- Client API、Kernel Host API v1、聊天协议、Executor Protocol、ACC、工具签名、审批语义和业务系统最终授权均未改变。
|
|
19
|
+
- 普通文本、Word 文档与其他既有文件处理路径不变。
|
|
20
|
+
- Node.js 运行要求没有因本补丁提高;依赖仍要求 Node.js `22.13.0` 或更高的受支持版本。
|
|
21
|
+
|
|
22
|
+
## 升级
|
|
23
|
+
|
|
24
|
+
Docker 部署应拉取 `0.3.1` 镜像并按既有流程重启。通过 npm 组合 Core 的宿主应精确更新版本和锁文件:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install --save-exact bailinghub@0.3.1
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 验证
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm audit --audit-level=low
|
|
34
|
+
npm run release:check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
重点覆盖真实 PDF 文本抽取、失败路径资源释放、类型检查、依赖审计、OSS 边界、npm 制品和镜像版本一致性。
|
|
38
|
+
|
|
39
|
+
## 相关文档
|
|
40
|
+
|
|
41
|
+
- [v0.3.0 可组合 Core 与 Kernel Host API v1](RELEASE_NOTES_v0.3.0.md)
|
|
42
|
+
- [兼容性与升级](兼容性与升级.md)
|
|
43
|
+
- [安全策略](../SECURITY.md)
|
|
44
|
+
- [English release notes](RELEASE_NOTES_v0.3.1.en.md)
|