bailinghub 0.9.3 → 0.10.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 (1264) hide show
  1. package/.dockerignore +1 -0
  2. package/.gitignore +1 -0
  3. package/.npmignore +1 -0
  4. package/Dockerfile +1 -0
  5. package/README.en.md +6 -6
  6. package/README.md +6 -6
  7. package/SECURITY.md +3 -3
  8. package/THIRD_PARTY_NOTICES.md +8 -8
  9. package/docker-compose.images.yml +2 -2
  10. package/docs/AGENT_CLIENT_QUICKSTART.en.md +1 -3
  11. package/docs/AGENT_CLIENT_QUICKSTART.md +1 -1
  12. package/docs/AGENT_CLIENT_RUNTIME_API.en.md +87 -2
  13. package/docs/AGENT_CLIENT_RUNTIME_API.md +36 -2
  14. package/docs/AGENT_KNOWLEDGE_API.en.md +77 -0
  15. package/docs/AGENT_KNOWLEDGE_API.md +86 -0
  16. package/docs/AGENT_TASK_CONTROL.md +4 -4
  17. package/docs/AGENT_TASK_CONTROL_FOUNDATION.md +1 -1
  18. package/docs/ARCHITECTURE.md +4 -0
  19. package/docs/CHANGELOG.en.md +24 -1
  20. package/docs/CHANGELOG.md +24 -1
  21. package/docs/COMPATIBILITY.en.md +27 -1
  22. package/docs/CONTRACT.en.md +1 -1
  23. package/docs/CONTRACT.md +1 -1
  24. package/docs/DOCX_DEPENDENCY.en.md +26 -0
  25. package/docs/DOCX_DEPENDENCY.md +26 -0
  26. package/docs/IMPLEMENTATION_STATUS.en.md +23 -15
  27. package/docs/IMPLEMENTATION_STATUS.md +23 -15
  28. package/docs/INDEPENDENT_VALIDATION.en.md +6 -4
  29. package/docs/INDEPENDENT_VALIDATION.md +6 -4
  30. package/docs/INTEGRATION_WALKTHROUGH.md +65 -0
  31. package/docs/MODEL_BILLING.en.md +2 -0
  32. package/docs/MODEL_BILLING.md +6 -2
  33. package/docs/MODEL_CONTINUATION.en.md +54 -0
  34. package/docs/MODEL_CONTINUATION.md +54 -0
  35. package/docs/MODEL_OUTPUT_BUDGET.en.md +69 -0
  36. package/docs/MODEL_OUTPUT_BUDGET.md +69 -0
  37. package/docs/NOTIFICATION_DURABILITY.en.md +47 -0
  38. package/docs/NOTIFICATION_DURABILITY.md +47 -0
  39. package/docs/OPERATIONS.en.md +22 -6
  40. package/docs/OPERATIONS.md +22 -6
  41. package/docs/QUICKSTART.md +1 -1
  42. package/docs/README.en.md +9 -0
  43. package/docs/README.md +9 -0
  44. package/docs/RELEASE_NOTES_NEXT.en.md +3 -3
  45. package/docs/RELEASE_NOTES_NEXT.md +3 -3
  46. package/docs/RELEASE_NOTES_v0.10.0.en.md +58 -0
  47. package/docs/RELEASE_NOTES_v0.10.0.md +58 -0
  48. package/docs/RELEASE_NOTES_v0.9.4.en.md +42 -0
  49. package/docs/RELEASE_NOTES_v0.9.4.md +42 -0
  50. package/docs/UPGRADE_PLAN.en.md +118 -0
  51. package/docs/UPGRADE_PLAN.md +124 -0
  52. package/docs/UPGRADE_v0.10.0.en.md +47 -0
  53. package/docs/UPGRADE_v0.10.0.md +47 -0
  54. package/docs/UPGRADE_v0.9.4.en.md +57 -0
  55. package/docs/UPGRADE_v0.9.4.md +57 -0
  56. package/docs//345/205/274/345/256/271/346/200/247/344/270/216/345/215/207/347/272/247.md +38 -22
  57. package/node_modules/@xmldom/xmldom/CHANGELOG.md +533 -0
  58. package/node_modules/@xmldom/xmldom/LICENSE +8 -0
  59. package/node_modules/@xmldom/xmldom/SECURITY.md +50 -0
  60. package/node_modules/@xmldom/xmldom/index.d.ts +96 -0
  61. package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +2 -0
  62. package/node_modules/@xmldom/xmldom/lib/conventions.js +214 -0
  63. package/node_modules/@xmldom/xmldom/lib/dom-parser.js +322 -0
  64. package/node_modules/@xmldom/xmldom/lib/dom.js +2266 -0
  65. package/node_modules/@xmldom/xmldom/lib/entities.js +2166 -0
  66. package/node_modules/@xmldom/xmldom/lib/index.js +4 -0
  67. package/node_modules/@xmldom/xmldom/lib/sax.js +683 -0
  68. package/node_modules/@xmldom/xmldom/package.json +75 -0
  69. package/node_modules/@xmldom/xmldom/readme.md +356 -0
  70. package/node_modules/base64-js/LICENSE +21 -0
  71. package/node_modules/base64-js/README.md +34 -0
  72. package/node_modules/base64-js/base64js.min.js +1 -0
  73. package/node_modules/base64-js/index.d.ts +3 -0
  74. package/node_modules/base64-js/index.js +150 -0
  75. package/node_modules/base64-js/package.json +47 -0
  76. package/node_modules/bluebird/LICENSE +21 -0
  77. package/node_modules/bluebird/README.md +51 -0
  78. package/node_modules/bluebird/changelog.md +1 -0
  79. package/node_modules/bluebird/js/browser/bluebird.core.js +3739 -0
  80. package/node_modules/bluebird/js/browser/bluebird.core.min.js +31 -0
  81. package/node_modules/bluebird/js/browser/bluebird.js +5581 -0
  82. package/node_modules/bluebird/js/browser/bluebird.min.js +31 -0
  83. package/node_modules/bluebird/js/release/any.js +21 -0
  84. package/node_modules/bluebird/js/release/assert.js +55 -0
  85. package/node_modules/bluebird/js/release/async.js +161 -0
  86. package/node_modules/bluebird/js/release/bind.js +67 -0
  87. package/node_modules/bluebird/js/release/bluebird.js +11 -0
  88. package/node_modules/bluebird/js/release/call_get.js +123 -0
  89. package/node_modules/bluebird/js/release/cancel.js +129 -0
  90. package/node_modules/bluebird/js/release/catch_filter.js +42 -0
  91. package/node_modules/bluebird/js/release/context.js +69 -0
  92. package/node_modules/bluebird/js/release/debuggability.js +916 -0
  93. package/node_modules/bluebird/js/release/direct_resolve.js +46 -0
  94. package/node_modules/bluebird/js/release/each.js +30 -0
  95. package/node_modules/bluebird/js/release/errors.js +116 -0
  96. package/node_modules/bluebird/js/release/es5.js +80 -0
  97. package/node_modules/bluebird/js/release/filter.js +12 -0
  98. package/node_modules/bluebird/js/release/finally.js +111 -0
  99. package/node_modules/bluebird/js/release/generators.js +223 -0
  100. package/node_modules/bluebird/js/release/join.js +168 -0
  101. package/node_modules/bluebird/js/release/map.js +168 -0
  102. package/node_modules/bluebird/js/release/method.js +55 -0
  103. package/node_modules/bluebird/js/release/nodeback.js +51 -0
  104. package/node_modules/bluebird/js/release/nodeify.js +58 -0
  105. package/node_modules/bluebird/js/release/promise.js +773 -0
  106. package/node_modules/bluebird/js/release/promise_array.js +184 -0
  107. package/node_modules/bluebird/js/release/promisify.js +314 -0
  108. package/node_modules/bluebird/js/release/props.js +118 -0
  109. package/node_modules/bluebird/js/release/queue.js +73 -0
  110. package/node_modules/bluebird/js/release/race.js +49 -0
  111. package/node_modules/bluebird/js/release/reduce.js +172 -0
  112. package/node_modules/bluebird/js/release/schedule.js +61 -0
  113. package/node_modules/bluebird/js/release/settle.js +43 -0
  114. package/node_modules/bluebird/js/release/some.js +148 -0
  115. package/node_modules/bluebird/js/release/synchronous_inspection.js +103 -0
  116. package/node_modules/bluebird/js/release/thenables.js +86 -0
  117. package/node_modules/bluebird/js/release/timers.js +93 -0
  118. package/node_modules/bluebird/js/release/using.js +226 -0
  119. package/node_modules/bluebird/js/release/util.js +379 -0
  120. package/node_modules/bluebird/package.json +76 -0
  121. package/node_modules/core-util-is/LICENSE +19 -0
  122. package/node_modules/core-util-is/README.md +3 -0
  123. package/node_modules/core-util-is/lib/util.js +107 -0
  124. package/node_modules/core-util-is/package.json +38 -0
  125. package/node_modules/dingbat-to-unicode/README.md +79 -0
  126. package/node_modules/dingbat-to-unicode/dist/dingbats.d.ts +8 -0
  127. package/node_modules/dingbat-to-unicode/dist/dingbats.js +1066 -0
  128. package/node_modules/dingbat-to-unicode/dist/index.d.ts +7 -0
  129. package/node_modules/dingbat-to-unicode/dist/index.js +44 -0
  130. package/node_modules/dingbat-to-unicode/package.json +39 -0
  131. package/node_modules/duck/LICENSE +22 -0
  132. package/node_modules/duck/README.md +184 -0
  133. package/node_modules/duck/index.js +267 -0
  134. package/node_modules/duck/makefile +4 -0
  135. package/node_modules/duck/package.json +23 -0
  136. package/node_modules/duck/test/duck.test.js +160 -0
  137. package/node_modules/immediate/LICENSE.txt +20 -0
  138. package/node_modules/immediate/README.md +93 -0
  139. package/node_modules/immediate/dist/immediate.js +75 -0
  140. package/node_modules/immediate/dist/immediate.min.js +1 -0
  141. package/node_modules/immediate/lib/browser.js +69 -0
  142. package/node_modules/immediate/lib/index.js +73 -0
  143. package/node_modules/immediate/package.json +42 -0
  144. package/node_modules/inherits/LICENSE +16 -0
  145. package/node_modules/inherits/README.md +42 -0
  146. package/node_modules/inherits/inherits.js +9 -0
  147. package/node_modules/inherits/inherits_browser.js +27 -0
  148. package/node_modules/inherits/package.json +29 -0
  149. package/node_modules/isarray/.npmignore +1 -0
  150. package/node_modules/isarray/.travis.yml +4 -0
  151. package/node_modules/isarray/Makefile +6 -0
  152. package/node_modules/isarray/README.md +60 -0
  153. package/node_modules/isarray/component.json +19 -0
  154. package/node_modules/isarray/index.js +5 -0
  155. package/node_modules/isarray/package.json +45 -0
  156. package/node_modules/isarray/test.js +20 -0
  157. package/node_modules/jszip/.codeclimate.yml +16 -0
  158. package/node_modules/jszip/.editorconfig +8 -0
  159. package/node_modules/jszip/.eslintrc.js +43 -0
  160. package/node_modules/jszip/.github/workflows/pr.yaml +58 -0
  161. package/node_modules/jszip/.jekyll-metadata +0 -0
  162. package/node_modules/jszip/.travis.yml +17 -0
  163. package/node_modules/jszip/CHANGES.md +204 -0
  164. package/node_modules/jszip/LICENSE.markdown +651 -0
  165. package/node_modules/jszip/README.markdown +33 -0
  166. package/node_modules/jszip/deps.js +37 -0
  167. package/node_modules/jszip/dist/jszip.js +11577 -0
  168. package/node_modules/jszip/dist/jszip.min.js +13 -0
  169. package/node_modules/jszip/graph.svg +601 -0
  170. package/node_modules/jszip/index.d.ts +330 -0
  171. package/node_modules/jszip/lib/base64.js +106 -0
  172. package/node_modules/jszip/lib/compressedObject.js +74 -0
  173. package/node_modules/jszip/lib/compressions.js +14 -0
  174. package/node_modules/jszip/lib/crc32.js +77 -0
  175. package/node_modules/jszip/lib/defaults.js +11 -0
  176. package/node_modules/jszip/lib/external.js +18 -0
  177. package/node_modules/jszip/lib/flate.js +85 -0
  178. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  179. package/node_modules/jszip/lib/generate/index.js +57 -0
  180. package/node_modules/jszip/lib/index.js +55 -0
  181. package/node_modules/jszip/lib/license_header.js +11 -0
  182. package/node_modules/jszip/lib/load.js +88 -0
  183. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  184. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  185. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  186. package/node_modules/jszip/lib/object.js +384 -0
  187. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  188. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  189. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  190. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  191. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  192. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  193. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  194. package/node_modules/jszip/lib/signature.js +7 -0
  195. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  196. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  197. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  198. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  199. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  200. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  201. package/node_modules/jszip/lib/support.js +38 -0
  202. package/node_modules/jszip/lib/utf8.js +275 -0
  203. package/node_modules/jszip/lib/utils.js +501 -0
  204. package/node_modules/jszip/lib/zipEntries.js +261 -0
  205. package/node_modules/jszip/lib/zipEntry.js +293 -0
  206. package/node_modules/jszip/lib/zipObject.js +133 -0
  207. package/node_modules/jszip/package.json +67 -0
  208. package/node_modules/jszip/sponsors.md +21 -0
  209. package/node_modules/jszip/tsconfig.json +101 -0
  210. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  211. package/node_modules/lie/README.md +62 -0
  212. package/node_modules/lie/dist/lie.js +350 -0
  213. package/node_modules/lie/dist/lie.min.js +1 -0
  214. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  215. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  216. package/node_modules/lie/lib/browser.js +273 -0
  217. package/node_modules/lie/lib/index.js +298 -0
  218. package/node_modules/lie/license.md +7 -0
  219. package/node_modules/lie/lie.d.ts +244 -0
  220. package/node_modules/lie/package.json +69 -0
  221. package/node_modules/lie/polyfill.js +4 -0
  222. package/node_modules/lop/LICENSE +22 -0
  223. package/node_modules/lop/README.md +248 -0
  224. package/node_modules/lop/index.js +18 -0
  225. package/node_modules/lop/lib/StringSource.js +53 -0
  226. package/node_modules/lop/lib/Token.js +7 -0
  227. package/node_modules/lop/lib/TokenIterator.js +28 -0
  228. package/node_modules/lop/lib/bottom-up.js +128 -0
  229. package/node_modules/lop/lib/errors.js +22 -0
  230. package/node_modules/lop/lib/lazy-iterators.js +81 -0
  231. package/node_modules/lop/lib/parser.js +11 -0
  232. package/node_modules/lop/lib/parsing-results.js +103 -0
  233. package/node_modules/lop/lib/regex-tokeniser.js +70 -0
  234. package/node_modules/lop/lib/rules.js +313 -0
  235. package/node_modules/lop/lib/testing.js +69 -0
  236. package/node_modules/lop/makefile +4 -0
  237. package/node_modules/lop/package.json +24 -0
  238. package/node_modules/lop/test/StringSource.test.js +21 -0
  239. package/node_modules/lop/test/TokenIterator.test.js +17 -0
  240. package/node_modules/lop/test/Tokeniser.js +50 -0
  241. package/node_modules/lop/test/Tokeniser.test.js +38 -0
  242. package/node_modules/lop/test/bottom-up.test.js +187 -0
  243. package/node_modules/lop/test/errors.test.js +36 -0
  244. package/node_modules/lop/test/lazy-iterators.test.js +53 -0
  245. package/node_modules/lop/test/lop.test.js +27 -0
  246. package/node_modules/lop/test/regex-tokeniser.test.js +114 -0
  247. package/node_modules/lop/test/results.test.js +8 -0
  248. package/node_modules/lop/test/rules.test.js +617 -0
  249. package/node_modules/mammoth/LICENSE +22 -0
  250. package/node_modules/mammoth/SOURCE.json +57 -0
  251. package/node_modules/mammoth/browser/docx/files.js +14 -0
  252. package/node_modules/mammoth/browser/unzip.js +12 -0
  253. package/node_modules/mammoth/lib/document-to-html.js +469 -0
  254. package/node_modules/mammoth/lib/documents.js +254 -0
  255. package/node_modules/mammoth/lib/docx/body-reader.js +798 -0
  256. package/node_modules/mammoth/lib/docx/comments-reader.js +31 -0
  257. package/node_modules/mammoth/lib/docx/content-types-reader.js +58 -0
  258. package/node_modules/mammoth/lib/docx/document-xml-reader.js +30 -0
  259. package/node_modules/mammoth/lib/docx/docx-reader.js +226 -0
  260. package/node_modules/mammoth/lib/docx/files.js +80 -0
  261. package/node_modules/mammoth/lib/docx/notes-reader.js +28 -0
  262. package/node_modules/mammoth/lib/docx/numbering-xml.js +111 -0
  263. package/node_modules/mammoth/lib/docx/office-xml-reader.js +73 -0
  264. package/node_modules/mammoth/lib/docx/relationships-reader.js +43 -0
  265. package/node_modules/mammoth/lib/docx/style-map.js +75 -0
  266. package/node_modules/mammoth/lib/docx/styles-reader.js +90 -0
  267. package/node_modules/mammoth/lib/docx/uris.js +21 -0
  268. package/node_modules/mammoth/lib/html/ast.js +51 -0
  269. package/node_modules/mammoth/lib/html/index.js +41 -0
  270. package/node_modules/mammoth/lib/html/simplify.js +88 -0
  271. package/node_modules/mammoth/lib/images.js +31 -0
  272. package/node_modules/mammoth/lib/index.d.ts +86 -0
  273. package/node_modules/mammoth/lib/index.js +111 -0
  274. package/node_modules/mammoth/lib/options-reader.js +107 -0
  275. package/node_modules/mammoth/lib/promises.js +42 -0
  276. package/node_modules/mammoth/lib/raw-text.js +14 -0
  277. package/node_modules/mammoth/lib/results.js +72 -0
  278. package/node_modules/mammoth/lib/style-reader.js +365 -0
  279. package/node_modules/mammoth/lib/styles/document-matchers.js +100 -0
  280. package/node_modules/mammoth/lib/styles/html-paths.js +75 -0
  281. package/node_modules/mammoth/lib/styles/parser/tokeniser.js +30 -0
  282. package/node_modules/mammoth/lib/transforms.js +62 -0
  283. package/node_modules/mammoth/lib/underline.js +11 -0
  284. package/node_modules/mammoth/lib/unzip.js +20 -0
  285. package/node_modules/mammoth/lib/writers/html-writer.js +159 -0
  286. package/node_modules/mammoth/lib/writers/index.js +14 -0
  287. package/node_modules/mammoth/lib/writers/markdown-writer.js +163 -0
  288. package/node_modules/mammoth/lib/xml/index.js +8 -0
  289. package/node_modules/mammoth/lib/xml/nodes.js +70 -0
  290. package/node_modules/mammoth/lib/xml/reader.js +69 -0
  291. package/node_modules/mammoth/lib/xml/writer.js +61 -0
  292. package/node_modules/mammoth/lib/xml/xmldom.js +23 -0
  293. package/node_modules/mammoth/lib/zipfile.js +72 -0
  294. package/node_modules/mammoth/package.json +39 -0
  295. package/node_modules/mammoth/upstream-package.json +64 -0
  296. package/node_modules/option/.npmignore +1 -0
  297. package/node_modules/option/LICENSE +22 -0
  298. package/node_modules/option/README.md +101 -0
  299. package/node_modules/option/index.js +88 -0
  300. package/node_modules/option/package.json +23 -0
  301. package/node_modules/option/test/options.test.js +174 -0
  302. package/node_modules/pako/CHANGELOG.md +164 -0
  303. package/node_modules/pako/LICENSE +21 -0
  304. package/node_modules/pako/README.md +191 -0
  305. package/node_modules/pako/dist/pako.js +6818 -0
  306. package/node_modules/pako/dist/pako.min.js +1 -0
  307. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  308. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  309. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  310. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  311. package/node_modules/pako/index.js +14 -0
  312. package/node_modules/pako/lib/deflate.js +400 -0
  313. package/node_modules/pako/lib/inflate.js +423 -0
  314. package/node_modules/pako/lib/utils/common.js +105 -0
  315. package/node_modules/pako/lib/utils/strings.js +187 -0
  316. package/node_modules/pako/lib/zlib/README +59 -0
  317. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  318. package/node_modules/pako/lib/zlib/constants.js +68 -0
  319. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  320. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  321. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  322. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  323. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  324. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  325. package/node_modules/pako/lib/zlib/messages.js +32 -0
  326. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  327. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  328. package/node_modules/pako/package.json +44 -0
  329. package/node_modules/path-is-absolute/index.js +20 -0
  330. package/node_modules/path-is-absolute/license +21 -0
  331. package/node_modules/path-is-absolute/package.json +43 -0
  332. package/node_modules/path-is-absolute/readme.md +59 -0
  333. package/node_modules/process-nextick-args/index.js +45 -0
  334. package/node_modules/process-nextick-args/license.md +19 -0
  335. package/node_modules/process-nextick-args/package.json +25 -0
  336. package/node_modules/process-nextick-args/readme.md +18 -0
  337. package/node_modules/readable-stream/.travis.yml +34 -0
  338. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  339. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  340. package/node_modules/readable-stream/LICENSE +47 -0
  341. package/node_modules/readable-stream/README.md +58 -0
  342. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  343. package/node_modules/readable-stream/duplex-browser.js +1 -0
  344. package/node_modules/readable-stream/duplex.js +1 -0
  345. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  346. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  347. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  348. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  349. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  350. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  351. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  352. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  353. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  354. package/node_modules/readable-stream/package.json +52 -0
  355. package/node_modules/readable-stream/passthrough.js +1 -0
  356. package/node_modules/readable-stream/readable-browser.js +7 -0
  357. package/node_modules/readable-stream/readable.js +19 -0
  358. package/node_modules/readable-stream/transform.js +1 -0
  359. package/node_modules/readable-stream/writable-browser.js +1 -0
  360. package/node_modules/readable-stream/writable.js +8 -0
  361. package/node_modules/safe-buffer/LICENSE +21 -0
  362. package/node_modules/safe-buffer/README.md +584 -0
  363. package/node_modules/safe-buffer/index.d.ts +187 -0
  364. package/node_modules/safe-buffer/index.js +62 -0
  365. package/node_modules/safe-buffer/package.json +37 -0
  366. package/node_modules/setimmediate/LICENSE.txt +20 -0
  367. package/node_modules/setimmediate/package.json +30 -0
  368. package/node_modules/setimmediate/setImmediate.js +186 -0
  369. package/node_modules/string_decoder/.travis.yml +50 -0
  370. package/node_modules/string_decoder/LICENSE +48 -0
  371. package/node_modules/string_decoder/README.md +47 -0
  372. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  373. package/node_modules/string_decoder/package.json +31 -0
  374. package/node_modules/underscore/LICENSE +22 -0
  375. package/node_modules/underscore/README.md +34 -0
  376. package/node_modules/underscore/amd/_baseCreate.js +21 -0
  377. package/node_modules/underscore/amd/_baseIteratee.js +15 -0
  378. package/node_modules/underscore/amd/_cb.js +12 -0
  379. package/node_modules/underscore/amd/_chainResult.js +10 -0
  380. package/node_modules/underscore/amd/_collectNonEnumProps.js +42 -0
  381. package/node_modules/underscore/amd/_createAssigner.js +24 -0
  382. package/node_modules/underscore/amd/_createEscaper.js +21 -0
  383. package/node_modules/underscore/amd/_createIndexFinder.js +30 -0
  384. package/node_modules/underscore/amd/_createPredicateIndexFinder.js +18 -0
  385. package/node_modules/underscore/amd/_createReduce.js +30 -0
  386. package/node_modules/underscore/amd/_createSizePropertyCheck.js +13 -0
  387. package/node_modules/underscore/amd/_deepGet.js +15 -0
  388. package/node_modules/underscore/amd/_escapeMap.js +15 -0
  389. package/node_modules/underscore/amd/_executeBound.js +16 -0
  390. package/node_modules/underscore/amd/_flatten.js +32 -0
  391. package/node_modules/underscore/amd/_getByteLength.js +8 -0
  392. package/node_modules/underscore/amd/_getLength.js +8 -0
  393. package/node_modules/underscore/amd/_group.js +18 -0
  394. package/node_modules/underscore/amd/_has.js +10 -0
  395. package/node_modules/underscore/amd/_hasObjectTag.js +7 -0
  396. package/node_modules/underscore/amd/_isArrayLike.js +11 -0
  397. package/node_modules/underscore/amd/_isBufferLike.js +9 -0
  398. package/node_modules/underscore/amd/_keyInObj.js +11 -0
  399. package/node_modules/underscore/amd/_methodFingerprint.js +44 -0
  400. package/node_modules/underscore/amd/_optimizeCb.js +27 -0
  401. package/node_modules/underscore/amd/_setup.js +70 -0
  402. package/node_modules/underscore/amd/_shallowProperty.js +12 -0
  403. package/node_modules/underscore/amd/_stringTagBug.js +19 -0
  404. package/node_modules/underscore/amd/_tagTester.js +13 -0
  405. package/node_modules/underscore/amd/_toBufferView.js +15 -0
  406. package/node_modules/underscore/amd/_toPath.js +11 -0
  407. package/node_modules/underscore/amd/_unescapeMap.js +8 -0
  408. package/node_modules/underscore/amd/after.js +14 -0
  409. package/node_modules/underscore/amd/allKeys.js +15 -0
  410. package/node_modules/underscore/amd/before.js +18 -0
  411. package/node_modules/underscore/amd/bind.js +15 -0
  412. package/node_modules/underscore/amd/bindAll.js +19 -0
  413. package/node_modules/underscore/amd/chain.js +12 -0
  414. package/node_modules/underscore/amd/chunk.js +17 -0
  415. package/node_modules/underscore/amd/clone.js +11 -0
  416. package/node_modules/underscore/amd/compact.js +10 -0
  417. package/node_modules/underscore/amd/compose.js +18 -0
  418. package/node_modules/underscore/amd/constant.js +12 -0
  419. package/node_modules/underscore/amd/contains.js +12 -0
  420. package/node_modules/underscore/amd/countBy.js +12 -0
  421. package/node_modules/underscore/amd/create.js +14 -0
  422. package/node_modules/underscore/amd/debounce.js +43 -0
  423. package/node_modules/underscore/amd/defaults.js +8 -0
  424. package/node_modules/underscore/amd/defer.js +9 -0
  425. package/node_modules/underscore/amd/delay.js +13 -0
  426. package/node_modules/underscore/amd/difference.js +14 -0
  427. package/node_modules/underscore/amd/each.js +25 -0
  428. package/node_modules/underscore/amd/escape.js +8 -0
  429. package/node_modules/underscore/amd/every.js +17 -0
  430. package/node_modules/underscore/amd/extend.js +8 -0
  431. package/node_modules/underscore/amd/extendOwn.js +10 -0
  432. package/node_modules/underscore/amd/filter.js +15 -0
  433. package/node_modules/underscore/amd/find.js +12 -0
  434. package/node_modules/underscore/amd/findIndex.js +8 -0
  435. package/node_modules/underscore/amd/findKey.js +15 -0
  436. package/node_modules/underscore/amd/findLastIndex.js +8 -0
  437. package/node_modules/underscore/amd/findWhere.js +11 -0
  438. package/node_modules/underscore/amd/first.js +13 -0
  439. package/node_modules/underscore/amd/flatten.js +11 -0
  440. package/node_modules/underscore/amd/functions.js +14 -0
  441. package/node_modules/underscore/amd/get.js +14 -0
  442. package/node_modules/underscore/amd/groupBy.js +11 -0
  443. package/node_modules/underscore/amd/has.js +19 -0
  444. package/node_modules/underscore/amd/identity.js +10 -0
  445. package/node_modules/underscore/amd/index-default.js +12 -0
  446. package/node_modules/underscore/amd/index.js +154 -0
  447. package/node_modules/underscore/amd/indexBy.js +11 -0
  448. package/node_modules/underscore/amd/indexOf.js +11 -0
  449. package/node_modules/underscore/amd/initial.js +12 -0
  450. package/node_modules/underscore/amd/intersection.js +22 -0
  451. package/node_modules/underscore/amd/invert.js +15 -0
  452. package/node_modules/underscore/amd/invoke.js +28 -0
  453. package/node_modules/underscore/amd/isArguments.js +19 -0
  454. package/node_modules/underscore/amd/isArray.js +9 -0
  455. package/node_modules/underscore/amd/isArrayBuffer.js +7 -0
  456. package/node_modules/underscore/amd/isBoolean.js +10 -0
  457. package/node_modules/underscore/amd/isDataView.js +17 -0
  458. package/node_modules/underscore/amd/isDate.js +7 -0
  459. package/node_modules/underscore/amd/isElement.js +10 -0
  460. package/node_modules/underscore/amd/isEmpty.js +18 -0
  461. package/node_modules/underscore/amd/isEqual.js +133 -0
  462. package/node_modules/underscore/amd/isError.js +7 -0
  463. package/node_modules/underscore/amd/isFinite.js +10 -0
  464. package/node_modules/underscore/amd/isFunction.js +18 -0
  465. package/node_modules/underscore/amd/isMap.js +7 -0
  466. package/node_modules/underscore/amd/isMatch.js +17 -0
  467. package/node_modules/underscore/amd/isNaN.js +10 -0
  468. package/node_modules/underscore/amd/isNull.js +10 -0
  469. package/node_modules/underscore/amd/isNumber.js +7 -0
  470. package/node_modules/underscore/amd/isObject.js +11 -0
  471. package/node_modules/underscore/amd/isRegExp.js +7 -0
  472. package/node_modules/underscore/amd/isSet.js +7 -0
  473. package/node_modules/underscore/amd/isString.js +7 -0
  474. package/node_modules/underscore/amd/isSymbol.js +7 -0
  475. package/node_modules/underscore/amd/isTypedArray.js +16 -0
  476. package/node_modules/underscore/amd/isUndefined.js +10 -0
  477. package/node_modules/underscore/amd/isWeakMap.js +7 -0
  478. package/node_modules/underscore/amd/isWeakSet.js +7 -0
  479. package/node_modules/underscore/amd/iteratee.js +13 -0
  480. package/node_modules/underscore/amd/keys.js +17 -0
  481. package/node_modules/underscore/amd/last.js +13 -0
  482. package/node_modules/underscore/amd/lastIndexOf.js +9 -0
  483. package/node_modules/underscore/amd/map.js +18 -0
  484. package/node_modules/underscore/amd/mapObject.js +19 -0
  485. package/node_modules/underscore/amd/matcher.js +14 -0
  486. package/node_modules/underscore/amd/max.js +30 -0
  487. package/node_modules/underscore/amd/memoize.js +17 -0
  488. package/node_modules/underscore/amd/min.js +30 -0
  489. package/node_modules/underscore/amd/mixin.js +18 -0
  490. package/node_modules/underscore/amd/negate.js +12 -0
  491. package/node_modules/underscore/amd/noop.js +8 -0
  492. package/node_modules/underscore/amd/now.js +10 -0
  493. package/node_modules/underscore/amd/object.js +20 -0
  494. package/node_modules/underscore/amd/omit.js +20 -0
  495. package/node_modules/underscore/amd/once.js +9 -0
  496. package/node_modules/underscore/amd/pairs.js +17 -0
  497. package/node_modules/underscore/amd/partial.js +25 -0
  498. package/node_modules/underscore/amd/partition.js +11 -0
  499. package/node_modules/underscore/amd/pick.js +25 -0
  500. package/node_modules/underscore/amd/pipe.js +13 -0
  501. package/node_modules/underscore/amd/pluck.js +10 -0
  502. package/node_modules/underscore/amd/property.js +14 -0
  503. package/node_modules/underscore/amd/propertyOf.js +13 -0
  504. package/node_modules/underscore/amd/random.js +14 -0
  505. package/node_modules/underscore/amd/range.js +27 -0
  506. package/node_modules/underscore/amd/reduce.js +9 -0
  507. package/node_modules/underscore/amd/reduceRight.js +8 -0
  508. package/node_modules/underscore/amd/reject.js +10 -0
  509. package/node_modules/underscore/amd/rest.js +12 -0
  510. package/node_modules/underscore/amd/restArguments.js +33 -0
  511. package/node_modules/underscore/amd/result.js +25 -0
  512. package/node_modules/underscore/amd/sample.js +27 -0
  513. package/node_modules/underscore/amd/shuffle.js +10 -0
  514. package/node_modules/underscore/amd/size.js +11 -0
  515. package/node_modules/underscore/amd/some.js +17 -0
  516. package/node_modules/underscore/amd/sortBy.js +26 -0
  517. package/node_modules/underscore/amd/sortedIndex.js +18 -0
  518. package/node_modules/underscore/amd/tap.js +13 -0
  519. package/node_modules/underscore/amd/template.js +103 -0
  520. package/node_modules/underscore/amd/templateSettings.js +13 -0
  521. package/node_modules/underscore/amd/throttle.js +51 -0
  522. package/node_modules/underscore/amd/times.js +13 -0
  523. package/node_modules/underscore/amd/toArray.js +18 -0
  524. package/node_modules/underscore/amd/toPath.js +12 -0
  525. package/node_modules/underscore/amd/underscore-array-methods.js +30 -0
  526. package/node_modules/underscore/amd/underscore.js +29 -0
  527. package/node_modules/underscore/amd/unescape.js +8 -0
  528. package/node_modules/underscore/amd/union.js +11 -0
  529. package/node_modules/underscore/amd/uniq.js +37 -0
  530. package/node_modules/underscore/amd/uniqueId.js +13 -0
  531. package/node_modules/underscore/amd/unzip.js +17 -0
  532. package/node_modules/underscore/amd/values.js +16 -0
  533. package/node_modules/underscore/amd/where.js +11 -0
  534. package/node_modules/underscore/amd/without.js +10 -0
  535. package/node_modules/underscore/amd/wrap.js +12 -0
  536. package/node_modules/underscore/amd/zip.js +9 -0
  537. package/node_modules/underscore/cjs/_baseCreate.js +20 -0
  538. package/node_modules/underscore/cjs/_baseIteratee.js +19 -0
  539. package/node_modules/underscore/cjs/_cb.js +12 -0
  540. package/node_modules/underscore/cjs/_chainResult.js +8 -0
  541. package/node_modules/underscore/cjs/_collectNonEnumProps.js +42 -0
  542. package/node_modules/underscore/cjs/_createAssigner.js +20 -0
  543. package/node_modules/underscore/cjs/_createEscaper.js +19 -0
  544. package/node_modules/underscore/cjs/_createIndexFinder.js +30 -0
  545. package/node_modules/underscore/cjs/_createPredicateIndexFinder.js +17 -0
  546. package/node_modules/underscore/cjs/_createReduce.js +30 -0
  547. package/node_modules/underscore/cjs/_createSizePropertyCheck.js +11 -0
  548. package/node_modules/underscore/cjs/_deepGet.js +11 -0
  549. package/node_modules/underscore/cjs/_escapeMap.js +11 -0
  550. package/node_modules/underscore/cjs/_executeBound.js +15 -0
  551. package/node_modules/underscore/cjs/_flatten.js +33 -0
  552. package/node_modules/underscore/cjs/_getByteLength.js +6 -0
  553. package/node_modules/underscore/cjs/_getLength.js +6 -0
  554. package/node_modules/underscore/cjs/_group.js +17 -0
  555. package/node_modules/underscore/cjs/_has.js +8 -0
  556. package/node_modules/underscore/cjs/_hasObjectTag.js +5 -0
  557. package/node_modules/underscore/cjs/_isArrayLike.js +10 -0
  558. package/node_modules/underscore/cjs/_isBufferLike.js +8 -0
  559. package/node_modules/underscore/cjs/_keyInObj.js +7 -0
  560. package/node_modules/underscore/cjs/_methodFingerprint.js +44 -0
  561. package/node_modules/underscore/cjs/_optimizeCb.js +23 -0
  562. package/node_modules/underscore/cjs/_setup.js +66 -0
  563. package/node_modules/underscore/cjs/_shallowProperty.js +8 -0
  564. package/node_modules/underscore/cjs/_stringTagBug.js +18 -0
  565. package/node_modules/underscore/cjs/_tagTester.js +11 -0
  566. package/node_modules/underscore/cjs/_toBufferView.js +13 -0
  567. package/node_modules/underscore/cjs/_toPath.js +10 -0
  568. package/node_modules/underscore/cjs/_unescapeMap.js +7 -0
  569. package/node_modules/underscore/cjs/after.js +10 -0
  570. package/node_modules/underscore/cjs/allKeys.js +15 -0
  571. package/node_modules/underscore/cjs/before.js +14 -0
  572. package/node_modules/underscore/cjs/bind.js +15 -0
  573. package/node_modules/underscore/cjs/bindAll.js +19 -0
  574. package/node_modules/underscore/cjs/chain.js +10 -0
  575. package/node_modules/underscore/cjs/chunk.js +15 -0
  576. package/node_modules/underscore/cjs/clone.js +11 -0
  577. package/node_modules/underscore/cjs/compact.js +8 -0
  578. package/node_modules/underscore/cjs/compose.js +14 -0
  579. package/node_modules/underscore/cjs/constant.js +8 -0
  580. package/node_modules/underscore/cjs/contains.js +12 -0
  581. package/node_modules/underscore/cjs/countBy.js +11 -0
  582. package/node_modules/underscore/cjs/create.js +13 -0
  583. package/node_modules/underscore/cjs/debounce.js +42 -0
  584. package/node_modules/underscore/cjs/defaults.js +7 -0
  585. package/node_modules/underscore/cjs/defer.js +9 -0
  586. package/node_modules/underscore/cjs/delay.js +11 -0
  587. package/node_modules/underscore/cjs/difference.js +15 -0
  588. package/node_modules/underscore/cjs/each.js +25 -0
  589. package/node_modules/underscore/cjs/escape.js +7 -0
  590. package/node_modules/underscore/cjs/every.js +17 -0
  591. package/node_modules/underscore/cjs/extend.js +7 -0
  592. package/node_modules/underscore/cjs/extendOwn.js +9 -0
  593. package/node_modules/underscore/cjs/filter.js +14 -0
  594. package/node_modules/underscore/cjs/find.js +12 -0
  595. package/node_modules/underscore/cjs/findIndex.js +6 -0
  596. package/node_modules/underscore/cjs/findKey.js +14 -0
  597. package/node_modules/underscore/cjs/findLastIndex.js +6 -0
  598. package/node_modules/underscore/cjs/findWhere.js +10 -0
  599. package/node_modules/underscore/cjs/first.js +11 -0
  600. package/node_modules/underscore/cjs/flatten.js +9 -0
  601. package/node_modules/underscore/cjs/functions.js +12 -0
  602. package/node_modules/underscore/cjs/get.js +14 -0
  603. package/node_modules/underscore/cjs/groupBy.js +10 -0
  604. package/node_modules/underscore/cjs/has.js +18 -0
  605. package/node_modules/underscore/cjs/identity.js +6 -0
  606. package/node_modules/underscore/cjs/index-default.js +11 -0
  607. package/node_modules/underscore/cjs/index.js +278 -0
  608. package/node_modules/underscore/cjs/indexBy.js +9 -0
  609. package/node_modules/underscore/cjs/indexOf.js +11 -0
  610. package/node_modules/underscore/cjs/initial.js +10 -0
  611. package/node_modules/underscore/cjs/intersection.js +21 -0
  612. package/node_modules/underscore/cjs/invert.js +13 -0
  613. package/node_modules/underscore/cjs/invoke.js +30 -0
  614. package/node_modules/underscore/cjs/isArguments.js +18 -0
  615. package/node_modules/underscore/cjs/isArray.js +8 -0
  616. package/node_modules/underscore/cjs/isArrayBuffer.js +5 -0
  617. package/node_modules/underscore/cjs/isBoolean.js +8 -0
  618. package/node_modules/underscore/cjs/isDataView.js +18 -0
  619. package/node_modules/underscore/cjs/isDate.js +5 -0
  620. package/node_modules/underscore/cjs/isElement.js +6 -0
  621. package/node_modules/underscore/cjs/isEmpty.js +20 -0
  622. package/node_modules/underscore/cjs/isEqual.js +140 -0
  623. package/node_modules/underscore/cjs/isError.js +5 -0
  624. package/node_modules/underscore/cjs/isFinite.js +9 -0
  625. package/node_modules/underscore/cjs/isFunction.js +17 -0
  626. package/node_modules/underscore/cjs/isMap.js +7 -0
  627. package/node_modules/underscore/cjs/isMatch.js +15 -0
  628. package/node_modules/underscore/cjs/isNaN.js +9 -0
  629. package/node_modules/underscore/cjs/isNull.js +6 -0
  630. package/node_modules/underscore/cjs/isNumber.js +5 -0
  631. package/node_modules/underscore/cjs/isObject.js +7 -0
  632. package/node_modules/underscore/cjs/isRegExp.js +5 -0
  633. package/node_modules/underscore/cjs/isSet.js +7 -0
  634. package/node_modules/underscore/cjs/isString.js +5 -0
  635. package/node_modules/underscore/cjs/isSymbol.js +5 -0
  636. package/node_modules/underscore/cjs/isTypedArray.js +17 -0
  637. package/node_modules/underscore/cjs/isUndefined.js +6 -0
  638. package/node_modules/underscore/cjs/isWeakMap.js +7 -0
  639. package/node_modules/underscore/cjs/isWeakSet.js +5 -0
  640. package/node_modules/underscore/cjs/iteratee.js +12 -0
  641. package/node_modules/underscore/cjs/keys.js +18 -0
  642. package/node_modules/underscore/cjs/last.js +11 -0
  643. package/node_modules/underscore/cjs/lastIndexOf.js +8 -0
  644. package/node_modules/underscore/cjs/map.js +18 -0
  645. package/node_modules/underscore/cjs/mapObject.js +18 -0
  646. package/node_modules/underscore/cjs/matcher.js +13 -0
  647. package/node_modules/underscore/cjs/max.js +31 -0
  648. package/node_modules/underscore/cjs/memoize.js +15 -0
  649. package/node_modules/underscore/cjs/min.js +31 -0
  650. package/node_modules/underscore/cjs/mixin.js +20 -0
  651. package/node_modules/underscore/cjs/negate.js +8 -0
  652. package/node_modules/underscore/cjs/noop.js +4 -0
  653. package/node_modules/underscore/cjs/now.js +6 -0
  654. package/node_modules/underscore/cjs/object.js +18 -0
  655. package/node_modules/underscore/cjs/omit.js +24 -0
  656. package/node_modules/underscore/cjs/once.js +8 -0
  657. package/node_modules/underscore/cjs/pairs.js +15 -0
  658. package/node_modules/underscore/cjs/partial.js +25 -0
  659. package/node_modules/underscore/cjs/partition.js +9 -0
  660. package/node_modules/underscore/cjs/pick.js +28 -0
  661. package/node_modules/underscore/cjs/pipe.js +12 -0
  662. package/node_modules/underscore/cjs/pluck.js +9 -0
  663. package/node_modules/underscore/cjs/property.js +13 -0
  664. package/node_modules/underscore/cjs/propertyOf.js +12 -0
  665. package/node_modules/underscore/cjs/random.js +10 -0
  666. package/node_modules/underscore/cjs/range.js +23 -0
  667. package/node_modules/underscore/cjs/reduce.js +7 -0
  668. package/node_modules/underscore/cjs/reduceRight.js +6 -0
  669. package/node_modules/underscore/cjs/reject.js +10 -0
  670. package/node_modules/underscore/cjs/rest.js +10 -0
  671. package/node_modules/underscore/cjs/restArguments.js +29 -0
  672. package/node_modules/underscore/cjs/result.js +24 -0
  673. package/node_modules/underscore/cjs/sample.js +29 -0
  674. package/node_modules/underscore/cjs/shuffle.js +8 -0
  675. package/node_modules/underscore/cjs/size.js +10 -0
  676. package/node_modules/underscore/cjs/some.js +17 -0
  677. package/node_modules/underscore/cjs/sortBy.js +26 -0
  678. package/node_modules/underscore/cjs/sortedIndex.js +17 -0
  679. package/node_modules/underscore/cjs/tap.js +9 -0
  680. package/node_modules/underscore/cjs/template.js +103 -0
  681. package/node_modules/underscore/cjs/templateSettings.js +11 -0
  682. package/node_modules/underscore/cjs/throttle.js +49 -0
  683. package/node_modules/underscore/cjs/times.js +11 -0
  684. package/node_modules/underscore/cjs/toArray.js +22 -0
  685. package/node_modules/underscore/cjs/toPath.js +11 -0
  686. package/node_modules/underscore/cjs/underscore-array-methods.js +31 -0
  687. package/node_modules/underscore/cjs/underscore.js +27 -0
  688. package/node_modules/underscore/cjs/unescape.js +7 -0
  689. package/node_modules/underscore/cjs/union.js +11 -0
  690. package/node_modules/underscore/cjs/uniq.js +38 -0
  691. package/node_modules/underscore/cjs/uniqueId.js +9 -0
  692. package/node_modules/underscore/cjs/unzip.js +17 -0
  693. package/node_modules/underscore/cjs/values.js +14 -0
  694. package/node_modules/underscore/cjs/where.js +10 -0
  695. package/node_modules/underscore/cjs/without.js +9 -0
  696. package/node_modules/underscore/cjs/wrap.js +10 -0
  697. package/node_modules/underscore/cjs/zip.js +8 -0
  698. package/node_modules/underscore/modules/.eslintrc +21 -0
  699. package/node_modules/underscore/modules/_baseCreate.js +18 -0
  700. package/node_modules/underscore/modules/_baseIteratee.js +17 -0
  701. package/node_modules/underscore/modules/_cb.js +10 -0
  702. package/node_modules/underscore/modules/_chainResult.js +6 -0
  703. package/node_modules/underscore/modules/_collectNonEnumProps.js +40 -0
  704. package/node_modules/underscore/modules/_createAssigner.js +18 -0
  705. package/node_modules/underscore/modules/_createEscaper.js +17 -0
  706. package/node_modules/underscore/modules/_createIndexFinder.js +28 -0
  707. package/node_modules/underscore/modules/_createPredicateIndexFinder.js +15 -0
  708. package/node_modules/underscore/modules/_createReduce.js +28 -0
  709. package/node_modules/underscore/modules/_createSizePropertyCheck.js +9 -0
  710. package/node_modules/underscore/modules/_deepGet.js +9 -0
  711. package/node_modules/underscore/modules/_escapeMap.js +9 -0
  712. package/node_modules/underscore/modules/_executeBound.js +13 -0
  713. package/node_modules/underscore/modules/_flatten.js +33 -0
  714. package/node_modules/underscore/modules/_getByteLength.js +4 -0
  715. package/node_modules/underscore/modules/_getLength.js +4 -0
  716. package/node_modules/underscore/modules/_group.js +15 -0
  717. package/node_modules/underscore/modules/_has.js +6 -0
  718. package/node_modules/underscore/modules/_hasObjectTag.js +3 -0
  719. package/node_modules/underscore/modules/_isArrayLike.js +8 -0
  720. package/node_modules/underscore/modules/_isBufferLike.js +6 -0
  721. package/node_modules/underscore/modules/_keyInObj.js +5 -0
  722. package/node_modules/underscore/modules/_methodFingerprint.js +37 -0
  723. package/node_modules/underscore/modules/_optimizeCb.js +21 -0
  724. package/node_modules/underscore/modules/_setup.js +43 -0
  725. package/node_modules/underscore/modules/_shallowProperty.js +6 -0
  726. package/node_modules/underscore/modules/_stringTagBug.js +13 -0
  727. package/node_modules/underscore/modules/_tagTester.js +9 -0
  728. package/node_modules/underscore/modules/_toBufferView.js +11 -0
  729. package/node_modules/underscore/modules/_toPath.js +8 -0
  730. package/node_modules/underscore/modules/_unescapeMap.js +5 -0
  731. package/node_modules/underscore/modules/after.js +8 -0
  732. package/node_modules/underscore/modules/allKeys.js +13 -0
  733. package/node_modules/underscore/modules/before.js +12 -0
  734. package/node_modules/underscore/modules/bind.js +13 -0
  735. package/node_modules/underscore/modules/bindAll.js +17 -0
  736. package/node_modules/underscore/modules/chain.js +8 -0
  737. package/node_modules/underscore/modules/chunk.js +13 -0
  738. package/node_modules/underscore/modules/clone.js +9 -0
  739. package/node_modules/underscore/modules/compact.js +6 -0
  740. package/node_modules/underscore/modules/compose.js +12 -0
  741. package/node_modules/underscore/modules/constant.js +6 -0
  742. package/node_modules/underscore/modules/contains.js +10 -0
  743. package/node_modules/underscore/modules/countBy.js +9 -0
  744. package/node_modules/underscore/modules/create.js +11 -0
  745. package/node_modules/underscore/modules/debounce.js +40 -0
  746. package/node_modules/underscore/modules/defaults.js +5 -0
  747. package/node_modules/underscore/modules/defer.js +7 -0
  748. package/node_modules/underscore/modules/delay.js +9 -0
  749. package/node_modules/underscore/modules/difference.js +13 -0
  750. package/node_modules/underscore/modules/each.js +23 -0
  751. package/node_modules/underscore/modules/escape.js +5 -0
  752. package/node_modules/underscore/modules/every.js +15 -0
  753. package/node_modules/underscore/modules/extend.js +5 -0
  754. package/node_modules/underscore/modules/extendOwn.js +7 -0
  755. package/node_modules/underscore/modules/filter.js +12 -0
  756. package/node_modules/underscore/modules/find.js +10 -0
  757. package/node_modules/underscore/modules/findIndex.js +4 -0
  758. package/node_modules/underscore/modules/findKey.js +12 -0
  759. package/node_modules/underscore/modules/findLastIndex.js +4 -0
  760. package/node_modules/underscore/modules/findWhere.js +8 -0
  761. package/node_modules/underscore/modules/first.js +9 -0
  762. package/node_modules/underscore/modules/flatten.js +7 -0
  763. package/node_modules/underscore/modules/functions.js +10 -0
  764. package/node_modules/underscore/modules/get.js +12 -0
  765. package/node_modules/underscore/modules/groupBy.js +8 -0
  766. package/node_modules/underscore/modules/has.js +16 -0
  767. package/node_modules/underscore/modules/identity.js +4 -0
  768. package/node_modules/underscore/modules/index-all.js +18 -0
  769. package/node_modules/underscore/modules/index-default.js +27 -0
  770. package/node_modules/underscore/modules/index.js +200 -0
  771. package/node_modules/underscore/modules/indexBy.js +7 -0
  772. package/node_modules/underscore/modules/indexOf.js +9 -0
  773. package/node_modules/underscore/modules/initial.js +8 -0
  774. package/node_modules/underscore/modules/intersection.js +19 -0
  775. package/node_modules/underscore/modules/invert.js +11 -0
  776. package/node_modules/underscore/modules/invoke.js +28 -0
  777. package/node_modules/underscore/modules/isArguments.js +16 -0
  778. package/node_modules/underscore/modules/isArray.js +6 -0
  779. package/node_modules/underscore/modules/isArrayBuffer.js +3 -0
  780. package/node_modules/underscore/modules/isBoolean.js +6 -0
  781. package/node_modules/underscore/modules/isDataView.js +16 -0
  782. package/node_modules/underscore/modules/isDate.js +3 -0
  783. package/node_modules/underscore/modules/isElement.js +4 -0
  784. package/node_modules/underscore/modules/isEmpty.js +18 -0
  785. package/node_modules/underscore/modules/isEqual.js +153 -0
  786. package/node_modules/underscore/modules/isError.js +3 -0
  787. package/node_modules/underscore/modules/isFinite.js +7 -0
  788. package/node_modules/underscore/modules/isFunction.js +15 -0
  789. package/node_modules/underscore/modules/isMap.js +5 -0
  790. package/node_modules/underscore/modules/isMatch.js +13 -0
  791. package/node_modules/underscore/modules/isNaN.js +7 -0
  792. package/node_modules/underscore/modules/isNull.js +4 -0
  793. package/node_modules/underscore/modules/isNumber.js +3 -0
  794. package/node_modules/underscore/modules/isObject.js +5 -0
  795. package/node_modules/underscore/modules/isRegExp.js +3 -0
  796. package/node_modules/underscore/modules/isSet.js +5 -0
  797. package/node_modules/underscore/modules/isString.js +3 -0
  798. package/node_modules/underscore/modules/isSymbol.js +3 -0
  799. package/node_modules/underscore/modules/isTypedArray.js +15 -0
  800. package/node_modules/underscore/modules/isUndefined.js +4 -0
  801. package/node_modules/underscore/modules/isWeakMap.js +5 -0
  802. package/node_modules/underscore/modules/isWeakSet.js +3 -0
  803. package/node_modules/underscore/modules/iteratee.js +10 -0
  804. package/node_modules/underscore/modules/keys.js +16 -0
  805. package/node_modules/underscore/modules/last.js +9 -0
  806. package/node_modules/underscore/modules/lastIndexOf.js +6 -0
  807. package/node_modules/underscore/modules/map.js +16 -0
  808. package/node_modules/underscore/modules/mapObject.js +16 -0
  809. package/node_modules/underscore/modules/matcher.js +11 -0
  810. package/node_modules/underscore/modules/max.js +29 -0
  811. package/node_modules/underscore/modules/memoize.js +13 -0
  812. package/node_modules/underscore/modules/min.js +29 -0
  813. package/node_modules/underscore/modules/mixin.js +18 -0
  814. package/node_modules/underscore/modules/negate.js +6 -0
  815. package/node_modules/underscore/modules/noop.js +2 -0
  816. package/node_modules/underscore/modules/now.js +4 -0
  817. package/node_modules/underscore/modules/object.js +16 -0
  818. package/node_modules/underscore/modules/omit.js +22 -0
  819. package/node_modules/underscore/modules/once.js +6 -0
  820. package/node_modules/underscore/modules/package.json +1 -0
  821. package/node_modules/underscore/modules/pairs.js +13 -0
  822. package/node_modules/underscore/modules/partial.js +24 -0
  823. package/node_modules/underscore/modules/partition.js +7 -0
  824. package/node_modules/underscore/modules/pick.js +26 -0
  825. package/node_modules/underscore/modules/pluck.js +7 -0
  826. package/node_modules/underscore/modules/property.js +11 -0
  827. package/node_modules/underscore/modules/propertyOf.js +10 -0
  828. package/node_modules/underscore/modules/random.js +8 -0
  829. package/node_modules/underscore/modules/range.js +21 -0
  830. package/node_modules/underscore/modules/reduce.js +5 -0
  831. package/node_modules/underscore/modules/reduceRight.js +4 -0
  832. package/node_modules/underscore/modules/reject.js +8 -0
  833. package/node_modules/underscore/modules/rest.js +8 -0
  834. package/node_modules/underscore/modules/restArguments.js +27 -0
  835. package/node_modules/underscore/modules/result.js +22 -0
  836. package/node_modules/underscore/modules/sample.js +27 -0
  837. package/node_modules/underscore/modules/shuffle.js +6 -0
  838. package/node_modules/underscore/modules/size.js +8 -0
  839. package/node_modules/underscore/modules/some.js +15 -0
  840. package/node_modules/underscore/modules/sortBy.js +24 -0
  841. package/node_modules/underscore/modules/sortedIndex.js +15 -0
  842. package/node_modules/underscore/modules/tap.js +7 -0
  843. package/node_modules/underscore/modules/template.js +101 -0
  844. package/node_modules/underscore/modules/templateSettings.js +9 -0
  845. package/node_modules/underscore/modules/throttle.js +47 -0
  846. package/node_modules/underscore/modules/times.js +9 -0
  847. package/node_modules/underscore/modules/toArray.js +20 -0
  848. package/node_modules/underscore/modules/toPath.js +9 -0
  849. package/node_modules/underscore/modules/underscore-array-methods.js +31 -0
  850. package/node_modules/underscore/modules/underscore.js +25 -0
  851. package/node_modules/underscore/modules/unescape.js +5 -0
  852. package/node_modules/underscore/modules/union.js +9 -0
  853. package/node_modules/underscore/modules/uniq.js +36 -0
  854. package/node_modules/underscore/modules/uniqueId.js +7 -0
  855. package/node_modules/underscore/modules/unzip.js +15 -0
  856. package/node_modules/underscore/modules/values.js +12 -0
  857. package/node_modules/underscore/modules/where.js +8 -0
  858. package/node_modules/underscore/modules/without.js +7 -0
  859. package/node_modules/underscore/modules/wrap.js +8 -0
  860. package/node_modules/underscore/modules/zip.js +6 -0
  861. package/node_modules/underscore/package.json +124 -0
  862. package/node_modules/underscore/underscore-esm-min.js +5 -0
  863. package/node_modules/underscore/underscore-esm-min.js.map +1 -0
  864. package/node_modules/underscore/underscore-esm.js +2056 -0
  865. package/node_modules/underscore/underscore-esm.js.map +1 -0
  866. package/node_modules/underscore/underscore-min.js +6 -0
  867. package/node_modules/underscore/underscore-min.js.map +1 -0
  868. package/node_modules/underscore/underscore-node-f.cjs +2180 -0
  869. package/node_modules/underscore/underscore-node-f.cjs.map +1 -0
  870. package/node_modules/underscore/underscore-node.cjs +11 -0
  871. package/node_modules/underscore/underscore-node.cjs.map +1 -0
  872. package/node_modules/underscore/underscore-node.mjs +7 -0
  873. package/node_modules/underscore/underscore-node.mjs.map +1 -0
  874. package/node_modules/underscore/underscore-umd-min.js +6 -0
  875. package/node_modules/underscore/underscore-umd-min.js.map +1 -0
  876. package/node_modules/underscore/underscore-umd.js +2064 -0
  877. package/node_modules/underscore/underscore-umd.js.map +1 -0
  878. package/node_modules/underscore/underscore.js +2064 -0
  879. package/node_modules/util-deprecate/History.md +16 -0
  880. package/node_modules/util-deprecate/LICENSE +24 -0
  881. package/node_modules/util-deprecate/README.md +53 -0
  882. package/node_modules/util-deprecate/browser.js +67 -0
  883. package/node_modules/util-deprecate/node.js +6 -0
  884. package/node_modules/util-deprecate/package.json +27 -0
  885. package/node_modules/xmlbuilder/CHANGELOG.md +438 -0
  886. package/node_modules/xmlbuilder/LICENSE +21 -0
  887. package/node_modules/xmlbuilder/README.md +86 -0
  888. package/node_modules/xmlbuilder/appveyor.yml +20 -0
  889. package/node_modules/xmlbuilder/lib/Utility.js +83 -0
  890. package/node_modules/xmlbuilder/lib/XMLAttribute.js +41 -0
  891. package/node_modules/xmlbuilder/lib/XMLCData.js +32 -0
  892. package/node_modules/xmlbuilder/lib/XMLComment.js +32 -0
  893. package/node_modules/xmlbuilder/lib/XMLDTDAttList.js +50 -0
  894. package/node_modules/xmlbuilder/lib/XMLDTDElement.js +35 -0
  895. package/node_modules/xmlbuilder/lib/XMLDTDEntity.js +56 -0
  896. package/node_modules/xmlbuilder/lib/XMLDTDNotation.js +37 -0
  897. package/node_modules/xmlbuilder/lib/XMLDeclaration.js +40 -0
  898. package/node_modules/xmlbuilder/lib/XMLDocType.js +108 -0
  899. package/node_modules/xmlbuilder/lib/XMLDocument.js +49 -0
  900. package/node_modules/xmlbuilder/lib/XMLDocumentCB.js +414 -0
  901. package/node_modules/xmlbuilder/lib/XMLDummy.js +29 -0
  902. package/node_modules/xmlbuilder/lib/XMLElement.js +111 -0
  903. package/node_modules/xmlbuilder/lib/XMLNode.js +467 -0
  904. package/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +35 -0
  905. package/node_modules/xmlbuilder/lib/XMLRaw.js +32 -0
  906. package/node_modules/xmlbuilder/lib/XMLStreamWriter.js +287 -0
  907. package/node_modules/xmlbuilder/lib/XMLStringWriter.js +341 -0
  908. package/node_modules/xmlbuilder/lib/XMLStringifier.js +163 -0
  909. package/node_modules/xmlbuilder/lib/XMLText.js +32 -0
  910. package/node_modules/xmlbuilder/lib/XMLWriterBase.js +90 -0
  911. package/node_modules/xmlbuilder/lib/index.js +53 -0
  912. package/node_modules/xmlbuilder/package.json +37 -0
  913. package/package.json +18 -7
  914. package/schemas/tool-definition.schema.json +13 -0
  915. package/scripts/check-doc-links.mjs +6 -0
  916. package/scripts/check-image-tags.sh +1 -1
  917. package/scripts/check-package-artifact.mjs +19 -0
  918. package/scripts/check-release-consistency.test.mjs +2 -2
  919. package/scripts/dependency-audit.mjs +49 -96
  920. package/scripts/dependency-audit.test.mjs +70 -106
  921. package/scripts/doctor-upgrade-plan.test.ts +205 -0
  922. package/scripts/doctor-upgrade-plan.ts +276 -0
  923. package/scripts/doctor.ts +4 -1
  924. package/scripts/docx-browser-test.mjs +56 -0
  925. package/scripts/docx-compatibility.test.mjs +39 -0
  926. package/scripts/docx-fixtures.mjs +19 -0
  927. package/scripts/e2e-console-approval-details.mjs +134 -0
  928. package/scripts/e2e-console-config-races.mjs +180 -0
  929. package/scripts/e2e-console-kb-audit.mjs +170 -0
  930. package/scripts/e2e-console-operations-audit.mjs +152 -0
  931. package/scripts/e2e-console-runtime-audit.mjs +179 -0
  932. package/scripts/e2e-console-settings-audit.mjs +125 -0
  933. package/scripts/e2e-console-troubleshooting-extra.mjs +267 -0
  934. package/scripts/e2e-console.mjs +476 -7
  935. package/scripts/export-oss.mjs +3 -0
  936. package/scripts/generate-third-party-notices.mjs +6 -2
  937. package/scripts/install.sh +1 -1
  938. package/scripts/notification-console-test.mjs +172 -0
  939. package/scripts/oss-boundary-check.mjs +3 -1
  940. package/scripts/publish-images.sh +1 -1
  941. package/scripts/release-audit.mjs +9 -1
  942. package/scripts/vendor-mammoth.mjs +130 -0
  943. package/scripts/verify-github-repo.mjs +8 -0
  944. package/scripts/verify-oss-export.mjs +3 -0
  945. package/sql/068_notification_outbox.sql +28 -0
  946. package/sql/README.en.md +8 -0
  947. package/sql/README.md +8 -0
  948. package/src/app/agent-client-runtime.test.ts +115 -2
  949. package/src/app/agent-client-runtime.ts +40 -11
  950. package/src/app/agent-knowledge.test.ts +171 -0
  951. package/src/app/agent-knowledge.ts +233 -0
  952. package/src/app/agent-tool-catalog-revision.test.ts +31 -0
  953. package/src/app/agent-tool-invocations.test.ts +7 -2
  954. package/src/app/agent-tool-invocations.ts +67 -7
  955. package/src/app/approval-continuations.mysql.test.ts +1 -1
  956. package/src/app/approval-continuations.test.ts +49 -1
  957. package/src/app/delivery-dlq-replay.mysql.test.ts +2 -2
  958. package/src/app/delivery.ts +115 -1
  959. package/src/app/engine.ts +5 -4
  960. package/src/app/http.test.ts +16 -1
  961. package/src/app/http.ts +3 -3
  962. package/src/app/kernel-boot-recovery.mysql.test.ts +132 -0
  963. package/src/app/kernel-boot-recovery.test.ts +157 -0
  964. package/src/app/kernel-usage-lifecycle.mysql.test.ts +1 -1
  965. package/src/app/kernel.ts +20 -8
  966. package/src/app/notification-outbox.test.ts +321 -0
  967. package/src/app/notification-outbox.ts +123 -0
  968. package/src/app/operational-metrics.test.ts +15 -0
  969. package/src/app/operational-metrics.ts +9 -0
  970. package/src/app/outbound.ts +28 -0
  971. package/src/app/readiness.mysql.test.ts +120 -0
  972. package/src/app/readiness.test.ts +111 -26
  973. package/src/app/readiness.ts +26 -22
  974. package/src/app/runtime-evidence-maintenance.test.ts +34 -1
  975. package/src/app/runtime-lifecycle-default.ts +7 -0
  976. package/src/app/runtime-lifecycle.ts +42 -3
  977. package/src/app/tool-approvals.test.ts +83 -0
  978. package/src/app/tool-approvals.ts +89 -34
  979. package/src/app/tool-proxy-payload.test.ts +81 -0
  980. package/src/app/tool-proxy.ts +24 -2
  981. package/src/core/config/console-diagnostic-location.test.ts +36 -0
  982. package/src/core/config/console-form-guard.test.ts +69 -0
  983. package/src/core/config/console-task-location.test.ts +64 -0
  984. package/src/core/contracts/delivery-replay.ts +1 -0
  985. package/src/core/contracts/notification-outbox.ts +54 -0
  986. package/src/core/contracts/openapi-tools.ts +16 -5
  987. package/src/core/contracts/schema-readiness.ts +11 -0
  988. package/src/core/contracts/tool-definition.ts +26 -0
  989. package/src/core/contracts/tool-guidance.test.ts +77 -0
  990. package/src/core/contracts/tool-guidance.ts +31 -0
  991. package/src/core/contracts/tool-input-limits.ts +15 -0
  992. package/src/core/contracts/tools-idempotency.test.ts +90 -0
  993. package/src/core/contracts/tools.ts +52 -9
  994. package/src/core/observability/openmetrics.test.ts +18 -0
  995. package/src/core/observability/openmetrics.ts +17 -0
  996. package/src/core/runtime/agent-execution-memory.test.ts +64 -0
  997. package/src/core/runtime/agent-execution-memory.ts +63 -0
  998. package/src/core/runtime/finish-runtime.test.ts +20 -0
  999. package/src/core/runtime/finish-runtime.ts +13 -5
  1000. package/src/core/runtime/inhub-runtime.ts +10 -2
  1001. package/src/core/runtime/notification-outbox-work.ts +15 -0
  1002. package/src/core/state/notification-outbox.ts +66 -0
  1003. package/src/core/state/state-contracts.ts +7 -0
  1004. package/src/infrastructure/config/config-approval-ledger.ts +23 -1
  1005. package/src/infrastructure/config/config-delivery-dlq-ledger.ts +26 -13
  1006. package/src/infrastructure/config/config-observability-ledger.ts +2 -0
  1007. package/src/infrastructure/config/configstore.ts +8 -4
  1008. package/src/infrastructure/schema/schema-readiness.ts +29 -0
  1009. package/src/infrastructure/state/notification-outbox-jsonl.ts +80 -0
  1010. package/src/infrastructure/state/notification-outbox-mysql.ts +100 -0
  1011. package/src/infrastructure/state/notification-outbox-storage.test.ts +325 -0
  1012. package/src/infrastructure/state/state-jsonl.ts +64 -13
  1013. package/src/infrastructure/state/state-mysql.ts +39 -5
  1014. package/src/modules/usage/contracts.ts +7 -0
  1015. package/src/modules/usage/http.ts +2 -0
  1016. package/src/modules/usage/model-continuation.test.ts +109 -0
  1017. package/src/modules/usage/model-gateway.ts +5 -1
  1018. package/src/modules/usage/output-budget.mysql.test.ts +84 -0
  1019. package/src/modules/usage/output-budget.test.ts +167 -0
  1020. package/src/modules/usage/output-budget.ts +73 -0
  1021. package/src/modules/usage/provider-stream.test.ts +22 -0
  1022. package/src/modules/usage/provider.ts +2 -3
  1023. package/src/modules/usage/repository.ts +6 -0
  1024. package/src/modules/usage/test-harness.ts +4 -2
  1025. package/src/routes/admin-approval-view.test.ts +109 -0
  1026. package/src/routes/admin-approval-view.ts +36 -0
  1027. package/src/routes/admin-notifications.test.ts +75 -0
  1028. package/src/routes/admin-notifications.ts +77 -0
  1029. package/src/routes/admin-readiness.test.ts +52 -0
  1030. package/src/routes/admin-runtime-ux.test.ts +51 -0
  1031. package/src/routes/admin-runtime-ux.ts +25 -0
  1032. package/src/routes/admin-runtime.test.ts +25 -0
  1033. package/src/routes/admin-runtime.ts +51 -8
  1034. package/src/routes/admin.ts +10 -0
  1035. package/src/routes/agent-api.test.ts +80 -1
  1036. package/src/routes/agent-api.ts +63 -4
  1037. package/src/routes/agent-tool-detail.test.ts +140 -0
  1038. package/src/routes/public-default.ts +1 -1
  1039. package/src/services/kb-agent.test.ts +84 -0
  1040. package/src/services/kb.ts +73 -0
  1041. package/src/test-support/notification-outbox-journal-crash-child.ts +20 -0
  1042. package/vendor/bailinghub-mammoth-library-1.12.0-bailinghub.1.tgz +0 -0
  1043. package/vendor/mammoth-library/LICENSE +22 -0
  1044. package/vendor/mammoth-library/SOURCE.json +57 -0
  1045. package/vendor/mammoth-library/browser/docx/files.js +14 -0
  1046. package/vendor/mammoth-library/browser/unzip.js +12 -0
  1047. package/vendor/mammoth-library/lib/document-to-html.js +469 -0
  1048. package/vendor/mammoth-library/lib/documents.js +254 -0
  1049. package/vendor/mammoth-library/lib/docx/body-reader.js +798 -0
  1050. package/vendor/mammoth-library/lib/docx/comments-reader.js +31 -0
  1051. package/vendor/mammoth-library/lib/docx/content-types-reader.js +58 -0
  1052. package/vendor/mammoth-library/lib/docx/document-xml-reader.js +30 -0
  1053. package/vendor/mammoth-library/lib/docx/docx-reader.js +226 -0
  1054. package/vendor/mammoth-library/lib/docx/files.js +80 -0
  1055. package/vendor/mammoth-library/lib/docx/notes-reader.js +28 -0
  1056. package/vendor/mammoth-library/lib/docx/numbering-xml.js +111 -0
  1057. package/vendor/mammoth-library/lib/docx/office-xml-reader.js +73 -0
  1058. package/vendor/mammoth-library/lib/docx/relationships-reader.js +43 -0
  1059. package/vendor/mammoth-library/lib/docx/style-map.js +75 -0
  1060. package/vendor/mammoth-library/lib/docx/styles-reader.js +90 -0
  1061. package/vendor/mammoth-library/lib/docx/uris.js +21 -0
  1062. package/vendor/mammoth-library/lib/html/ast.js +51 -0
  1063. package/vendor/mammoth-library/lib/html/index.js +41 -0
  1064. package/vendor/mammoth-library/lib/html/simplify.js +88 -0
  1065. package/vendor/mammoth-library/lib/images.js +31 -0
  1066. package/vendor/mammoth-library/lib/index.d.ts +86 -0
  1067. package/vendor/mammoth-library/lib/index.js +111 -0
  1068. package/vendor/mammoth-library/lib/options-reader.js +107 -0
  1069. package/vendor/mammoth-library/lib/promises.js +42 -0
  1070. package/vendor/mammoth-library/lib/raw-text.js +14 -0
  1071. package/vendor/mammoth-library/lib/results.js +72 -0
  1072. package/vendor/mammoth-library/lib/style-reader.js +365 -0
  1073. package/vendor/mammoth-library/lib/styles/document-matchers.js +100 -0
  1074. package/vendor/mammoth-library/lib/styles/html-paths.js +75 -0
  1075. package/vendor/mammoth-library/lib/styles/parser/tokeniser.js +30 -0
  1076. package/vendor/mammoth-library/lib/transforms.js +62 -0
  1077. package/vendor/mammoth-library/lib/underline.js +11 -0
  1078. package/vendor/mammoth-library/lib/unzip.js +20 -0
  1079. package/vendor/mammoth-library/lib/writers/html-writer.js +159 -0
  1080. package/vendor/mammoth-library/lib/writers/index.js +14 -0
  1081. package/vendor/mammoth-library/lib/writers/markdown-writer.js +163 -0
  1082. package/vendor/mammoth-library/lib/xml/index.js +8 -0
  1083. package/vendor/mammoth-library/lib/xml/nodes.js +70 -0
  1084. package/vendor/mammoth-library/lib/xml/reader.js +69 -0
  1085. package/vendor/mammoth-library/lib/xml/writer.js +61 -0
  1086. package/vendor/mammoth-library/lib/xml/xmldom.js +23 -0
  1087. package/vendor/mammoth-library/lib/zipfile.js +72 -0
  1088. package/vendor/mammoth-library/package.json +39 -0
  1089. package/vendor/mammoth-library/upstream-package.json +64 -0
  1090. package/vendor/mammoth-library-distribution.json +4 -0
  1091. package/web/console/assets/Accounts-CjIBO3sU.css +1 -0
  1092. package/web/console/assets/Accounts-Dhyw-7wF.js +3 -0
  1093. package/web/console/assets/AgentClients-BA0M26-I.css +1 -0
  1094. package/web/console/assets/AgentClients-DWxb8-ko.js +1 -0
  1095. package/web/console/assets/AgentTasks-DOyxANnx.css +1 -0
  1096. package/web/console/assets/AgentTasks-DUHD4dzr.js +2 -0
  1097. package/web/console/assets/Approvals-Brl-2uJq.css +1 -0
  1098. package/web/console/assets/Approvals-CQx1YWxW.js +1 -0
  1099. package/web/console/assets/Audit--QcdVlMh.js +1 -0
  1100. package/web/console/assets/Audit-DAdmOnIs.css +1 -0
  1101. package/web/console/assets/{BrandLockup-BgASiRSE.js → BrandLockup-DQcaW4Nt.js} +1 -1
  1102. package/web/console/assets/Channels-DJJU3ksE.css +1 -0
  1103. package/web/console/assets/Channels-cGS5WfQ-.js +105 -0
  1104. package/web/console/assets/ChatEntries-BYpji27B.css +1 -0
  1105. package/web/console/assets/ChatEntries-nh23Iz5O.js +7 -0
  1106. package/web/console/assets/Clients-CX5EeYio.js +3 -0
  1107. package/web/console/assets/Clients-CbZAou8E.css +1 -0
  1108. package/web/console/assets/Cost-C6oQvz9P.css +1 -0
  1109. package/web/console/assets/Cost-DOZfdNS9.js +1 -0
  1110. package/web/console/assets/Credentials--aHs57yV.css +1 -0
  1111. package/web/console/assets/Credentials-sy6W9Sac.js +1 -0
  1112. package/web/console/assets/Diagnostics-CKs27Dnv.css +1 -0
  1113. package/web/console/assets/Diagnostics-CyoM1XrZ.js +1 -0
  1114. package/web/console/assets/Executors-2Upi6bOS.css +1 -0
  1115. package/web/console/assets/Executors-BQqqiFwt.js +1 -0
  1116. package/web/console/assets/HelpTip-DLlhaGQp.js +1 -0
  1117. package/web/console/assets/HelpTip-bbDEyuqV.css +1 -0
  1118. package/web/console/assets/Kb-5R3ce4UU.js +5 -0
  1119. package/web/console/assets/Kb-BM_PYi11.css +1 -0
  1120. package/web/console/assets/{Login-DA6BASZd.js → Login-YKeUwdgo.js} +1 -1
  1121. package/web/console/assets/Projects-DHwHrPT9.css +1 -0
  1122. package/web/console/assets/Projects-Grgb6fOv.js +1 -0
  1123. package/web/console/assets/Routes-DR_Yf02e.css +1 -0
  1124. package/web/console/assets/Routes-DYgrXlRJ.js +138 -0
  1125. package/web/console/assets/Runs-CwTddJJj.js +3 -0
  1126. package/web/console/assets/Runs-D4FOvNfu.css +1 -0
  1127. package/web/console/assets/Setup-Ca0b1d1-.css +1 -0
  1128. package/web/console/assets/Setup-D_xUPNDq.js +1 -0
  1129. package/web/console/assets/Shell-BTg8Vw_L.css +1 -0
  1130. package/web/console/assets/Shell-Dfam2Uoj.js +1 -0
  1131. package/web/console/assets/StorageBuckets-7QLBpV4a.css +1 -0
  1132. package/web/console/assets/StorageBuckets-CP6e50wI.js +1 -0
  1133. package/web/console/assets/SystemSettings-BRYKyJNa.js +1 -0
  1134. package/web/console/assets/SystemSettings-HsXGx0aH.css +1 -0
  1135. package/web/console/assets/SystemStatus-B-VfRsQd.css +1 -0
  1136. package/web/console/assets/SystemStatus-CbPsDsGt.js +1 -0
  1137. package/web/console/assets/Targets-1j4-g6rC.css +1 -0
  1138. package/web/console/assets/Targets-C2LkR2AF.js +1 -0
  1139. package/web/console/assets/Tools-C9HPJqJb.css +1 -0
  1140. package/web/console/assets/Tools-C9JNJUS0.js +2 -0
  1141. package/web/console/assets/Usage-D1Mv6vGY.js +1 -0
  1142. package/web/console/assets/Usage-DMOzUsqh.css +1 -0
  1143. package/web/console/assets/UsageAccess-77LmGCm6.js +1 -0
  1144. package/web/console/assets/UsageAccess-C6ZGxEgJ.css +1 -0
  1145. package/web/console/assets/{UsageHelp-BBKIvbQ5.js → UsageHelp-BmuiE1Ew.js} +1 -1
  1146. package/web/console/assets/client-route-draft-DxZRxKPT.js +1 -0
  1147. package/web/console/assets/console-location-Csv-xsnl.js +1 -0
  1148. package/web/console/assets/form-guard-8GrFpry0.js +1 -0
  1149. package/web/console/assets/{index-65JiiUr4.js → index-B_5UfiTw.js} +1 -1
  1150. package/web/console/assets/index-MjZJEFIN.js +2 -0
  1151. package/web/console/assets/{request-BpaimqEb.js → request-rqm6MT0s.js} +1 -1
  1152. package/web/console/assets/runtime-feedback-gPfZVNvY.js +1 -0
  1153. package/web/console/assets/{schema-D0Z4kFCZ.js → schema-o3mK4mid.js} +1 -1
  1154. package/web/console/assets/task-page-location-DWiGtAln.js +1 -0
  1155. package/web/console/assets/use-list-location-FvLFt0Tq.css +1 -0
  1156. package/web/console/assets/use-list-location-cIPy2cKM.js +1 -0
  1157. package/web/console/assets/use-unsaved-form-DScKD0h9.js +1 -0
  1158. package/web/console/assets/{util-DZYfJ5Zo.js → util-B40VqOwl.js} +1 -1
  1159. package/web/console/assets/{vendor-element-8cVcdt5T.js → vendor-element-BT8tHCFk.js} +1 -1
  1160. package/web/console/assets/{vendor-mammoth-CnDA23N0.js → vendor-mammoth-CVIXVxTN.js} +1 -1
  1161. package/web/console/assets/{vendor-vue-Co7x2FW6.js → vendor-vue-DhbG0vd4.js} +7 -7
  1162. package/web/console/index.html +3 -3
  1163. package/web-admin/package-lock.json +9 -27
  1164. package/web-admin/package.json +2 -2
  1165. package/web-admin/src/client-route-draft.ts +25 -0
  1166. package/web-admin/src/components/AgentSetupPanel.vue +54 -41
  1167. package/web-admin/src/components/HelpTip.vue +4 -1
  1168. package/web-admin/src/components/ListLocationBar.vue +22 -0
  1169. package/web-admin/src/components/NotificationOutboxPanel.vue +134 -0
  1170. package/web-admin/src/console-entry.test.ts +26 -0
  1171. package/web-admin/src/console-entry.ts +20 -0
  1172. package/web-admin/src/console-location.ts +35 -0
  1173. package/web-admin/src/form-guard.ts +35 -0
  1174. package/web-admin/src/layout/Shell.vue +18 -65
  1175. package/web-admin/src/onboarding-state.test.ts +174 -0
  1176. package/web-admin/src/onboarding-state.ts +122 -0
  1177. package/web-admin/src/pages/Accounts.vue +44 -24
  1178. package/web-admin/src/pages/AgentClients.vue +47 -29
  1179. package/web-admin/src/pages/AgentTasks.vue +57 -12
  1180. package/web-admin/src/pages/Approvals.vue +105 -25
  1181. package/web-admin/src/pages/Audit.vue +15 -6
  1182. package/web-admin/src/pages/Channels.vue +136 -43
  1183. package/web-admin/src/pages/ChatEntries.vue +96 -41
  1184. package/web-admin/src/pages/Clients.vue +87 -26
  1185. package/web-admin/src/pages/Cost.vue +15 -4
  1186. package/web-admin/src/pages/Credentials.vue +63 -32
  1187. package/web-admin/src/pages/Diagnostics.vue +103 -54
  1188. package/web-admin/src/pages/Executors.vue +103 -40
  1189. package/web-admin/src/pages/Kb.vue +278 -128
  1190. package/web-admin/src/pages/Projects.vue +44 -16
  1191. package/web-admin/src/pages/Routes.vue +168 -247
  1192. package/web-admin/src/pages/Runs.vue +169 -91
  1193. package/web-admin/src/pages/Setup.vue +182 -291
  1194. package/web-admin/src/pages/StorageBuckets.vue +61 -25
  1195. package/web-admin/src/pages/SystemSettings.vue +76 -51
  1196. package/web-admin/src/pages/SystemStatus.vue +54 -30
  1197. package/web-admin/src/pages/Targets.vue +45 -17
  1198. package/web-admin/src/pages/Tools.vue +133 -68
  1199. package/web-admin/src/pages/Usage.vue +64 -25
  1200. package/web-admin/src/pages/UsageAccess.vue +11 -8
  1201. package/web-admin/src/route-call-snippets.test.ts +82 -0
  1202. package/web-admin/src/route-call-snippets.ts +178 -0
  1203. package/web-admin/src/router.ts +11 -29
  1204. package/web-admin/src/runtime-feedback.ts +43 -0
  1205. package/web-admin/src/task-page-location.ts +66 -0
  1206. package/web-admin/src/usage-output-budget.test.ts +26 -0
  1207. package/web-admin/src/usage-output-budget.ts +46 -0
  1208. package/web-admin/src/use-list-location.ts +24 -0
  1209. package/web-admin/src/use-unsaved-form.ts +38 -0
  1210. package/web-admin/tests/model-output-budget.browser.mjs +69 -0
  1211. package/security/dependency-audit-exceptions.json +0 -192
  1212. package/web/console/assets/Accounts-Bervi5JU.css +0 -1
  1213. package/web/console/assets/Accounts-DKhw_QLr.js +0 -3
  1214. package/web/console/assets/AgentClients-CM4_5HaA.js +0 -1
  1215. package/web/console/assets/AgentClients-i52AI6YV.css +0 -1
  1216. package/web/console/assets/AgentTasks-BsG850Il.css +0 -1
  1217. package/web/console/assets/AgentTasks-CkQgZTU5.js +0 -2
  1218. package/web/console/assets/Approvals-B9O9TkbO.js +0 -1
  1219. package/web/console/assets/Approvals-DlTSHl_7.css +0 -1
  1220. package/web/console/assets/Audit-2vDC1SPu.js +0 -1
  1221. package/web/console/assets/Audit-CSu6_3oD.css +0 -1
  1222. package/web/console/assets/Channels-A-GvkNBt.js +0 -105
  1223. package/web/console/assets/Channels-CCn0L1jg.css +0 -1
  1224. package/web/console/assets/ChatEntries-BLxymI67.js +0 -7
  1225. package/web/console/assets/ChatEntries-DsYtcXN6.css +0 -1
  1226. package/web/console/assets/Clients-CSHIsaWU.css +0 -1
  1227. package/web/console/assets/Clients-DeNlmvS6.js +0 -3
  1228. package/web/console/assets/Cost-CBq_L4Kz.js +0 -1
  1229. package/web/console/assets/Cost-CjT39DSZ.css +0 -1
  1230. package/web/console/assets/Credentials-DmtbctNj.js +0 -1
  1231. package/web/console/assets/Credentials-ioLP0qYN.css +0 -1
  1232. package/web/console/assets/Diagnostics-BbcRDiA-.js +0 -1
  1233. package/web/console/assets/Diagnostics-Ya05PTDp.css +0 -1
  1234. package/web/console/assets/Executors-CjhEM54c.css +0 -1
  1235. package/web/console/assets/Executors-gGgmQrDt.js +0 -1
  1236. package/web/console/assets/HelpTip-CA6Bm7Nx.css +0 -1
  1237. package/web/console/assets/HelpTip-Dtdt2tKR.js +0 -1
  1238. package/web/console/assets/Kb-CzIzd9xr.css +0 -1
  1239. package/web/console/assets/Kb-lgY6OXUz.js +0 -5
  1240. package/web/console/assets/Projects-Bm8AjsNx.css +0 -1
  1241. package/web/console/assets/Projects-DEbmB_sT.js +0 -1
  1242. package/web/console/assets/Routes-CyXV4Pba.css +0 -1
  1243. package/web/console/assets/Routes-qS6LLoyS.js +0 -124
  1244. package/web/console/assets/Runs-CvGTV8I-.css +0 -1
  1245. package/web/console/assets/Runs-DG-VLRSc.js +0 -3
  1246. package/web/console/assets/Setup-D7nxgn-9.css +0 -1
  1247. package/web/console/assets/Setup-DEpVF5uw.js +0 -1
  1248. package/web/console/assets/Shell-DgoPgK1E.js +0 -1
  1249. package/web/console/assets/Shell-ykb-tUfo.css +0 -1
  1250. package/web/console/assets/StorageBuckets-CVgpZRWY.css +0 -1
  1251. package/web/console/assets/StorageBuckets-DJtNN769.js +0 -1
  1252. package/web/console/assets/SystemSettings-0DEUgeTR.js +0 -1
  1253. package/web/console/assets/SystemSettings-BjiHyrXO.css +0 -1
  1254. package/web/console/assets/SystemStatus-CR1phiPE.js +0 -1
  1255. package/web/console/assets/SystemStatus-I11I67rw.css +0 -1
  1256. package/web/console/assets/Targets-D65l-IMB.js +0 -1
  1257. package/web/console/assets/Targets-DTb5tn6z.css +0 -1
  1258. package/web/console/assets/Tools-DU8ei6sd.css +0 -1
  1259. package/web/console/assets/Tools-DqtrINrN.js +0 -2
  1260. package/web/console/assets/Usage-B5njXNjx.js +0 -1
  1261. package/web/console/assets/Usage-CAeDGjrb.css +0 -1
  1262. package/web/console/assets/UsageAccess-CGGaWTuj.css +0 -1
  1263. package/web/console/assets/UsageAccess-ChnB4pjb.js +0 -1
  1264. package/web/console/assets/index-sLKrJd_p.js +0 -2
