bailinghub 0.10.1 → 0.11.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/CONTRIBUTING.md +20 -0
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/SECURITY.md +20 -0
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_CONVERSATION_AUDIT.en.md +8 -2
- package/docs/AGENT_CONVERSATION_AUDIT.md +8 -1
- package/docs/CHANGELOG.en.md +18 -1
- package/docs/CHANGELOG.md +18 -1
- package/docs/IMPLEMENTATION_STATUS.en.md +3 -3
- package/docs/IMPLEMENTATION_STATUS.md +3 -3
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/MODEL_CONTINUATION.en.md +8 -0
- package/docs/MODEL_CONTINUATION.md +8 -0
- package/docs/MODEL_OUTPUT_BUDGET.en.md +1 -0
- package/docs/MODEL_OUTPUT_BUDGET.md +1 -0
- package/docs/README.en.md +4 -0
- package/docs/README.md +4 -0
- package/docs/RELEASE_NOTES_v0.11.0.en.md +19 -0
- package/docs/RELEASE_NOTES_v0.11.0.md +19 -0
- package/docs/RELEASE_NOTES_v0.11.1.en.md +25 -0
- package/docs/RELEASE_NOTES_v0.11.1.md +25 -0
- package/docs/UPGRADE_v0.11.0.en.md +24 -0
- package/docs/UPGRADE_v0.11.0.md +24 -0
- package/docs/UPGRADE_v0.11.1.en.md +28 -0
- package/docs/UPGRADE_v0.11.1.md +28 -0
- package/docs/security/GRC_EVIDENCE.md +54 -0
- package/docs/user-guide/console-map.md +2 -2
- package/package.json +1 -1
- package/scripts/check-doc-links.mjs +4 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +2 -2
- package/scripts/copy-acr-platform-image.sh +42 -0
- package/scripts/e2e-console-runtime-audit.mjs +7 -0
- package/scripts/e2e-console-troubleshooting-extra.mjs +4 -4
- package/scripts/e2e-console.mjs +90 -23
- package/scripts/install.sh +1 -1
- package/scripts/notification-console-test.mjs +2 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +8 -0
- package/scripts/restore-ghcr-version.sh +48 -0
- package/scripts/test-acr-platform-copy.sh +152 -0
- package/scripts/verify-github-repo.mjs +8 -0
- package/src/core/config/console-task-location.test.ts +12 -24
- package/src/core/runtime/credential-resolver.ts +3 -3
- package/src/infrastructure/config/config-agent-conversation-audit-repository.test.ts +29 -0
- package/src/infrastructure/config/config-agent-conversation-audit-repository.ts +142 -9
- package/src/infrastructure/config/config-conversation-feed.integration.test.ts +134 -0
- package/src/infrastructure/config/config-conversation-ledger.test.ts +47 -1
- package/src/infrastructure/config/config-conversation-ledger.ts +24 -8
- package/src/infrastructure/config/config-observability-ledger.ts +32 -4
- package/src/infrastructure/config/config-recent-jobs.integration.test.ts +45 -0
- package/src/infrastructure/config/configstore.ts +4 -4
- package/src/infrastructure/config/conversation-delivery-message.ts +12 -0
- package/src/modules/usage/contracts.ts +1 -0
- package/src/modules/usage/model-context.test.ts +106 -0
- package/src/modules/usage/model-context.ts +54 -0
- package/src/modules/usage/model-continuation.test.ts +27 -0
- package/src/modules/usage/provider.test.ts +40 -0
- package/src/modules/usage/provider.ts +21 -3
- package/src/modules/usage/repository.ts +2 -1
- package/src/routes/admin-conversation-audit.ts +20 -3
- package/src/routes/admin-history-cursor.ts +12 -0
- package/src/routes/admin-runtime.test.ts +47 -0
- package/src/routes/admin-runtime.ts +32 -3
- package/src/routes/admin-usage.ts +12 -1
- package/src/routes/admin.ts +6 -1
- package/src/routes/agent-conversation-audit.test.ts +47 -3
- package/src/test-support/agent-conversation-audit-fixture.ts +9 -1
- package/web/console/assets/{Accounts-Dhyw-7wF.js → Accounts-B1Ne8Xx2.js} +1 -1
- package/web/console/assets/AgentClients-CiGQ-n2i.js +1 -0
- package/web/console/assets/AgentClients-xEIfsj7w.css +1 -0
- package/web/console/assets/AgentTasks-CaCeYv60.css +1 -0
- package/web/console/assets/AgentTasks-CylHZHHq.js +2 -0
- package/web/console/assets/{Approvals-CQx1YWxW.js → Approvals-wD4Iv80G.js} +1 -1
- package/web/console/assets/{Audit--QcdVlMh.js → Audit-BStlxkPw.js} +1 -1
- package/web/console/assets/{BrandLockup-DQcaW4Nt.js → BrandLockup-BAhrPnhy.js} +1 -1
- package/web/console/assets/Channels-DAlIgNxo.js +105 -0
- package/web/console/assets/Channels-WwRHFKJn.css +1 -0
- package/web/console/assets/ChatEntries-CPx-E9aJ.js +7 -0
- package/web/console/assets/ChatEntries-DALYfRDP.css +1 -0
- package/web/console/assets/Clients-gqNFusNW.css +1 -0
- package/web/console/assets/Clients-w97QPpFD.js +3 -0
- package/web/console/assets/Cost-CNDZaif-.css +1 -0
- package/web/console/assets/Cost-CxtN0mca.js +1 -0
- package/web/console/assets/Credentials-6c6aktzZ.css +1 -0
- package/web/console/assets/Credentials-BhpoH-hR.js +1 -0
- package/web/console/assets/{Diagnostics-CyoM1XrZ.js → Diagnostics-DnC-ODuy.js} +1 -1
- package/web/console/assets/Executors-CCTYuZf4.js +1 -0
- package/web/console/assets/Executors-CQ8iw3kK.css +1 -0
- package/web/console/assets/{HelpTip-DLlhaGQp.js → HelpTip-piedkqU-.js} +1 -1
- package/web/console/assets/Kb-CFCa-7LY.css +1 -0
- package/web/console/assets/Kb-DKp3mwWB.js +2 -0
- package/web/console/assets/Login-g_aZWHQd.js +1 -0
- package/web/console/assets/Login-krXZsvoF.css +1 -0
- package/web/console/assets/Projects-BexeaCxT.css +1 -0
- package/web/console/assets/Projects-DurExYV9.js +1 -0
- package/web/console/assets/Routes-CKoIjkCM.css +1 -0
- package/web/console/assets/Routes-CX7Q7bkz.js +138 -0
- package/web/console/assets/Runs-C48kdEwk.css +1 -0
- package/web/console/assets/Runs-CQKEDsrH.js +3 -0
- package/web/console/assets/Setup-CtWCXXpj.css +1 -0
- package/web/console/assets/Setup-DzI8rEAc.js +1 -0
- package/web/console/assets/Shell-BQ-g_O7K.js +1 -0
- package/web/console/assets/Shell-Y2fZK5LV.css +1 -0
- package/web/console/assets/StorageBuckets-CWxzIh0x.css +1 -0
- package/web/console/assets/StorageBuckets-DoZIzA7B.js +1 -0
- package/web/console/assets/SystemSettings-C3pFFzAQ.js +1 -0
- package/web/console/assets/SystemSettings-C5nv0K2a.css +1 -0
- package/web/console/assets/SystemStatus-Bbxu2dp4.css +1 -0
- package/web/console/assets/SystemStatus-BgekIK52.js +1 -0
- package/web/console/assets/Targets-CbLq7rgm.css +1 -0
- package/web/console/assets/Targets-DH1ZcK0J.js +1 -0
- package/web/console/assets/Tools-CMS1wVOm.js +5 -0
- package/web/console/assets/Tools-Qk1c5Rp8.css +1 -0
- package/web/console/assets/Usage-C0OkK7Jg.js +1 -0
- package/web/console/assets/Usage-Cue7CYnT.css +1 -0
- package/web/console/assets/UsageAccess-CHdWXvE8.js +1 -0
- package/web/console/assets/UsageAccess-nOa03hGb.css +1 -0
- package/web/console/assets/{UsageHelp-BmuiE1Ew.js → UsageHelp-BkIsuFUj.js} +1 -1
- package/web/console/assets/{console-location-Csv-xsnl.js → console-location-C_az_xHo.js} +1 -1
- package/web/console/assets/index-CbI5fbiD.js +2 -0
- package/web/console/assets/{index-B_5UfiTw.js → index-DwlsLKwM.js} +1 -1
- package/web/console/assets/request-WgSVj8ie.js +1 -0
- package/web/console/assets/{schema-o3mK4mid.js → schema-rb4T_2cj.js} +1 -1
- package/web/console/assets/task-page-location-BGxGar7H.js +1 -0
- package/web/console/assets/{use-list-location-cIPy2cKM.js → use-list-location-DeVfTTII.js} +1 -1
- package/web/console/assets/{use-unsaved-form-DScKD0h9.js → use-unsaved-form-B10XHC-n.js} +1 -1
- package/web/console/assets/{util-B40VqOwl.js → util-C0YJ70YU.js} +1 -1
- package/web/console/assets/{vendor-element-BT8tHCFk.js → vendor-element-BCC2kYn_.js} +7 -7
- package/web/console/assets/{vendor-mammoth-CVIXVxTN.js → vendor-mammoth-C7l0Q30g.js} +1 -1
- package/web/console/index.html +2 -2
- package/web-admin/scripts/agent-task-control-smoke.mjs +26 -3
- package/web-admin/src/components/AgentSetupPanel.vue +19 -15
- package/web-admin/src/components/ChannelThread.vue +441 -0
- package/web-admin/src/components/ClientConversations.vue +397 -134
- package/web-admin/src/components/ConversationSourceTag.vue +24 -0
- package/web-admin/src/components/JobStatusTag.vue +18 -0
- package/web-admin/src/components/NotificationOutboxPanel.vue +5 -2
- package/web-admin/src/components/UsageServiceReferences.vue +6 -24
- package/web-admin/src/components/conversation-audit.ts +67 -2
- package/web-admin/src/components/conversation-reading-position.ts +27 -0
- package/web-admin/src/layout/Shell.vue +15 -17
- package/web-admin/src/onboarding-state.ts +5 -5
- package/web-admin/src/pages/AgentClients.vue +33 -27
- package/web-admin/src/pages/AgentTasks.vue +88 -43
- package/web-admin/src/pages/Channels.vue +15 -41
- package/web-admin/src/pages/ChatEntries.vue +13 -51
- package/web-admin/src/pages/Clients.vue +2 -2
- package/web-admin/src/pages/Cost.vue +10 -51
- package/web-admin/src/pages/Credentials.vue +1 -1
- package/web-admin/src/pages/Executors.vue +4 -3
- package/web-admin/src/pages/Kb.vue +4 -4
- package/web-admin/src/pages/Login.vue +7 -8
- package/web-admin/src/pages/Projects.vue +1 -1
- package/web-admin/src/pages/Routes.vue +46 -83
- package/web-admin/src/pages/Runs.vue +239 -567
- package/web-admin/src/pages/Setup.vue +20 -20
- package/web-admin/src/pages/StorageBuckets.vue +1 -1
- package/web-admin/src/pages/SystemSettings.vue +1 -2
- package/web-admin/src/pages/SystemStatus.vue +4 -6
- package/web-admin/src/pages/Targets.vue +0 -2
- package/web-admin/src/pages/Tools.vue +31 -22
- package/web-admin/src/pages/Usage.vue +110 -60
- package/web-admin/src/pages/UsageAccess.vue +2 -5
- package/web-admin/src/request.ts +5 -1
- package/web-admin/src/task-page-location.ts +6 -12
- package/web-admin/src/task-trace-presentation.ts +143 -0
- package/web-admin/tests/conversation-audit.test.mjs +23 -1
- package/web-admin/tests/model-context.browser.mjs +238 -0
- package/web-admin/tests/model-output-budget.browser.mjs +1 -0
- package/web/console/assets/AgentClients-BA0M26-I.css +0 -1
- package/web/console/assets/AgentClients-DWxb8-ko.js +0 -1
- package/web/console/assets/AgentTasks-DOyxANnx.css +0 -1
- package/web/console/assets/AgentTasks-DUHD4dzr.js +0 -2
- package/web/console/assets/Channels-DJJU3ksE.css +0 -1
- package/web/console/assets/Channels-cGS5WfQ-.js +0 -105
- package/web/console/assets/ChatEntries-BYpji27B.css +0 -1
- package/web/console/assets/ChatEntries-nh23Iz5O.js +0 -7
- package/web/console/assets/Clients-CX5EeYio.js +0 -3
- package/web/console/assets/Clients-CbZAou8E.css +0 -1
- package/web/console/assets/Cost-C6oQvz9P.css +0 -1
- package/web/console/assets/Cost-DOZfdNS9.js +0 -1
- package/web/console/assets/Credentials--aHs57yV.css +0 -1
- package/web/console/assets/Credentials-sy6W9Sac.js +0 -1
- package/web/console/assets/Executors-2Upi6bOS.css +0 -1
- package/web/console/assets/Executors-BQqqiFwt.js +0 -1
- package/web/console/assets/Kb-5R3ce4UU.js +0 -5
- package/web/console/assets/Kb-BM_PYi11.css +0 -1
- package/web/console/assets/Login-YKeUwdgo.js +0 -1
- package/web/console/assets/Login-xtPwDB5_.css +0 -1
- package/web/console/assets/Projects-DHwHrPT9.css +0 -1
- package/web/console/assets/Projects-Grgb6fOv.js +0 -1
- package/web/console/assets/Routes-DR_Yf02e.css +0 -1
- package/web/console/assets/Routes-DYgrXlRJ.js +0 -138
- package/web/console/assets/Runs-CwTddJJj.js +0 -3
- package/web/console/assets/Runs-D4FOvNfu.css +0 -1
- package/web/console/assets/Setup-Ca0b1d1-.css +0 -1
- package/web/console/assets/Setup-D_xUPNDq.js +0 -1
- package/web/console/assets/Shell-BTg8Vw_L.css +0 -1
- package/web/console/assets/Shell-Dfam2Uoj.js +0 -1
- package/web/console/assets/StorageBuckets-7QLBpV4a.css +0 -1
- package/web/console/assets/StorageBuckets-CP6e50wI.js +0 -1
- package/web/console/assets/SystemSettings-BRYKyJNa.js +0 -1
- package/web/console/assets/SystemSettings-HsXGx0aH.css +0 -1
- package/web/console/assets/SystemStatus-B-VfRsQd.css +0 -1
- package/web/console/assets/SystemStatus-CbPsDsGt.js +0 -1
- package/web/console/assets/Targets-1j4-g6rC.css +0 -1
- package/web/console/assets/Targets-C2LkR2AF.js +0 -1
- package/web/console/assets/Tools-C9HPJqJb.css +0 -1
- package/web/console/assets/Tools-C9JNJUS0.js +0 -2
- package/web/console/assets/Usage-D1Mv6vGY.js +0 -1
- package/web/console/assets/Usage-DMOzUsqh.css +0 -1
- package/web/console/assets/UsageAccess-77LmGCm6.js +0 -1
- package/web/console/assets/UsageAccess-C6ZGxEgJ.css +0 -1
- package/web/console/assets/index-MjZJEFIN.js +0 -2
- package/web/console/assets/request-rqm6MT0s.js +0 -1
- package/web/console/assets/task-page-location-DWiGtAln.js +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Upgrade Core from v0.10.1 to v0.11.0
|
|
2
|
+
|
|
3
|
+
[简体中文](UPGRADE_v0.11.0.md)
|
|
4
|
+
|
|
5
|
+
## Update Core
|
|
6
|
+
|
|
7
|
+
1. Record the current image digest or npm version, configuration and data volumes. Use your usual maintenance procedure to stop admitting tasks, drain accepted work, and retain the previous artifact and a restorable backup of persistent data.
|
|
8
|
+
2. Update the image or source checkout to the `v0.11.0` release, or pin an embedding host to `bailinghub@0.11.0`. Upgrading from 0.10.1 requires no new SQL migration. For older versions, check the migration instructions for each intervening release.
|
|
9
|
+
3. Confirm that `/health/ready` returns 200 before resuming admission. Hosts can read the model window and diagnostic through their existing catalog and receipt APIs. Existing business authorization and model output budgets continue to apply. [Operations](OPERATIONS.en.md)
|
|
10
|
+
|
|
11
|
+
## Check existing records
|
|
12
|
+
|
|
13
|
+
| Action | Expected result |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| Open a conversation with recorded messages under Tasks → Conversations. | The view identifies the channel and message roles and opens at the latest message. Follow an associated task to its trace when available. |
|
|
16
|
+
| Filter dispatches by a failure status and a known route. | Only matching tasks appear. Focus the status label with the keyboard to see its raw value. |
|
|
17
|
+
| Select a credential and invocation model in model service settings. | A supported route shows the verified window. For an unknown route, enter a verified value manually or save the new service as inactive. |
|
|
18
|
+
| Read `GET /usage/v1/model/models` using an account entitled to the service. | Match `service_id` and check `context_window_tokens`, the service revision and the existing output budget. The window covers input and output combined. Older registrations may return `null`. |
|
|
19
|
+
|
|
20
|
+
To support recovery of long conversations, test the host against a synthetic `CONTEXT_WINDOW_EXCEEDED` receipt. The host persists a compaction checkpoint and allocates a new operation ID for the shortened request. If the final receipt is missing, look up the original operation first. [Model continuation](MODEL_CONTINUATION.en.md)
|
|
21
|
+
|
|
22
|
+
## Roll back
|
|
23
|
+
|
|
24
|
+
Stop admission and drain active work before restoring the previous application artifact. Preserve operations, authorizations and configuration revisions recorded during the upgrade. Existing read paths remain available to older hosts. Consumers of the new diagnostic should tolerate an absent field. Recheck readiness and an existing operation after restart. [Release notes](RELEASE_NOTES_v0.11.0.en.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 从 Core v0.10.1 升级到 v0.11.0
|
|
2
|
+
|
|
3
|
+
[English](UPGRADE_v0.11.0.en.md)
|
|
4
|
+
|
|
5
|
+
## 更新 Core
|
|
6
|
+
|
|
7
|
+
1. 记录当前镜像摘要或 npm 包版本,以及它使用的配置和数据卷。在现有维护流程中暂停接收任务、排空已接受的工作,保留原制品和可恢复的持久化备份。
|
|
8
|
+
2. 按原部署方式切换到 `v0.11.0` 标签对应的镜像、源码,或宿主依赖 `bailinghub@0.11.0`。从 0.10.1 升级无需新增 SQL 迁移。更早的版本仍需逐版核对已发布的迁移。
|
|
9
|
+
3. 启动后确认 `/health/ready` 返回 200,再恢复接单。自定义宿主可使用已有模型目录和回执接口读取新增信息。业务系统原有的授权流程和模型服务的输出预算继续适用。[部署运维](OPERATIONS.md)
|
|
10
|
+
|
|
11
|
+
## 用现有记录验收
|
|
12
|
+
|
|
13
|
+
| 操作 | 预期结果 |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| 在「任务 → 会话」打开一条有消息的历史会话 | 能识别消息来源及角色,并直接看到最新消息。如记录含关联任务,可进入追溯。 |
|
|
16
|
+
| 在「调度流」筛选失败状态和一条已知路由 | 列表只显示匹配任务。键盘聚焦状态标签可查看原始状态值。 |
|
|
17
|
+
| 在模型服务配置中选定凭证和调用模型 | 支持的路由会显示已核实的窗口。若来源未知,核实后手动填写,或将新服务暂存为停用。 |
|
|
18
|
+
| 用有对应服务权限的帐号读取 `GET /usage/v1/model/models` | 按 `service_id` 核对 `context_window_tokens`、服务修订和原有输出预算。窗口是输入与输出合计;旧服务可返回 `null`。 |
|
|
19
|
+
|
|
20
|
+
若接入方要实现长会话恢复,先通过测试回执核对其对 `CONTEXT_WINDOW_EXCEEDED` 的处理。由宿主保存压缩检查点并为缩短后的新请求分配新操作号。缺少最终回执时先查询原操作;用合成数据验证这一流程即可。[模型续跑](MODEL_CONTINUATION.md)
|
|
21
|
+
|
|
22
|
+
## 回退
|
|
23
|
+
|
|
24
|
+
停止新接单并排空后切回先前保存的应用制品,保留本次运行期间的操作、授权和配置修订。旧版界面及宿主仍可使用原读取路径;依赖新增诊断的处理逻辑需接受字段缺失。启动后重新核对就绪状态和一笔原有记录。[版本说明](RELEASE_NOTES_v0.11.0.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Upgrade Core from v0.10.1 to v0.11.1
|
|
2
|
+
|
|
3
|
+
[简体中文](UPGRADE_v0.11.1.md)
|
|
4
|
+
|
|
5
|
+
## Update Core
|
|
6
|
+
|
|
7
|
+
1. Record the current image digest or npm version, configuration and data volumes. Use your usual maintenance procedure to stop admitting tasks, drain accepted work, and retain the previous artifact and a restorable backup of persistent data.
|
|
8
|
+
2. Update the image or source checkout to the `v0.11.1` release, or pin an embedding host to `bailinghub@0.11.1`. Upgrading from 0.10.1 requires no new SQL migration. For older versions, check the migration instructions for each intervening release.
|
|
9
|
+
3. Confirm that `/health/ready` returns 200 before resuming admission. Hosts can read the model window and diagnostic through their existing catalog and receipt APIs. Existing business authorization and model output budgets continue to apply. [Operations](OPERATIONS.en.md)
|
|
10
|
+
|
|
11
|
+
## Verify image identity
|
|
12
|
+
|
|
13
|
+
For a Docker deployment, inspect `ghcr.io/bailinghub/bailinghub:0.11.1` with `docker buildx imagetools inspect`. Find the digest beside the `linux/amd64` platform. It should match the manifest digest shown when inspecting the same version on the Aliyun ACR registry used in your Compose file. The top-level GHCR digest covers the complete index, including the build attestation. Repeat this check for `bailing-demo-business` if you use the demo. A deployment using the 0.11.0 GHCR image can follow the same steps.
|
|
14
|
+
|
|
15
|
+
## Check existing records
|
|
16
|
+
|
|
17
|
+
| Action | Expected result |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| Open a conversation with recorded messages under Tasks → Conversations. | The view identifies the channel and message roles and opens at the latest message. Follow an associated task to its trace when available. |
|
|
20
|
+
| Filter dispatches by a failure status and a known route. | Only matching tasks appear. Focus the status label with the keyboard to see its raw value. |
|
|
21
|
+
| Select a credential and invocation model in model service settings. | A supported route shows the verified window. For an unknown route, enter a verified value manually or save the new service as inactive. |
|
|
22
|
+
| Read `GET /usage/v1/model/models` using an account entitled to the service. | Match `service_id` and check `context_window_tokens`, the service revision and the existing output budget. The window covers input and output combined. Older registrations may return `null`. |
|
|
23
|
+
|
|
24
|
+
To support recovery of long conversations, test the host against a synthetic `CONTEXT_WINDOW_EXCEEDED` receipt. The host persists a compaction checkpoint and allocates a new operation ID for the shortened request. If the final receipt is missing, look up the original operation first. [Model continuation](MODEL_CONTINUATION.en.md)
|
|
25
|
+
|
|
26
|
+
## Roll back
|
|
27
|
+
|
|
28
|
+
Stop admission and drain active work before restoring the previous application artifact. Preserve operations, authorizations and configuration revisions recorded during the upgrade. Existing read paths remain available to older hosts. Consumers of the new diagnostic should tolerate an absent field. Recheck readiness and an existing operation after restart. [Release notes](RELEASE_NOTES_v0.11.1.en.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 从 Core v0.10.1 升级到 v0.11.1
|
|
2
|
+
|
|
3
|
+
[English](UPGRADE_v0.11.1.en.md)
|
|
4
|
+
|
|
5
|
+
## 更新 Core
|
|
6
|
+
|
|
7
|
+
1. 记录当前镜像摘要或 npm 包版本,以及它使用的配置和数据卷。在现有维护流程中暂停接收任务、排空已接受的工作,保留原制品和可恢复的持久化备份。
|
|
8
|
+
2. 按原部署方式切换到 `v0.11.1` 标签对应的镜像、源码,或宿主依赖 `bailinghub@0.11.1`。从 0.10.1 升级无需新增 SQL 迁移。更早的版本仍需逐版核对已发布的迁移。
|
|
9
|
+
3. 启动后确认 `/health/ready` 返回 200,再恢复接单。自定义宿主可使用已有模型目录和回执接口读取新增信息。业务系统原有的授权流程和模型服务的输出预算继续适用。[部署运维](OPERATIONS.md)
|
|
10
|
+
|
|
11
|
+
## 核对容器镜像
|
|
12
|
+
|
|
13
|
+
Docker 部署可运行 `docker buildx imagetools inspect ghcr.io/bailinghub/bailinghub:0.11.1`,找到 `linux/amd64` 平台条目旁的摘要。对 Compose 文件中的同版本阿里云 ACR 镜像运行同一命令,其清单摘要应与这个平台摘要一致。GHCR 顶层摘要覆盖包含构建证明的完整索引。使用示例业务时,对 `bailing-demo-business` 重复核对。已采用 GHCR 0.11.0 镜像的部署也可按此步骤升级。
|
|
14
|
+
|
|
15
|
+
## 用现有记录验收
|
|
16
|
+
|
|
17
|
+
| 操作 | 预期结果 |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| 在「任务 → 会话」打开一条有消息的历史会话 | 能识别消息来源及角色,并直接看到最新消息。如记录含关联任务,可进入追溯。 |
|
|
20
|
+
| 在「调度流」筛选失败状态和一条已知路由 | 列表只显示匹配任务。键盘聚焦状态标签可查看原始状态值。 |
|
|
21
|
+
| 在模型服务配置中选定凭证和调用模型 | 支持的路由会显示已核实的窗口。若来源未知,核实后手动填写,或将新服务暂存为停用。 |
|
|
22
|
+
| 用有对应服务权限的帐号读取 `GET /usage/v1/model/models` | 按 `service_id` 核对 `context_window_tokens`、服务修订和原有输出预算。窗口是输入与输出合计;旧服务可返回 `null`。 |
|
|
23
|
+
|
|
24
|
+
若接入方要实现长会话恢复,先通过测试回执核对其对 `CONTEXT_WINDOW_EXCEEDED` 的处理。由宿主保存压缩检查点并为缩短后的新请求分配新操作号。缺少最终回执时先查询原操作;用合成数据验证这一流程即可。[模型续跑](MODEL_CONTINUATION.md)
|
|
25
|
+
|
|
26
|
+
## 回退
|
|
27
|
+
|
|
28
|
+
停止新接单并排空后切回先前保存的应用制品,保留本次运行期间的操作、授权和配置修订。旧版界面及宿主仍可使用原读取路径;依赖新增诊断的处理逻辑需接受字段缺失。启动后重新核对就绪状态和一笔原有记录。[版本说明](RELEASE_NOTES_v0.11.1.md)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Public security assessment evidence
|
|
2
|
+
|
|
3
|
+
The `Publish security assessment evidence` workflow evaluates the public
|
|
4
|
+
`bailinghub/bailinghub` repository against OSPS Baseline 2026-08, including
|
|
5
|
+
maturity levels 1, 2 and 3. It uses the signed `openssf/github-repo` evaluator
|
|
6
|
+
version 0.33.2 and the official GRC reusable publisher.
|
|
7
|
+
|
|
8
|
+
The publishing destination is
|
|
9
|
+
[bailinghub/core](https://grc.store/targets/bailinghub/core).
|
|
10
|
+
The first successful publication registers that target. Before that run, an
|
|
11
|
+
absent target page is not evidence of a completed assessment.
|
|
12
|
+
|
|
13
|
+
## Identity and permissions
|
|
14
|
+
|
|
15
|
+
Only this repository's `refs/heads/main` is bound to the corresponding GRC
|
|
16
|
+
namespace. The reusable workflow isolates the evaluator (read-only repository
|
|
17
|
+
token) from the signing/publishing job (OIDC). No long-lived credential or
|
|
18
|
+
organization administrator token is provided. Source code licenses are
|
|
19
|
+
unchanged; published assessment output uses CC0-1.0.
|
|
20
|
+
|
|
21
|
+
GitHub statically validates permissions of every nested job, even a skipped
|
|
22
|
+
optional job. The caller therefore declares `security-events: write` required
|
|
23
|
+
by the official report job, but `upload-sarif: false` keeps that job disabled.
|
|
24
|
+
The evaluator and signing jobs do not receive this scope.
|
|
25
|
+
|
|
26
|
+
GRC currently requires the exact `@v1` workflow reference in its signing
|
|
27
|
+
identity. It rejects a commit-pinned caller. The reviewed tag resolved to
|
|
28
|
+
`0cbfef2f58ea147021d3657d7b18ed89920f2f6d` on 2026-11-11.
|
|
29
|
+
Review upstream changes to this trust root before relying on later runs.
|
|
30
|
+
|
|
31
|
+
## Running and interpreting it
|
|
32
|
+
|
|
33
|
+
Pull requests modifying the workflow run an unsigned dry run. Manual runs
|
|
34
|
+
default to dry-run mode; select `dry_run=false` on main to publish. Evidence
|
|
35
|
+
document changes on main and the weekly schedule publish fresh assessments.
|
|
36
|
+
There is no production deployment or product release in this workflow.
|
|
37
|
+
|
|
38
|
+
The scanner reads GitHub repository state and the current default branch;
|
|
39
|
+
a dry run on a pull request does not assess the pull request's proposed source
|
|
40
|
+
as if it had already merged. Published coordinates carry the triggering main
|
|
41
|
+
commit, and each result also needs its collection time and repository evidence
|
|
42
|
+
checked when reviewing a possible concurrent branch update.
|
|
43
|
+
|
|
44
|
+
A green publishing job means a result was stored, not that the baseline passed.
|
|
45
|
+
Read each requirement's verdict, evidence, coverage and assessed scope.
|
|
46
|
+
Failed, Needs Review, Unknown and Not Run outcomes must remain visible.
|
|
47
|
+
The restricted token cannot observe every administrative control; supplement
|
|
48
|
+
such gaps with independently collected, current evidence.
|
|
49
|
+
|
|
50
|
+
Covering all maturity tags is not a claim of meeting Level 3, receiving
|
|
51
|
+
certification, or earning a Security Slam badge. The evaluator itself warns
|
|
52
|
+
that higher-level checks are less rigorously tested. Manual governance
|
|
53
|
+
requirements, including genuine non-author human review, cannot be satisfied
|
|
54
|
+
by an automated scan or by changing a status label.
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
**你能看到什么**
|
|
22
22
|
|
|
23
|
-
-
|
|
23
|
+
- 「最近会话」按最近活动排列客户端、网页助手、企微和其他业务渠道。选择来源后点会话标题,在右侧阅读正文和执行轨迹。客户端按轮查看关联授权。网页助手未回复时,有关联任务的提问也能打开执行轨迹。
|
|
24
24
|
- 原授权记录仍可单独查询;未同步或没有原文的旧历史不会被显示为完整对话。
|
|
25
|
-
-
|
|
25
|
+
- 在「调度流」按任务状态、精确路由和创建时间筛选全部已记录的任务。点击任务摘要查看单次执行详情。
|
|
26
26
|
- 执行轨迹、工具调用、审批、知识引用、消息总账。
|
|
27
27
|
- debug bundle / debug report。
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -117,6 +117,10 @@ const englishCompanions = {
|
|
|
117
117
|
'docs/UPGRADE_v0.10.0.md': 'docs/UPGRADE_v0.10.0.en.md',
|
|
118
118
|
'docs/RELEASE_NOTES_v0.10.1.md': 'docs/RELEASE_NOTES_v0.10.1.en.md',
|
|
119
119
|
'docs/UPGRADE_v0.10.1.md': 'docs/UPGRADE_v0.10.1.en.md',
|
|
120
|
+
'docs/RELEASE_NOTES_v0.11.1.md': 'docs/RELEASE_NOTES_v0.11.1.en.md',
|
|
121
|
+
'docs/UPGRADE_v0.11.1.md': 'docs/UPGRADE_v0.11.1.en.md',
|
|
122
|
+
'docs/RELEASE_NOTES_v0.11.0.md': 'docs/RELEASE_NOTES_v0.11.0.en.md',
|
|
123
|
+
'docs/UPGRADE_v0.11.0.md': 'docs/UPGRADE_v0.11.0.en.md',
|
|
120
124
|
'docs/MODEL_OUTPUT_BUDGET.md': 'docs/MODEL_OUTPUT_BUDGET.en.md',
|
|
121
125
|
'docs/MODEL_CONTINUATION.md': 'docs/MODEL_CONTINUATION.en.md',
|
|
122
126
|
'docs/UPGRADE_v0.9.1.md': 'docs/UPGRADE_v0.9.1.en.md',
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.11.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}"
|
|
@@ -38,8 +38,8 @@ function updateJson(root, relativePath, update) {
|
|
|
38
38
|
test('current release surface is internally consistent', () => {
|
|
39
39
|
const result = checkReleaseConsistency({ root: repoRoot });
|
|
40
40
|
assert.deepEqual(result.findings, []);
|
|
41
|
-
assert.equal(result.version, '0.
|
|
42
|
-
assert.equal(result.stableVersion, '0.
|
|
41
|
+
assert.equal(result.version, '0.11.1');
|
|
42
|
+
assert.equal(result.stableVersion, '0.11.1');
|
|
43
43
|
assert.equal(result.publishTag, 'latest');
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Copy the runnable manifest while keeping the build attestations in the source registry.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
if [[ $# != 6 ]]; then
|
|
6
|
+
echo "usage: $0 SOURCE_REPO SOURCE_DIGEST TARGET_REPO TARGET_TAG EXPECTED_REVISION EXPECTED_VERSION" >&2
|
|
7
|
+
exit 2
|
|
8
|
+
fi
|
|
9
|
+
source_repo=$1
|
|
10
|
+
build_digest=$2
|
|
11
|
+
target="docker://$3:$4"
|
|
12
|
+
revision=$5
|
|
13
|
+
version=$6
|
|
14
|
+
digest_pattern='^sha256:[0-9a-f]{64}$'
|
|
15
|
+
[[ $build_digest =~ $digest_pattern ]] || { echo 'Expected a build digest' >&2; exit 1; }
|
|
16
|
+
|
|
17
|
+
platform_digest=$(
|
|
18
|
+
skopeo inspect --retry-times 3 --raw "docker://$source_repo@$build_digest" |
|
|
19
|
+
jq -er --arg build "$build_digest" '
|
|
20
|
+
if (.manifests | type) == "array" then
|
|
21
|
+
[.manifests[] | select(.platform.os == "linux" and .platform.architecture == "amd64")] |
|
|
22
|
+
if length == 1 then .[0].digest else error("expected exactly one linux/amd64 image") end
|
|
23
|
+
elif .config.digest and (.layers | type) == "array" then $build
|
|
24
|
+
else error("expected an image manifest or index") end'
|
|
25
|
+
)
|
|
26
|
+
[[ $platform_digest =~ $digest_pattern ]] || { echo 'Invalid platform manifest digest' >&2; exit 1; }
|
|
27
|
+
source_image="docker://$source_repo@$platform_digest"
|
|
28
|
+
|
|
29
|
+
skopeo inspect --retry-times 3 --config "$source_image" |
|
|
30
|
+
jq -e --arg revision "$revision" --arg version "$version" '
|
|
31
|
+
.os == "linux" and .architecture == "amd64" and
|
|
32
|
+
.config.Labels["org.opencontainers.image.revision"] == $revision and
|
|
33
|
+
.config.Labels["org.opencontainers.image.version"] == $version' >/dev/null
|
|
34
|
+
|
|
35
|
+
skopeo copy --retry-times 3 --preserve-digests "$source_image" "$target"
|
|
36
|
+
# The manifest digest also binds the config and every ordered layer digest.
|
|
37
|
+
actual=$(skopeo inspect --retry-times 3 --raw "$target" | sha256sum | cut -d ' ' -f 1)
|
|
38
|
+
if [[ sha256:$actual != "$platform_digest" ]]; then
|
|
39
|
+
echo "Published manifest at $target does not match $platform_digest" >&2
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
printf '%s -> %s (%s)\n' "$source_image" "$target" "$revision"
|
|
@@ -78,6 +78,13 @@ async function scenario(readonly = false) {
|
|
|
78
78
|
await page.getByRole('button', { name: '调用代码', exact: true }).click();
|
|
79
79
|
await page.getByText('当前账号不能读取接入方目录;代码保留 token 占位,请由管理员核对推送授权。', { exact: true }).waitFor();
|
|
80
80
|
assert.equal(await page.getByText('还没有接入方被授权推送', { exact: false }).count(), 0, 'missing directory permission is not no authorization');
|
|
81
|
+
const help = page.getByRole('button', { name: '点击查看:渠道推送与接入授权', exact: true });
|
|
82
|
+
const instructions = page.getByText('将本渠道加入接入方的可推渠道白名单', { exact: false });
|
|
83
|
+
await instructions.waitFor({ state: 'hidden' });
|
|
84
|
+
await help.click();
|
|
85
|
+
await instructions.waitFor({ state: 'visible' });
|
|
86
|
+
await help.press('Escape');
|
|
87
|
+
await instructions.waitFor({ state: 'hidden' });
|
|
81
88
|
assert.equal(revealReads, 0);
|
|
82
89
|
releaseFirstToken(); await context.close(); return;
|
|
83
90
|
}
|
|
@@ -153,7 +153,7 @@ export async function verifyTroubleshootingExtra(browser, base, mockApi, fixture
|
|
|
153
153
|
await page.locator('.task-control-page .el-table').getByRole('button', { name: `${taskA.slice(0, 8)}…${taskA.slice(-4)}`, exact: true }).click();
|
|
154
154
|
await waitFor(() => Boolean(taskReadGate === undefined), '任务详情读取未开始');
|
|
155
155
|
await closeTask();
|
|
156
|
-
const refresh = page.locator('.task-
|
|
156
|
+
const refresh = page.locator('.task-control-page .el-card__header').getByRole('button', { name: '刷新', exact: true });
|
|
157
157
|
await waitFor(() => refresh.isEnabled(), '关闭加载中的详情后刷新仍被 loading 禁用');
|
|
158
158
|
detail.released.resolve();
|
|
159
159
|
await detail.finished.promise;
|
|
@@ -212,7 +212,7 @@ export async function verifyTroubleshootingExtra(browser, base, mockApi, fixture
|
|
|
212
212
|
await visible(page, '孤立告警规则 17');
|
|
213
213
|
assert.equal(await rulePanel.locator('.el-table__row').count(), 1, '告警规则精确定位不得包含 117');
|
|
214
214
|
assert.equal(await page.getByText('近似告警规则 117', { exact: true }).count(), 0);
|
|
215
|
-
assert.equal(await rulePanel.getByText('
|
|
215
|
+
assert.equal(await rulePanel.getByText('暂无告警规则', { exact: true }).count(), 0);
|
|
216
216
|
await page.reload();
|
|
217
217
|
await visible(page, '孤立告警规则 17');
|
|
218
218
|
|
|
@@ -220,7 +220,7 @@ export async function verifyTroubleshootingExtra(browser, base, mockApi, fixture
|
|
|
220
220
|
ruleReadFails = true;
|
|
221
221
|
await page.reload();
|
|
222
222
|
await rulePanel.locator('.el-alert--error').waitFor();
|
|
223
|
-
assert.equal(await rulePanel.getByText('
|
|
223
|
+
assert.equal(await rulePanel.getByText('暂无告警规则', { exact: true }).count(), 0);
|
|
224
224
|
ruleReadFails = false;
|
|
225
225
|
await rulePanel.getByRole('button', { name: '重试读取告警规则', exact: true }).click();
|
|
226
226
|
await visible(page, '孤立告警规则 17');
|
|
@@ -231,7 +231,7 @@ export async function verifyTroubleshootingExtra(browser, base, mockApi, fixture
|
|
|
231
231
|
await page.reload();
|
|
232
232
|
await visible(page, '孤立告警规则 17');
|
|
233
233
|
await page.locator('.el-card').filter({ has: page.getByText('入站渠道', { exact: true }) }).first().locator('.el-alert--error').waitFor();
|
|
234
|
-
assert.equal(await page.getByText('
|
|
234
|
+
assert.equal(await page.getByText('暂无入站渠道', { exact: true }).count(), 0);
|
|
235
235
|
channelReadFails = false;
|
|
236
236
|
|
|
237
237
|
// Known online workers filtered to offline are "no matches", never "no workers online".
|
package/scripts/e2e-console.mjs
CHANGED
|
@@ -126,6 +126,7 @@ const conversation = {
|
|
|
126
126
|
conversation_id: conversationId,
|
|
127
127
|
client_archive_id: '723e4567-e89b-42d3-a456-426614174000',
|
|
128
128
|
client_conversation_id: 'demo-client-conversation',
|
|
129
|
+
first_user_preview: conversationUser,
|
|
129
130
|
client_app_id: 'demo-app',
|
|
130
131
|
route_key: 'demo_support',
|
|
131
132
|
state: 'ready',
|
|
@@ -308,6 +309,11 @@ async function mockApi(context) {
|
|
|
308
309
|
if (url.pathname === '/admin/api/clients') return route.fulfill({ json: fixtures.clients });
|
|
309
310
|
if (url.pathname === '/admin/api/routes') return route.fulfill({ json: fixtures.routes });
|
|
310
311
|
if (url.pathname === '/admin/api/runs') return route.fulfill({ json: fixtures.runs });
|
|
312
|
+
if (url.pathname === '/admin/api/conversation-audits/feed') {
|
|
313
|
+
const item = { ...conversation, kind: 'audit', source: 'client', title: conversationUser, source_label: 'Demo 客户端', thread_id: null };
|
|
314
|
+
const source = url.searchParams.get('source') || 'all';
|
|
315
|
+
return route.fulfill({ json: { items: source === 'all' || source === 'client' ? [item] : [], has_more: false, next_offset: null } });
|
|
316
|
+
}
|
|
311
317
|
if (url.pathname === '/admin/api/conversation-audits') return route.fulfill({ json: {
|
|
312
318
|
schema: 'bailing.agent-conversation-audit-list.v1', items: [conversation], has_more: false, next_offset: null,
|
|
313
319
|
} });
|
|
@@ -362,7 +368,11 @@ async function verifyCallSnippets(page, base) {
|
|
|
362
368
|
await page.goto(`${base}/console/routes`);
|
|
363
369
|
await page.getByRole('button', { name: '调用代码', exact: true }).first().click();
|
|
364
370
|
const dialog = page.getByRole('dialog', { name: /调用代码/ });
|
|
365
|
-
await
|
|
371
|
+
await dialog.getByRole('button', { name: '前往接入方' }).waitFor();
|
|
372
|
+
const tokenHelp = dialog.getByRole('button', { name: '点击查看:调用凭证' });
|
|
373
|
+
await tokenHelp.click();
|
|
374
|
+
await expectVisible(page, '从「接入方」复制该接入方的完整 Token');
|
|
375
|
+
await tokenHelp.press('Escape');
|
|
366
376
|
await expectVisible(page, '1 个接入方可调用');
|
|
367
377
|
for (const language of ['HTTP / cURL', 'Node.js', 'Python', 'PHP', 'Agent 触发']) {
|
|
368
378
|
await dialog.getByRole('tab', { name: language, exact: true }).click();
|
|
@@ -373,9 +383,9 @@ async function verifyCallSnippets(page, base) {
|
|
|
373
383
|
await page.keyboard.press('Escape');
|
|
374
384
|
await page.getByRole('button', { name: '编辑', exact: true }).first().click();
|
|
375
385
|
await expectVisible(page, '执行行为提示');
|
|
376
|
-
await expectVisible(page, '仅提示词约束;工具授权与审批');
|
|
377
386
|
await page.getByRole('button', { name: '点击查看:执行行为提示', exact: true }).click();
|
|
378
387
|
await expectVisible(page, '此项是提示词约束,不是强制授权或沙箱');
|
|
388
|
+
await page.getByRole('button', { name: '点击查看:执行行为提示', exact: true }).press('Escape');
|
|
379
389
|
await page.getByRole('button', { name: '取消', exact: true }).click();
|
|
380
390
|
console.log('✓ snippets: environment token, enabled clients and visible permission boundary passed');
|
|
381
391
|
} finally { fixtures.clients.pop(); }
|
|
@@ -612,8 +622,11 @@ async function verifyOnboardingAndForms(browser, base) {
|
|
|
612
622
|
await p.waitForURL('**/setup?flow=agent');
|
|
613
623
|
assert.deepEqual(await p.locator('.stepTop > b').allTextContents(), ['登记业务工具源', '准备工作空间(业务路由)', '创建接入方并关联路由', '配置业务授权与工具范围', '在本地客户端登录并验证']);
|
|
614
624
|
assert.equal(await p.locator('.modelNote').count(), 0);
|
|
625
|
+
const workspaceHelp = p.getByRole('button', { name: '点击查看:准备工作空间(业务路由)' });
|
|
626
|
+
await workspaceHelp.click();
|
|
615
627
|
await expectVisible(p, '新建时仍需绑定真实调度目标');
|
|
616
628
|
await expectVisible(p, '中枢模型目标(llm)需要模型凭证');
|
|
629
|
+
await workspaceHelp.press('Escape');
|
|
617
630
|
routeReadFails = true;
|
|
618
631
|
await p.getByRole('button', { name: '刷新', exact: true }).click();
|
|
619
632
|
await expectVisible(p, '读取失败');
|
|
@@ -746,7 +759,26 @@ async function verifyTroubleshooting(browser, base) {
|
|
|
746
759
|
];
|
|
747
760
|
await context.route('**/admin/api/config-diagnostics', r => r.fulfill({ json: { ok: false, errors: 1, warnings: 3, diagnostics: ds } }));
|
|
748
761
|
await context.route('**/admin/api/clients', r => r.fulfill({ json: [...fixtures.clients, { ...fixtures.clients[0], app_id: 'demo-app-extra', name: 'Similar client' }] }));
|
|
749
|
-
|
|
762
|
+
const dispatchReads = [];
|
|
763
|
+
const missingJob = '00000000-0000-4000-8000-000000000099';
|
|
764
|
+
await context.route('**/admin/api/runs/trace?**', r => {
|
|
765
|
+
const q = new URL(r.request().url()).searchParams;
|
|
766
|
+
if (q.get('job_id') === missingJob) return r.fulfill({ status: 404, json: { error: 'job 不存在' } });
|
|
767
|
+
if (q.has('job_id')) return r.fulfill({ json: tracePayload() });
|
|
768
|
+
if (q.get('client_id') === 'demo') return r.fulfill({ json: { matches: [fixtures.runs[0], { ...fixtures.runs[0], job_id: missingJob, request_id: 'previous-task' }] } });
|
|
769
|
+
return r.fulfill({ json: { matches: [] } });
|
|
770
|
+
});
|
|
771
|
+
await context.route('**/admin/api/runs?*', r => {
|
|
772
|
+
const q = new URL(r.request().url()).searchParams;
|
|
773
|
+
dispatchReads.push(Object.fromEntries(q));
|
|
774
|
+
const jobs = [
|
|
775
|
+
...Array.from({length:50}, (_, i) => ({ ...fixtures.runs[0], job_id: 'newer-' + i, route_key: 'other_route' })),
|
|
776
|
+
{ ...fixtures.runs[0], route_key: 'demo_support', status: 'error', input_preview: '较早的失败任务', error_preview: '上游请求失败' },
|
|
777
|
+
];
|
|
778
|
+
const offset = Number(q.get('offset') || 0);
|
|
779
|
+
const rows = jobs.filter(j => (!q.get('status') || j.status === q.get('status')) && (!q.get('route_key') || j.route_key === q.get('route_key')));
|
|
780
|
+
return r.fulfill({ json: rows.slice(offset, offset + Number(q.get('limit') || 50)) });
|
|
781
|
+
});
|
|
750
782
|
await context.route('**/admin/api/notification-outbox?*', r => r.fulfill({ json: { items: [{ event_id: 'delivery-unknown', kind: 'delivery-dlq', status: 'uncertain', job_id: fixtures.runs[0].job_id, attempts: 1, updated_at: new Date().toISOString() }], total: 1, snapshot: { counts: { pending: 0, processing: 0, failed: 0, uncertain: 1 } } } }));
|
|
751
783
|
try {
|
|
752
784
|
await p.goto(`${base}/console/diagnostics?severity=error&q=demo`);
|
|
@@ -788,19 +820,49 @@ async function verifyTroubleshooting(browser, base) {
|
|
|
788
820
|
await p.locator('.notification-panel .el-table__expand-icon').first().click();
|
|
789
821
|
await p.getByRole('button', { name: '查看原任务', exact: true }).click();
|
|
790
822
|
await p.waitForURL(u => !!u.searchParams.get('detail'));
|
|
791
|
-
|
|
823
|
+
const detailStatus = p.locator('.runDetailDrawer:visible .jobStatusTag');
|
|
824
|
+
await detailStatus.hover();
|
|
825
|
+
assert.equal(await detailStatus.innerText(), '已完成');
|
|
826
|
+
await p.getByRole('tooltip').filter({ hasText: '原始状态:done' }).waitFor();
|
|
827
|
+
await p.locator('.runDetailDrawer:visible .el-drawer__close-btn').click();
|
|
792
828
|
await p.waitForURL(u => !u.searchParams.has('detail') && u.searchParams.get('outbox_status') === 'uncertain');
|
|
793
829
|
await p.getByRole('button', { name: '返回来源页面', exact: true }).click();
|
|
794
830
|
await p.waitForURL(u => u.pathname.endsWith('/diagnostics') && u.searchParams.get('q') === 'delivery_dlq');
|
|
795
831
|
await p.goto(`${base}/console/diagnostics?q=error_burst`);
|
|
796
832
|
await p.locator('.groups .el-table__row').first().getByRole('button', { name: '打开', exact: true }).click();
|
|
797
833
|
await p.waitForURL(u => u.pathname.endsWith('/runs') && u.searchParams.get('tab') === 'jobs');
|
|
798
|
-
await expectVisible(p, '
|
|
834
|
+
await expectVisible(p, '共 1 条任务');
|
|
799
835
|
await p.locator('.run-filters .el-select__wrapper').nth(2).click();
|
|
800
836
|
await p.getByRole('option', { name: '最近 24 小时', exact: true }).click();
|
|
801
837
|
await p.waitForURL(u => u.searchParams.get('run_period') === '24h' && u.searchParams.get('run_status') === 'error');
|
|
802
838
|
await p.reload();
|
|
803
|
-
await expectVisible(p, '
|
|
839
|
+
await expectVisible(p, '共 1 条任务');
|
|
840
|
+
const failedTask = p.getByRole('button', { name: '较早的失败任务', exact: true });
|
|
841
|
+
await failedTask.press('Tab');
|
|
842
|
+
const focusedStatus = p.locator('.runsTable .jobStatusTag:focus-visible');
|
|
843
|
+
assert.equal(await focusedStatus.innerText(), '执行错误');
|
|
844
|
+
await p.waitForFunction(() => getComputedStyle(document.activeElement).outlineWidth === '2px');
|
|
845
|
+
await p.getByRole('tooltip').filter({ hasText: '原始状态:error' }).waitFor();
|
|
846
|
+
assert.ok(dispatchReads.some(q => q.period === '24h' && q.status === 'error' && q.offset === '0'));
|
|
847
|
+
await p.goto(`${base}/console/runs?tab=trace&trace_q=client%3Ademo`);
|
|
848
|
+
const match = p.locator('.traceMatches').getByRole('button', { name: fixtures.runs[0].request_id, exact: true });
|
|
849
|
+
await p.locator('.traceMatches .jobStatusTag').getByText('已完成', { exact: true }).first().waitFor();
|
|
850
|
+
await match.click();
|
|
851
|
+
await p.locator('.traceHeadTags .jobStatusTag').getByText('已完成', { exact: true }).waitFor();
|
|
852
|
+
await p.reload();
|
|
853
|
+
await p.getByRole('button', { name: '返回匹配任务' }).click();
|
|
854
|
+
await match.waitFor();
|
|
855
|
+
assert.equal(new URL(p.url()).searchParams.get('trace_q'), 'client:demo');
|
|
856
|
+
await match.click();
|
|
857
|
+
await p.locator('.tracePanel').waitFor();
|
|
858
|
+
await p.goBack();
|
|
859
|
+
await match.waitFor();
|
|
860
|
+
for (const raw of ['missing-request', missingJob]) {
|
|
861
|
+
await p.goto(`${base}/console/runs?tab=trace&trace_q=${raw}`);
|
|
862
|
+
await expectVisible(p, `没有与「${raw}」匹配的任务`);
|
|
863
|
+
assert.equal(await p.locator('.tracePanel:visible').count(), 0);
|
|
864
|
+
}
|
|
865
|
+
|
|
804
866
|
assert.deepEqual(errors, []);
|
|
805
867
|
console.log('✓ troubleshooting: exact diagnostic focus, missing objects, filters, tabs, reload and return context passed');
|
|
806
868
|
} finally { await context.close(); }
|
|
@@ -837,8 +899,11 @@ try {
|
|
|
837
899
|
await expectVisible(page, '通过 3');
|
|
838
900
|
|
|
839
901
|
await page.getByRole('menuitem', { name: '聊天入口' }).click();
|
|
902
|
+
const chatHelp = page.getByRole('button', { name: '点击查看:聊天入口是什么' });
|
|
903
|
+
await chatHelp.click();
|
|
840
904
|
await expectVisible(page, '“匿名预览”不会继承中枢后台登录状态');
|
|
841
905
|
await expectVisible(page, '包括只读查询和写操作');
|
|
906
|
+
await chatHelp.press('Escape');
|
|
842
907
|
await expectVisible(page, '支持业务身份票据:demo-app');
|
|
843
908
|
await expectVisible(page, '匿名预览');
|
|
844
909
|
|
|
@@ -891,10 +956,8 @@ try {
|
|
|
891
956
|
await page.getByRole('button', { name: '取消', exact: true }).click();
|
|
892
957
|
|
|
893
958
|
await page.getByRole('menuitem', { name: '任务', exact: true }).click();
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
const auditList = page.locator('aside[aria-label="客户端对话列表"]');
|
|
897
|
-
await auditList.getByRole('button', { name: /demo-client-conversation/ }).click();
|
|
959
|
+
const auditList = page.locator('aside[aria-label="会话列表"]');
|
|
960
|
+
await auditList.getByRole('button', { name: new RegExp(conversationUser) }).click();
|
|
898
961
|
const auditTurn = page.locator(`section[data-turn-id="${conversationTurnId}"]`);
|
|
899
962
|
await expectVisible(page, conversationReply);
|
|
900
963
|
if (await auditTurn.locator('.userMessage .messageText').innerText() !== conversationUser ||
|
|
@@ -904,31 +967,28 @@ try {
|
|
|
904
967
|
await expectVisible(page, '已接收 1 轮 / 2 条消息');
|
|
905
968
|
await expectVisible(page, '旧历史或未同步内容可能缺失');
|
|
906
969
|
if (await auditTurn.locator('.authorizationRun').count() !== 2) throw new Error('本轮应保留两项独立授权执行');
|
|
907
|
-
const accountA = auditTurn.locator(
|
|
908
|
-
const accountB = auditTurn.locator(
|
|
970
|
+
const accountA = auditTurn.locator(`[data-run-id="${agentRunId}"]`);
|
|
971
|
+
const accountB = auditTurn.locator(`[data-run-id="${incompleteAgentRunId}"]`);
|
|
909
972
|
await accountA.getByText('演示账户 A', { exact: true }).waitFor();
|
|
910
973
|
await accountB.getByText('演示账户 B', { exact: true }).waitFor();
|
|
911
|
-
await accountA.getByRole('button', { name:
|
|
974
|
+
await accountA.getByRole('button', { name: /授权执行.*演示账户 A/ }).click();
|
|
912
975
|
await accountA.locator('.invocation').getByText('staff_edit', { exact: true }).waitFor();
|
|
913
976
|
await accountA.getByRole('button', { name: '原授权记录', exact: true }).click();
|
|
914
977
|
await expectVisible(page, '把员工资料改成新的姓名');
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
}
|
|
978
|
+
const rawPanel = page.locator('.rawRecordDrawer');
|
|
979
|
+
await rawPanel.waitFor({ state: 'visible' });
|
|
918
980
|
await page.locator('.tracetoggle').filter({ hasText: '执行轨迹' }).first().click();
|
|
919
981
|
await page.getByRole('button', { name: '查看客户端完整对话', exact: true }).click();
|
|
920
982
|
await page.waitForURL((url) => url.searchParams.get('conversation') === conversationId &&
|
|
921
983
|
url.searchParams.get('turn') === conversationTurnId);
|
|
922
984
|
await auditTurn.locator('.assistantMessage .messageText').waitFor({ state: 'visible' });
|
|
923
|
-
if (
|
|
985
|
+
if (await auditTurn.locator('.assistantMessage .messageText').innerText() !== conversationReply) {
|
|
924
986
|
throw new Error('原执行轨迹必须返回同一客户端对话与原始答复');
|
|
925
987
|
}
|
|
926
988
|
|
|
927
989
|
// Keep the existing business-entry and authorization-scoped trace checks.
|
|
928
|
-
await
|
|
929
|
-
|
|
930
|
-
throw new Error('切换后应展示原授权记录');
|
|
931
|
-
}
|
|
990
|
+
await auditList.getByRole('button', { name: '授权与接入记录' }).click();
|
|
991
|
+
await rawPanel.waitFor({ state: 'visible' });
|
|
932
992
|
await expectVisible(page, '查询订单 SO-1001');
|
|
933
993
|
await page.getByText('查询订单 SO-1001').first().click();
|
|
934
994
|
await expectVisible(page, '订单 SO-1001 已查询完成');
|
|
@@ -936,11 +996,15 @@ try {
|
|
|
936
996
|
await expectVisible(page, '工具返回');
|
|
937
997
|
await expectVisible(page, '任务完成');
|
|
938
998
|
|
|
939
|
-
await
|
|
999
|
+
await rawPanel.getByRole('button', { name: '返回记录列表' }).click();
|
|
1000
|
+
await rawPanel.getByText('员工资料已修改').first().click();
|
|
940
1001
|
await expectVisible(page, '把员工资料改成新的姓名');
|
|
941
1002
|
await page.locator('.tracetoggle').filter({ hasText: '执行轨迹' }).first().click();
|
|
942
1003
|
await expectVisible(page, '本地智能体编排');
|
|
1004
|
+
const agentTraceHelp = rawPanel.getByRole('button', { name: '点击查看:本地智能体执行轨迹' }).first();
|
|
1005
|
+
await agentTraceHelp.click();
|
|
943
1006
|
await expectVisible(page, '隐藏推理不会上传');
|
|
1007
|
+
await agentTraceHelp.press('Escape');
|
|
944
1008
|
await expectVisible(page, '中枢治理');
|
|
945
1009
|
await expectVisible(page, 'staff_edit');
|
|
946
1010
|
if (await page.getByText('未挂工具', { exact: true }).count()) {
|
|
@@ -950,12 +1014,15 @@ try {
|
|
|
950
1014
|
throw new Error('Agent Client 会话轨迹不得展示隐藏推理');
|
|
951
1015
|
}
|
|
952
1016
|
|
|
953
|
-
await
|
|
1017
|
+
await rawPanel.getByRole('button', { name: '返回记录列表' }).click();
|
|
1018
|
+
await rawPanel.getByText('等待本地智能体继续处理').first().click();
|
|
954
1019
|
await page.locator('.tracetoggle').filter({ hasText: '执行轨迹' }).first().click();
|
|
955
1020
|
await expectVisible(page, '上下文已就绪');
|
|
956
1021
|
await expectVisible(page, '已批准,等待本地智能体续执行');
|
|
957
1022
|
await expectVisible(page, '不代表全量');
|
|
958
1023
|
|
|
1024
|
+
await page.keyboard.press('Escape');
|
|
1025
|
+
await rawPanel.waitFor({ state: 'hidden' });
|
|
959
1026
|
await verifyCallSnippets(page, `http://127.0.0.1:${port}`);
|
|
960
1027
|
await verifyStatusFeedback(page, context, `http://127.0.0.1:${port}`);
|
|
961
1028
|
|
package/scripts/install.sh
CHANGED
|
@@ -279,7 +279,7 @@ write_env() {
|
|
|
279
279
|
TOOL_SECRET="${DEMO_TOOL_SECRET:-$(secret)}"
|
|
280
280
|
CLIENT_TOKEN="${DEMO_CLIENT_TOKEN:-$(secret)}"
|
|
281
281
|
IMAGE_TAG="${BAILING_IMAGE_TAG:-$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$APP_DIR/package.json" | head -1)}"
|
|
282
|
-
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.
|
|
282
|
+
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.11.1"
|
|
283
283
|
IMAGE_REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_IMAGE_REGISTRY}"
|
|
284
284
|
IMAGE_NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_IMAGE_NAMESPACE}"
|
|
285
285
|
cat > "$ENV_FILE" <<EOF
|
|
@@ -50,7 +50,8 @@ async function open(role) {
|
|
|
50
50
|
perms: role === 'writer' ? ['runs:read', 'runs:write'] : ['runs:read'], capabilities: { modules: ['runs'] } } });
|
|
51
51
|
if (url.pathname === '/admin/api/status') return route.fulfill({ json: { executors: [] } });
|
|
52
52
|
if (url.pathname === '/admin/api/runs' || url.pathname === '/admin/api/threads') return route.fulfill({ json: [] });
|
|
53
|
-
if (
|
|
53
|
+
if (request.method() === 'GET' && ['/admin/api/conversation-audits', '/admin/api/conversation-audits/feed'].includes(url.pathname))
|
|
54
|
+
return route.fulfill({ json: { items: [], has_more: false, next_offset: null } });
|
|
54
55
|
if (url.pathname.startsWith('/admin/api/notification-outbox')) {
|
|
55
56
|
const record = { role, method: request.method(), path: url.pathname, query: Object.fromEntries(url.searchParams) };
|
|
56
57
|
requests.push(record);
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.11.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}"
|
|
@@ -61,6 +61,14 @@ const requiredRepoFiles = [
|
|
|
61
61
|
'docs/RELEASE_NOTES_v0.10.1.en.md',
|
|
62
62
|
'docs/UPGRADE_v0.10.1.md',
|
|
63
63
|
'docs/UPGRADE_v0.10.1.en.md',
|
|
64
|
+
'docs/RELEASE_NOTES_v0.11.1.md',
|
|
65
|
+
'docs/RELEASE_NOTES_v0.11.1.en.md',
|
|
66
|
+
'docs/UPGRADE_v0.11.1.md',
|
|
67
|
+
'docs/UPGRADE_v0.11.1.en.md',
|
|
68
|
+
'docs/RELEASE_NOTES_v0.11.0.md',
|
|
69
|
+
'docs/RELEASE_NOTES_v0.11.0.en.md',
|
|
70
|
+
'docs/UPGRADE_v0.11.0.md',
|
|
71
|
+
'docs/UPGRADE_v0.11.0.en.md',
|
|
64
72
|
'docs/RELEASE_NOTES_v0.6.1.md',
|
|
65
73
|
'docs/RELEASE_NOTES_v0.6.0.md',
|
|
66
74
|
'docs/CHANGELOG.md',
|