@superbee/core 0.2.0-pre.5 → 0.2.0-pre.50

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 (728) hide show
  1. package/README.md +1344 -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 +41 -2
  7. package/dist/backend.d.ts.map +1 -1
  8. package/dist/backend.js +281 -22
  9. package/dist/backend.js.map +1 -1
  10. package/dist/blob-contract.d.ts +82 -0
  11. package/dist/blob-contract.d.ts.map +1 -0
  12. package/dist/blob-contract.js +134 -0
  13. package/dist/blob-contract.js.map +1 -0
  14. package/dist/blob-journal.d.ts +303 -0
  15. package/dist/blob-journal.d.ts.map +1 -0
  16. package/dist/blob-journal.js +541 -0
  17. package/dist/blob-journal.js.map +1 -0
  18. package/dist/body-pages.d.ts +20 -0
  19. package/dist/body-pages.d.ts.map +1 -0
  20. package/dist/body-pages.js +56 -0
  21. package/dist/body-pages.js.map +1 -0
  22. package/dist/body-replace-guards.d.ts +78 -0
  23. package/dist/body-replace-guards.d.ts.map +1 -0
  24. package/dist/body-replace-guards.js +269 -0
  25. package/dist/body-replace-guards.js.map +1 -0
  26. package/dist/bounded-yaml.d.ts +28 -0
  27. package/dist/bounded-yaml.d.ts.map +1 -0
  28. package/dist/bounded-yaml.js +182 -0
  29. package/dist/bounded-yaml.js.map +1 -0
  30. package/dist/builtin-recipes/content.d.ts +93 -0
  31. package/dist/builtin-recipes/content.d.ts.map +1 -0
  32. package/dist/builtin-recipes/content.js +288 -0
  33. package/dist/builtin-recipes/content.js.map +1 -0
  34. package/dist/builtin-recipes/site.d.ts +5 -0
  35. package/dist/builtin-recipes/site.d.ts.map +1 -0
  36. package/dist/builtin-recipes/site.js +83 -0
  37. package/dist/builtin-recipes/site.js.map +1 -0
  38. package/dist/builtin-recipes.d.ts +13 -0
  39. package/dist/builtin-recipes.d.ts.map +1 -0
  40. package/dist/builtin-recipes.js +123 -0
  41. package/dist/builtin-recipes.js.map +1 -0
  42. package/dist/bundle-health/index.d.ts +14 -0
  43. package/dist/bundle-health/index.d.ts.map +1 -0
  44. package/dist/bundle-health/index.js +12 -0
  45. package/dist/bundle-health/index.js.map +1 -0
  46. package/dist/bundle-health/kind-findings.d.ts +44 -0
  47. package/dist/bundle-health/kind-findings.d.ts.map +1 -0
  48. package/dist/bundle-health/kind-findings.js +67 -0
  49. package/dist/bundle-health/kind-findings.js.map +1 -0
  50. package/dist/bundle-health/legacy-page.d.ts +21 -0
  51. package/dist/bundle-health/legacy-page.d.ts.map +1 -0
  52. package/dist/bundle-health/legacy-page.js +25 -0
  53. package/dist/bundle-health/legacy-page.js.map +1 -0
  54. package/dist/bundle-health/report.d.ts +191 -0
  55. package/dist/bundle-health/report.d.ts.map +1 -0
  56. package/dist/bundle-health/report.js +424 -0
  57. package/dist/bundle-health/report.js.map +1 -0
  58. package/dist/bundle-ops.d.ts +9 -3
  59. package/dist/bundle-ops.d.ts.map +1 -1
  60. package/dist/bundle-ops.js +13 -6
  61. package/dist/bundle-ops.js.map +1 -1
  62. package/dist/bundle.d.ts +2 -4
  63. package/dist/bundle.d.ts.map +1 -1
  64. package/dist/bundle.js +3 -12
  65. package/dist/bundle.js.map +1 -1
  66. package/dist/code-point-order.d.ts +8 -0
  67. package/dist/code-point-order.d.ts.map +1 -0
  68. package/dist/code-point-order.js +20 -0
  69. package/dist/code-point-order.js.map +1 -0
  70. package/dist/code-unit-order.d.ts +15 -0
  71. package/dist/code-unit-order.d.ts.map +1 -0
  72. package/dist/code-unit-order.js +17 -0
  73. package/dist/code-unit-order.js.map +1 -0
  74. package/dist/connector-request.d.ts +112 -0
  75. package/dist/connector-request.d.ts.map +1 -0
  76. package/dist/connector-request.js +495 -0
  77. package/dist/connector-request.js.map +1 -0
  78. package/dist/connectors.d.ts +297 -0
  79. package/dist/connectors.d.ts.map +1 -0
  80. package/dist/connectors.js +1233 -0
  81. package/dist/connectors.js.map +1 -0
  82. package/dist/convention-record.d.ts +9 -0
  83. package/dist/convention-record.d.ts.map +1 -0
  84. package/dist/convention-record.js +13 -0
  85. package/dist/convention-record.js.map +1 -0
  86. package/dist/cross-bundle.d.ts +135 -0
  87. package/dist/cross-bundle.d.ts.map +1 -0
  88. package/dist/cross-bundle.js +191 -0
  89. package/dist/cross-bundle.js.map +1 -0
  90. package/dist/dependencies.d.ts +94 -0
  91. package/dist/dependencies.d.ts.map +1 -0
  92. package/dist/dependencies.js +180 -0
  93. package/dist/dependencies.js.map +1 -0
  94. package/dist/document-codec.d.ts +9 -2
  95. package/dist/document-codec.d.ts.map +1 -1
  96. package/dist/document-codec.js +10 -5
  97. package/dist/document-codec.js.map +1 -1
  98. package/dist/document-field-actions.d.ts +31 -1
  99. package/dist/document-field-actions.d.ts.map +1 -1
  100. package/dist/document-field-actions.js +137 -34
  101. package/dist/document-field-actions.js.map +1 -1
  102. package/dist/document-mutation.d.ts +37 -13
  103. package/dist/document-mutation.d.ts.map +1 -1
  104. package/dist/document-mutation.js +161 -62
  105. package/dist/document-mutation.js.map +1 -1
  106. package/dist/document-scan.d.ts +26 -0
  107. package/dist/document-scan.d.ts.map +1 -0
  108. package/dist/document-scan.js +70 -0
  109. package/dist/document-scan.js.map +1 -0
  110. package/dist/document-transfer.d.ts +312 -0
  111. package/dist/document-transfer.d.ts.map +1 -0
  112. package/dist/document-transfer.js +1414 -0
  113. package/dist/document-transfer.js.map +1 -0
  114. package/dist/document-write-policy.d.ts.map +1 -1
  115. package/dist/document-write-policy.js +4 -2
  116. package/dist/document-write-policy.js.map +1 -1
  117. package/dist/domain-model.d.ts +73 -0
  118. package/dist/domain-model.d.ts.map +1 -0
  119. package/dist/domain-model.js +169 -0
  120. package/dist/domain-model.js.map +1 -0
  121. package/dist/engine.d.ts +20 -19
  122. package/dist/engine.d.ts.map +1 -1
  123. package/dist/engine.js +85 -44
  124. package/dist/engine.js.map +1 -1
  125. package/dist/errors.d.ts +37 -1
  126. package/dist/errors.d.ts.map +1 -1
  127. package/dist/errors.js +75 -3
  128. package/dist/errors.js.map +1 -1
  129. package/dist/file-journaled-backend-internal.d.ts +21 -0
  130. package/dist/file-journaled-backend-internal.d.ts.map +1 -0
  131. package/dist/file-journaled-backend-internal.js +12 -0
  132. package/dist/file-journaled-backend-internal.js.map +1 -0
  133. package/dist/file-journaled-backend.d.ts +160 -0
  134. package/dist/file-journaled-backend.d.ts.map +1 -0
  135. package/dist/file-journaled-backend.js +1345 -0
  136. package/dist/file-journaled-backend.js.map +1 -0
  137. package/dist/filesystem-identity.d.ts +106 -17
  138. package/dist/filesystem-identity.d.ts.map +1 -1
  139. package/dist/filesystem-identity.js +513 -51
  140. package/dist/filesystem-identity.js.map +1 -1
  141. package/dist/filesystem-lock.d.ts +16 -2
  142. package/dist/filesystem-lock.d.ts.map +1 -1
  143. package/dist/filesystem-lock.js +402 -27
  144. package/dist/filesystem-lock.js.map +1 -1
  145. package/dist/filesystem-push-role.d.ts +77 -0
  146. package/dist/filesystem-push-role.d.ts.map +1 -0
  147. package/dist/filesystem-push-role.js +165 -0
  148. package/dist/filesystem-push-role.js.map +1 -0
  149. package/dist/filesystem-temp-name.d.ts +9 -0
  150. package/dist/filesystem-temp-name.d.ts.map +1 -0
  151. package/dist/filesystem-temp-name.js +20 -0
  152. package/dist/filesystem-temp-name.js.map +1 -0
  153. package/dist/filesystem.d.ts +6 -0
  154. package/dist/filesystem.d.ts.map +1 -1
  155. package/dist/filesystem.js +2 -1
  156. package/dist/filesystem.js.map +1 -1
  157. package/dist/frontmatter-contract.d.ts +14 -0
  158. package/dist/frontmatter-contract.d.ts.map +1 -1
  159. package/dist/frontmatter-contract.js +22 -0
  160. package/dist/frontmatter-contract.js.map +1 -1
  161. package/dist/frontmatter-splitter.d.ts +6 -0
  162. package/dist/frontmatter-splitter.d.ts.map +1 -1
  163. package/dist/frontmatter-splitter.js +8 -0
  164. package/dist/frontmatter-splitter.js.map +1 -1
  165. package/dist/frontmatter.d.ts +16 -7
  166. package/dist/frontmatter.d.ts.map +1 -1
  167. package/dist/frontmatter.js +48 -11
  168. package/dist/frontmatter.js.map +1 -1
  169. package/dist/governed-body-write.d.ts +8 -1
  170. package/dist/governed-body-write.d.ts.map +1 -1
  171. package/dist/governed-body-write.js +22 -8
  172. package/dist/governed-body-write.js.map +1 -1
  173. package/dist/heads-digest.d.ts.map +1 -1
  174. package/dist/heads-digest.js +2 -1
  175. package/dist/heads-digest.js.map +1 -1
  176. package/dist/host-text.d.ts +31 -0
  177. package/dist/host-text.d.ts.map +1 -0
  178. package/dist/host-text.js +77 -0
  179. package/dist/host-text.js.map +1 -0
  180. package/dist/hosted-client/binding.d.ts +7 -0
  181. package/dist/hosted-client/binding.d.ts.map +1 -0
  182. package/dist/hosted-client/binding.js +10 -0
  183. package/dist/hosted-client/binding.js.map +1 -0
  184. package/dist/hosted-client/blob-delivery.d.ts +68 -0
  185. package/dist/hosted-client/blob-delivery.d.ts.map +1 -0
  186. package/dist/hosted-client/blob-delivery.js +170 -0
  187. package/dist/hosted-client/blob-delivery.js.map +1 -0
  188. package/dist/hosted-client/blob-write.d.ts +387 -0
  189. package/dist/hosted-client/blob-write.d.ts.map +1 -0
  190. package/dist/hosted-client/blob-write.js +770 -0
  191. package/dist/hosted-client/blob-write.js.map +1 -0
  192. package/dist/hosted-client/bundle-listing.d.ts +46 -0
  193. package/dist/hosted-client/bundle-listing.d.ts.map +1 -0
  194. package/dist/hosted-client/bundle-listing.js +36 -0
  195. package/dist/hosted-client/bundle-listing.js.map +1 -0
  196. package/dist/hosted-client/client.d.ts +249 -0
  197. package/dist/hosted-client/client.d.ts.map +1 -0
  198. package/dist/hosted-client/client.js +381 -0
  199. package/dist/hosted-client/client.js.map +1 -0
  200. package/dist/hosted-client/directory.d.ts +46 -0
  201. package/dist/hosted-client/directory.d.ts.map +1 -0
  202. package/dist/hosted-client/directory.js +74 -0
  203. package/dist/hosted-client/directory.js.map +1 -0
  204. package/dist/hosted-client/errors.d.ts +26 -0
  205. package/dist/hosted-client/errors.d.ts.map +1 -0
  206. package/dist/hosted-client/errors.js +35 -0
  207. package/dist/hosted-client/errors.js.map +1 -0
  208. package/dist/hosted-client/inbox.d.ts +320 -0
  209. package/dist/hosted-client/inbox.d.ts.map +1 -0
  210. package/dist/hosted-client/inbox.js +379 -0
  211. package/dist/hosted-client/inbox.js.map +1 -0
  212. package/dist/hosted-client/index.d.ts +31 -0
  213. package/dist/hosted-client/index.d.ts.map +1 -0
  214. package/dist/hosted-client/index.js +33 -0
  215. package/dist/hosted-client/index.js.map +1 -0
  216. package/dist/hosted-client/journal.d.ts +103 -0
  217. package/dist/hosted-client/journal.d.ts.map +1 -0
  218. package/dist/hosted-client/journal.js +464 -0
  219. package/dist/hosted-client/journal.js.map +1 -0
  220. package/dist/hosted-client/node.d.ts +74 -0
  221. package/dist/hosted-client/node.d.ts.map +1 -0
  222. package/dist/hosted-client/node.js +219 -0
  223. package/dist/hosted-client/node.js.map +1 -0
  224. package/dist/hosted-client/reference.d.ts +12 -0
  225. package/dist/hosted-client/reference.d.ts.map +1 -0
  226. package/dist/hosted-client/reference.js +29 -0
  227. package/dist/hosted-client/reference.js.map +1 -0
  228. package/dist/hosted-client/view-content.d.ts +184 -0
  229. package/dist/hosted-client/view-content.d.ts.map +1 -0
  230. package/dist/hosted-client/view-content.js +268 -0
  231. package/dist/hosted-client/view-content.js.map +1 -0
  232. package/dist/hosted-client/write.d.ts +219 -0
  233. package/dist/hosted-client/write.d.ts.map +1 -0
  234. package/dist/hosted-client/write.js +419 -0
  235. package/dist/hosted-client/write.js.map +1 -0
  236. package/dist/hosted-transport/answer-rows.d.ts +341 -0
  237. package/dist/hosted-transport/answer-rows.d.ts.map +1 -0
  238. package/dist/hosted-transport/answer-rows.js +594 -0
  239. package/dist/hosted-transport/answer-rows.js.map +1 -0
  240. package/dist/hosted-transport/blob-reads.d.ts +35 -0
  241. package/dist/hosted-transport/blob-reads.d.ts.map +1 -0
  242. package/dist/hosted-transport/blob-reads.js +179 -0
  243. package/dist/hosted-transport/blob-reads.js.map +1 -0
  244. package/dist/hosted-transport/blob-write.d.ts +34 -0
  245. package/dist/hosted-transport/blob-write.d.ts.map +1 -0
  246. package/dist/hosted-transport/blob-write.js +115 -0
  247. package/dist/hosted-transport/blob-write.js.map +1 -0
  248. package/dist/hosted-transport/carrier.d.ts +153 -0
  249. package/dist/hosted-transport/carrier.d.ts.map +1 -0
  250. package/dist/hosted-transport/carrier.js +273 -0
  251. package/dist/hosted-transport/carrier.js.map +1 -0
  252. package/dist/hosted-transport/document-backend.d.ts +74 -0
  253. package/dist/hosted-transport/document-backend.d.ts.map +1 -0
  254. package/dist/hosted-transport/document-backend.js +160 -0
  255. package/dist/hosted-transport/document-backend.js.map +1 -0
  256. package/dist/hosted-transport/history-pages.d.ts +55 -0
  257. package/dist/hosted-transport/history-pages.d.ts.map +1 -0
  258. package/dist/hosted-transport/history-pages.js +69 -0
  259. package/dist/hosted-transport/history-pages.js.map +1 -0
  260. package/dist/hosted-transport/index.d.ts +20 -0
  261. package/dist/hosted-transport/index.d.ts.map +1 -0
  262. package/dist/hosted-transport/index.js +20 -0
  263. package/dist/hosted-transport/index.js.map +1 -0
  264. package/dist/hosted-transport/operations.d.ts +85 -0
  265. package/dist/hosted-transport/operations.d.ts.map +1 -0
  266. package/dist/hosted-transport/operations.js +128 -0
  267. package/dist/hosted-transport/operations.js.map +1 -0
  268. package/dist/hosted-transport/paged-reads.d.ts +87 -0
  269. package/dist/hosted-transport/paged-reads.d.ts.map +1 -0
  270. package/dist/hosted-transport/paged-reads.js +238 -0
  271. package/dist/hosted-transport/paged-reads.js.map +1 -0
  272. package/dist/hosted-transport/port-run.d.ts +41 -0
  273. package/dist/hosted-transport/port-run.d.ts.map +1 -0
  274. package/dist/hosted-transport/port-run.js +92 -0
  275. package/dist/hosted-transport/port-run.js.map +1 -0
  276. package/dist/hosted-transport/read-adapter.d.ts +266 -0
  277. package/dist/hosted-transport/read-adapter.d.ts.map +1 -0
  278. package/dist/hosted-transport/read-adapter.js +570 -0
  279. package/dist/hosted-transport/read-adapter.js.map +1 -0
  280. package/dist/hosted-transport/root-write.d.ts +114 -0
  281. package/dist/hosted-transport/root-write.d.ts.map +1 -0
  282. package/dist/hosted-transport/root-write.js +174 -0
  283. package/dist/hosted-transport/root-write.js.map +1 -0
  284. package/dist/hosted-transport/whole-document-transport.d.ts +216 -0
  285. package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -0
  286. package/dist/hosted-transport/whole-document-transport.js +470 -0
  287. package/dist/hosted-transport/whole-document-transport.js.map +1 -0
  288. package/dist/identity-fold.d.ts +16 -0
  289. package/dist/identity-fold.d.ts.map +1 -0
  290. package/dist/identity-fold.js +24 -0
  291. package/dist/identity-fold.js.map +1 -0
  292. package/dist/index-projection.d.ts +2 -1
  293. package/dist/index-projection.d.ts.map +1 -1
  294. package/dist/index-projection.js +14 -5
  295. package/dist/index-projection.js.map +1 -1
  296. package/dist/index.d.ts +57 -18
  297. package/dist/index.d.ts.map +1 -1
  298. package/dist/index.js +46 -19
  299. package/dist/index.js.map +1 -1
  300. package/dist/indexeddb-backend.d.ts +6 -32
  301. package/dist/indexeddb-backend.d.ts.map +1 -1
  302. package/dist/indexeddb-backend.js +82 -8
  303. package/dist/indexeddb-backend.js.map +1 -1
  304. package/dist/inventory-guard.d.ts +58 -0
  305. package/dist/inventory-guard.d.ts.map +1 -0
  306. package/dist/inventory-guard.js +169 -0
  307. package/dist/inventory-guard.js.map +1 -0
  308. package/dist/journaled-backend.d.ts +86 -8
  309. package/dist/journaled-backend.d.ts.map +1 -1
  310. package/dist/journaled-backend.js +64 -69
  311. package/dist/journaled-backend.js.map +1 -1
  312. package/dist/json-data.d.ts +3 -0
  313. package/dist/json-data.d.ts.map +1 -0
  314. package/dist/json-data.js +19 -0
  315. package/dist/json-data.js.map +1 -0
  316. package/dist/kind-authoring.d.ts +188 -0
  317. package/dist/kind-authoring.d.ts.map +1 -0
  318. package/dist/kind-authoring.js +502 -0
  319. package/dist/kind-authoring.js.map +1 -0
  320. package/dist/kind-changes.d.ts +45 -0
  321. package/dist/kind-changes.d.ts.map +1 -0
  322. package/dist/kind-changes.js +96 -0
  323. package/dist/kind-changes.js.map +1 -0
  324. package/dist/kind-conformance-error.d.ts +15 -0
  325. package/dist/kind-conformance-error.d.ts.map +1 -0
  326. package/dist/kind-conformance-error.js +20 -0
  327. package/dist/kind-conformance-error.js.map +1 -0
  328. package/dist/kind-coverage.d.ts +100 -0
  329. package/dist/kind-coverage.d.ts.map +1 -0
  330. package/dist/kind-coverage.js +185 -0
  331. package/dist/kind-coverage.js.map +1 -0
  332. package/dist/kind-deprecation.d.ts +32 -0
  333. package/dist/kind-deprecation.d.ts.map +1 -0
  334. package/dist/kind-deprecation.js +141 -0
  335. package/dist/kind-deprecation.js.map +1 -0
  336. package/dist/kind-field-mutation.d.ts +4 -0
  337. package/dist/kind-field-mutation.d.ts.map +1 -1
  338. package/dist/kind-field-mutation.js +28 -3
  339. package/dist/kind-field-mutation.js.map +1 -1
  340. package/dist/kind-undeclared-fields.d.ts +70 -0
  341. package/dist/kind-undeclared-fields.d.ts.map +1 -0
  342. package/dist/kind-undeclared-fields.js +121 -0
  343. package/dist/kind-undeclared-fields.js.map +1 -0
  344. package/dist/kinds-load.d.ts.map +1 -1
  345. package/dist/kinds-load.js +8 -5
  346. package/dist/kinds-load.js.map +1 -1
  347. package/dist/kinds.d.ts +115 -6
  348. package/dist/kinds.d.ts.map +1 -1
  349. package/dist/kinds.js +400 -24
  350. package/dist/kinds.js.map +1 -1
  351. package/dist/link-emit.d.ts +29 -0
  352. package/dist/link-emit.d.ts.map +1 -0
  353. package/dist/link-emit.js +39 -0
  354. package/dist/link-emit.js.map +1 -0
  355. package/dist/link-findings.d.ts +130 -0
  356. package/dist/link-findings.d.ts.map +1 -0
  357. package/dist/link-findings.js +274 -0
  358. package/dist/link-findings.js.map +1 -0
  359. package/dist/link-types.d.ts +34 -0
  360. package/dist/link-types.d.ts.map +1 -0
  361. package/dist/link-types.js +79 -0
  362. package/dist/link-types.js.map +1 -0
  363. package/dist/links.d.ts +52 -3
  364. package/dist/links.d.ts.map +1 -1
  365. package/dist/links.js +287 -24
  366. package/dist/links.js.map +1 -1
  367. package/dist/managed-document-metadata.d.ts +2 -0
  368. package/dist/managed-document-metadata.d.ts.map +1 -0
  369. package/dist/managed-document-metadata.js +9 -0
  370. package/dist/managed-document-metadata.js.map +1 -0
  371. package/dist/memory-backend.d.ts +3 -0
  372. package/dist/memory-backend.d.ts.map +1 -1
  373. package/dist/memory-backend.js +46 -4
  374. package/dist/memory-backend.js.map +1 -1
  375. package/dist/okf-actor.d.ts +1 -0
  376. package/dist/okf-actor.d.ts.map +1 -1
  377. package/dist/okf-actor.js +1 -0
  378. package/dist/okf-actor.js.map +1 -1
  379. package/dist/okf-authoring.d.ts +4 -0
  380. package/dist/okf-authoring.d.ts.map +1 -0
  381. package/dist/okf-authoring.js +12 -0
  382. package/dist/okf-authoring.js.map +1 -0
  383. package/dist/okf-standard-fields.d.ts +3 -0
  384. package/dist/okf-standard-fields.d.ts.map +1 -1
  385. package/dist/okf-standard-fields.js +3 -0
  386. package/dist/okf-standard-fields.js.map +1 -1
  387. package/dist/page.d.ts +3 -7
  388. package/dist/page.d.ts.map +1 -1
  389. package/dist/page.js +3 -7
  390. package/dist/page.js.map +1 -1
  391. package/dist/path-fold.d.ts +52 -0
  392. package/dist/path-fold.d.ts.map +1 -0
  393. package/dist/path-fold.js +54 -0
  394. package/dist/path-fold.js.map +1 -0
  395. package/dist/paths.d.ts +46 -0
  396. package/dist/paths.d.ts.map +1 -1
  397. package/dist/paths.js +114 -1
  398. package/dist/paths.js.map +1 -1
  399. package/dist/platform.d.ts +22 -2
  400. package/dist/platform.d.ts.map +1 -1
  401. package/dist/platform.js +16 -0
  402. package/dist/platform.js.map +1 -1
  403. package/dist/portable-export.d.ts +119 -0
  404. package/dist/portable-export.d.ts.map +1 -0
  405. package/dist/portable-export.js +501 -0
  406. package/dist/portable-export.js.map +1 -0
  407. package/dist/portable-frontmatter.d.ts +6 -0
  408. package/dist/portable-frontmatter.d.ts.map +1 -1
  409. package/dist/portable-frontmatter.js +26 -2
  410. package/dist/portable-frontmatter.js.map +1 -1
  411. package/dist/publication-filesystem.d.ts +1 -1
  412. package/dist/publication-filesystem.d.ts.map +1 -1
  413. package/dist/publication-filesystem.js +1 -1
  414. package/dist/publication-filesystem.js.map +1 -1
  415. package/dist/qualified-links.d.ts +67 -0
  416. package/dist/qualified-links.d.ts.map +1 -0
  417. package/dist/qualified-links.js +117 -0
  418. package/dist/qualified-links.js.map +1 -0
  419. package/dist/query-filter.d.ts +16 -4
  420. package/dist/query-filter.d.ts.map +1 -1
  421. package/dist/query-filter.js +44 -2
  422. package/dist/query-filter.js.map +1 -1
  423. package/dist/query-order.d.ts +22 -0
  424. package/dist/query-order.d.ts.map +1 -0
  425. package/dist/query-order.js +43 -0
  426. package/dist/query-order.js.map +1 -0
  427. package/dist/recipe-lifecycle/errors.d.ts +96 -0
  428. package/dist/recipe-lifecycle/errors.d.ts.map +1 -0
  429. package/dist/recipe-lifecycle/errors.js +122 -0
  430. package/dist/recipe-lifecycle/errors.js.map +1 -0
  431. package/dist/recipe-lifecycle/evolution.d.ts +124 -0
  432. package/dist/recipe-lifecycle/evolution.d.ts.map +1 -0
  433. package/dist/recipe-lifecycle/evolution.js +988 -0
  434. package/dist/recipe-lifecycle/evolution.js.map +1 -0
  435. package/dist/recipe-lifecycle/index.d.ts +34 -0
  436. package/dist/recipe-lifecycle/index.d.ts.map +1 -0
  437. package/dist/recipe-lifecycle/index.js +28 -0
  438. package/dist/recipe-lifecycle/index.js.map +1 -0
  439. package/dist/recipe-lifecycle/install.d.ts +161 -0
  440. package/dist/recipe-lifecycle/install.d.ts.map +1 -0
  441. package/dist/recipe-lifecycle/install.js +632 -0
  442. package/dist/recipe-lifecycle/install.js.map +1 -0
  443. package/dist/recipe-lifecycle/legacy-aliases.d.ts +4 -0
  444. package/dist/recipe-lifecycle/legacy-aliases.d.ts.map +1 -0
  445. package/dist/recipe-lifecycle/legacy-aliases.js +22 -0
  446. package/dist/recipe-lifecycle/legacy-aliases.js.map +1 -0
  447. package/dist/recipe-lifecycle/retirement-apply.d.ts +59 -0
  448. package/dist/recipe-lifecycle/retirement-apply.d.ts.map +1 -0
  449. package/dist/recipe-lifecycle/retirement-apply.js +165 -0
  450. package/dist/recipe-lifecycle/retirement-apply.js.map +1 -0
  451. package/dist/recipe-lifecycle/retirement.d.ts +89 -0
  452. package/dist/recipe-lifecycle/retirement.d.ts.map +1 -0
  453. package/dist/recipe-lifecycle/retirement.js +347 -0
  454. package/dist/recipe-lifecycle/retirement.js.map +1 -0
  455. package/dist/recipe-lifecycle/stamp.d.ts +146 -0
  456. package/dist/recipe-lifecycle/stamp.d.ts.map +1 -0
  457. package/dist/recipe-lifecycle/stamp.js +361 -0
  458. package/dist/recipe-lifecycle/stamp.js.map +1 -0
  459. package/dist/recipe-qualify.d.ts +80 -0
  460. package/dist/recipe-qualify.d.ts.map +1 -0
  461. package/dist/recipe-qualify.js +358 -0
  462. package/dist/recipe-qualify.js.map +1 -0
  463. package/dist/recipe-set-preflight.d.ts +139 -0
  464. package/dist/recipe-set-preflight.d.ts.map +1 -0
  465. package/dist/recipe-set-preflight.js +536 -0
  466. package/dist/recipe-set-preflight.js.map +1 -0
  467. package/dist/recipe-sources.d.ts +209 -0
  468. package/dist/recipe-sources.d.ts.map +1 -0
  469. package/dist/recipe-sources.js +607 -0
  470. package/dist/recipe-sources.js.map +1 -0
  471. package/dist/recipes.d.ts +45 -1
  472. package/dist/recipes.d.ts.map +1 -1
  473. package/dist/recipes.js +138 -1
  474. package/dist/recipes.js.map +1 -1
  475. package/dist/record-overlay/apply.d.ts +43 -0
  476. package/dist/record-overlay/apply.d.ts.map +1 -0
  477. package/dist/record-overlay/apply.js +523 -0
  478. package/dist/record-overlay/apply.js.map +1 -0
  479. package/dist/record-overlay/canonical.d.ts +22 -0
  480. package/dist/record-overlay/canonical.d.ts.map +1 -0
  481. package/dist/record-overlay/canonical.js +47 -0
  482. package/dist/record-overlay/canonical.js.map +1 -0
  483. package/dist/record-overlay/digest.d.ts +4 -0
  484. package/dist/record-overlay/digest.d.ts.map +1 -0
  485. package/dist/record-overlay/digest.js +11 -0
  486. package/dist/record-overlay/digest.js.map +1 -0
  487. package/dist/record-overlay/errors.d.ts +44 -0
  488. package/dist/record-overlay/errors.d.ts.map +1 -0
  489. package/dist/record-overlay/errors.js +55 -0
  490. package/dist/record-overlay/errors.js.map +1 -0
  491. package/dist/record-overlay/findings.d.ts +5 -0
  492. package/dist/record-overlay/findings.d.ts.map +1 -0
  493. package/dist/record-overlay/findings.js +86 -0
  494. package/dist/record-overlay/findings.js.map +1 -0
  495. package/dist/record-overlay/index.d.ts +23 -0
  496. package/dist/record-overlay/index.d.ts.map +1 -0
  497. package/dist/record-overlay/index.js +21 -0
  498. package/dist/record-overlay/index.js.map +1 -0
  499. package/dist/record-overlay/plan.d.ts +12 -0
  500. package/dist/record-overlay/plan.d.ts.map +1 -0
  501. package/dist/record-overlay/plan.js +285 -0
  502. package/dist/record-overlay/plan.js.map +1 -0
  503. package/dist/record-overlay/policy.d.ts +74 -0
  504. package/dist/record-overlay/policy.d.ts.map +1 -0
  505. package/dist/record-overlay/policy.js +235 -0
  506. package/dist/record-overlay/policy.js.map +1 -0
  507. package/dist/record-overlay/redact.d.ts +3 -0
  508. package/dist/record-overlay/redact.d.ts.map +1 -0
  509. package/dist/record-overlay/redact.js +27 -0
  510. package/dist/record-overlay/redact.js.map +1 -0
  511. package/dist/record-overlay/signal-kind.d.ts +30 -0
  512. package/dist/record-overlay/signal-kind.d.ts.map +1 -0
  513. package/dist/record-overlay/signal-kind.js +38 -0
  514. package/dist/record-overlay/signal-kind.js.map +1 -0
  515. package/dist/record-overlay/signal-text.d.ts +52 -0
  516. package/dist/record-overlay/signal-text.d.ts.map +1 -0
  517. package/dist/record-overlay/signal-text.js +126 -0
  518. package/dist/record-overlay/signal-text.js.map +1 -0
  519. package/dist/record-overlay/source-index.d.ts +19 -0
  520. package/dist/record-overlay/source-index.d.ts.map +1 -0
  521. package/dist/record-overlay/source-index.js +102 -0
  522. package/dist/record-overlay/source-index.js.map +1 -0
  523. package/dist/record-overlay/types.d.ts +291 -0
  524. package/dist/record-overlay/types.d.ts.map +1 -0
  525. package/dist/record-overlay/types.js +2 -0
  526. package/dist/record-overlay/types.js.map +1 -0
  527. package/dist/relationships.d.ts +47 -0
  528. package/dist/relationships.d.ts.map +1 -0
  529. package/dist/relationships.js +53 -0
  530. package/dist/relationships.js.map +1 -0
  531. package/dist/remote-backend.d.ts +67 -32
  532. package/dist/remote-backend.d.ts.map +1 -1
  533. package/dist/remote-backend.js +171 -39
  534. package/dist/remote-backend.js.map +1 -1
  535. package/dist/remote-document-codec.d.ts +2 -1
  536. package/dist/remote-document-codec.d.ts.map +1 -1
  537. package/dist/remote-document-codec.js +3 -2
  538. package/dist/remote-document-codec.js.map +1 -1
  539. package/dist/remote-error.d.ts +17 -1
  540. package/dist/remote-error.d.ts.map +1 -1
  541. package/dist/remote-error.js +32 -2
  542. package/dist/remote-error.js.map +1 -1
  543. package/dist/remote-operations.d.ts +0 -40
  544. package/dist/remote-operations.d.ts.map +1 -1
  545. package/dist/remote-operations.js +28 -6
  546. package/dist/remote-operations.js.map +1 -1
  547. package/dist/remote-parsers.d.ts +20 -1
  548. package/dist/remote-parsers.d.ts.map +1 -1
  549. package/dist/remote-parsers.js +1 -1
  550. package/dist/remote-parsers.js.map +1 -1
  551. package/dist/remote.d.ts +2 -4
  552. package/dist/remote.d.ts.map +1 -1
  553. package/dist/remote.js +2 -3
  554. package/dist/remote.js.map +1 -1
  555. package/dist/reserved-write.d.ts +9 -0
  556. package/dist/reserved-write.d.ts.map +1 -0
  557. package/dist/reserved-write.js +15 -0
  558. package/dist/reserved-write.js.map +1 -0
  559. package/dist/search/backend-source.d.ts +6 -0
  560. package/dist/search/backend-source.d.ts.map +1 -0
  561. package/dist/search/backend-source.js +57 -0
  562. package/dist/search/backend-source.js.map +1 -0
  563. package/dist/search/contract.d.ts +158 -0
  564. package/dist/search/contract.d.ts.map +1 -0
  565. package/dist/search/contract.js +78 -0
  566. package/dist/search/contract.js.map +1 -0
  567. package/dist/search/errors.d.ts +30 -0
  568. package/dist/search/errors.d.ts.map +1 -0
  569. package/dist/search/errors.js +50 -0
  570. package/dist/search/errors.js.map +1 -0
  571. package/dist/search/identity.d.ts +12 -0
  572. package/dist/search/identity.d.ts.map +1 -0
  573. package/dist/search/identity.js +90 -0
  574. package/dist/search/identity.js.map +1 -0
  575. package/dist/search/index.d.ts +16 -0
  576. package/dist/search/index.d.ts.map +1 -0
  577. package/dist/search/index.js +15 -0
  578. package/dist/search/index.js.map +1 -0
  579. package/dist/search/memory-source.d.ts +36 -0
  580. package/dist/search/memory-source.d.ts.map +1 -0
  581. package/dist/search/memory-source.js +238 -0
  582. package/dist/search/memory-source.js.map +1 -0
  583. package/dist/search/rank.d.ts +29 -0
  584. package/dist/search/rank.d.ts.map +1 -0
  585. package/dist/search/rank.js +132 -0
  586. package/dist/search/rank.js.map +1 -0
  587. package/dist/search/row-text.d.ts +38 -0
  588. package/dist/search/row-text.d.ts.map +1 -0
  589. package/dist/search/row-text.js +88 -0
  590. package/dist/search/row-text.js.map +1 -0
  591. package/dist/search/search.d.ts +28 -0
  592. package/dist/search/search.d.ts.map +1 -0
  593. package/dist/search/search.js +265 -0
  594. package/dist/search/search.js.map +1 -0
  595. package/dist/search/source.d.ts +70 -0
  596. package/dist/search/source.d.ts.map +1 -0
  597. package/dist/search/source.js +2 -0
  598. package/dist/search/source.js.map +1 -0
  599. package/dist/search/text.d.ts +47 -0
  600. package/dist/search/text.d.ts.map +1 -0
  601. package/dist/search/text.js +150 -0
  602. package/dist/search/text.js.map +1 -0
  603. package/dist/sha256.d.ts.map +1 -1
  604. package/dist/sha256.js +3 -2
  605. package/dist/sha256.js.map +1 -1
  606. package/dist/site-capabilities.d.ts +345 -0
  607. package/dist/site-capabilities.d.ts.map +1 -0
  608. package/dist/site-capabilities.js +724 -0
  609. package/dist/site-capabilities.js.map +1 -0
  610. package/dist/site-manifest.d.ts +51 -0
  611. package/dist/site-manifest.d.ts.map +1 -0
  612. package/dist/site-manifest.js +115 -0
  613. package/dist/site-manifest.js.map +1 -0
  614. package/dist/skip-reasons.d.ts +12 -0
  615. package/dist/skip-reasons.d.ts.map +1 -0
  616. package/dist/skip-reasons.js +15 -0
  617. package/dist/skip-reasons.js.map +1 -0
  618. package/dist/source-engine/driver.d.ts +40 -0
  619. package/dist/source-engine/driver.d.ts.map +1 -0
  620. package/dist/source-engine/driver.js +513 -0
  621. package/dist/source-engine/driver.js.map +1 -0
  622. package/dist/source-engine/evidence.d.ts +39 -0
  623. package/dist/source-engine/evidence.d.ts.map +1 -0
  624. package/dist/source-engine/evidence.js +54 -0
  625. package/dist/source-engine/evidence.js.map +1 -0
  626. package/dist/source-engine/guard.d.ts +87 -0
  627. package/dist/source-engine/guard.d.ts.map +1 -0
  628. package/dist/source-engine/guard.js +427 -0
  629. package/dist/source-engine/guard.js.map +1 -0
  630. package/dist/source-engine/index.d.ts +35 -0
  631. package/dist/source-engine/index.d.ts.map +1 -0
  632. package/dist/source-engine/index.js +27 -0
  633. package/dist/source-engine/index.js.map +1 -0
  634. package/dist/source-engine/machine-state.d.ts +87 -0
  635. package/dist/source-engine/machine-state.d.ts.map +1 -0
  636. package/dist/source-engine/machine-state.js +94 -0
  637. package/dist/source-engine/machine-state.js.map +1 -0
  638. package/dist/source-engine/observe.d.ts +10 -0
  639. package/dist/source-engine/observe.d.ts.map +1 -0
  640. package/dist/source-engine/observe.js +276 -0
  641. package/dist/source-engine/observe.js.map +1 -0
  642. package/dist/source-engine/overlay.d.ts +50 -0
  643. package/dist/source-engine/overlay.d.ts.map +1 -0
  644. package/dist/source-engine/overlay.js +114 -0
  645. package/dist/source-engine/overlay.js.map +1 -0
  646. package/dist/source-engine/robots.d.ts +53 -0
  647. package/dist/source-engine/robots.d.ts.map +1 -0
  648. package/dist/source-engine/robots.js +158 -0
  649. package/dist/source-engine/robots.js.map +1 -0
  650. package/dist/source-engine/snapshot.d.ts +104 -0
  651. package/dist/source-engine/snapshot.d.ts.map +1 -0
  652. package/dist/source-engine/snapshot.js +240 -0
  653. package/dist/source-engine/snapshot.js.map +1 -0
  654. package/dist/source-engine/target-consumer.d.ts +12 -0
  655. package/dist/source-engine/target-consumer.d.ts.map +1 -0
  656. package/dist/source-engine/target-consumer.js +15 -0
  657. package/dist/source-engine/target-consumer.js.map +1 -0
  658. package/dist/source-engine/target-descriptor.d.ts +3 -0
  659. package/dist/source-engine/target-descriptor.d.ts.map +1 -0
  660. package/dist/source-engine/target-descriptor.js +26 -0
  661. package/dist/source-engine/target-descriptor.js.map +1 -0
  662. package/dist/source-engine/target.d.ts +82 -0
  663. package/dist/source-engine/target.d.ts.map +1 -0
  664. package/dist/source-engine/target.js +213 -0
  665. package/dist/source-engine/target.js.map +1 -0
  666. package/dist/source-engine/types.d.ts +296 -0
  667. package/dist/source-engine/types.d.ts.map +1 -0
  668. package/dist/source-engine/types.js +2 -0
  669. package/dist/source-engine/types.js.map +1 -0
  670. package/dist/source-harness/conformance.d.ts +16 -0
  671. package/dist/source-harness/conformance.d.ts.map +1 -0
  672. package/dist/source-harness/conformance.js +266 -0
  673. package/dist/source-harness/conformance.js.map +1 -0
  674. package/dist/source-harness/fixture.d.ts +97 -0
  675. package/dist/source-harness/fixture.d.ts.map +1 -0
  676. package/dist/source-harness/fixture.js +276 -0
  677. package/dist/source-harness/fixture.js.map +1 -0
  678. package/dist/source-harness/index.d.ts +22 -0
  679. package/dist/source-harness/index.d.ts.map +1 -0
  680. package/dist/source-harness/index.js +19 -0
  681. package/dist/source-harness/index.js.map +1 -0
  682. package/dist/source-harness/peer.d.ts +74 -0
  683. package/dist/source-harness/peer.d.ts.map +1 -0
  684. package/dist/source-harness/peer.js +106 -0
  685. package/dist/source-harness/peer.js.map +1 -0
  686. package/dist/source-profiles/index.d.ts +31 -0
  687. package/dist/source-profiles/index.d.ts.map +1 -0
  688. package/dist/source-profiles/index.js +206 -0
  689. package/dist/source-profiles/index.js.map +1 -0
  690. package/dist/source-profiles/link-header.d.ts +6 -0
  691. package/dist/source-profiles/link-header.d.ts.map +1 -0
  692. package/dist/source-profiles/link-header.js +131 -0
  693. package/dist/source-profiles/link-header.js.map +1 -0
  694. package/dist/storage.d.ts +8 -1
  695. package/dist/storage.d.ts.map +1 -1
  696. package/dist/storage.js +6 -1
  697. package/dist/storage.js.map +1 -1
  698. package/dist/string-identity-agreement.d.ts +35 -0
  699. package/dist/string-identity-agreement.d.ts.map +1 -0
  700. package/dist/string-identity-agreement.js +78 -0
  701. package/dist/string-identity-agreement.js.map +1 -0
  702. package/dist/system-documents.d.ts +82 -0
  703. package/dist/system-documents.d.ts.map +1 -0
  704. package/dist/system-documents.js +127 -0
  705. package/dist/system-documents.js.map +1 -0
  706. package/dist/types.d.ts +52 -6
  707. package/dist/types.d.ts.map +1 -1
  708. package/dist/types.js +0 -10
  709. package/dist/types.js.map +1 -1
  710. package/dist/uncertain-write.d.ts +157 -17
  711. package/dist/uncertain-write.d.ts.map +1 -1
  712. package/dist/uncertain-write.js +86 -30
  713. package/dist/uncertain-write.js.map +1 -1
  714. package/dist/validation.d.ts +5 -0
  715. package/dist/validation.d.ts.map +1 -1
  716. package/dist/versioning.d.ts +9 -4
  717. package/dist/versioning.d.ts.map +1 -1
  718. package/dist/versioning.js +9 -4
  719. package/dist/versioning.js.map +1 -1
  720. package/dist/view-launch-contract.d.ts +14 -0
  721. package/dist/view-launch-contract.d.ts.map +1 -0
  722. package/dist/view-launch-contract.js +23 -0
  723. package/dist/view-launch-contract.js.map +1 -0
  724. package/dist/write-identity.d.ts +5 -0
  725. package/dist/write-identity.d.ts.map +1 -0
  726. package/dist/write-identity.js +9 -0
  727. package/dist/write-identity.js.map +1 -0
  728. package/package.json +163 -6