@@ -33,6 +33,12 @@ Business systems / channels
33
33
  | `GET /health` | Liveness: the process responds | Restart the process |
34
34
  | `GET /health/ready` | Readiness: MySQL is reachable and migrations are complete | Remove the instance from new traffic |
35
35
 
36
+ A false readiness result / HTTP 503 signals the Host or load balancer to remove traffic; it does not automatically reject every `/run` request. Deployment admission must honor that signal. The probe compares the artifact inventory with the migration ledger, not every physical table definition: manually dropping a business table while leaving its ledger intact can escape this check.
37
+
38
+ Readiness checks the actual state and configuration pools. Both databases must be complete when separate; one shared pool is checked once. JSONL state does not skip an attached MySQL configuration store. The installed artifact owns the active/retired migration inventory and SHA-256 checksums: missing active rows are pending; unknown rows, conflicting/missing/empty checksums, or an unreadable ledger are not-ready. Retired records are optional history but must match when present, and are never pending SQL. Probes only read: they do not create tables, backfill checksums, or run migrations. Legacy ledgers require the official migrator's validation/backfill in a controlled upgrade step first.
39
+
40
+ Custom MySQL state stores can expose their existing pool/query resource through the optional `RuntimeStateStore.schemaReadinessDb` contract. If absent, readiness fails rather than opening another connection or substituting the configuration database. This tightens the readiness result for older extensions while preserving type compatibility. Pure JSONL instances without SQL configuration still skip SQL checks. Existing status fields are retained; connection details and raw SQL exceptions are not returned. `migrations.pending` counts distinct missing migration filenames across resources, not databases. Distinct pools are checked separately even if they point to one schema; connection settings are never used to guess that resources can be merged.
41
+
36
42
  Readiness intentionally does not probe models, tool providers, or channels. A third-party outage must not remove the entire hub from the load balancer. Use system diagnostics and alert rules for those dependencies.
