bailinghub 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (716) hide show
  1. package/.dockerignore +42 -0
  2. package/.env.example +83 -0
  3. package/.gitignore +44 -0
  4. package/.npmignore +56 -0
  5. package/CODE_OF_CONDUCT.md +24 -0
  6. package/CONTRIBUTING.md +74 -0
  7. package/Dockerfile +16 -0
  8. package/LICENSE +176 -0
  9. package/LICENSING.md +9 -0
  10. package/NOTICE +23 -0
  11. package/README.en.md +264 -0
  12. package/README.md +279 -0
  13. package/SECURITY.md +30 -0
  14. package/THIRD_PARTY_NOTICES.md +254 -0
  15. package/VISION.md +41 -0
  16. package/assets/architecture-overview.en-dark.png +0 -0
  17. package/assets/architecture-overview.en-dark.svg +57 -0
  18. package/assets/architecture-overview.en.png +0 -0
  19. package/assets/architecture-overview.en.svg +57 -0
  20. package/assets/architecture-overview.zh-CN-dark.png +0 -0
  21. package/assets/architecture-overview.zh-CN-dark.svg +57 -0
  22. package/assets/architecture-overview.zh-CN.png +0 -0
  23. package/assets/architecture-overview.zh-CN.svg +57 -0
  24. package/assets/bailinghub-lockup-dark.png +0 -0
  25. package/assets/bailinghub-lockup-dark.svg +8 -0
  26. package/assets/bailinghub-lockup.png +0 -0
  27. package/assets/bailinghub-lockup.svg +8 -0
  28. package/brain/README.en.md +23 -0
  29. package/brain/README.md +45 -0
  30. package/brain/agents/code-review.md +41 -0
  31. package/brain/agents/triage.md +37 -0
  32. package/brain/profiles.json +114 -0
  33. package/brain/runbooks/ticket-triage.md +24 -0
  34. package/config.example.json +58 -0
  35. package/contracts/client-api/consumers.json +28 -0
  36. package/contracts/client-api/v1/error-response.schema.json +21 -0
  37. package/contracts/client-api/v1/health-response.schema.json +13 -0
  38. package/contracts/client-api/v1/job-response.schema.json +49 -0
  39. package/contracts/client-api/v1/manifest.json +63 -0
  40. package/contracts/client-api/v1/run-request.schema.json +42 -0
  41. package/contracts/client-api/v1/submit-response.schema.json +35 -0
  42. package/contracts/client-api/v1/vectors.json +153 -0
  43. package/demo/business/Dockerfile +8 -0
  44. package/demo/business/server.mjs +483 -0
  45. package/docker-compose.images.yml +67 -0
  46. package/docker-compose.yml +79 -0
  47. package/docs/AI_FRIENDLY_TOOLS.en.md +69 -0
  48. package/docs/AI/345/217/213/345/245/275/345/267/245/345/205/267/350/256/276/350/256/241/346/214/207/345/215/227.md +198 -0
  49. package/docs/ARCHITECTURE.en.md +81 -0
  50. package/docs/ARCHITECTURE.md +795 -0
  51. package/docs/CHANGELOG.en.md +275 -0
  52. package/docs/CHANGELOG.md +279 -0
  53. package/docs/CHANNELS.en.md +35 -0
  54. package/docs/CHANNELS.md +72 -0
  55. package/docs/CLIENT_API.md +89 -0
  56. package/docs/COMPATIBILITY.en.md +103 -0
  57. package/docs/CONTRACT.en.md +254 -0
  58. package/docs/CONTRACT.md +653 -0
  59. package/docs/DEMO.en.md +90 -0
  60. package/docs/DEMO.md +297 -0
  61. package/docs/ECOSYSTEM.en.md +39 -0
  62. package/docs/ECOSYSTEM.md +39 -0
  63. package/docs/INDEPENDENT_VALIDATION.en.md +184 -0
  64. package/docs/INDEPENDENT_VALIDATION.md +184 -0
  65. package/docs/INTEGRATION.en.md +120 -0
  66. package/docs/KERNEL_HOST_API.en.md +59 -0
  67. package/docs/KERNEL_HOST_API.md +59 -0
  68. package/docs/OPERATIONS.en.md +182 -0
  69. package/docs/OPERATIONS.md +231 -0
  70. package/docs/PIPELINE.en.md +74 -0
  71. package/docs/PIPELINE.md +67 -0
  72. package/docs/QUICKSTART.en.md +297 -0
  73. package/docs/QUICKSTART.md +152 -0
  74. package/docs/README.en.md +103 -0
  75. package/docs/README.md +119 -0
  76. package/docs/RELEASE_NOTES_v0.1.0.en.md +46 -0
  77. package/docs/RELEASE_NOTES_v0.1.0.md +66 -0
  78. package/docs/RELEASE_NOTES_v0.1.1.en.md +38 -0
  79. package/docs/RELEASE_NOTES_v0.1.1.md +38 -0
  80. package/docs/RELEASE_NOTES_v0.1.10.en.md +102 -0
  81. package/docs/RELEASE_NOTES_v0.1.10.md +102 -0
  82. package/docs/RELEASE_NOTES_v0.1.11.en.md +99 -0
  83. package/docs/RELEASE_NOTES_v0.1.11.md +99 -0
  84. package/docs/RELEASE_NOTES_v0.1.12.en.md +64 -0
  85. package/docs/RELEASE_NOTES_v0.1.12.md +64 -0
  86. package/docs/RELEASE_NOTES_v0.1.13.en.md +46 -0
  87. package/docs/RELEASE_NOTES_v0.1.13.md +46 -0
  88. package/docs/RELEASE_NOTES_v0.1.14.en.md +55 -0
  89. package/docs/RELEASE_NOTES_v0.1.14.md +55 -0
  90. package/docs/RELEASE_NOTES_v0.1.15.en.md +50 -0
  91. package/docs/RELEASE_NOTES_v0.1.15.md +50 -0
  92. package/docs/RELEASE_NOTES_v0.1.16.en.md +106 -0
  93. package/docs/RELEASE_NOTES_v0.1.16.md +105 -0
  94. package/docs/RELEASE_NOTES_v0.1.2.en.md +39 -0
  95. package/docs/RELEASE_NOTES_v0.1.2.md +39 -0
  96. package/docs/RELEASE_NOTES_v0.1.3.en.md +55 -0
  97. package/docs/RELEASE_NOTES_v0.1.3.md +55 -0
  98. package/docs/RELEASE_NOTES_v0.1.4.en.md +55 -0
  99. package/docs/RELEASE_NOTES_v0.1.4.md +55 -0
  100. package/docs/RELEASE_NOTES_v0.1.5.en.md +49 -0
  101. package/docs/RELEASE_NOTES_v0.1.5.md +49 -0
  102. package/docs/RELEASE_NOTES_v0.1.6.en.md +41 -0
  103. package/docs/RELEASE_NOTES_v0.1.6.md +41 -0
  104. package/docs/RELEASE_NOTES_v0.1.7.en.md +39 -0
  105. package/docs/RELEASE_NOTES_v0.1.7.md +39 -0
  106. package/docs/RELEASE_NOTES_v0.1.8.en.md +88 -0
  107. package/docs/RELEASE_NOTES_v0.1.8.md +88 -0
  108. package/docs/RELEASE_NOTES_v0.1.9.en.md +127 -0
  109. package/docs/RELEASE_NOTES_v0.1.9.md +127 -0
  110. package/docs/RELEASE_NOTES_v0.2.0.en.md +95 -0
  111. package/docs/RELEASE_NOTES_v0.2.0.md +96 -0
  112. package/docs/RELEASE_NOTES_v0.3.0.en.md +77 -0
  113. package/docs/RELEASE_NOTES_v0.3.0.md +77 -0
  114. package/docs/SDK.en.md +177 -0
  115. package/docs/STREAMING.en.md +78 -0
  116. package/docs/STREAMING.md +109 -0
  117. package/docs/TOOLS.en.md +205 -0
  118. package/docs/TOOLS_DESIGN.en.md +142 -0
  119. package/docs/TOOLS_DESIGN.md +466 -0
  120. package/docs/TOOLS_MODEL.en.md +56 -0
  121. package/docs/TOOLS_MODEL.md +903 -0
  122. package/docs/WIDGET_RENDERERS.en.md +133 -0
  123. package/docs/WIDGET_RENDERERS.md +139 -0
  124. package/docs/examples/bailing-tool-verify.mjs +94 -0
  125. package/docs/examples/bailing-tool-verify.php +154 -0
  126. package/docs/examples/bailing-tool-verify.py +107 -0
  127. package/docs/examples/custom-streaming-chat-client.mjs +108 -0
  128. package/docs/examples/widget-chart-renderer-adapter.mjs +44 -0
  129. package/docs/integrations/bailian/README.en.md +181 -0
  130. package/docs/integrations/bailian/README.md +165 -0
  131. package/docs/integrations/bailian/bailian-mcp-config.json +17 -0
  132. package/docs/integrations/bailian/verify_recipe.py +97 -0
  133. package/docs/integrations/deepseek/README.en.md +225 -0
  134. package/docs/integrations/deepseek/README.md +225 -0
  135. package/docs/integrations/deepseek/verify_e2e.py +131 -0
  136. package/docs/integrations/dify/README.en.md +131 -0
  137. package/docs/integrations/dify/README.md +131 -0
  138. package/docs/integrations/dify/bailinghub-control-plane.openapi.json +129 -0
  139. package/docs/integrations/dify/verify_contract.py +88 -0
  140. package/docs/integrations/dify/verify_e2e.py +117 -0
  141. package/docs/integrations/jeecgboot/README.en.md +193 -0
  142. package/docs/integrations/jeecgboot/README.md +161 -0
  143. package/docs/integrations/jeecgboot/adapter-contract.v1.json +94 -0
  144. package/docs/integrations/jeecgboot/jeecgboot-user-adapter.openapi.json +183 -0
  145. package/docs/integrations/jeecgboot/verify_recipe.mjs +97 -0
  146. package/docs/integrations/ruoyi-vue-pro/README.en.md +91 -0
  147. package/docs/integrations/ruoyi-vue-pro/README.md +155 -0
  148. package/docs/integrations/ruoyi-vue-pro/adapter-contract.v1.json +71 -0
  149. package/docs/integrations/ruoyi-vue-pro/ruoyi-vue-pro-trade-adapter.openapi.json +148 -0
  150. package/docs/integrations/ruoyi-vue-pro/verify_recipe.mjs +71 -0
  151. package/docs/user-guide/README.en.md +39 -0
  152. package/docs/user-guide/README.md +40 -0
  153. package/docs/user-guide/concepts.en.md +69 -0
  154. package/docs/user-guide/concepts.md +225 -0
  155. package/docs/user-guide/console-map.en.md +58 -0
  156. package/docs/user-guide/console-map.md +473 -0
  157. package/docs/user-guide/overview.en.md +61 -0
  158. package/docs/user-guide/overview.md +156 -0
  159. package/docs/user-guide/scenarios.en.md +70 -0
  160. package/docs/user-guide/scenarios.md +398 -0
  161. package/docs//345/205/274/345/256/271/346/200/247/344/270/216/345/215/207/347/272/247.md +134 -0
  162. package/docs//347/254/254/344/270/211/346/226/271/345/257/271/346/216/245/346/214/207/345/215/227.md +625 -0
  163. package/package.json +119 -0
  164. package/schemas/agent-capability-contract.schema.json +104 -0
  165. package/schemas/api/approval-decision.schema.json +28 -0
  166. package/schemas/api/approval-request.schema.json +31 -0
  167. package/schemas/api/delivery-callback.schema.json +28 -0
  168. package/schemas/api/job-response.schema.json +6 -0
  169. package/schemas/api/kb-doc-upsert.schema.json +21 -0
  170. package/schemas/api/run-request.schema.json +6 -0
  171. package/schemas/api/run-response.schema.json +6 -0
  172. package/schemas/api/tool-spec.schema.json +38 -0
  173. package/schemas/config/alert-rule.schema.json +22 -0
  174. package/schemas/config/channel.schema.json +91 -0
  175. package/schemas/config/chat-entry.schema.json +47 -0
  176. package/schemas/config/client.schema.json +56 -0
  177. package/schemas/config/common.schema.json +215 -0
  178. package/schemas/config/credential.schema.json +48 -0
  179. package/schemas/config/executor-token.schema.json +20 -0
  180. package/schemas/config/page-context.schema.json +21 -0
  181. package/schemas/config/route.schema.json +152 -0
  182. package/schemas/config/storage-bucket.schema.json +31 -0
  183. package/schemas/config/target.schema.json +17 -0
  184. package/schemas/config/tool-provider.schema.json +60 -0
  185. package/schemas/tool-definition.schema.json +188 -0
  186. package/scripts/check-client-api-ecosystem.mjs +69 -0
  187. package/scripts/check-doc-links.mjs +136 -0
  188. package/scripts/check-image-tags.sh +43 -0
  189. package/scripts/check-package-artifact.mjs +185 -0
  190. package/scripts/check-release-consistency.mjs +199 -0
  191. package/scripts/check-release-consistency.test.mjs +63 -0
  192. package/scripts/client-api-contract-test.ts +127 -0
  193. package/scripts/create-admin.ts +27 -0
  194. package/scripts/demo-e2e.ts +133 -0
  195. package/scripts/docker-entrypoint.sh +33 -0
  196. package/scripts/doctor.ts +107 -0
  197. package/scripts/e2e-console.mjs +214 -0
  198. package/scripts/export-oss.mjs +204 -0
  199. package/scripts/generate-readme-assets.mjs +181 -0
  200. package/scripts/generate-third-party-notices.mjs +93 -0
  201. package/scripts/image-release-policy.mjs +75 -0
  202. package/scripts/image-release-policy.test.mjs +58 -0
  203. package/scripts/init-db.ts +21 -0
  204. package/scripts/install.sh +461 -0
  205. package/scripts/oss-boundary-check.mjs +183 -0
  206. package/scripts/publish-images.sh +63 -0
  207. package/scripts/publish-mysql-image.sh +41 -0
  208. package/scripts/release-audit.mjs +348 -0
  209. package/scripts/sdk-contract-test.ts +62 -0
  210. package/scripts/sdk-p1-check.mjs +58 -0
  211. package/scripts/sdk-runtime-test.mjs +106 -0
  212. package/scripts/security-scan.mjs +110 -0
  213. package/scripts/seed-demo.ts +116 -0
  214. package/scripts/selftest.ts +226 -0
  215. package/scripts/smoke.ts +31 -0
  216. package/scripts/validate-examples.mjs +93 -0
  217. package/scripts/verify-bootstrap-admin-restart.ts +66 -0
  218. package/scripts/verify-github-repo.mjs +195 -0
  219. package/scripts/verify-oss-export.mjs +192 -0
  220. package/scripts/verify-routing.ts +29 -0
  221. package/scripts/widget-renderer-test.mjs +206 -0
  222. package/scripts/write-build-info.mjs +29 -0
  223. package/sdk/dotnet/Bailing.Connect/Bailing.Connect.csproj +12 -0
  224. package/sdk/dotnet/Bailing.Connect/BailingConnect.cs +260 -0
  225. package/sdk/dotnet/README.md +32 -0
  226. package/sdk/dotnet/examples/BuildSpec/BuildSpec.csproj +11 -0
  227. package/sdk/dotnet/examples/BuildSpec/Program.cs +36 -0
  228. package/sdk/go/README.md +33 -0
  229. package/sdk/go/bailingconnect/connect.go +367 -0
  230. package/sdk/go/examples/build-spec/main.go +39 -0
  231. package/sdk/go/go.mod +3 -0
  232. package/sdk/java/README.md +43 -0
  233. package/sdk/java/examples/BuildSpec.java +31 -0
  234. package/sdk/java/src/main/java/com/bailing/connect/BailingConnect.java +376 -0
  235. package/sdk/node/README.md +107 -0
  236. package/sdk/node/examples/build-spec.mjs +84 -0
  237. package/sdk/node/package.json +22 -0
  238. package/sdk/node/src/index.mjs +250 -0
  239. package/sdk/php/README.md +204 -0
  240. package/sdk/php/composer.json +18 -0
  241. package/sdk/php/examples/DemoStaffController.php +108 -0
  242. package/sdk/php/examples/build-spec.php +27 -0
  243. package/sdk/php/examples/thinkphp-integration.php +81 -0
  244. package/sdk/php/src/Attributes/AiParam.php +40 -0
  245. package/sdk/php/src/Attributes/AiTool.php +75 -0
  246. package/sdk/php/src/HubClient.php +122 -0
  247. package/sdk/php/src/SpecBuilder.php +328 -0
  248. package/sdk/php/src/SpecServer.php +209 -0
  249. package/sdk/php/src/Ticket.php +37 -0
  250. package/sdk/php/src/Verify.php +178 -0
  251. package/sdk/php7/README.md +191 -0
  252. package/sdk/php7/composer.json +18 -0
  253. package/sdk/php7/examples/build-spec.php +68 -0
  254. package/sdk/php7/examples/well-known.php +33 -0
  255. package/sdk/php7/src/HubClient.php +111 -0
  256. package/sdk/php7/src/SpecServer.php +203 -0
  257. package/sdk/php7/src/Ticket.php +33 -0
  258. package/sdk/php7/src/ToolDef.php +169 -0
  259. package/sdk/php7/src/ToolSpec.php +334 -0
  260. package/sdk/php7/src/Verify.php +165 -0
  261. package/sdk/python/README.md +107 -0
  262. package/sdk/python/bailing_connect/__init__.py +307 -0
  263. package/sdk/python/examples/build_spec.py +90 -0
  264. package/sdk/python/pyproject.toml +24 -0
  265. package/sql/001_init_state.sql +66 -0
  266. package/sql/002_routes.sql +44 -0
  267. package/sql/003_executor.sql +15 -0
  268. package/sql/004_clients.sql +22 -0
  269. package/sql/005_admins.sql +25 -0
  270. package/sql/006_ledger.sql +57 -0
  271. package/sql/007_delivery.sql +8 -0
  272. package/sql/008_kb.sql +66 -0
  273. package/sql/009_rbac.sql +5 -0
  274. package/sql/010_targets.sql +28 -0
  275. package/sql/011_observability.sql +11 -0
  276. package/sql/012_generic.sql +5 -0
  277. package/sql/013_tools.sql +24 -0
  278. package/sql/014_approvals.sql +27 -0
  279. package/sql/015_chat.sql +21 -0
  280. package/sql/016_chat_feedback.sql +19 -0
  281. package/sql/017_provider_autorefresh.sql +6 -0
  282. package/sql/018_kb_ingest.sql +11 -0
  283. package/sql/019_kb_datasources.sql +32 -0
  284. package/sql/022_storage_buckets.sql +25 -0
  285. package/sql/024_channels.sql +15 -0
  286. package/sql/025_chat_appearance.sql +7 -0
  287. package/sql/026_thread_memory.sql +10 -0
  288. package/sql/027_page_contexts.sql +23 -0
  289. package/sql/028_executor_capabilities.sql +4 -0
  290. package/sql/029_executor_tokens.sql +13 -0
  291. package/sql/030_route_permission.sql +5 -0
  292. package/sql/031_tool_embeddings.sql +20 -0
  293. package/sql/032_tool_provider_embed.sql +7 -0
  294. package/sql/033_alert_rules.sql +21 -0
  295. package/sql/034_client_allowed_channels.sql +6 -0
  296. package/sql/035_tool_idempotency.sql +15 -0
  297. package/sql/036_delivery_dlq.sql +15 -0
  298. package/sql/038_audit_trace_shape.sql +15 -0
  299. package/sql/039_runtime_locks.sql +9 -0
  300. package/sql/040_budget_policy.sql +3 -0
  301. package/sql/041_approval_intent.sql +14 -0
  302. package/sql/042_approval_decision_contract.sql +11 -0
  303. package/sql/043_rate_limits.sql +7 -0
  304. package/sql/044_job_run_after.sql +3 -0
  305. package/sql/045_job_claim_lease.sql +7 -0
  306. package/sql/046_tool_authz_probe.sql +5 -0
  307. package/sql/047_route_audience.sql +4 -0
  308. package/sql/048_llm_target.sql +17 -0
  309. package/sql/049_llm_input_shape.sql +11 -0
  310. package/sql/050_operational_metrics_indexes.sql +8 -0
  311. package/sql/051_instance_branding.sql +17 -0
  312. package/sql/052_tool_execution_journal.sql +19 -0
  313. package/sql/053_tool_spec_access_policy.sql +9 -0
  314. package/sql/README.en.md +41 -0
  315. package/sql/README.md +40 -0
  316. package/src/adapters/channels/wecom-api.test.ts +77 -0
  317. package/src/adapters/channels/wecom-api.ts +224 -0
  318. package/src/adapters/channels/wecom-crypto.test.ts +85 -0
  319. package/src/adapters/channels/wecom-crypto.ts +77 -0
  320. package/src/adapters/executors/claudecode.ts +39 -0
  321. package/src/adapters/executors/profiles.ts +86 -0
  322. package/src/adapters/executors/report.ts +35 -0
  323. package/src/adapters/executors/runner.ts +114 -0
  324. package/src/adapters/executors/wecomnotify.ts +63 -0
  325. package/src/adapters/llm/file.test.ts +81 -0
  326. package/src/adapters/llm/file.ts +250 -0
  327. package/src/adapters/llm/openai-chat-stream.test.ts +74 -0
  328. package/src/adapters/llm/openai-chat-stream.ts +154 -0
  329. package/src/adapters/llm/perception.ts +159 -0
  330. package/src/adapters/llm/speech.test.ts +75 -0
  331. package/src/adapters/llm/speech.ts +146 -0
  332. package/src/adapters/storage/object-storage.test.ts +38 -0
  333. package/src/adapters/storage/object-storage.ts +140 -0
  334. package/src/adapters/targets/demo-agent.ts +88 -0
  335. package/src/adapters/targets/llm.test.ts +733 -0
  336. package/src/adapters/targets/llm.ts +862 -0
  337. package/src/app/admin-bootstrap.test.ts +112 -0
  338. package/src/app/admin-bootstrap.ts +48 -0
  339. package/src/app/auth-default.ts +26 -0
  340. package/src/app/auth.test.ts +57 -0
  341. package/src/app/auth.ts +207 -0
  342. package/src/app/builtin-tools-default.ts +17 -0
  343. package/src/app/builtin-tools.test.ts +202 -0
  344. package/src/app/builtin-tools.ts +380 -0
  345. package/src/app/channels-default.ts +8 -0
  346. package/src/app/channels.ts +141 -0
  347. package/src/app/delivery-default.ts +14 -0
  348. package/src/app/delivery.test.ts +46 -0
  349. package/src/app/delivery.ts +215 -0
  350. package/src/app/engine-default.ts +54 -0
  351. package/src/app/engine.ts +427 -0
  352. package/src/app/http-mount.test.ts +27 -0
  353. package/src/app/http-server.test.ts +114 -0
  354. package/src/app/http-server.ts +127 -0
  355. package/src/app/http.test.ts +27 -0
  356. package/src/app/http.ts +118 -0
  357. package/src/app/kernel.test.ts +191 -0
  358. package/src/app/kernel.ts +544 -0
  359. package/src/app/monitor-default.ts +9 -0
  360. package/src/app/monitor.ts +46 -0
  361. package/src/app/operational-metrics.test.ts +73 -0
  362. package/src/app/operational-metrics.ts +124 -0
  363. package/src/app/oss-edition.test.ts +71 -0
  364. package/src/app/oss-edition.ts +108 -0
  365. package/src/app/outbound-default.ts +57 -0
  366. package/src/app/outbound.ts +133 -0
  367. package/src/app/readiness.test.ts +37 -0
  368. package/src/app/readiness.ts +39 -0
  369. package/src/app/runtime-composition.test.ts +51 -0
  370. package/src/app/runtime-composition.ts +73 -0
  371. package/src/app/runtime-context-default.ts +30 -0
  372. package/src/app/runtime-context.test.ts +60 -0
  373. package/src/app/runtime-context.ts +79 -0
  374. package/src/app/runtime-lifecycle-default.ts +48 -0
  375. package/src/app/runtime-lifecycle.test.ts +322 -0
  376. package/src/app/runtime-lifecycle.ts +440 -0
  377. package/src/app/runtime.ts +36 -0
  378. package/src/app/tool-approvals-default.ts +16 -0
  379. package/src/app/tool-approvals.ts +214 -0
  380. package/src/app/tool-assembly-default.ts +11 -0
  381. package/src/app/tool-assembly.test.ts +112 -0
  382. package/src/app/tool-assembly.ts +83 -0
  383. package/src/app/tool-context-default.ts +7 -0
  384. package/src/app/tool-context.test.ts +82 -0
  385. package/src/app/tool-context.ts +109 -0
  386. package/src/app/tool-debug.test.ts +111 -0
  387. package/src/app/tool-debug.ts +152 -0
  388. package/src/app/tool-proxy-default.ts +35 -0
  389. package/src/app/tool-proxy.ts +173 -0
  390. package/src/app/tool-specs-default.ts +33 -0
  391. package/src/app/tool-specs.test.ts +322 -0
  392. package/src/app/tool-specs.ts +555 -0
  393. package/src/app/tools-runtime-default.ts +14 -0
  394. package/src/app/tools-runtime.ts +23 -0
  395. package/src/architecture-boundary.test.ts +119 -0
  396. package/src/core/config/config-codec.test.ts +105 -0
  397. package/src/core/config/config-codec.ts +231 -0
  398. package/src/core/config/config-diagnostics.test.ts +285 -0
  399. package/src/core/config/config-diagnostics.ts +436 -0
  400. package/src/core/config/config-models.test.ts +584 -0
  401. package/src/core/config/config-models.ts +392 -0
  402. package/src/core/config/config-schema.test.ts +153 -0
  403. package/src/core/config/config.test.ts +314 -0
  404. package/src/core/config/config.ts +324 -0
  405. package/src/core/config/route-config.test.ts +232 -0
  406. package/src/core/config/route-config.ts +246 -0
  407. package/src/core/config/target-config.test.ts +139 -0
  408. package/src/core/config/target-config.ts +219 -0
  409. package/src/core/config/tools-config.test.ts +124 -0
  410. package/src/core/config/tools-config.ts +126 -0
  411. package/src/core/contracts/approval-decision.test.ts +67 -0
  412. package/src/core/contracts/approval-decision.ts +93 -0
  413. package/src/core/contracts/openapi-tools.ts +201 -0
  414. package/src/core/contracts/tool-annotations.ts +121 -0
  415. package/src/core/contracts/tool-definition.test.ts +147 -0
  416. package/src/core/contracts/tool-definition.ts +304 -0
  417. package/src/core/contracts/tools-idempotency.test.ts +435 -0
  418. package/src/core/contracts/tools.test.ts +487 -0
  419. package/src/core/contracts/tools.ts +831 -0
  420. package/src/core/contracts/types.ts +408 -0
  421. package/src/core/edition/capabilities.ts +6 -0
  422. package/src/core/edition/context.test.ts +20 -0
  423. package/src/core/edition/context.ts +78 -0
  424. package/src/core/edition/index.ts +4 -0
  425. package/src/core/edition/scope-resolver.ts +24 -0
  426. package/src/core/edition/store-factory.ts +6 -0
  427. package/src/core/observability/openmetrics.test.ts +57 -0
  428. package/src/core/observability/openmetrics.ts +103 -0
  429. package/src/core/platform/content.test.ts +46 -0
  430. package/src/core/platform/content.ts +90 -0
  431. package/src/core/platform/fence.test.ts +31 -0
  432. package/src/core/platform/fence.ts +11 -0
  433. package/src/core/platform/instance-branding.test.ts +65 -0
  434. package/src/core/platform/instance-branding.ts +202 -0
  435. package/src/core/platform/metrics-token.test.ts +31 -0
  436. package/src/core/platform/metrics-token.ts +42 -0
  437. package/src/core/platform/pagecontext.ts +0 -0
  438. package/src/core/platform/password.test.ts +13 -0
  439. package/src/core/platform/password.ts +38 -0
  440. package/src/core/platform/queue.test.ts +59 -0
  441. package/src/core/platform/queue.ts +75 -0
  442. package/src/core/platform/serial.test.ts +73 -0
  443. package/src/core/platform/serial.ts +64 -0
  444. package/src/core/platform/server-token.test.ts +46 -0
  445. package/src/core/platform/server-token.ts +60 -0
  446. package/src/core/platform/signing.test.ts +24 -0
  447. package/src/core/platform/signing.ts +22 -0
  448. package/src/core/platform/time.ts +73 -0
  449. package/src/core/platform/version.test.ts +19 -0
  450. package/src/core/platform/version.ts +90 -0
  451. package/src/core/runtime/budget-runtime.test.ts +93 -0
  452. package/src/core/runtime/budget-runtime.ts +110 -0
  453. package/src/core/runtime/context-runtime.test.ts +106 -0
  454. package/src/core/runtime/context-runtime.ts +95 -0
  455. package/src/core/runtime/credential-resolver.test.ts +129 -0
  456. package/src/core/runtime/credential-resolver.ts +93 -0
  457. package/src/core/runtime/credential-verify.test.ts +76 -0
  458. package/src/core/runtime/credential-verify.ts +161 -0
  459. package/src/core/runtime/debug-report.test.ts +20 -0
  460. package/src/core/runtime/debug-report.ts +100 -0
  461. package/src/core/runtime/execution-runtime.test.ts +350 -0
  462. package/src/core/runtime/execution-runtime.ts +197 -0
  463. package/src/core/runtime/finish-runtime.test.ts +168 -0
  464. package/src/core/runtime/finish-runtime.ts +83 -0
  465. package/src/core/runtime/identity-runtime.test.ts +38 -0
  466. package/src/core/runtime/identity-runtime.ts +104 -0
  467. package/src/core/runtime/inhub-runtime.test.ts +297 -0
  468. package/src/core/runtime/inhub-runtime.ts +198 -0
  469. package/src/core/runtime/job-stream.test.ts +55 -0
  470. package/src/core/runtime/job-stream.ts +187 -0
  471. package/src/core/runtime/knowledge-runtime.test.ts +120 -0
  472. package/src/core/runtime/knowledge-runtime.ts +98 -0
  473. package/src/core/runtime/launch-runtime.test.ts +187 -0
  474. package/src/core/runtime/launch-runtime.ts +182 -0
  475. package/src/core/runtime/memory-runtime.test.ts +85 -0
  476. package/src/core/runtime/memory-runtime.ts +32 -0
  477. package/src/core/runtime/memory.ts +141 -0
  478. package/src/core/runtime/redaction-runtime.test.ts +35 -0
  479. package/src/core/runtime/redaction-runtime.ts +60 -0
  480. package/src/core/runtime/routing-runtime.test.ts +89 -0
  481. package/src/core/runtime/routing-runtime.ts +146 -0
  482. package/src/core/runtime/smoke-runtime.test.ts +65 -0
  483. package/src/core/runtime/smoke-runtime.ts +237 -0
  484. package/src/core/runtime/summary-runtime.test.ts +234 -0
  485. package/src/core/runtime/summary-runtime.ts +153 -0
  486. package/src/core/runtime/trace-runtime.test.ts +234 -0
  487. package/src/core/runtime/trace-runtime.ts +330 -0
  488. package/src/core/state/audit-observability.test.ts +51 -0
  489. package/src/core/state/audit-observability.ts +74 -0
  490. package/src/core/state/state-codec.ts +44 -0
  491. package/src/core/state/state-contracts.ts +59 -0
  492. package/src/core/targets/adapter.ts +69 -0
  493. package/src/core/targets/registry.test.ts +65 -0
  494. package/src/core/targets/registry.ts +153 -0
  495. package/src/core/targets/resolve.ts +21 -0
  496. package/src/executor.ts +201 -0
  497. package/src/extension-api.test.ts +84 -0
  498. package/src/extension-api.ts +194 -0
  499. package/src/infrastructure/config/config-admin-repository.test.ts +193 -0
  500. package/src/infrastructure/config/config-admin-repository.ts +175 -0
  501. package/src/infrastructure/config/config-alert-rule-repository.ts +38 -0
  502. package/src/infrastructure/config/config-approval-ledger.ts +74 -0
  503. package/src/infrastructure/config/config-channel-repository.ts +31 -0
  504. package/src/infrastructure/config/config-chat-repository.ts +83 -0
  505. package/src/infrastructure/config/config-client-repository.ts +46 -0
  506. package/src/infrastructure/config/config-conversation-ledger.ts +222 -0
  507. package/src/infrastructure/config/config-credential-repository.test.ts +32 -0
  508. package/src/infrastructure/config/config-credential-repository.ts +47 -0
  509. package/src/infrastructure/config/config-delivery-dlq-ledger.ts +49 -0
  510. package/src/infrastructure/config/config-executor-ledger.ts +30 -0
  511. package/src/infrastructure/config/config-executor-token-repository.ts +44 -0
  512. package/src/infrastructure/config/config-instance-branding-repository.ts +75 -0
  513. package/src/infrastructure/config/config-knowledge-repository.ts +249 -0
  514. package/src/infrastructure/config/config-observability-ledger.ts +262 -0
  515. package/src/infrastructure/config/config-project-repository.ts +30 -0
  516. package/src/infrastructure/config/config-rate-limit-ledger.ts +56 -0
  517. package/src/infrastructure/config/config-route-repository.ts +41 -0
  518. package/src/infrastructure/config/config-storage-bucket-repository.ts +43 -0
  519. package/src/infrastructure/config/config-target-repository.ts +25 -0
  520. package/src/infrastructure/config/config-tool-call-ledger.ts +142 -0
  521. package/src/infrastructure/config/config-tool-embedding-repository.test.ts +124 -0
  522. package/src/infrastructure/config/config-tool-embedding-repository.ts +78 -0
  523. package/src/infrastructure/config/config-tool-provider-repository.test.ts +71 -0
  524. package/src/infrastructure/config/config-tool-provider-repository.ts +50 -0
  525. package/src/infrastructure/config/configstore.ts +130 -0
  526. package/src/infrastructure/config/local-instance-branding-provider.test.ts +94 -0
  527. package/src/infrastructure/config/local-instance-branding-provider.ts +79 -0
  528. package/src/infrastructure/mysql/pool-owner.test.ts +36 -0
  529. package/src/infrastructure/mysql/pool-owner.ts +56 -0
  530. package/src/infrastructure/schema/core-schema-migrator.test.ts +340 -0
  531. package/src/infrastructure/schema/core-schema-migrator.ts +461 -0
  532. package/src/infrastructure/schema/migration-files.test.ts +18 -0
  533. package/src/infrastructure/schema/migration-files.ts +27 -0
  534. package/src/infrastructure/schema/retired-migrations.ts +35 -0
  535. package/src/infrastructure/state/operational-metrics-storage.test.ts +107 -0
  536. package/src/infrastructure/state/state-jsonl.ts +268 -0
  537. package/src/infrastructure/state/state-mysql-update-plan.test.ts +54 -0
  538. package/src/infrastructure/state/state-mysql-update-plan.ts +63 -0
  539. package/src/infrastructure/state/state-mysql.ts +359 -0
  540. package/src/infrastructure/state/state.test.ts +319 -0
  541. package/src/infrastructure/state/state.ts +11 -0
  542. package/src/kernel-api/v1/artifact.test.ts +46 -0
  543. package/src/kernel-api/v1/artifact.ts +71 -0
  544. package/src/kernel-api/v1/contracts.ts +168 -0
  545. package/src/kernel-api/v1/execution-gate.test.ts +25 -0
  546. package/src/kernel-api/v1/execution-gate.ts +18 -0
  547. package/src/kernel-api/v1/index.ts +51 -0
  548. package/src/openclaw-stdio.test.ts +60 -0
  549. package/src/routes/admin-access-default.ts +20 -0
  550. package/src/routes/admin-access.ts +94 -0
  551. package/src/routes/admin-branding.test.ts +116 -0
  552. package/src/routes/admin-branding.ts +48 -0
  553. package/src/routes/admin-chat-default.ts +12 -0
  554. package/src/routes/admin-chat.ts +84 -0
  555. package/src/routes/admin-default.ts +35 -0
  556. package/src/routes/admin-dispatch-config-default.ts +13 -0
  557. package/src/routes/admin-dispatch-config.ts +121 -0
  558. package/src/routes/admin-format.ts +12 -0
  559. package/src/routes/admin-host.test.ts +56 -0
  560. package/src/routes/admin-infra-default.ts +12 -0
  561. package/src/routes/admin-infra.ts +142 -0
  562. package/src/routes/admin-kb-default.ts +13 -0
  563. package/src/routes/admin-kb.ts +160 -0
  564. package/src/routes/admin-runtime-default.ts +31 -0
  565. package/src/routes/admin-runtime.ts +444 -0
  566. package/src/routes/admin-tool-providers-default.ts +20 -0
  567. package/src/routes/admin-tool-providers.test.ts +114 -0
  568. package/src/routes/admin-tool-providers.ts +186 -0
  569. package/src/routes/admin.ts +246 -0
  570. package/src/routes/approvals-default.ts +32 -0
  571. package/src/routes/approvals.ts +120 -0
  572. package/src/routes/chat-default.ts +61 -0
  573. package/src/routes/chat-mount.test.ts +58 -0
  574. package/src/routes/chat.test.ts +222 -0
  575. package/src/routes/chat.ts +478 -0
  576. package/src/routes/critical-routes.test.ts +292 -0
  577. package/src/routes/executor-default.ts +45 -0
  578. package/src/routes/executor.ts +226 -0
  579. package/src/routes/kb-default.ts +23 -0
  580. package/src/routes/kb.ts +92 -0
  581. package/src/routes/private-default.ts +38 -0
  582. package/src/routes/private-host-auth.test.ts +84 -0
  583. package/src/routes/private.ts +210 -0
  584. package/src/routes/public-default.ts +46 -0
  585. package/src/routes/public.test.ts +504 -0
  586. package/src/routes/public.ts +313 -0
  587. package/src/routes/run-default.ts +25 -0
  588. package/src/routes/run.ts +188 -0
  589. package/src/routes/send-default.ts +24 -0
  590. package/src/routes/send.ts +143 -0
  591. package/src/routes/wecom-default.ts +27 -0
  592. package/src/routes/wecom.ts +307 -0
  593. package/src/server.ts +13 -0
  594. package/src/services/embedding.test.ts +185 -0
  595. package/src/services/embedding.ts +138 -0
  596. package/src/services/kb-repository.ts +79 -0
  597. package/src/services/kb.ts +328 -0
  598. package/src/services/kbsync.ts +166 -0
  599. package/src/services/tool-index-repository.ts +50 -0
  600. package/src/services/tools-index.test.ts +756 -0
  601. package/src/services/tools-index.ts +427 -0
  602. package/tsconfig.json +17 -0
  603. package/web/connect/bailing-connect-php.tgz +0 -0
  604. package/web/connect/bailing-connect-php7.tgz +0 -0
  605. package/web/connect/executor.mjs +152 -0
  606. package/web/connect/openclaw-stdio.mjs +145 -0
  607. package/web/connect/skills/connect-bailinghub-executor/SKILL.md +97 -0
  608. package/web/connect/skills/connect-bailinghub-executor/agents/openai.yaml +4 -0
  609. package/web/connect/skills/connect-bailinghub-executor/references/direct-protocol.md +99 -0
  610. package/web/connect/skills/connect-bailinghub-executor/references/openclaw.md +39 -0
  611. package/web/console/assets/Accounts-B4ePH5jp.css +1 -0
  612. package/web/console/assets/Accounts-Dwzm4D_V.js +3 -0
  613. package/web/console/assets/Approvals-BxhuI0ku.js +1 -0
  614. package/web/console/assets/Approvals-DlTSHl_7.css +1 -0
  615. package/web/console/assets/Audit-CSu6_3oD.css +1 -0
  616. package/web/console/assets/Audit-dFAbGynl.js +1 -0
  617. package/web/console/assets/BrandLockup-BtZyvkM5.js +1 -0
  618. package/web/console/assets/BrandLockup-DKYBYzKU.css +1 -0
  619. package/web/console/assets/Channels-CCn0L1jg.css +1 -0
  620. package/web/console/assets/Channels-Dqg4-_yr.js +105 -0
  621. package/web/console/assets/ChatEntries-BweMx_CU.css +1 -0
  622. package/web/console/assets/ChatEntries-CEGZ3NnJ.js +7 -0
  623. package/web/console/assets/Clients-C0QD1x7g.js +3 -0
  624. package/web/console/assets/Clients-DcTYN-Js.css +1 -0
  625. package/web/console/assets/Cost-BAJqLhpK.js +1 -0
  626. package/web/console/assets/Cost-CjT39DSZ.css +1 -0
  627. package/web/console/assets/Credentials-D_GDRgWi.js +1 -0
  628. package/web/console/assets/Credentials-ioLP0qYN.css +1 -0
  629. package/web/console/assets/Diagnostics-BWYnDxRj.js +1 -0
  630. package/web/console/assets/Diagnostics-Ya05PTDp.css +1 -0
  631. package/web/console/assets/Executors-CjhEM54c.css +1 -0
  632. package/web/console/assets/Executors-Cmryk4Vk.js +1 -0
  633. package/web/console/assets/HelpTip-CA6Bm7Nx.css +1 -0
  634. package/web/console/assets/HelpTip-CT07o3kB.js +1 -0
  635. package/web/console/assets/Kb-BSXQE0Fa.js +5 -0
  636. package/web/console/assets/Kb-CzIzd9xr.css +1 -0
  637. package/web/console/assets/Login-BnBPqC8Z.js +1 -0
  638. package/web/console/assets/Login-xtPwDB5_.css +1 -0
  639. package/web/console/assets/Projects-Bm8AjsNx.css +1 -0
  640. package/web/console/assets/Projects-CNHx4L_7.js +1 -0
  641. package/web/console/assets/Routes-DWGQN5Pv.css +1 -0
  642. package/web/console/assets/Routes-u5cEAEXQ.js +124 -0
  643. package/web/console/assets/Runs-BeFUR77_.js +3 -0
  644. package/web/console/assets/Runs-CUtSsPW-.css +1 -0
  645. package/web/console/assets/Setup-BjZfrmfN.js +1 -0
  646. package/web/console/assets/Setup-QjlHZKdB.css +1 -0
  647. package/web/console/assets/Shell-CbGNTN91.css +1 -0
  648. package/web/console/assets/Shell-EJuYf3OO.js +1 -0
  649. package/web/console/assets/StorageBuckets-DMXRJxUA.js +1 -0
  650. package/web/console/assets/StorageBuckets-GnXnVvF0.css +1 -0
  651. package/web/console/assets/SystemSettings-B72F-loY.js +1 -0
  652. package/web/console/assets/SystemSettings-BjiHyrXO.css +1 -0
  653. package/web/console/assets/SystemStatus-I11I67rw.css +1 -0
  654. package/web/console/assets/SystemStatus-hOj_TPYE.js +1 -0
  655. package/web/console/assets/Targets-DTb5tn6z.css +1 -0
  656. package/web/console/assets/Targets-UVVf7twC.js +1 -0
  657. package/web/console/assets/Tools-A20oaMaQ.css +1 -0
  658. package/web/console/assets/Tools-ihkr9R9x.js +2 -0
  659. package/web/console/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  660. package/web/console/assets/docs-DPUOCa7R.js +1 -0
  661. package/web/console/assets/index-DZEQL_yy.js +1 -0
  662. package/web/console/assets/index-DxvruykG.js +2 -0
  663. package/web/console/assets/index-Fi9gkGxV.css +1 -0
  664. package/web/console/assets/llm-catalog-HwRIrS94.js +1 -0
  665. package/web/console/assets/request-BisL2T9B.js +1 -0
  666. package/web/console/assets/schema-CzpUpoLk.js +1 -0
  667. package/web/console/assets/util-SiQC2MJh.js +1 -0
  668. package/web/console/assets/vendor-element-D7WRzHhy.js +37 -0
  669. package/web/console/assets/vendor-mammoth-DvgsHdlx.js +231 -0
  670. package/web/console/assets/vendor-turndown-kLzRgxYD.js +61 -0
  671. package/web/console/assets/vendor-vue-B2uhHUfE.js +29 -0
  672. package/web/console/index.html +16 -0
  673. package/web/widget/widget.js +1490 -0
  674. package/web-admin/index.html +13 -0
  675. package/web-admin/package-lock.json +1854 -0
  676. package/web-admin/package.json +25 -0
  677. package/web-admin/src/App.vue +9 -0
  678. package/web-admin/src/branding.ts +90 -0
  679. package/web-admin/src/components/BrandLockup.vue +40 -0
  680. package/web-admin/src/components/HelpTip.vue +51 -0
  681. package/web-admin/src/components/RichText.vue +35 -0
  682. package/web-admin/src/docs.ts +16 -0
  683. package/web-admin/src/layout/Shell.vue +356 -0
  684. package/web-admin/src/llm-catalog.ts +129 -0
  685. package/web-admin/src/main.ts +116 -0
  686. package/web-admin/src/pages/Accounts.vue +162 -0
  687. package/web-admin/src/pages/Approvals.vue +179 -0
  688. package/web-admin/src/pages/Audit.vue +110 -0
  689. package/web-admin/src/pages/Channels.vue +738 -0
  690. package/web-admin/src/pages/ChatEntries.vue +778 -0
  691. package/web-admin/src/pages/Clients.vue +353 -0
  692. package/web-admin/src/pages/Cost.vue +314 -0
  693. package/web-admin/src/pages/Credentials.vue +418 -0
  694. package/web-admin/src/pages/Diagnostics.vue +440 -0
  695. package/web-admin/src/pages/Executors.vue +398 -0
  696. package/web-admin/src/pages/Kb.vue +698 -0
  697. package/web-admin/src/pages/Login.vue +314 -0
  698. package/web-admin/src/pages/Projects.vue +106 -0
  699. package/web-admin/src/pages/Routes.vue +1661 -0
  700. package/web-admin/src/pages/Runs.vue +1113 -0
  701. package/web-admin/src/pages/Setup.vue +354 -0
  702. package/web-admin/src/pages/StorageBuckets.vue +182 -0
  703. package/web-admin/src/pages/SystemSettings.vue +281 -0
  704. package/web-admin/src/pages/SystemStatus.vue +185 -0
  705. package/web-admin/src/pages/Targets.vue +193 -0
  706. package/web-admin/src/pages/Tools.vue +1051 -0
  707. package/web-admin/src/request.ts +18 -0
  708. package/web-admin/src/router.ts +142 -0
  709. package/web-admin/src/runtime-path.ts +27 -0
  710. package/web-admin/src/schema.ts +52 -0
  711. package/web-admin/src/store.ts +35 -0
  712. package/web-admin/src/styles/base.css +272 -0
  713. package/web-admin/src/table-widths.ts +603 -0
  714. package/web-admin/src/util.ts +16 -0
  715. package/web-admin/tsconfig.json +15 -0
  716. package/web-admin/vite.config.ts +35 -0