package/dist/kinds.js CHANGED
@@ -20,22 +20,52 @@
20
20
  * convention-doc (de)serialization) is dependency-free — this module carries ONLY that, and is
21
21
  * exported as the browser-safe `@superbee/core/kinds` subpath (the ui shell's bridge
22
22
  * `open` filter consumes `isTerminal` there; a browser bundler must never be dragged through the
23
- * engine's node built-ins for a pure predicate). The one backend-touching entry point,
24
- * `loadKinds`, lives in `kinds-load.ts` — same ONE registry, split only by dependency weight.
23
+ * engine's node built-ins for a pure predicate). The bundle read, `loadKinds`, lives in
24
+ * `kinds-load.ts`, which reads through `bundle-ops.ts` and is browser-safe too: the split is
25
+ * between pure parsing and the bundle read, over the same ONE registry.
25
26
  */
27
+ import { parseKindDeprecation, kindDeprecationProblems } from "./kind-deprecation.js";
28
+ import { CONVENTION_TYPE } from "./convention-record.js";
29
+ export { CONVENTION_TYPE, CONVENTIONS_PREFIX, isConventionId, isConventionRecord } from "./convention-record.js";
30
+ export { inspectKindDeprecatedUsage, kindDeprecationTransition, kindDeprecationProblems } from "./kind-deprecation.js";
26
31
  import { isOkfLifecycleStatus, OKF_LIFECYCLE_STATUSES } from "./okf-lifecycle.js";
27
32
  import { isUsableTimestamp } from "./frontmatter.js";
28
- /** The bundle-relative prefix a kind convention doc MUST live under to be discovered. */
29
- export const CONVENTIONS_PREFIX = "conventions/";
30
- /** The OKF `type` value a kind convention doc itself carries. */
31
- export const CONVENTION_TYPE = "Convention";
33
+ import { parseIsoInstant } from "./verification.js";
34
+ /**
35
+ * The closed, domain-neutral value-type vocabulary a convention may declare in `fields.types`.
36
+ * Each type constrains a value's shape only; presence stays governed by `fields.required`.
37
+ * Domain composites (opening hours, money, addresses) belong to recipe tooling, not core.
38
+ */
39
+ export const KIND_FIELD_TYPES = [
40
+ "date",
41
+ "datetime",
42
+ "https-url",
43
+ "https-url-list",
44
+ "integer",
45
+ "number",
46
+ "boolean",
47
+ "slug",
48
+ "string-list",
49
+ "latitude",
50
+ "longitude",
51
+ ];
52
+ const KIND_FIELD_TYPE_SET = new Set(KIND_FIELD_TYPES);
53
+ /** True when `value` names a {@link KIND_FIELD_TYPES} member. */
54
+ export function isKindFieldType(value) {
55
+ return typeof value === "string" && KIND_FIELD_TYPE_SET.has(value);
56
+ }
57
+ /** The two declared write policies for keys a kind does not declare. */
58
+ export const UNDECLARED_FIELDS_POLICIES = ["warn", "error"];
32
59
  /**
33
60
  * Build the one authoritative Kind registry from already-selected convention documents.
34
61
  * Callers own discovery; this pure half owns parsing, warnings, and first-by-id duplicate
35
62
  * resolution so prospective registries cannot drift from {@link loadKinds} semantics.
36
63
  */
37
64
  export function buildKindRegistry(docs, initialWarnings = [], options = {}) {
38
- const kinds = new Map();
65
+ // Duplicate resolution walks conventions by id so a declared `order` can never steal a
66
+ // `governs` from the first-by-id declaration; the accepted set is then laid into the Map in
67
+ // reading order.
68
+ const accepted = new Map();
39
69
  const warnings = [...initialWarnings];
40
70
  for (const doc of [...docs].sort((a, b) => a.id.localeCompare(b.id))) {
41
71
  const parsed = parseConventionDoc(doc, options);
@@ -58,10 +88,10 @@ export function buildKindRegistry(docs, initialWarnings = [], options = {}) {
58
88
  severity: "warning",
59
89
  });
60
90
  }
61
- if (kinds.has(kind.governs)) {
91
+ if (accepted.has(kind.governs)) {
62
92
  warnings.push({
63
93
  code: "KIND_DUPLICATE_GOVERNS",
64
- message: `duplicate kind convention for '${kind.governs}': '${doc.id}' ignored, keeping the first-declared '${kinds.get(kind.governs).id}'.`,
94
+ message: `duplicate kind convention for '${kind.governs}': '${doc.id}' ignored, keeping the first-declared '${accepted.get(kind.governs).id}'.`,
65
95
  field: kind.governs,
66
96
  severity: "warning",
67
97
  });
@@ -75,10 +105,29 @@ export function buildKindRegistry(docs, initialWarnings = [], options = {}) {
75
105
  severity: "warning",
76
106
  });
77
107
  }
78
- kinds.set(kind.governs, kind);
108
+ accepted.set(kind.governs, kind);
79
109
  }