37
43
 
38
44
  `/health` exposes the process-local `observability.audit_write_failures` counter and `last_audit_failure_at`. Any non-zero value should trigger an investigation of structured `audit_write_failed` runtime log events and database health. The counter resets on process restart and does not replace external monitoring. Security-critical audit remains fail-closed; best-effort callers may degrade, but their write failures still pass through this observer first.
@@ -108,7 +114,7 @@ Primary metrics:
108
114
 
109
115
  Labels are fixed and low-cardinality. They never include job IDs, tenants, principals, route arguments, or business payloads. If an optional collector times out or fails, the endpoint still returns the remaining metrics and sets that collector's `bailinghub_metrics_collector_success` to 0. Logs contain only the collector class and failure class, never exception text or business data. The JSONL state backend can expose job metrics; without the MySQL control-plane aggregation, `control_plane` is reported as unavailable.
110
116
 
111
- The `maintenance` collector reads owner-local memory only. It does not query records, trigger reconciliation or call a model provider. Fixed sources are `usage`, `notification` and `approval`; kinds cover only existing model completion, settlement, response cleanup, usage reconciliation, reference price refresh, callbacks, delivery, approval notifications, alerts, delivery DLQ and approval continuation work. Completion counters describe Promise/continuation outcomes, not recipient delivery acknowledgements. An approval pass can complete with failed individual records; check the last-page `failed` sample as well. Counters reset when the process/owner is recreated. Last-page progress is not the persisted pending/unknown backlog or its oldest age, and has_more is not an exact backlog size. Unavailable optional modules do not emit invented zero samples.
117
+ The `maintenance` collector reads owner-local work snapshots and read-only notification outbox aggregates. It does not expose notification bodies, trigger reconciliation or call a model provider. Fixed sources are `usage`, `notification` and `approval`; kinds cover only existing model completion, settlement, response cleanup, usage reconciliation, reference price refresh, callbacks, delivery, approval notifications, alerts, delivery DLQ and approval continuation work. Completion counters describe Promise/continuation outcomes, not recipient delivery acknowledgements. An approval pass can complete with failed individual records; check the last-page `failed` sample as well. Counters reset when the process/owner is recreated. Last-page progress is not the persisted pending/unknown backlog or its oldest age, and has_more is not an exact backlog size. Unavailable optional modules do not emit invented zero samples.
112
118
 
