bailinghub 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +2 -2
- package/README.md +2 -1
- package/THIRD_PARTY_NOTICES.md +13 -13
- package/docker-compose.images.yml +2 -2
- package/docs/CHANGELOG.en.md +10 -0
- package/docs/CHANGELOG.md +10 -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 +2 -2
- package/scripts/check-doc-links.mjs +1 -0
- package/scripts/check-image-tags.sh +1 -1
- 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 +2 -1
- package/src/adapters/llm/file.ts +2 -2
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
|
@@ -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 |
|
|
@@ -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。
|
|
@@ -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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bailinghub",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Open-source ACC runtime and agent control plane for existing business systems.",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"mammoth": "^1.12.0",
|
|
107
107
|
"mysql2": "^3.11.4",
|
|
108
|
-
"pdfjs-dist": "^
|
|
108
|
+
"pdfjs-dist": "^6.2.108",
|
|
109
109
|
"tsx": "^4.19.2",
|
|
110
110
|
"yaml": "^2.9.0"
|
|
111
111
|
},
|
|
@@ -97,6 +97,7 @@ const englishCompanions = {
|
|
|
97
97
|
'docs/RELEASE_NOTES_v0.1.16.md': 'docs/RELEASE_NOTES_v0.1.16.en.md',
|
|
98
98
|
'docs/RELEASE_NOTES_v0.2.0.md': 'docs/RELEASE_NOTES_v0.2.0.en.md',
|
|
99
99
|
'docs/RELEASE_NOTES_v0.3.0.md': 'docs/RELEASE_NOTES_v0.3.0.en.md',
|
|
100
|
+
'docs/RELEASE_NOTES_v0.3.1.md': 'docs/RELEASE_NOTES_v0.3.1.en.md',
|
|
100
101
|
'docs/TOOLS_DESIGN.md': 'docs/TOOLS_DESIGN.en.md',
|
|
101
102
|
'docs/TOOLS_MODEL.md': 'docs/TOOLS_MODEL.en.md',
|
|
102
103
|
'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.3.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.3.1"
|
|
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}"
|
package/scripts/install.sh
CHANGED
|
@@ -275,7 +275,7 @@ write_env() {
|
|
|
275
275
|
TOOL_SECRET="${DEMO_TOOL_SECRET:-$(secret)}"
|
|
276
276
|
CLIENT_TOKEN="${DEMO_CLIENT_TOKEN:-$(secret)}"
|
|
277
277
|
IMAGE_TAG="${BAILING_IMAGE_TAG:-$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$APP_DIR/package.json" | head -1)}"
|
|
278
|
-
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.3.
|
|
278
|
+
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.3.1"
|
|
279
279
|
IMAGE_REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_IMAGE_REGISTRY}"
|
|
280
280
|
IMAGE_NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_IMAGE_NAMESPACE}"
|
|
281
281
|
cat > "$ENV_FILE" <<EOF
|
|
@@ -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.3.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.3.1"
|
|
13
13
|
NODE_IMAGE="${BAILING_NODE_IMAGE:-node:22-bookworm-slim}"
|
|
14
14
|
PLATFORM="${BAILING_IMAGE_PLATFORM:-linux/amd64}"
|
|
15
15
|
PUSH="${BAILING_PUSH_IMAGES:-0}"
|
|
@@ -121,6 +121,7 @@ const requiredFiles = [
|
|
|
121
121
|
'docs/RELEASE_NOTES_v0.1.16.md',
|
|
122
122
|
'docs/RELEASE_NOTES_v0.2.0.md',
|
|
123
123
|
'docs/RELEASE_NOTES_v0.3.0.md',
|
|
124
|
+
'docs/RELEASE_NOTES_v0.3.1.md',
|
|
124
125
|
'docs/CHANGELOG.md',
|
|
125
126
|
];
|
|
126
127
|
for (const file of requiredFiles) requireFile(file);
|
|
@@ -129,7 +130,7 @@ assertIncludes('README.md', [
|
|
|
129
130
|
'assets/bailinghub-lockup.png',
|
|
130
131
|
'assets/architecture-overview.zh-CN.png',
|
|
131
132
|
'THIRD_PARTY_NOTICES.md',
|
|
132
|
-
'https://trial.bailinghub.com/
|
|
133
|
+
'https://trial.bailinghub.com/register/',
|
|
133
134
|
'issues/new?template=bug_report.yml',
|
|
134
135
|
'curl -fsSL https://www.bailinghub.com/install.sh | sh',
|
|
135
136
|
'BAILING_INSTALL_MODE=source',
|
package/src/adapters/llm/file.ts
CHANGED
|
@@ -86,8 +86,8 @@ async function extractPdfText(ab: ArrayBuffer): Promise<FileExtractResult> {
|
|
|
86
86
|
standardFontDataUrl: new URL('../../../node_modules/pdfjs-dist/standard_fonts/', import.meta.url).href,
|
|
87
87
|
verbosity: pdfjs.VerbosityLevel.ERRORS,
|
|
88
88
|
});
|
|
89
|
-
const doc = await task.promise;
|
|
90
89
|
try {
|
|
90
|
+
const doc = await task.promise;
|
|
91
91
|
const pages: string[] = [];
|
|
92
92
|
for (let i = 1; i <= doc.numPages; i++) {
|
|
93
93
|
const page = await doc.getPage(i);
|
|
@@ -111,7 +111,7 @@ async function extractPdfText(ab: ArrayBuffer): Promise<FileExtractResult> {
|
|
|
111
111
|
text: text || 'PDF 未抽取到可用文本。它可能是扫描件/图片型 PDF,需要启用 OCR、视觉文档解析模型,或让业务侧提供文本化内容。',
|
|
112
112
|
};
|
|
113
113
|
} finally {
|
|
114
|
-
await
|
|
114
|
+
await task.destroy();
|
|
115
115
|
}
|
|
116
116
|
} catch (e) {
|
|
117
117
|
return { ok: false, parser: 'pdf', text: `PDF 文本抽取失败:${String(e).slice(0, 300)}` };
|