110
+ for (const kind of accepted.values())
111
+ warnings.push(...kindDeprecationProblems(kind, { kinds: accepted, warnings: [] }).filter(w => !warnings.includes(w)));
112
+ const kinds = new Map();
113
+ for (const kind of [...accepted.values()].sort(compareReadingOrder))
114
+ kinds.set(kind.governs, kind);
80
115
  return { kinds, warnings };
81
116
  }
117
+ /**
118
+ * The bundle's reading order over kinds: conventions with a declared `order` first, ascending,
119
+ * ties by id; then conventions without one, by id. A bundle that declares no `order` anywhere
120
+ * therefore iterates by id exactly as it did before the field existed.
121
+ */
122
+ export function compareReadingOrder(a, b) {
123
+ if (a.order !== undefined && b.order !== undefined && a.order !== b.order)
124
+ return a.order - b.order;
125
+ if (a.order !== undefined && b.order === undefined)
126
+ return -1;
127
+ if (a.order === undefined && b.order !== undefined)
128
+ return 1;
129
+ return a.id.localeCompare(b.id);
130
+ }
82
131
  /** Stable product-level name for a Kind's workflow progress field. */
83
132
  export const PROGRESS_STATUS_FIELD = "progress_status";
84
133
  /** Producer-qualified v0.2 storage coordinate for Superbee workflow progress. */