113
119
  At minimum, alert on collector failures, expired leases, sustained oldest-queue age above the service objective, increases in audit-write failures, expected executors becoming offline, and abnormal recent error or rejection ratios.
114
120
 
@@ -143,9 +149,9 @@ The new stage-diagnostic event records cache state, index/credential/query-embed
143
149
 
144
150
  ## 5. Upgrades
145
151
 
146
- 1. Back up MySQL.
147
- 2. Run `npm run release:check` outside production.
148
- 3. Run forward-only migrations from one deployment step. Do not let every replica migrate concurrently.
152
+ 1. Identify source/target artifacts and state/configuration stores using the [compatibility policy](COMPATIBILITY.en.md) and target-version guide. A [read-only upgrade plan](UPGRADE_PLAN.en.md) can help review the supplied evidence.
153
+ 2. Run `npm run release:check` outside production and rehearse the upgrade and consistent backup restoration.
154
+ 3. Stop admission to every instance and other writer sharing those stores, drain accepted work, and retain a consistent backup. Then run the target migrator once per distinct database. Do not assume online migration or mixed-version operation is safe without separate validation.
149
155
  4. Start a new replica and wait for `/health/ready` to return 200.
150
156
  5. Replace old replicas gradually while observing queue, errors, and lease recovery.