@@ -0,0 +1,275 @@
1
+ # Changelog
2
+
3
+ This changelog records public, user-visible changes starting from the first public release.
4
+
5
+ For the current integration contract, use:
6
+
7
+ - [README.en.md](../README.en.md);
8
+ - [QUICKSTART.en.md](QUICKSTART.en.md);
9
+ - [CONTRACT.en.md](CONTRACT.en.md);
10
+ - [TOOLS.en.md](TOOLS.en.md);
11
+ - [SDK.en.md](SDK.en.md).
12
+
13
+ ## Recording Rules
14
+
15
+ Each public version should describe:
16
+
17
+ - new capabilities;
18
+ - integration impact;
19
+ - database schema changes;
20
+ - validation commands;
21
+ - related docs.
22
+
23
+ ## Unreleased
24
+
25
+ There are no unreleased changes.
26
+
27
+ ## v0.3.0 - Composable Core and Kernel Host API v1
28
+
29
+ Released on 2026-08-06.
30
+
31
+ - Added the stable `bailinghub/kernel-api/v1` export so an exact npm artifact can create, mount, drain, and stop Kernels. The standalone service now composes the same Kernel path instead of maintaining a second engine implementation.
32
+ - One process may host multiple isolated Kernels, provided each instance has a separate state database, runtime directory, configuration, and request prefix. Platform identity, tenant directories, registration, plans, billing, and cross-tenant authorization remain host control-plane responsibilities.
33
+ - Made Core Schema migration an explicit host/deployment step. The ledger gains SHA-256 digests; legacy rows are backfilled without replaying SQL. Three early retired migrations remain `replay: never` evidence and are never executed on a fresh Schema. Digest drift and unknown migrations fail closed.
34
+ - Included the Kernel API, official SQL, console assets, and artifact identity in the real npm tarball. `BAILINGHUB_CORE_ARTIFACT_V1` binds the exact version, active migrations, retired evidence, and aggregate digest for provisioning and upgrade checks.
35
+ - Prevented prerelease image tags from updating `latest`, even when a manual workflow requests it. Stable tags may update the stable channel according to release configuration.
36
+ - The standalone startup path, public Client API, chat protocol, Executor Protocol, ACC, tool signatures, approval semantics, and final business authorization are unchanged. Ecosystem adapters do not need a release solely for this composition API.
37
+ - The only database-shape change is the nullable `checksum_sha256` metadata column on `bz_schema_migrations`; there is no new business table or business field. Run `npm run db:init` before restarting.
38
+ - Validation: `npm run release:check` and a real npm `.tgz` install, including 515 Core tests, migration compatibility, composition lifecycle, multi-instance isolation, OSS boundaries, and image policy.
39
+ - Related docs: [RELEASE_NOTES_v0.3.0.en.md](RELEASE_NOTES_v0.3.0.en.md), [Kernel Host API v1](KERNEL_HOST_API.en.md), [SQL migration discipline](../sql/README.en.md), and [Architecture](ARCHITECTURE.en.md).
40
+
41
+ ## v0.2.0 - Tool Catalog Access Protection and Active Verification
42
+
43
+ Released on 2026-08-06.
44
+
45
+ - **Explicit tool-catalog access policy:** URL-backed providers expose exactly two configurable policies: `signed_required` (default and recommended) and `public_allowed` (intentional public catalog). The console shows configured intent separately from observed evidence.
46
+ - **Active protection verification:** after a valid signed read, the hub also confirms that unsigned and invalid-signature reads are rejected. A mismatch fails closed and preserves the previous cache. Public mode sends only an unsigned request and never silently falls back to a signed read.
47
+ - **Business integration impact:** a protected spec endpoint should use the same provider secret as tool calls, reject unsigned or invalid requests with 401, 403, or 404, and return `Cache-Control: private, no-store`. Deliberate public access must be explicit in both code and console. Tool calls remain signed and subject to final business authorization in either mode.
48
+ - **SDKs:** PHP and PHP7 `SpecServer` add `handlePublic()`, `respondPublic()`, and `responseHeaders()`. Protected bare-PHP responses automatically disable caching, while the older `null` public call remains compatible.
49
+ - **Database schema:** `053_tool_spec_access_policy.sql` adds policy and latest-probe columns to `bz_tool_providers`. Existing URL providers keep the previous signed-fetch behavior. They may still be disabled or updated in descriptive, governance, retrieval, and other non-catalog fields without choosing a policy; changing the catalog URL, secret, auto-refresh, re-enabling, or another catalog-sensitive setting first requires one of the two access policies. Internal migration state is documented only in [COMPATIBILITY.en.md](COMPATIBILITY.en.md#url-tool-catalog-access-policy-upgrade).
50
+ - **Validation:** run `npm run release:check`, verify that no migration is pending and cached specs are unchanged, then use the status matrix in [COMPATIBILITY.en.md](COMPATIBILITY.en.md#url-tool-catalog-access-policy-upgrade) against real business endpoints.
51
+ - **Related docs:** [RELEASE_NOTES_v0.2.0.en.md](RELEASE_NOTES_v0.2.0.en.md), [CONTRACT.en.md](CONTRACT.en.md), [INTEGRATION.en.md](INTEGRATION.en.md#publish-tools), [TOOLS.en.md](TOOLS.en.md), and [SDK.en.md](SDK.en.md).
52
+
53
+ ## v0.1.16 - Bounded Tool Runtime and Resilient Semantic Retrieval
54
+
55
+ Released on 2026-08-05.
56
+
57
+ - Made the runtime derive its bounded model rounds from each route's existing `tools.max_calls` budget. The model receives used and remaining counts after every business-tool round, is guided to converge near the limit, and loses tool access at exhaustion.
58
+ - Added a streaming and non-streaming output gate for DSML-like internal tool-protocol markup. Provisional text is discarded through `reset`, one tool-free rewrite is allowed, repeated violations fail closed, and text protocol is never parsed for execution.
59
+ - Added background index prewarming, stale-while-revalidate service, single-flight refresh, bounded index and credential reads, abortable query embeddings, and progressive tool-discovery fallback.
60
+ - Serialized same-provider reindexing, reread authoritative configuration under the lock, atomically replaced changed embedding coordinates, and added sanitized phase-latency diagnostics.
61
+ - Replaced the widget's misleading close glyph with an accessible minimize control while preserving the existing hide-and-reopen behavior.
62
+ - Added independent community governance recipes for RuoYi-Vue-Pro after-sale lookup/refund and JeecgBoot user lookup/freeze-unfreeze, including Agent-facing OpenAPI, adapter contracts, and verification scripts. They do not imply official upstream integration or endorsement.
63
+ - No database migration is required.
64
+ - ACC, the Client API version, executor protocol, tool signatures, approval semantics, and final business authorization are unchanged. Existing routes require no configuration migration. Custom chat clients should continue discarding provisional text on every `reset` and treating `done.reply` as authoritative.
65
+ - Validation: `npm run release:check` plus both community-recipe verification scripts, covering budget convergence, protocol interception, retrieval timeout fallback, cache refresh, atomic reindexing, and widget minimize behavior.
66
+ - Related docs: [RELEASE_NOTES_v0.1.16.en.md](RELEASE_NOTES_v0.1.16.en.md), [TOOLS_DESIGN.en.md](TOOLS_DESIGN.en.md), [OPERATIONS.en.md](OPERATIONS.en.md), [RuoYi-Vue-Pro recipe](integrations/ruoyi-vue-pro/README.en.md), and [JeecgBoot recipe](integrations/jeecgboot/README.en.md).
67
+
68
+ ## v0.1.15 - Trusted Rich Rendering and Chat Reliability
69
+
70
+ Released on 2026-08-01.
71
+
72
+ - Added versioned trusted-renderer registration, allowlisted dispatch, cleanup, and safe fallback to the dependency-free official widget. Model-generated HTML or scripts are never executed.
73
+ - Added presentation-only client capability negotiation. It does not change identity, routing, tools, approval, or final business authorization.
74
+ - Made `delta` provisional, `reset` discard it, and `done.reply` replace the provisional bubble as the only authoritative final text.
75
+ - Bounded additional tool discovery and stopped it when no new tools are found. Tool error pages are compacted for model context while full evidence remains in audit, and LLM traces include low-sensitivity latency and size measurements.
76
+ - No database migration is required.
77
+ - Existing clients are unchanged. Custom clients enabling rich content must advertise capabilities explicitly and implement the complete SSE lifecycle and trusted-rendering boundary.
78
+ - Validation: `npm run release:check`, including renderer registration/fallback/cleanup, capability negotiation, provisional-message replacement, and custom-client example syntax.
79
+ - Related docs: [RELEASE_NOTES_v0.1.15.en.md](RELEASE_NOTES_v0.1.15.en.md), [WIDGET_RENDERERS.en.md](WIDGET_RENDERERS.en.md), [STREAMING.md](STREAMING.md), and [INTEGRATION.en.md](INTEGRATION.en.md).
80
+
81
+ ## v0.1.14 - Transient Progress Feedback for Streaming Chat
82
+
83
+ Released on 2026-07-30.
84
+
85
+ - The official web widget promotes a short pre-tool acknowledgement into a transient progress bubble and shows explicit tool, model, retry, and fallback phases.
86
+ - The transient bubble is removed as soon as the formal streamed answer begins. Only the formal answer remains in chat history.
87
+ - The feature presents model-authored acknowledgement text and runtime phases only; it does not expose hidden reasoning. Progress copy is whitespace-normalized and length-bounded.
88
+ - Progress animation respects `prefers-reduced-motion`, and failed or background-processing states use deterministic copy.
89
+ - No database migration is required.
90
+ - Client API, streaming event protocol, executor protocol, tool signatures, approval semantics, and ACC are unchanged. The official widget adopts the behavior automatically; custom chat UIs must consume the existing `delta`, `reset`, `phase`, and `done` events themselves.
91
+ - Validation: `node --check web/widget/widget.js`, targeted public-route widget tests, `npm run typecheck`, and `npm run release:check`.
92
+ - Related docs: [RELEASE_NOTES_v0.1.14.en.md](RELEASE_NOTES_v0.1.14.en.md), [independent validation](INDEPENDENT_VALIDATION.en.md), and [CONTRACT.en.md](CONTRACT.en.md).
93
+
94
+ ## v0.1.13 - Voice Transcription and Distribution-Version Alignment
95
+
96
+ Released on 2026-07-30.
97
+
98
+ - Carried forward the `v0.1.12` explicit `transcribe`, `inline`, and `off` policies, dedicated speech-model transcription, and fail-closed boundary without changing their semantics.
99
+ - Aligned the one-line installer, image Compose file, image publishing and inspection scripts, independent-validation baseline, and Issue template on `v0.1.13`.
100
+ - Made release distribution checks compare the package version, installer fallback, default Compose images, and public validation docs so a stale entry point cannot silently pull an older image.
101
+ - No database migration is required.
102
+ - Client API, executor protocol, tool signatures, approval semantics, speech policies, and ACC are unchanged. `v0.1.12` users need no configuration migration.
103
+ - Validation: `npm run release:check`, distribution-sync dry-run, official image-tag inspection, and one-line installer entry-point review.
104
+ - Related docs: [RELEASE_NOTES_v0.1.13.en.md](RELEASE_NOTES_v0.1.13.en.md), [independent validation](INDEPENDENT_VALIDATION.en.md), and [COMPATIBILITY.en.md](COMPATIBILITY.en.md).
105
+
106
+ ## v0.1.12 - Voice Transcription Policy and Fail-Closed Audio Handling
107
+
108
+ Released on 2026-07-30.
109
+
110
+ - Added explicit `transcribe`, `inline`, and `off` audio modes. Missing configuration defaults to `off` instead of guessing whether the main model supports audio.
111
+ - Made missing, disabled, or unresolved transcription configuration fail closed with deterministic guidance. Audio is not forwarded to the main model and content is never guessed.
112
+ - Added both `/audio/transcriptions` multipart and `/chat/completions` Data URL `input_audio` protocol support.
113
+ - Added the speech protocol selector to the route console and aligned the machine-readable configuration schema.
114
+ - Speech audits record mode, protocol, model, MIME type, byte count, and outcome without retaining audio bodies, Data URLs, or credentials.
115
+ - No database migration is required.
116
+ - Text chat, Client API, executor protocol, tool signatures, approval semantics, and ACC are unchanged. Routes that relied on implicit audio forwarding must explicitly select `inline` or configure `transcribe`.
117
+ - Validation: `npm run typecheck`, `npm test`, `npm run web-admin:check`, `npm run release:check`, plus an end-to-end MP3 transcription and streaming-response run.
118
+ - Related docs: [RELEASE_NOTES_v0.1.12.en.md](RELEASE_NOTES_v0.1.12.en.md), [TOOLS_DESIGN.en.md](TOOLS_DESIGN.en.md), and [COMPATIBILITY.en.md](COMPATIBILITY.en.md).
119
+
120
+ ## v0.1.11 - Side-Effect Execution Journal and Uncertain-Outcome Freezing
121
+
122
+ Released on 2026-07-28.
123
+
124
+ - Persisted `dispatching` before outbound delivery for non-read-only, non-idempotent business tools, `response_recorded` after the HTTP response, and `completed` only after the result audit and terminal task ledger succeed.
125
+ - Made timeout, disconnect, restart recovery, result-audit failure, and terminal-ledger failure converge to `reconciliation_required` with `auto_retry_allowed=false`. Recovery scans unresolved execution entries before the model runs again.
126
+ - Added the stable `X-Bailing-Idempotency-Key`, bound to the task, acting subject, tool, and canonical arguments for business-side deduplication and reconciliation. It does not replace signature verification or final business authorization.
127
+ - Applied the same durable boundary to `send_message`; partial text, card, or attachment delivery is frozen instead of replayed automatically.
128
+ - Added `052_tool_execution_journal.sql`, extending the existing tool-call deduplication ledger into a recoverable execution journal.
129
+ - Read-only and explicitly idempotent tools keep their existing behavior. Deployments must apply the new migration, and business systems should consume the stable idempotency key for side-effect deduplication.
130
+ - Validation: `npm run typecheck`, `npm test`, `npm run web-admin:check`, `npm run docs:check`, `npm run examples:check`, `npm run security:scan`, and `npm run release:check`.
131
+ - Related docs: [RELEASE_NOTES_v0.1.11.en.md](RELEASE_NOTES_v0.1.11.en.md), [TOOLS_DESIGN.en.md](TOOLS_DESIGN.en.md), [CONTRACT.en.md](CONTRACT.en.md), and [COMPATIBILITY.en.md](COMPATIBILITY.en.md).
132
+
133
+ ## v0.1.10 - Instance Branding and Ecosystem Integration Improvements
134
+
135
+ Released on 2026-07-27.
136
+
137
+ - Added console-managed site name, browser title, description, keywords, login copy, logo, and favicon for administrators with `admins:manage`. Values persist in `bz_instance_branding` across upgrades and restarts.
138
+ - Added a replaceable `InstanceBrandingProvider` boundary. The open-source edition uses local storage; a future platform may become the single owner and make instance-local settings read-only without dual writes.
139
+ - Added public `GET /branding` and logo/favicon asset endpoints that expose display data only. Image formats are detected from bytes and bounded by type and size.
140
+ - Improved model-ID diagnostics when a failed identifier contains whitespace. Added a Tencent Cloud TokenHub preset and the exact `kimi-k3` ID while preserving valid custom aliases.
141
+ - Added bilingual DeepSeek V4 tool-calling E2E and Alibaba Cloud Bailian remote-MCP recipes with verification scripts.
142
+ - Added `051_instance_branding.sql`, which creates only the singleton instance-branding table.
143
+ - Client API, executor protocol, tool signatures, approval semantics, and ACC are unchanged. Existing deployments retain default branding after upgrade.
144
+ - Validation: `npm run typecheck`, `npm test`, `npm run web-admin:check`, `npm run docs:check`, `npm run security:scan`, and `npm run release:check`.
145
+ - Related docs: [RELEASE_NOTES_v0.1.10.en.md](RELEASE_NOTES_v0.1.10.en.md), [COMPATIBILITY.en.md](COMPATIBILITY.en.md), [DeepSeek integration](integrations/deepseek/README.en.md), and [Alibaba Cloud Bailian MCP integration](integrations/bailian/README.en.md).
146
+
147
+ ## v0.1.9 - Optional OpenMetrics Operational Metrics
148
+
149
+ Released on 2026-07-24.
150
+
151
+ - Added an optional `GET /metrics` OpenMetrics endpoint. It is disabled by default and requires a dedicated Bearer token when enabled; query-string tokens and reuse of the administrative root token are rejected.
152
+ - Added stable, low-cardinality operational metrics for job states, recent terminal outcomes, oldest queue age, delayed jobs, expired leases, blocked threads, pending approvals, executor heartbeat state, audit-write failures, runtime pause state, and collector health. Job, tenant, principal, argument, and business-payload labels are never emitted.
153
+ - Isolated and bounded state and control-plane collectors independently. A failed collector does not suppress remaining metrics, and external state/config implementations may continue omitting the new optional aggregation methods.
154
+ - Added `050_operational_metrics_indexes.sql`, containing only indexes for terminal-window and executor-heartbeat aggregation.
155
+ - Default behavior is unchanged. Client API, executor protocol, tool signatures, and ACC semantics are unchanged. Only deployments enabling `/metrics` need the three `BAILING_METRICS_*` variables.
156
+ - Validation: `npm run typecheck`, `npm test`, `npm run docs:check`, `npm run security:scan`, and `npm run release:check`.
157
+ - Related docs: [RELEASE_NOTES_v0.1.9.en.md](RELEASE_NOTES_v0.1.9.en.md), [OPERATIONS.en.md](OPERATIONS.en.md), and [COMPATIBILITY.en.md](COMPATIBILITY.en.md).
158
+
159
+ ## v0.1.8 - Create-Once Initial Administrator Bootstrap
160
+
161
+ Released on 2026-07-24.
162
+
163
+ - Added paired `BAILING_BOOTSTRAP_ADMIN_USERNAME` and `BAILING_BOOTSTRAP_ADMIN_PASSWORD` settings. The account is created only when the admin table is empty. Restarts, upgrades, and container recreation against the same database never update an existing username, password, role, or enabled state.
164
+ - Serialized concurrent multi-replica bootstrap with a MySQL named lock and transaction. Startup fails if the initialization lock cannot be acquired instead of continuing from an uncertain state.
165
+ - Kept `npm run admin:create` as the explicit account-creation and password-reset command. The automatic startup path never invokes it. Demo seeding now uses the same create-once contract, no longer resets an admin password during restart, and does not print passwords in service logs.
166
+ - No database migration or public API, executor, tool-signature, or ACC semantic change is required. The two bootstrap variables must be configured together. Reinstallation with the same database preserves the account; a destructive fresh database installation creates a new initial account.
167
+ - Validation: `npm run typecheck`, `npm test`, `npm run security:scan`, plus real-MySQL checks for first creation, restart persistence after a password change, concurrent cold starts, and log redaction.
168
+ - Continuous regression: Docker demo CI changes the administrator password explicitly in real MySQL, restarts the container, and verifies bootstrap configuration did not overwrite the stored credential.
169
+ - Password-update compatibility: when no role is supplied, the administrator repository uses `admin` only as the insert default while preserving the role of an existing account, avoiding a MySQL non-null rejection before duplicate-key update.
170
+ - Related docs: [RELEASE_NOTES_v0.1.8.en.md](RELEASE_NOTES_v0.1.8.en.md), [QUICKSTART.en.md](QUICKSTART.en.md), and [OPERATIONS.en.md](OPERATIONS.en.md).
171
+
172
+ ## v0.1.7 - Versioned Client API and Cross-Ecosystem Compatibility Gates
173
+
174
+ Released on 2026-07-23.
175
+
176
+ - Added `bailing.client-api.v1`, with a manifest, JSON Schemas, and behavioral vectors for `/health`, `/run`, `/jobs/{job_id}`, authentication, error classes, and job statuses.
177
+ - Added bidirectional compatibility gates: core CI validates the Dify and n8n adapters, while adapter CI validates the target core branch.
178
+ - Made the public Client API strictly validate top-level fields, route, metadata, callback URL, request id, and input length. The authenticated client identity, rather than request data, determines the source.
179
+ - Kept OpenClaw and portable executors outside the Client API. They continue to use the separate claim, heartbeat, lease, and result-submission protocol.
180
+ - No database migration is required. Documented clients remain compatible; informal integrations that use undeclared top-level fields must remove those fields.
181
+ - Validation: `npm run client-api:contract`, `npm run client-api:ecosystem:local`, `npm run client-api:ecosystem:clone`, `npm run typecheck`, `npm test`, and `npm run release:check`.
182
+ - Related docs: [RELEASE_NOTES_v0.1.7.en.md](RELEASE_NOTES_v0.1.7.en.md) and [CLIENT_API.md](CLIENT_API.md).
183
+
184
+ ## v0.1.6 - Independent Validation Paths and Post-Install Privilege Hints
185
+
186
+ Released on 2026-07-21.
187
+
188
+ - Made the fresh Ubuntu/Debian one-line installer the recommended core independent-validation path while retaining a complete local source-reproduction path.
189
+ - Made the installer print either `docker compose` or `sudo docker compose` according to the current session's actual Docker access, avoiding immediate socket-permission failures before new group membership takes effect.
190
+ - Clarified that validation must not run on a production host, production network, or Docker environment with important data, and that reports must exclude passwords, tokens, complete `.env` files, and production data.
191
+ - Split the independent-validation Issue tracks into one-line installer, source Docker, Dify, and executor paths. A commit SHA is required only for source reproduction.
192
+ - Existing deployments require no migration. Public HTTP contracts, SDKs, signature formats, ACC semantics, database schemas, and business-image runtime behavior are unchanged.
193
+ - Validation: `sh -n scripts/install.sh`, `npm run docs:check`, `npm run release:check`, plus an isolated Ubuntu 24.04 installation covering privilege hints, health, the 10-check smoke suite, the complete demo E2E flow, and cleanup boundaries.
194
+ - Related docs: [RELEASE_NOTES_v0.1.6.en.md](RELEASE_NOTES_v0.1.6.en.md) and [INDEPENDENT_VALIDATION.en.md](INDEPENDENT_VALIDATION.en.md).
195
+
196
+ ## v0.1.5 - Reliable One-Line Installer Arguments and Clean-Server Compatibility
197
+
198
+ Released on 2026-07-21.
199
+
200
+ - Fixed custom installer arguments so install mode, ports, public host, registry overrides, install directory, and repository reference are attached to the `sh` process that executes the installer rather than only to `curl`.
201
+ - Improved clean-server dependency setup by detecting whether the configured apt repository provides `docker-compose-plugin` or `docker-compose-v2` before installing Docker Compose.
202
+ - Stopped presenting a private address as a remote access URL when public-address discovery fails. The installer now explains when `localhost` must be replaced and continues to support an explicit `BAILING_PUBLIC_HOST`.
203
+ - Added a release regression guard that scans public scripts and docs for installer commands that attach `BAILING_*` variables to the downloader instead of the installer process.
204
+ - The default one-line install command is unchanged. Custom commands should use `curl ... | env BAILING_*=... sh`. Public HTTP contracts, SDKs, signature formats, and database schemas are unchanged.
205
+ - Validation: `sh -n scripts/install.sh`, `npm run docs:check`, and `npm run release:check`, plus default and custom-argument installs on a clean Ubuntu 24.04 server, the 10-check smoke suite, the complete demo E2E flow, and restart persistence.
206
+ - Related docs: [RELEASE_NOTES_v0.1.5.en.md](RELEASE_NOTES_v0.1.5.en.md), [QUICKSTART.en.md](QUICKSTART.en.md), and [DEMO.en.md](DEMO.en.md).
207
+
208
+ ## v0.1.4 - Real Web Chat Streaming and Reconnectable SSE
209
+
210
+ Released on 2026-07-20.
211
+
212
+ - Added real incremental output for embedded chat when an `llm` target uses an OpenAI-compatible streaming endpoint.
213
+ - Added `bailing.chat.stream.v1` events (`phase`, `reset`, and `delta`), monotonic per-job event IDs, `Last-Event-ID` replay, and a bounded short-lived replay window.
214
+ - Incremental text is transport-only. Conversation history, callbacks, delivery, and audit do not persist every fragment; the canonical `done` event is always rebuilt from the final job record.
215
+ - A provider is retried once without streaming only when it explicitly rejects streaming. Trace records chunk counts, character counts, finish reason, and first-fragment latency without recording fragment text.
216
+ - Existing clients may ignore the new events and continue consuming `done`. Set `target_config.streaming` to `false` to disable provider streaming. No database migration is required.
217
+ - Validation: `npm run typecheck`, `npm test`, `npm --prefix web-admin run build`, and `npm run docs:check`.
218
+ - Related docs: [RELEASE_NOTES_v0.1.4.en.md](RELEASE_NOTES_v0.1.4.en.md), [STREAMING.en.md](STREAMING.en.md), [CONTRACT.en.md](CONTRACT.en.md), and [OPERATIONS.en.md](OPERATIONS.en.md).
219
+
220
+ ## v0.1.3 - Portable Executor Onboarding and OpenClaw Adapter
221
+
222
+ Released on 2026-07-17.
223
+
224
+ - Added the portable `connect-bailinghub-executor` Skill, covering installation decisions, token handling, the generic command wrapper, the OpenClaw recipe, the direct protocol, and explicit acceptance criteria.
225
+ - Replaced the long console copy block with a minimal bootstrap containing only the hub URL, target, route context, and Skill URL. The receiving agent reads the Skill and confirms the local setup without putting the executor token in chat.
226
+ - Added the dependency-free `openclaw-stdio.mjs` adapter, which maps BailingHub jobs to local OpenClaw agent calls, preserves session continuity, and writes only the final response to stdout.
227
+ - The generic executor now prefers `BAILING_EXECUTOR_TOKEN`, keeps `--token` for compatibility, reports an independent heartbeat during long jobs, and returns `claim_token` so the hub can reject stale results after reassignment.
228
+ - No database migration is required. `/run`, SDKs, signature formats, and existing executor HTTP endpoints are unchanged. Existing `--token` commands remain compatible, while local environment variables or a secret manager are recommended.
229
+ - Validation: `npm run typecheck`, `npm test`, `npm --prefix web-admin run build`, `npm run release:check`, plus a representative OpenClaw end-to-end run.
230
+ - Related docs: [RELEASE_NOTES_v0.1.3.en.md](RELEASE_NOTES_v0.1.3.en.md), [QUICKSTART.en.md](QUICKSTART.en.md), and [INTEGRATION.en.md](INTEGRATION.en.md).
231
+
232
+ ## v0.1.2 - Server Token and Derived Credential Hardening
233
+
234
+ Released on 2026-07-17.
235
+
236
+ - Removed the public literal fallback from task tool tokens, job callbacks, and alert webhook signatures. Signing paths now fail closed when the root token is missing.
237
+ - Only development mode bound to a loopback host may run without a token. Production or non-loopback listeners require an explicit non-placeholder `BAILING_TOKEN` of at least 24 characters.
238
+ - Source and image Compose files no longer provide a predictable machine-admin token. The docs generate a random value, while the one-line installer continues to generate and persist one automatically.
239
+ - The tokenless development-admin fallback is also restricted to loopback mode, and the security scanner rejects legacy fallback expressions and predictable Compose admin tokens.
240
+ - Public HTTP, SDK, signature format, and database contracts are unchanged. Existing production or externally reachable deployments must set a strong `BAILING_TOKEN` before upgrading.
241
+ - Validation: `npm run typecheck`, `npm test`, `npm run security:scan`, and `npm run release:check`.
242
+ - Related docs: [RELEASE_NOTES_v0.1.2.en.md](RELEASE_NOTES_v0.1.2.en.md), [SECURITY.md](../SECURITY.md), and [QUICKSTART.en.md](QUICKSTART.en.md).
243
+
244
+ ## v0.1.1 - Widget Operations and Stricter Integration Boundaries
245
+
246
+ Released on 2026-07-13.
247
+
248
+ - Chat entries can be paused or resumed from the console without removing embed code. Disabled entries hide the launcher and panel while server endpoints continue to reject access.
249
+ - Widget footer attribution can be shown, hidden, or customized. Existing entries keep the current BailingHub attribution by default.
250
+ - OpenAPI compilation fails closed for `cookie`, unknown, or missing parameter locations instead of silently mapping them to query. ACC `timeout_ms` remains integer-only, with an actionable diagnostic for quoted numeric strings.
251
+ - Application images publish to both Aliyun ACR and GHCR. GitHub main and release tags mirror to Gitee, README images render on both platforms, and community derivative and ecosystem collaboration principles are documented.
252
+ - Existing chat entries and public contracts remain compatible. Attribution reuses the existing `appearance` JSON, so no database migration is required.
253
+ - Validation: `npm run typecheck`, `npm test`, `npm --prefix web-admin run build`, and `npm run release:check`.
254
+ - Related docs: [RELEASE_NOTES_v0.1.1.en.md](RELEASE_NOTES_v0.1.1.en.md), [CHANNELS.en.md](CHANNELS.en.md), and [CONTRACT.en.md](CONTRACT.en.md).
255
+
256
+ ## v0.1.0 - First Public Release Candidate
257
+
258
+ `v0.1.0` is the first public release candidate. It is intended for self-hosted evaluation, small pilot integrations, and architecture review.
259
+
260
+ Included:
261
+
262
+ - trigger routes;
263
+ - MySQL-backed runtime state;
264
+ - DB-backed job scheduling and lease recovery;
265
+ - tool providers and OpenAPI `x-agent-capability` governance metadata;
266
+ - centralized rate-limit ledger;
267
+ - approval intent and frozen argument snapshots;
268
+ - audit and trace records;
269
+ - Docker demo and demo business app;
270
+ - PHP, PHP 7, Node, and Python SDK examples;
271
+ - official website docs and one-line installer;
272
+ - OSS export guard, docs checks, example checks, and release audit scripts.
273
+ - ACC operation timeouts are preserved from 1 to 600000 milliseconds and rejected when out of range; audit write failures emit redacted structured events with a process-local `/health` counter; model credential source conflicts are diagnosed while traces record only the non-secret `config` or `db` source.
274
+
275
+ Production deployments still need environment-specific domain, TLS, backups, monitoring, secret management, credential rotation, and approval workflow integration.
@@ -0,0 +1,279 @@
1
+ # 百灵中枢 · 发布记录
2
+
3
+ > 这份文档从首个公开版本开始记录对外可见的版本变化。
4
+ > 当前版本的完整能力与对接方式,以 `README.md`、`docs/CONTRACT.md`、`docs/第三方对接指南.md` 为准。
5
+
6
+ ## 记录规则
7
+
8
+ 每个公开版本至少说明:
9
+
10
+ - **新增能力**:新增的端点、控制台能力、工具注解、SDK 能力;
11
+ - **对接影响**:业务侧是否需要调整请求、回调、验签、OpenAPI 注解或控制台配置;
12
+ - **数据库结构**:是否新增表、字段、索引;
13
+ - **验证方式**:部署方如何确认该版本运行正常;
14
+ - **相关文档**:对应的契约、指南或示例。
15
+
16
+ ## Unreleased
17
+
18
+ 当前无待发布变更。
19
+
20
+ ## v0.3.0 - 可组合 Core 与 Kernel Host API v1
21
+
22
+ 发布日期:2026-08-06。
23
+
24
+ - **正式组合入口**:新增稳定导出 `bailinghub/kernel-api/v1`,宿主可以从精确 npm 制品创建、挂载、排空和停止 Kernel;独立服务也改为装配同一 Kernel 路径,不维护第二套运行内核。
25
+ - **多实例边界**:同一进程可托管多个隔离 Kernel,但每个实例必须拥有独立状态库、运行目录、配置和请求前缀。平台身份、租户目录、注册、套餐、计费及跨租户授权仍由宿主控制面负责,不进入开源 Core。
26
+ - **官方迁移器**:Schema 迁移从启动副作用收敛为宿主显式步骤;账本增加 SHA-256,旧记录只补摘要、不重放 SQL。三条早期退役迁移作为 `replay: never` 证据保留,fresh Schema 永不执行;摘要漂移和未知迁移失败关闭。
27
+ - **精确制品**:npm tarball 包含 Kernel API、官方 SQL、控制台静态资源及制品描述;`BAILINGHUB_CORE_ARTIFACT_V1` 固定版本、活动迁移、退役证据与整体摘要,供开通和升级编排校验。
28
+ - **镜像发布安全**:预发布标签即使被手工请求也不能更新 `latest`;稳定标签才可按发布配置更新稳定通道。
29
+ - **对接影响**:普通自托管启动方式、公开 Client API、聊天协议、Executor Protocol、ACC、工具签名、审批语义和业务系统最终授权不变;生态适配器无需因本次组合 API 升级版本。
30
+ - **数据库结构**:只为 `bz_schema_migrations` 增加可空 `checksum_sha256` 元数据列,不新增业务表或业务字段。升级先运行 `npm run db:init`,成功后再重启。
31
+ - **验证方式**:`npm run release:check` 和真实 npm `.tgz` 安装检查,覆盖 515 项核心测试、迁移兼容、组合生命周期、多实例隔离、OSS 边界和镜像策略。
32
+ - **相关文档**:[RELEASE_NOTES_v0.3.0.md](RELEASE_NOTES_v0.3.0.md)、[Kernel Host API v1](KERNEL_HOST_API.md)、[SQL 迁移纪律](../sql/README.md) 与 [架构说明](ARCHITECTURE.md)。
33
+
34
+ ## v0.2.0 - 工具清单访问保护与主动核验
35
+
36
+ 发布日期:2026-08-06。
37
+
38
+ - **工具清单访问策略显式化**:URL 工具源只提供 `signed_required`(默认、推荐)和 `public_allowed`(明确接受公开)两项可配置策略。控制台分别显示管理员期望与最近一次实测证据,不再把“配置了签名”当作“已经验证受保护”。
39
+ - **受保护清单主动核验**:正确签名请求成功后,中枢还会验证未签名与错误签名请求均被业务侧拒绝;不满足时失败关闭并保留旧缓存。公开模式只发未签名请求,不会偷偷回退签名。
40
+ - **业务侧对接影响**:推荐业务系统使用与工具调用相同的工具源密钥保护 spec GET,并对未签名/错误签名返回 401、403 或 404;受保护响应必须发送 `Cache-Control: private, no-store`。确需公开时必须在代码和控制台两侧显式选择,工具调用仍然继续验签和执行最终业务授权。
41
+ - **SDK**:PHP / PHP7 `SpecServer` 新增 `handlePublic()`、`respondPublic()` 和 `responseHeaders()`;受保护的裸 PHP 响应自动禁止缓存,旧 `null` 公开调用保持兼容。
42
+ - **数据库结构**:新增 `053_tool_spec_access_policy.sql`,为 `bz_tool_providers` 增加访问策略和最近探针字段。历史 URL 工具源继续沿用旧式签名拉取,不会因升级中断;停用或修改说明、治理、检索等非清单字段不强迫选择策略,只有修改清单地址、密钥、自动刷新或重新启用等清单敏感动作才须先从两项访问策略中确认一项。内部迁移状态只在[兼容性与升级](兼容性与升级.md#十url-工具清单访问策略升级)说明。
43
+ - **验证方式**:`npm run release:check`;升级后确认迁移无待执行、历史来源缓存未变化,并按 [兼容性与升级](兼容性与升级.md#十url-工具清单访问策略升级) 的状态矩阵验证业务端点。
44
+ - **相关文档**:[RELEASE_NOTES_v0.2.0.md](RELEASE_NOTES_v0.2.0.md)、[公开运行时契约](CONTRACT.md)、[第三方对接指南](第三方对接指南.md#63-发布接口清单--后台注册)、[工具治理设计](TOOLS_DESIGN.md)、[PHP SDK](../sdk/php/README.md) 与 [PHP7 SDK](../sdk/php7/README.md)。
45
+
46
+ ## v0.1.16 - 工具运行时收敛与语义检索韧性
47
+
48
+ 发布日期:2026-08-05。
49
+
50
+ - **路由预算真正收敛**:运行时按每条路由既有的 `tools.max_calls` 推导有界模型轮次,并在每轮业务工具执行后告知模型已用和剩余次数;接近上限时优先形成答案,耗尽后移除工具并强制进入最终回答。
51
+ - **内部协议输出闸**:流式和非流式回答都会拦截 DSML 等内部工具协议标记;临时文本通过 `reset` 清除,只允许一次不带工具的安全重写,连续违规失败关闭,文本协议永不解析执行。
52
+ - **语义检索韧性**:启动后后台预热,过期缓存继续服务并单飞刷新;索引/凭证读取和查询向量请求使用独立时限,异常时退回渐进式工具发现。
53
+ - **索引一致性与诊断**:同源重建串行执行并在锁内重读权威配置;embedding 坐标变化时原子替换整源索引;新增不含查询正文、服务地址或凭证的分阶段耗时诊断。
54
+ - **Widget 最小化语义**:右上角原关闭图标改为最小化图标和无障碍标签,隐藏与重新打开面板的既有功能不变。
55
+ - **社区接入配方**:新增 RuoYi-Vue-Pro 售后查询/退款与 JeecgBoot 用户查询/冻结解冻的独立社区治理配方,包含 Agent-facing OpenAPI、适配契约和验证脚本;不代表上游官方集成或认可。
56
+ - **数据库结构**:无迁移。
57
+ - **对接影响**:ACC、Client API 版本、执行器协议、工具签名、审批语义和业务最终授权不变;既有路由无需修改。自建聊天客户端继续把任何 `reset` 视为清空临时文本,并以 `done.reply` 为权威最终回答。
58
+ - **验证方式**:`npm run release:check`,并执行两项社区配方验证脚本,覆盖预算收敛、协议拦截、检索超时降级、缓存刷新、原子重建及 Widget 最小化。
59
+ - **相关文档**:[RELEASE_NOTES_v0.1.16.md](RELEASE_NOTES_v0.1.16.md)、[TOOLS_DESIGN.md](TOOLS_DESIGN.md)、[OPERATIONS.md](OPERATIONS.md)、[RuoYi-Vue-Pro 配方](integrations/ruoyi-vue-pro/README.md)、[JeecgBoot 配方](integrations/jeecgboot/README.md)。
60
+
61
+ ## v0.1.15 - 可信富内容渲染与聊天可靠性
62
+
63
+ 发布日期:2026-08-01。
64
+
65
+ - **可信富内容扩展**:官方 Widget 新增版本化渲染器注册、白名单分发、资源清理和失败回退;核心继续零依赖,不执行模型生成的 HTML 或脚本。
66
+ - **展示能力协商**:聊天客户端可声明本地实际支持的渲染类型;该信息只影响可选呈现提示,不改变身份、路由、工具、审批或业务授权。
67
+ - **流式等待体验**:`delta` 显示临时进度,`reset` 清空,`done.reply` 替换临时气泡并成为唯一最终文本。
68
+ - **运行时收敛**:追加工具检索设置独立上限且无新增时提前停止;工具错误页向模型压缩、向审计保留完整证据;LLM trace 补充低敏耗时与规模指标。
69
+ - **数据库结构**:无迁移。
70
+ - **对接影响**:旧客户端行为不变;自建客户端如启用富内容,需要显式能力自报并实现完整 SSE 生命周期和安全渲染边界。
71
+ - **验证方式**:`npm run release:check`,并覆盖渲染器注册/降级/清理、能力协商、临时消息替换和自建客户端范例。
72
+ - **相关文档**:[RELEASE_NOTES_v0.1.15.md](RELEASE_NOTES_v0.1.15.md)、[WIDGET_RENDERERS.md](WIDGET_RENDERERS.md)、[STREAMING.md](STREAMING.md)、[第三方对接指南.md](第三方对接指南.md)。
73
+
74
+ ## v0.1.14 - 流式对话阶段性进度提示
75
+
76
+ 发布日期:2026-07-30。
77
+
78
+ - **展示阶段性反馈**:官方网页组件会把模型在调用工具前给出的简短确认语临时提升为进度气泡,并在工具调用、模型整理、重试或回退阶段展示明确状态。
79
+ - **正式回答开始即收口**:一旦最终回答开始流式输出,临时进度气泡立即移除;聊天记录只保留正式答案,不把阶段性提示当作第二条助手消息持久化。
80
+ - **明确认知边界**:该能力只展示模型主动输出的短暂确认语和运行阶段,不暴露内部推理过程;进度文本会规范空白并限制长度。
81
+ - **可访问性**:进度动画遵循 `prefers-reduced-motion`,失败与后台处理中状态使用确定性文案。
82
+ - **数据库结构**:无迁移。
83
+ - **对接影响**:Client API、流式事件协议、执行器协议、工具签名、审批语义和 ACC 均不变。官方组件自动获得新行为;自定义聊天界面需自行消费既有 `delta`、`reset`、`phase` 与 `done` 事件。
84
+ - **验证方式**:`node --check web/widget/widget.js`、公开路由组件测试、`npm run typecheck` 与 `npm run release:check`。
85
+ - **相关文档**:[RELEASE_NOTES_v0.1.14.md](RELEASE_NOTES_v0.1.14.md)、[独立验证任务卡](INDEPENDENT_VALIDATION.md)、[公开运行时契约](CONTRACT.md)。
86
+
87
+ ## v0.1.13 - 语音转写与分发版本一致性
88
+
89
+ 发布日期:2026-07-30。
90
+
91
+ - **承接 v0.1.12 语音修复**:保留显式 `transcribe`、`inline`、`off` 策略、专用语音模型转写和失败关闭边界,不改变已发布协议语义。
92
+ - **统一安装版本来源**:一键安装脚本、镜像 Compose、镜像发布脚本、镜像检查脚本、独立验证基线和 Issue 模板统一指向 `v0.1.13`。
93
+ - **阻止入口版本漂移**:正式分发校验会同时核对包版本、安装脚本兜底值、Compose 默认镜像和公开验证文档,避免某个入口仍拉取旧镜像。
94
+ - **数据库结构**:无迁移。
95
+ - **对接影响**:Client API、执行器协议、工具签名、审批语义、语音策略和 ACC 均不变;`v0.1.12` 使用者无需配置迁移。
96
+ - **验证方式**:`npm run release:check`、正式分发同步 dry-run、官方镜像标签检查和一键安装入口复核。
97
+ - **相关文档**:[RELEASE_NOTES_v0.1.13.md](RELEASE_NOTES_v0.1.13.md)、[独立验证任务卡](INDEPENDENT_VALIDATION.md)、[兼容性与升级.md](兼容性与升级.md)。
98
+
99
+ ## v0.1.12 - 语音转写策略与失败关闭
100
+
101
+ 发布日期:2026-07-30。
102
+
103
+ - **音频处理改为显式策略**:LLM 路由支持 `transcribe`、`inline` 和 `off`;缺少配置时默认关闭,不再猜测主模型是否支持音频。
104
+ - **转写链路失败关闭**:转写凭证、模型或端点缺失、禁用或无法解析时,任务返回确定性提示,不会把音频退回给主模型,也不会猜测音频内容。
105
+ - **双协议转写适配**:支持 `/audio/transcriptions` multipart 请求,以及 `/chat/completions` 的 Data URL `input_audio` 请求。
106
+ - **控制台与 Schema 对齐**:路由页新增语音协议选择,配置 Schema 同步约束协议枚举和默认值。
107
+ - **审计边界**:记录模式、协议、模型、MIME 类型、字节数和结果,不记录音频正文、Data URL 或凭证。
108
+ - **数据库结构**:无迁移。
109
+ - **对接影响**:文本聊天、Client API、执行器协议、工具签名、审批语义和 ACC 不变;依赖隐式音频直传的路由需显式选择 `inline` 或配置 `transcribe`。
110
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm run web-admin:check`、`npm run release:check`,并完成真实 MP3 到专用语音模型、主模型流式回复和任务终态的端到端验证。
111
+ - **相关文档**:[RELEASE_NOTES_v0.1.12.md](RELEASE_NOTES_v0.1.12.md)、[工具治理设计](TOOLS_DESIGN.md)、[兼容性与升级.md](兼容性与升级.md)。
112
+
113
+ ## v0.1.11 - 副作用执行日志与不确定结果冻结
114
+
115
+ 发布日期:2026-07-28。
116
+
117
+ - **副作用执行日志改为外发前占位**:非只读、非声明幂等的业务工具在请求外发前持久化 `dispatching`,收到响应后记录 `response_recorded`,结果审计与终态落账完成后才进入 `completed`。
118
+ - **不确定结果禁止自动重放**:超时、断连、重启遗留、结果审计失败和终态提交失败会收敛到 `reconciliation_required`,并明确 `auto_retry_allowed=false`;任务恢复在模型运行前扫描未决记录。
119
+ - **稳定业务幂等键**:副作用业务请求新增 `X-Bailing-Idempotency-Key`,稳定绑定任务、主体、工具与规范化参数,供业务侧去重和人工对账;该键不替代验签或业务授权。
120
+ - **内置消息发送纳入同一安全边界**:`send_message` 在外发前写执行日志;文本分片、卡片或附件部分送达后失败时冻结整次发送,不自动重发。
121
+ - **数据库结构**:新增 `052_tool_execution_journal.sql`,把原工具调用去重账本扩展为可恢复的执行日志。
122
+ - **对接影响**:只读和显式声明幂等的业务工具行为不变。副作用工具必须使用持久化执行日志;旧部署升级时需执行新增迁移。业务系统建议接收并使用稳定幂等键。
123
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm run web-admin:check`、`npm run docs:check`、`npm run examples:check`、`npm run security:scan`、`npm run release:check`。
124
+ - **相关文档**:[RELEASE_NOTES_v0.1.11.md](RELEASE_NOTES_v0.1.11.md)、[工具治理设计](TOOLS_DESIGN.md)、[公开运行时契约](CONTRACT.md)、[兼容性与升级.md](兼容性与升级.md)。
125
+
126
+ ## v0.1.10 - 实例品牌设置与生态接入完善
127
+
128
+ 发布日期:2026-07-27。
129
+
130
+ - **新增实例品牌设置**:具有 `admins:manage` 权限的管理员可在控制台维护网站名称、浏览器标题、描述、关键词、登录页文案、Logo 与 favicon;设置持久化到 `bz_instance_branding`,升级与重启不会覆盖。
131
+ - **建立可替换管理边界**:控制台与公开展示只依赖 `InstanceBrandingProvider`。开源版使用本地 Provider;未来平台可单一接管并将实例内设置转为只读,不采用双写。
132
+ - **增加安全公开展示面**:新增 `GET /branding` 及 Logo/favicon 资源端点,仅返回展示数据;图片按实际文件头识别并限制格式和大小。
133
+ - **改善模型标识诊断**:模型验证失败且 ID 含空白时提示检查展示名称;新增腾讯云 TokenHub 预设与 `kimi-k3` 精确 ID,同时保留合法自定义别名。
134
+ - **补齐生态配方**:新增 DeepSeek V4 工具调用 E2E 与阿里云百炼远程 MCP 的中英文配置和验证脚本。
135
+ - **数据库结构**:新增 `051_instance_branding.sql`,只创建单例品牌设置表。
136
+ - **对接影响**:不修改 Client API、执行器协议、工具签名、审批语义或 ACC。既有部署升级后继续显示默认品牌。
137
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm run web-admin:check`、`npm run docs:check`、`npm run security:scan`、`npm run release:check`。
138
+ - **相关文档**:[RELEASE_NOTES_v0.1.10.md](RELEASE_NOTES_v0.1.10.md)、[兼容性与升级.md](兼容性与升级.md)、[DeepSeek 接入配方](integrations/deepseek/README.md)、[阿里云百炼 MCP 配方](integrations/bailian/README.md)。
139
+
140
+ ## v0.1.9 - 可选 OpenMetrics 运维指标
141
+
142
+ 发布日期:2026-07-24。
143
+
144
+ - **新增可选 OpenMetrics 端点**:`GET /metrics` 默认关闭,启用后必须使用独立 Bearer Token;不接受 query Token,不与管理根密钥复用。
145
+ - **提供稳定低基数运维指标**:覆盖任务状态、最近终态、最老排队时间、延迟任务、过期租约、阻塞线程、待审批数、执行器在线状态、审计写失败、运行时暂停与采集器健康;不输出任务、租户、主体、参数或业务载荷标签。
146
+ - **故障隔离与扩展兼容**:状态库与控制面采集器分别限时、独立降级;单个采集失败不阻断其余指标。第三方状态/配置实现可继续忽略新增可选聚合方法。
147
+ - **数据库结构**:新增 `050_operational_metrics_indexes.sql`,只为任务终态时间窗口和执行器心跳聚合增加索引。
148
+ - **对接影响**:默认行为不变;不修改 Client API、执行器协议、工具签名或 ACC 语义。仅启用 `/metrics` 的部署需要配置三个 `BAILING_METRICS_*` 环境变量。
149
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm run docs:check`、`npm run security:scan`、`npm run release:check`。
150
+ - **相关文档**:[RELEASE_NOTES_v0.1.9.md](RELEASE_NOTES_v0.1.9.md)、[OPERATIONS.md](OPERATIONS.md)、[兼容性与升级.md](兼容性与升级.md)。
151
+
152
+ ## v0.1.8 - 首次管理员只创建一次
153
+
154
+ 发布日期:2026-07-24。
155
+
156
+ - **首次管理员只创建一次**:新增成对环境变量 `BAILING_BOOTSTRAP_ADMIN_USERNAME` 与 `BAILING_BOOTSTRAP_ADMIN_PASSWORD`。仅当管理员表为空时创建首个账号;使用同一数据库的重启、升级和容器重建不会更新已有账号、密码、角色或启用状态。
157
+ - **并发冷启动安全**:MySQL 仓储以命名锁和事务收敛多副本并发初始化,只有一个副本能够创建首个管理员;无法取得初始化锁时启动失败,不以不确定状态继续运行。
158
+ - **保留显式管理入口**:`npm run admin:create` 继续承担人工创建和密码重置,不被自动启动流程调用。demo seed 改用同一 create-once 契约,不再在服务重启时重置管理员密码,也不在服务日志中打印密码。
159
+ - **对接影响**:没有数据库迁移,不改变 Client API、执行器协议、工具签名或 ACC 语义。两个 bootstrap 变量必须同时配置;只配置一个会拒绝启动。保留数据库的重装不会重置密码,删除数据库后的全新安装会重新创建首个账号。
160
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm run security:scan`,并在真实 MySQL 上验证首次创建、密码修改后的重启保持、并发冷启动和日志脱敏。
161
+ - **持续回归**:Docker demo CI 会在真实 MySQL 中模拟管理员主动改密,重启容器后确认 bootstrap 配置没有覆盖已存密码。
162
+ - **改密兼容修复**:管理员仓储在仅更新密码、未传角色时,新账号使用 `admin` 缺省角色,已有账号保留原角色,避免 MySQL 在重复键更新前因非空角色列拒绝请求。
163
+ - **相关文档**:[RELEASE_NOTES_v0.1.8.md](RELEASE_NOTES_v0.1.8.md)、[QUICKSTART.md](QUICKSTART.md)、[OPERATIONS.md](OPERATIONS.md)。
164
+
165
+ ## v0.1.7 - 版本化 Client API 与跨生态兼容门禁
166
+
167
+ 发布日期:2026-07-23。
168
+
169
+ - **建立稳定 Client API**:新增 `bailing.client-api.v1`,以 manifest、JSON Schema 和行为向量定义 `/health`、`/run`、`/jobs/{job_id}`、认证、错误分类和任务状态。
170
+ - **增加双向兼容门禁**:核心 CI 验证 Dify 与 n8n 适配器,适配器 CI 反向验证目标核心分支,阻止任一仓库静默破坏另一方。
171
+ - **收紧公开请求边界**:Client API 严格校验顶层字段、route、metadata、callback URL、request id 和输入长度;调用来源由认证 client 身份决定,不能由请求自行覆盖。
172
+ - **保持协议分层**:OpenClaw 与便携执行器不被错误纳入 Client API,继续使用独立的 claim、heartbeat、lease 和结果回报协议。
173
+ - **对接影响**:无数据库迁移;按公开契约接入的客户端无需修改。依赖未声明顶层字段的非正式接入应删除这些字段。
174
+ - **验证方式**:`npm run client-api:contract`、`npm run client-api:ecosystem:local`、`npm run client-api:ecosystem:clone`、`npm run typecheck`、`npm test`、`npm run release:check`。
175
+ - **相关文档**:[RELEASE_NOTES_v0.1.7.md](RELEASE_NOTES_v0.1.7.md)、[CLIENT_API.md](CLIENT_API.md)。
176
+
177
+ ## v0.1.6 - 独立验证路径与安装后权限提示
178
+
179
+ 发布日期:2026-07-21。
180
+
181
+ - **降低独立验证门槛**:公开任务卡将全新 Ubuntu/Debian 一键安装设为推荐核心路径,同时保留本地源码复现,不再要求所有验证者先理解仓库构建流程。
182
+ - **修正安装后命令权限**:安装器根据当前会话真实 Docker 权限打印 `docker compose` 或 `sudo docker compose`,避免非 root 用户在 Docker 组权限生效前照抄命令得到 socket 权限错误。
183
+ - **收紧验证安全边界**:中英文任务卡明确禁止在生产主机、生产网络或含重要 Docker 数据的环境运行,并要求反馈时排除密码、Token、完整 `.env` 和生产数据。
184
+ - **改善反馈结构**:独立验证 Issue 模板区分一键安装、源码 Docker、Dify 与执行器路径;提交号只在源码复现时需要。
185
+ - **对接影响**:现有部署无需迁移。公开 HTTP 契约、SDK、签名格式、ACC 语义、数据库结构和业务镜像运行行为均无变化。
186
+ - **验证方式**:`sh -n scripts/install.sh`、`npm run docs:check`、`npm run release:check`;并在隔离 Ubuntu 24.04 实例验证权限提示、健康检查、10 项 smoke、完整 demo E2E 和清理边界。
187
+ - **相关文档**:[RELEASE_NOTES_v0.1.6.md](RELEASE_NOTES_v0.1.6.md)、[INDEPENDENT_VALIDATION.md](INDEPENDENT_VALIDATION.md)。
188
+
189
+ ## v0.1.5 - 一键安装参数可靠性与全新服务器兼容性
190
+
191
+ 发布日期:2026-07-21。
192
+
193
+ - **修复自定义安装参数传递**:安装模式、端口、公开地址、镜像仓库、安装目录和仓库引用等环境变量现在明确绑定到执行安装脚本的 `sh`,避免变量只传给 `curl` 后被静默忽略。
194
+ - **改善全新服务器依赖安装**:安装器先检查 apt 软件源实际提供 `docker-compose-plugin` 还是 `docker-compose-v2`,再安装可用包,不再先产生一次可避免的包安装错误。
195
+ - **收紧访问地址提示**:公网地址识别失败时不再回退并展示私网地址;安装结果改为明确提示远程访问者替换 `localhost`,也支持显式设置 `BAILING_PUBLIC_HOST`。
196
+ - **增加发布回归门禁**:GitHub 发布演练会扫描公开文档和脚本,阻止 `BAILING_* curl ... | sh` 这类把环境变量错误绑定到下载进程的命令再次进入版本。
197
+ - **对接影响**:默认一键安装命令保持不变。曾使用自定义变量的安装命令应改为 `curl ... | env BAILING_*=... sh`。公开 HTTP 契约、SDK、签名格式和数据库结构均无变化。
198
+ - **验证方式**:`sh -n scripts/install.sh`、`npm run docs:check`、`npm run release:check`;并在全新 Ubuntu 24.04 服务器上完成默认镜像安装、自定义模式/端口/公开地址安装、10 项 smoke、完整 demo E2E 与重启持久性验证。
199
+ - **相关文档**:[RELEASE_NOTES_v0.1.5.md](RELEASE_NOTES_v0.1.5.md)、[QUICKSTART.md](QUICKSTART.md)、[DEMO.md](DEMO.md)。
200
+
201
+ ## v0.1.4 - 网页聊天真实流式输出与可重连 SSE
202
+
203
+ 发布日期:2026-07-20。
204
+
205
+ - **网页聊天真实增量输出**:`llm` 目标可通过 OpenAI-compatible `stream:true` 持续输出文本增量,网页组件在任务完成前就能展示回答。
206
+ - **可重连 SSE 协议**:新增 `bailing.chat.stream.v1` 的 `phase/reset/delta` 事件、单任务单调序号、`Last-Event-ID` 回放和有界短期缓冲。
207
+ - **权威结果边界**:增量文本只是临时传输数据,不逐片写入会话、回调或审计正文;`done` 始终从任务库最终结果生成。
208
+ - **提供商降级与观测**:仅当提供商明确表示不支持 streaming 时重试一次非流式请求;trace 只记录分片数、字符数和首段延迟等元数据,不记录逐片正文。
209
+ - **对接影响**:旧客户端可忽略新事件并继续仅消费 `done`;路由可在 `target_config` 设置 `streaming:false` 关闭模型流式请求。不需要数据库迁移。
210
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm --prefix web-admin run build`、`npm run docs:check`。
211
+ - **相关文档**:[RELEASE_NOTES_v0.1.4.md](RELEASE_NOTES_v0.1.4.md)、[STREAMING.md](STREAMING.md)、[CONTRACT.md](CONTRACT.md)、[OPERATIONS.md](OPERATIONS.md)。
212
+
213
+ ## v0.1.3 - 便携式执行器接入与 OpenClaw 适配
214
+
215
+ 发布日期:2026-07-17。
216
+
217
+ - **便携式接入 Skill**:新增 `connect-bailinghub-executor`,把安装判断、令牌安全、通用命令包装、OpenClaw 配方、直连协议和成功验收条件收敛成可下载、可复用的 Agent Skill。
218
+ - **控制台短引导**:路由页复制内容改为最小启动信息,只传中枢地址、目标名、路由上下文和 Skill 地址;执行器读取 Skill 后自行完成环境确认,避免在聊天中复制长篇协议或泄露令牌。
219
+ - **OpenClaw stdio 适配**:新增零依赖 `openclaw-stdio.mjs`,将百灵任务映射为 OpenClaw 本地 agent 调用,保持会话关联,并只把最终文本写入 stdout。
220
+ - **执行器安全与存活语义**:通用执行器优先从 `BAILING_EXECUTOR_TOKEN` 读取令牌,保留 `--token` 兼容;独立心跳覆盖长任务执行期;结果回报携带 `claim_token`,供中枢拒绝重排后的迟到结果。
221
+ - **对接影响**:不新增数据库迁移,不改变 `/run`、SDK、签名格式或现有执行器 HTTP 端点。既有 `--token` 命令继续可用,推荐迁移到本地环境变量或密钥管理器。
222
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm --prefix web-admin run build`、`npm run release:check`,并完成 OpenClaw 代表性端到端验证。
223
+ - **相关文档**:[RELEASE_NOTES_v0.1.3.md](RELEASE_NOTES_v0.1.3.md)、[QUICKSTART.md](QUICKSTART.md)、[第三方对接指南.md](第三方对接指南.md)、[INTEGRATION.en.md](INTEGRATION.en.md)。
224
+
225
+ ## v0.1.2 - 服务端根 token 与派生凭证安全加固
226
+
227
+ 发布日期:2026-07-17。
228
+
229
+ - **移除固定密钥回退**:任务级 `tool_token`、任务回调和告警 webhook 不再回退到公开字面量;缺少根 token 时相关签名路径 fail-closed。
230
+ - **收紧启动边界**:只有 `development` 且监听回环地址时允许无 token 本地开发;生产模式或非回环监听必须提供至少 24 字符、非公开占位值的 `BAILING_TOKEN`。
231
+ - **收紧 Compose 默认值**:源码与镜像 Compose 文件不再内置可预测的管理 token;文档要求首次启动生成随机值,一键安装脚本继续自动生成并保存随机密钥。
232
+ - **纵深防御**:无 token 的开发管理员回退同样限制在本机回环模式;安全扫描新增固定 fallback 与 Compose 可预测 token 检查。
233
+ - **对接影响**:公开 HTTP、SDK、签名格式和数据库结构不变。升级生产或对外监听部署前必须设置强 `BAILING_TOKEN`;本机回环开发保持零配置兼容。
234
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm run security:scan`、`npm run release:check`。
235
+ - **相关文档**:[RELEASE_NOTES_v0.1.2.md](RELEASE_NOTES_v0.1.2.md)、[SECURITY.md](../SECURITY.md)、[QUICKSTART.md](QUICKSTART.md)。
236
+
237
+ ## v0.1.1 - 聊天组件运营控制与接入边界修复
238
+
239
+ 发布日期:2026-07-13。
240
+
241
+ - **聊天组件运营控制**:聊天入口列表支持一键暂停/恢复;停用后已嵌入脚本静默隐藏整个组件,公开配置返回结构化停用状态,消息、历史、上传和评价端点继续服务端拒绝。
242
+ - **品牌文案控制**:外观配置新增底部品牌标识显示开关与自定义文案;老入口默认继续显示当前中枢品牌,不改变既有页面效果。
243
+ - **OpenAPI 编译 fail-closed**:`parameters[].in` 仅支持 `query`、`path`、`header`;`cookie`、未知或缺失位置会产生稳定 error diagnostic 并跳过整个 operation。ACC `timeout_ms` 保持严格整数类型,字符串数字会明确报错并提示去掉引号。
244
+ - **分发与社区入口**:应用镜像同步发布到阿里云 ACR 和 GHCR;GitHub 主线与 release tag 自动镜像到 Gitee;README 图片兼容 GitHub/Gitee;新增社区衍生与生态合作原则。
245
+ - **对接影响**:现有聊天入口与品牌标识默认行为不变;品牌配置复用 `appearance` JSON,不新增数据库迁移;其余公开 HTTP 契约、SDK 与签名格式保持兼容。
246
+ - **验证方式**:`npm run typecheck`、`npm test`、`npm --prefix web-admin run build`、`npm run release:check`。
247
+ - **相关文档**:[RELEASE_NOTES_v0.1.1.md](RELEASE_NOTES_v0.1.1.md)、[CHANNELS.md](CHANNELS.md)、[CONTRACT.md](CONTRACT.md)。
248
+
249
+ ## v0.1.0 - 首个公开版本候选
250
+
251
+ 首个公开版本采用 `v0.1.0`。该版本定位为公开预览:核心架构、接入契约、工具治理、审计追溯、Docker demo 和多语言 SDK 已形成可验证闭环,适合开发者评估、自托管试用和接入真实业务系统做小范围试点;后续版本会继续补齐生态适配、MCP 双向能力、更多语言 SDK 和生产运维模板。
252
+
253
+ 该版本不是完整托管平台承诺。生产使用前,部署方仍需完成凭证轮换、域名/证书、备份、监控、密钥管理、数据库容量规划和内部审批流程接入。
254
+
255
+ 当前首版能力包含:
256
+
257
+ - **生产配置安全线**:`BAILING_ENV=production` 下,服务 token、MySQL 口令、模型 API key、执行器 token、告警 webhook 等敏感项必须通过环境变量或密钥管理器注入。
258
+ - **集中限速账本**:MySQL 后端下,接入方限速、聊天入口 IP 限速、后台登录防爆破、工具源/工具级限速统一使用 `bz_rate_limits`。
259
+ - **DB 调度队列**:executor 与 inhub/llm 都从 `bz_jobs` 队列原子认领;`run_after` 固化重试退避与延迟认领语义,`claimed_at/lease_until` 固化 job 租约,claim 层保证同 thread 串行和队头顺序。
260
+ - **配置契约**:`schemas/config/*.schema.json` 提供 route、target、tool provider、credential、channel、alert rule、storage bucket、client、executor token、chat entry、page context 的机器可读配置模型,并通过 `GET /schemas/config/<name>.schema.json` 对外提供;后台保存链路通过 `route-config` 与 `config-models` 统一执行保存前校验和规范化。
261
+ - **配置仓储与运行期账本边界**:路由、接入方、凭证、渠道、工具源、管理员、项目、执行器令牌、执行目标、存储桶、告警规则和聊天入口均有独立 repository;限速、审批、对话总账、执行器心跳、工具幂等、送达死信和可观测查询均有独立 ledger,运行时模块通过显式依赖访问各自边界,`configstore` 只作为组合根与共享连接池入口。
262
+ - **HTTP 与运行期边界**:`server.ts` 只负责 URL 构造、公开入口分发、受控入口分发和进程监听;`routes/public` 承接 health/version/schema、官网/控制台壳、SDK 下载、widget 和网页聊天入口;`routes/private` 承接平台签名入口、审批回调、登录态、工具 token、admin/executor/client API 网关;`runtime.ts` 创建共享单例;`runtime-lifecycle` 负责启动初始化、配置巡检、目标注册表刷新、调度器、自监控、知识库同步、reaper、幂等账本清理和 boot 崩溃恢复。
263
+ - **核心/应用/基础设施/适配器目录边界**:`src/core/*` 承接标准契约、配置模型、纯运行时流水线、平台原语、状态接口和 target 插座;`src/app/*` 承接进程组合、HTTP 原语、调度、送达、工具运行面和生命周期;`src/infrastructure/*` 承接配置仓储、运行期 ledger、MySQL/JSONL 状态库实现;`src/services/*` 承接知识库、数据源同步和工具语义索引;`src/adapters/*` 承接 llm、执行器、企业微信、对象存储和视觉感知等具体适配。`architecture-boundary` 测试锁定 `core` 不反向依赖外层、`adapters` 不反向依赖 app/routes/services/infrastructure。
264
+ - **工具治理运行面边界**:`src/app/tools-runtime.ts` 只保留对外门面;主体解析与路由工具配置在 `tool-context`,运行时装配在 `tool-assembly`,审批意图和业务侧决策契约在 `tool-approvals`,spec 刷新、索引、authorize 探针在 `tool-specs`,执行器 defs/invoke 代理在 `tool-proxy`。
265
+ - **后台 API 边界**:后台组合入口、调度配置入口、接入密钥入口、基础设施入口、运行面入口、工具源治理入口、聊天运营入口和知识库管理入口拆分,`admin` 承接权限闸门、系统信息和管理员账号,`admin-dispatch-config` 承接项目、触发路由和执行目标注册表,`admin-access` 承接接入方、执行器令牌和密钥 reveal 审计,`admin-infra` 承接模型凭证、对象存储、渠道和告警规则,`admin-runtime` 承接任务、会话、审批意图、执行器在线状态、送达死信、成本和审计查询,`admin-tool-providers` 承接工具源注册、OpenAPI 对账、工具检索索引、召回预演和真实签名调试调用,`admin-chat` 承接网页聊天入口、页面上下文和聊天评价,`admin-kb` 承接知识库、文档、数据源同步和命中测试。
266
+ - **单 Job 全链路追溯**:`GET /admin/api/runs/:job/trace` 聚合 job、trace events、审批意图和会话总账;控制台「任务 → 追溯」可按 `job_id` 直查一次任务的触发、上下文、工具、审批、送达与结果。
267
+ - **身份归一与 Audience 策略**:`/run` 支持标准主体 `metadata.principal={id,tenant,roles,audience}`,中枢落单后写回标准主体并用于总账主体、路由受众闸和自动分诊;路由新增 `audience` 一等配置字段,支持接入方、渠道、租户、角色、主体、受众类型、匿名、关键词和优先级。
268
+ - **route=auto 规则分诊**:业务侧可传 `route:"auto"`,中枢在接入方白名单和路由 Audience 内按关键词/优先级可解释选择路由;无候选返回 400,同分候选返回 409,避免随机路由。后台提供 `POST /admin/api/routes/auto-preview` 分诊预演,返回每条路由的得分、命中原因和过滤原因。
269
+ - **追溯查询增强**:`GET /admin/api/runs/trace` 支持按 `job_id`、`request_id`、`client_id`、`thread_id`、`principal_id` 查询;唯一命中直接返回 `{job, trace, approvals, messages, lookup, debug_bundle, debug_report}`,多命中返回 matches;`debug_bundle` 包含调度租约、route 快照、审批、送达死信、消息预览、trace events 和规则化 diagnosis,并默认脱敏凭证、令牌、常见个人信息和 token-like 字符串;`debug_report` 基于脱敏包生成 Markdown 排障报告;控制台支持点选、打开详情、下载和复制脱敏排障包/排障报告,并展示脱敏规则摘要。
270
+ - **工具源治理调试台**:工具源注册、手动刷新和自动刷新后执行只读 authorize 探针;最近一次结论持久化到工具源配置并在控制台展示,支持手动重新探测。状态含 `pass`、`suspect`、`inconclusive`、`skipped`;控制台展示探针模式、路径、HTTP、原因和修复建议。工具清单支持真实签名调试调用,可按工具参数 schema 自动生成表单,也可切换 JSON 高级模式;结果展示请求摘要、签名字段、HTTP 状态、业务响应和常见排障提示;最近 5 个调试样例保存在浏览器本地;高风险/需确认工具默认阻止,必须显式放行。
271
+ - **配置体检与调度可观测**:配置体检纳入工具源授权探针结果、Audience 引用、route=auto 过宽/同分歧义、`allowed_routes` 误配,以及过期租约、同 thread 阻塞、延迟队列、执行器离线、目标无在线执行器覆盖、送达死信和任务积压等运行时风险;控制台「系统体检」按检查项卡片展示配置结构、运行期调度、route=auto、送达死信、E2E Smoke 和 Demo 闭环,支持一键运行 `POST /admin/api/smoke` 并跳转到 smoke 任务;控制台「执行器 → 调度租约」展示 queued/running/dispatched、延迟队列、过期租约、按 target 队列占用、当前租约 TTL 和同 thread 队头阻塞。
272
+ - **追溯闭环、专用探针与 schema 表单**:控制台租约面板可直跳单 job 追溯;工具源 spec 可声明 `x-bailing-authz-probe` 专用授权探针,PHP/PHP7/Node/Python SDK 与多语言参考实现提供探针 helper;Node SDK 采用 `@bailinghub/connect` 包结构,Python SDK 采用 `bailing-connect` 包结构;后台提供配置 schema 读取接口,工具源、执行器令牌、触发路由、接入方、模型凭证和渠道表单首批从 schema 读取标题、说明和必填。
273
+ - **官网开发者文档中心**:官网提供 `/docs` 总览,以及 `/docs/api`、`/docs/tools`、`/docs/sdk`、`/docs/knowledge`、`/docs/approvals`、`/docs/operations` 分页;控制台“开发文档”入口统一跳转到官网对应页面。
274
+ - **开源体验闭环**:提供 `Dockerfile`、`docker-compose.yml`、`demo/business` 示例业务系统、`demo-agent` 本地体验目标、`scripts/seed-demo.ts` 幂等初始化脚本和 `docs/DEMO.md`;开发者可一条 `docker compose up --build` 跑起中枢、MySQL、demo 业务工具源和预置路由,零模型 key 体验「业务系统暴露工具 → 中枢治理 → agent 调工具 → 审计」;`npm run smoke` 在 demo 环境会自动识别 `demo_support`,完整验证 `/run + trace + debug_bundle 脱敏声明`。
275
+ - **开源仓库门面**:根目录提供标准 `LICENSE`、`NOTICE`、`SECURITY.md`、`CONTRIBUTING.md`;`package.json` 标注 Apache-2.0;`LICENSING.md` 收敛为当前许可证说明;示例配置和流水线文档不含本机绝对路径、真实域名或内部人员标识。
276
+ - **配置巡检**:启动时自动检查 route、target、client、channel、chat entry、alert rule、tool provider、storage bucket、executor token、知识库等配置的结构和跨表引用;后台可通过 `GET /admin/api/config-diagnostics` 手动查看。
277
+ - **契约与运行期收口**:ACC `execution.timeout_ms` 在 `1..600000` 毫秒范围内原值生效,超界声明在工具编译期明确拒绝;审计写失败统一产生脱敏结构化日志并在 `/health` 暴露进程级计数;模型凭证同名来源进入配置体检,模型请求 trace 仅记录 `config` / `db` 来源而不记录密钥。
278
+ - **数据库结构**:首版结构包含 `043_rate_limits.sql`、`044_job_run_after.sql`、`045_job_claim_lease.sql`、`046_tool_authz_probe.sql`、`047_route_audience.sql`。
279
+ - **验证方式**:`npm run typecheck`、`npm run test`、`npm run smoke`、`npm run sdk:test`、`npm run sdk:test7`、`npm run sdk:test-node`、`npm run sdk:test-python`、`npm run db:init`。