@@ -193,6 +242,7 @@ export function projectKindForAuthoring(okfVersion, kind) {
193
242
  };
194
243
  return {
195
244
  ...kind,
245
+ ...(kind.deprecated ? { deprecated: { ...kind.deprecated, fields: kind.deprecated.fields.map(projectField), values: projectRecord(kind.deprecated.values) } } : {}),
196
246
  fields: {
197
247
  required: kind.fields.required.map(projectField),
198
248
  optional: kind.fields.optional.map(projectField),
@@ -202,25 +252,81 @@ export function projectKindForAuthoring(okfVersion, kind) {
202
252
  : undefined,
203
253
  terminal: projectRecord(kind.fields.terminal),
204
254
  descriptions: projectRecord(kind.fields.descriptions),
255
+ ...(kind.fields.types ? { types: projectRecord(kind.fields.types) } : {}),
205
256
  },
206
257
  };
207
258
  }
259
+ /** Whether a Kind finding names a frontmatter coordinate rather than a body heading. */
260
+ export function isKindFieldValidationWarning(warning) {
261
+ return warning.code === "KIND_FIELD_MISSING"
262
+ || warning.code === "KIND_FIELD_VALUE"
263
+ || warning.code === "KIND_FIELD_ARITY"
264
+ || warning.code === "KIND_FIELD_TYPE";
265
+ }
266
+ /** The owning message grammar separates the field coordinate from Kind labels and value suffixes. */
267
+ function kindFieldWarningPrefix(code, kind, field) {
268
+ switch (code) {
269
+ case "KIND_FIELD_MISSING":
270
+ return `'${kind.governs}' requires a non-empty '${field}' field `;
271
+ case "KIND_FIELD_VALUE":
272
+ return `'${field}' value `;
273
+ case "KIND_FIELD_ARITY":
274
+ return `'${field}' is enum-restricted and takes exactly ONE value for '${kind.governs}'; `;
275
+ case "KIND_FIELD_TYPE":
276
+ return `'${field}' must be `;
277
+ }
278
+ }
208
279
  /** Project Kind-validation findings into the same authoring vocabulary as the Kind schema. */