151
157
 
@@ -157,7 +163,7 @@ Back up the complete MySQL database, object-storage media and knowledge-source f
157
163
 
158
164
  Recovery order:
159
165
 
160
- 1. Stop traffic to all hub replicas.
166
+ 1. Stop admission to all hub replicas and other writers sharing the stores, and confirm that background SQL, approvals and notification work have drained. Removing incoming traffic alone does not stop writes.
161
167
  2. Restore MySQL and shared object storage.
162
168
  3. Start one build compatible with the restored migration level.
163
169
  4. Verify readiness, diagnostics, and a representative trace.
@@ -172,7 +178,13 @@ Recovery order:
172
178
  - Security-critical tool audit is fail-closed. Best-effort operational audit must still feed metrics and alerts.
173
179
  - Graceful close drains accepted callback, delivery, approval-notification, alert and DLQ continuations within the shared Kernel budget before closing database/channel resources. A timeout preserves resources for another close attempt. Background failure logs contain fixed work kinds only.
174
180
  - Native delivery DLQs retain channel credentials. Custom `X-notify` DLQs requeue only the original failed notification child; queued acknowledges executor admission, not receipt. A permanent DLQ marker is saved atomically with admission, so repeated calls or lost resolve replies do not admit it again or rerun the business parent. Legacy entries are checked against the original job; binding conflicts return 409 and adapters without replay ports return 503.
175
- - This drain does not provide a complete SIGKILL-safe notification outbox. Created executor jobs retain durable queue recovery; direct webhooks and the gap between parent termination and child creation remain separate recovery boundaries. Receivers should deduplicate original event identities; partial or unknown receipt must not be blindly resent.
181
+ - Historical v0.9.3 drain does not provide a complete SIGKILL-safe notification outbox. Core v0.9.4 adds [durable notifications](NOTIFICATION_DURABILITY.en.md) and migration 068: new terminal transitions and approval creation commit alongside intents, and recovery sends notifications without rerunning business tasks. Ordinary alerts and legacy adapters retain best-effort boundaries. Receivers deduplicate stable event IDs; partial or unknown receipt must not be blindly resent.
182
+
183
+ ### Standalone boot-recovery close barrier (unreleased candidate)
184
+
185
+ This candidate adds a close barrier that is not included in the published Core v0.9.4 artifact. An unfired recovery timer is cancelled; once recovery has started, `kernel.close(drainMs)` waits for target refresh, queries, audits and requeue work to settle. On `boot recovery drain timed out`, Kernel preserves resources and stops admitting new work. Investigate blockers such as database lock waits, then retry `close()` on **the same Kernel instance**; do not force-close its connection pool to bypass the barrier.
186
+
187
+ Retry applies to the Kernel API. The default CLI exits with status 1 after a failed signal shutdown and does not retry automatically; another `server.shutdown()` call is not a Kernel close retry. This barrier does not protect against forced process exit or replace durable recovery and business-result reconciliation.
176
188
 
