@superbee/core 0.2.0-pre.2 → 0.2.0-pre.21

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 (517) hide show
  1. package/README.md +1000 -0
  2. package/dist/artifact-contract.d.ts +90 -0
  3. package/dist/artifact-contract.d.ts.map +1 -0
  4. package/dist/artifact-contract.js +205 -0
  5. package/dist/artifact-contract.js.map +1 -0
  6. package/dist/backend.d.ts +19 -1
  7. package/dist/backend.d.ts.map +1 -1
  8. package/dist/backend.js +83 -36
  9. package/dist/backend.js.map +1 -1
  10. package/dist/blob-contract.d.ts +80 -0
  11. package/dist/blob-contract.d.ts.map +1 -0
  12. package/dist/blob-contract.js +131 -0
  13. package/dist/blob-contract.js.map +1 -0
  14. package/dist/blob-journal.d.ts +302 -0
  15. package/dist/blob-journal.d.ts.map +1 -0
  16. package/dist/blob-journal.js +540 -0
  17. package/dist/blob-journal.js.map +1 -0
  18. package/dist/body-replace-guards.d.ts +50 -0
  19. package/dist/body-replace-guards.d.ts.map +1 -0
  20. package/dist/body-replace-guards.js +158 -0
  21. package/dist/body-replace-guards.js.map +1 -0
  22. package/dist/builtin-recipes/content.d.ts +93 -0
  23. package/dist/builtin-recipes/content.d.ts.map +1 -0
  24. package/dist/builtin-recipes/content.js +288 -0
  25. package/dist/builtin-recipes/content.js.map +1 -0
  26. package/dist/builtin-recipes.d.ts +10 -0
  27. package/dist/builtin-recipes.d.ts.map +1 -0
  28. package/dist/builtin-recipes.js +97 -0
  29. package/dist/builtin-recipes.js.map +1 -0
  30. package/dist/bundle-health/index.d.ts +14 -0
  31. package/dist/bundle-health/index.d.ts.map +1 -0
  32. package/dist/bundle-health/index.js +12 -0
  33. package/dist/bundle-health/index.js.map +1 -0
  34. package/dist/bundle-health/kind-findings.d.ts +44 -0
  35. package/dist/bundle-health/kind-findings.d.ts.map +1 -0
  36. package/dist/bundle-health/kind-findings.js +68 -0
  37. package/dist/bundle-health/kind-findings.js.map +1 -0
  38. package/dist/bundle-health/legacy-page.d.ts +39 -0
  39. package/dist/bundle-health/legacy-page.d.ts.map +1 -0
  40. package/dist/bundle-health/legacy-page.js +50 -0
  41. package/dist/bundle-health/legacy-page.js.map +1 -0
  42. package/dist/bundle-health/report.d.ts +202 -0
  43. package/dist/bundle-health/report.d.ts.map +1 -0
  44. package/dist/bundle-health/report.js +438 -0
  45. package/dist/bundle-health/report.js.map +1 -0
  46. package/dist/bundle-ops.d.ts +1 -1
  47. package/dist/bundle-ops.d.ts.map +1 -1
  48. package/dist/bundle-ops.js +2 -2
  49. package/dist/bundle-ops.js.map +1 -1
  50. package/dist/bundle.d.ts +2 -1
  51. package/dist/bundle.d.ts.map +1 -1
  52. package/dist/bundle.js +3 -3
  53. package/dist/bundle.js.map +1 -1
  54. package/dist/code-point-order.d.ts +8 -0
  55. package/dist/code-point-order.d.ts.map +1 -0
  56. package/dist/code-point-order.js +20 -0
  57. package/dist/code-point-order.js.map +1 -0
  58. package/dist/connectors.d.ts +230 -0
  59. package/dist/connectors.d.ts.map +1 -0
  60. package/dist/connectors.js +1150 -0
  61. package/dist/connectors.js.map +1 -0
  62. package/dist/cross-bundle.d.ts +135 -0
  63. package/dist/cross-bundle.d.ts.map +1 -0
  64. package/dist/cross-bundle.js +186 -0
  65. package/dist/cross-bundle.js.map +1 -0
  66. package/dist/dependencies.d.ts +94 -0
  67. package/dist/dependencies.d.ts.map +1 -0
  68. package/dist/dependencies.js +180 -0
  69. package/dist/dependencies.js.map +1 -0
  70. package/dist/document-codec.d.ts +6 -1
  71. package/dist/document-codec.d.ts.map +1 -1
  72. package/dist/document-codec.js +8 -4
  73. package/dist/document-codec.js.map +1 -1
  74. package/dist/document-field-actions.d.ts +31 -1
  75. package/dist/document-field-actions.d.ts.map +1 -1
  76. package/dist/document-field-actions.js +137 -34
  77. package/dist/document-field-actions.js.map +1 -1
  78. package/dist/document-mutation.d.ts +22 -10
  79. package/dist/document-mutation.d.ts.map +1 -1
  80. package/dist/document-mutation.js +58 -27
  81. package/dist/document-mutation.js.map +1 -1
  82. package/dist/document-write-policy.d.ts.map +1 -1
  83. package/dist/document-write-policy.js +4 -2
  84. package/dist/document-write-policy.js.map +1 -1
  85. package/dist/engine.d.ts +9 -2
  86. package/dist/engine.d.ts.map +1 -1
  87. package/dist/engine.js +11 -4
  88. package/dist/engine.js.map +1 -1
  89. package/dist/file-journaled-backend-internal.d.ts +21 -0
  90. package/dist/file-journaled-backend-internal.d.ts.map +1 -0
  91. package/dist/file-journaled-backend-internal.js +12 -0
  92. package/dist/file-journaled-backend-internal.js.map +1 -0
  93. package/dist/file-journaled-backend.d.ts +200 -0
  94. package/dist/file-journaled-backend.d.ts.map +1 -0
  95. package/dist/file-journaled-backend.js +1334 -0
  96. package/dist/file-journaled-backend.js.map +1 -0
  97. package/dist/filesystem-host.d.ts +15 -0
  98. package/dist/filesystem-host.d.ts.map +1 -0
  99. package/dist/filesystem-host.js +20 -0
  100. package/dist/filesystem-host.js.map +1 -0
  101. package/dist/filesystem-identity.d.ts +86 -4
  102. package/dist/filesystem-identity.d.ts.map +1 -1
  103. package/dist/filesystem-identity.js +338 -102
  104. package/dist/filesystem-identity.js.map +1 -1
  105. package/dist/filesystem-lock.d.ts +16 -3
  106. package/dist/filesystem-lock.d.ts.map +1 -1
  107. package/dist/filesystem-lock.js +323 -77
  108. package/dist/filesystem-lock.js.map +1 -1
  109. package/dist/filesystem-push-role.d.ts +77 -0
  110. package/dist/filesystem-push-role.d.ts.map +1 -0
  111. package/dist/filesystem-push-role.js +165 -0
  112. package/dist/filesystem-push-role.js.map +1 -0
  113. package/dist/filesystem.d.ts +17 -0
  114. package/dist/filesystem.d.ts.map +1 -0
  115. package/dist/filesystem.js +18 -0
  116. package/dist/filesystem.js.map +1 -0
  117. package/dist/frontmatter.d.ts +8 -0
  118. package/dist/frontmatter.d.ts.map +1 -1
  119. package/dist/frontmatter.js +14 -4
  120. package/dist/frontmatter.js.map +1 -1
  121. package/dist/governed-body-write.d.ts +106 -0
  122. package/dist/governed-body-write.d.ts.map +1 -0
  123. package/dist/governed-body-write.js +251 -0
  124. package/dist/governed-body-write.js.map +1 -0
  125. package/dist/host-policy-snapshot.d.ts +9 -0
  126. package/dist/host-policy-snapshot.d.ts.map +1 -0
  127. package/dist/host-policy-snapshot.js +33 -0
  128. package/dist/host-policy-snapshot.js.map +1 -0
  129. package/dist/host-text.d.ts +31 -0
  130. package/dist/host-text.d.ts.map +1 -0
  131. package/dist/host-text.js +77 -0
  132. package/dist/host-text.js.map +1 -0
  133. package/dist/hosted-client/binding.d.ts +7 -0
  134. package/dist/hosted-client/binding.d.ts.map +1 -0
  135. package/dist/hosted-client/binding.js +10 -0
  136. package/dist/hosted-client/binding.js.map +1 -0
  137. package/dist/hosted-client/blob-delivery.d.ts +67 -0
  138. package/dist/hosted-client/blob-delivery.d.ts.map +1 -0
  139. package/dist/hosted-client/blob-delivery.js +169 -0
  140. package/dist/hosted-client/blob-delivery.js.map +1 -0
  141. package/dist/hosted-client/blob-write.d.ts +386 -0
  142. package/dist/hosted-client/blob-write.d.ts.map +1 -0
  143. package/dist/hosted-client/blob-write.js +770 -0
  144. package/dist/hosted-client/blob-write.js.map +1 -0
  145. package/dist/hosted-client/bundle-listing.d.ts +46 -0
  146. package/dist/hosted-client/bundle-listing.d.ts.map +1 -0
  147. package/dist/hosted-client/bundle-listing.js +36 -0
  148. package/dist/hosted-client/bundle-listing.js.map +1 -0
  149. package/dist/hosted-client/client.d.ts +219 -0
  150. package/dist/hosted-client/client.d.ts.map +1 -0
  151. package/dist/hosted-client/client.js +309 -0
  152. package/dist/hosted-client/client.js.map +1 -0
  153. package/dist/hosted-client/directory.d.ts +46 -0
  154. package/dist/hosted-client/directory.d.ts.map +1 -0
  155. package/dist/hosted-client/directory.js +74 -0
  156. package/dist/hosted-client/directory.js.map +1 -0
  157. package/dist/hosted-client/errors.d.ts +26 -0
  158. package/dist/hosted-client/errors.d.ts.map +1 -0
  159. package/dist/hosted-client/errors.js +35 -0
  160. package/dist/hosted-client/errors.js.map +1 -0
  161. package/dist/hosted-client/inbox.d.ts +320 -0
  162. package/dist/hosted-client/inbox.d.ts.map +1 -0
  163. package/dist/hosted-client/inbox.js +379 -0
  164. package/dist/hosted-client/inbox.js.map +1 -0
  165. package/dist/hosted-client/index.d.ts +30 -0
  166. package/dist/hosted-client/index.d.ts.map +1 -0
  167. package/dist/hosted-client/index.js +32 -0
  168. package/dist/hosted-client/index.js.map +1 -0
  169. package/dist/hosted-client/journal.d.ts +103 -0
  170. package/dist/hosted-client/journal.d.ts.map +1 -0
  171. package/dist/hosted-client/journal.js +464 -0
  172. package/dist/hosted-client/journal.js.map +1 -0
  173. package/dist/hosted-client/node.d.ts +74 -0
  174. package/dist/hosted-client/node.d.ts.map +1 -0
  175. package/dist/hosted-client/node.js +219 -0
  176. package/dist/hosted-client/node.js.map +1 -0
  177. package/dist/hosted-client/reference.d.ts +12 -0
  178. package/dist/hosted-client/reference.d.ts.map +1 -0
  179. package/dist/hosted-client/reference.js +29 -0
  180. package/dist/hosted-client/reference.js.map +1 -0
  181. package/dist/hosted-client/write.d.ts +217 -0
  182. package/dist/hosted-client/write.d.ts.map +1 -0
  183. package/dist/hosted-client/write.js +418 -0
  184. package/dist/hosted-client/write.js.map +1 -0
  185. package/dist/hosted-transport/answer-rows.d.ts +243 -0
  186. package/dist/hosted-transport/answer-rows.d.ts.map +1 -0
  187. package/dist/hosted-transport/answer-rows.js +454 -0
  188. package/dist/hosted-transport/answer-rows.js.map +1 -0
  189. package/dist/hosted-transport/blob-reads.d.ts +35 -0
  190. package/dist/hosted-transport/blob-reads.d.ts.map +1 -0
  191. package/dist/hosted-transport/blob-reads.js +179 -0
  192. package/dist/hosted-transport/blob-reads.js.map +1 -0
  193. package/dist/hosted-transport/blob-write.d.ts +34 -0
  194. package/dist/hosted-transport/blob-write.d.ts.map +1 -0
  195. package/dist/hosted-transport/blob-write.js +115 -0
  196. package/dist/hosted-transport/blob-write.js.map +1 -0
  197. package/dist/hosted-transport/carrier.d.ts +151 -0
  198. package/dist/hosted-transport/carrier.d.ts.map +1 -0
  199. package/dist/hosted-transport/carrier.js +260 -0
  200. package/dist/hosted-transport/carrier.js.map +1 -0
  201. package/dist/hosted-transport/history-pages.d.ts +55 -0
  202. package/dist/hosted-transport/history-pages.d.ts.map +1 -0
  203. package/dist/hosted-transport/history-pages.js +69 -0
  204. package/dist/hosted-transport/history-pages.js.map +1 -0
  205. package/dist/hosted-transport/index.d.ts +18 -0
  206. package/dist/hosted-transport/index.d.ts.map +1 -0
  207. package/dist/hosted-transport/index.js +18 -0
  208. package/dist/hosted-transport/index.js.map +1 -0
  209. package/dist/hosted-transport/operations.d.ts +85 -0
  210. package/dist/hosted-transport/operations.d.ts.map +1 -0
  211. package/dist/hosted-transport/operations.js +128 -0
  212. package/dist/hosted-transport/operations.js.map +1 -0
  213. package/dist/hosted-transport/paged-reads.d.ts +87 -0
  214. package/dist/hosted-transport/paged-reads.d.ts.map +1 -0
  215. package/dist/hosted-transport/paged-reads.js +238 -0
  216. package/dist/hosted-transport/paged-reads.js.map +1 -0
  217. package/dist/hosted-transport/read-adapter.d.ts +256 -0
  218. package/dist/hosted-transport/read-adapter.d.ts.map +1 -0
  219. package/dist/hosted-transport/read-adapter.js +568 -0
  220. package/dist/hosted-transport/read-adapter.js.map +1 -0
  221. package/dist/hosted-transport/root-write.d.ts +114 -0
  222. package/dist/hosted-transport/root-write.d.ts.map +1 -0
  223. package/dist/hosted-transport/root-write.js +171 -0
  224. package/dist/hosted-transport/root-write.js.map +1 -0
  225. package/dist/hosted-transport/whole-document-transport.d.ts +204 -0
  226. package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -0
  227. package/dist/hosted-transport/whole-document-transport.js +447 -0
  228. package/dist/hosted-transport/whole-document-transport.js.map +1 -0
  229. package/dist/index.d.ts +34 -10
  230. package/dist/index.d.ts.map +1 -1
  231. package/dist/index.js +26 -8
  232. package/dist/index.js.map +1 -1
  233. package/dist/indexeddb-backend.d.ts +28 -6
  234. package/dist/indexeddb-backend.d.ts.map +1 -1
  235. package/dist/indexeddb-backend.js +471 -92
  236. package/dist/indexeddb-backend.js.map +1 -1
  237. package/dist/journaled-backend.d.ts +247 -10
  238. package/dist/journaled-backend.d.ts.map +1 -1
  239. package/dist/journaled-backend.js +302 -1
  240. package/dist/journaled-backend.js.map +1 -1
  241. package/dist/kind-authoring.d.ts +170 -0
  242. package/dist/kind-authoring.d.ts.map +1 -0
  243. package/dist/kind-authoring.js +451 -0
  244. package/dist/kind-authoring.js.map +1 -0
  245. package/dist/kind-conformance-error.d.ts +15 -0
  246. package/dist/kind-conformance-error.d.ts.map +1 -0
  247. package/dist/kind-conformance-error.js +20 -0
  248. package/dist/kind-conformance-error.js.map +1 -0
  249. package/dist/kind-coverage.d.ts +99 -0
  250. package/dist/kind-coverage.d.ts.map +1 -0
  251. package/dist/kind-coverage.js +186 -0
  252. package/dist/kind-coverage.js.map +1 -0
  253. package/dist/kind-field-mutation.d.ts +4 -0
  254. package/dist/kind-field-mutation.d.ts.map +1 -1
  255. package/dist/kind-field-mutation.js +28 -3
  256. package/dist/kind-field-mutation.js.map +1 -1
  257. package/dist/kinds-load.js +4 -4
  258. package/dist/kinds-load.js.map +1 -1
  259. package/dist/kinds.d.ts +65 -2
  260. package/dist/kinds.d.ts.map +1 -1
  261. package/dist/kinds.js +341 -21
  262. package/dist/kinds.js.map +1 -1
  263. package/dist/link-types.d.ts +26 -0
  264. package/dist/link-types.d.ts.map +1 -0
  265. package/dist/link-types.js +57 -0
  266. package/dist/link-types.js.map +1 -0
  267. package/dist/links.d.ts +21 -3
  268. package/dist/links.d.ts.map +1 -1
  269. package/dist/links.js +213 -14
  270. package/dist/links.js.map +1 -1
  271. package/dist/managed-document-metadata.d.ts +2 -0
  272. package/dist/managed-document-metadata.d.ts.map +1 -0
  273. package/dist/managed-document-metadata.js +9 -0
  274. package/dist/managed-document-metadata.js.map +1 -0
  275. package/dist/memory-backend.d.ts +2 -2
  276. package/dist/memory-backend.d.ts.map +1 -1
  277. package/dist/memory-backend.js +26 -11
  278. package/dist/memory-backend.js.map +1 -1
  279. package/dist/paths.d.ts +16 -0
  280. package/dist/paths.d.ts.map +1 -1
  281. package/dist/paths.js +25 -0
  282. package/dist/paths.js.map +1 -1
  283. package/dist/platform.d.ts +13 -2
  284. package/dist/platform.d.ts.map +1 -1
  285. package/dist/platform.js +16 -0
  286. package/dist/platform.js.map +1 -1
  287. package/dist/portable-export.d.ts +119 -0
  288. package/dist/portable-export.d.ts.map +1 -0
  289. package/dist/portable-export.js +501 -0
  290. package/dist/portable-export.js.map +1 -0
  291. package/dist/publication-filesystem.d.ts +1 -1
  292. package/dist/publication-filesystem.d.ts.map +1 -1
  293. package/dist/publication-filesystem.js +1 -1
  294. package/dist/publication-filesystem.js.map +1 -1
  295. package/dist/qualified-links.d.ts +67 -0
  296. package/dist/qualified-links.d.ts.map +1 -0
  297. package/dist/qualified-links.js +117 -0
  298. package/dist/qualified-links.js.map +1 -0
  299. package/dist/query-filter.d.ts +16 -2
  300. package/dist/query-filter.d.ts.map +1 -1
  301. package/dist/query-filter.js +40 -1
  302. package/dist/query-filter.js.map +1 -1
  303. package/dist/query-order.d.ts +22 -0
  304. package/dist/query-order.d.ts.map +1 -0
  305. package/dist/query-order.js +42 -0
  306. package/dist/query-order.js.map +1 -0
  307. package/dist/recipe-lifecycle/errors.d.ts +96 -0
  308. package/dist/recipe-lifecycle/errors.d.ts.map +1 -0
  309. package/dist/recipe-lifecycle/errors.js +122 -0
  310. package/dist/recipe-lifecycle/errors.js.map +1 -0
  311. package/dist/recipe-lifecycle/evolution.d.ts +108 -0
  312. package/dist/recipe-lifecycle/evolution.d.ts.map +1 -0
  313. package/dist/recipe-lifecycle/evolution.js +884 -0
  314. package/dist/recipe-lifecycle/evolution.js.map +1 -0
  315. package/dist/recipe-lifecycle/index.d.ts +26 -0
  316. package/dist/recipe-lifecycle/index.d.ts.map +1 -0
  317. package/dist/recipe-lifecycle/index.js +22 -0
  318. package/dist/recipe-lifecycle/index.js.map +1 -0
  319. package/dist/recipe-lifecycle/install.d.ts +127 -0
  320. package/dist/recipe-lifecycle/install.d.ts.map +1 -0
  321. package/dist/recipe-lifecycle/install.js +526 -0
  322. package/dist/recipe-lifecycle/install.js.map +1 -0
  323. package/dist/recipe-lifecycle/legacy-aliases.d.ts +16 -0
  324. package/dist/recipe-lifecycle/legacy-aliases.d.ts.map +1 -0
  325. package/dist/recipe-lifecycle/legacy-aliases.js +51 -0
  326. package/dist/recipe-lifecycle/legacy-aliases.js.map +1 -0
  327. package/dist/recipe-lifecycle/stamp.d.ts +136 -0
  328. package/dist/recipe-lifecycle/stamp.d.ts.map +1 -0
  329. package/dist/recipe-lifecycle/stamp.js +326 -0
  330. package/dist/recipe-lifecycle/stamp.js.map +1 -0
  331. package/dist/recipes.d.ts +29 -1
  332. package/dist/recipes.d.ts.map +1 -1
  333. package/dist/recipes.js +137 -1
  334. package/dist/recipes.js.map +1 -1
  335. package/dist/record-overlay/apply.d.ts +43 -0
  336. package/dist/record-overlay/apply.d.ts.map +1 -0
  337. package/dist/record-overlay/apply.js +527 -0
  338. package/dist/record-overlay/apply.js.map +1 -0
  339. package/dist/record-overlay/canonical.d.ts +22 -0
  340. package/dist/record-overlay/canonical.d.ts.map +1 -0
  341. package/dist/record-overlay/canonical.js +47 -0
  342. package/dist/record-overlay/canonical.js.map +1 -0
  343. package/dist/record-overlay/digest.d.ts +4 -0
  344. package/dist/record-overlay/digest.d.ts.map +1 -0
  345. package/dist/record-overlay/digest.js +11 -0
  346. package/dist/record-overlay/digest.js.map +1 -0
  347. package/dist/record-overlay/errors.d.ts +44 -0
  348. package/dist/record-overlay/errors.d.ts.map +1 -0
  349. package/dist/record-overlay/errors.js +55 -0
  350. package/dist/record-overlay/errors.js.map +1 -0
  351. package/dist/record-overlay/findings.d.ts +5 -0
  352. package/dist/record-overlay/findings.d.ts.map +1 -0
  353. package/dist/record-overlay/findings.js +83 -0
  354. package/dist/record-overlay/findings.js.map +1 -0
  355. package/dist/record-overlay/index.d.ts +23 -0
  356. package/dist/record-overlay/index.d.ts.map +1 -0
  357. package/dist/record-overlay/index.js +21 -0
  358. package/dist/record-overlay/index.js.map +1 -0
  359. package/dist/record-overlay/plan.d.ts +12 -0
  360. package/dist/record-overlay/plan.d.ts.map +1 -0
  361. package/dist/record-overlay/plan.js +285 -0
  362. package/dist/record-overlay/plan.js.map +1 -0
  363. package/dist/record-overlay/policy.d.ts +69 -0
  364. package/dist/record-overlay/policy.d.ts.map +1 -0
  365. package/dist/record-overlay/policy.js +228 -0
  366. package/dist/record-overlay/policy.js.map +1 -0
  367. package/dist/record-overlay/redact.d.ts +3 -0
  368. package/dist/record-overlay/redact.d.ts.map +1 -0
  369. package/dist/record-overlay/redact.js +27 -0
  370. package/dist/record-overlay/redact.js.map +1 -0
  371. package/dist/record-overlay/signal-kind.d.ts +30 -0
  372. package/dist/record-overlay/signal-kind.d.ts.map +1 -0
  373. package/dist/record-overlay/signal-kind.js +38 -0
  374. package/dist/record-overlay/signal-kind.js.map +1 -0
  375. package/dist/record-overlay/signal-text.d.ts +45 -0
  376. package/dist/record-overlay/signal-text.d.ts.map +1 -0
  377. package/dist/record-overlay/signal-text.js +116 -0
  378. package/dist/record-overlay/signal-text.js.map +1 -0
  379. package/dist/record-overlay/source-index.d.ts +19 -0
  380. package/dist/record-overlay/source-index.d.ts.map +1 -0
  381. package/dist/record-overlay/source-index.js +102 -0
  382. package/dist/record-overlay/source-index.js.map +1 -0
  383. package/dist/record-overlay/types.d.ts +291 -0
  384. package/dist/record-overlay/types.d.ts.map +1 -0
  385. package/dist/record-overlay/types.js +2 -0
  386. package/dist/record-overlay/types.js.map +1 -0
  387. package/dist/remote-backend.d.ts +67 -67
  388. package/dist/remote-backend.d.ts.map +1 -1
  389. package/dist/remote-backend.js +169 -201
  390. package/dist/remote-backend.js.map +1 -1
  391. package/dist/remote-document-codec.d.ts +15 -0
  392. package/dist/remote-document-codec.d.ts.map +1 -0
  393. package/dist/remote-document-codec.js +103 -0
  394. package/dist/remote-document-codec.js.map +1 -0
  395. package/dist/remote-error.d.ts +38 -0
  396. package/dist/remote-error.d.ts.map +1 -0
  397. package/dist/remote-error.js +59 -0
  398. package/dist/remote-error.js.map +1 -0
  399. package/dist/remote-operations.d.ts +6 -3
  400. package/dist/remote-operations.d.ts.map +1 -1
  401. package/dist/remote-operations.js +23 -5
  402. package/dist/remote-operations.js.map +1 -1
  403. package/dist/remote-parsers.d.ts +86 -0
  404. package/dist/remote-parsers.d.ts.map +1 -0
  405. package/dist/remote-parsers.js +181 -0
  406. package/dist/remote-parsers.js.map +1 -0
  407. package/dist/remote.d.ts +5 -2
  408. package/dist/remote.d.ts.map +1 -1
  409. package/dist/remote.js +5 -1
  410. package/dist/remote.js.map +1 -1
  411. package/dist/search/backend-source.d.ts +6 -0
  412. package/dist/search/backend-source.d.ts.map +1 -0
  413. package/dist/search/backend-source.js +33 -0
  414. package/dist/search/backend-source.js.map +1 -0
  415. package/dist/search/contract.d.ts +151 -0
  416. package/dist/search/contract.d.ts.map +1 -0
  417. package/dist/search/contract.js +78 -0
  418. package/dist/search/contract.js.map +1 -0
  419. package/dist/search/errors.d.ts +30 -0
  420. package/dist/search/errors.d.ts.map +1 -0
  421. package/dist/search/errors.js +50 -0
  422. package/dist/search/errors.js.map +1 -0
  423. package/dist/search/identity.d.ts +12 -0
  424. package/dist/search/identity.d.ts.map +1 -0
  425. package/dist/search/identity.js +90 -0
  426. package/dist/search/identity.js.map +1 -0
  427. package/dist/search/index.d.ts +16 -0
  428. package/dist/search/index.d.ts.map +1 -0
  429. package/dist/search/index.js +15 -0
  430. package/dist/search/index.js.map +1 -0
  431. package/dist/search/memory-source.d.ts +36 -0
  432. package/dist/search/memory-source.d.ts.map +1 -0
  433. package/dist/search/memory-source.js +235 -0
  434. package/dist/search/memory-source.js.map +1 -0
  435. package/dist/search/rank.d.ts +34 -0
  436. package/dist/search/rank.d.ts.map +1 -0
  437. package/dist/search/rank.js +129 -0
  438. package/dist/search/rank.js.map +1 -0
  439. package/dist/search/row-text.d.ts +38 -0
  440. package/dist/search/row-text.d.ts.map +1 -0
  441. package/dist/search/row-text.js +88 -0
  442. package/dist/search/row-text.js.map +1 -0
  443. package/dist/search/search.d.ts +28 -0
  444. package/dist/search/search.d.ts.map +1 -0
  445. package/dist/search/search.js +257 -0
  446. package/dist/search/search.js.map +1 -0
  447. package/dist/search/source.d.ts +67 -0
  448. package/dist/search/source.d.ts.map +1 -0
  449. package/dist/search/source.js +2 -0
  450. package/dist/search/source.js.map +1 -0
  451. package/dist/search/text.d.ts +47 -0
  452. package/dist/search/text.d.ts.map +1 -0
  453. package/dist/search/text.js +148 -0
  454. package/dist/search/text.js.map +1 -0
  455. package/dist/site-capabilities.d.ts +339 -0
  456. package/dist/site-capabilities.d.ts.map +1 -0
  457. package/dist/site-capabilities.js +717 -0
  458. package/dist/site-capabilities.js.map +1 -0
  459. package/dist/source-engine/guard.d.ts +82 -0
  460. package/dist/source-engine/guard.d.ts.map +1 -0
  461. package/dist/source-engine/guard.js +396 -0
  462. package/dist/source-engine/guard.js.map +1 -0
  463. package/dist/source-engine/index.d.ts +24 -0
  464. package/dist/source-engine/index.d.ts.map +1 -0
  465. package/dist/source-engine/index.js +20 -0
  466. package/dist/source-engine/index.js.map +1 -0
  467. package/dist/source-engine/machine-state.d.ts +74 -0
  468. package/dist/source-engine/machine-state.d.ts.map +1 -0
  469. package/dist/source-engine/machine-state.js +48 -0
  470. package/dist/source-engine/machine-state.js.map +1 -0
  471. package/dist/source-engine/observe.d.ts +18 -0
  472. package/dist/source-engine/observe.d.ts.map +1 -0
  473. package/dist/source-engine/observe.js +598 -0
  474. package/dist/source-engine/observe.js.map +1 -0
  475. package/dist/source-engine/robots.d.ts +53 -0
  476. package/dist/source-engine/robots.d.ts.map +1 -0
  477. package/dist/source-engine/robots.js +158 -0
  478. package/dist/source-engine/robots.js.map +1 -0
  479. package/dist/source-engine/types.d.ts +285 -0
  480. package/dist/source-engine/types.d.ts.map +1 -0
  481. package/dist/source-engine/types.js +2 -0
  482. package/dist/source-engine/types.js.map +1 -0
  483. package/dist/source-harness/conformance.d.ts +16 -0
  484. package/dist/source-harness/conformance.d.ts.map +1 -0
  485. package/dist/source-harness/conformance.js +265 -0
  486. package/dist/source-harness/conformance.js.map +1 -0
  487. package/dist/source-harness/fixture.d.ts +95 -0
  488. package/dist/source-harness/fixture.d.ts.map +1 -0
  489. package/dist/source-harness/fixture.js +261 -0
  490. package/dist/source-harness/fixture.js.map +1 -0
  491. package/dist/source-harness/index.d.ts +22 -0
  492. package/dist/source-harness/index.d.ts.map +1 -0
  493. package/dist/source-harness/index.js +19 -0
  494. package/dist/source-harness/index.js.map +1 -0
  495. package/dist/source-harness/peer.d.ts +74 -0
  496. package/dist/source-harness/peer.d.ts.map +1 -0
  497. package/dist/source-harness/peer.js +106 -0
  498. package/dist/source-harness/peer.js.map +1 -0
  499. package/dist/storage.d.ts +6 -2
  500. package/dist/storage.d.ts.map +1 -1
  501. package/dist/storage.js +4 -1
  502. package/dist/storage.js.map +1 -1
  503. package/dist/types.d.ts +33 -5
  504. package/dist/types.d.ts.map +1 -1
  505. package/dist/uncertain-write.d.ts +156 -19
  506. package/dist/uncertain-write.d.ts.map +1 -1
  507. package/dist/uncertain-write.js +90 -31
  508. package/dist/uncertain-write.js.map +1 -1
  509. package/dist/versioning.d.ts +9 -4
  510. package/dist/versioning.d.ts.map +1 -1
  511. package/dist/versioning.js +9 -4
  512. package/dist/versioning.js.map +1 -1
  513. package/dist/write-identity.d.ts +5 -0
  514. package/dist/write-identity.d.ts.map +1 -0
  515. package/dist/write-identity.js +9 -0
  516. package/dist/write-identity.js.map +1 -0
  517. package/package.json +94 -2
