bailinghub 0.9.4 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_CLIENT_QUICKSTART.en.md +1 -3
- package/docs/AGENT_CLIENT_QUICKSTART.md +1 -1
- package/docs/AGENT_CLIENT_RUNTIME_API.en.md +87 -2
- package/docs/AGENT_CLIENT_RUNTIME_API.md +36 -2
- package/docs/AGENT_KNOWLEDGE_API.en.md +77 -0
- package/docs/AGENT_KNOWLEDGE_API.md +86 -0
- package/docs/AGENT_TASK_CONTROL.md +4 -4
- package/docs/AGENT_TASK_CONTROL_FOUNDATION.md +1 -1
- package/docs/ARCHITECTURE.md +4 -0
- package/docs/CHANGELOG.en.md +24 -1
- package/docs/CHANGELOG.md +24 -1
- package/docs/COMPATIBILITY.en.md +27 -1
- package/docs/CONTRACT.en.md +1 -1
- package/docs/CONTRACT.md +1 -1
- package/docs/IMPLEMENTATION_STATUS.en.md +28 -15
- package/docs/IMPLEMENTATION_STATUS.md +28 -15
- package/docs/INDEPENDENT_VALIDATION.en.md +6 -4
- package/docs/INDEPENDENT_VALIDATION.md +6 -4
- package/docs/INTEGRATION_WALKTHROUGH.md +65 -0
- package/docs/MODEL_BILLING.en.md +2 -0
- package/docs/MODEL_BILLING.md +6 -2
- package/docs/MODEL_CONTINUATION.en.md +54 -0
- package/docs/MODEL_CONTINUATION.md +54 -0
- package/docs/MODEL_OUTPUT_BUDGET.en.md +69 -0
- package/docs/MODEL_OUTPUT_BUDGET.md +69 -0
- package/docs/OPERATIONS.en.md +16 -4
- package/docs/OPERATIONS.md +16 -4
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.en.md +7 -0
- package/docs/README.md +7 -0
- package/docs/RELEASE_NOTES_NEXT.en.md +3 -3
- package/docs/RELEASE_NOTES_NEXT.md +3 -3
- package/docs/RELEASE_NOTES_v0.10.0.en.md +58 -0
- package/docs/RELEASE_NOTES_v0.10.0.md +58 -0
- package/docs/RELEASE_NOTES_v0.10.1.en.md +41 -0
- package/docs/RELEASE_NOTES_v0.10.1.md +41 -0
- package/docs/UPGRADE_PLAN.en.md +118 -0
- package/docs/UPGRADE_PLAN.md +124 -0
- package/docs/UPGRADE_v0.10.0.en.md +47 -0
- package/docs/UPGRADE_v0.10.0.md +47 -0
- package/docs/UPGRADE_v0.10.1.en.md +66 -0
- package/docs/UPGRADE_v0.10.1.md +66 -0
- package/docs//345/205/274/345/256/271/346/200/247/344/270/216/345/215/207/347/272/247.md +38 -22
- package/package.json +10 -5
- package/schemas/tool-definition.schema.json +13 -0
- package/scripts/check-doc-links.mjs +6 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-php-sdk-artifacts.mjs +152 -0
- package/scripts/check-php-sdk-artifacts.test.mjs +99 -0
- package/scripts/check-release-consistency.test.mjs +2 -2
- package/scripts/doctor-upgrade-plan.test.ts +205 -0
- package/scripts/doctor-upgrade-plan.ts +276 -0
- package/scripts/doctor.ts +4 -1
- package/scripts/e2e-console-approval-details.mjs +134 -0
- package/scripts/e2e-console-config-races.mjs +180 -0
- package/scripts/e2e-console-kb-audit.mjs +170 -0
- package/scripts/e2e-console-operations-audit.mjs +152 -0
- package/scripts/e2e-console-runtime-audit.mjs +179 -0
- package/scripts/e2e-console-settings-audit.mjs +125 -0
- package/scripts/e2e-console-troubleshooting-extra.mjs +267 -0
- package/scripts/e2e-console.mjs +476 -7
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +9 -1
- package/scripts/sdk-declaration-contract-test.ts +34 -0
- package/scripts/sdk-p1-check.mjs +62 -26
- package/scripts/verify-github-repo.mjs +8 -0
- package/sdk/dotnet/Bailing.Connect/BailingConnect.cs +4 -4
- package/sdk/dotnet/README.md +8 -0
- package/sdk/dotnet/tests/Declaration/Declaration.csproj +11 -0
- package/sdk/dotnet/tests/Declaration/Program.cs +74 -0
- package/sdk/go/README.md +8 -0
- package/sdk/go/bailingconnect/connect.go +5 -5
- package/sdk/go/bailingconnect/declaration_test.go +107 -0
- package/sdk/java/README.md +13 -0
- package/sdk/java/src/main/java/com/bailing/connect/BailingConnect.java +4 -4
- package/sdk/java/tests/DeclarationTest.java +70 -0
- package/sdk/node/README.md +8 -0
- package/sdk/node/src/index.mjs +4 -4
- package/sdk/node/tests/declaration.test.mjs +41 -0
- package/sdk/php/README.md +16 -0
- package/sdk/php/src/Attributes/AiTool.php +4 -4
- package/sdk/php/src/SpecBuilder.php +8 -8
- package/sdk/php/tests/declaration-serialization.php +103 -0
- package/sdk/php7/README.md +14 -0
- package/sdk/php7/src/ToolDef.php +3 -3
- package/sdk/php7/src/ToolSpec.php +8 -13
- package/sdk/php7/tests/declaration-serialization.php +103 -0
- package/sdk/python/README.md +8 -0
- package/sdk/python/bailing_connect/__init__.py +6 -6
- package/sdk/python/tests/test_declaration.py +61 -0
- package/src/app/agent-client-runtime.test.ts +115 -2
- package/src/app/agent-client-runtime.ts +40 -11
- package/src/app/agent-knowledge.test.ts +171 -0
- package/src/app/agent-knowledge.ts +233 -0
- package/src/app/agent-tool-catalog-revision.test.ts +31 -0
- package/src/app/agent-tool-invocations.test.ts +7 -2
- package/src/app/agent-tool-invocations.ts +67 -7
- package/src/app/approval-continuations.test.ts +49 -1
- package/src/app/http.test.ts +16 -1
- package/src/app/http.ts +3 -3
- package/src/app/kernel-boot-recovery.mysql.test.ts +132 -0
- package/src/app/kernel-boot-recovery.test.ts +157 -0
- package/src/app/kernel.ts +12 -8
- package/src/app/readiness.mysql.test.ts +120 -0
- package/src/app/readiness.test.ts +111 -26
- package/src/app/readiness.ts +26 -22
- package/src/app/runtime-lifecycle.ts +34 -3
- package/src/app/tool-approvals.test.ts +83 -0
- package/src/app/tool-approvals.ts +25 -7
- package/src/app/tool-proxy-payload.test.ts +81 -0
- package/src/app/tool-proxy.ts +24 -2
- package/src/core/config/console-diagnostic-location.test.ts +36 -0
- package/src/core/config/console-form-guard.test.ts +69 -0
- package/src/core/config/console-task-location.test.ts +64 -0
- package/src/core/contracts/explicit-capability-values.test.ts +62 -0
- package/src/core/contracts/openapi-tools.ts +18 -7
- package/src/core/contracts/schema-readiness.ts +11 -0
- package/src/core/contracts/tool-annotations.ts +4 -4
- package/src/core/contracts/tool-definition.ts +26 -0
- package/src/core/contracts/tool-guidance.test.ts +77 -0
- package/src/core/contracts/tool-guidance.ts +31 -0
- package/src/core/contracts/tool-input-limits.ts +15 -0
- package/src/core/contracts/tools-idempotency.test.ts +90 -0
- package/src/core/contracts/tools.ts +52 -9
- package/src/core/runtime/agent-execution-memory.test.ts +64 -0
- package/src/core/runtime/agent-execution-memory.ts +63 -0
- package/src/core/state/state-contracts.ts +3 -0
- package/src/infrastructure/config/config-observability-ledger.ts +2 -0
- package/src/infrastructure/schema/schema-readiness.ts +29 -0
- package/src/infrastructure/state/state-mysql.ts +3 -0
- package/src/modules/usage/contracts.ts +7 -0
- package/src/modules/usage/http.ts +2 -0
- package/src/modules/usage/model-continuation.test.ts +109 -0
- package/src/modules/usage/model-gateway.ts +5 -1
- package/src/modules/usage/output-budget.mysql.test.ts +84 -0
- package/src/modules/usage/output-budget.test.ts +167 -0
- package/src/modules/usage/output-budget.ts +73 -0
- package/src/modules/usage/provider-stream.test.ts +22 -0
- package/src/modules/usage/provider.ts +2 -3
- package/src/modules/usage/repository.ts +6 -0
- package/src/modules/usage/test-harness.ts +4 -2
- package/src/routes/admin-approval-view.test.ts +109 -0
- package/src/routes/admin-approval-view.ts +36 -0
- package/src/routes/admin-readiness.test.ts +52 -0
- package/src/routes/admin-runtime-ux.test.ts +51 -0
- package/src/routes/admin-runtime-ux.ts +25 -0
- package/src/routes/admin-runtime.ts +36 -8
- package/src/routes/admin.ts +9 -0
- package/src/routes/agent-api.test.ts +80 -1
- package/src/routes/agent-api.ts +63 -4
- package/src/routes/agent-tool-detail.test.ts +140 -0
- package/src/routes/public-default.ts +1 -1
- package/src/services/kb-agent.test.ts +84 -0
- package/src/services/kb.ts +73 -0
- package/web/connect/bailing-connect-php.tgz +0 -0
- package/web/connect/bailing-connect-php7.tgz +0 -0
- package/web/console/assets/Accounts-CjIBO3sU.css +1 -0
- package/web/console/assets/Accounts-Dhyw-7wF.js +3 -0
- package/web/console/assets/AgentClients-BA0M26-I.css +1 -0
- package/web/console/assets/AgentClients-DWxb8-ko.js +1 -0
- package/web/console/assets/AgentTasks-DOyxANnx.css +1 -0
- package/web/console/assets/AgentTasks-DUHD4dzr.js +2 -0
- package/web/console/assets/Approvals-Brl-2uJq.css +1 -0
- package/web/console/assets/Approvals-CQx1YWxW.js +1 -0
- package/web/console/assets/Audit--QcdVlMh.js +1 -0
- package/web/console/assets/Audit-DAdmOnIs.css +1 -0
- package/web/console/assets/{BrandLockup-CffORQse.js → BrandLockup-DQcaW4Nt.js} +1 -1
- package/web/console/assets/Channels-DJJU3ksE.css +1 -0
- package/web/console/assets/Channels-cGS5WfQ-.js +105 -0
- package/web/console/assets/ChatEntries-BYpji27B.css +1 -0
- package/web/console/assets/ChatEntries-nh23Iz5O.js +7 -0
- package/web/console/assets/Clients-CX5EeYio.js +3 -0
- package/web/console/assets/Clients-CbZAou8E.css +1 -0
- package/web/console/assets/Cost-C6oQvz9P.css +1 -0
- package/web/console/assets/Cost-DOZfdNS9.js +1 -0
- package/web/console/assets/Credentials--aHs57yV.css +1 -0
- package/web/console/assets/Credentials-sy6W9Sac.js +1 -0
- package/web/console/assets/Diagnostics-CKs27Dnv.css +1 -0
- package/web/console/assets/Diagnostics-CyoM1XrZ.js +1 -0
- package/web/console/assets/Executors-2Upi6bOS.css +1 -0
- package/web/console/assets/Executors-BQqqiFwt.js +1 -0
- package/web/console/assets/HelpTip-DLlhaGQp.js +1 -0
- package/web/console/assets/HelpTip-bbDEyuqV.css +1 -0
- package/web/console/assets/Kb-5R3ce4UU.js +5 -0
- package/web/console/assets/Kb-BM_PYi11.css +1 -0
- package/web/console/assets/{Login-CGgLGTE1.js → Login-YKeUwdgo.js} +1 -1
- package/web/console/assets/Projects-DHwHrPT9.css +1 -0
- package/web/console/assets/Projects-Grgb6fOv.js +1 -0
- package/web/console/assets/Routes-DR_Yf02e.css +1 -0
- package/web/console/assets/Routes-DYgrXlRJ.js +138 -0
- package/web/console/assets/Runs-CwTddJJj.js +3 -0
- package/web/console/assets/Runs-D4FOvNfu.css +1 -0
- package/web/console/assets/Setup-Ca0b1d1-.css +1 -0
- package/web/console/assets/Setup-D_xUPNDq.js +1 -0
- package/web/console/assets/Shell-BTg8Vw_L.css +1 -0
- package/web/console/assets/Shell-Dfam2Uoj.js +1 -0
- package/web/console/assets/StorageBuckets-7QLBpV4a.css +1 -0
- package/web/console/assets/StorageBuckets-CP6e50wI.js +1 -0
- package/web/console/assets/SystemSettings-BRYKyJNa.js +1 -0
- package/web/console/assets/SystemSettings-HsXGx0aH.css +1 -0
- package/web/console/assets/SystemStatus-B-VfRsQd.css +1 -0
- package/web/console/assets/SystemStatus-CbPsDsGt.js +1 -0
- package/web/console/assets/Targets-1j4-g6rC.css +1 -0
- package/web/console/assets/Targets-C2LkR2AF.js +1 -0
- package/web/console/assets/Tools-C9HPJqJb.css +1 -0
- package/web/console/assets/Tools-C9JNJUS0.js +2 -0
- package/web/console/assets/Usage-D1Mv6vGY.js +1 -0
- package/web/console/assets/Usage-DMOzUsqh.css +1 -0
- package/web/console/assets/UsageAccess-77LmGCm6.js +1 -0
- package/web/console/assets/UsageAccess-C6ZGxEgJ.css +1 -0
- package/web/console/assets/{UsageHelp-CzS2gI40.js → UsageHelp-BmuiE1Ew.js} +1 -1
- package/web/console/assets/client-route-draft-DxZRxKPT.js +1 -0
- package/web/console/assets/console-location-Csv-xsnl.js +1 -0
- package/web/console/assets/form-guard-8GrFpry0.js +1 -0
- package/web/console/assets/{index-65JiiUr4.js → index-B_5UfiTw.js} +1 -1
- package/web/console/assets/index-MjZJEFIN.js +2 -0
- package/web/console/assets/{request-DKycpD7z.js → request-rqm6MT0s.js} +1 -1
- package/web/console/assets/runtime-feedback-gPfZVNvY.js +1 -0
- package/web/console/assets/{schema-SCiNxBlR.js → schema-o3mK4mid.js} +1 -1
- package/web/console/assets/task-page-location-DWiGtAln.js +1 -0
- package/web/console/assets/use-list-location-FvLFt0Tq.css +1 -0
- package/web/console/assets/use-list-location-cIPy2cKM.js +1 -0
- package/web/console/assets/use-unsaved-form-DScKD0h9.js +1 -0
- package/web/console/assets/{util-DZYfJ5Zo.js → util-B40VqOwl.js} +1 -1
- package/web/console/assets/{vendor-element-8cVcdt5T.js → vendor-element-BT8tHCFk.js} +1 -1
- package/web/console/assets/{vendor-mammoth-CnDA23N0.js → vendor-mammoth-CVIXVxTN.js} +1 -1
- package/web/console/assets/{vendor-vue-Co7x2FW6.js → vendor-vue-DhbG0vd4.js} +7 -7
- package/web/console/index.html +3 -3
- package/web-admin/package-lock.json +4 -4
- package/web-admin/package.json +1 -1
- package/web-admin/src/client-route-draft.ts +25 -0
- package/web-admin/src/components/AgentSetupPanel.vue +54 -41
- package/web-admin/src/components/HelpTip.vue +4 -1
- package/web-admin/src/components/ListLocationBar.vue +22 -0
- package/web-admin/src/components/NotificationOutboxPanel.vue +35 -7
- package/web-admin/src/console-entry.test.ts +26 -0
- package/web-admin/src/console-entry.ts +20 -0
- package/web-admin/src/console-location.ts +35 -0
- package/web-admin/src/form-guard.ts +35 -0
- package/web-admin/src/layout/Shell.vue +18 -65
- package/web-admin/src/onboarding-state.test.ts +174 -0
- package/web-admin/src/onboarding-state.ts +122 -0
- package/web-admin/src/pages/Accounts.vue +44 -24
- package/web-admin/src/pages/AgentClients.vue +47 -29
- package/web-admin/src/pages/AgentTasks.vue +57 -12
- package/web-admin/src/pages/Approvals.vue +105 -25
- package/web-admin/src/pages/Audit.vue +15 -6
- package/web-admin/src/pages/Channels.vue +136 -43
- package/web-admin/src/pages/ChatEntries.vue +96 -41
- package/web-admin/src/pages/Clients.vue +87 -26
- package/web-admin/src/pages/Cost.vue +15 -4
- package/web-admin/src/pages/Credentials.vue +63 -32
- package/web-admin/src/pages/Diagnostics.vue +103 -54
- package/web-admin/src/pages/Executors.vue +103 -40
- package/web-admin/src/pages/Kb.vue +278 -128
- package/web-admin/src/pages/Projects.vue +44 -16
- package/web-admin/src/pages/Routes.vue +168 -247
- package/web-admin/src/pages/Runs.vue +163 -91
- package/web-admin/src/pages/Setup.vue +182 -291
- package/web-admin/src/pages/StorageBuckets.vue +61 -25
- package/web-admin/src/pages/SystemSettings.vue +76 -51
- package/web-admin/src/pages/SystemStatus.vue +54 -30
- package/web-admin/src/pages/Targets.vue +45 -17
- package/web-admin/src/pages/Tools.vue +133 -68
- package/web-admin/src/pages/Usage.vue +64 -25
- package/web-admin/src/pages/UsageAccess.vue +11 -8
- package/web-admin/src/route-call-snippets.test.ts +82 -0
- package/web-admin/src/route-call-snippets.ts +178 -0
- package/web-admin/src/router.ts +11 -29
- package/web-admin/src/runtime-feedback.ts +43 -0
- package/web-admin/src/task-page-location.ts +66 -0
- package/web-admin/src/usage-output-budget.test.ts +26 -0
- package/web-admin/src/usage-output-budget.ts +46 -0
- package/web-admin/src/use-list-location.ts +24 -0
- package/web-admin/src/use-unsaved-form.ts +38 -0
- package/web-admin/tests/model-output-budget.browser.mjs +69 -0
- package/web/console/assets/Accounts-Bervi5JU.css +0 -1
- package/web/console/assets/Accounts-Dhj6PjXP.js +0 -3
- package/web/console/assets/AgentClients-CMy8StAH.js +0 -1
- package/web/console/assets/AgentClients-i52AI6YV.css +0 -1
- package/web/console/assets/AgentTasks-BsG850Il.css +0 -1
- package/web/console/assets/AgentTasks-DA1xZdmP.js +0 -2
- package/web/console/assets/Approvals-DIsd7R8N.js +0 -1
- package/web/console/assets/Approvals-DlTSHl_7.css +0 -1
- package/web/console/assets/Audit-AUDABLTX.js +0 -1
- package/web/console/assets/Audit-CSu6_3oD.css +0 -1
- package/web/console/assets/Channels-B8rjsM0S.js +0 -105
- package/web/console/assets/Channels-CCn0L1jg.css +0 -1
- package/web/console/assets/ChatEntries-DsYtcXN6.css +0 -1
- package/web/console/assets/ChatEntries-iZjJMEUZ.js +0 -7
- package/web/console/assets/Clients-CSHIsaWU.css +0 -1
- package/web/console/assets/Clients-CwgpGCSD.js +0 -3
- package/web/console/assets/Cost-B2tNxu71.js +0 -1
- package/web/console/assets/Cost-CjT39DSZ.css +0 -1
- package/web/console/assets/Credentials-BuwFB-fV.js +0 -1
- package/web/console/assets/Credentials-ioLP0qYN.css +0 -1
- package/web/console/assets/Diagnostics-Ya05PTDp.css +0 -1
- package/web/console/assets/Diagnostics-z5glms11.js +0 -1
- package/web/console/assets/Executors-Bc4SvjeH.js +0 -1
- package/web/console/assets/Executors-CjhEM54c.css +0 -1
- package/web/console/assets/HelpTip-CA6Bm7Nx.css +0 -1
- package/web/console/assets/HelpTip-Dtdt2tKR.js +0 -1
- package/web/console/assets/Kb-BRbRHxLy.js +0 -5
- package/web/console/assets/Kb-CzIzd9xr.css +0 -1
- package/web/console/assets/Projects-Bm8AjsNx.css +0 -1
- package/web/console/assets/Projects-CPWw3con.js +0 -1
- package/web/console/assets/Routes-CMIaE0Bx.js +0 -124
- package/web/console/assets/Routes-CyXV4Pba.css +0 -1
- package/web/console/assets/Runs-B8HuE700.js +0 -3
- package/web/console/assets/Runs-Bv6CV_Hk.css +0 -1
- package/web/console/assets/Setup-D7nxgn-9.css +0 -1
- package/web/console/assets/Setup-G8RKzliR.js +0 -1
- package/web/console/assets/Shell-DimHgraJ.js +0 -1
- package/web/console/assets/Shell-ykb-tUfo.css +0 -1
- package/web/console/assets/StorageBuckets-CVgpZRWY.css +0 -1
- package/web/console/assets/StorageBuckets-CiVYXIE2.js +0 -1
- package/web/console/assets/SystemSettings-BjiHyrXO.css +0 -1
- package/web/console/assets/SystemSettings-DF8sZNen.js +0 -1
- package/web/console/assets/SystemStatus-BlHywK13.js +0 -1
- package/web/console/assets/SystemStatus-I11I67rw.css +0 -1
- package/web/console/assets/Targets-BXaoPoAJ.js +0 -1
- package/web/console/assets/Targets-DTb5tn6z.css +0 -1
- package/web/console/assets/Tools-B22lNHXq.js +0 -2
- package/web/console/assets/Tools-DU8ei6sd.css +0 -1
- package/web/console/assets/Usage-C02EzoI2.js +0 -1
- package/web/console/assets/Usage-CAeDGjrb.css +0 -1
- package/web/console/assets/UsageAccess-CGGaWTuj.css +0 -1
- package/web/console/assets/UsageAccess-DOb-cyPE.js +0 -1
- package/web/console/assets/index-CK0ZCTZv.js +0 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Core v0.10.1: Preserve explicit business risk and execution declarations
|
|
2
|
+
|
|
3
|
+
[简体中文](RELEASE_NOTES_v0.10.1.md)
|
|
4
|
+
|
|
5
|
+
A business service explicitly marked a POST operation as low risk, but its generated declaration omitted `risk.level`. A GET explicitly marked as non-readonly was still consumed as readonly. Core 0.10.1 fixes lost explicit values in business-side SDK generators and distinguishes an omitted boolean from `false` when Core consumes declarations.
|
|
6
|
+
|
|
7
|
+
This is a patch relative to Core 0.10.0. **The ACC specification remains at 1.0.6 and declarations retain `version: 1`; MCP / Agent Client SDK 0.8.0 and DSH 0.8.0 have no separate upgrade in this release.** The affected generators live in the Core repository and are business-provider SDKs, not those independent client packages. There are no new SQL migrations, authentication protocols or business-permission endpoints relative to 0.10.0.
|
|
8
|
+
|
|
9
|
+
## Corrected behavior
|
|
10
|
+
|
|
11
|
+
Seven SDK generators—PHP 7.3 builder, PHP 8 attributes, Node.js, Python, Go, Java and .NET—preserve explicit `readonly: false/true`, `idempotent: false/true` and `risk.level: low/medium/high`. Unspecified fields remain omitted; write operations are not assigned low risk globally.
|
|
12
|
+
|
|
13
|
+
Core preserves explicit boolean false and uses the existing GET fallback only when the field is unspecified. Effective risk uses an explicit risk value first, then the resolved readonly value. The HTTP method cannot override an explicit non-readonly declaration a second time.
|
|
14
|
+
|
|
15
|
+
| Declaration | Interpretation after the fix |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| GET with readonly and risk omitted | Existing readonly and low defaults |
|
|
18
|
+
| GET with `readonly: false`, risk omitted | Non-readonly and medium |
|
|
19
|
+
| POST with readonly and risk omitted | Existing non-readonly and medium defaults |
|
|
20
|
+
| POST with explicit `risk: low` | Low is retained; existing approval, subject and business authorization requirements remain independent |
|
|
21
|
+
| GET with explicit `idempotent: false` | The non-idempotent hint is retained instead of being overridden by GET |
|
|
22
|
+
|
|
23
|
+
**This correction can change the effective interpretation of declarations previously omitted or overridden incorrectly.** Business owners must confirm that explicit low and false values match the operation. In particular, a write operation previously interpreted as medium because low was omitted now retains its declared low risk. This requires review rather than being treated as a cosmetic change.
|
|
24
|
+
|
|
25
|
+
## Distribution and validation
|
|
26
|
+
|
|
27
|
+
Both PHP tgz companion packages are updated with the Core artifacts. A new verifier compares the complete source/archive file sets, file contents and SHA-256 values, then runs actual generator tests against both source and extracted packages. Missing files, unexpected files, digest differences and failing regressions fail the check. PHP7 retains PHP 7.3 syntax; the attribute-based package still requires PHP 8.1 or later.
|
|
28
|
+
|
|
29
|
+
Generator regressions cover all 24 combinations of GET/POST, readonly omitted/false/true and risk omitted/low/medium/high, plus explicit and omitted idempotency values. Core regressions check precedence and effective risk. PHP tests also verify that explicit low does not remove approval or subject requirements. These tests use synthetic capabilities and do not execute business operations or replace an integrator's declaration review.
|
|
30
|
+
|
|
31
|
+
PHP8 `AiTool::$risk` changes from the default `'low'` to a nullable string with default `null`; Java also uses null for unspecified risk, .NET uses the empty string, and Node.js/Python no longer fill unspecified risk with low. Custom code reading intermediate tool objects must handle the unspecified state. See the [upgrade guide](UPGRADE_v0.10.1.en.md).
|
|
32
|
+
|
|
33
|
+
The release also updates the bounded development/build dependencies to `fast-uri 3.1.9` and `Vite 6.4.5` to satisfy release audit gates. This dependency maintenance does not establish that a production exploit or production vulnerability occurred.
|
|
34
|
+
|
|
35
|
+
## Upgrade boundaries
|
|
36
|
+
|
|
37
|
+
Operators update Core and the business-side SDK, regenerate and review declarations, then refresh tool sources. **An SDK-only upgrade cannot fix an old Core overriding explicit GET false; a Core-only upgrade cannot recover fields already discarded by an old generator.** Integrations using hand-written OpenAPI or another runtime must check declaration contents and consumer behavior separately.
|
|
38
|
+
|
|
39
|
+
Business authorization, signatures, approval conditions, original-request recovery and metering rules are outside this change. Do not replay business requests for acceptance or rewrite saved original invocations and approved arguments. A public release does not automatically upgrade any existing deployment, private Host or downstream system.
|
|
40
|
+
|
|
41
|
+
[Upgrade guide](UPGRADE_v0.10.1.en.md) · [Business-side SDKs](SDK.en.md) · [Changelog](CHANGELOG.en.md) · [Previous release](RELEASE_NOTES_v0.10.0.en.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Core v0.10.1:保留业务系统明确声明的风险与执行语义
|
|
2
|
+
|
|
3
|
+
[English](RELEASE_NOTES_v0.10.1.en.md)
|
|
4
|
+
|
|
5
|
+
业务后端明确把一个 POST 操作标为低风险,导出的声明却省略了 `risk.level`;另一个 GET 明确标为非只读,消费时仍被当作只读。Core 0.10.1 修复业务接入 SDK 的显式值丢失,并让 Core 在读取声明时正确区分“未设置”和 `false`。
|
|
6
|
+
|
|
7
|
+
这是相对 Core 0.10.0 的补丁。**ACC 规范仍为 1.0.6,声明仍为 `version: 1`;MCP / Agent Client SDK 0.8.0、DSH 0.8.0 本轮不另行升级。** 本次修复的是 Core 仓库内的业务侧声明生成器及消费逻辑,不是这些独立客户端包。相对 0.10.0 无新增 SQL、认证协议或业务权限接口。
|
|
8
|
+
|
|
9
|
+
## 修复行为
|
|
10
|
+
|
|
11
|
+
PHP 7.3 builder、PHP 8 注解版、Node.js、Python、Go、Java、.NET 七种 SDK 生成器保留显式 `readonly: false/true`、`idempotent: false/true` 及 `risk.level: low/medium/high`。未设置的字段继续省略,不为所有写接口补上 low。
|
|
12
|
+
|
|
13
|
+
Core 读取布尔值时保留 `false`,只在字段未设置时使用 GET 的原缺省信号。有效风险先采用显式 risk,否则依据已经解析的只读性推导;HTTP 方法不能再次覆盖显式非只读声明。
|
|
14
|
+
|
|
15
|
+
| 声明 | 修复后的解释 |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| GET,未设置 readonly 和 risk | 保持只读、low 的缺省解释 |
|
|
18
|
+
| GET,`readonly: false`,未设置 risk | 非只读、medium |
|
|
19
|
+
| POST,未设置 readonly 和 risk | 保持非只读、medium |
|
|
20
|
+
| POST,显式 `risk: low` | 保留 low;既有审批、主体和业务授权要求继续独立生效 |
|
|
21
|
+
| GET,显式 `idempotent: false` | 保留非幂等提示,不被 GET 缺省覆盖 |
|
|
22
|
+
|
|
23
|
+
**修复会改变此前被错误省略或覆盖的声明的有效解释。** 业务负责人应确认显式 low 和 false 确实符合接口行为。特别是原先因 low 丢失而被解释成 medium 的写操作,更新后会恢复为声明的 low;不能把此变化视为无需核对的文本整理。
|
|
24
|
+
|
|
25
|
+
## 分发与验证
|
|
26
|
+
|
|
27
|
+
两个 PHP tgz 配套包随 Core 制品更新。新增验包工具比较 SDK 源码与归档的完整文件集合、逐文件内容和 SHA-256,再针对源码及解包目录分别运行实际生成器测试;缺文件、额外文件、摘要不一致或回归失败都不能通过。PHP7 保持 7.3 语法,PHP8 版要求仍为 PHP 8.1 及以上。
|
|
28
|
+
|
|
29
|
+
各生成器新增 GET/POST × readonly 未设置/false/true × risk 未设置/low/medium/high 的 24 组合回归,另测幂等显式值与缺省值。Core 回归检查字段优先级和有效风险;PHP 回归还核对显式 low 不删除审批与主体要求。验证使用合成能力,不调用真实业务,也不能替代接入方自己的声明审阅。
|
|
30
|
+
|
|
31
|
+
PHP8 的 `AiTool::$risk` 从默认 `'low'` 改为可空字符串、默认 `null`;Java 的未设置 risk 也为 null,.NET 使用空字符串,Node.js/Python 不再把未设置值补成 low。读取中间工具对象的自定义代码应处理未设置状态,详见[升级指南](UPGRADE_v0.10.1.md)。
|
|
32
|
+
|
|
33
|
+
本版同时将限定的开发/构建依赖更新到 `fast-uri 3.1.9` 与 `Vite 6.4.5`,用于通过本次发行审计门禁。该依赖维护本身不构成已发现生产利用或生产漏洞的结论。
|
|
34
|
+
|
|
35
|
+
## 升级边界
|
|
36
|
+
|
|
37
|
+
部署方更新 Core 与业务侧 SDK、重新生成和核对声明,再刷新工具源。**只换 SDK 不能修复旧 Core 对 GET 显式 false 的覆盖;只换 Core 也无法恢复旧生成器已经丢失的字段。** 对使用现成 OpenAPI 文件或其他 runtime 的接入方,分别核对声明内容和消费者行为。
|
|
38
|
+
|
|
39
|
+
原业务授权、签名、审批条件、原请求恢复和计量规则不在本次修改范围。不要为验收重放原业务,也不要改写已保存的原调用或批准参数。公开发行不代表任何现有部署、私有 Host 或下游系统已自动升级。
|
|
40
|
+
|
|
41
|
+
[升级指南](UPGRADE_v0.10.1.md) · [业务接入](第三方对接指南.md) · [CHANGELOG](CHANGELOG.md) · [上一版本](RELEASE_NOTES_v0.10.0.md)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Offline, read-only upgrade planning
|
|
2
|
+
|
|
3
|
+
[中文](UPGRADE_PLAN.md)
|
|
4
|
+
|
|
5
|
+
`doctor --upgrade-plan` compares explicit source/target artifacts and a sanitized database snapshot. It never connects to a database, reads `.env` / `config.json`, starts Core, imports code from supplied artifacts, runs SQL, migrates, restores or modifies input files. Unlike `doctor --deployment`, it performs no HTTP probes. Missing evidence remains `incomplete`.
|
|
6
|
+
|
|
7
|
+
## Prepare artifacts and official manifests
|
|
8
|
+
|
|
9
|
+
Keep separate copies of the actual current artifact and the intended target. Verify their official tag/commit, npm package or image digest using release records first.
|
|
10
|
+
|
|
11
|
+
Existing releases expose `BAILINGHUB_CORE_ARTIFACT_V1` as a runtime object; they do **not** ship a pre-generated JSON manifest. From each trusted artifact root, with its runtime dependencies already installed, export the official object to a file outside the artifact:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node --import tsx --input-type=module -e 'import { BAILINGHUB_CORE_ARTIFACT_V1 } from "./src/kernel-api/v1/artifact.ts"; console.log(JSON.stringify(BAILINGHUB_CORE_ARTIFACT_V1, null, 2));' > /absolute/evidence/from-manifest.json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Repeat in the target root as `to-manifest.json`. This preparation command imports the trusted official manifest module; the planner itself never imports supplied artifacts or installs dependencies. Do not fabricate an old manifest with the current retired-migration list if the old artifact lacks this export.
|
|
18
|
+
|
|
19
|
+
The planner validates package name, exact version, complete SQL inventory, each active SQL digest and the v1 manifest digest from [Kernel Host API](KERNEL_HOST_API.md). It also validates migration filenames/numbers, retired evidence (`replay: never`), historical checksum continuity and SemVer direction, including prereleases. A different manifest under the same version blocks the plan. Historical active migrations cannot be silently retired, and retired migrations cannot return to the active SQL sequence. Retired checksum, byte length and `replay: never` evidence must remain unchanged, even when a replacement manifest is internally self-consistent.
|
|
20
|
+
|
|
21
|
+
A manifest covers version and migrations, **not whole-artifact authenticity**. An attacker could replace both SQL and its digest. `release_authenticity` always remains `not_verified`; verify trusted release provenance separately. Artifact file/directory symlinks and traversal filenames are rejected. No npm scripts from artifacts execute.
|
|
22
|
+
|
|
23
|
+
## Prepare a sanitized snapshot
|
|
24
|
+
|
|
25
|
+
There is no automatic database collector in this version. An operator uses existing authorized read-only connections to establish the effective state/configuration store topology and actual logical database identities. Example configuration files do not prove the effective deployment. Standard OSS MySQL commonly shares one database; hosts may separate stores, and JSONL state does not establish the absence of configuration MySQL.
|
|
26
|
+
|
|
27
|
+
Read each actual schema using existing tools:
|
|
28
|
+
|
|
29
|
+
```sql
|
|
30
|
+
SELECT DATABASE() AS database_name, @@server_uuid AS server_uuid;
|
|
31
|
+
SELECT COLUMN_NAME FROM information_schema.COLUMNS
|
|
32
|
+
WHERE TABLE_SCHEMA = DATABASE()
|
|
33
|
+
AND TABLE_NAME = 'bz_schema_migrations'
|
|
34
|
+
AND COLUMN_NAME = 'checksum_sha256';
|
|
35
|
+
SELECT filename, checksum_sha256 FROM bz_schema_migrations ORDER BY filename;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For a legacy ledger without the checksum column, read only filenames and record `checksum_sha256: null`, `checksum_column: "absent"`. Never backfill or migrate to prepare a plan. A missing ledger table or insufficient access is not an empty complete ledger.
|
|
39
|
+
|
|
40
|
+
Avoid concurrent migration; capture a consistent read-only snapshot or document a write-stop window. Retain actual database identities privately. Assign a random 64-character lowercase hexadecimal ID to each confirmed logical database for this plan; reuse it for shared roles and use different IDs for distinct databases. `node -e 'console.log(require("node:crypto").randomBytes(32).toString("hex"))'` generates only an opaque ID, not database evidence. Replicas/proxies require an operator to determine the actual logical schema. **These IDs are operator claims, not independent identity proofs.**
|
|
41
|
+
|
|
42
|
+
The JSON schema is:
|
|
43
|
+
|
|
44
|
+
| Field | Meaning |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| `schema` | `bailing.upgrade-snapshot.v1` |
|
|
47
|
+
| `captured_at` | Actual UTC capture time, e.g. `2026-10-21T04:00:00Z` |
|
|
48
|
+
| `source_manifest_sha256` | Exact digest from the actual current artifact's official manifest |
|
|
49
|
+
| `state` | `{ backend: "mysql" or "jsonl", database_id: ID or null }`; MySQL requires an ID |
|
|
50
|
+
| `configuration` | `{ backend: "mysql" or "file", database_id: ID or null }`; `file` means no database configuration repository, using local configuration files |
|
|
51
|
+
| `databases` | Exactly the 0–2 logical databases required by the two roles, one record each |
|
|
52
|
+
| `databases[].id` | The 64-character lowercase hex opaque identity used by the roles |
|
|
53
|
+
| `ledger_complete` | Boolean indicating whether all ledger rows were captured; partial snapshots produce no definitive pending list |
|
|
54
|
+
| `checksum_column` | `present` or `absent` |
|
|
55
|
+
| `rows` | Full array of `{ filename, checksum_sha256 }`; checksums are 64-character lowercase hex or `null` |
|
|
56
|
+
|
|
57
|
+
This deliberately **incomplete** JSONL + configuration MySQL example is not deployment evidence. Replace the time, source digest, identity and complete ledger before comparison:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"schema": "bailing.upgrade-snapshot.v1",
|
|
62
|
+
"captured_at": "2026-10-21T04:00:00Z",
|
|
63
|
+
"source_manifest_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
64
|
+
"state": { "backend": "jsonl", "database_id": null },
|
|
65
|
+
"configuration": {
|
|
66
|
+
"backend": "mysql",
|
|
67
|
+
"database_id": "1111111111111111111111111111111111111111111111111111111111111111"
|
|
68
|
+
},
|
|
69
|
+
"databases": [{
|
|
70
|
+
"id": "1111111111111111111111111111111111111111111111111111111111111111",
|
|
71
|
+
"ledger_complete": false,
|
|
72
|
+
"checksum_column": "present",
|
|
73
|
+
"rows": []
|
|
74
|
+
}]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Never include passwords, connection strings, usernames, host addresses, business rows or raw SQL errors. Output contains only defined safe fields, without input paths or raw parsing errors. A recent timestamp does not prove freshness: recollect after any deployment, configuration or ledger change.
|
|
79
|
+
|
|
80
|
+
## Generate the plan
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run --silent doctor -- --upgrade-plan \
|
|
84
|
+
--from-artifact /absolute/core-current \
|
|
85
|
+
--from-manifest /absolute/evidence/from-manifest.json \
|
|
86
|
+
--to-artifact /absolute/core-target \
|
|
87
|
+
--to-manifest /absolute/evidence/to-manifest.json \
|
|
88
|
+
--snapshot /absolute/evidence/snapshot.json \
|
|
89
|
+
--json > /absolute/evidence/upgrade-plan.json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`npm run --silent doctor:upgrade-plan -- ...` is equivalent. `--help` reads no inputs. No implicit paths, connection discovery or network targets are used. Missing arguments mean incomplete evidence; explicitly supplied unreadable/invalid files block the plan.
|
|
93
|
+
|
|
94
|
+
| Exit/result | Meaning |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `0 / reviewable` | Supplied offline evidence is comparable without detected conflicts; **not deployment readiness or tested recovery** |
|
|
97
|
+
| `1 / blocked` | Artifact/digest/version/snapshot conflict or unknown migration; investigate before proceeding |
|
|
98
|
+
| `2 / incomplete` | Missing artifact, full ledger, database-role identity or legacy checksum evidence |
|
|
99
|
+
| `64 / invalid_arguments` | Unsupported/invalid arguments, including mixed deployment-diagnostics flags |
|
|
100
|
+
|
|
101
|
+
Shared MySQL produces one plan; separate stores are checked independently. Null legacy checksums remain incomplete without backfilling. Retired migrations never enter pending SQL. Missing source migrations are incomplete; records unknown to either source or target block the plan. Pending means the target active sequence minus a complete ledger snapshot, not proof of actual SQL tables/indexes.
|
|
102
|
+
|
|
103
|
+
## Execution remains separate
|
|
104
|
+
|
|
105
|
+
The plan lists artifact verification, consistent backups and isolated restore rehearsal, stopping intake and all writers, draining every replica, manual per-database migration, acceptance and rollback constraints. `npm run db:init` migrates only `state.mysql`; a separate configuration MySQL requires the official `migrateBailingHubCoreSchema({ mysql: configurationDatabase })` entry, once per distinct database and never concurrently.
|
|
106
|
+
|
|
107
|
+
It does not emit executable connection-bearing commands or authorize deployment. Preserve unknown business results, approvals, notifications, DLQ records and original IDs. Pending migrations unknown to the source manifest set `rollback_after_migration: blocked_by_old_manifest`; all other cases still require validation. Do not remove ledger records or assume old-tag switching is safe. Restoring a database cannot undo an external refund or message.
|
|
108
|
+
|
|
109
|
+
See the [0.9.4 upgrade/rollback guide](UPGRADE_v0.9.4.en.md), [operations](OPERATIONS.md) and [compatibility policy](COMPATIBILITY.en.md). Actual runtime identity, database identity, schema objects, backup restoration and cross-version business acceptance are unverified by this tool.
|
|
110
|
+
|
|
111
|
+
## Developer checks
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm run doctor:upgrade-plan:typecheck
|
|
115
|
+
npm run doctor:upgrade-plan:test
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Both checks run in `release:check` and the basic CI job. Tests use synthetic artifacts/snapshots and compare the current official manifest format. They do not connect to databases or replace actual upgrade, recovery or production acceptance.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# 离线只读升级计划
|
|
2
|
+
|
|
3
|
+
[English](UPGRADE_PLAN.en.md)
|
|
4
|
+
|
|
5
|
+
`doctor --upgrade-plan` 比较显式提供的当前制品、目标制品及脱敏数据库快照,帮助整理升级步骤与证据缺口。它不会连接数据库、读取 `.env` / `config.json`、启动 Core、执行任何制品代码、运行 SQL、迁移、回退或改写输入文件。
|
|
6
|
+
|
|
7
|
+
它与 [部署诊断](OPERATIONS.md) 的 `doctor --deployment` 分开:部署诊断可检查公开 HTTP 元数据和 readiness;本工具不访问网络,也不把离线输入称作线上实测。未知信息保留为 `incomplete`。
|
|
8
|
+
|
|
9
|
+
## 1. 准备两个可信制品与官方 manifest
|
|
10
|
+
|
|
11
|
+
保留实际正在运行的版本和计划部署的版本,分别解压到独立目录。先按对应发行说明核对 Tag/提交、npm 包或镜像摘要;不要用随意修改版本号的工作目录替代正式制品。
|
|
12
|
+
|
|
13
|
+
现有发行包中的 `BAILINGHUB_CORE_ARTIFACT_V1` 是运行时导出对象,**没有预先生成的 manifest JSON 文件**。在每个已经信任、安装好运行依赖的制品根目录,使用官方模块导出文件,保存在制品目录之外:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
node --import tsx --input-type=module -e 'import { BAILINGHUB_CORE_ARTIFACT_V1 } from "./src/kernel-api/v1/artifact.ts"; console.log(JSON.stringify(BAILINGHUB_CORE_ARTIFACT_V1, null, 2));' > /absolute/evidence/from-manifest.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
在目标制品目录重复一次,输出 `to-manifest.json`。此准备命令由操作员运行,导入的是已信任制品的官方只读 manifest 模块;升级计划工具本身不动态导入外部目录,也不会替你安装依赖或运行导出命令。旧制品如果不支持该 manifest,缺口必须另行确认,不能套用新版退役迁移清单伪造一份“旧 manifest”。
|
|
20
|
+
|
|
21
|
+
工具验证的内容:
|
|
22
|
+
|
|
23
|
+
- `packageName`、精确版本、完整 SQL 文件清单、每个活动 SQL 的 SHA-256、整体 manifest 摘要;格式复用 [Kernel Host API](KERNEL_HOST_API.md) 的 v1 manifest。
|
|
24
|
+
- 活动迁移文件名/编号、退役迁移 `replay: never`、是否遗漏或篡改已发布迁移证据。历史活动迁移不能直接改成退役,历史退役迁移不能放回活动 SQL;退役记录的摘要、字节长度与 `replay` 必须保持一致,即使重新计算 manifest 摘要也不能绕过。
|
|
25
|
+
- 升级/同版本/降级方向,包含 SemVer 数字比较和预发行版本;同版本不同 manifest 会阻断。
|
|
26
|
+
|
|
27
|
+
manifest 只标识版本与迁移集合,**不是整个包、源码或容器的签名证明**。如果有人同时改写 SQL、manifest 和摘要,离线自洽不能证明发行真实性;该项始终是 `release_authenticity: not_verified`,仍须核对可信发行来源。工具拒绝制品内 SQL/目录符号链接和路径穿越,不运行制品的 npm scripts。
|
|
28
|
+
|
|
29
|
+
## 2. 采集脱敏快照
|
|
30
|
+
|
|
31
|
+
这一版不提供自动数据库 collector。操作员在授权范围内使用现有只读连接,确认**实际有效**的状态仓储、配置仓储和它们的数据库身份;不能只从示例配置或目录名称推测。默认开源 MySQL 部署通常共库,扩展宿主可以分库;JSONL 状态也不能证明配置库不存在。
|
|
32
|
+
|
|
33
|
+
在每个实际 MySQL Schema 内,通过已有工具读取:
|
|
34
|
+
|
|
35
|
+
```sql
|
|
36
|
+
SELECT DATABASE() AS database_name, @@server_uuid AS server_uuid;
|
|
37
|
+
SELECT COLUMN_NAME FROM information_schema.COLUMNS
|
|
38
|
+
WHERE TABLE_SCHEMA = DATABASE()
|
|
39
|
+
AND TABLE_NAME = 'bz_schema_migrations'
|
|
40
|
+
AND COLUMN_NAME = 'checksum_sha256';
|
|
41
|
+
SELECT filename, checksum_sha256 FROM bz_schema_migrations ORDER BY filename;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
最后一条适用于存在摘要列的账本;旧库无该列时只读取 `filename`,在快照中将摘要填为 `null`、`checksum_column` 填为 `absent`。不要为了生成计划而补账本或运行迁移。表不存在、读权限不足或无法确认读取完整性时,不能填写空数组并声称是完整账本。
|
|
45
|
+
|
|
46
|
+
采集时避免并发迁移,并使用一致性只读快照或记录停写窗口。数据库真实标识只留在受限操作记录中;为此次计划给每个经过确认的逻辑库生成一个随机 64 位小写十六进制代号,同库复用同一代号,分库使用不同代号。例如 `node -e 'console.log(require("node:crypto").randomBytes(32).toString("hex"))'` 只生成代号,不识别数据库。复制库不能因为内容相同就使用同一代号;复制集/代理连接须由操作员确认是否为同一逻辑 Schema。**代号不是数据库身份的独立证明。**
|
|
47
|
+
|
|
48
|
+
`snapshot.json` 定义:
|
|
49
|
+
|
|
50
|
+
| 字段 | 内容 |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `schema` | 固定 `bailing.upgrade-snapshot.v1` |
|
|
53
|
+
| `captured_at` | 实际采集 UTC 时间,例如 `2026-10-21T04:00:00Z` |
|
|
54
|
+
| `source_manifest_sha256` | 从实际当前制品导出的 manifest 中原样取值,用于发现快照与来源选错;这仍是操作员声明 |
|
|
55
|
+
| `state` | `backend` 为 `mysql` 或 `jsonl`;MySQL 必须给 `database_id`,JSONL 为 `null` |
|
|
56
|
+
| `configuration` | `backend` 为 `mysql` 或 `file`;`file` 表示无数据库配置仓储、使用本地配置文件;身份规则同上 |
|
|
57
|
+
| `databases` | 实际涉及的 0–2 个逻辑库,每库一条,必须恰好覆盖两个角色需要的库 |
|
|
58
|
+
| `databases[].id` | 64 位小写十六进制代号,与角色的 `database_id` 对应 |
|
|
59
|
+
| `ledger_complete` | 是否完整读取该库全部账本;不完整填 `false`,工具不会据此伪造确定的 pending 清单 |
|
|
60
|
+
| `checksum_column` | `present` 或 `absent` |
|
|
61
|
+
| `rows` | 全部 `{ "filename": "001_….sql", "checksum_sha256": "64位小写摘要或null" }`;不得填业务记录 |
|
|
62
|
+
|
|
63
|
+
以下只是**故意不完整**的 JSONL + MySQL 配置库结构示例,不能直接当作环境验收证据。替换时间、真实当前 manifest 摘要、库代号与完整账本后才能进行有意义的比较:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"schema": "bailing.upgrade-snapshot.v1",
|
|
68
|
+
"captured_at": "2026-10-21T04:00:00Z",
|
|
69
|
+
"source_manifest_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
70
|
+
"state": { "backend": "jsonl", "database_id": null },
|
|
71
|
+
"configuration": {
|
|
72
|
+
"backend": "mysql",
|
|
73
|
+
"database_id": "1111111111111111111111111111111111111111111111111111111111111111"
|
|
74
|
+
},
|
|
75
|
+
"databases": [{
|
|
76
|
+
"id": "1111111111111111111111111111111111111111111111111111111111111111",
|
|
77
|
+
"ledger_complete": false,
|
|
78
|
+
"checksum_column": "present",
|
|
79
|
+
"rows": []
|
|
80
|
+
}]
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
不要将密码、连接串、账号、业务数据、主机地址或未脱敏 SQL 错误放进输入。输出只保留已定义的安全字段,不回显输入路径和解析错误正文。已保存的快照不是实时保证;部署、配置或账本有变化后重新采集,不能仅凭文件时间较近就认定有效。
|
|
85
|
+
|
|
86
|
+
## 3. 生成计划
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm run --silent doctor -- --upgrade-plan \
|
|
90
|
+
--from-artifact /absolute/core-current \
|
|
91
|
+
--from-manifest /absolute/evidence/from-manifest.json \
|
|
92
|
+
--to-artifact /absolute/core-target \
|
|
93
|
+
--to-manifest /absolute/evidence/to-manifest.json \
|
|
94
|
+
--snapshot /absolute/evidence/snapshot.json \
|
|
95
|
+
--json > /absolute/evidence/upgrade-plan.json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
等价专用入口:`npm run --silent doctor:upgrade-plan -- ...`。`--help` 不读取输入。没有隐式路径、数据库发现或网络目标;缺少文件参数返回 `incomplete`,指定了不可读/无效文件则返回 `blocked`。
|
|
99
|
+
|
|
100
|
+
| 退出码 / 结果 | 含义 |
|
|
101
|
+
| --- | --- |
|
|
102
|
+
| `0 / reviewable` | 所给离线证据可比较、无已知冲突;**不是可以上线、备份恢复已验证或实测通过** |
|
|
103
|
+
| `1 / blocked` | 观察到制品/摘要/版本方向/快照冲突,或未知迁移;先查明原因 |
|
|
104
|
+
| `2 / incomplete` | 缺少来源、完整账本、数据库角色或历史摘要等证据 |
|
|
105
|
+
| `64 / invalid_arguments` | 参数错误或混用部署诊断参数 |
|
|
106
|
+
|
|
107
|
+
共库只输出一个迁移计划,分库逐一比较。旧账本摘要缺失不会自动补录,退役迁移不会列入待执行序列。当前制品应有但库里没有的迁移会标为不完整;账本含当前或目标制品不认识的迁移会阻断。`pending` 是完整快照相对目标活动序列的差集,不是 SQL 表/索引存在性检查。
|
|
108
|
+
|
|
109
|
+
## 4. 计划之后仍需人工执行与验收
|
|
110
|
+
|
|
111
|
+
输出固定列出制品身份确认、一致备份及隔离恢复演练、停止新工作与所有写入方、排空、分库显式迁移、验收和回退限制。`npm run db:init` 只覆盖 `state.mysql`;独立配置 MySQL 由部署方通过官方 `migrateBailingHubCoreSchema({ mysql: configurationDatabase })` 单独迁移,共库只执行一次。
|
|
112
|
+
|
|
113
|
+
只读计划不生成可直接执行的带连接参数命令,也不授权升级。涉及未知业务结果、审批、通知、死信的记录和原 ID 必须保留。新迁移不被旧 manifest 认识时,标记 `rollback_after_migration: blocked_by_old_manifest`;其他情况仍须验证,绝不标为“可安全降级”。数据库恢复不能撤销外部退款或已发送消息。
|
|
114
|
+
|
|
115
|
+
参考 [0.9.4 升级与回退指南](UPGRADE_v0.9.4.md)、[运维](OPERATIONS.md)及[兼容策略](兼容性与升级.md)。当前没有实际 DB 身份、schema 对象、运行中版本、备份恢复或跨版本业务回归的验证结果;这些仍由目标环境演练提供。
|
|
116
|
+
|
|
117
|
+
## 开发验证
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm run doctor:upgrade-plan:typecheck
|
|
121
|
+
npm run doctor:upgrade-plan:test
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
这些检查已接入 `release:check` 和 CI 的基础检查任务。测试使用合成制品与脱敏快照,并检查当前官方 manifest 格式;不连接数据库,不代替真实升级、备份恢复或生产验收。
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Core v0.10.0 upgrade guide
|
|
2
|
+
|
|
3
|
+
[简体中文](UPGRADE_v0.10.0.md)
|
|
4
|
+
|
|
5
|
+
This guide upgrades public Core 0.9.4 to 0.10.0. MCP / Agent Client SDK 0.8.0 and DSH 0.8.0 are independent releases. Existing business HTTP integrations, bundled chat and older Agent clients do not need new authorization to retain their existing features. New features depend on each consumer's configuration and version.
|
|
6
|
+
|
|
7
|
+
## Back up, drain and identify storage
|
|
8
|
+
|
|
9
|
+
Pin source/target Tags, complete commits and npm/image digests. Keep a consistent backup of configuration, secret-management material, attachments, JSONL, actual state/configuration databases, complete migration ledgers, original operations/invocations, approvals, notifications and old artifacts. Coordinate all shared writers, stop admission and drain accepted work. A close timeout does not prove completion; never run old/new JSONL writers concurrently.
|
|
10
|
+
|
|
11
|
+
**No SQL is added or changed relative to 0.9.4, and the migrator is unchanged.** An instance with complete 0.9.4 migrations should not manually add ledger entries for this release. Earlier versions still apply outstanding migrations through the official explicit migrator, including 068 on the 0.9.3→0.9.4 path. Identify actual state/configuration topology; migrate a shared database once. `npm run db:init` handles only the current `state.mysql`; migrate a separate configuration database explicitly through `migrateBailingHubCoreSchema()`. Startup does not execute DDL.
|
|
12
|
+
|
|
13
|
+
The [read-only upgrade planner](UPGRADE_PLAN.en.md) can compare artifacts and redacted ledgers. Offline `reviewable` status is not database inspection, backup recovery proof or permission to deploy.
|
|
14
|
+
|
|
15
|
+
## Readiness and custom Hosts
|
|
16
|
+
|
|
17
|
+
Readiness now inspects actual state/configuration resources, the artifact migration manifest and full SHA-256 digests. Missing/unknown migrations and digest conflicts remain not-ready. The probe does not repair them; external model/tool-source failures do not remove the whole instance from service.
|
|
18
|
+
|
|
19
|
+
Custom MySQL `RuntimeStateStore` implementations expose the optional `schemaReadinessDb` extension pointing to their actual read-only query resource. Absence now fails closed. Default `MysqlStore` already provides it without another pool. JSONL with a MySQL configuration database still checks that database; only pure JSONL without SQL configuration skips database inspection.
|
|
20
|
+
|
|
21
|
+
Embedded Hosts retain `tick()` and `close(drainMs)` and wait for boot-recovery target refresh, query, audit and requeue work before releasing resources. Deployment health, unchanged API signatures or a typecheck alone do not establish Fleet upgrade acceptance.
|
|
22
|
+
|
|
23
|
+
## Agent consumer pairing
|
|
24
|
+
|
|
25
|
+
1. Upgrade Core and check the original protocol first; refresh discovery for new requests only. Preserve saved request bodies/digests, operation/invocation IDs and authority bindings.
|
|
26
|
+
2. Hosts adopting MCP / Agent Client SDK 0.8.0 and DSH 0.8.0 verify the actual dependency tree, built artifacts and loaded versions. Core, a generic SDK and a complete host product have different audit scopes.
|
|
27
|
+
3. Larger arguments require every layer's new limit. Core cannot override an older client's independent 4/16 KiB check. Do not remove business meaning, stringify objects or bypass authentication to evade limits.
|
|
28
|
+
4. Read knowledge capabilities before explicitly selecting `on_demand` on a new turn. Protocol-defined 404/405/501 may fall back to inline; 401/403/5xx and unknown schemas are not success. Hints, references and pagination stay authority/revision/budget-bound. Bundled chat/embed/widget need no opt-in.
|
|
29
|
+
5. Guidance and execution summaries are references. Deduplication, summarization or omitted bodies must not remove machine constraints or original-result reconciliation.
|
|
30
|
+
|
|
31
|
+
## Configure model budgets explicitly
|
|
32
|
+
|
|
33
|
+
Old services are not changed automatically. To adopt the policy, set `defaultOutputTokens`, `outputTokenParameter` and `outputBudgetScope` together and keep the default at or below `maxOutputTokens`. Omit unknown `modelMaxOutputTokens` values rather than guessing. Recheck semantics when changing models or credentials. Do not apply chat policy fields to image services.
|
|
34
|
+
|
|
35
|
+
Older clients may use `max_output_tokens` as both default and ceiling. Keep the legacy policy until those clients adapt, or use an intentionally equal default/ceiling transition after confirming the parameter is compatible. A transition does not redefine the new contract. Parameter mismatches and oversize budgets are confirmed pre-dispatch failures, never automatic retries. A prepared but unadmitted old intent may be rejected by a changed policy and needs an explicit new operation; already admitted operations remain recoverable by their original IDs and snapshots.
|
|
36
|
+
|
|
37
|
+
The host adapter interprets output cutoff. Partial stream delivery or a missing final frame requires original-operation inspection first. Only a confirmed cutoff with the original terminal receipt can lead to a new segment under existing task authority. Core does not call the model for upgrade/acceptance automatically and never repeats completed tools. See [output budgets](MODEL_OUTPUT_BUDGET.en.md) and [host continuation](MODEL_CONTINUATION.en.md).
|
|
38
|
+
|
|
39
|
+
## Acceptance and rollback
|
|
40
|
+
|
|
41
|
+
- Verify exact artifact identity, complete migration ledgers and `/health/ready`; inspect real storage rather than configuration filenames alone.
|
|
42
|
+
- Use isolated data to check examples, unsaved protection, original approval arguments, read-only receipts and diagnostic filters/return paths. Large-argument tests can use read-only validation or a synthetic business system without changing customer pages.
|
|
43
|
+
- Verify new knowledge/budgets only for hosts adopting them; preserve old inline, old policy and original-operation recovery cases. Synthetic output is not real-provider long-answer acceptance or a verified price.
|
|
44
|
+
|
|
45
|
+
Before rollback, stop new writes, drain and preserve new original-call evidence and configuration revisions. No new DDL does not make a tag-only downgrade safe: old Core does not understand new knowledge endpoints or explicit budget policies and may return to its old default parameter. Validate the old consumer's inline fallback, old service policy and persisted records together in isolation; restore code/configuration as a consistent set if needed. Never delete approvals, unknown outcomes, migration entries or operations to bypass checks. Database restoration cannot undo external business actions.
|
|
46
|
+
|
|
47
|
+
[Release notes](RELEASE_NOTES_v0.10.0.en.md) · [Compatibility](COMPATIBILITY.en.md) · [Operations](OPERATIONS.en.md)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Core v0.10.0 升级指南
|
|
2
|
+
|
|
3
|
+
[English](UPGRADE_v0.10.0.en.md)
|
|
4
|
+
|
|
5
|
+
本指南从公开 Core 0.9.4 升级到 0.10.0。配套 MCP / Agent Client SDK 0.8.0、DSH 0.8.0 独立发行;普通业务 HTTP 接入、自带聊天和旧 Agent 客户端不必为使用原功能重建授权。新功能及具体消费者是否采用,按各自配置和版本决定。
|
|
6
|
+
|
|
7
|
+
## 备份、排空与存储
|
|
8
|
+
|
|
9
|
+
固定源/目标 Tag、完整提交、npm 或镜像摘要。保留配置、密钥管理材料、附件、JSONL、实际状态库和配置库的一致备份、完整迁移账本、原 operation/invocation、审批、通知与旧制品。协调全部共库写入方,停止新接单并排空已接受工作。关闭超时不证明工作已经结束;不要让新旧 JSONL writer 并行写入。
|
|
10
|
+
|
|
11
|
+
**相对 0.9.4 无新增 SQL,也未修改既有 SQL 或迁移器。** 已完整应用 0.9.4 的实例不应为本版手动补写账本。更早版本仍须使用官方显式迁移器应用缺失迁移,包括 0.9.3→0.9.4 的 068;分别核对 state/configuration 实际拓扑,共库只执行一次。`npm run db:init` 仅处理当前 `state.mysql`;独立配置库通过 `migrateBailingHubCoreSchema()` 明确迁移,启动不执行 DDL。
|
|
12
|
+
|
|
13
|
+
可先用 [只读升级计划](UPGRADE_PLAN.md)检查制品及脱敏账本,不能用离线 `reviewable` 代替现场数据库、备份恢复或上线批准。
|
|
14
|
+
|
|
15
|
+
## Readiness 和自定义 Host
|
|
16
|
+
|
|
17
|
+
新 readiness 检查实际 state/configuration 池、制品迁移清单和完整 SHA-256。缺迁移、未知迁移或摘要冲突保持 not-ready。它不自动修复,也不以外部模型或工具源故障把整个实例摘除。
|
|
18
|
+
|
|
19
|
+
自定义 MySQL `RuntimeStateStore` 应提供可选类型扩展 `schemaReadinessDb`,指向实际使用的只读查询资源;缺少时现在失败关闭。默认 `MysqlStore` 已提供,无须额外建池。JSONL 搭配 MySQL 配置库仍检查配置库,纯 JSONL 且无 SQL 配置库才跳过数据库。
|
|
20
|
+
|
|
21
|
+
嵌入式 Host 保持既有 `tick()` 与 `close(drainMs)`,等待启动恢复的目标刷新、查询、审计和重新排队全部完成后再释放资源。不要把部署健康、API 签名不变或一次 typecheck 当作完整 Fleet 升级证明。
|
|
22
|
+
|
|
23
|
+
## Agent 客户端配套
|
|
24
|
+
|
|
25
|
+
1. 先升级 Core 并核对原协议可用;仅准备新调用时刷新目录。保留所有已准备请求的原内容、摘要、operation、invocation 和授权关联。
|
|
26
|
+
2. 宿主采用 MCP / Agent Client SDK 0.8.0、DSH 0.8.0 后,核对自己的实际依赖树、构建产物与已加载版本。Core、通用 SDK 和完整宿主产品的依赖审计范围不同。
|
|
27
|
+
3. 大参数需要链路各层都支持新上限;旧客户端的 4/16 KiB 检查不会被 Core 自动覆盖。不要压缩业务语义、改对象为字符串或绕过鉴权来回避限制。
|
|
28
|
+
4. 先调用知识 capabilities,确认协议后在新 turn 显式选择 `on_demand`。404/405/501 可按协议降级为 inline;401/403/5xx 或未知 schema 不能当作成功。提示、引用和分页都受当前授权/修订/预算约束。自带 chat/embed/widget 无需采用这一选项。
|
|
29
|
+
5. 指导文字和执行摘要只作参考。业务机器约束和原结果核对不能因为去重、摘要或省略正文而丢失。
|
|
30
|
+
|
|
31
|
+
## 模型预算按需配置
|
|
32
|
+
|
|
33
|
+
默认不修改旧服务。采用新策略时,一起显式设置 `defaultOutputTokens`、`outputTokenParameter`、`outputBudgetScope`,并核对默认值不超过 `maxOutputTokens`。供应商实际能力未知时不编造 `modelMaxOutputTokens`。更换模型或凭据后重新核实,图片服务不填这些对话字段。
|
|
34
|
+
|
|
35
|
+
旧客户端可能把旧 `max_output_tokens` 同时当默认和上限;在它们适配之前可保留旧策略,或在明确核实参数兼容后先用相等的默认/上限过渡,不把这种过渡当作新契约永久语义。参数冲突或超限是明确的派发前错误,不自动重试。已经准备但尚未受理的旧 intent 可能因新策略被拒绝,需要显式准备新 operation;已经受理的原 operation 仍按原 ID 恢复,不改历史快照。
|
|
36
|
+
|
|
37
|
+
输出截断由宿主适配器判断。只收到流片段或终帧丢失时先查原 operation;明确截断且原回执完整时,宿主才可在原任务授权内建立新续段。中枢不会为升级或验收自动调用模型,也不会重做已完成工具。详见[预算契约](MODEL_OUTPUT_BUDGET.md)和[宿主续段](MODEL_CONTINUATION.md)。
|
|
38
|
+
|
|
39
|
+
## 验收与回退
|
|
40
|
+
|
|
41
|
+
- 核对精确制品身份、完整迁移账本与 `/health/ready`;检查真实存储而非只看配置文件名。
|
|
42
|
+
- 用独立数据核对调用示例、未保存保护、审批原参数、只读回执、诊断过滤/返回路径;大参数验证可使用只读 validate 或模拟业务系统,不修改客户页面。
|
|
43
|
+
- 新知识和预算只对采用它们的宿主验收;保留旧 inline、旧策略和原 operation 恢复用例。核对真实供应商参数及费用前,不把合成输出当作真实长答案验收。
|
|
44
|
+
|
|
45
|
+
回退前先停新写入、排空并保存新产生的原调用与配置修订。没有新 DDL 不代表仅换旧 Tag 就安全:旧 Core 不理解新知识端点或显式预算策略,可能重新采用旧默认参数。应在隔离副本验证旧消费者的 inline 降级、旧服务策略与实际持久记录组合,必要时按一致集合恢复代码与配置。不要删除审批、unknown、账本或原 operation 来绕过检查;恢复数据库不能撤销已经发生的外部业务动作。
|
|
46
|
+
|
|
47
|
+
[版本说明](RELEASE_NOTES_v0.10.0.md) · [兼容策略](兼容性与升级.md) · [运维](OPERATIONS.md)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Core v0.10.1 Upgrade Guide
|
|
2
|
+
|
|
3
|
+
[简体中文](UPGRADE_v0.10.1.md)
|
|
4
|
+
|
|
5
|
+
This guide covers Core 0.10.0 → 0.10.1 and the matching business-side declaration SDK updates. ACC remains at specification release 1.0.6 with declaration `version: 1`; MCP / Agent Client SDK and DSH do not receive separate versions for this patch. Earlier Core installations must also follow the [0.10.0 upgrade guide](UPGRADE_v0.10.0.en.md) and their historical migration chain.
|
|
6
|
+
|
|
7
|
+
## 1. Pin identities and retain original evidence
|
|
8
|
+
|
|
9
|
+
Record source/target tags, exact commits and package or image digests. For business SDKs, retain the previous file manifest, candidate package SHA-256 and generated declaration. An unchanged filename or the label “PHP7” does not establish artifact identity.
|
|
10
|
+
|
|
11
|
+
Follow the existing deployment procedure to back up configuration, databases/JSONL, migration history, original operations/invocations and approvals. Stop new admissions and drain accepted work. Relative to 0.10.0 there is **no new SQL and no change to historical SQL or the migrator**; do not manually edit migration history. Keep old artifacts and declarations for comparison and controlled rollback.
|
|
12
|
+
|
|
13
|
+
## 2. Have business owners review declaration differences
|
|
14
|
+
|
|
15
|
+
Generators retain explicit risk, readonly and idempotent values previously omitted. Rebuild declarations outside production and compare individual operations:
|
|
16
|
+
|
|
17
|
+
- **Non-readonly POST with explicit low**: previously it could become medium when the field was discarded. It now retains the author's explicit low value. Confirm that the label is appropriate; do not set every write operation to low to eliminate differences.
|
|
18
|
+
- **GET with explicit readonly=false**: it now remains non-readonly and defaults to medium when risk is omitted. Review whether the operation modifies business state and whether GET accurately represents its interface.
|
|
19
|
+
- **GET with explicit idempotent=false**: the hint is preserved. Callers must not rely on the old assumption that every GET is idempotent. This is not a promise of automatic retries or exactly-once execution.
|
|
20
|
+
- **Unspecified fields**: remain omitted. Existing defaults for unspecified GET readonly and non-readonly POST medium risk are unchanged.
|
|
21
|
+
- **Approval and authority**: explicit low does not remove `approval.required`, `approval.when`, subject requirements or final business-system authorization. Retain and inspect these rules rather than bypassing approval because a risk value changed.
|
|
22
|
+
|
|
23
|
+
JSON, ETags, declaration digests and tool-discovery revisions may change. Refresh tool sources and client discovery through the existing workflow, using the new declaration for new calls. Preserve original invocation identities, frozen arguments and approvals; handle revision conflicts through the existing preparation/recovery process. Do not rewrite history or automatically replay business operations.
|
|
24
|
+
|
|
25
|
+
## 3. Generator compatibility
|
|
26
|
+
|
|
27
|
+
| SDK | Intermediate representation of unspecified risk | Integration impact |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| PHP7 | No option is added unless `ToolDef::risk()` is called | Method signatures and PHP 7.3 compatibility remain; explicit boolean false is preserved |
|
|
30
|
+
| PHP8 | `AiTool::$risk` is `?string`, default `null` | Constructor parameter names/order are unchanged; custom property readers must handle null |
|
|
31
|
+
| Node.js | Unspecified risk is no longer filled with `'low'` | Custom readers of `tool()` objects must handle unspecified values |
|
|
32
|
+
| Python | Unspecified risk is no longer filled with `'low'` | Custom readers of intermediate dictionaries must handle unspecified values |
|
|
33
|
+
| Go | Empty string means unspecified; booleans remain pointers | Struct types are unchanged; nonempty explicit risk and pointed boolean values are retained |
|
|
34
|
+
| Java | `Tool.risk` defaults to `null` | Direct field readers must handle null; readonly/idempotent remain nullable Boolean values |
|
|
35
|
+
| .NET | `Tool.Risk` defaults to the empty string | The string type is retained; empty means omitted, and booleans remain nullable |
|
|
36
|
+
|
|
37
|
+
These are business-provider SDKs, not a requirement to replace MCP / Agent Client SDK 0.8.0 or DSH 0.8.0. Projects using another consumer must verify its precedence separately. Passing the ACC reference checker alone does not establish end-to-end business acceptance.
|
|
38
|
+
|
|
39
|
+
## 4. Companion packages and acceptance
|
|
40
|
+
|
|
41
|
+
Obtain `web/connect/bailing-connect-php7.tgz` or `bailing-connect-php.tgz` from the same release identity and compare its SHA-256 with the release manifest. From the source checkout:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
node scripts/check-php-sdk-artifacts.mjs
|
|
45
|
+
# Use a real PHP 7.3 binary to check PHP7 source and extracted package:
|
|
46
|
+
node scripts/check-php-sdk-artifacts.mjs --sdk php7 --php /path/to/php7.3
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The verifier checks complete file sets, per-file SHA-256 and actual generator regressions, not just file existence. Both drivers also accept an extracted SDK root as their first argument:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
php sdk/php7/tests/declaration-serialization.php /path/to/bailing-connect-php7
|
|
53
|
+
php sdk/php/tests/declaration-serialization.php /path/to/bailing-connect-php
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Check all 24 risk/readonly combinations, six idempotency combinations, preservation of approval/subject requirements with explicit low, and Core's readonly/idempotent/risk interpretation of the same declarations. Start with synthetic interfaces. Integrators review the full declaration diff for their systems without executing real writes for upgrade acceptance. After deployment, separately verify the exact version and `/health/ready`; synthetic regressions do not replace deployment or business acceptance.
|
|
57
|
+
|
|
58
|
+
Validate Core and generators together. If only one side can be updated, record the remaining unfixed layer explicitly. Do not conceal it by dropping false, changing HTTP methods or globally relabeling risk.
|
|
59
|
+
|
|
60
|
+
## 5. Dependency maintenance and rollback
|
|
61
|
+
|
|
62
|
+
The release applies bounded development/build patches to `fast-uri 3.1.9` and `Vite 6.4.5`. Keep the lockfiles and run the relevant build and dependency audits. These changes add no business protocol and do not establish that production was attacked.
|
|
63
|
+
|
|
64
|
+
Before rollback, stop admissions, drain work and retain new records and declaration revisions. Old SDKs discard the explicit values again, and old Core overrides explicit GET false again; rollback is not merely a version-number change. Verify the old generated declarations and consumer together in isolation, disabling ambiguous capabilities if necessary while preserving operator review. Do not delete approvals, unknown outcomes, original calls or ledgers. Restoring a backup cannot undo external business effects.
|
|
65
|
+
|
|
66
|
+
[Release notes](RELEASE_NOTES_v0.10.1.en.md) · [Compatibility policy](COMPATIBILITY.en.md) · [Operations](OPERATIONS.en.md)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Core v0.10.1 升级指南
|
|
2
|
+
|
|
3
|
+
[English](UPGRADE_v0.10.1.en.md)
|
|
4
|
+
|
|
5
|
+
本指南面向 Core 0.10.0 → 0.10.1,以及业务侧声明生成 SDK 的配套更新。ACC 规范 1.0.6 与声明 `version: 1` 不变,MCP / Agent Client SDK、DSH 不因本补丁另行发版。更早的 Core 来源仍按[0.10.0 升级指南](UPGRADE_v0.10.0.md)及原迁移链核对。
|
|
6
|
+
|
|
7
|
+
## 1. 固定身份与保留原材料
|
|
8
|
+
|
|
9
|
+
记录源/目标 Tag、精确提交、运行包或镜像摘要;业务 SDK 另外保存原文件清单、候选包 SHA-256 和更新前的生成声明。不要以文件名相同或“都是 PHP7”代替制品核对。
|
|
10
|
+
|
|
11
|
+
Core 升级按原部署流程备份配置、数据库/JSONL、迁移账本、原 operation/invocation 与审批记录,停止新接单并排空。相对 0.10.0 **无新增 SQL,也不修改历史 SQL 或迁移器**;不需要手写迁移账本。保留原制品与声明用于差异分析和受控回退。
|
|
12
|
+
|
|
13
|
+
## 2. 业务负责人核对声明差异
|
|
14
|
+
|
|
15
|
+
生成器现在保留过去省略的显式 risk、readonly 和 idempotent。先在非生产环境重建声明,逐条比较变化:
|
|
16
|
+
|
|
17
|
+
- **显式 low 的非只读 POST**:此前可能因字段丢失而得到 medium;现在按原作者的明确声明得到 low。确认该标注确实合理;不要为消除差异把所有写操作设为 low。
|
|
18
|
+
- **GET + 显式 readonly=false**:现在保持非只读;未声明 risk 时为 medium。检查它是否真的修改业务状态,以及 GET 的接口设计是否符合业务实际。
|
|
19
|
+
- **GET + 显式 idempotent=false**:现在保留该提示。核对调用方不得依赖旧的 GET 一律幂等推断;这不是自动重试或恰好一次执行的承诺。
|
|
20
|
+
- **未设置字段**:继续省略,GET 的原只读缺省及非只读 POST 的 medium 缺省不变。
|
|
21
|
+
- **审批与授权**:显式 low 不会删除 `approval.required`、`approval.when`、主体要求或业务系统最终权限。保留这些规则并核对配置,不因风险值变化绕过审批。
|
|
22
|
+
|
|
23
|
+
JSON、ETag、声明摘要和工具发现修订可能变化。按原流程刷新工具源与客户端发现结果,只为新的调用使用新声明;原 invocation、冻结参数和审批记录保持原身份,修订不匹配按既有准备/恢复流程处理。不要改写历史记录或自动重放业务。
|
|
24
|
+
|
|
25
|
+
## 3. 生成器兼容性
|
|
26
|
+
|
|
27
|
+
| SDK | 未设置 risk 的中间表示 | 接入注意 |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| PHP7 | `ToolDef` 未调用 risk 时不创建该选项 | 方法签名不变,继续兼容 PHP 7.3;显式 boolean false 不再丢失 |
|
|
30
|
+
| PHP8 | `AiTool::$risk` 是 `?string`,默认 `null` | 构造参数顺序/名称不变;直接读取该属性的自定义代码需接受 null |
|
|
31
|
+
| Node.js | 未设置值不再补成 `'low'` | 自行读取 `tool()` 返回对象的代码应处理未设置状态 |
|
|
32
|
+
| Python | 未设置值不再补成 `'low'` | 自行读取中间字典的代码应处理未设置状态 |
|
|
33
|
+
| Go | 空字符串表示未设置;布尔字段仍为指针 | 原结构类型不变,非空显式 risk 与 bool 指针值均保留 |
|
|
34
|
+
| Java | `Tool.risk` 默认 `null` | 直接读取字段的代码应处理 null;readonly/idempotent 仍为可空 Boolean |
|
|
35
|
+
| .NET | `Tool.Risk` 默认空字符串 | 保持 string 类型,空字符串表示省略;布尔字段仍可空 |
|
|
36
|
+
|
|
37
|
+
这些是业务侧 SDK,不要求对 MCP / Agent Client SDK 0.8.0 或 DSH 0.8.0 做版本替换。使用其他消费者的项目需独立验证其优先级;不能仅凭 ACC 参考检查器通过就宣称整条业务链已验收。
|
|
38
|
+
|
|
39
|
+
## 4. 配套包与验收
|
|
40
|
+
|
|
41
|
+
从同一发行身份取得 `web/connect/bailing-connect-php7.tgz` 或 `bailing-connect-php.tgz`,核对发布清单中的包 SHA-256。源码检出后可运行:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
node scripts/check-php-sdk-artifacts.mjs
|
|
45
|
+
# 使用实际 PHP 7.3 可执行程序核对 PHP7 源码及解包内容:
|
|
46
|
+
node scripts/check-php-sdk-artifacts.mjs --sdk php7 --php /path/to/php7.3
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
验包工具检查完整文件集合、逐文件 SHA-256 和真实生成器回归,不只验证文件存在。两侧 driver 也支持把解包根目录作为第一个参数:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
php sdk/php7/tests/declaration-serialization.php /path/to/bailing-connect-php7
|
|
53
|
+
php sdk/php/tests/declaration-serialization.php /path/to/bailing-connect-php
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
分别核对:24种风险/只读组合、6种幂等组合、显式 low 不删除审批/主体,以及 Core 消费相同声明后的 readonly、idempotent、risk。先用合成接口确认;接入方审阅自己的全量声明差异,不为升级验收执行真实写业务。部署后另核精确版本与 `/health/ready`,合成回归不代替部署或实际业务验收。
|
|
57
|
+
|
|
58
|
+
Core 与生成器应配套验证。若暂时只能更新其中一层,明确记录尚未修复的另一层;不要通过省略 false、改 HTTP 方法或统一调整风险来掩盖缺口。
|
|
59
|
+
|
|
60
|
+
## 5. 依赖维护与回退
|
|
61
|
+
|
|
62
|
+
本版对开发/构建链中的 `fast-uri 3.1.9`、`Vite 6.4.5` 做限定补丁更新;保持安装锁文件,运行相应构建与依赖审计。它们不是新的业务协议,也不表示已经证实生产受到攻击。
|
|
63
|
+
|
|
64
|
+
回退前停止新接单、排空并保存新产生的记录及声明修订。旧 SDK 会再次省略相应显式值,旧 Core 会再次覆盖 GET 的显式 false;因此回退不是仅换版本号。应在隔离环境核对旧生成声明与旧消费者组合,必要时停用有歧义的能力,保留人工核查路径。不要删除审批、unknown 状态、原调用或账本;恢复备份不能撤销已经发生的外部业务动作。
|
|
65
|
+
|
|
66
|
+
[版本说明](RELEASE_NOTES_v0.10.1.md) · [兼容策略](兼容性与升级.md) · [运维](OPERATIONS.md)
|