177
189
  ## 8. Security Baseline
178
190
 
@@ -193,3 +205,7 @@ Recovery order:
193
205
  - A real `/run`, tool call, trace, and result delivery have completed.
194
206
  - Backup restoration has been verified.
195
207
  - Alerts cover queue backlog, error rate, executor offline state, and delivery dead letters.
208
+
209
+ ### Core v0.9.4 durable-notification metrics
210
+
211
+ `bailinghub_notification_outbox_available{source}` reports durable port availability; `bailinghub_notification_outbox_records{source,status}` reports status counts. `bailinghub_notification_outbox_oldest_pending_age_seconds{source}` and `bailinghub_notification_outbox_expired_leases{source}` report oldest pending age and expired claims. Sources are fixed to `jobs` / `approvals`. These are store aggregates rather than owner-local counters. Unsupported stores emit available=0 without invented zero backlogs. Query errors follow collector failure/timeout handling and never trigger delivery. See [durable notifications](NOTIFICATION_DURABILITY.en.md) for migration 068 and recovery/rollback boundaries; historical v0.9.3 graceful drain alone does not provide this recovery.
@@ -56,6 +56,12 @@
56
56
  | `GET /health` | liveness,确认进程仍在响应 | 进程应重启 |
57
57
  | `GET /health/ready` | readiness,确认 MySQL 可达且迁移齐全 | 暂时不要把新流量发给该实例 |
58
58
 
59
+ readiness 的 false / HTTP 503 是供 Host 或负载均衡摘流量的信号,不自动代表所有 `/run` 请求都被拦截;部署方需要据此实施流量准入。它检查制品清单与迁移账本,不逐表比对物理 DDL,无法发现“保留完整账本但手工删除业务表”等漂移。
60
+
61
+ readiness 使用实际 state/configuration 连接池检查各自账本;分库时两个库都必须齐全,共用同一池时只查一次。JSONL state 如果同时接入 MySQL configuration,仍检查后者。检查以安装制品的 active/retired 迁移清单和 SHA-256 为准:缺少 active 记录返回 pending;未知记录、摘要冲突、缺失/空摘要或账本不可读均返回 not-ready。retired 记录可以不存在,存在时必须匹配,永不作为待执行 SQL。探针只读,不建表、不补摘要、不迁移;旧账本必须先在受控升级步骤执行官方 migrator 完成校核/补录。
62
+
63
+ 自定义 MySQL state store 的 `RuntimeStateStore.schemaReadinessDb` 是可选类型扩展,应返回正在使用的池/查询资源供固定只读探针使用。未提供时 readiness 明确失败,不会另开连接或误用 configuration 库代验;这收紧了旧扩展的就绪判定。纯 JSONL 且无 SQL configuration 的实例仍跳过数据库检查。接口保留既有状态字段,不返回连接地址或原始 SQL 异常。`migrations.pending` 是各资源缺少的迁移文件名去重计数,不代表数据库数量;不同池即使指向同库也分别检查,不按配置地址猜测合并。
64
+
59
65
  readiness 不检查模型、工具源、渠道等外部业务依赖。某个模型服务波动不应导致整个中枢实例被负载均衡摘除;这些依赖由控制台“系统体检”和告警规则持续检查。
60
66
 
61
67
  `/health` 的 `observability.audit_write_failures` 是当前进程累计的审计写入失败数,`last_audit_failure_at` 是最后失败时间。数值大于 0 时应立即检索运行日志中的结构化事件 `audit_write_failed` 并检查数据库;该计数随进程重启归零,不替代外部监控。安全关键审计仍然 fail-closed,允许 best-effort 的运行事件即使被调用方降级,也会先经过该统一观测层。
@@ -133,7 +139,7 @@ scrape_configs:
133
139
 
134
140
  指标标签是固定、低基数集合,不包含 `job_id`、租户、主体、路由参数或业务载荷。单个可选采集器超时或失败时,端点仍返回其余指标,并把对应 `bailinghub_metrics_collector_success` 置为 0;日志只记录采集器类别和失败类型,不记录异常正文或业务数据。JSONL 状态后端可提供任务指标,但没有 MySQL 控制面聚合时,`control_plane` 会标记为不可用。
135
141
 
136
- `maintenance` 采集器只读当前 owner 内存,不查询明细、不触发核对或模型请求。固定 source 为 `usage`、`notification`、`approval`;kind 只包含现有模型完成、结算、响应清理、usage 核对、价格刷新、回调、通知送达、审批通知、告警、送达 DLQ 和审批续执行。工作完成数统计 Promise/continuation 的终态,不等于接收方确认送达次数;一轮审批核对可完成但保留失败记录,应同时看 last_page 的 `failed`。进程/owner 重建会重置这些计数。last_page 不是数据库里 pending/unknown 的总数或最老年龄,`has_more=1` 也不是精确积压量;不可用的可选模块不输出伪造零数据。
142
+ `maintenance` 采集器读取当前 owner 的维护内存快照,并对通知 outbox 读取只读聚合;不返回通知正文、不触发核对或模型请求。固定 source 为 `usage`、`notification`、`approval`;kind 只包含现有模型完成、结算、响应清理、usage 核对、价格刷新、回调、通知送达、审批通知、告警、送达 DLQ 和审批续执行。工作完成数统计 Promise/continuation 的终态,不等于接收方确认送达次数;一轮审批核对可完成但保留失败记录,应同时看 last_page 的 `failed`。进程/owner 重建会重置这些计数。last_page 不是数据库里 pending/unknown 的总数或最老年龄,`has_more=1` 也不是精确积压量;不可用的可选模块不输出伪造零数据。
137
143
 
138
144
  建议至少告警:
139
145
 
@@ -183,9 +189,9 @@ scrape_configs:
183
189
 
184
190
  ## 5. 发布与升级
185
191
 
186
- 1. 备份数据库。
187
- 2. 在一个非生产环境运行 `npm run release:check`。
188
- 3. 运行数据库迁移;迁移脚本只向前执行,账本位于 `bz_schema_migrations`。
192
+ 1. 按[兼容性与升级](兼容性与升级.md)及目标版本指南核对源/目标制品和 state/configuration 存储;可先生成[只读升级计划](UPGRADE_PLAN.md)。
193
+ 2. 在一个非生产环境运行 `npm run release:check`,验证升级及一致性备份恢复。
194
+ 3. 停止所有共享存储的实例和其他写入者接收新工作,完成排空并保存一致性备份,再对每个不同的数据库运行一次目标版本迁移;账本位于 `bz_schema_migrations`。未经单独验证,不假定在线迁移或新旧版本混跑安全。
189
195
  4. 启动新实例并等待 `/health/ready` 返回 200。
190
196
  5. 逐个替换旧实例,观察队列、错误率和租约恢复。
191
197
  6. 确认无异常后再清理旧镜像。
@@ -204,7 +210,7 @@ scrape_configs:
204
210
 
205
211
  恢复顺序:
206
212
 
207
- 1. 停止所有中枢副本接收流量。
213
+ 1. 停止所有中枢副本和其他共享存储写入者接收新工作,确认后台 SQL、审批及通知等工作已经排空;仅摘除入口流量不等于停止写入。
208
214
  2. 恢复 MySQL 与共享对象存储。
209
215
  3. 使用与备份迁移版本兼容的中枢镜像启动一个实例。
210
216
  4. 检查 `/health/ready`、系统体检和关键任务 trace。
@@ -219,7 +225,13 @@ scrape_configs:
219
225
  - 审计写入失败:安全关键工具调用按 fail-closed 处理;非关键运行事件不阻塞业务,但应进入运维告警与指标。
220
226
  - 正常关闭:Kernel 按同一关闭预算等待已接受的回调、送达派生、审批通知、告警和 DLQ 插入,再释放数据库/渠道资源;排空超时保留资源,宿主可在工作完成后重试 `close()`。后台失败日志只报告固定工作类别。
221
227
  - 送达死信重投:内置渠道继续通过渠道凭证发送;自定义 `X-notify` 死信只重排原失败通知子任务,回复 `queued` 表示已进入执行器队列。永久 DLQ 重投标记与原子入队一起保存,重复请求或 resolve 回包丢失不会重复入队,业务父任务不会重跑。旧死信按原 Job 验证承接器,绑定不符返回 409,旧扩展缺少重投端口返回 503;人工可检查原通知子任务。
222
- - 上述排空不提供 SIGKILL 后的全量通知 outbox:已创建的执行器任务仍由持久队列恢复;直接 webhook 和父终态到通知子任务创建之间的持久补投仍是独立边界。接收方需要按原事件 ID 去重,部分或未知送达不能盲目重发。
228
+ - 历史 v0.9.3 的排空不提供 SIGKILL 后的全量通知 outbox。Core v0.9.4 增加[通知持久化](NOTIFICATION_DURABILITY.md)和 068 迁移:新终态/审批创建与意图同事务,重启仅补通知;普通告警及旧扩展保留尽力发送边界。接收方仍需按事件 ID 去重,部分或未知送达不能盲目重发。
229
+
230
+ ### Standalone 启动恢复关闭屏障(未发布候选)
231
+
232
+ 本候选新增的关闭屏障尚不包含在已发布的 Core v0.9.4 中。启动恢复未触发时取消定时器;已经触发时,`kernel.close(drainMs)` 等待目标刷新、恢复查询、审计及重新排队完成。出现 `boot recovery drain timed out` 时,Kernel 保留资源并停止接收新工作;宿主应排查数据库锁等待等阻塞,随后在**同一个 Kernel 实例**重试 `close()`,不要强关连接池绕过屏障。
233
+
234
+ 此重试能力属于 Kernel API。默认 CLI 的信号停机失败会以状态码 1 退出,不提供自动重试;重复调用 `server.shutdown()` 也不等于重试 Kernel 关闭。该屏障不承诺抵抗强制退出,也不替代持久恢复和业务结果核对。
223
235
 
224
236
  ## 8. 安全基线
225
237
 
@@ -241,3 +253,7 @@ scrape_configs:
241
253
  - 至少跑通一次真实 `/run`、工具调用、trace 和结果回传。
242
254
  - 已验证备份可恢复。
243
255
  - 已设置队列积压、错误率、executor 离线和送达死信告警。
256
+
257
+ ### Core v0.9.4 的持久通知指标
258
+
259
+ `bailinghub_notification_outbox_available{source}` 表示内置持久端口可用性;`bailinghub_notification_outbox_records{source,status}` 为各状态数量;`bailinghub_notification_outbox_oldest_pending_age_seconds{source}` 和 `bailinghub_notification_outbox_expired_leases{source}` 为最老待处理年龄及过期领取数。source 固定为 `jobs` / `approvals`。这些聚合从持久仓储读取,区别于重启后归零的后台 Promise 计数;旧扩展缺少能力时只输出 available=0,不捏造 backlog=0。查询失败沿用采集失败/超时状态,不触发补发。
@@ -99,7 +99,7 @@ node bailing-executor.mjs --hub <中枢地址> --targets <目标名> \
99
99
 
100
100
  **第 9 步 · 给 AI 接工具**(要"能查、能办"时,「工具源」+「审批意图」):
101
101
 
102
- 1. 业务系统声明可调接口 + 实现验签中间件。**PHP 业务直接用 SDK**(`sdk/php/`,零依赖):控制器方法标 `#[AiTool(...)]` 注解(完整字段注册表见 CONTRACT §2.4a,构建期自动体检),`SpecServer` 一行挂出 `/.well-known/bailing/tools.json`,`Verify::toolCall` 即验签;其他语言照 CONTRACT 手写 openapi.json + 验签(参考 `docs/examples/bailing-tool-verify.php`);
102
+ 1. 业务系统声明可调接口 + 实现验签中间件。**PHP 业务直接用 SDK**(`sdk/php/`,零依赖):控制器方法标 `#[AiTool(...)]` 注解(完整字段注册表见 CONTRACT §2.4a,构建期自动体检),`SpecServer` 一行挂出 `/.well-known/bailing/tools.json`,`Verify::toolCall` 即验签;PHP 7、Node.js、Python、Java、Go、.NET 也有官方 SDK(见 `sdk/` 各语言 README);按所用语言选择声明构建、验签和授权接缝。不使用 SDK 时按 CONTRACT 实现,并用冻结测试向量验证;
103
103
  2. 控制台「工具源」注册:base_url + 签名密钥 + spec(粘贴或 URL 拉取,推荐业务把 spec 发布到 `/.well-known/bailing/tools.json` 并开自动刷新)。URL 来源只有“签名保护”和“允许公开”两项可选,默认前者;只有你明确接受任何 URL 访问者都能看到接口路径、参数和风险声明时,才选后者。签名保护刷新会在正确签名读取后补做未签名/错误签名负向探测,未实测通过就拒绝覆盖、继续用旧缓存;允许公开以未签名请求读取,不会偷偷改用签名。列表把“期望策略”和“实测结果”分开显示;PHP/PHP7 SDK 在受保护响应上自动加 `Cache-Control: private, no-store`。业务侧新标注的接口会自动成为工具,清单增删/风险变化会审计并告警;「工具清单」预览能看到哪些接口进来了、哪些被跳过及原因;「授权探针」另行显示业务侧是否对合成越权主体 fail-closed;页面右上「开发文档」跳转官网对应文档;
104
104
  3. 路由挂 `tools`:`{"sources":[{"provider":"你的工具源","allow":["tenant.staff.*"],"subject_field":"operator_uid"}],"max_calls":5}` ——每个来源的 `allow` 是 scope 白名单(双闸:业务标了 ∩ 路由允许才暴露);`subject_field` 指明 metadata 里哪个字段是操作主体,业务后端触发时写入(全程不经 LLM);跨系统场景可在 `sources` 继续添加来源;
105
105
  4. 完成。llm 走 function-calling 循环;执行器大脑(自研智能体 / 脚本 / 第三方运行时)认领件里自带工具清单 + `tool_token`,curl 中枢代理即可调用——两条路走**同一套**白名单/风险闸/限流/审计/签名出口。
package/docs/README.en.md CHANGED
@@ -6,7 +6,16 @@ This directory contains public documentation for the open-source BailingHub proj
6
6
 
7
7
  | Document | Purpose |
8
8
  |---|---|
9
+ | [RELEASE_NOTES_v0.10.0.en.md](RELEASE_NOTES_v0.10.0.en.md) · [Chinese](RELEASE_NOTES_v0.10.0.md) | v0.10.0: on-demand knowledge, console consistency, larger arguments and model budgets. |
10
+ | [UPGRADE_v0.10.0.en.md](UPGRADE_v0.10.0.en.md) · [Chinese](UPGRADE_v0.10.0.md) | No new SQL from 0.9.4; readiness, client pairing, explicit policies and rollback. |
11
+ | [AGENT_KNOWLEDGE_API.en.md](AGENT_KNOWLEDGE_API.en.md) · [Chinese](AGENT_KNOWLEDGE_API.md) | Agent-only knowledge hints, search, authorized references and bounded reads. |
12
+ | [MODEL_OUTPUT_BUDGET.en.md](MODEL_OUTPUT_BUDGET.en.md) · [Chinese](MODEL_OUTPUT_BUDGET.md) | Default budgets, service ceilings, provider parameters and reasoning scope. |
13
+ | [MODEL_CONTINUATION.en.md](MODEL_CONTINUATION.en.md) · [Chinese](MODEL_CONTINUATION.md) | Host continuation, original-operation recovery and tool deduplication. |
9
14
  | [IMPLEMENTATION_STATUS.en.md](IMPLEMENTATION_STATUS.en.md) · [Chinese](IMPLEMENTATION_STATUS.md) | Core ownership, formal releases versus main, public evidence, and uncovered scope. |
15
+ | [RELEASE_NOTES_v0.9.4.en.md](RELEASE_NOTES_v0.9.4.en.md) · [Chinese](RELEASE_NOTES_v0.9.4.md) | v0.9.4: DOCX dependency remediation, durable notifications and console recovery. |
16
+ | [UPGRADE_v0.9.4.en.md](UPGRADE_v0.9.4.en.md) · [Chinese](UPGRADE_v0.9.4.md) | Explicit migration 068, state/configuration databases, event deduplication and rollback limits. |
17
+ | [NOTIFICATION_DURABILITY.en.md](NOTIFICATION_DURABILITY.en.md) · [Chinese](NOTIFICATION_DURABILITY.md) | Notification persistence, recovery, operator actions, persistent metrics and external delivery limits. |
18
+ | [DOCX_DEPENDENCY.en.md](DOCX_DEPENDENCY.en.md) · [Chinese](DOCX_DEPENDENCY.md) | Pinned Mammoth library provenance, CLI-chain removal and strict auditing. |
10
19
  | [RELEASE_NOTES_v0.9.3.en.md](RELEASE_NOTES_v0.9.3.en.md) · [Chinese](RELEASE_NOTES_v0.9.3.md) | v0.9.3: bounded bodies, graceful notification close and original-notification DLQ replay, with maintenance metrics. |
11
20
  | [UPGRADE_v0.9.3.en.md](UPGRADE_v0.9.3.en.md) · [Chinese](UPGRADE_v0.9.3.md) | Explicit migration 067, matching DLQ/state adapters, rollback manifests and preserved markers. |
12
21
  | [RELEASE_NOTES_v0.9.2.en.md](RELEASE_NOTES_v0.9.2.en.md) · [Chinese](RELEASE_NOTES_v0.9.2.md) | v0.9.2: secure installation, automatic settlement and original approval continuation, with deployment diagnostics and process tests. |
package/docs/README.md CHANGED
@@ -8,7 +8,16 @@
8
8
 
9
9
  | 文档 | 用途 |
10
10
  |---|---|
11
+ | [RELEASE_NOTES_v0.10.0.md](RELEASE_NOTES_v0.10.0.md) · [English](RELEASE_NOTES_v0.10.0.en.md) | v0.10.0:知识按需读取、后台交互、大参数与模型预算。 |
12
+ | [UPGRADE_v0.10.0.md](UPGRADE_v0.10.0.md) · [English](UPGRADE_v0.10.0.en.md) | 相对 0.9.4 无新 SQL;readiness、配套客户端、显式策略与回退边界。 |
13
+ | [AGENT_KNOWLEDGE_API.md](AGENT_KNOWLEDGE_API.md) · [English](AGENT_KNOWLEDGE_API.en.md) | 智能体专用的知识提示、搜索、受授权引用与有界分页读取。 |
14
+ | [MODEL_OUTPUT_BUDGET.md](MODEL_OUTPUT_BUDGET.md) · [English](MODEL_OUTPUT_BUDGET.en.md) | 默认预算、服务上限、供应商参数与思考语义。 |
15
+ | [MODEL_CONTINUATION.md](MODEL_CONTINUATION.md) · [English](MODEL_CONTINUATION.en.md) | 宿主续段、原 operation 恢复和工具防重的责任边界。 |
11
16
  | [IMPLEMENTATION_STATUS.md](IMPLEMENTATION_STATUS.md) · [English](IMPLEMENTATION_STATUS.en.md) | Core 能力归属、正式发行与主分支状态、公开证据和未覆盖范围。 |