@@ -0,0 +1,10 @@
1
+ import { parseRecipeFiles, type LoadedRecipe, type RecipeFile } from "./recipes.js";
2
+ export declare function builtinNames(): string[];
3
+ /** Resolve a built-in name only. Acquisition and filesystem routing belong to the caller. */
4
+ export declare function loadBuiltinRecipe(name: string): ReturnType<typeof parseRecipeFiles> | null;
5
+ /** Detached source bytes, for consumers that need a recipe package rather than its parsed form. */
6
+ export declare function builtinRecipeFiles(name: string): RecipeFile[] | undefined;
7
+ /** Synchronous builtin resolution for render-path consumers (offers) that must stay pure. */
8
+ export declare function resolveBuiltinSync(name: string): LoadedRecipe;
9
+ export { CONTEXT_NOTE_KIND, CONTEXT_NOTE_SEED_BODY_LOGICAL, CONTEXT_NOTE_SEED_BODY, CONTEXT_NOTES_SUMMARY, RECIPE_DESC_BODY, TASK_KIND, TASK_SEED_BODY, WORK_TRACKING_SUMMARY, WORK_TRACKING_DESC_BODY, ROADMAP_KIND, ROADMAP_SEED_BODY, ROADMAP_ITEM_KIND, ROADMAP_ITEM_SEED_BODY, ROADMAP_SUMMARY, ROADMAP_DESC_BODY } from "./builtin-recipes/content.js";
10
+ //# sourceMappingURL=builtin-recipes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-recipes.d.ts","sourceRoot":"","sources":["../src/builtin-recipes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAkGpF,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,GAAG,IAAI,CAK1F;AAED,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,SAAS,CAEzE;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAM7D;AAED,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EAClB,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,97 @@
1
+ // Built-in recipes are an acquisition adapter: they materialize the same RecipeFile[] shape an
2
+ // external source supplies, then delegate all interpretation to parseRecipeFiles.
3
+ import { kindConventionDoc } from "./kinds.js";
4
+ import { stringifyDoc } from "./frontmatter.js";
5
+ import { parseRecipeFiles } from "./recipes.js";
6
+ import { CONTEXT_NOTE_KIND, CONTEXT_NOTE_SEED_BODY_LOGICAL, CONTEXT_NOTES_SUMMARY, RECIPE_DESC_BODY, TASK_KIND, TASK_SEED_BODY, WORK_TRACKING_SUMMARY, WORK_TRACKING_DESC_BODY, ROADMAP_KIND, ROADMAP_SEED_BODY, ROADMAP_ITEM_KIND, ROADMAP_ITEM_SEED_BODY, ROADMAP_SUMMARY, ROADMAP_DESC_BODY, } from "./builtin-recipes/content.js";
7
+ /** Used only to call the shared serializer; built-in source bytes discard it before parsing. */
8
+ const PLACEHOLDER_TIMESTAMP = "1970-01-01T00:00:00.000Z";
9
+ function unstampedConvention(kind, body) {
10
+ const doc = kindConventionDoc(kind, body, PLACEHOLDER_TIMESTAMP);
11
+ const { timestamp: _timestamp, ...frontmatter } = doc.frontmatter;
12
+ return { ...doc, frontmatter };
13
+ }
14
+ function buildContextNotesFiles() {
15
+ const conv = unstampedConvention(CONTEXT_NOTE_KIND, CONTEXT_NOTE_SEED_BODY_LOGICAL);
16
+ return [
17
+ {
18
+ path: "recipe.md",
19
+ bytes: stringifyDoc({
20
+ type: "Recipe",
21
+ id: "context-notes",
22
+ title: "Context Notes",
23
+ version: "1",
24
+ summary: CONTEXT_NOTES_SUMMARY,
25
+ offer: "give agents persistent memory between sessions",
26
+ }, RECIPE_DESC_BODY),
27
+ },
28
+ { path: "conventions/context-note.md", bytes: stringifyDoc(conv.frontmatter, conv.body) },
29
+ ];
30
+ }
31
+ function buildWorkTrackingFiles() {
32
+ const conv = unstampedConvention(TASK_KIND, TASK_SEED_BODY);
33
+ return [
34
+ {
35
+ path: "recipe.md",
36
+ bytes: stringifyDoc({
37
+ type: "Recipe",
38
+ id: "work-tracking",
39
+ title: "Work Tracking",
40
+ version: "1",
41
+ summary: WORK_TRACKING_SUMMARY,
42
+ offer: "set up a shared task list for this project",
43
+ }, WORK_TRACKING_DESC_BODY),
44
+ },
45
+ { path: "conventions/task.md", bytes: stringifyDoc(conv.frontmatter, conv.body) },
46
+ ];
47
+ }
48
+ function buildRoadmapFiles() {
49
+ const roadmap = unstampedConvention(ROADMAP_KIND, ROADMAP_SEED_BODY);
50
+ const item = unstampedConvention(ROADMAP_ITEM_KIND, ROADMAP_ITEM_SEED_BODY);
51
+ return [
52
+ {
53
+ path: "recipe.md",
54
+ bytes: stringifyDoc({
55
+ type: "Recipe",
56
+ id: "roadmap",
57
+ title: "Roadmap",
58
+ version: "1",
59
+ summary: ROADMAP_SUMMARY,
60
+ offer: "map out where the project is going",
61
+ }, ROADMAP_DESC_BODY),
62
+ },
63
+ { path: "conventions/roadmap.md", bytes: stringifyDoc(roadmap.frontmatter, roadmap.body) },
64
+ { path: "conventions/roadmap-item.md", bytes: stringifyDoc(item.frontmatter, item.body) },
65
+ ];
66
+ }
67
+ const BUILTIN_FILES = {
68
+ "context-notes": buildContextNotesFiles(),
69
+ "work-tracking": buildWorkTrackingFiles(),
70
+ roadmap: buildRoadmapFiles(),
71
+ };
72
+ export function builtinNames() {
73
+ return Object.keys(BUILTIN_FILES);
74
+ }
75
+ /** Resolve a built-in name only. Acquisition and filesystem routing belong to the caller. */
76
+ export function loadBuiltinRecipe(name) {
77
+ const files = BUILTIN_FILES[name];
78
+ return files && Object.hasOwn(BUILTIN_FILES, name)
79
+ ? parseRecipeFiles(files, `builtin:${name}`, { okfVersion: "0.2" })
80
+ : null;
81
+ }
82
+ /** Detached source bytes, for consumers that need a recipe package rather than its parsed form. */
83
+ export function builtinRecipeFiles(name) {
84
+ return Object.hasOwn(BUILTIN_FILES, name) ? structuredClone(BUILTIN_FILES[name]) : undefined;
85
+ }
86
+ /** Synchronous builtin resolution for render-path consumers (offers) that must stay pure. */
87
+ export function resolveBuiltinSync(name) {
88
+ const files = builtinRecipeFiles(name);
89
+ if (!files)
90
+ throw new Error(`resolveBuiltinSync: no built-in recipe named '${name}'`);
91
+ const result = parseRecipeFiles(files, `builtin:${name}`, { okfVersion: "0.2" });
92
+ if (!result.ok)
93
+ throw new Error(`resolveBuiltinSync: built-in '${name}' failed to parse: ${result.error.message}`);
94
+ return result.recipe;
95
+ }
96
+ export { CONTEXT_NOTE_KIND, CONTEXT_NOTE_SEED_BODY_LOGICAL, CONTEXT_NOTE_SEED_BODY, CONTEXT_NOTES_SUMMARY, RECIPE_DESC_BODY, TASK_KIND, TASK_SEED_BODY, WORK_TRACKING_SUMMARY, WORK_TRACKING_DESC_BODY, ROADMAP_KIND, ROADMAP_SEED_BODY, ROADMAP_ITEM_KIND, ROADMAP_ITEM_SEED_BODY, ROADMAP_SUMMARY, ROADMAP_DESC_BODY } from "./builtin-recipes/content.js";
97
+ //# sourceMappingURL=builtin-recipes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-recipes.js","sourceRoot":"","sources":["../src/builtin-recipes.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,kFAAkF;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAsC,MAAM,cAAc,CAAC;AACpF,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AAEtC,gG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AE,UAAU,EAAE,KAAK,EAAE,CAAC;QACnE,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/F,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,IAAI,GAAG,CAAC,CAAC;IACtF,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,WAAW,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IACjF,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,sBAAsB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACnH,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC;AAED,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EAClB,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `@superbee/core/bundle-health`: the health report behind `superbee status`, computed from a core
3
+ * `Bundle` on any backend. The caller resolves what lives outside the bundle (bound copies of its
4
+ * dependencies, the clock, a fallback bundle id) and presents the report; the `superbee` CLI is one
5
+ * such caller. It also holds `bundleKindFindings`, the one rule for the Kind problems a strict host
6
+ * write would refuse, which publish preview and hosted bundle creation run. Storage-neutral: no Node
7
+ * globals or builtins.
8
+ */
9
+ export { bundleHealth } from "./report.js";
10
+ export type { BindDependencies, BundleHealthOptions, BundleHealthReport, CrossBundleHealth, CrossLinkTypeViolationRow, CrossUnresolvedRow, DanglingEntryRow, DependencyProblemRow, DependencyRow, DocTypeRow, FieldValueRow, InvalidRegistrationRow, KindLintRow, LegacyNamingFindings, LinkTypeViolationRow, MalformedRow, MissingExpectedRow, OkfUpgradeFinding, StaleRow, StatusFieldRow, UnresolvedLinkRow, ValueRow, ViewSurfaceHealth, } from "./report.js";
11
+ export { bundleKindFindings, bundleKindRegistry, documentKindFinding, isRegistryConvention } from "./kind-findings.js";
12
+ export type { BundleKindFindings, KindFinding, KindWriteIdentity } from "./kind-findings.js";
13
+ export { LEGACY_PAGE_TYPE_NAME, isLegacyPageDoc } from "./legacy-page.js";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundle-health/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACvH,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `@superbee/core/bundle-health`: the health report behind `superbee status`, computed from a core
3
+ * `Bundle` on any backend. The caller resolves what lives outside the bundle (bound copies of its
4
+ * dependencies, the clock, a fallback bundle id) and presents the report; the `superbee` CLI is one
5
+ * such caller. It also holds `bundleKindFindings`, the one rule for the Kind problems a strict host
6
+ * write would refuse, which publish preview and hosted bundle creation run. Storage-neutral: no Node
7
+ * globals or builtins.
8
+ */
9
+ export { bundleHealth } from "./report.js";
10
+ export { bundleKindFindings, bundleKindRegistry, documentKindFinding, isRegistryConvention } from "./kind-findings.js";
11
+ export { LEGACY_PAGE_TYPE_NAME, isLegacyPageDoc } from "./legacy-page.js";
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bundle-health/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA0B3C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEvH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { type KindRegistry } from "../kinds.js";
2
+ import type { OkfDocument } from "../types.js";
3
+ import type { ValidationWarning } from "../validation.js";
4
+ /**
5
+ * Who the checked first edit is attributed to. `producer` defaults to `actor`, as a write's does.
6
+ * On OKF v0.2 a `person:` actor cannot be a producer, so a v0.2 call with a `person:` actor must
7
+ * pass a `process:` (or `<producer>/<version>`) producer, or the check throws `OkfActorError`.
8
+ */
9
+ export interface KindWriteIdentity {
10
+ actor: string;
11
+ producer?: string;
12
+ }
13
+ export interface KindFinding {
14
+ readonly id: string;
15
+ readonly governs: string;
16
+ readonly violations: readonly ValidationWarning[];
17
+ /** Core's own sentence: `'<id>' does not satisfy the '<Kind>' kind: …`. */
18
+ readonly message: string;
19
+ }
20
+ export interface BundleKindFindings {
21
+ /** Registry warnings: every strict write to the bundle refuses while any is present. */
22
+ readonly conventions: readonly ValidationWarning[];
23
+ /** Documents whose first strict edit would refuse for their Kind. */
24
+ readonly documents: readonly KindFinding[];
25
+ }
26
+ /** Whether `loadKinds` builds the Kind registry from this document: a `Convention` under `conventions/`. */
27
+ export declare function isRegistryConvention(doc: OkfDocument): boolean;
28
+ /** The Kind registry a bundle holding `documents` loads, built with `loadKinds`' own filter and builder. */
29
+ export declare function bundleKindRegistry(documents: readonly OkfDocument[], okfVersion: "0.1" | "0.2"): KindRegistry;
30
+ /**
31
+ * The Kind problem a strict write would refuse the first edit of one stored document over, or
32
+ * null. The document is prepared as its first edit: the stored document as the existing one and a
33
+ * body one line longer as the candidate, so unchanged values keep the leniency an edit gives them.
34
+ * An edit refused for another reason (a malformed standard field it changes) is not a Kind problem.
35
+ */
36
+ export declare function documentKindFinding(doc: OkfDocument, registry: KindRegistry, okfVersion: "0.1" | "0.2", write: KindWriteIdentity): KindFinding | null;
37
+ /**
38
+ * The Kind problems in `documents` (as stored) that strict writes would refuse over: the warnings
39
+ * of the registry their conventions build, and each document's own finding against it, in input
40
+ * order. Each document is checked on its own, so a bundle checked in parts against the same
41
+ * registry finds exactly this.
42
+ */
43
+ export declare function bundleKindFindings(documents: readonly OkfDocument[], okfVersion: "0.1" | "0.2", write: KindWriteIdentity): BundleKindFindings;
44
+ //# sourceMappingURL=kind-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kind-findings.d.ts","sourceRoot":"","sources":["../../src/bundle-health/kind-findings.ts"],"names":[],"mappings":"AAaA,OAAO,EAA0D,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAExG,OAAO,KAAK,EAAE,WAAW,E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 * strict write refuses while the Kind registry has any warning, and it prepares and validates its
4
+ * candidate with `prepareDocumentMutationCandidate`, which supplies the timestamp, actor and v0.2
5
+ * metadata a write adds. This is the one rule for "what would the host refuse": the CLI's publish
6
+ * preview runs it, and a host's bundle creation runs it with its own producer.
7
+ *
8
+ * It asks a different question from the health report's Kind lint (`kindLint`,
9
+ * `conformanceDebt`), which reports what is wrong with each stored document as advice. Both run
10
+ * core's one validator, `validateAgainstKind`.
11
+ */
12
+ import { KindConformanceError, prepareDocumentMutationCandidate } from "../document-mutation.js";
13
+ import { InvalidInputError, OkfActorError } from "../errors.js";
14
+ import { buildKindRegistry, CONVENTION_TYPE, CONVENTIONS_PREFIX } from "../kinds.js";
15
+ import { matchesFilter } from "../query-filter.js";
16
+ /** Whether `loadKinds` builds the Kind registry from this document: a `Convention` under `conventions/`. */
17
+ export function isRegistryConvention(doc) {
18
+ return matchesFilter(doc, { prefix: CONVENTIONS_PREFIX, type: CONVENTION_TYPE });
19
+ }
20
+ /** The Kind registry a bundle holding `documents` loads, built with `loadKinds`' own filter and builder. */
21
+ export function bundleKindRegistry(documents, okfVersion) {
22
+ return buildKindRegistry(documents.filter(isRegistryConvention), [], { okfVersion });
23
+ }
24
+ /**
25
+ * The Kind problem a strict write would refuse the first edit of one stored document over, or
26
+ * null. The document is prepared as its first edit: the stored document as the existing one and a
27
+ * body one line longer as the candidate, so unchanged values keep the leniency an edit gives them.
28
+ * An edit refused for another reason (a malformed standard field it changes) is not a Kind problem.
29
+ */
30
+ export function documentKindFinding(doc, registry, okfVersion, write) {
31
+ try {
32
+ prepareDocumentMutationCandidate(doc, { frontmatter: doc.frontmatter, body: `${doc.body ?? ""}\n` }, {
33
+ strict: true,
34
+ persistActor: true,
35
+ ...(write.producer === undefined ? {} : { producer: write.producer }),
36
+ id: doc.id,
37
+ registry,
38
+ okfVersion,
39
+ actor: write.actor,
40
+ });
41
+ }
42
+ catch (error) {
43
+ if (error instanceof KindConformanceError) {
44
+ return { id: doc.id, governs: error.governs, violations: error.violations, message: error.message };
45
+ }
46
+ if (error instanceof InvalidInputError && !(error instanceof OkfActorError))
47
+ return null;
48
+ throw error;
49
+ }
50
+ return null;
51
+ }
52
+ /**
53
+ * The Kind problems in `documents` (as stored) that strict writes would refuse over: the warnings
54
+ * of the registry their conventions build, and each document's own finding against it, in input
55
+ * order. Each document is checked on its own, so a bundle checked in parts against the same
56
+ * registry finds exactly this.
57
+ */
58
+ export function bundleKindFindings(documents, okfVersion, write) {
59
+ const registry = bundleKindRegistry(documents, okfVersion);
60
+ const found = [];
61
+ for (const doc of documents) {
62
+ const finding = documentKindFinding(doc, registry, okfVersion, write);
63
+ if (finding)
64
+ found.push(finding);
65
+ }
66
+ return { conventions: registry.warnings, documents: found };
67
+ }
68
+ //# sourceMappingURL=kind-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kind-findings.js","sourceRoot":"","sources":["../../src/bundle-health/kind-findings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAqB,MAAM,aAAa,CAAC;AACxG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA6BnD,4GAA4G;AAC5G,MAAM,UAAU,oBAAoB,CAAC,GAAgB;IACnD,OAAO,aAAa,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;AACnF,CAAC;AAED,4GAA4G;AAC5G,MAAM,UAAU,kBAAkB,CAAC,SAAiC,EAAE,UAAyB;IAC7F,OAAO,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAA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AAC;QAC5B,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACtE,IAAI,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The retired `Page` kind name and `bridge` access-field spelling, for the `legacyNaming` section of
3
+ * the bundle health report. The runtime no longer recognizes either name: Page-typed documents do
4
+ * not register, and a bridge-only document resolves to `access: none`. Legacy folder locations
5
+ * remain valid.
6
+ *
7
+ * These literals cannot come from the live grammar in `page.ts`: diagnostics must recognize stock
8
+ * the runtime deliberately rejects, and a retired name must never track a live export. This module
9
+ * imports nothing; `legacy-constants-tripwire.test.ts` in the CLI pins its literals equal to
10
+ * core's legacy prefixes and to the recipe lifecycle's retired name by assertion.
11
+ */
12
+ /** The retired legacy kind name, frozen as a historical fact. */
13
+ export declare const LEGACY_PAGE_TYPE_NAME = "Page";
14
+ /**
15
+ * True when this frontmatter declares the legacy kind name: `type` exactly `"Page"`, the same exact
16
+ * match core's grammar applies (`isPageTypeName`). No trimming: a value that reaches a consumer with
17
+ * surrounding whitespace was deliberately quoted and was never a registration.
18
+ */
19
+ export declare function isLegacyPageDoc(frontmatter: Record<string, unknown>): boolean;
20
+ /**
21
+ * True when a View-kind document (current `View` or legacy `Page` spelling) carries its own legacy
22
+ * `bridge` field. `bridge` is only the View kind's legacy capability spelling, so a document of any
23
+ * other type carrying it is ordinary data and is never flagged.
24
+ */
25
+ export declare function hasLegacyBridgeField(frontmatter: Record<string, unknown>): boolean;
26
+ /** True when this frontmatter is a Convention governing exactly the retired `Page` name. */
27
+ export declare function isLegacyPageConvention(frontmatter: Record<string, unknown>): boolean;
28
+ /** The legacy id prefixes, frozen as historical facts (they mirror the legacy locations core still accepts). */
29
+ export declare const LEGACY_PAGE_REGISTRY_PREFIX = "pages-registry/";
30
+ export declare const LEGACY_PAGE_BLOB_PREFIX = "pages/";
31
+ /**
32
+ * Store-aware classifiers: a registry document is legacy only under `pages-registry/` in the
33
+ * document store, an entry only under `pages/` in the blob store. A concept document at `pages/x`
34
+ * is not a legacy item. A `true` here is reported as information, never acted on.
35
+ */
36
+ export declare function isLegacyRegistryDocId(id: string): boolean;
37
+ /** See {@link isLegacyRegistryDocId}: the blob-store half. */
38
+ export declare function isLegacyEntryBlobKey(key: string): boolean;
39
+ //# sourceMappingURL=legacy-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-page.d.ts","sourceRoot":"","sources":["../../src/bundle-health/legacy-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAE7E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAGlF;AAED,4FAA4F;AAC5F,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAEpF;AAED,gHAAgH;AAChH,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEzD"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The retired `Page` kind name and `bridge` access-field spelling, for the `legacyNaming` section of
3
+ * the bundle health report. The runtime no longer recognizes either name: Page-typed documents do
4
+ * not register, and a bridge-only document resolves to `access: none`. Legacy folder locations
5
+ * remain valid.
6
+ *
7
+ * These literals cannot come from the live grammar in `page.ts`: diagnostics must recognize stock
8
+ * the runtime deliberately rejects, and a retired name must never track a live export. This module
9
+ * imports nothing; `legacy-constants-tripwire.test.ts` in the CLI pins its literals equal to
10
+ * core's legacy prefixes and to the recipe lifecycle's retired name by assertion.
11
+ */
12
+ /** The retired legacy kind name, frozen as a historical fact. */
13
+ export const LEGACY_PAGE_TYPE_NAME = "Page";
14
+ /**
15
+ * True when this frontmatter declares the legacy kind name: `type` exactly `"Page"`, the same exact
16
+ * match core's grammar applies (`isPageTypeName`). No trimming: a value that reaches a consumer with
17
+ * surrounding whitespace was deliberately quoted and was never a registration.
18
+ */
19
+ export function isLegacyPageDoc(frontmatter) {
20
+ return frontmatter["type"] === LEGACY_PAGE_TYPE_NAME;
21
+ }
22
+ /**
23
+ * True when a View-kind document (current `View` or legacy `Page` spelling) carries its own legacy
24
+ * `bridge` field. `bridge` is only the View kind's legacy capability spelling, so a document of any
25
+ * other type carrying it is ordinary data and is never flagged.
26
+ */
27
+ export function hasLegacyBridgeField(frontmatter) {
28
+ const viewKind = frontmatter["type"] === LEGACY_PAGE_TYPE_NAME || frontmatter["type"] === "View";
29
+ return viewKind && Object.hasOwn(frontmatter, "bridge");
30
+ }
31
+ /** True when this frontmatter is a Convention governing exactly the retired `Page` name. */
32
+ export function isLegacyPageConvention(frontmatter) {
33
+ return frontmatter["type"] === "Convention" && frontmatter["governs"] === LEGACY_PAGE_TYPE_NAME;
34
+ }
35
+ /** The legacy id prefixes, frozen as historical facts (they mirror the legacy locations core still accepts). */
36
+ export const LEGACY_PAGE_REGISTRY_PREFIX = "pages-registry/";
37
+ export const LEGACY_PAGE_BLOB_PREFIX = "pages/";
38
+ /**
39
+ * Store-aware classifiers: a registry document is legacy only under `pages-registry/` in the
40
+ * document store, an entry only under `pages/` in the blob store. A concept document at `pages/x`
41
+ * is not a legacy item. A `true` here is reported as information, never acted on.
42
+ */
43
+ export function isLegacyRegistryDocId(id) {
44
+ return id.startsWith(LEGACY_PAGE_REGISTRY_PREFIX);
45
+ }
46
+ /** See {@link isLegacyRegistryDocId}: the blob-store half. */
47
+ export function isLegacyEntryBlobKey(key) {
48
+ return key.startsWith(LEGACY_PAGE_BLOB_PREFIX);
49
+ }
50
+ //# sourceMappingURL=legacy-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-page.js","sourceRoot":"","sources":["../../src/bundle-health/legacy-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,WAAoC;IAClE,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,qBAAqB,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAoC;IACvE,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,qBAAqB,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;IACjG,OAAO,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,sBAAsB,CAAC,WAAoC;IACzE,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,YAAY,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,qBAAqB,CAAC;AAClG,CAAC;AAED,gHAAgH;AAChH,MAAM,CAAC,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAC7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAU;IAC9C,OAAO,EAAE,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;AACpD,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,OAAO,GAAG,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,202 @@
1
+ import { type BundleBinding, type UnresolvedReason } from "../cross-bundle.js";
2
+ import { type ParsedDependencies } from "../dependencies.js";
3
+ import type { Bundle } from "../types.js";
4
+ import type { ValidationWarning } from "../validation.js";
5
+ import { type TrustTierCounts } from "../verification.js";
6
+ /**
7
+ * Binds declared dependencies: called once, after every read has completed and `docs/dependencies`
8
+ * has been parsed, with that parse. Returns the bound copies by alias.
9
+ */
10
+ export type BindDependencies = (declared: ParsedDependencies) => Promise<ReadonlyMap<string, BundleBinding>>;
11
+ export interface BundleHealthOptions {
12
+ /** The instant freshness is judged at. Default: the current time, taken after the reads. */
13
+ now?: Date;
14
+ /**
15
+ * Bound copies of declared dependencies, by alias: a map, or a hook called exactly once, after
16
+ * every read has completed and `docs/dependencies` has been parsed, with that parse. Default: none,
17
+ * so nothing outside the bundle is read. Whatever the hook throws propagates unchanged.
18
+ */
19
+ bindings?: ReadonlyMap<string, BundleBinding> | BindDependencies;
20
+ /** This bundle's id when `docs/bundle` declares none. */
21
+ selfBundleId?: string;
22
+ }
23
+ /** A document whose frontmatter does not parse; the root index comes first when it is one. */
24
+ export interface MalformedRow {
25
+ id: string;
26
+ reason: string;
27
+ }
28
+ /** One Kind violation of one document. */
29
+ export interface KindLintRow {
30
+ id: string;
31
+ field: string;
32
+ code: string;
33
+ }
34
+ /** A document and its `type` ("" when absent or not a string). */
35
+ export interface DocTypeRow {
36
+ id: string;
37
+ type: string;
38
+ }
39
+ export interface UnresolvedLinkRow {
40
+ from: string;
41
+ href: string;
42
+ }
43
+ /** A resolved local edge whose text is a declared link type its source or target does not conform to. */
44
+ export interface LinkTypeViolationRow {
45
+ from: string;
46
+ to: string;
47
+ text: string;
48
+ expected: string;
49
+ }
50
+ /**
51
+ * A qualified link whose text is a declared type it does not conform to, or a local link under a
52
+ * qualified declaration (`links: {pours: "beers:Beer"}`).
53
+ */
54
+ export interface CrossLinkTypeViolationRow {
55
+ from: string;
56
+ href: string;
57
+ text: string;
58
+ expected: string;
59
+ }
60
+ /**
61
+ * A Kind instance lacking a declared inbound expectation. `status` is present when the Kind declares
62
+ * a `status` field, and is the raw stored value (any YAML value, or undefined when unset).
63
+ */
64
+ export interface MissingExpectedRow {
65
+ id: string;
66
+ status?: unknown;
67
+ missing: string[];
68
+ }
69
+ /** A stale document: past its `stale_after` instant (a string by construction), or older than its Kind's horizon. */
70
+ export interface StaleRow {
71
+ id: string;
72
+ age_ms?: number;
73
+ horizon_ms?: number;
74
+ stale_after?: string;
75
+ }
76
+ /** An unreadable `stale_after`; `value` is the stored value made JSON-safe. */
77
+ export interface ValueRow {
78
+ id: string;
79
+ type: string;
80
+ value: unknown;
81
+ }
82
+ /** An invalid timestamp field occurrence; `value` is the stored value made JSON-safe. */
83
+ export interface FieldValueRow {
84
+ id: string;
85
+ type: string;
86
+ field: string;
87
+ value: unknown;
88
+ }
89
+ export interface DanglingEntryRow {
90
+ id: string;
91
+ entry: string;
92
+ }
93
+ /** A View-typed document failing the registration grammar; `problem` names the failing legs, joined by `+`. */
94
+ export interface InvalidRegistrationRow {
95
+ id: string;
96
+ problem: string;
97
+ }
98
+ export interface ViewSurfaceHealth {
99
+ /** View-typed documents (legacy locations included). */
100
+ typed: number;
101
+ danglingEntries: DanglingEntryRow[];
102
+ invalidRegistrations: InvalidRegistrationRow[];
103
+ }
104
+ export interface CrossUnresolvedRow {
105
+ from: string;
106
+ href: string;
107
+ reason: UnresolvedReason;
108
+ detail: string;
109
+ }
110
+ export interface DependencyRow {
111
+ alias: string;
112
+ bundle_id: string;
113
+ /** `unbound` without a binding; otherwise the bound copy's verdict from core's resolver. */
114
+ state: "unbound" | "ok" | UnresolvedReason;
115
+ /** The binding's label, or null when the alias is unbound. */
116
+ bound: string | null;
117
+ pin: string | null;
118
+ }
119
+ /** A `docs/dependencies` defect (a `DEP_*` code). */
120
+ export interface DependencyProblemRow {
121
+ code: string;
122
+ alias: string | null;
123
+ detail: string;
124
+ }
125
+ export interface CrossBundleHealth {
126
+ /** Every qualified (`okf:`) link, malformed ones included. */
127
+ links: number;
128
+ /** Qualified links whose declared alias has no binding. */
129
+ unchecked: number;
130
+ unresolved: CrossUnresolvedRow[];
131
+ dependencies: DependencyRow[];
132
+ problems: DependencyProblemRow[];
133
+ }
134
+ /** One Kind declaring a workflow `status` that collides with the OKF v0.2 lifecycle vocabulary. */
135
+ export interface StatusFieldRow {
136
+ kind: string;
137
+ convention: string;
138
+ declaration: "unbounded" | "enumerated";
139
+ incompatible_values: string[];
140
+ observed_incompatible_values: string[];
141
+ affected_documents: number;
142
+ }
143
+ export interface OkfUpgradeFinding {
144
+ statusFieldRows: StatusFieldRow[];
145
+ affectedDocuments: number;
146
+ }
147
+ export interface LegacyNamingFindings {
148
+ pageTyped: {
149
+ id: string;
150
+ }[];
151
+ bridgeField: {
152
+ id: string;
153
+ }[];
154
+ pageConvention: {
155
+ id: string;
156
+ }[];
157
+ legacyPrefix: {
158
+ id: string;
159
+ store: "doc" | "blob";
160
+ }[];
161
+ }
162
+ export interface BundleHealthReport {
163
+ /** The root index's declared edition; undefined when absent or unreadable. */
164
+ okfVersion: string | undefined;
165
+ docs: number;
166
+ kinds: number;
167
+ malformed: MalformedRow[];
168
+ kindLint: KindLintRow[];
169
+ /** One row per governed document with a frontmatter-level violation; null when the bundle declares no Kind. */
170
+ conformanceDebt: DocTypeRow[] | null;
171
+ registryWarnings: ValidationWarning[];
172
+ unresolvedLinks: UnresolvedLinkRow[];
173
+ orphans: DocTypeRow[];
174
+ linkTypeViolations: LinkTypeViolationRow[];
175
+ /** Independent of `crossBundle`: a local edge under a qualified declaration needs no dependencies. */
176
+ crossLinkTypeViolations: CrossLinkTypeViolationRow[];
177
+ /** In triage order. */
178
+ missingExpectedLinks: MissingExpectedRow[];
179
+ /** Terminal instances skipped before the inbound-expectation lint evaluated them. */
180
+ terminalSkipped: number;
181
+ stale: StaleRow[];
182
+ noTimestamp: DocTypeRow[];
183
+ invalidStaleAfter: ValueRow[];
184
+ invalidTimestamps: FieldValueRow[];
185
+ invalidLegacyTimestamps: FieldValueRow[];
186
+ /** Null on v0.1, an undeclared edition, or an empty bundle. */
187
+ trust: TrustTierCounts | null;
188
+ views: ViewSurfaceHealth;
189
+ /** Null without `docs/dependencies` and without any `okf:` link. */
190
+ crossBundle: CrossBundleHealth | null;
191
+ /** Present only on a v0.1 bundle with a workflow-status collision. */
192
+ okfUpgrade: OkfUpgradeFinding | null;
193
+ legacyNaming: LegacyNamingFindings;
194
+ }
195
+ /**
196
+ * Compute the health report for `bundle`. Read-only: it reads through the bundle's backend and
197
+ * never writes. It throws only what it propagates: `InvalidInputError` for a backend-less bundle in
198
+ * a runtime with no default, backend errors other than `MalformedDocumentError` (a finding), and
199
+ * whatever the `bindings` hook throws.
200
+ */
201
+ export declare function bundleHealth(bundle: Bundle, options?: BundleHealthOptions): Promise<BundleHealthReport>;
202
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/bundle-health/report.ts"],"names":[],"mappings":"AAeA,OAAO,EAA8C,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3H,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAyB5B,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAS3E;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,kBAAkB,KAAK,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,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