bailinghub 0.3.3 → 0.4.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 +3 -1
- package/README.md +4 -0
- package/docker-compose.images.yml +2 -2
- package/docs/CHANGELOG.en.md +58 -1
- package/docs/CHANGELOG.md +26 -1
- package/docs/COMPATIBILITY.en.md +25 -0
- package/docs/CONTRACT.en.md +91 -8
- package/docs/CONTRACT.md +39 -7
- package/docs/DEMO.en.md +6 -0
- package/docs/DEMO.md +2 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +9 -6
- package/docs/INDEPENDENT_VALIDATION.md +9 -6
- package/docs/QUICKSTART.en.md +20 -0
- package/docs/QUICKSTART.md +2 -2
- package/docs/README.en.md +4 -0
- package/docs/README.md +4 -0
- package/docs/RELEASE_NOTES_v0.3.4.en.md +38 -0
- package/docs/RELEASE_NOTES_v0.3.4.md +38 -0
- package/docs/RELEASE_NOTES_v0.4.0.en.md +39 -0
- package/docs/RELEASE_NOTES_v0.4.0.md +39 -0
- package/docs/STREAMING.en.md +32 -0
- package/docs/STREAMING.md +8 -2
- package/docs/WIDGET_RENDERERS.en.md +123 -6
- package/docs/WIDGET_RENDERERS.md +75 -6
- package/docs/user-guide/concepts.en.md +8 -1
- package/docs/user-guide/concepts.md +3 -1
- package/docs/user-guide/console-map.en.md +1 -2
- package/docs/user-guide/console-map.md +3 -3
- package/docs//345/205/274/345/256/271/346/200/247/344/270/216/345/215/207/347/272/247.md +9 -0
- package/package.json +1 -1
- package/schemas/config/chat-entry.schema.json +2 -1
- package/scripts/check-doc-links.mjs +2 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +5 -5
- package/scripts/e2e-console.mjs +38 -10
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +2 -0
- package/scripts/verify-github-repo.mjs +2 -0
- package/scripts/widget-renderer-test.mjs +244 -16
- package/src/core/config/config-models.test.ts +18 -1
- package/src/core/config/config-models.ts +25 -3
- package/src/core/config/config-schema.test.ts +2 -0
- package/src/core/contracts/types.ts +2 -1
- package/src/core/platform/chat-form.test.ts +147 -0
- package/src/core/platform/chat-form.ts +402 -0
- package/src/core/platform/version.ts +1 -1
- package/src/core/runtime/execution-runtime.test.ts +73 -4
- package/src/core/runtime/execution-runtime.ts +18 -1
- package/src/routes/chat-mount.test.ts +9 -1
- package/src/routes/chat.test.ts +319 -7
- package/src/routes/chat.ts +179 -28
- package/web/console/assets/{Accounts-08VltF2i.js → Accounts-DuUY2UJU.js} +1 -1
- package/web/console/assets/{Approvals-CqgmsMau.js → Approvals-B11mo1dy.js} +1 -1
- package/web/console/assets/{Audit-bPlpSQt3.js → Audit-CQwJRIJT.js} +1 -1
- package/web/console/assets/{BrandLockup-DhX07g3G.js → BrandLockup-BIF-h1pi.js} +1 -1
- package/web/console/assets/{Channels-BZe0pLgx.js → Channels-BIploUT-.js} +1 -1
- package/web/console/assets/ChatEntries-Cpg_WV-o.js +7 -0
- package/web/console/assets/ChatEntries-DsYtcXN6.css +1 -0
- package/web/console/assets/Clients--D7NQJKk.css +1 -0
- package/web/console/assets/{Clients-BVVZfX3r.js → Clients-DS29eUi2.js} +2 -2
- package/web/console/assets/{Cost-DANcjr_p.js → Cost-BF52tfU2.js} +1 -1
- package/web/console/assets/{Credentials-D_8tP2Xa.js → Credentials-SwfmQAv6.js} +1 -1
- package/web/console/assets/{Diagnostics-Bw1WImFe.js → Diagnostics-CJfbI_8p.js} +1 -1
- package/web/console/assets/{Executors-fuieN2Sl.js → Executors-CzlZlznA.js} +1 -1
- package/web/console/assets/{Kb-BaMi_7xf.js → Kb-CVX22U4k.js} +1 -1
- package/web/console/assets/{Login-Cmz2ppY8.js → Login-PoUVsBI-.js} +1 -1
- package/web/console/assets/{Projects-D6xIgFB3.js → Projects-DYlbjLQy.js} +1 -1
- package/web/console/assets/{Routes-B90i3ZNa.js → Routes-DSEvGujN.js} +1 -1
- package/web/console/assets/{Runs-9qpwotOj.js → Runs-B-TsYZEt.js} +1 -1
- package/web/console/assets/Setup-D7nxgn-9.css +1 -0
- package/web/console/assets/Setup-xiPXit_b.js +1 -0
- package/web/console/assets/{Shell-Dm6eFcl1.js → Shell-DNiWZOYB.js} +1 -1
- package/web/console/assets/{StorageBuckets-DY8WuJlM.js → StorageBuckets-Bjsc3pLd.js} +1 -1
- package/web/console/assets/{SystemSettings-O_NMPzq_.js → SystemSettings-CcKF2lJ9.js} +1 -1
- package/web/console/assets/{SystemStatus-Cok3S7S3.js → SystemStatus-Oj1xjxJn.js} +1 -1
- package/web/console/assets/{Targets-YWBoxqvy.js → Targets-y1KllVXT.js} +1 -1
- package/web/console/assets/{Tools-BgXDw7Mg.js → Tools-DoEP_y9x.js} +1 -1
- package/web/console/assets/{index-S_J0I0Zh.js → index-CxPIS6G7.js} +2 -2
- package/web/console/assets/{request-FM608Kfz.js → request-CBLNpLth.js} +1 -1
- package/web/console/assets/{schema-DWnFqTkB.js → schema-DzwLpuOy.js} +1 -1
- package/web/console/index.html +1 -1
- package/web/widget/widget.js +493 -14
- package/web-admin/src/pages/ChatEntries.vue +46 -23
- package/web-admin/src/pages/Clients.vue +2 -2
- package/web-admin/src/pages/Setup.vue +12 -8
- package/web/console/assets/ChatEntries-BweMx_CU.css +0 -1
- package/web/console/assets/ChatEntries-Ca0lcGqn.js +0 -7
- package/web/console/assets/Clients-DcTYN-Js.css +0 -1
- package/web/console/assets/Setup-BIjCiA2i.js +0 -1
- package/web/console/assets/Setup-BuyKFofL.css +0 -1
package/README.en.md
CHANGED
|
@@ -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.
|
|
232
|
+
- [Latest Release Notes](docs/RELEASE_NOTES_v0.4.0.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)
|
|
@@ -251,6 +251,8 @@ Useful reports include the business context, expected behavior, a minimal reprod
|
|
|
251
251
|
|
|
252
252
|
We welcome independent distributions, industry adaptations, executors, connectors, and independent ACC implementations. Community projects may keep their own names, directions, and governance. Reusable improvements are welcome upstream, and strong independent projects may request a future listing on the official ecosystem surface. A listing is not certification, a service warranty, or a transfer of maintenance responsibility. See [Community Derivatives And Ecosystem Collaboration](docs/ECOSYSTEM.en.md).
|
|
253
253
|
|
|
254
|
+
DeepSeek Harness users can install the independent community plugin [dsh-bailinghub](https://github.com/bailinghub/bailinghub-dsh-plugin) to submit and track governed tasks from the local Harness Web UI against a business route already connected to BailingHub. The plugin reuses the public Client API and the independent MCP Server, does not enter the BailingHub Core distribution, and does not imply DeepSeek development, certification, or endorsement.
|
|
255
|
+
|
|
254
256
|
## Open-Source Foundations and Third-Party Software
|
|
255
257
|
|
|
256
258
|
BailingHub adopts the open [Agent Capability Contract (ACC)](https://www.agentcapability.org), runs its service on Node.js and TypeScript, builds its console with Vue, Element Plus, and Pinia, and uses an independent MySQL service as the default persistent runtime.
|
package/README.md
CHANGED
|
@@ -229,6 +229,8 @@ BAILING_SMOKE_RUN_ROUTE=<route-key> npm run smoke
|
|
|
229
229
|
| `docs/RELEASE_NOTES_v0.3.1.md` | `v0.3.1` PDF 解析安全更新说明 |
|
|
230
230
|
| `docs/RELEASE_NOTES_v0.3.2.md` | `v0.3.2` 受管演示数据引导说明 |
|
|
231
231
|
| `docs/RELEASE_NOTES_v0.3.3.md` | `v0.3.3` npm 发布来源元数据纠偏说明 |
|
|
232
|
+
| `docs/RELEASE_NOTES_v0.3.4.md` | `v0.3.4` 匿名预览与可信业务身份引导说明 |
|
|
233
|
+
| `docs/RELEASE_NOTES_v0.4.0.md` | `v0.4.0` 原生对话表单与聊天入口控制说明 |
|
|
232
234
|
| `docs/RELEASE_NOTES_v0.1.0.md` | 首个公开版本的发布说明 |
|
|
233
235
|
| `docs/兼容性与升级.md` | 版本发布策略:SemVer、稳定契约、数据库结构纪律、发布记录要求 |
|
|
234
236
|
| `sql/` | 中枢**独立**状态库 DDL(`bz_` 前缀,按序号演进);数据库结构演进纪律见 [sql/README.md](sql/README.md) |
|
|
@@ -261,6 +263,8 @@ BailingHub 当前公开版本仍处于早期验证阶段。我们希望它经得
|
|
|
261
263
|
|
|
262
264
|
我们欢迎社区创建独立发行版、行业适配、执行器、连接器和 ACC 独立实现。衍生项目可以保持自己的名称、方向与治理;通用改进欢迎回到上游,优秀的独立项目未来也可以申请在官方生态页面展示。展示不代表官方认证、服务担保或维护责任转移。完整原则见 [社区衍生与生态合作](docs/ECOSYSTEM.md)。
|
|
263
265
|
|
|
266
|
+
DeepSeek Harness 用户可以安装独立社区插件 [dsh-bailinghub](https://github.com/bailinghub/bailinghub-dsh-plugin),直接从本机 Harness Web UI 向已接入 BailingHub 的业务 route 发起并跟踪受控任务。该插件复用公开 Client API 与独立 MCP Server,不进入 BailingHub Core 发行包,也不代表 DeepSeek 官方开发、认证或背书。
|
|
267
|
+
|
|
264
268
|
## 开源基础与第三方软件
|
|
265
269
|
|
|
266
270
|
百灵中枢采用开放的 [ACC(Agent Capability Contract)](https://www.agentcapability.org) 能力声明契约,服务端基于 Node.js / TypeScript,控制台基于 Vue / Element Plus / Pinia,默认使用独立的 MySQL 服务持久化运行状态。
|
|
@@ -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.
|
|
21
|
+
image: ${BAILING_DEMO_BUSINESS_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailing-demo-business:0.4.0}
|
|
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.
|
|
32
|
+
image: ${BAILINGHUB_IMAGE:-crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.4.0}
|
|
33
33
|
depends_on:
|
|
34
34
|
mysql:
|
|
35
35
|
condition: service_healthy
|
package/docs/CHANGELOG.en.md
CHANGED
|
@@ -22,7 +22,64 @@ Each public version should describe:
|
|
|
22
22
|
|
|
23
23
|
## Unreleased
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
## v0.4.0 - Native Conversational Forms and Chat-Entry Controls
|
|
26
|
+
|
|
27
|
+
Released on 2026-08-25.
|
|
28
|
+
|
|
29
|
+
- **Origin allowlist guardrails**: chat-entry saves now accept only
|
|
30
|
+
`scheme://host[:port]`, canonicalize and deduplicate entries, and report the
|
|
31
|
+
persisted restriction count in the console. A non-allowlisted browser Origin
|
|
32
|
+
is rejected with 403 before a conversation job can start.
|
|
33
|
+
- **Default-open chat entries**: appearance configuration adds an opt-in,
|
|
34
|
+
default-false `default_open` setting. When enabled, existing official widget
|
|
35
|
+
embeds open on load without changing page markup. The existing
|
|
36
|
+
`data-open="1"` force-open behavior remains compatible.
|
|
37
|
+
- **Native conversational forms**: the dependency-free official widget adds
|
|
38
|
+
constrained `bailing-form` v1 controls for text, textarea, number, date,
|
|
39
|
+
boolean, single-select, and multi-select fields, with client/server
|
|
40
|
+
validation, read-only receipts, and history recovery.
|
|
41
|
+
- **Non-blocking continuation contract**: `POST /chat/:entry` compatibly adds
|
|
42
|
+
`interaction_response`, translating submit or cancel into a new user message
|
|
43
|
+
and a new job in the same thread. The source job still reaches `done`; there
|
|
44
|
+
is no `input_required` or new SSE state.
|
|
45
|
+
- **Correlation, idempotency, and security**: the server reloads the
|
|
46
|
+
authoritative form after matching source job, entry, identity, and thread,
|
|
47
|
+
then deduplicates by `submission_id`. Forms cannot request credential or
|
|
48
|
+
payment secrets and do not replace tool approval, business authorization, or
|
|
49
|
+
side-effect gates.
|
|
50
|
+
- **Presentation negotiation**: the LLM receives constrained form-output
|
|
51
|
+
guidance only when the client explicitly advertises `bailing-form`. Other
|
|
52
|
+
clients continue with text questions, and `bailing-chart` remains an
|
|
53
|
+
independent compatible capability.
|
|
54
|
+
- **Ecosystem documentation discovery**: the README links to an independently
|
|
55
|
+
maintained community plugin for DeepSeek Harness. It is not part of
|
|
56
|
+
BailingHub Core and does not imply official DeepSeek development,
|
|
57
|
+
certification, endorsement, or adoption.
|
|
58
|
+
- **Contract and integration impact**: the public boundary advances additively
|
|
59
|
+
to `bailing.contract.v2.14`; `WIDGET_API` and `rendererApiVersion` remain 1,
|
|
60
|
+
with no database migration. Client API v1, Kernel Host API v1, ACC, SDKs,
|
|
61
|
+
tool signatures, approval semantics, and final business authorization are
|
|
62
|
+
unchanged.
|
|
63
|
+
- **Validation**: `npm run typecheck`, focused conversational-form contract and
|
|
64
|
+
route tests, `npm run widget:renderer:test`, `npm run web-admin:check`,
|
|
65
|
+
`npm run docs:check`, `npm test`, and a real local-browser form interaction
|
|
66
|
+
check.
|
|
67
|
+
- **Related docs**: [RELEASE_NOTES_v0.4.0.en.md](RELEASE_NOTES_v0.4.0.en.md),
|
|
68
|
+
[HTTP contract](CONTRACT.en.md), [Widget renderer and form
|
|
69
|
+
contract](WIDGET_RENDERERS.en.md), [Streaming protocol](STREAMING.en.md), and
|
|
70
|
+
[Compatibility](COMPATIBILITY.en.md).
|
|
71
|
+
|
|
72
|
+
## v0.3.4 - Anonymous Preview and Trusted Business Identity Guidance
|
|
73
|
+
|
|
74
|
+
Released on 2026-08-14.
|
|
75
|
+
|
|
76
|
+
- **Correct entry semantics**: the console and standalone page now label the former generic trial-chat action as **Anonymous Preview** and explain that it neither inherits the BailingHub administrator session nor provides a standalone business-login surface.
|
|
77
|
+
- **No-subject guidance**: without a trusted ticket signed by the business backend, the Agent directs the user back to the real business system to sign in and reopen or refresh the assistant. It does not ask for an account, password, token, or user ID.
|
|
78
|
+
- **Separate demo validation path**: after importing demo configuration, Getting Started presents a manual **Run Demo-Subject Smoke** action that creates a real job and trace. Import does not run tasks automatically, and the BailingHub administrator is not promoted into a business subject.
|
|
79
|
+
- **Unchanged security boundary**: without a verified subject, all `subject.required:true` tools, including read-only queries and writes, remain hidden from the Agent. The business system continues to make final authorization decisions.
|
|
80
|
+
- **Database and contracts**: there is no new migration, Schema, API, or protocol change. `054_demo_dataset_state.sql` remains the latest migration.
|
|
81
|
+
- **Validation**: complete `npm run release:check`, no-subject tool-assembly tests, anonymous-preview page contracts, real-browser console E2E, and npm artifact verification.
|
|
82
|
+
- **Related docs**: [RELEASE_NOTES_v0.3.4.en.md](RELEASE_NOTES_v0.3.4.en.md), [Quickstart](QUICKSTART.en.md), [Chat entry and identity contract](CONTRACT.en.md), and [Docker Demo](DEMO.en.md).
|
|
26
83
|
|
|
27
84
|
## v0.3.3 - npm Publication Metadata Correction
|
|
28
85
|
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -15,7 +15,32 @@
|
|
|
15
15
|
|
|
16
16
|
## Unreleased
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
## v0.4.0 - 原生对话表单与聊天入口控制
|
|
19
|
+
|
|
20
|
+
发布日期:2026-08-25。
|
|
21
|
+
|
|
22
|
+
- **Origin 白名单防误配**:聊天入口保存时仅接受 `scheme://host[:port]`,统一规范化、去重并在控制台回显实际限制数;非白名单浏览器 Origin 在进入对话任务前返回 403。
|
|
23
|
+
- **聊天入口默认展开**:外观配置新增默认关闭的 `default_open`;开启后已嵌入的官方 Widget 加载即展开,业务页面无需改脚本。既有 `data-open="1"` 强制展开行为保持兼容。
|
|
24
|
+
- **原生对话表单**:官方零依赖 Widget 新增受限 `bailing-form` v1,支持文本、多行文本、数字、日期、布尔、单选和多选,含客户端/服务端双校验、只读回执与历史恢复。
|
|
25
|
+
- **非阻塞续聊契约**:`POST /chat/:entry` 兼容新增 `interaction_response`,把表单提交/取消规范化为同 thread 的新用户消息和新 job;源 job 仍正常 `done`,不新增 `input_required` 或 SSE 状态。
|
|
26
|
+
- **关联、幂等与安全**:服务端按源 job/入口/身份/thread 重读权威表单验值,以 `submission_id` 去重;表单不能要求凭据或支付秘密,不替代工具审批、业务授权或副作用闸门。
|
|
27
|
+
- **展示能力协商**:只在客户端明确声明 `bailing-form` 时向 LLM 注入受约束输出提示;无能力客户端继续使用文字提问,`bailing-chart` 能力保持独立兼容。
|
|
28
|
+
- **生态文档发现**:README 增加独立维护的 DeepSeek Harness 社区插件链接;它不进入 BailingHub Core,也不代表 DeepSeek 官方开发、认证、背书或采用。
|
|
29
|
+
- **契约与对接影响**:公开边界增量到 `bailing.contract.v2.14`;`WIDGET_API` / `rendererApiVersion` 仍为 1,无数据库迁移。Client API v1、Kernel Host API v1、ACC、SDK、工具签名、审批语义和最终业务授权不变。
|
|
30
|
+
- **验证方式**:`npm run typecheck`、对话表单契约/路由测试、`npm run widget:renderer:test`、`npm run web-admin:check`、`npm run docs:check`、`npm test` 与本地真实浏览器表单交互检查。
|
|
31
|
+
- **相关文档**:[RELEASE_NOTES_v0.4.0.md](RELEASE_NOTES_v0.4.0.md)、[公开运行时契约](CONTRACT.md)、[Widget 渲染与表单契约](WIDGET_RENDERERS.md)、[流式协议](STREAMING.md) 与[兼容性与升级](兼容性与升级.md)。
|
|
32
|
+
|
|
33
|
+
## v0.3.4 - 匿名预览与可信业务身份引导
|
|
34
|
+
|
|
35
|
+
发布日期:2026-08-14。
|
|
36
|
+
|
|
37
|
+
- **入口语义纠偏**:控制台和独立页将原“试聊”明确标识为“匿名预览”,说明它不继承中枢管理员登录态,也没有独立业务登录入口。
|
|
38
|
+
- **无主体引导**:未收到业务后端签发的可信票据时,Agent 会引导用户返回真实业务系统登录并重新打开或刷新助手,不索要账号、密码、Token 或用户 ID。
|
|
39
|
+
- **演示验证分流**:导入演示配置后,上手向导以手动“运行演示主体 Smoke”验证真实 job 和 trace;导入不自动运行任务,中枢管理员不会被提升为业务主体。
|
|
40
|
+
- **安全边界不变**:无验签主体时,所有 `subject.required:true` 工具(包括只读查询和写操作)仍对 Agent 不可见;业务系统仍做最终授权。
|
|
41
|
+
- **数据库与契约**:没有新增迁移、Schema 或 API/协议变化;最新迁移仍为 `054_demo_dataset_state.sql`。
|
|
42
|
+
- **验证方式**:完整 `npm run release:check`、无主体工具装配测试、匿名预览页契约、控制台真实浏览器 E2E 与 npm 制品核对。
|
|
43
|
+
- **相关文档**:[RELEASE_NOTES_v0.3.4.md](RELEASE_NOTES_v0.3.4.md)、[快速开始](QUICKSTART.md)、[聊天入口与身份契约](CONTRACT.md) 与 [Docker Demo](DEMO.md)。
|
|
19
44
|
|
|
20
45
|
## v0.3.3 - npm 发布元数据纠偏
|
|
21
46
|
|
package/docs/COMPATIBILITY.en.md
CHANGED
|
@@ -82,6 +82,31 @@ transition window. The widget core remains dependency-free; see
|
|
|
82
82
|
[WIDGET_RENDERERS.en.md](WIDGET_RENDERERS.en.md) for registration, cleanup, and
|
|
83
83
|
fallback rules.
|
|
84
84
|
|
|
85
|
+
The `bailing-form` v1 addition under `bailing.contract.v2.14` follows that
|
|
86
|
+
compatibility rule:
|
|
87
|
+
|
|
88
|
+
- Existing `{message,...}` chat requests are unchanged.
|
|
89
|
+
`interaction_response` is an optional alternative input to
|
|
90
|
+
`POST /chat/:entry`. This public Chat addition is outside
|
|
91
|
+
`bailing.client-api.v1` and does not change Client API, Kernel Host API, ACC,
|
|
92
|
+
or SDK versions.
|
|
93
|
+
- The official widget adds the built-in `bailing-form` type. Older or custom
|
|
94
|
+
clients still fall back to its safe fenced code block. A custom client should
|
|
95
|
+
advertise `client_capabilities.renderers:["bailing-form"]` only after it
|
|
96
|
+
implements the complete validation and response lifecycle.
|
|
97
|
+
- The renderer `mount` context gains optional `message` and `respond`
|
|
98
|
+
properties. Existing JavaScript destructuring ignores additional properties,
|
|
99
|
+
so both `WIDGET_API` and `rendererApiVersion` remain 1.
|
|
100
|
+
- A form response creates a new job in the same thread. It changes neither the
|
|
101
|
+
source job's terminal state, the `bailing.chat.stream.v1` event set, nor the
|
|
102
|
+
database schema. Existing proxies, SSE clients, and upgrade flows need no new
|
|
103
|
+
waiting state.
|
|
104
|
+
|
|
105
|
+
The official `widget.js` and Chat endpoints ship from the same Hub artifact, so
|
|
106
|
+
a normal upgrade obtains both rendering and response handling. Clear any
|
|
107
|
+
separately cached legacy widget during rollout, and do not advertise the new
|
|
108
|
+
capability from a custom client against an older Hub.
|
|
109
|
+
|
|
85
110
|
## URL Tool Catalog Access Policy Upgrade
|
|
86
111
|
|
|
87
112
|
The release that introduces `053_tool_spec_access_policy.sql` adds two nullable columns to `bz_tool_providers`. Keep the normal backup, `db:init`, and restart order. The public configuration surface always has exactly two values, `signed_required` and `public_allowed`; new URL providers default to the former.
|
package/docs/CONTRACT.en.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HTTP Contract
|
|
2
2
|
|
|
3
|
-
> Current contract: `bailing.contract.v2.
|
|
3
|
+
> Current contract: `bailing.contract.v2.14`. This is the only network boundary between a business system and BailingHub.
|
|
4
4
|
|
|
5
5
|
This document summarizes the public wire contract between a business system and BailingHub.
|
|
6
6
|
|
|
@@ -84,6 +84,33 @@ The business system must verify the callback signature before consuming the payl
|
|
|
84
84
|
|
|
85
85
|
## Embedded Chat Streaming
|
|
86
86
|
|
|
87
|
+
### Anonymous preview identity boundary
|
|
88
|
+
|
|
89
|
+
The standalone preview link from the Chat Entries console is always anonymous.
|
|
90
|
+
It carries no business ticket, does not inherit a BailingHub administrator
|
|
91
|
+
session, and has no business-login surface of its own. Without a trusted acting
|
|
92
|
+
subject, every tool declared with `subject.required: true` remains hidden,
|
|
93
|
+
including read-only business queries. Administrators validate the built-in demo
|
|
94
|
+
through the Getting Started smoke action. A real embedded page must obtain a
|
|
95
|
+
short-lived visitor ticket from its own authenticated business backend. A
|
|
96
|
+
BailingHub administrator identity must never be promoted to a business acting
|
|
97
|
+
subject.
|
|
98
|
+
|
|
99
|
+
The public entry configuration includes optional appearance settings. The
|
|
100
|
+
`default_open` flag defaults to `false`; when it is `true`, the official widget
|
|
101
|
+
opens its panel after loading. Existing embeds with `data-open="1"` also keep
|
|
102
|
+
forcing the panel open, independently of this entry setting. Because the
|
|
103
|
+
widget fetches entry configuration on every page load, changing this option in
|
|
104
|
+
the console does not require changing host-page markup.
|
|
105
|
+
|
|
106
|
+
Each Origin allowlist item must be an HTTP(S) `scheme://host[:port]` value.
|
|
107
|
+
Chat-entry saves canonicalize and deduplicate origins and reject paths, query
|
|
108
|
+
strings, user information, and fragments. When a browser sends an Origin that
|
|
109
|
+
is not allowlisted, public chat endpoints return 403 before starting a job. An
|
|
110
|
+
empty list remains unrestricted, and requests without a browser Origin remain
|
|
111
|
+
compatible with mini-program and server-side callers. The Origin allowlist is
|
|
112
|
+
therefore a browser anti-embedding boundary, not server-side authentication.
|
|
113
|
+
|
|
87
114
|
The embedded widget creates a job with `POST /chat/{entry_key}` and consumes its result through:
|
|
88
115
|
|
|
89
116
|
```http
|
|
@@ -97,15 +124,71 @@ Incremental text is provisional transport data. It is not a durable conversation
|
|
|
97
124
|
|
|
98
125
|
See [STREAMING.en.md](STREAMING.en.md) for event payloads, reconnect rules, provider fallback, audit boundaries, and multi-replica deployment requirements.
|
|
99
126
|
|
|
127
|
+
### Non-blocking `bailing-form` responses
|
|
128
|
+
|
|
129
|
+
`POST /chat/{entry_key}` accepts exactly one user input shape: a normal non-empty
|
|
130
|
+
`message`, or an `interaction_response` to a form rendered by an earlier final
|
|
131
|
+
reply. Both shapes keep the existing optional `visitor_id`, `ticket`,
|
|
132
|
+
`thread_id`, `context`, and `client_capabilities` fields.
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"visitor_id": "visitor_01HXYZ",
|
|
137
|
+
"thread_id": "support_1",
|
|
138
|
+
"interaction_response": {
|
|
139
|
+
"type": "bailing-form",
|
|
140
|
+
"version": 1,
|
|
141
|
+
"source_job_id": "job_that_rendered_the_form",
|
|
142
|
+
"form_id": "refund_info",
|
|
143
|
+
"submission_id": "01JFORMRESPONSE0001",
|
|
144
|
+
"action": "submit",
|
|
145
|
+
"values": {
|
|
146
|
+
"reason": "The item arrived damaged",
|
|
147
|
+
"method": "original"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The source job has already reached `done`. Submitting or cancelling the form
|
|
154
|
+
creates a new user turn and a new job in the same thread; it does not pause or
|
|
155
|
+
resume the source job and adds no `input_required` or SSE status. `action` is
|
|
156
|
+
`submit` or `cancel`; submit requires a values object, while cancel cannot carry
|
|
157
|
+
non-empty values.
|
|
158
|
+
|
|
159
|
+
The server reloads the immutable final reply from `source_job_id` and validates
|
|
160
|
+
that the source job is done and belongs to the same entry, verified uid or
|
|
161
|
+
anonymous visitor, and thread. Values are validated against the matching source
|
|
162
|
+
form declaration, never against a client-supplied schema. A stable
|
|
163
|
+
`submission_id` matches `[A-Za-z0-9_-]{8,64}`. It makes retries for the same
|
|
164
|
+
source job and form return the original job, optionally with `deduped:true`,
|
|
165
|
+
instead of running twice, and must not be reused for different values. The
|
|
166
|
+
serialized `values` object is capped at 32 KiB.
|
|
167
|
+
|
|
168
|
+
After validation, the server builds a self-contained user message from the
|
|
169
|
+
original field labels and choices. Values are therefore durable conversation
|
|
170
|
+
ledger content. Job metadata and the optional history `interaction` summary
|
|
171
|
+
retain only `type`, `version`, `source_job_id`, `form_id`, `submission_id`, and
|
|
172
|
+
`action`, without duplicating values. Form data remains untrusted user data and
|
|
173
|
+
cannot change identity, routing, tool allowlists, approval, or final business
|
|
174
|
+
authorization. A form must not request passwords, API keys, tokens, private
|
|
175
|
+
keys, or payment credentials, and it is not a substitute for the governed tool
|
|
176
|
+
approval path.
|
|
177
|
+
|
|
178
|
+
If the canonical user message would exceed 4,000 characters, the server returns
|
|
179
|
+
400 instead of silently truncating form values. Keep the same `submission_id`,
|
|
180
|
+
shorten the entered content, and retry.
|
|
181
|
+
|
|
100
182
|
### Optional Widget Renderers
|
|
101
183
|
|
|
102
|
-
Charts and
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
184
|
+
Charts and forms do not add a new server-side attachment type or change the
|
|
185
|
+
canonical `reply` payload. Both consume declarative fenced payloads. A host page
|
|
186
|
+
may register a trusted chart renderer through
|
|
187
|
+
`window.BailingChat.registerRenderer(...)`; the official widget provides the
|
|
188
|
+
constrained `bailing-form` and posts its response through the contract above.
|
|
189
|
+
Unknown types, invalid JSON, oversized payloads, or renderer failures fall back
|
|
190
|
+
to a text code block. See [WIDGET_RENDERERS.en.md](WIDGET_RENDERERS.en.md) for
|
|
191
|
+
the full trust and lifecycle contract.
|
|
109
192
|
|
|
110
193
|
## Tool Provider Spec
|
|
111
194
|
|
package/docs/CONTRACT.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 百灵中枢 · 边界契约
|
|
2
2
|
|
|
3
|
-
> 当前契约:`bailing.contract.v2.
|
|
3
|
+
> 当前契约:`bailing.contract.v2.14`。这是业务系统与中枢之间唯一的网络边界。
|
|
4
4
|
|
|
5
5
|
**冻结它,两边就能各自独立开发。** 任何字段变更都按兼容方式演进(只增不改语义、不删字段)。
|
|
6
6
|
|
|
@@ -121,19 +121,51 @@ POST /admin/api/routes/auto-preview
|
|
|
121
121
|
|
|
122
122
|
| 端点 | 说明 |
|
|
123
123
|
|---|---|
|
|
124
|
-
| `POST /chat/:entry_key` |
|
|
124
|
+
| `POST /chat/:entry_key` | 请求体必须在普通消息 `{message, ...}` 与表单回传 `{interaction_response, ...}` 中**二选一**;其余既有可选字段(`visitor_id` / `ticket` / `thread_id` / `context` / `client_capabilities`)按原语义共用。`thread_id`(字母数字_-,≤32 字符):同一身份下的平行会话切分键——开新会话=换新值,延续已有会话=复用,不带=单线程续聊;会话与对话总账同键切分,且写入 `metadata.thread_id` 供任务详情对账。返回 `{done:false, job_id, visitor_id}` 后,组件通过 SSE 结果流接收状态和最终回答 |
|
|
125
125
|
| `GET /chat/:entry_key/events/:job_id` | **SSE 结果流**:只能订阅本入口发起的任务。基础事件为 `open/status/ping/done/failed/timeout`;支持增量输出时还会发送 `phase/reset/delta`。`done` 携带任务库中的权威最终结果 `{done:true, reply, job_id, visitor_id, references?, attachments?}`。完整语义见 [STREAMING.md](STREAMING.md) |
|
|
126
|
-
| `GET /chat/:entry_key/thread?visitor_id=&thread_id=&ticket=` |
|
|
127
|
-
| `GET /chat/:entry_key/config` | 组件状态与配置:停用入口返回 `{enabled:false}
|
|
126
|
+
| `GET /chat/:entry_key/thread?visitor_id=&thread_id=&ticket=` | **拉服务端会话总账**:组件重开、表单回执恢复,或异步迟到结果(如审批批准后重跑的回复落在另一条任务里)回灌用——按与提问一致的身份重建线索、只读返回正序消息。表单回传对应的用户消息可附带不含表单值的 `interaction` 关联摘要。身份纪律同 `POST /chat`(带票按 uid、无票按 visitor,票坏=401) |
|
|
127
|
+
| `GET /chat/:entry_key/config` | 组件状态与配置:停用入口返回 `{enabled:false}`,组件静默不挂载;启用时返回标题/开场白/主色/品牌,**外观**(默认展开/窗口尺寸/标题对齐/气泡位置与偏移/头像/自定义气泡图标/底部品牌标识)、`upload`。`default_open` 缺省为 `false`;设为 `true` 或脚本带 `data-open="1"` 都会在加载后展开。控制台改完后,业务页面无需改嵌入代码 |
|
|
128
128
|
| `POST /chat/:entry_key/rate/:job_id` | **评价回答**:体 `{rating:"up"\|"down"\|"note", visitor_id, comment?}`;`note` 表示只提交文字反馈,此时 `comment` 必填。只能评自己问出来的那条(visitor_id 须与提问时一致);一答一评,重评覆盖。运营在控制台「聊天入口 → 评价」看汇总 |
|
|
129
129
|
|
|
130
|
+
### 1.1.1 `bailing-form` 非阻塞交互回传
|
|
131
|
+
|
|
132
|
+
当最终 `done.reply` 含有符合 [WIDGET_RENDERERS.md](WIDGET_RENDERERS.md) 的 `bailing-form` fenced payload 时,官方 Widget 可把它渲染为受约束表单。当前助手任务在输出该回答后依然正常进入 `done`;用户提交或取消表单时,Widget 对**同一 `thread_id`** 再发一次 `POST /chat/:entry_key`,创建新的用户轮次和新 job。该机制不引入 `input_required` 或新的 SSE 任务状态。
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"visitor_id": "visitor_01HXYZ",
|
|
137
|
+
"thread_id": "support_1",
|
|
138
|
+
"interaction_response": {
|
|
139
|
+
"type": "bailing-form",
|
|
140
|
+
"version": 1,
|
|
141
|
+
"source_job_id": "job_that_rendered_the_form",
|
|
142
|
+
"form_id": "refund_info",
|
|
143
|
+
"submission_id": "01JFORMRESPONSE0001",
|
|
144
|
+
"action": "submit",
|
|
145
|
+
"values": {
|
|
146
|
+
"reason": "商品破损",
|
|
147
|
+
"method": "original"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
- `action` 只接受 `submit` 或 `cancel`。`submit` 必须带 `values` 对象;`cancel` 不得携带非空值。
|
|
154
|
+
- 服务端不信任客户端回传的 schema。它会重新读取 `source_job_id` 的权威最终回复,校验该 job 已 `done`、属于同一入口、同一已验签 uid 或匿名 visitor、同一 thread,并依据其中同 `form_id` 的不可变表单声明验证字段、必填、长度、范围和选项。
|
|
155
|
+
- `submission_id` 匹配 `[A-Za-z0-9_-]{8,64}`,是这次回传的幂等键。同一身份对同一 `source_job_id + form_id + submission_id` 重试时返回原 job,并可附带 `deduped:true`,不重复运行。客户端不得把同一 `submission_id` 复用给另一组值。`values` 序列化后最大 32 KiB。
|
|
156
|
+
- 校验通过后,服务端按原声明的字段标签与选项生成自包含的用户消息,再进入普通聊天运行时。字段值会随该用户消息进入对话总账;job metadata 与历史 `interaction` 摘要只保留 `type/version/source_job_id/form_id/submission_id/action`,不重复存储值。
|
|
157
|
+
- 规范化后的用户消息超过 4000 字时返回 400,不会静默截断表单值;客户端应保留原 `submission_id`、缩短填写内容后再提交。
|
|
158
|
+
- 表单值仍是不可信用户数据,不能改变身份、路由、工具白名单、审批或业务授权。表单不得索要密码、API Key、Token、私钥或支付凭据;需要审批或产生业务副作用的动作仍须走 §2.4 的工具治理车道。
|
|
159
|
+
|
|
130
160
|
**引用来源**:路由挂了知识库时,回答附 `references: [{seq, title, score, snippet}]`(本次检索命中),正文中模型按 `[n]` 标注实际引用的资料编号——消费方可据此展示"答案出处"。完整快照(含 doc_id)在 job 的 `dispatch.kb_refs`,`/run` 触发的任务同样携带。
|
|
131
161
|
|
|
132
162
|
**富内容**:`reply` 为 markdown;同时附 `attachments`(图片/文件的结构化数组),无 markdown 渲染器的端据此渲染——见 §2.5。
|
|
133
163
|
|
|
134
|
-
防滥用三件套:站点 **Origin 白名单**(浏览器 Origin 不可伪造;空=未限制)、**按 IP 限速**(默认 20
|
|
164
|
+
防滥用三件套:站点 **Origin 白名单**(浏览器 Origin 不可伪造;空=未限制)、**按 IP 限速**(默认 20/分钟)、入口可停用/删除。白名单每项只接受 `scheme://host[:port]`,保存时按 URL origin 规范化并去重;带路径、参数、用户信息或片段的值会拒绝保存。浏览器携带的 Origin 不在白名单时,公开聊天端点在进入任务链路前返回 403。无 Origin 的小程序/服务端请求按既有契约保持兼容;因此 Origin 白名单是浏览器防盗嵌边界,不是服务端身份鉴权。CORS 全放开(公开面无 Cookie),最终是否放行以服务端白名单裁决为准。
|
|
165
|
+
|
|
166
|
+
**身份纪律(与总纲一致)**:网页访客默认是**匿名主体**。`visitor_id` 是组件存 localStorage 的随机串,只用于会话/线索连续性(同访客自动续聊),**不是身份凭证**;metadata 由中枢服务端构造,组件带不进业务操作主体——只有不要求主体的公开能力可用于匿名访问;声明需要主体的查询和写操作均保持不可见,业务侧仍须依据空或有效的 On-Behalf-Of 做最终授权。
|
|
135
167
|
|
|
136
|
-
|
|
168
|
+
**匿名预览边界**:控制台「聊天入口」里的独立预览链接始终不带业务票据,也不继承中枢管理员登录态;该页面没有可供业务用户再次登录的入口。无主体时,所有声明 `subject.required:true` 的工具(包括订单查询等只读能力)在装配阶段保持不可见。内置演示能力由管理员从「上手向导」运行 smoke 验证;真实网页助手则必须由业务后端在自己的登录态里签发下面的短票据。中枢管理员身份不得自动转换为业务操作主体。
|
|
137
169
|
|
|
138
170
|
**签名访客票据**:要让"登录用户"在组件里带可信身份,入口配置「票据签发方」(一个接入方 app_id)后,业务后端在登录态里用**自己的接入方 token** 签发短票:
|
|
139
171
|
|
|
@@ -591,7 +623,7 @@ AI 的回复是 **GitHub 风味 markdown**。为让没有 markdown 渲染器的
|
|
|
591
623
|
|
|
592
624
|
约束:图片/文件本体存放在业务自己的存储/CDN(中枢只透传 url,不代管二进制);同一 url 在 attachments 内去重。
|
|
593
625
|
|
|
594
|
-
>
|
|
626
|
+
> **聊天组件专用的图表和表单不是新的服务端 `attachments` 类型。** 它们消费回复中的声明式 fenced payload;图表可由宿主通过 `window.BailingChat.registerRenderer(...)` 扩展,`bailing-form` 由官方 Widget 受限渲染并通过 §1.1.1 回传。未知类型、无效 JSON、超限载荷或渲染失败必须降级为纯文本代码块。回复契约保持 `reply/text + attachments` 不变,完整边界见 [WIDGET_RENDERERS.md](WIDGET_RENDERERS.md)。
|
|
595
627
|
|
|
596
628
|
## 2.6 入站渠道:外部平台消息进中枢
|
|
597
629
|
|
package/docs/DEMO.en.md
CHANGED
|
@@ -48,6 +48,12 @@ DEMO_PROFILE=stateless-readonly
|
|
|
48
48
|
- `full-local` is the complete Docker demo with order lookup, ticket creation, refund approval, and failure tools.
|
|
49
49
|
- `stateless-readonly` is for shared or embedded evaluation environments. Demo Business must bind to loopback, exposes only order lookup and failure observation, stores no request state, uses no Hub callback, and creates no public chat entry.
|
|
50
50
|
|
|
51
|
+
Business tools in both profiles require the trusted demo subject. After import,
|
|
52
|
+
run smoke from Getting Started so the server supplies that fixed demo subject
|
|
53
|
+
and creates a real job and trace. A standalone chat preview does not inherit the
|
|
54
|
+
BailingHub administrator identity; manually binding an entry to the demo route
|
|
55
|
+
does not unlock those tools for an anonymous visitor.
|
|
56
|
+
|
|
51
57
|
Core records the exact objects it owns, together with their fingerprints, in the durable `bz_demo_datasets` manifest. Refresh and clear fail with `409` if a name is already occupied, a managed object changed, or another configuration references it. Clearing removes only unchanged, unreferenced demo configuration; jobs, messages, traces, and audit history remain intact.
|
|
52
58
|
|
|
53
59
|
The Admin API is:
|
package/docs/DEMO.md
CHANGED
|
@@ -93,6 +93,8 @@ DEMO_PROFILE=stateless-readonly
|
|
|
93
93
|
- `full-local`:Docker 本地完整演示,包含查单、工单、退款审批和故障工具;
|
|
94
94
|
- `stateless-readonly`:共享或宿主式体验环境,`demo-business` 必须绑定本机回环地址,只声明订单查询与故障观测工具,不保存请求状态、不使用 Hub 回调,也不创建公开聊天入口。
|
|
95
95
|
|
|
96
|
+
两种 profile 的业务工具都要求可信演示主体。导入后应从「上手向导」运行 smoke,由服务端携带固定演示主体生成真实 job 与 trace。聊天入口的独立预览不会继承中枢管理员身份;即使管理员手工把入口绑定到 demo 路由,匿名预览也不会解锁这些工具。
|
|
97
|
+
|
|
96
98
|
Core 用 `bz_demo_datasets` 中的持久 ownership manifest 记录它实际创建的固定对象和指纹。再次导入只刷新已证明归属的对象;同名占用、指纹漂移或其他配置引用都会返回 `409`,不猜测所有权。清理只删除 manifest 能证明且未被修改的演示配置,任务、消息、trace 和审计账本会继续保留。
|
|
97
99
|
|
|
98
100
|
对应的 Core 后台 API 为:
|
|
@@ -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.4.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.4.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.4.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)"
|
|
@@ -80,6 +80,8 @@ The console is available at <http://localhost:18900/console/>:
|
|
|
80
80
|
- Path A uses the random admin password printed when installation completes. It is also stored in the installation directory's `.env`; never attach that file to an Issue;
|
|
81
81
|
- Path B uses the default demo account `admin / bailing-demo-admin`.
|
|
82
82
|
|
|
83
|
+
In **Chat Entries**, confirm that the list action is labeled **Anonymous Preview** and that the preview page states that it neither inherits the BailingHub administrator session nor provides a standalone business-login surface. Do not use anonymous preview to validate subject-required demo tools; the complete demo-subject path is verified by Smoke in the next step.
|
|
84
|
+
|
|
83
85
|
## 3. Run the smoke test
|
|
84
86
|
|
|
85
87
|
For Path A, use the command printed by the installer, usually:
|
|
@@ -125,12 +127,13 @@ Pass criteria: the process exits with code `0` and ends with:
|
|
|
125
127
|
|
|
126
128
|
## 5. Record the result
|
|
127
129
|
|
|
128
|
-
Record all
|
|
130
|
+
Record all five checkpoints:
|
|
129
131
|
|
|
130
132
|
| Checkpoint | PASS criteria |
|
|
131
133
|
|---|---|
|
|
132
134
|
| Services | Services are healthy in `docker compose ps`, and `/health` is reachable |
|
|
133
135
|
| Console | You can log in and inspect the demo configuration |
|
|
136
|
+
| Anonymous-preview boundary | The console and preview page state that no administrator session is inherited and direct subject-required demo validation belongs to Smoke |
|
|
134
137
|
| Smoke | `npm run smoke` exits with code 0 and zero failures |
|
|
135
138
|
| Business loop | `npm run demo:e2e` exits with code 0 and prints `结果:demo e2e passed` |
|
|
136
139
|
|
|
@@ -138,7 +141,7 @@ Whether the result is PASS, partial, or failed, please use the [independent vali
|
|
|
138
141
|
|
|
139
142
|
- BailingHub version, installation path, and the commit SHA when using the source path;
|
|
140
143
|
- operating system, CPU architecture, Docker, and Compose versions;
|
|
141
|
-
- the
|
|
144
|
+
- the five checkpoint results;
|
|
142
145
|
- elapsed time excluding image downloads;
|
|
143
146
|
- the first blocker and sanitized logs;
|
|
144
147
|
- whether public docs were sufficient and which step was unclear.
|
|
@@ -164,7 +167,7 @@ After the core task passes, you may continue with:
|
|
|
164
167
|
- [Trusted rich rendering and chat reliability](RELEASE_NOTES_v0.1.15.en.md).
|
|
165
168
|
- [Bounded tool runtime and resilient semantic retrieval](RELEASE_NOTES_v0.1.16.en.md).
|
|
166
169
|
- [Composable Core and Kernel Host API v1](RELEASE_NOTES_v0.3.0.en.md).
|
|
167
|
-
- [Current stable release notes](RELEASE_NOTES_v0.
|
|
170
|
+
- [Current stable release notes](RELEASE_NOTES_v0.4.0.en.md).
|
|
168
171
|
|
|
169
172
|
Select the relevant track in the same Issue form and disclose whether you received direct maintainer assistance.
|
|
170
173
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## 验证范围
|
|
8
8
|
|
|
9
9
|
- 验证对象:BailingHub 开源版 Docker demo;
|
|
10
|
-
- 稳定基线:`v0.
|
|
10
|
+
- 稳定基线:`v0.4.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.4.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.4.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)"
|
|
@@ -80,6 +80,8 @@ curl -fsS http://localhost:18900/health
|
|
|
80
80
|
- 路径 A 使用安装完成时打印的随机后台密码;密码也保存在安装目录的 `.env`,不得提交到 Issue;
|
|
81
81
|
- 路径 B 使用默认 demo 账号 `admin / bailing-demo-admin`。
|
|
82
82
|
|
|
83
|
+
进入“聊天入口”时,确认列表操作显示“匿名预览”,并且预览页明确说明它不继承中枢后台登录态、没有独立业务登录入口。不要用匿名预览验证需主体的 demo 工具;完整演示主体链路由下一步 Smoke 验证。
|
|
84
|
+
|
|
83
85
|
## 3. 运行基础体检
|
|
84
86
|
|
|
85
87
|
路径 A 使用安装器打印的命令,通常是:
|
|
@@ -125,12 +127,13 @@ docker compose exec -T bailinghub npm run demo:e2e
|
|
|
125
127
|
|
|
126
128
|
## 5. 记录结果
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
请记录以下五个检查点:
|
|
129
131
|
|
|
130
132
|
| 检查点 | PASS 标准 |
|
|
131
133
|
|---|---|
|
|
132
134
|
| 服务启动 | `docker compose ps` 中服务正常,`/health` 可访问 |
|
|
133
135
|
| 控制台 | 可以登录并看到 demo 配置 |
|
|
136
|
+
| 匿名预览边界 | 控制台和预览页均明确说明不继承后台登录态,需主体工具应改用 Smoke 验证 |
|
|
134
137
|
| 基础体检 | `npm run smoke` 退出码为 0,失败数为 0 |
|
|
135
138
|
| 业务闭环 | `npm run demo:e2e` 退出码为 0,并输出 `结果:demo e2e passed` |
|
|
136
139
|
|
|
@@ -138,7 +141,7 @@ docker compose exec -T bailinghub npm run demo:e2e
|
|
|
138
141
|
|
|
139
142
|
- BailingHub 版本、安装路径,以及源码复现时的提交号;
|
|
140
143
|
- 操作系统、CPU 架构、Docker 与 Compose 版本;
|
|
141
|
-
-
|
|
144
|
+
- 五个检查点的结果;
|
|
142
145
|
- 镜像下载之外的实际耗时;
|
|
143
146
|
- 第一个阻塞点和脱敏日志;
|
|
144
147
|
- 是否只依赖公开文档,哪一步最不清楚。
|
|
@@ -164,7 +167,7 @@ docker compose exec -T bailinghub npm run demo:e2e
|
|
|
164
167
|
- [可信富内容渲染与聊天可靠性](RELEASE_NOTES_v0.1.15.md)。
|
|
165
168
|
- [工具运行时收敛与语义检索韧性](RELEASE_NOTES_v0.1.16.md)。
|
|
166
169
|
- [可组合 Core 与 Kernel Host API v1](RELEASE_NOTES_v0.3.0.md)。
|
|
167
|
-
- [当前稳定版发布说明](RELEASE_NOTES_v0.
|
|
170
|
+
- [当前稳定版发布说明](RELEASE_NOTES_v0.4.0.md)。
|
|
168
171
|
|
|
169
172
|
扩展验证请在同一 Issue 模板中选择对应路径,并说明是否获得过维护者的直接帮助。
|
|
170
173
|
|
package/docs/QUICKSTART.en.md
CHANGED
|
@@ -27,6 +27,26 @@ Key objects:
|
|
|
27
27
|
| Tool provider | A business system's agent-callable API catalog, usually OpenAPI with ACC `x-agent-capability` metadata or an SDK-generated spec. |
|
|
28
28
|
| Runtime ledger | Jobs, messages, audit records, approvals, and trace events stored by the hub. |
|
|
29
29
|
|
|
30
|
+
### Anonymous preview versus authenticated embedding
|
|
31
|
+
|
|
32
|
+
The standalone link opened from the Chat Entries page is an **anonymous
|
|
33
|
+
preview**. It does not inherit the BailingHub console login and it has no
|
|
34
|
+
business-login surface of its own. It is suitable for checking the widget,
|
|
35
|
+
public knowledge, and tools that do not require an acting subject. Tools with
|
|
36
|
+
`subject.required: true`, including read-only business queries, remain hidden.
|
|
37
|
+
|
|
38
|
+
Use the Getting Started smoke action to validate the built-in demo tools. For a
|
|
39
|
+
real embedded assistant, the business backend must sign a short-lived visitor
|
|
40
|
+
ticket from its own authenticated session and render it as `data-ticket`.
|
|
41
|
+
BailingHub verifies that ticket before using its opaque uid as the acting
|
|
42
|
+
subject; the integration token never belongs in browser code.
|
|
43
|
+
|
|
44
|
+
Chat Entry appearance settings can optionally open the official widget as soon
|
|
45
|
+
as an embedded page loads. This setting is off by default, and existing
|
|
46
|
+
`data-open="1"` embeds continue to force the same behavior. Since the widget
|
|
47
|
+
loads entry configuration at startup, changing the setting does not require a
|
|
48
|
+
host-page code change.
|
|
49
|
+
|
|
30
50
|
## Option A: Docker Demo
|
|
31
51
|
|
|
32
52
|
```bash
|
package/docs/QUICKSTART.md
CHANGED
|
@@ -65,7 +65,7 @@ sh
|
|
|
65
65
|
- 智能体技能·触发:本地智能体、脚本或第三方 agent 装个技能就会调中枢;
|
|
66
66
|
- 本地执行器·干活:见第 6 步。
|
|
67
67
|
|
|
68
|
-
还要网页上直接聊?「聊天入口」页新建入口绑这条路由 → 拿一行 `<script>`
|
|
68
|
+
还要网页上直接聊?「聊天入口」页新建入口绑这条路由 → 拿一行 `<script>` 贴进任意业务页面。控制台提供的独立链接是**匿名预览**:它不继承中枢后台登录态,也没有独立业务登录入口,只适合验证聊天组件、公开问答和不要求主体的工具;所有声明 `subject.required:true` 的能力(包括只读查询)都会保持隐藏。验证内置演示工具请从「上手向导」运行 smoke。真实业务页面要带登录身份时:入口配「票据签发方」,业务后端在自己的登录态里用接入方 token 签短票(嵌入代码弹窗含 PHP 样例),组件 `data-ticket` 带上 → 验签通过的 uid 进任务元数据,可作工具调用的操作主体,会话跨设备连续。入口默认可上传图片、语音和常见文件(服务器本地 `data/uploads`),也可关联**媒体存储**切到业务对象存储;路由的**多模态输入策略**决定这些素材是先识别/转写/抽取,还是直送具备对应能力的模型或执行器。还能配**外观**(窗口尺寸/位置/头像/气泡图标/标题对齐)、**页面登记**让 Agent 知道访客在哪个页面提问——见下「可选增强」。
|
|
69
69
|
|
|
70
70
|
**第 6 步 · 接本地大脑**(需要时,「调度目标」):注册一个 executor 类目标。优先在路由的「调用代码 → 执行器接入」复制短引导交给 Agent;完整、版本化的接入 Skill 也可直接读取:`<中枢地址>/connect/skills/connect-bailinghub-executor/SKILL.md`。
|
|
71
71
|
|
|
@@ -117,7 +117,7 @@ node bailing-executor.mjs --hub <中枢地址> --targets <目标名> \
|
|
|
117
117
|
- **聊天附件上传**(「媒体存储」+「聊天入口」):不开任何对象存储也能用,默认写服务器 `data/uploads` 并返回 `/uploads/*` 公开 URL;生产需要 CDN、生命周期管理或多副本共享时,再登记业务对象存储(当前 COS:region/bucket/AK·SK/公开域名/写入前缀)并让聊天入口关联它。图片、语音、文件都会得到**永久 URL**,一份存储喂三件事:完整追溯 / 多模态输入策略 / 业务接口入参。路由决定图片、语音、文件分别走识别、转写、文本抽取、摘要、直送或忽略;指向业务自己的桶则 URL 即业务 CDN、零转存。见 CONTRACT §2.4e。
|
|
118
118
|
- **对话记忆**(「触发路由 → 对话记忆」):长会话开**滚动摘要**(默认关、不改原行为)——超水位线的早期对话异步压缩成结构化摘要,后续连摘要一起注入,上下文不爆。
|
|
119
119
|
- **页面感知**(「聊天入口 → 页面登记」):配 URL 模式 → 页面名+说明的登记表,AI 据此知道访客在哪页提问、精准定位;路由再开「页面感知检索」可偏置召回本页相关文档(全局仍兜底)。见 CONTRACT §1.2。
|
|
120
|
-
-
|
|
120
|
+
- **组件外观与运营启停**(「聊天入口」):默认展开、窗口尺寸/高度、标题对齐、气泡贴左/右下角与像素偏移、头部头像、自定义气泡图标、底部品牌标识都可配置;入口可在列表一键暂停,已嵌入页面无需删除脚本,恢复后自动重新展示。
|
|
121
121
|
|
|
122
122
|
## 不同形态怎么配(速查)
|
|
123
123
|
|