17
+ | [RELEASE_NOTES_v0.9.4.md](RELEASE_NOTES_v0.9.4.md) · [English](RELEASE_NOTES_v0.9.4.en.md) | v0.9.4:DOCX 依赖处置、通知持久化与控制台补发。 |
18
+ | [UPGRADE_v0.9.4.md](UPGRADE_v0.9.4.md) · [English](UPGRADE_v0.9.4.en.md) | 068 显式迁移、状态/配置库、事件去重和回退限制。 |
19
+ | [NOTIFICATION_DURABILITY.md](NOTIFICATION_DURABILITY.md) · [English](NOTIFICATION_DURABILITY.en.md) | 通知保存、恢复、人工处置、持久指标和外部送达边界。 |
20
+ | [DOCX_DEPENDENCY.md](DOCX_DEPENDENCY.md) · [English](DOCX_DEPENDENCY.en.md) | 固定 Mammoth 库来源、CLI 链移除和严格审计。 |
12
21
  | [RELEASE_NOTES_v0.9.3.md](RELEASE_NOTES_v0.9.3.md) · [English](RELEASE_NOTES_v0.9.3.en.md) | v0.9.3:有限收包、通知关闭与原通知死信重投,含维护指标。 |
13
22
  | [UPGRADE_v0.9.3.md](UPGRADE_v0.9.3.md) · [English](UPGRADE_v0.9.3.en.md) | 067 显式迁移、配套 DLQ/state 仓储、回退 manifest 与标记保留。 |
14
23
  | [RELEASE_NOTES_v0.9.2.md](RELEASE_NOTES_v0.9.2.md) · [English](RELEASE_NOTES_v0.9.2.en.md) | v0.9.2:安全安装、自动结算与原审批补续,含部署诊断与进程回归。 |
@@ -1,5 +1,5 @@
1
- # Current release: Core 0.9.1
1
+ # Current release: Core 0.10.0
2
2
 
3
- Core 0.9.1 fixes asynchronous usage shutdown, adds a public capability/evidence index, and includes general security governance. No new APIs, SQL, plan rules, or client features are introduced. SDK 0.7.0 / DSH 0.7.0 remain unchanged.
3
+ Core 0.10.0 adds Agent-only on-demand knowledge, full tool guidance and explicit model-output policies, with onboarding, draft, approval and diagnostic interaction fixes. No new SQL is added relative to 0.9.4. Existing clients, model configurations and bundled chat retain compatible behavior. MCP / Agent Client SDK 0.8.0 and DSH 0.8.0 upgrade independently; hosts implement their own task continuation.
4
4
 
5
- [Core 0.9.1 release notes](RELEASE_NOTES_v0.9.1.en.md) · [Upgrade guide](UPGRADE_v0.9.1.en.md) · [Billing contract](MODEL_BILLING.en.md) · [简体中文](RELEASE_NOTES_NEXT.md)
5
+ [Core 0.10.0 release notes](RELEASE_NOTES_v0.10.0.en.md) · [Upgrade guide](UPGRADE_v0.10.0.en.md) · [简体中文](RELEASE_NOTES_NEXT.md)
@@ -1,5 +1,5 @@
1
- # 当前版本:Core 0.9.1
1
+ # 当前版本:Core 0.10.0
2
2
 
3
- Core 0.9.1 修复异步 usage 工作关闭等待,增加公开能力与证据索引,并纳入通用安全治理。没有新增 API、SQL、套餐或客户端功能;SDK 0.7.0 / DSH 0.7.0 不变。
3
+ Core 0.10.0 增加智能体专用的知识按需搜索与读取、工具完整指导和显式模型预算,并修复首次接入、草稿、审批与排障交互。相对 0.9.4 无新增 SQL;旧客户端、旧模型配置和自带聊天保留兼容行为。MCP / Agent Client SDK 0.8.0、DSH 0.8.0 独立升级,宿主自行实现任务续段。
4
4
 