209
280
  export function projectKindValidationWarnings(okfVersion, kind, warnings) {
210
281
  const progress = progressStatusCoordinate(okfVersion, kind);
211
282
  if (!progress)
212
283
  return warnings;
213
- const stored = `'${progress.storageField}'`;
214
- const logical = `'${progress.logicalField}'`;
215
- return warnings.map((warning) => warning.field === progress.storageField
216
- ? {
284
+ return warnings.map((warning) => {
285
+ if (!isKindFieldValidationWarning(warning) || warning.field !== progress.storageField)
286
+ return warning;
287
+ const storedPrefix = kindFieldWarningPrefix(warning.code, kind, progress.storageField);
288
+ const logicalPrefix = kindFieldWarningPrefix(warning.code, kind, progress.logicalField);
289
+ return {
217
290
  ...warning,
218
291
  field: progress.logicalField,
219
- // Core's Kind warnings name the field first. Replace that one coordinate only; a later
220
- // occurrence may be the user's literal value and must remain byte-truthful.
221
- message: warning.message.replace(stored, logical),
292
+ message: warning.message.startsWith(storedPrefix)
293
+ ? logicalPrefix + warning.message.slice(storedPrefix.length)
294
+ : warning.message,
295
+ };
296
+ });
297
+ }
298
+ /**
299
+ * Advisory write-time guidance: for each enum field whose governing Kind declares
300
+ * `fields.value_descriptions`, return the description of every value `after` carries that
301
+ * `before` did not. A create passes `before: undefined`, so every described value it sets applies.
302
+ * Unchanged values, undescribed values and ungoverned documents yield nothing. Field names are
303
+ * projected through the same progress coordinate as {@link projectKindValidationWarnings}.
304
+ */
305
+ export function kindValueGuidance(okfVersion, kind, before, after) {
306
+ const described = kind?.fields.valueDescriptions;
307
+ if (!kind || !described)
308
+ return [];
309
+ const progress = progressStatusCoordinate(okfVersion, kind);
310
+ const valuesOf = (frontmatter, field) => {
311
+ const fm = frontmatter;
312
+ if (!fm || !hasOwn(fm, field))
313
+ return [];
314
+ const raw = fm[field];
315
+ if (raw === undefined || raw === null)
316
+ return [];
317
+ return (Array.isArray(raw) ? raw : [raw]).map((value) => String(value));
318
+ };
319
+ const guidance = [];
320
+ for (const [storageField, descriptions] of Object.entries(described)) {
321
+ const previous = new Set(valuesOf(before, storageField));
322
+ const field = progress && storageField === progress.storageField ? progress.logicalField : storageField;
323
+ for (const value of new Set(valuesOf(after, storageField))) {
324
+ if (previous.has(value) || !hasOwn(descriptions, value))
325
+ continue;
326
+ guidance.push({ field, value, description: descriptions[value] });
222
327
  }
223
- : warning);
328
+ }
329
+ return guidance;
224
330
  }
225
331
  /** True for a plain YAML/JSON map (excludes arrays, `null`, dates, and other object instances). */
226
332
  function isPlainObject(value) {
@@ -307,6 +413,7 @@ const VALID_FIELDS_KEYS = new Set([
307
413
  "value_descriptions",
308
414
  "terminal",
309
415
  "descriptions",
416
+ "types",
310
417
  ]);
311
418
  /**
312
419
  * Top-level convention-doc keys that are near-misses for the ONE correct enum-constraint shape
@@ -381,7 +488,7 @@ export function parseConventionDoc(doc, options = {}) {
381
488
  if (!VALID_FIELDS_KEYS.has(key)) {
382
489
  warnings.push({
383
490
  code: "KIND_CONVENTION_UNKNOWN_FIELDS_KEY",
384
- message: `kind convention '${doc.id}' declares an unrecognized key 'fields.${key}' (valid keys: fields.required, fields.optional, fields.values, fields.value_descriptions, fields.terminal, fields.descriptions); ignoring it.`,
491
+ message: `kind convention '${doc.id}' declares an unrecognized key 'fields.${key}' (valid keys: fields.required, fields.optional, fields.values, fields.value_descriptions, fields.terminal, fields.descriptions, fields.types); ignoring it.`,
385
492
  field: `fields.${key}`,
386
493
  severity: "warning",
387
494
  });
@@ -441,6 +548,60 @@ export function parseConventionDoc(doc, options = {}) {
441
548
  });
442
549
  }
443
550
  }
551
+ // `fields.types` — declared value types from the closed KIND_FIELD_TYPES vocabulary. Same lenient
552
+ // posture as `fields.values`: a non-map shape warns and is ignored, an unknown type or a typed
553
+ // field the kind does not declare warns and is skipped. A definitions-only recipe therefore
554
+ // refuses a misspelled type instead of installing a constraint that can never fire.
555
+ const typesSource = fieldsRaw.types;
556
+ const types = {};
557
+ if (typesSource !== undefined) {
558
+ if (!isPlainObject(typesSource)) {
559
+ warnings.push({
560
+ code: "KIND_CONVENTION_BAD_SHAPE",
561
+ message: `kind convention '${doc.id}' has a non-map 'fields.types' (${describeShape(typesSource)}; expected a map of field name -> type); ignoring it.`,
562
+ field: "fields.types",
563
+ severity: "warning",
564
+ });
565
+ }
566
+ else {
567
+ for (const [field, declared] of Object.entries(typesSource)) {
568
+ if (dropReserved(field, `fields.types.${field}`))
569
+ continue;
570
+ if (!isKindFieldType(declared)) {
571
+ warnings.push({
572
+ code: "KIND_CONVENTION_UNKNOWN_FIELD_TYPE",
573
+ message: `kind convention '${doc.id}' declares 'fields.types.${field}' as ${isScalar(declared) ? `'${String(declared)}'` : describeShape(declared)}, which is not a field type (valid types: ${KIND_FIELD_TYPES.join(", ")}); ignoring it.`,
574
+ field: `fields.types.${field}`,
575
+ severity: "warning",
576
+ });
577
+ continue;
578
+ }
579
+ if (!declaredFieldNames.has(field)) {
580
+ warnings.push({
581
+ code: "KIND_CONVENTION_UNDECLARED_TYPES_FIELD",
582
+ message: `kind convention '${doc.id}' declares 'fields.types.${field}' but '${field}' is not in fields.required or fields.optional; ignoring it.`,
583
+ field: `fields.types.${field}`,
584
+ severity: "warning",
585
+ });
586
+ continue;
587
+ }
588
+ setOwn(types, field, declared);
589
+ }
590
+ }
591
+ }
592
+ // An enum over URLs is never meaningful, so values on an `https-url-list` field are skipped. Every
593
+ // other typed field may carry `fields.values`: a scalar picks one, a `string-list` checks each item.
594
+ for (const field of Object.keys(values)) {
595
+ if (types[field] !== "https-url-list")
596
+ continue;
597
+ warnings.push({
598
+ code: "KIND_CONVENTION_VALUES_TYPE_MISMATCH",
599
+ message: `kind convention '${doc.id}' declares 'fields.values.${field}' on a field of type 'https-url-list', which cannot carry an enum; ignoring the values.`,
600
+ field: `fields.values.${field}`,
601
+ severity: "warning",
602
+ });
603
+ delete values[field];
604
+ }
444
605
  const valueDescriptionsSource = fieldsRaw.value_descriptions;
445
606
  const valueDescriptions = {};
446
607
  if (valueDescriptionsSource !== undefined) {
@@ -758,12 +919,44 @@ export function parseConventionDoc(doc, options = {}) {
758
919
  : undefined;
759
920
  // Strict boolean `true` only — an absent, false, or non-boolean value means "expanded" (the default).
760
921
  const browseCollapsed = fm.browse_collapsed === true ? true : undefined;
922
+ // `order:` is a finite number or nothing. Anything else warns and the kind registers without an
923
+ // order (it sorts with the undeclared), never a skipped convention.
924
+ let order;
925
+ if (fm.order !== undefined) {
926
+ if (typeof fm.order === "number" && Number.isFinite(fm.order)) {
927
+ order = fm.order;
928
+ }
929
+ else {
930
+ warnings.push({
931
+ code: "KIND_CONVENTION_BAD_SHAPE",
932
+ message: `kind convention '${doc.id}' has an invalid 'order' (${describeShape(fm.order)}; expected a finite number such as 10); ignoring it.`,
933
+ field: "order",
934
+ severity: "warning",
935
+ });
936
+ }
937
+ }
938
+ let undeclaredFields;
939
+ if (fm.undeclared_fields !== undefined) {
940
+ if (UNDECLARED_FIELDS_POLICIES.includes(fm.undeclared_fields)) {
941
+ undeclaredFields = fm.undeclared_fields;
942
+ }
943
+ else {
944
+ warnings.push({
945
+ code: "KIND_CONVENTION_BAD_SHAPE",
946
+ message: `kind convention '${doc.id}' has an invalid 'undeclared_fields' (${describeShape(fm.undeclared_fields)}; expected warn or error); using warn.`,
947
+ field: "undeclared_fields",
948
+ severity: "warning",
949
+ });
950
+ }
951
+ }
761
952
  const kind = {
762
953
  id: doc.id,
763
954
  title,
764
955
  governs,
765
956
  fields: { required, optional, values, valueDescriptions, terminal, descriptions },
766
957
  };
958
+ if (Object.keys(types).length > 0)
959
+ kind.fields.types = types;
767
960
  if (description !== undefined)
768
961
  kind.description = description;
769
962
  if (path !== undefined)
@@ -780,8 +973,16 @@ export function parseConventionDoc(doc, options = {}) {
780
973
  kind.freshnessHorizon = freshnessHorizon;
781
974
  if (browseCollapsed !== undefined)
782
975
  kind.browseCollapsed = browseCollapsed;
976
+ if (order !== undefined)
977
+ kind.order = order;
783
978
  if (claim !== undefined)
784
979
  kind.claim = claim;
980
+ if (undeclaredFields !== undefined)
981
+ kind.undeclaredFields = undeclaredFields;
982
+ if (Object.hasOwn(fm, "deprecated")) {
983
+ kind.deprecated = parseKindDeprecation(fm.deprecated, kind, RESERVED_KIND_FIELD_NAMES, claimCoordinates(options.okfVersion, kind)?.fields ?? []);
984
+ warnings.push(...(kind.deprecated.problems ?? []));
985
+ }
785
986
  return {
786
987
  ok: true,
787
988
  kind,
@@ -826,9 +1027,155 @@ export function isPresent(value) {
826
1027
  return value.length > 0;
827
1028
  return true;
828
1029
  }
1030
+ /** Human phrase for each field type, used in warnings and authoring help. */
1031
+ export const KIND_FIELD_TYPE_DESCRIPTIONS = {
1032
+ date: "a YYYY-MM-DD calendar date",
1033
+ datetime: "an ISO-8601 date and time with an explicit UTC offset (Z or +/-HH:MM)",
1034
+ "https-url": "an absolute https URL of at most 2048 characters, without credentials",
1035
+ "https-url-list": "a list of distinct https URLs",
1036
+ integer: "a safe integer",
1037
+ number: "a finite number",
1038
+ boolean: "true or false",
1039
+ slug: "a lowercase slug (a-z, 0-9 and single hyphens) of at most 200 characters",
1040
+ "string-list": "a list of distinct non-empty strings",
1041
+ latitude: "a number from -90 to 90",
1042
+ longitude: "a number from -180 to 180",
1043
+ };
1044
+ const DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
1045
+ const SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
1046
+ const SLUG_MAX_LENGTH = 200;
1047
+ const HTTPS_URL_MAX_LENGTH = 2048;
1048
+ const HTTPS_PREFIX_RE = /^https:\/\//i;
1049
+ const CONTROL_CHARACTER_RE = /[\u0000-\u001F\u007F]/;
1050
+ function describeValue(value) {
1051
+ if (typeof value === "string")
1052
+ return `got the string ${JSON.stringify(value.length > 60 ? `${value.slice(0, 57)}...` : value)}`;
1053
+ if (typeof value === "number")
1054
+ return `got the number ${Object.is(value, -0) ? "-0" : String(value)}`;
1055
+ if (typeof value === "boolean")
1056
+ return `got boolean ${String(value)}`;
1057
+ return `got ${describeShape(value)}`;
1058
+ }
1059
+ function httpsUrlProblem(value) {
1060
+ if (typeof value !== "string" || value.length > HTTPS_URL_MAX_LENGTH || /\s/.test(value))
1061
+ return describeValue(value);
1062
+ // WHATWG strips control characters and repairs `https:x`, `https:/x` and `https:\\x` into a host,
1063
+ // so the authored text must already be an absolute `https://` URL with no control characters.
1064
+ if (!HTTPS_PREFIX_RE.test(value) || CONTROL_CHARACTER_RE.test(value))
1065
+ return describeValue(value);
1066
+ // The WHATWG parser is the authority for the rest, so scheme case is irrelevant (`HTTPS://` is https).
1067
+ let parsed;
1068
+ try {
1069
+ parsed = new URL(value);
1070
+ }
1071
+ catch {
1072
+ return describeValue(value);
1073
+ }
1074
+ if (parsed.protocol !== "https:" || parsed.hostname === "")
1075
+ return describeValue(value);
1076
+ if (parsed.username !== "" || parsed.password !== "")
1077
+ return `${describeValue(value)} (credentials are not allowed)`;
1078
+ return undefined;
1079
+ }
1080
+ function listProblem(value, itemProblem) {
1081
+ if (!Array.isArray(value))
1082
+ return describeValue(value);
1083
+ const seen = new Set();
1084
+ for (const [index, item] of value.entries()) {
1085
+ const problem = itemProblem(item);
1086
+ if (problem !== undefined)
1087
+ return `item ${index} ${problem}`;
1088
+ if (seen.has(item))
1089
+ return `item ${index} repeats ${JSON.stringify(item)}`;
1090
+ seen.add(item);
1091
+ }
1092
+ return undefined;
1093
+ }
1094
+ /**
1095
+ * Why `value` does not satisfy `type`, or `undefined` when it does. Values are judged as decoded:
1096
+ * YAML numbers and booleans, and strings exactly as authored (core's decoder keeps dates and
1097
+ * instants as their source strings). `null` never satisfies a type. The ONE type predicate;
1098
+ * callers never re-implement it.
1099
+ */
1100
+ export function kindFieldTypeProblem(type, value) {
1101
+ switch (type) {
1102
+ case "date": {
1103
+ const match = typeof value === "string" ? DATE_RE.exec(value) : null;
1104
+ if (!match)
1105
+ return describeValue(value);
1106
+ const probe = new Date(0);
1107
+ probe.setUTCFullYear(Number(match[1]), Number(match[2]), 0); // day 0 of the next month
1108
+ const month = Number(match[2]);
1109
+ const day = Number(match[3]);
1110
+ return month >= 1 && month <= 12 && day >= 1 && day <= probe.getUTCDate() ? undefined : describeValue(value);
1111
+ }
1112
+ case "datetime":
1113
+ // Exactly the OKF standard-timestamp instant grammar.
1114
+ return typeof value === "string" && parseIsoInstant(value) !== null ? undefined : describeValue(value);
1115
+ case "https-url":
1116
+ return httpsUrlProblem(value);
1117
+ case "https-url-list":
1118
+ return listProblem(value, httpsUrlProblem);
1119
+ case "integer":
1120
+ return Number.isSafeInteger(value) && !Object.is(value, -0) ? undefined : describeValue(value);
1121
+ case "number":
1122
+ return typeof value === "number" && Number.isFinite(value) ? undefined : describeValue(value);
1123
+ case "boolean":
1124
+ return typeof value === "boolean" ? undefined : describeValue(value);
1125
+ case "slug":
1126
+ return typeof value === "string" && value.length <= SLUG_MAX_LENGTH && SLUG_RE.test(value)
1127
+ ? undefined
1128
+ : describeValue(value);
1129
+ case "string-list":
1130
+ return listProblem(value, (item) => (typeof item === "string" && item !== "" ? undefined : describeValue(item)));
1131
+ case "latitude":
1132
+ case "longitude": {
1133
+ const limit = type === "latitude" ? 90 : 180;
1134
+ return typeof value === "number" && Number.isFinite(value) && value >= -limit && value <= limit
1135
+ ? undefined
1136
+ : describeValue(value);
1137
+ }
1138
+ }
1139
+ }
1140
+ /** Whether a Kind declares `field` (a storage name) as one of the two list types, `string-list` or `https-url-list`. */
1141
+ export function isKindListField(kind, field) {
1142
+ const types = kind?.fields.types;
1143
+ if (!types || !hasOwn(types, field))
1144
+ return false;
1145
+ return types[field] === "string-list" || types[field] === "https-url-list";
1146
+ }
1147
+ const NUMBER_INPUT_RE = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/;
1148
+ const INTEGER_INPUT_RE = /^[+-]?\d+$/;
1149
+ /**
1150
+ * Convert command-line flag text for a declared field into its typed value: numeric types become
1151
+ * numbers, `boolean` accepts exactly `true`/`false`, and both list types are always a list. Text that
1152
+ * does not parse is returned unchanged so {@link validateAgainstKind} reports it, never guessed.
1153
+ * Undeclared or untyped fields keep the historical one-value-scalar, repeated-flag-list shape.
1154
+ */
1155
+ export function kindFieldInputValue(kind, field, inputs) {
1156
+ const type = kind.fields.types && hasOwn(kind.fields.types, field) ? kind.fields.types[field] : undefined;
1157
+ if (type === "string-list" || type === "https-url-list")
1158
+ return [...inputs];
1159
+ if (inputs.length !== 1)
1160
+ return [...inputs];
1161
+ const text = inputs[0];
1162
+ switch (type) {
1163
+ case "number":
1164
+ case "latitude":
1165
+ case "longitude":
1166
+ return NUMBER_INPUT_RE.test(text.trim()) ? Number(text.trim()) : text;
1167
+ case "integer":
1168
+ return INTEGER_INPUT_RE.test(text.trim()) ? Number(text.trim()) : text;
1169
+ case "boolean":
1170
+ return text === "true" ? true : text === "false" ? false : text;
1171
+ default:
1172
+ return text;
1173
+ }
1174
+ }
829
1175
  /**
830
1176
  * Validate `doc` against `kind`: required fields present + non-empty, enum-restricted
831
- * field values within the declared allowed set, and declared body `sections` present
1177
+ * field values within the declared allowed set, typed field values of their declared
1178
+ * `fields.types` type, and declared body `sections` present
832
1179
  * (reusing the ONE heading splitter, {@link splitSections} — no second heading parser).
833
1180
  * Returns core's EXISTING {@link ValidationWarning} shape; never throws. Purely
834
1181
  * additive derivation — callers (the CLI) decide whether a warning blocks a write.
@@ -840,7 +1187,7 @@ export function validateAgainstKind(doc, kind) {
840
1187
  if (!hasOwn(fm, field) || !isPresent(fm[field])) {
841
1188
  warnings.push({
842
1189
  code: "KIND_FIELD_MISSING",
843
- message: `'${kind.governs}' requires a non-empty '${field}' field (declared by ${kind.id}).`,
1190
+ message: kindFieldWarningPrefix("KIND_FIELD_MISSING", kind, field) + `(declared by ${kind.id}).`,
844
1191
  field,
845
1192
  severity: "warning",
846
1193
  });
@@ -861,10 +1208,11 @@ export function validateAgainstKind(doc, kind) {
861
1208
  // validation locus, every consumer inherits: `new`, `doc update`, `doc write
862
1209
  // --strict`, `status`'s bundle lint). A future kind wanting a multi-select enum
863
1210
  // needs declared arity in the convention schema — not silently via arrays.
864
- if (Array.isArray(raw)) {
1211
+ // A `string-list` field declares its arity, so its enum checks each item instead.
1212
+ if (Array.isArray(raw) && kind.fields.types?.[field] !== "string-list") {
865
1213
  warnings.push({
866
1214
  code: "KIND_FIELD_ARITY",
867
- message: `'${field}' is enum-restricted and takes exactly ONE value for '${kind.governs}'; ` +
1215
+ message: kindFieldWarningPrefix("KIND_FIELD_ARITY", kind, field) +
868
1216
  `got ${raw.length} (${raw.map((v) => String(v)).join(", ")}).`,
869
1217
  field,
870
1218
  severity: "warning",
@@ -876,13 +1224,30 @@ export function validateAgainstKind(doc, kind) {
876
1224
  if (!allowedStrs.includes(v)) {
877
1225
  warnings.push({
878
1226
  code: "KIND_FIELD_VALUE",
879
- message: `'${field}' value '${v}' is not one of the allowed values for '${kind.governs}': ${allowedStrs.join(", ")}.`,
1227
+ message: kindFieldWarningPrefix("KIND_FIELD_VALUE", kind, field) + `'${v}' is not one of the allowed values for '${kind.governs}': ${allowedStrs.join(", ")}.`,
880
1228
  field,
881
1229
  severity: "warning",
882
1230
  });
883
1231
  }
884
1232
  }
885
1233
  }
1234
+ for (const [field, type] of Object.entries(kind.fields.types ?? {})) {
1235
+ if (!hasOwn(fm, field))
1236
+ continue;
1237
+ const raw = fm[field];
1238
+ // An absent field is presence, owned by `fields.required`; an explicit `null` is a wrong type.
1239
+ if (raw === undefined)
1240
+ continue;
1241
+ const problem = kindFieldTypeProblem(type, raw);
1242
+ if (problem !== undefined) {
1243
+ warnings.push({
1244
+ code: "KIND_FIELD_TYPE",
1245
+ message: kindFieldWarningPrefix("KIND_FIELD_TYPE", kind, field) + `${KIND_FIELD_TYPE_DESCRIPTIONS[type]} for '${kind.governs}'; ${problem}.`,
1246
+ field,
1247
+ severity: "warning",
1248
+ });
1249
+ }
1250
+ }
886
1251
  if (kind.sections && kind.sections.length > 0) {
887
1252
  const sections = splitSections(doc.body ?? "");
888
1253
  for (const heading of kind.sections) {
@@ -974,6 +1339,9 @@ export function kindConventionDoc(kind, prose, timestamp) {
974
1339
  .map(([field, description]) => [field, description.trim()]));
975
1340
  if (Object.keys(descriptions).length > 0)
976
1341
  fields.descriptions = descriptions;
1342
+ const types = Object.fromEntries(Object.entries(kind.fields.types ?? {}).filter(([, type]) => isKindFieldType(type)));
1343
+ if (Object.keys(types).length > 0)
1344
+ fields.types = types;
977
1345
  const frontmatter = { type: CONVENTION_TYPE, title: kind.title, governs: kind.governs, timestamp };
978
1346
  if (typeof kind.description === "string" && kind.description.trim() !== "") {
979
1347
  frontmatter.description = kind.description.trim();
@@ -1003,12 +1371,20 @@ export function kindConventionDoc(kind, prose, timestamp) {
1003
1371
  frontmatter.claim = claim;
1004
1372
  }
1005
1373
  frontmatter.fields = fields;
1374
+ if (kind.deprecated)
1375
+ frontmatter.deprecated = kind.deprecated.problems?.length
1376
+ ? structuredClone(kind.deprecated.raw)
1377
+ : { fields: kind.deprecated.fields, values: kind.deprecated.values, links: kind.deprecated.links };
1006
1378
  if (kind.sections && kind.sections.length > 0)
1007
1379
  frontmatter.sections = kind.sections;
1008
1380
  if (kind.freshnessHorizon !== undefined)
1009
1381
  frontmatter.freshness_horizon = kind.freshnessHorizon;
1010
1382
  if (kind.browseCollapsed)
1011
1383
  frontmatter.browse_collapsed = true;
1384
+ if (typeof kind.order === "number" && Number.isFinite(kind.order))
1385
+ frontmatter.order = kind.order;
1386
+ if (kind.undeclaredFields !== undefined)
1387
+ frontmatter.undeclared_fields = kind.undeclaredFields;
1012
1388
  return { id: kind.id, frontmatter, body: prose };
1013
1389
  }
1014
1390
  //# sourceMappingURL=kinds.js.map