5
- [Core 0.9.1 版本说明](RELEASE_NOTES_v0.9.1.md) · [升级指南](UPGRADE_v0.9.1.md) · [计费契约](MODEL_BILLING.md) · [English](RELEASE_NOTES_NEXT.en.md)
5
+ [Core 0.10.0 版本说明](RELEASE_NOTES_v0.10.0.md) · [升级指南](UPGRADE_v0.10.0.md) · [English](RELEASE_NOTES_NEXT.en.md)
@@ -0,0 +1,58 @@
1
+ # Core v0.10.0: Discover capabilities, then read the knowledge you need
2
+
3
+ [简体中文](RELEASE_NOTES_v0.10.0.md)
4
+
5
+ A local agent checking inventory should not always receive several unrelated documents. A larger page design should not hit a small argument limit before dispatch. Relative to public 0.9.4, Core 0.10.0 adds on-demand knowledge and tool guidance, aligns bounded argument capacity, and improves model-budget configuration, onboarding and diagnostics.
6
+
7
+ The component set is **Core 0.10.0, MCP / Agent Client SDK 0.8.0 and DSH 0.8.0**. These are independent releases. Existing tool clients and bundled chat remain usable; update the corresponding consumer when adopting new host features or fixing its independent argument limit. No new SQL is added relative to 0.9.4, and this is not a 1.0 stability declaration.
8
+
9
+ ## What changes
10
+
11
+ ### Agents can read hints before requesting documents
12
+
13
+ New Agent Session knowledge `capabilities / search / read` endpoints support explicit negotiation. A host that selects `knowledge_delivery: "on_demand"` receives bounded hints and reads authorized, revision-bound references only when needed. Search and pagination have byte/count/expiry limits. Expired references or changed authority require rediscovery; knowledge never bypasses subject, route or approval boundaries.
14
+
15
+ Clients that omit the option retain inline knowledge. **Bundled chat, embed and widget retain server-side retrieval and full context assembly.** Knowledge and execution summaries are reference material, not permission grants or a complete user-level long-term memory system.
16
+
17
+ ### Short descriptions no longer silently discard longer guidance
18
+
19
+ Discovery keeps short descriptions and identifies available guidance and actual truncation separately. Named guidance reads recheck current authority and capability revision. Standard summary, description, ACC guidance and the first example are retained within bounds. Discovery distinguishes authorized candidates, returned results and an unknown exact match total; a full result list is not proof of exact relevance.
20
+
21
+ Discovery revisions remain separate from frozen execution fingerprints. Guidance-only changes do not require repeating an approved business operation; original invocations retain their identity and arguments.
22
+
23
+ ### Larger arguments stay intact and limits identify their boundary
24
+
25
+ Tool arguments are measured as the UTF-8 bytes of actual `JSON.stringify(arguments)`, with a **1 MiB** maximum and **2 MiB** tool-call HTTP envelopes. Core and the independent MCP/SDK limits align. Objects stay objects. Capability schemas, signatures, authority, approvals, idempotency and the business system's own limits remain effective.
26
+
27
+ Oversize replies retain `arguments_too_large`, `not_dispatched` and safe actual/allowed or observed byte counts, never the body. Full approval arguments remain linked to their digest; notifications contain bounded previews and the console cannot approve before loading the complete arguments. Updating Core alone does not change an older client's own smaller limit.
28
+
29
+ ### Default output budgets and service ceilings are separate
30
+
31
+ An optional explicit policy declares a default budget, service ceiling, actual output parameter and `completion_total / final_answer` scope. Operators verify the real model route; Core neither guesses from model names nor enlarges every budget. Existing services keep their configuration and behavior. Image tools do not use chat output budgets.
32
+
33
+ The wrong parameter produces a clear pre-dispatch rejection rather than silently renaming `max_tokens` to `max_completion_tokens`. Original operations and digests stay intact. A model-output cutoff is distinct from transport uncertainty; the host decides any next segment within task authority. **Core neither retries the model automatically nor implements a client's long-task continuation loop.**
34
+
35
+ ### Setup and troubleshooting retain context
36
+
37
+ Onboarding, invocation examples and permission wording are clearer. Routes, clients and tool sources protect unsaved forms. Approval continuation differs from a new task rerun; diagnostic navigation preserves filters, tabs and return positions. Late responses cannot overwrite the current object. Drawer help is placed behind question marks while risks and errors remain visible, and login-password autofill is blocked in configuration forms.
38
+
39
+ The read-only `doctor --upgrade-plan` compares explicitly supplied artifacts and redacted migration snapshots without connecting to a database or applying migrations. Kernel boot recovery participates in shutdown drain. Readiness checks actual state/configuration resources and full migration digests. Custom MySQL stores must expose `schemaReadinessDb` or fail closed; see the upgrade guide.
40
+
41
+ ## Who needs to change
42
+
43
+ | User | Impact |
44
+ | --- | --- |
45
+ | Hub operators | Upgrade the complete artifact, back up and drain, and verify actual storage readiness. Explicit model policies are opt-in; existing budgets do not change automatically. |
46
+ | Business backends | Existing HTTP/HMAC/ACC identity and authority remain intact. No endpoint rewrite is required. Keep business field, body and storage limits. |
47
+ | MCP/SDK and DSH host developers | Adopt 0.8.0 for larger arguments, on-demand knowledge, budget helpers and disclosure confirmation. Never rewrite saved requests. Hosts still own final model serialization, executable tool registration and task loops. |
48
+ | Kernel Host developers | Default stores support actual-resource readiness. Custom MySQL stores expose their real read-only resource. Independent Host pins, artifacts and deployments need their own checks. |
49
+
50
+ ## Upgrade and verify
51
+
52
+ Follow the [0.10.0 upgrade guide](UPGRADE_v0.10.0.en.md) to preserve configuration, data, original calls and rollback material. There is no new SQL from 0.9.4; earlier versions still need outstanding migrations on their original upgrade path.
53
+
54
+ Verify exact Tag/commit, package identity and migration ledger, then check `/health/ready`, onboarding, save/cancel behavior, original approvals and read-only receipts. Test larger arguments and new knowledge behavior with isolated data. Basic acceptance needs no paid model call or modification of a real business page.
55
+
56
+ Public regressions cover synthetic providers, authority/revision changes, byte bounds, original-operation recovery, persistence and lifecycle. They do not establish acceptance of every provider, desktop product or external business side effect. Knowledge may be paginated or truncated; timeout, context, input-size, vendor hard limits and account allowance remain bounded. Synthetic tests do not replace non-author integration or long-term observation.
57
+
58
+ [Knowledge protocol](AGENT_KNOWLEDGE_API.en.md) · [Runtime API](AGENT_CLIENT_RUNTIME_API.en.md) · [Model budgets](MODEL_OUTPUT_BUDGET.en.md) · [Host continuation and recovery](MODEL_CONTINUATION.en.md) · [Changelog](CHANGELOG.en.md)
@@ -0,0 +1,58 @@
1
+ # Core v0.10.0:先找能力,再按需读取相关知识
2
+
3
+ [English](RELEASE_NOTES_v0.10.0.en.md)
4
+
5
+ 一个本地智能体只是查库存,却同时收到多篇业务文档;另一个正在提交较大的页面设计,尚未派发就触及小参数限额。Core 0.10.0 相对公开 0.9.4 增加按需知识与工具指导,统一有界参数容量,并让管理员更清楚地配置模型预算、接入和排障。
6
+
7
+ 配套为 **Core 0.10.0、MCP / Agent Client SDK 0.8.0、DSH 0.8.0**。它们分别发行:原有工具调用、旧客户端和自带聊天可继续使用;只有采用新宿主能力或修复客户端独立小上限时才需要对应升级。相对 0.9.4 没有新增 SQL,不宣告 1.0 稳定承诺。
8
+
9
+ ## 更新了什么
10
+
11
+ ### 智能体可以先看提示,再读需要的知识
12
+
13
+ 新增 Agent Session 专用知识 `capabilities / search / read`。宿主先确认协议,显式使用 `knowledge_delivery: "on_demand"` 后,准备结果提供有界提示,正文由受授权、带修订的引用按需读取。搜索与分页都有大小、数量和有效期限制;引用过期或授权变化需重新发现,不能绕过主体、路由或审批边界。
14
+
15
+ 旧客户端不传该选项时仍收到 inline 知识。**自带聊天、embed 和 widget 继续原有服务端检索与正文装配**。知识和执行摘要始终是参考材料,不授予权限,也不是完整用户长期记忆。
16
+
17
+ ### 工具说明不再被短摘要截断后悄悄丢失
18
+
19
+ 工具目录继续使用简短说明,并明确详细指导是否可读、短说明是否被截断。按名读取指导会重新检查当前授权和能力修订;标准 summary、description、ACC 指导及首个示例有界保留。发现回执区分授权候选数、实际返回数与未知匹配总数;不把凑满结果解释为精确匹配。
20
+
21
+ 发现修订与冻结执行指纹分开。仅指导文字变化不会要求重做已经批准的业务调用,旧 invocation 仍按原身份与参数核对。
22
+
23
+ ### 大参数保持完整,超限说明发生在哪里
24
+
25
+ 工具 arguments 统一按实际 `JSON.stringify(arguments)` 的 UTF-8 字节数检查,允许最多 **1 MiB**;工具调用 HTTP 信封最多 **2 MiB**。Core 与 MCP/SDK 的独立限额配套更新。对象继续是对象,原能力字段、签名、授权、审批、幂等和业务系统自己的限额仍独立生效。
26
+
27
+ 超限保留 `arguments_too_large`、`not_dispatched` 与允许/实际或已观察字节数,不回显正文。完整审批参数与摘要保持对应;通知只携带有界预览,控制台在完整参数读取完成前不能批准。升级 Core 不会自动修复旧客户端自己较小的限额。
28
+
29
+ ### 默认输出预算与服务上限分开
30
+
31
+ 可选显式模型策略分别描述默认预算、服务上限、实际输出参数及 `completion_total / final_answer` 范围。管理员按实际模型路由核实语义;Core 不按模型名猜测,也不统一放大预算。旧服务保持原配置和行为,图片工具不使用对话输出预算。
32
+
33
+ 错误参数得到明确的派发前拒绝,不静默把 `max_tokens` 改成 `max_completion_tokens`。原 operation 和摘要保持不变;单次生成被截断不等于网络执行未知,下一段由宿主在任务授权内决定。**本版不在中枢自动重试模型,也不替客户端实现长任务续跑循环。**
34
+
35
+ ### 后台与升级排障更连贯
36
+
37
+ 首次接入引导、调用示例和权限文案更加一致;路由、接入方和工具源支持未保存保护。审批续办与新任务重跑区分,诊断跳转保留筛选、页签和返回位置;迟到响应不能覆盖当前对象。编辑抽屉的常规说明收敛到问号,风险和错误保持可见,并防止登录密码自动填入配置表单。
38
+
39
+ 新增只读 `doctor --upgrade-plan`,比较明确提供的制品与脱敏迁移快照,不连接数据库或执行迁移。Kernel 启动恢复参与关闭排空;readiness 核对实际 state/configuration 资源及完整迁移摘要。自定义 MySQL store 须提供 `schemaReadinessDb`,否则失败关闭,详见升级指南。
40
+
41
+ ## 谁需要调整
42
+
43
+ | 使用者 | 升级影响 |
44
+ | --- | --- |
45
+ | 中枢管理员 | 更新完整制品,备份并排空;核对真实存储 readiness。模型显式策略按需启用,不自动修改现有预算。 |
46
+ | 业务后端 | 原 HTTP/HMAC/ACC 身份和权限契约保持;本版不要求重写接口。继续执行业务字段、正文和存储上限。 |
47
+ | MCP/SDK 或 DSH 宿主开发者 | 采用 0.8.0 获取大参数修复、知识按需入口、预算帮助函数及披露确认。旧请求不可改写,客户端仍负责最终模型请求、工具注册与任务循环。 |
48
+ | Kernel Host 开发者 | 默认 store 已支持真实资源 readiness;自定义 MySQL store 应暴露实际只读资源。独立 Host 的 pin、制品和部署另行核对。 |
49
+
50
+ ## 如何升级与确认
51
+
52
+ 按 [0.10.0 升级指南](UPGRADE_v0.10.0.md)保留配置、数据、原调用和回滚材料。0.9.4 到本版没有新 SQL;更早版本仍需原升级链中的迁移。
53
+
54
+ 核对精确 Tag/提交、包版本与迁移账本;检查 `/health/ready`、首次接入、保存/取消、原审批及只读回执。仅在独立测试数据中验证大参数和新知识协议;无需为基础验收调用付费模型或修改真实业务页面。
55
+
56
+ 公开回归覆盖合成供应商、权限/修订变化、大小边界、原 operation 恢复、持久化与生命周期;不代表所有供应商、客户端产品或外部业务副作用已验收。知识正文可能分页或截断;超时、上下文、输入大小、模型供应商硬限制与账户额度仍有界。非作者接入和长期稳定性不能由这些合成测试替代。
57
+
58
+ [知识协议](AGENT_KNOWLEDGE_API.md) · [Runtime API](AGENT_CLIENT_RUNTIME_API.md) · [模型预算](MODEL_OUTPUT_BUDGET.md) · [宿主续段与恢复](MODEL_CONTINUATION.md) · [CHANGELOG](CHANGELOG.md)
@@ -0,0 +1,42 @@
1
+ # v0.9.4: DOCX dependency remediation and durable notifications
2
+
3
+ [简体中文](RELEASE_NOTES_v0.9.4.md)
4
+
5
+ Version date: 2026-10-15. A patch from public Core 0.9.3.
6
+
7
+ An after-sales task finishes, but Core is killed before sending its result notification. Rerunning the business task could issue a second refund, while graceful shutdown alone cannot recover this gap. BailingHub 0.9.4 commits terminal state and notification intent together in built-in stores, then resumes the original notification while preserving the business result. It also removes an unused vulnerable CLI dependency chain from DOCX parsing and adds notification operations to its bundled console.
8
+
9
+ ## Fixes
10
+
11
+ ### Retain the DOCX parser and remove its CLI dependency chain
12
+
13
+ Core file context and console knowledge-base import retain Mammoth 1.12.0's original parsing sources. The explicitly modified `@bailinghub/mammoth-library@1.12.0-bailinghub.1` distribution keeps upstream library sources, types, browser adaptations and the BSD-2-Clause license, while removing the unused CLI and `argparse → sprintf-js` chain.
14
+
15
+ Core, console, source exports and Docker use one pinned archive; the npm artifact bundles the library and its runtime dependencies. The former temporary audit exception is retired. Gates require zero raw findings in both dependency trees and separately query direct advisories under the original `mammoth@1.12.0` identity. Provenance integrity and individual source files are publicly verifiable. This remediates this project's distribution, not upstream sprintf-js, and does not establish that arbitrary DOCX files are safe. See [DOCX dependency verification](DOCX_DEPENDENCY.en.md).
16
+
17
+ ### Persist business results and notification intents together
18
+
19
+ The MySQL state store commits terminal Job state and notification intents together. Approval creation and its notification share a transaction in the owning configuration database, which may be separate. JSONL stores both in one synced record and remains a single-writer implementation.
20
+
21
+ Coverage includes callbacks from new terminal transitions, configured result delivery, approval prompts and dead-letter recording for failed notification children. Startup and maintenance recover pending intents with bounded batches, leases, retries and stale-worker fencing. Historical completed tasks or old pending approvals are not bulk-converted into new notifications, and notification recovery never reruns the business parent. Ordinary monitoring alerts and legacy adapters without durable ports remain best effort.
22
+
23
+ Webhooks wait for real HTTP responses and identify the original event through `X-Bailing-Event-Id` and signed-body `notification_event_id`. Lost acknowledgements can cause redelivery; receivers must deduplicate. Exhausted retry cycles retain failed records, so at-least-once semantics do not promise unlimited retries or guaranteed receipt. Native partial/unknown delivery or expired in-flight claims become `uncertain`, requiring receiver verification before manual handling. See [durable notifications](NOTIFICATION_DURABILITY.en.md).
24
+
25
+ ## Bundled console and persistent metrics
26
+
27
+ The bundled console's Tasks notification view provides type/status filters, summaries and failed-event retry. Reading requires `runs:read`; retry requires `runs:write`, and unknown receipt requires explicit confirmation of duplicate risk. The admin API compares the observed state before mutation and handles only the notification, never business re-execution.
28
+
29
+ The optional protected `/metrics` endpoint adds outbox availability, status counts, oldest pending age and expired lease counts under fixed `jobs` / `approvals` sources. It reads persistent aggregates without body, recipient, event or tenant labels, and does not invent zero backlogs for unsupported stores. Automatic cleanup and historical archival are not included; operators should monitor growth.
30
+
31
+ ## Upgrade and boundaries
32
+
33
+ - **Core operators:** back up original artifacts, configuration, state/configuration databases and JSONL, then explicitly apply `068_notification_outbox.sql`. Both independent state and configuration databases need migration. `npm run db:init` handles only the configured MySQL state database; use the official migration API separately for an independent configuration database.
34
+ - **Embedded and custom-store developers:** use matching built-in stores or implement the optional durable ports' transaction/lease semantics. Continue existing `tick()` and `close(drainMs)` calls. Legacy third-party stores do not gain a durability guarantee through the compatibility path.
35
+ - **Notification receivers:** deduplicate stable event IDs and verify external outcomes. Notification `completed` may mean handoff to a durable executor, not a person reading it. Native-event-linked dead letters recover through the outbox only; 067's original executor-notification replay remains available.
36
+ - **Independent projects:** MCP / Agent Client SDK 0.7.0 and DSH 0.7.0 remain unchanged. ACC, clients, independent Hosts and individual deployments release or upgrade separately.
37
+
38
+ Migration 068 creates the outbox and adds a nullable dead-letter event reference with a unique index. Migration 067 and earlier files are unchanged, and historical notifications are not invented. Old code cannot process the new outbox or undo sent messages; preserve events, dead letters, receipts and migration history, using a consistent backup and reconciliation procedure. See the [upgrade guide](UPGRADE_v0.9.4.en.md).
39
+
40
+ Public regressions cover upstream parsing compatibility, real npm consumers, browser console behavior, actual JSONL SIGKILL, MySQL transactions/lost acknowledgements, lease fencing, approvals, migration 067 to 068 and original-notification replay. They use synthetic data and local receivers, not live-channel receipt, deployment acceptance or production rollback drills. They do not guarantee recovery from disk corruption or unverified external effects.
41
+
42
+ [Upgrade guide](UPGRADE_v0.9.4.en.md) · [Full changelog](CHANGELOG.en.md) · [Capability and evidence index](IMPLEMENTATION_STATUS.en.md) · [Previous release](RELEASE_NOTES_v0.9.3.en.md)
@@ -0,0 +1,42 @@
1
+ # v0.9.4:DOCX 依赖修复与通知持久化
2
+
3
+ [English](RELEASE_NOTES_v0.9.4.en.md)
4
+
5
+ 版本日期:2026-10-15。相对公开 Core 0.9.3 的补丁更新。
6
+
7
+ 一笔售后任务已经完成,Core 却在结果通知发出前被强制终止。只重启业务任务可能造成第二次退款;只依赖正常关闭排空也无法恢复这段空隙。百灵中枢(BailingHub)0.9.4 在内置仓储中同时保存任务终态和通知意图,重启后继续原通知,保留原业务结果。它同时移除 DOCX 解析未使用且存在已知漏洞的 CLI 依赖链,并在自带控制台提供通知处置入口。
8
+
9
+ ## 修复了什么
10
+
11
+ ### DOCX 保留解析库,移除 CLI 依赖链
12
+
13
+ Core 文件上下文和控制台知识库导入继续使用 Mammoth 1.12.0 的原始解析代码。带有明确修改标记的 `@bailinghub/mammoth-library@1.12.0-bailinghub.1` 保留上游库源码、类型、浏览器适配与 BSD-2-Clause 许可证,去掉未使用的命令行入口及 `argparse → sprintf-js` 链。
14
+
15
+ Core、控制台、源码导出和 Docker 使用同一份固定归档;npm 制品捆绑库及其运行依赖。原限时审计例外退役,门禁要求两棵依赖树原始审计均为零,并以 `mammoth@1.12.0` 原名另查直接公告。来源完整性和逐文件清单可公开重验。这是本项目分发依赖的处置,不是上游 `sprintf-js` 已修复或任意 DOCX 都安全的声明。见 [DOCX 依赖与校验](DOCX_DEPENDENCY.md)。
16
+
17
+ ### 任务结果与通知意图一起保存
18
+
19
+ MySQL 状态库将任务终态与通知意图写入同一事务;审批创建及其提示保存在审批配置库的同一事务,两库可以独立。JSONL 用同一条同步落盘记录保存任务和意图,仍只支持单写者。
20
+
21
+ 覆盖新任务终态产生的 callback、配置的结果送达、审批提示和失败通知子任务的死信留存。启动及维护周期恢复待处理通知,有限批次、租约、重试和旧 worker 确认隔离限制重复处理。不会把历史已完成任务或旧待审批单批量变成新通知,也不会为补消息重跑业务父任务。普通监控告警及未实现持久化端口的旧扩展仍为尽力发送。
22
+
23
+ Webhook 等待真实 HTTP 响应,以稳定的 `X-Bailing-Event-Id` 和签名正文 `notification_event_id` 标识原事件。确认丢失后可能重复送达,接收方必须去重;有界重试耗尽后保留失败记录,不能把“至少一次”理解为无限重试或必达。原生渠道出现部分、未知送达或过期在途领取时进入 `uncertain`,核对接收端后再人工处理。详情见[通知持久化](NOTIFICATION_DURABILITY.md)。
24
+
25
+ ## 新增控制台与持久指标
26
+
27
+ 自带控制台「任务 → 通知送达」支持类型/状态筛选、摘要和失败重试。查看需要 `runs:read`,重试需要 `runs:write`;未知送达需显式确认重复风险。管理 API 使用观察到的状态做并发校验,只处置通知,不重新执行业务。
28
+
29
+ 可选受保护的 `/metrics` 增加固定 `jobs` / `approvals` 来源的 outbox 可用性、状态数量、最老待处理年龄和过期租约数。它读取持久聚合,不含正文、收件地址、事件或租户标签;缺少能力时不伪造零积压。当前没有自动清理和历史归档策略,部署者需要观察数据增长。
30
+
31
+ ## 升级与边界
32
+
33
+ - **Core 管理员**:备份原制品、配置、状态/配置数据库和 JSONL,显式应用新增的 `068_notification_outbox.sql`。独立配置库和状态库都要迁移;`npm run db:init` 仅处理配置中的 MySQL 状态库,独立配置库需使用官方迁移 API 另行处理。
34
+ - **嵌入式与自定义仓储开发者**:使用配套内置仓储,或实现可选持久化端口的事务/租约语义;继续调用既有 `tick()` 和 `close(drainMs)`。第三方旧仓储兼容路径不获得持久性承诺。
35
+ - **通知接收方**:按稳定事件 ID 去重并核对外部结果;通知 `completed` 可能表示已交给持久执行器,不等于收件人已阅读。关联原生事件的死信统一从 outbox 补发,067 执行器原通知重投继续保留。
36
+ - **独立项目**:MCP / Agent Client SDK 0.7.0、DSH 0.7.0 不变。ACC、客户端、独立 Host 与具体部署各自发行和升级。
37
+
38
+ 新增 068 建立 outbox 表并给死信增加可空事件关联及唯一索引;067 及以前迁移保持原样,不批量补造旧通知。回退旧代码不能继续处理新 outbox,也不能撤销已外发消息;保留事件、死信、回执和迁移账本,按一致备份及核对流程处理。见[升级指南](UPGRADE_v0.9.4.md)。
39
+
40
+ 公开回归覆盖官方解析兼容、真实 npm 消费、控制台浏览器、JSONL 实际 SIGKILL、MySQL 事务与确认丢失、租约隔离、审批、旧 067 到 068 和原通知重投。使用合成数据及本地接收端;它们不代替真实渠道收件、目标部署验收或生产回滚演练,也不保证磁盘损坏或未经验证的外部副作用可恢复。
41
+
42
+ [升级指南](UPGRADE_v0.9.4.md) · [完整版本记录](CHANGELOG.md) · [能力与证据索引](IMPLEMENTATION_STATUS.md) · [上一版本](RELEASE_NOTES_v0.9.3.md)
@@ -0,0 +1,118 @@
1
+ # Offline, read-only upgrade planning
2
+
3
+ [中文](UPGRADE_PLAN.md)
4
+
5
+ `doctor --upgrade-plan` compares explicit source/target artifacts and a sanitized database snapshot. It never connects to a database, reads `.env` / `config.json`, starts Core, imports code from supplied artifacts, runs SQL, migrates, restores or modifies input files. Unlike `doctor --deployment`, it performs no HTTP probes. Missing evidence remains `incomplete`.
6
+
7
+ ## Prepare artifacts and official manifests
8
+
9
+ Keep separate copies of the actual current artifact and the intended target. Verify their official tag/commit, npm package or image digest using release records first.
10
+
11
+ Existing releases expose `BAILINGHUB_CORE_ARTIFACT_V1` as a runtime object; they do **not** ship a pre-generated JSON manifest. From each trusted artifact root, with its runtime dependencies already installed, export the official object to a file outside the artifact:
12
+
13
+ ```bash
14
+ node --import tsx --input-type=module -e 'import { BAILINGHUB_CORE_ARTIFACT_V1 } from "./src/kernel-api/v1/artifact.ts"; console.log(JSON.stringify(BAILINGHUB_CORE_ARTIFACT_V1, null, 2));' > /absolute/evidence/from-manifest.json
15
+ ```
16
+
17
+ Repeat in the target root as `to-manifest.json`. This preparation command imports the trusted official manifest module; the planner itself never imports supplied artifacts or installs dependencies. Do not fabricate an old manifest with the current retired-migration list if the old artifact lacks this export.
18
+
19
+ The planner validates package name, exact version, complete SQL inventory, each active SQL digest and the v1 manifest digest from [Kernel Host API](KERNEL_HOST_API.md). It also validates migration filenames/numbers, retired evidence (`replay: never`), historical checksum continuity and SemVer direction, including prereleases. A different manifest under the same version blocks the plan. Historical active migrations cannot be silently retired, and retired migrations cannot return to the active SQL sequence. Retired checksum, byte length and `replay: never` evidence must remain unchanged, even when a replacement manifest is internally self-consistent.
20
+
21
+ A manifest covers version and migrations, **not whole-artifact authenticity**. An attacker could replace both SQL and its digest. `release_authenticity` always remains `not_verified`; verify trusted release provenance separately. Artifact file/directory symlinks and traversal filenames are rejected. No npm scripts from artifacts execute.
22
+
23
+ ## Prepare a sanitized snapshot
24
+
25
+ There is no automatic database collector in this version. An operator uses existing authorized read-only connections to establish the effective state/configuration store topology and actual logical database identities. Example configuration files do not prove the effective deployment. Standard OSS MySQL commonly shares one database; hosts may separate stores, and JSONL state does not establish the absence of configuration MySQL.
26
+
27
+ Read each actual schema using existing tools:
28
+
29
+ ```sql
30
+ SELECT DATABASE() AS database_name, @@server_uuid AS server_uuid;
31
+ SELECT COLUMN_NAME FROM information_schema.COLUMNS
32
+ WHERE TABLE_SCHEMA = DATABASE()
33
+ AND TABLE_NAME = 'bz_schema_migrations'
34
+ AND COLUMN_NAME = 'checksum_sha256';
35
+ SELECT filename, checksum_sha256 FROM bz_schema_migrations ORDER BY filename;
36
+ ```
37
+
38
+ For a legacy ledger without the checksum column, read only filenames and record `checksum_sha256: null`, `checksum_column: "absent"`. Never backfill or migrate to prepare a plan. A missing ledger table or insufficient access is not an empty complete ledger.
39
+
40
+ Avoid concurrent migration; capture a consistent read-only snapshot or document a write-stop window. Retain actual database identities privately. Assign a random 64-character lowercase hexadecimal ID to each confirmed logical database for this plan; reuse it for shared roles and use different IDs for distinct databases. `node -e 'console.log(require("node:crypto").randomBytes(32).toString("hex"))'` generates only an opaque ID, not database evidence. Replicas/proxies require an operator to determine the actual logical schema. **These IDs are operator claims, not independent identity proofs.**
41
+
42
+ The JSON schema is:
43
+
44
+ | Field | Meaning |
45
+ | --- | --- |
46
+ | `schema` | `bailing.upgrade-snapshot.v1` |
47
+ | `captured_at` | Actual UTC capture time, e.g. `2026-10-21T04:00:00Z` |
48
+ | `source_manifest_sha256` | Exact digest from the actual current artifact's official manifest |
49
+ | `state` | `{ backend: "mysql" or "jsonl", database_id: ID or null }`; MySQL requires an ID |
50
+ | `configuration` | `{ backend: "mysql" or "file", database_id: ID or null }`; `file` means no database configuration repository, using local configuration files |
51
+ | `databases` | Exactly the 0–2 logical databases required by the two roles, one record each |
52
+ | `databases[].id` | The 64-character lowercase hex opaque identity used by the roles |
53
+ | `ledger_complete` | Boolean indicating whether all ledger rows were captured; partial snapshots produce no definitive pending list |
54
+ | `checksum_column` | `present` or `absent` |
55
+ | `rows` | Full array of `{ filename, checksum_sha256 }`; checksums are 64-character lowercase hex or `null` |
56
+
57
+ This deliberately **incomplete** JSONL + configuration MySQL example is not deployment evidence. Replace the time, source digest, identity and complete ledger before comparison:
58
+
59
+ ```json
60
+ {
61
+ "schema": "bailing.upgrade-snapshot.v1",
62
+ "captured_at": "2026-10-21T04:00:00Z",
63
+ "source_manifest_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
64
+ "state": { "backend": "jsonl", "database_id": null },
65
+ "configuration": {
66
+ "backend": "mysql",
67
+ "database_id": "1111111111111111111111111111111111111111111111111111111111111111"
68
+ },
69
+ "databases": [{
70
+ "id": "1111111111111111111111111111111111111111111111111111111111111111",
71
+ "ledger_complete": false,
72
+ "checksum_column": "present",
73
+ "rows": []
74
+ }]
75
+ }
76
+ ```
77
+
78
+ Never include passwords, connection strings, usernames, host addresses, business rows or raw SQL errors. Output contains only defined safe fields, without input paths or raw parsing errors. A recent timestamp does not prove freshness: recollect after any deployment, configuration or ledger change.
79
+
80
+ ## Generate the plan
81
+
82
+ ```bash
83
+ npm run --silent doctor -- --upgrade-plan \
84
+ --from-artifact /absolute/core-current \
85
+ --from-manifest /absolute/evidence/from-manifest.json \
86
+ --to-artifact /absolute/core-target \
87
+ --to-manifest /absolute/evidence/to-manifest.json \
88
+ --snapshot /absolute/evidence/snapshot.json \
89
+ --json > /absolute/evidence/upgrade-plan.json
90
+ ```
91
+
92
+ `npm run --silent doctor:upgrade-plan -- ...` is equivalent. `--help` reads no inputs. No implicit paths, connection discovery or network targets are used. Missing arguments mean incomplete evidence; explicitly supplied unreadable/invalid files block the plan.
93
+
94
+ | Exit/result | Meaning |
95
+ | --- | --- |
96
+ | `0 / reviewable` | Supplied offline evidence is comparable without detected conflicts; **not deployment readiness or tested recovery** |
97
+ | `1 / blocked` | Artifact/digest/version/snapshot conflict or unknown migration; investigate before proceeding |
98
+ | `2 / incomplete` | Missing artifact, full ledger, database-role identity or legacy checksum evidence |
99
+ | `64 / invalid_arguments` | Unsupported/invalid arguments, including mixed deployment-diagnostics flags |
100
+
101
+ Shared MySQL produces one plan; separate stores are checked independently. Null legacy checksums remain incomplete without backfilling. Retired migrations never enter pending SQL. Missing source migrations are incomplete; records unknown to either source or target block the plan. Pending means the target active sequence minus a complete ledger snapshot, not proof of actual SQL tables/indexes.
102
+
103
+ ## Execution remains separate
104
+
105
+ The plan lists artifact verification, consistent backups and isolated restore rehearsal, stopping intake and all writers, draining every replica, manual per-database migration, acceptance and rollback constraints. `npm run db:init` migrates only `state.mysql`; a separate configuration MySQL requires the official `migrateBailingHubCoreSchema({ mysql: configurationDatabase })` entry, once per distinct database and never concurrently.
106
+
107
+ It does not emit executable connection-bearing commands or authorize deployment. Preserve unknown business results, approvals, notifications, DLQ records and original IDs. Pending migrations unknown to the source manifest set `rollback_after_migration: blocked_by_old_manifest`; all other cases still require validation. Do not remove ledger records or assume old-tag switching is safe. Restoring a database cannot undo an external refund or message.
108
+
109
+ See the [0.9.4 upgrade/rollback guide](UPGRADE_v0.9.4.en.md), [operations](OPERATIONS.md) and [compatibility policy](COMPATIBILITY.en.md). Actual runtime identity, database identity, schema objects, backup restoration and cross-version business acceptance are unverified by this tool.
110
+
111
+ ## Developer checks
112
+
113
+ ```bash
114
+ npm run doctor:upgrade-plan:typecheck
115
+ npm run doctor:upgrade-plan:test
116
+ ```
117
+
118
+ Both checks run in `release:check` and the basic CI job. Tests use synthetic artifacts/snapshots and compare the current official manifest format. They do not connect to databases or replace actual upgrade, recovery or production acceptance.