@noy-db/hub 0.6.0 → 0.7.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +1 -1
  3. package/codemods/0.4.0-pre.json +24 -0
  4. package/codemods/0.6.0-pre.json +18 -0
  5. package/codemods/0.7.0-pre.json +258 -0
  6. package/dist/api-EQYRTZO2.js +20 -0
  7. package/dist/as/index.js +146 -0
  8. package/dist/as/index.js.map +1 -0
  9. package/dist/at/index.js +23 -0
  10. package/dist/attestation/index.js +18 -18
  11. package/dist/{backup-VL4GRIEW.js → backup-Z7ZBTAQ6.js} +12 -12
  12. package/dist/blobs/index.js +13 -13
  13. package/dist/broker/index.js +12 -12
  14. package/dist/by/index.js +11 -0
  15. package/dist/cargo/index.js +35 -31
  16. package/dist/{chunk-JKATP6OE.js → chunk-225O5CXQ.js} +2 -2
  17. package/dist/{chunk-XINT4VJA.js → chunk-2GXEQUEX.js} +2 -2
  18. package/dist/chunk-2GXEQUEX.js.map +1 -0
  19. package/dist/{chunk-CXPOG3ZY.js → chunk-2LPVI4PX.js} +8 -8
  20. package/dist/{chunk-2J5IT37K.js → chunk-3L2MVE36.js} +5 -5
  21. package/dist/{chunk-HOPNIR5R.js → chunk-3QARDAYW.js} +2 -2
  22. package/dist/{chunk-HSJBJIB2.js → chunk-467SKJ65.js} +4 -4
  23. package/dist/{chunk-YCGLAANM.js → chunk-4A4TYISP.js} +2 -2
  24. package/dist/{chunk-2CBFYXJX.js → chunk-4G25SDQL.js} +4 -4
  25. package/dist/{chunk-5LZZQMIC.js → chunk-4LPF226H.js} +5 -5
  26. package/dist/{chunk-GANFIM2M.js → chunk-4ZPE6SKS.js} +3 -3
  27. package/dist/{chunk-65JXA63J.js → chunk-5263OEM3.js} +2 -2
  28. package/dist/{chunk-FNYCT27B.js → chunk-57JTHWLQ.js} +4 -4
  29. package/dist/{chunk-5IHGJHWC.js → chunk-5ACAVJUI.js} +2 -2
  30. package/dist/{chunk-3OE2QNSM.js → chunk-5AFMP532.js} +6 -6
  31. package/dist/{chunk-J6I5VR6P.js → chunk-5W7YXFV5.js} +8 -8
  32. package/dist/chunk-5W7YXFV5.js.map +1 -0
  33. package/dist/{chunk-7ZGPQOFV.js → chunk-6EW2UCVF.js} +3 -3
  34. package/dist/{chunk-GCU42IG7.js → chunk-6FOGTKBY.js} +7 -7
  35. package/dist/chunk-6FOGTKBY.js.map +1 -0
  36. package/dist/{chunk-36CEG6CM.js → chunk-7LYUJNU3.js} +2 -2
  37. package/dist/{chunk-D6SXRMZZ.js → chunk-A2YW5EMU.js} +5 -5
  38. package/dist/{chunk-OQMCFHUX.js → chunk-AB5P32RE.js} +2 -2
  39. package/dist/{chunk-JMJSCI7U.js → chunk-ALB64CZM.js} +7 -7
  40. package/dist/{chunk-RPRASGEY.js → chunk-ALUNQEBY.js} +2 -2
  41. package/dist/{chunk-ZYZJLYNS.js → chunk-ATV637J7.js} +7 -7
  42. package/dist/{chunk-LC6NE4IQ.js → chunk-CBRS2NEK.js} +2 -11
  43. package/dist/chunk-CBRS2NEK.js.map +1 -0
  44. package/dist/{chunk-W3HAIN6U.js → chunk-CN6B5PEN.js} +5 -5
  45. package/dist/{chunk-JIHWBKMQ.js → chunk-DBNYPLWY.js} +3 -3
  46. package/dist/{chunk-ZJUZOJVW.js → chunk-DFAUMLD7.js} +5 -5
  47. package/dist/{chunk-S6PJ6ZKE.js → chunk-DKWPJOYH.js} +2 -2
  48. package/dist/{chunk-MPKP6L5E.js → chunk-E6YA6UAP.js} +2 -2
  49. package/dist/{chunk-LIR2DJWP.js → chunk-F23WQK3G.js} +9 -9
  50. package/dist/chunk-F23WQK3G.js.map +1 -0
  51. package/dist/{chunk-S7PM7Z4K.js → chunk-F7ZFRPGQ.js} +2 -2
  52. package/dist/{chunk-CKKN25P2.js → chunk-FOG7YEJP.js} +3 -3
  53. package/dist/{chunk-AJGGBXWA.js → chunk-GK4DRVUD.js} +6 -6
  54. package/dist/chunk-GK4DRVUD.js.map +1 -0
  55. package/dist/{chunk-4ATF4BLF.js → chunk-H36KSN6X.js} +7 -7
  56. package/dist/{chunk-YTUFV7U7.js → chunk-H4M7ADXY.js} +10 -10
  57. package/dist/chunk-H4M7ADXY.js.map +1 -0
  58. package/dist/{chunk-QQRRKO7W.js → chunk-H7HP56F6.js} +5 -5
  59. package/dist/{chunk-RJZQ2PVD.js → chunk-HM4JSXX2.js} +3 -3
  60. package/dist/{chunk-3YGUHUJA.js → chunk-HTGRQZFB.js} +3 -3
  61. package/dist/{chunk-JXHNUYQO.js → chunk-IESNYJXZ.js} +6 -6
  62. package/dist/{chunk-OCJ3JA4O.js → chunk-J4MN6XIU.js} +2 -2
  63. package/dist/{chunk-HWI7GHJZ.js → chunk-J4UJ5FRV.js} +4 -4
  64. package/dist/{chunk-Z3BZXPRO.js → chunk-JBIV4FLR.js} +1 -1
  65. package/dist/chunk-JBIV4FLR.js.map +1 -0
  66. package/dist/{chunk-QVXZFJBU.js → chunk-JVLSU7S2.js} +2 -2
  67. package/dist/{chunk-7Q3RHOA5.js → chunk-KDJGJR7F.js} +2 -2
  68. package/dist/{chunk-PJX72ICF.js → chunk-KN4W2OQ4.js} +7 -7
  69. package/dist/chunk-KN4W2OQ4.js.map +1 -0
  70. package/dist/{chunk-M7WBE3OR.js → chunk-L6GTLZRK.js} +5 -5
  71. package/dist/{chunk-2ZT4INZ4.js → chunk-LF6DMX4C.js} +3 -3
  72. package/dist/chunk-LFUID7OW.js +163 -0
  73. package/dist/chunk-LFUID7OW.js.map +1 -0
  74. package/dist/{chunk-4K6BIMLF.js → chunk-LKFKXS5K.js} +2 -2
  75. package/dist/{chunk-POFYIGQ2.js → chunk-LR4Z47QD.js} +3 -3
  76. package/dist/{chunk-LUYPYCHY.js → chunk-MTBXJAS4.js} +4 -4
  77. package/dist/{chunk-FX3UIDCS.js → chunk-N4CNVSUF.js} +2 -2
  78. package/dist/{chunk-FU5VYEYK.js → chunk-NLKLXXTO.js} +2 -2
  79. package/dist/{chunk-YYV53EHO.js → chunk-OPXR4PB2.js} +2 -2
  80. package/dist/{chunk-5F7BZAGV.js → chunk-OWLVBOWO.js} +10 -10
  81. package/dist/{chunk-6NR36UNB.js → chunk-P6ASQOZR.js} +2 -2
  82. package/dist/{chunk-5ATC6UT4.js → chunk-PCQDY6QN.js} +6 -6
  83. package/dist/{chunk-EQOTJL76.js → chunk-PGFKIOR3.js} +3 -3
  84. package/dist/{chunk-D2YFQ7XG.js → chunk-POS53FG6.js} +2 -2
  85. package/dist/{chunk-ZY6P7M52.js → chunk-PQ6Z2TAP.js} +2 -2
  86. package/dist/{chunk-5OT4G5N5.js → chunk-PUJTKLPL.js} +3 -3
  87. package/dist/{chunk-64WHKBMP.js → chunk-QGJ4XIA7.js} +8 -8
  88. package/dist/{chunk-DECNV4QK.js → chunk-QHJKK77B.js} +6 -6
  89. package/dist/{chunk-JHYKSMVX.js → chunk-QI5NWLVW.js} +7 -7
  90. package/dist/{chunk-BZ3WMOYX.js → chunk-RC4BROYR.js} +3 -3
  91. package/dist/{chunk-IWQPYT6S.js → chunk-RDHUZ674.js} +4 -4
  92. package/dist/{chunk-UJ4Z67UQ.js → chunk-RK7N4OQ5.js} +1 -1
  93. package/dist/chunk-RK7N4OQ5.js.map +1 -0
  94. package/dist/{chunk-EHW7NLGD.js → chunk-S2VG3ABP.js} +3 -3
  95. package/dist/chunk-S2VG3ABP.js.map +1 -0
  96. package/dist/{chunk-7OBIBPCV.js → chunk-S35S77YU.js} +10 -10
  97. package/dist/{chunk-22GR3O4J.js → chunk-SHILAQH5.js} +2 -2
  98. package/dist/{chunk-WPZ5FVAS.js → chunk-T3PHCEN4.js} +3 -3
  99. package/dist/{chunk-GKTW3KLV.js → chunk-TOV6VMHF.js} +5 -5
  100. package/dist/chunk-TOV6VMHF.js.map +1 -0
  101. package/dist/{chunk-6RH7PRTL.js → chunk-TVIFAHZR.js} +6 -6
  102. package/dist/chunk-UBSFPGVJ.js +1 -0
  103. package/dist/{chunk-323MN67Z.js → chunk-UCUALOSM.js} +2 -2
  104. package/dist/{chunk-B4CRUZPR.js → chunk-VAG47QHV.js} +2 -2
  105. package/dist/{chunk-QH47SQLD.js → chunk-VFIWDPXZ.js} +3 -3
  106. package/dist/{chunk-K6CPIK3R.js → chunk-VTG7327U.js} +4 -4
  107. package/dist/chunk-VTG7327U.js.map +1 -0
  108. package/dist/{chunk-ONPVHX2Y.js → chunk-W5LHQXZU.js} +2 -2
  109. package/dist/{chunk-ZIMQDXTQ.js → chunk-WK5FSW7T.js} +8 -8
  110. package/dist/{chunk-PFWE7FJG.js → chunk-WLLUM35R.js} +2 -2
  111. package/dist/{chunk-IWKCJCLP.js → chunk-X62MEF2O.js} +5 -5
  112. package/dist/chunk-X62MEF2O.js.map +1 -0
  113. package/dist/{chunk-XPEPMK4Y.js → chunk-X67FCULK.js} +5 -5
  114. package/dist/chunk-X67FCULK.js.map +1 -0
  115. package/dist/{chunk-C3XWJCG7.js → chunk-XDVVBETV.js} +2 -2
  116. package/dist/chunk-XDVVBETV.js.map +1 -0
  117. package/dist/chunk-XJ3FEKEY.js +15 -0
  118. package/dist/chunk-XJ3FEKEY.js.map +1 -0
  119. package/dist/{chunk-EV2TDHQZ.js → chunk-XSN63FUS.js} +2 -2
  120. package/dist/{chunk-OR2FYRYR.js → chunk-XVU7J43V.js} +2 -2
  121. package/dist/{chunk-JYPRZWCZ.js → chunk-Y3YLJORD.js} +167 -133
  122. package/dist/chunk-Y3YLJORD.js.map +1 -0
  123. package/dist/{chunk-DNKVKO7K.js → chunk-Y6GZ2P4M.js} +2 -2
  124. package/dist/{chunk-ATY3ZASK.js → chunk-YCSM3GZU.js} +2 -2
  125. package/dist/{chunk-BMU2DS3S.js → chunk-YKPGQJFU.js} +12 -171
  126. package/dist/chunk-YKPGQJFU.js.map +1 -0
  127. package/dist/{chunk-RDB66EKD.js → chunk-YMLQBZFJ.js} +6 -6
  128. package/dist/{chunk-EHRIDNZX.js → chunk-YPSOHDNC.js} +2 -2
  129. package/dist/{chunk-KM6ZXG7U.js → chunk-YXA2TCTZ.js} +4 -4
  130. package/dist/{chunk-TKBB62DN.js → chunk-Z2PWOSCJ.js} +2 -2
  131. package/dist/{chunk-S2I5MYSA.js → chunk-Z2WK53N6.js} +42 -15
  132. package/dist/chunk-Z2WK53N6.js.map +1 -0
  133. package/dist/{chunk-5O5ZSW7N.js → chunk-Z7ZXZL6Y.js} +2 -2
  134. package/dist/{chunk-2ZCWHCLF.js → chunk-ZO252Q5S.js} +6 -6
  135. package/dist/classified/index.js +5 -5
  136. package/dist/{classified-marker-AZDSDG6V.js → classified-marker-BSQHU4JT.js} +3 -3
  137. package/dist/collection-facade-LG3NYZVB.js +45 -0
  138. package/dist/{computed-VG2PCM4L.js → computed-ASBNTLOK.js} +3 -3
  139. package/dist/consent/index.js +9 -9
  140. package/dist/cover/index.js +9 -9
  141. package/dist/custody/index.js +12 -12
  142. package/dist/{dead-filter-JNQNB3TA.js → dead-filter-QKU56XTQ.js} +2 -2
  143. package/dist/debug/index.js +1 -1
  144. package/dist/{delegation-5F36DRDH.js → delegation-XWRPYODW.js} +11 -11
  145. package/dist/derivations/index.js +12 -12
  146. package/dist/derive-CXHCY46K.js +22 -0
  147. package/dist/directory/index.js +10 -10
  148. package/dist/{dispatch-3ZA733EY.js → dispatch-4AP4PUZU.js} +18 -18
  149. package/dist/{dispatch-TNM5CRLZ.js → dispatch-VR4LRXZ7.js} +5 -5
  150. package/dist/{enclave-Y2ALNDRD.js → enclave-NYPT7WA7.js} +9 -9
  151. package/dist/executor-3KFRQETS.js +29 -0
  152. package/dist/executor-AFHQYRAU.js +9 -0
  153. package/dist/executor-YYDW6XQI.js +9 -0
  154. package/dist/export-accessible-BX2ILB4C.js +23 -0
  155. package/dist/extract-partition-UPOVITFI.js +38 -0
  156. package/dist/{fanout-sidecar-3QZU7ZZX.js → fanout-sidecar-IWP3R4RC.js} +9 -9
  157. package/dist/{fence-watcher-DHQ775JB.js → fence-watcher-ZVSMLKQD.js} +1 -1
  158. package/dist/fence-watcher-ZVSMLKQD.js.map +1 -0
  159. package/dist/find-SZBL2HPB.js +11 -0
  160. package/dist/forget/index.js +9 -9
  161. package/dist/guards/index.js +7 -7
  162. package/dist/history/index.js +13 -13
  163. package/dist/i18n/index.js +14 -14
  164. package/dist/index.d.ts +5 -5
  165. package/dist/index.js +134 -131
  166. package/dist/index.js.map +1 -1
  167. package/dist/indexing/index.js +2 -2
  168. package/dist/introspection/index.js +12 -11
  169. package/dist/issue-G53NB6EW.js +19 -0
  170. package/dist/kernel/collection-config.d.ts +9 -9
  171. package/dist/kernel/collection.d.ts +1 -1
  172. package/dist/kernel/errors.d.ts +2 -2
  173. package/dist/kernel/noydb.d.ts +6 -6
  174. package/dist/kernel/secret-mode.d.ts +1 -1
  175. package/dist/kernel/types.d.ts +34 -15
  176. package/dist/kernel/vault.d.ts +10 -1
  177. package/dist/kernel/via/compose.d.ts +3 -3
  178. package/dist/kernel/via/index.d.ts +4 -4
  179. package/dist/kernel/via/pipeline.d.ts +6 -6
  180. package/dist/kernel/via/reconcile.d.ts +2 -2
  181. package/dist/kernel/via/taint-binding.d.ts +3 -3
  182. package/dist/{ledger-MQIIOTZB.js → ledger-T5K4P2D7.js} +11 -11
  183. package/dist/liberate-VEOZRESE.js +25 -0
  184. package/dist/{link-set-5PJBBR63.js → link-set-76JZ6YB4.js} +11 -11
  185. package/dist/{managed-secret-ETDG6AAE.js → managed-secret-6YC32VXG.js} +12 -12
  186. package/dist/materialized-views/index.js +25 -25
  187. package/dist/{migrate-cek-V3VDRV24.js → migrate-cek-LBRKYUZZ.js} +2 -2
  188. package/dist/money/index.js +4 -4
  189. package/dist/noydb-EDJA4JNJ.js +86 -0
  190. package/dist/on/index.js +1 -0
  191. package/dist/overlay-views/index.js +4 -4
  192. package/dist/periods/index.js +12 -12
  193. package/dist/pod/index.js +58 -57
  194. package/dist/{pod-handle-AZ3CXY5Y.js → pod-handle-P6DPBM5U.js} +9 -9
  195. package/dist/policy/index.js +10 -10
  196. package/dist/port/as/active.d.ts +10 -0
  197. package/dist/port/as/index.d.ts +32 -0
  198. package/dist/port/as/types.d.ts +113 -0
  199. package/dist/port/at/index.d.ts +37 -0
  200. package/dist/port/by/default-provider.d.ts +3 -3
  201. package/dist/port/by/index.d.ts +32 -10
  202. package/dist/port/by/types.d.ts +29 -11
  203. package/dist/port/on/index.d.ts +50 -0
  204. package/dist/port/with/computed-strategy.d.ts +1 -1
  205. package/dist/port/with/device-seal-strategy.d.ts +2 -2
  206. package/dist/port/with/formats-strategy.d.ts +76 -0
  207. package/dist/port/with/strategies.d.ts +11 -5
  208. package/dist/portability/index.js +8 -8
  209. package/dist/{post-register-QCJYRMIK.js → post-register-53O7AJRZ.js} +6 -6
  210. package/dist/query/index.js +3 -3
  211. package/dist/reduce/index.js +4 -4
  212. package/dist/register-6TCBR6XD.js +32 -0
  213. package/dist/registry-DH2L4O2V.js +18 -0
  214. package/dist/registry-IWFMXCHX.js +9 -0
  215. package/dist/registry-Q3FG3OAX.js +9 -0
  216. package/dist/registry-YC3IFG3A.js +19 -0
  217. package/dist/request-withdrawal-NM5VYR6F.js +31 -0
  218. package/dist/{reveal-W7BKZSUP.js → reveal-XBIMHAXR.js} +6 -6
  219. package/dist/revoke-MJNYWO72.js +24 -0
  220. package/dist/satellites/index.js +1 -1
  221. package/dist/schema-update/index.js +2 -2
  222. package/dist/sealed-record/index.js +12 -12
  223. package/dist/search/index.js +4 -4
  224. package/dist/{seed-55FPOMYP.js → seed-NSNIGYXE.js} +12 -12
  225. package/dist/sequence/index.js +9 -9
  226. package/dist/session/index.js +9 -9
  227. package/dist/shadow/index.js +2 -2
  228. package/dist/signer-6XVS2AU3.js +25 -0
  229. package/dist/snapshots/index.js +10 -10
  230. package/dist/{stale-TH7SSVRV.js → stale-MCS46TFO.js} +10 -10
  231. package/dist/stale-MCS46TFO.js.map +1 -0
  232. package/dist/storage-ZXUT476I.js +23 -0
  233. package/dist/storage-ZXUT476I.js.map +1 -0
  234. package/dist/{store-coordination-provider-R27VRD6K.js → store-coordination-provider-6FM26VQM.js} +14 -13
  235. package/dist/store-coordination-provider-6FM26VQM.js.map +1 -0
  236. package/dist/sync/index.js +10 -10
  237. package/dist/team/index.js +17 -17
  238. package/dist/tiers/index.js +11 -11
  239. package/dist/to/index.js +1 -1
  240. package/dist/transactions/index.js +3 -3
  241. package/dist/util/index.js +1 -1
  242. package/dist/vault-diff-FE5J35NJ.js +9 -0
  243. package/dist/vault-diff-FE5J35NJ.js.map +1 -0
  244. package/dist/vault-head/index.js +8 -8
  245. package/dist/{verify-M5LQH43C.js → verify-WYOFLSNA.js} +5 -5
  246. package/dist/via/blob/binding.d.ts +6 -6
  247. package/dist/via/classified/binding.d.ts +9 -9
  248. package/dist/via/computed/binding.d.ts +2 -2
  249. package/dist/via/i18n/binding.d.ts +4 -4
  250. package/dist/via/lookup/binding.d.ts +5 -5
  251. package/dist/via/lookup/index.d.ts +1 -1
  252. package/dist/via/lookup/snapshot.d.ts +1 -1
  253. package/dist/via/money/binding.d.ts +3 -3
  254. package/dist/via/money/normalize.d.ts +1 -1
  255. package/dist/via/money/where.d.ts +3 -3
  256. package/dist/walk-JNEOYCAU.js +21 -0
  257. package/dist/walk-JNEOYCAU.js.map +1 -0
  258. package/dist/with-cargo/adopt-partition.d.ts +6 -6
  259. package/dist/with-cargo/floor.d.ts +1 -1
  260. package/dist/with-cargo/index.d.ts +1 -1
  261. package/dist/with-party/team/deed.d.ts +4 -4
  262. package/dist/with-party/team/device-seal.d.ts +5 -5
  263. package/dist/with-party/team/echo-ceremony.d.ts +2 -2
  264. package/dist/with-party/team/echo-secret.d.ts +4 -4
  265. package/dist/with-party/team/index.d.ts +2 -2
  266. package/dist/with-party/team/keyring.d.ts +2 -2
  267. package/dist/with-party/team/managed-secret.d.ts +21 -11
  268. package/dist/with-party/team/noydb-facade.d.ts +2 -2
  269. package/dist/with-party/team/{shamir-recovery-provider.d.ts → noydb-shamir.d.ts} +1 -1
  270. package/dist/with-party/team/recovery.d.ts +3 -3
  271. package/dist/with-party/team/rotate-recover.d.ts +5 -5
  272. package/dist/with-pod/format.d.ts +1 -1
  273. package/dist/with-pod/pod.d.ts +6 -6
  274. package/dist/with-shape/introspection/describe.d.ts +2 -2
  275. package/dist/with-shape/schema-update/fence-controller.d.ts +4 -4
  276. package/dist/with-shape/schema-update/fence-watcher.d.ts +4 -4
  277. package/dist/with-shape/schema-update/store-coordination-provider.d.ts +7 -6
  278. package/dist/withdraw-accessible-ILTSXTIE.js +28 -0
  279. package/dist/withdraw-accessible-ILTSXTIE.js.map +1 -0
  280. package/package.json +23 -5
  281. package/dist/api-6X2VLZ7J.js +0 -20
  282. package/dist/chunk-AJGGBXWA.js.map +0 -1
  283. package/dist/chunk-BMU2DS3S.js.map +0 -1
  284. package/dist/chunk-C3XWJCG7.js.map +0 -1
  285. package/dist/chunk-EHW7NLGD.js.map +0 -1
  286. package/dist/chunk-GCU42IG7.js.map +0 -1
  287. package/dist/chunk-GKTW3KLV.js.map +0 -1
  288. package/dist/chunk-IWKCJCLP.js.map +0 -1
  289. package/dist/chunk-J6I5VR6P.js.map +0 -1
  290. package/dist/chunk-JYPRZWCZ.js.map +0 -1
  291. package/dist/chunk-K6CPIK3R.js.map +0 -1
  292. package/dist/chunk-LC6NE4IQ.js.map +0 -1
  293. package/dist/chunk-LIR2DJWP.js.map +0 -1
  294. package/dist/chunk-PJX72ICF.js.map +0 -1
  295. package/dist/chunk-S2I5MYSA.js.map +0 -1
  296. package/dist/chunk-UJ4Z67UQ.js.map +0 -1
  297. package/dist/chunk-XINT4VJA.js.map +0 -1
  298. package/dist/chunk-XPEPMK4Y.js.map +0 -1
  299. package/dist/chunk-YTUFV7U7.js.map +0 -1
  300. package/dist/chunk-Z3BZXPRO.js.map +0 -1
  301. package/dist/collection-facade-WSUAYFJ4.js +0 -45
  302. package/dist/derive-MPOGZ4NR.js +0 -22
  303. package/dist/executor-BBEEUFO3.js +0 -9
  304. package/dist/executor-G6G3YEWR.js +0 -9
  305. package/dist/executor-ZUTUMTPA.js +0 -29
  306. package/dist/export-accessible-S3KEB763.js +0 -23
  307. package/dist/extract-partition-KVCTSUVE.js +0 -38
  308. package/dist/fence-watcher-DHQ775JB.js.map +0 -1
  309. package/dist/find-V4FN5ITT.js +0 -11
  310. package/dist/issue-5CFBWBRX.js +0 -19
  311. package/dist/liberate-LW7OKVBH.js +0 -25
  312. package/dist/noydb-LFDRMYZ5.js +0 -85
  313. package/dist/register-JBOEHTVX.js +0 -32
  314. package/dist/registry-5DYHQFJS.js +0 -9
  315. package/dist/registry-EANV44W2.js +0 -9
  316. package/dist/registry-J25H6VB4.js +0 -19
  317. package/dist/registry-R23SQUQH.js +0 -18
  318. package/dist/request-withdrawal-KQ4W4UT5.js +0 -31
  319. package/dist/revoke-H3VSTAIE.js +0 -24
  320. package/dist/signer-53AQ3BU2.js +0 -25
  321. package/dist/storage-WSF7ZKTL.js +0 -23
  322. package/dist/store-coordination-provider-R27VRD6K.js.map +0 -1
  323. package/dist/walk-NABCHDZN.js +0 -21
  324. package/dist/withdraw-accessible-VCINIG6V.js +0 -28
  325. /package/dist/{api-6X2VLZ7J.js.map → api-EQYRTZO2.js.map} +0 -0
  326. /package/dist/{collection-facade-WSUAYFJ4.js.map → at/index.js.map} +0 -0
  327. /package/dist/{backup-VL4GRIEW.js.map → backup-Z7ZBTAQ6.js.map} +0 -0
  328. /package/dist/{computed-VG2PCM4L.js.map → by/index.js.map} +0 -0
  329. /package/dist/{chunk-JKATP6OE.js.map → chunk-225O5CXQ.js.map} +0 -0
  330. /package/dist/{chunk-CXPOG3ZY.js.map → chunk-2LPVI4PX.js.map} +0 -0
  331. /package/dist/{chunk-2J5IT37K.js.map → chunk-3L2MVE36.js.map} +0 -0
  332. /package/dist/{chunk-HOPNIR5R.js.map → chunk-3QARDAYW.js.map} +0 -0
  333. /package/dist/{chunk-HSJBJIB2.js.map → chunk-467SKJ65.js.map} +0 -0
  334. /package/dist/{chunk-YCGLAANM.js.map → chunk-4A4TYISP.js.map} +0 -0
  335. /package/dist/{chunk-2CBFYXJX.js.map → chunk-4G25SDQL.js.map} +0 -0
  336. /package/dist/{chunk-5LZZQMIC.js.map → chunk-4LPF226H.js.map} +0 -0
  337. /package/dist/{chunk-GANFIM2M.js.map → chunk-4ZPE6SKS.js.map} +0 -0
  338. /package/dist/{chunk-65JXA63J.js.map → chunk-5263OEM3.js.map} +0 -0
  339. /package/dist/{chunk-FNYCT27B.js.map → chunk-57JTHWLQ.js.map} +0 -0
  340. /package/dist/{chunk-5IHGJHWC.js.map → chunk-5ACAVJUI.js.map} +0 -0
  341. /package/dist/{chunk-3OE2QNSM.js.map → chunk-5AFMP532.js.map} +0 -0
  342. /package/dist/{chunk-7ZGPQOFV.js.map → chunk-6EW2UCVF.js.map} +0 -0
  343. /package/dist/{chunk-36CEG6CM.js.map → chunk-7LYUJNU3.js.map} +0 -0
  344. /package/dist/{chunk-D6SXRMZZ.js.map → chunk-A2YW5EMU.js.map} +0 -0
  345. /package/dist/{chunk-OQMCFHUX.js.map → chunk-AB5P32RE.js.map} +0 -0
  346. /package/dist/{chunk-JMJSCI7U.js.map → chunk-ALB64CZM.js.map} +0 -0
  347. /package/dist/{chunk-RPRASGEY.js.map → chunk-ALUNQEBY.js.map} +0 -0
  348. /package/dist/{chunk-ZYZJLYNS.js.map → chunk-ATV637J7.js.map} +0 -0
  349. /package/dist/{chunk-W3HAIN6U.js.map → chunk-CN6B5PEN.js.map} +0 -0
  350. /package/dist/{chunk-JIHWBKMQ.js.map → chunk-DBNYPLWY.js.map} +0 -0
  351. /package/dist/{chunk-ZJUZOJVW.js.map → chunk-DFAUMLD7.js.map} +0 -0
  352. /package/dist/{chunk-S6PJ6ZKE.js.map → chunk-DKWPJOYH.js.map} +0 -0
  353. /package/dist/{chunk-MPKP6L5E.js.map → chunk-E6YA6UAP.js.map} +0 -0
  354. /package/dist/{chunk-S7PM7Z4K.js.map → chunk-F7ZFRPGQ.js.map} +0 -0
  355. /package/dist/{chunk-CKKN25P2.js.map → chunk-FOG7YEJP.js.map} +0 -0
  356. /package/dist/{chunk-4ATF4BLF.js.map → chunk-H36KSN6X.js.map} +0 -0
  357. /package/dist/{chunk-QQRRKO7W.js.map → chunk-H7HP56F6.js.map} +0 -0
  358. /package/dist/{chunk-RJZQ2PVD.js.map → chunk-HM4JSXX2.js.map} +0 -0
  359. /package/dist/{chunk-3YGUHUJA.js.map → chunk-HTGRQZFB.js.map} +0 -0
  360. /package/dist/{chunk-JXHNUYQO.js.map → chunk-IESNYJXZ.js.map} +0 -0
  361. /package/dist/{chunk-OCJ3JA4O.js.map → chunk-J4MN6XIU.js.map} +0 -0
  362. /package/dist/{chunk-HWI7GHJZ.js.map → chunk-J4UJ5FRV.js.map} +0 -0
  363. /package/dist/{chunk-QVXZFJBU.js.map → chunk-JVLSU7S2.js.map} +0 -0
  364. /package/dist/{chunk-7Q3RHOA5.js.map → chunk-KDJGJR7F.js.map} +0 -0
  365. /package/dist/{chunk-M7WBE3OR.js.map → chunk-L6GTLZRK.js.map} +0 -0
  366. /package/dist/{chunk-2ZT4INZ4.js.map → chunk-LF6DMX4C.js.map} +0 -0
  367. /package/dist/{chunk-4K6BIMLF.js.map → chunk-LKFKXS5K.js.map} +0 -0
  368. /package/dist/{chunk-POFYIGQ2.js.map → chunk-LR4Z47QD.js.map} +0 -0
  369. /package/dist/{chunk-LUYPYCHY.js.map → chunk-MTBXJAS4.js.map} +0 -0
  370. /package/dist/{chunk-FX3UIDCS.js.map → chunk-N4CNVSUF.js.map} +0 -0
  371. /package/dist/{chunk-FU5VYEYK.js.map → chunk-NLKLXXTO.js.map} +0 -0
  372. /package/dist/{chunk-YYV53EHO.js.map → chunk-OPXR4PB2.js.map} +0 -0
  373. /package/dist/{chunk-5F7BZAGV.js.map → chunk-OWLVBOWO.js.map} +0 -0
  374. /package/dist/{chunk-6NR36UNB.js.map → chunk-P6ASQOZR.js.map} +0 -0
  375. /package/dist/{chunk-5ATC6UT4.js.map → chunk-PCQDY6QN.js.map} +0 -0
  376. /package/dist/{chunk-EQOTJL76.js.map → chunk-PGFKIOR3.js.map} +0 -0
  377. /package/dist/{chunk-D2YFQ7XG.js.map → chunk-POS53FG6.js.map} +0 -0
  378. /package/dist/{chunk-ZY6P7M52.js.map → chunk-PQ6Z2TAP.js.map} +0 -0
  379. /package/dist/{chunk-5OT4G5N5.js.map → chunk-PUJTKLPL.js.map} +0 -0
  380. /package/dist/{chunk-64WHKBMP.js.map → chunk-QGJ4XIA7.js.map} +0 -0
  381. /package/dist/{chunk-DECNV4QK.js.map → chunk-QHJKK77B.js.map} +0 -0
  382. /package/dist/{chunk-JHYKSMVX.js.map → chunk-QI5NWLVW.js.map} +0 -0
  383. /package/dist/{chunk-BZ3WMOYX.js.map → chunk-RC4BROYR.js.map} +0 -0
  384. /package/dist/{chunk-IWQPYT6S.js.map → chunk-RDHUZ674.js.map} +0 -0
  385. /package/dist/{chunk-7OBIBPCV.js.map → chunk-S35S77YU.js.map} +0 -0
  386. /package/dist/{chunk-22GR3O4J.js.map → chunk-SHILAQH5.js.map} +0 -0
  387. /package/dist/{chunk-WPZ5FVAS.js.map → chunk-T3PHCEN4.js.map} +0 -0
  388. /package/dist/{chunk-6RH7PRTL.js.map → chunk-TVIFAHZR.js.map} +0 -0
  389. /package/dist/{derive-MPOGZ4NR.js.map → chunk-UBSFPGVJ.js.map} +0 -0
  390. /package/dist/{chunk-323MN67Z.js.map → chunk-UCUALOSM.js.map} +0 -0
  391. /package/dist/{chunk-B4CRUZPR.js.map → chunk-VAG47QHV.js.map} +0 -0
  392. /package/dist/{chunk-QH47SQLD.js.map → chunk-VFIWDPXZ.js.map} +0 -0
  393. /package/dist/{chunk-ONPVHX2Y.js.map → chunk-W5LHQXZU.js.map} +0 -0
  394. /package/dist/{chunk-ZIMQDXTQ.js.map → chunk-WK5FSW7T.js.map} +0 -0
  395. /package/dist/{chunk-PFWE7FJG.js.map → chunk-WLLUM35R.js.map} +0 -0
  396. /package/dist/{chunk-EV2TDHQZ.js.map → chunk-XSN63FUS.js.map} +0 -0
  397. /package/dist/{chunk-OR2FYRYR.js.map → chunk-XVU7J43V.js.map} +0 -0
  398. /package/dist/{chunk-DNKVKO7K.js.map → chunk-Y6GZ2P4M.js.map} +0 -0
  399. /package/dist/{chunk-ATY3ZASK.js.map → chunk-YCSM3GZU.js.map} +0 -0
  400. /package/dist/{chunk-RDB66EKD.js.map → chunk-YMLQBZFJ.js.map} +0 -0
  401. /package/dist/{chunk-EHRIDNZX.js.map → chunk-YPSOHDNC.js.map} +0 -0
  402. /package/dist/{chunk-KM6ZXG7U.js.map → chunk-YXA2TCTZ.js.map} +0 -0
  403. /package/dist/{chunk-TKBB62DN.js.map → chunk-Z2PWOSCJ.js.map} +0 -0
  404. /package/dist/{chunk-5O5ZSW7N.js.map → chunk-Z7ZXZL6Y.js.map} +0 -0
  405. /package/dist/{chunk-2ZCWHCLF.js.map → chunk-ZO252Q5S.js.map} +0 -0
  406. /package/dist/{classified-marker-AZDSDG6V.js.map → classified-marker-BSQHU4JT.js.map} +0 -0
  407. /package/dist/{enclave-Y2ALNDRD.js.map → collection-facade-LG3NYZVB.js.map} +0 -0
  408. /package/dist/{executor-BBEEUFO3.js.map → computed-ASBNTLOK.js.map} +0 -0
  409. /package/dist/{dead-filter-JNQNB3TA.js.map → dead-filter-QKU56XTQ.js.map} +0 -0
  410. /package/dist/{delegation-5F36DRDH.js.map → delegation-XWRPYODW.js.map} +0 -0
  411. /package/dist/{executor-G6G3YEWR.js.map → derive-CXHCY46K.js.map} +0 -0
  412. /package/dist/{dispatch-3ZA733EY.js.map → dispatch-4AP4PUZU.js.map} +0 -0
  413. /package/dist/{dispatch-TNM5CRLZ.js.map → dispatch-VR4LRXZ7.js.map} +0 -0
  414. /package/dist/{executor-ZUTUMTPA.js.map → enclave-NYPT7WA7.js.map} +0 -0
  415. /package/dist/{export-accessible-S3KEB763.js.map → executor-3KFRQETS.js.map} +0 -0
  416. /package/dist/{extract-partition-KVCTSUVE.js.map → executor-AFHQYRAU.js.map} +0 -0
  417. /package/dist/{find-V4FN5ITT.js.map → executor-YYDW6XQI.js.map} +0 -0
  418. /package/dist/{issue-5CFBWBRX.js.map → export-accessible-BX2ILB4C.js.map} +0 -0
  419. /package/dist/{ledger-MQIIOTZB.js.map → extract-partition-UPOVITFI.js.map} +0 -0
  420. /package/dist/{fanout-sidecar-3QZU7ZZX.js.map → fanout-sidecar-IWP3R4RC.js.map} +0 -0
  421. /package/dist/{liberate-LW7OKVBH.js.map → find-SZBL2HPB.js.map} +0 -0
  422. /package/dist/{link-set-5PJBBR63.js.map → issue-G53NB6EW.js.map} +0 -0
  423. /package/dist/{managed-secret-ETDG6AAE.js.map → ledger-T5K4P2D7.js.map} +0 -0
  424. /package/dist/{noydb-LFDRMYZ5.js.map → liberate-VEOZRESE.js.map} +0 -0
  425. /package/dist/{register-JBOEHTVX.js.map → link-set-76JZ6YB4.js.map} +0 -0
  426. /package/dist/{registry-5DYHQFJS.js.map → managed-secret-6YC32VXG.js.map} +0 -0
  427. /package/dist/{migrate-cek-V3VDRV24.js.map → migrate-cek-LBRKYUZZ.js.map} +0 -0
  428. /package/dist/{registry-EANV44W2.js.map → noydb-EDJA4JNJ.js.map} +0 -0
  429. /package/dist/{registry-J25H6VB4.js.map → on/index.js.map} +0 -0
  430. /package/dist/{pod-handle-AZ3CXY5Y.js.map → pod-handle-P6DPBM5U.js.map} +0 -0
  431. /package/dist/{post-register-QCJYRMIK.js.map → post-register-53O7AJRZ.js.map} +0 -0
  432. /package/dist/{registry-R23SQUQH.js.map → register-6TCBR6XD.js.map} +0 -0
  433. /package/dist/{request-withdrawal-KQ4W4UT5.js.map → registry-DH2L4O2V.js.map} +0 -0
  434. /package/dist/{revoke-H3VSTAIE.js.map → registry-IWFMXCHX.js.map} +0 -0
  435. /package/dist/{signer-53AQ3BU2.js.map → registry-Q3FG3OAX.js.map} +0 -0
  436. /package/dist/{stale-TH7SSVRV.js.map → registry-YC3IFG3A.js.map} +0 -0
  437. /package/dist/{storage-WSF7ZKTL.js.map → request-withdrawal-NM5VYR6F.js.map} +0 -0
  438. /package/dist/{reveal-W7BKZSUP.js.map → reveal-XBIMHAXR.js.map} +0 -0
  439. /package/dist/{walk-NABCHDZN.js.map → revoke-MJNYWO72.js.map} +0 -0
  440. /package/dist/{seed-55FPOMYP.js.map → seed-NSNIGYXE.js.map} +0 -0
  441. /package/dist/{withdraw-accessible-VCINIG6V.js.map → signer-6XVS2AU3.js.map} +0 -0
  442. /package/dist/{verify-M5LQH43C.js.map → verify-WYOFLSNA.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog — hub
2
2
 
3
+ ## 0.7.0-pre.0
4
+
5
+ ### Minor Changes
6
+
7
+ - **The port vocabulary, and the seams that make it navigable.**
8
+
9
+ A developer should be able to learn the available ports, then pick a package —
10
+ internal or family — that binds one. This line makes the subpath and the type
11
+ name say which port they belong to.
12
+
13
+ **BREAKING — the `Provider` suffix is retired.** A type a satellite implements
14
+ is now `Noydb<Stem>`, matching `NoydbStore`, which was already the pattern.
15
+ `Provider` marked some port instances and not others, so it distinguished
16
+ nothing. Every removed name is in the shipped codemod map
17
+ (`@noy-db/hub/codemods/0.7.0-pre.json`), with `safeGlobalReplace` per row —
18
+ bare-noun rows are flagged unsafe because they collide with ordinary prose.
19
+
20
+ **New published seams: `/at`, `/by`, `/on`, `/as`.** Each ships with a
21
+ conformance kit — `test-sealer-conformance`, `test-mesh-conformance`,
22
+ `test-ceremony-conformance`, `test-format-conformance` — and every one of them
23
+ found a real defect in a binding it was written against.
24
+
25
+ **`/as` is now a port, not a family convention.** Hub owns `export` and
26
+ `import`; a format supplies `encode`/`decode` and declares its own `id`. That
27
+ consolidates a six-copy `ImportPolicy` and lets a format ship outside this repo.
28
+
29
+ **`ExportFormat` is an open union.** A third-party format id can be granted in
30
+ an `exportCapability`, not merely checked — previously the only way to authorise
31
+ one was the `'*'` wildcard, which grants every format at once.
32
+
33
+ **`FenceState` names one type again.** `/by` and `/cargo` carried a duplicate
34
+ object under the same name as the root barrel's string union; they now re-export
35
+ `FenceDoc`.
36
+
37
+ Two decisions are recorded in `docs/adr/`: **0004** (the `as-*` inversion) and
38
+ **0005** (there is no `/ui` port — a UI is a driving adapter, and egress rather
39
+ than rendering is what `assertCanExport` gates).
40
+
41
+ ### Patch Changes
42
+
43
+ - **Fix: a schema-fence transition no longer erases `schemaHash`.**
44
+
45
+ `StoreMesh.setFence` wrote the caller's document whole, and callers legitimately
46
+ construct a partial one — so every drain, migrate, complete and abort dropped
47
+ the field #946 added. "Which schema is generation N" was answerable from
48
+ `schemaFenceState()` only until the first cutover. Nothing reported it: the
49
+ fence still loaded, still validated, and still gated writes.
50
+
3
51
  ## 0.6.0
4
52
 
5
53
  ### Minor Changes
package/README.md CHANGED
@@ -175,7 +175,7 @@ Core has zero `node:` imports — it runs unchanged in browsers, Node, Bun, Deno
175
175
 
176
176
  #### Other plaintext formats
177
177
 
178
- CSV, XML, xlsx, and the rest of the plaintext tier — plus encrypted `.noydb` bundles under the `as-noydb` encrypted tier — all live in the [`@noy-db/as-*`](https://www.npmjs.com/search?q=%40noy-db%2Fas-) family. Every invocation is gated by the two-tier authorization model (`canExportPlaintext` default off, `canExportBundle` default on for owner/admin) and lands in the audit ledger.
178
+ CSV, XML, xlsx, and the rest of the plaintext tier — plus encrypted `.noydb` bundles under the `as-noydb` encrypted tier — all live in the [`@noy-db/as-*`](https://www.npmjs.com/search?q=%40noy-db%2Fas-) family. Every invocation is gated by the two-tier authorization model (`assertCanExport('plaintext')` default off, `canExportBundle` default on for owner/admin) and lands in the audit ledger.
179
179
 
180
180
  ## Money fields
181
181
 
@@ -315,6 +315,22 @@
315
315
  "section": "§5",
316
316
  "note": "Split in two, so the target depends on what you imported: pod artifacts (write/read/header/cover) went to `/pod`, orchestration types went to `/cargo`. Resolve per import, not per file."
317
317
  },
318
+ {
319
+ "from": "@noy-db/hub/by",
320
+ "to": "@noy-db/hub/cargo",
321
+ "kind": "subpath",
322
+ "safeGlobalReplace": true,
323
+ "section": "\u00a77",
324
+ "note": "ADDED 2026-08-22, not in this map as originally written. The 0.4 prune removed SEVEN subpaths (`./with ./ui ./by ./on ./at ./in ./as`) and this map recorded five of them; `/by` and `/with` had no row, so a consumer importing either got no migration instruction at all. Found while re-introducing `/by` in the 0.7 line, because the un-retired guard refuses a path no earlier map says was retired \u2014 the guard was right and the map was short. Every one of its six exports (`NoydbMesh` \u2014 then `CoordinationProvider` \u2014 `WriterPresence`, `FenceState`, `DrainBarrierOptions`, `isQuorum`, `runDrainBarrier`) is reachable from `/cargo` today, verified against the built surface, so this is a clean single-target redirect."
325
+ },
326
+ {
327
+ "from": "@noy-db/hub/with",
328
+ "to": "@noy-db/hub/cargo",
329
+ "kind": "subpath",
330
+ "safeGlobalReplace": false,
331
+ "section": "\u00a77",
332
+ "note": "ADDED 2026-08-22 \u2014 the second of the two rows this map was missing; see the `/by` row for how they were found. UNLIKE every other subpath row here, this is NOT a clean redirect and that is why it is unsafe to apply blind: only `WriteEvent` and `WriteHook` landed on `/cargo`. `WriteHookRegistry`, `ServiceBus`/`SubsystemBus`, and `assertCanExport`/`assertCanImport`/`canExport`/`canImport` are reachable from NO declared subpath today \u2014 they became internal with no public replacement. A consumer using those has no target to move to, and this row must not pretend otherwise."
333
+ },
318
334
  {
319
335
  "from": "@noy-db/hub/as",
320
336
  "to": "@noy-db/hub",
@@ -431,6 +447,14 @@
431
447
  "safeGlobalReplace": true,
432
448
  "section": "§5"
433
449
  },
450
+ {
451
+ "from": "LiveAggregation",
452
+ "to": "LiveReduction",
453
+ "kind": "type",
454
+ "safeGlobalReplace": true,
455
+ "section": "\u00a75",
456
+ "note": "#1154. Missed when its siblings (AggregateResult, GroupedAggregation, AggregateSpec, withAggregate) were mapped. Verified against published tarballs: reachable in 0.3.0, absent from 0.4.0, and LiveReduction appears in exactly that transition \u2014 same module as ReduceResult/ReduceSpec, and it is the reactive primitive .live() returns."
457
+ },
434
458
  {
435
459
  "from": "GroupedAggregation",
436
460
  "to": "GroupedReduction",
@@ -164,6 +164,24 @@
164
164
  "section": "#1058",
165
165
  "note": "The row missing from #1052's table (#1061). klum-db imported it from @noy-db/hub/pod and only the compiler caught it \u2014 TS2724, 'Did you mean hasNoydbPodMagic?'."
166
166
  },
167
+ {
168
+ "from": "encodeBundleHeader",
169
+ "to": "encodePodHeader",
170
+ "kind": "identifier",
171
+ "package": "@noy-db/hub",
172
+ "safeGlobalReplace": true,
173
+ "section": "#1058",
174
+ "note": "Found by scripts/check-codemod-coverage.mjs rather than by review: reachable in published 0.5.0, absent from 0.6.0, successor present in the same /pod barrel."
175
+ },
176
+ {
177
+ "from": "validateBundleHeader",
178
+ "to": "validatePodHeaderFields",
179
+ "kind": "identifier",
180
+ "package": "@noy-db/hub",
181
+ "safeGlobalReplace": true,
182
+ "section": "#1058",
183
+ "note": "Same transition and same barrel as encodeBundleHeader. The target is NOT a straight Bundle\u2192Pod substitution \u2014 the name gained `Fields` \u2014 which is why a blanket replace misses it and a map row is the only mechanical answer."
184
+ },
167
185
  {
168
186
  "from": "BundleIntegrityError",
169
187
  "to": "PodIntegrityError",
@@ -0,0 +1,258 @@
1
+ {
2
+ "$comment": "Machine-readable rename map for the noy-db 0.7.0-pre vocabulary change — the port-instance naming rule. A type a satellite IMPLEMENTS is now `Noydb<Stem>`, matching `NoydbStore`, which was already the pattern and is unchanged (689 references across five repos; the scheme accommodates the anchor rather than renaming it). The `Provider` suffix is retired: it marked some port instances and not others, so it distinguished nothing. Every `from` was REMOVED with no alias, per the project's no-legacy-aliases policy — `/kernel` and `/adapter` were both retired that way after consumers migrated. Rows are verified against the live surface by packages/hub/__tests__/codemod-map-0.7.test.ts. ABSENT BY MEASUREMENT, not by oversight: StoreCoordinationProvider and createDefaultCoordinationProvider were renamed in the same sweep but are reachable from NO declared subpath of the published 0.6.0 tarball, so no consumer could hold them — the same reason SubsystemBus is absent from the 0.6 map. Listing them would repeat #1052's over-count.",
3
+ "renames": [
4
+ {
5
+ "from": "SealingKeyProvider",
6
+ "to": "NoydbSealer",
7
+ "kind": "type",
8
+ "package": "@noy-db/hub",
9
+ "safeGlobalReplace": true,
10
+ "section": "at-port",
11
+ "note": "The `at-*` port instance. Published from the root barrel AND @noy-db/hub/cargo in 0.6.0; both keep re-exporting it under the new name."
12
+ },
13
+ {
14
+ "from": "MemorySealingKeyProvider",
15
+ "to": "MemorySealer",
16
+ "kind": "identifier",
17
+ "package": "@noy-db/hub",
18
+ "safeGlobalReplace": true,
19
+ "section": "at-port",
20
+ "note": "The in-memory double an at-* implementor tests against. Follows its interface rather than keeping a suffix the interface no longer has."
21
+ },
22
+ {
23
+ "from": "CoordinationProvider",
24
+ "to": "NoydbMesh",
25
+ "kind": "type",
26
+ "package": "@noy-db/hub",
27
+ "safeGlobalReplace": true,
28
+ "section": "by-port",
29
+ "note": "The `by-*` port instance: who is live, and what generation are they on. Named for the participants rather than the wire — `PeerChannel` is the transport, and a mesh has no head, which the previous name's alternatives (Coordinator, Conductor) implied. Published from @noy-db/hub/cargo in 0.6.0; /cargo keeps re-exporting it under the new name."
30
+ },
31
+ {
32
+ "from": "DeviceSealProvider",
33
+ "to": "NoydbDeviceSeal",
34
+ "kind": "type",
35
+ "package": "@noy-db/hub",
36
+ "safeGlobalReplace": true,
37
+ "section": "at-port",
38
+ "note": "Sibling of NoydbSealer for device-bound sealing. Published from the root barrel and @noy-db/hub/team."
39
+ },
40
+ {
41
+ "from": "MemoryDeviceSealProvider",
42
+ "to": "MemoryDeviceSeal",
43
+ "kind": "identifier",
44
+ "package": "@noy-db/hub",
45
+ "safeGlobalReplace": true,
46
+ "section": "at-port",
47
+ "note": "The in-memory double for NoydbDeviceSeal."
48
+ },
49
+ {
50
+ "from": "envSealingProvider",
51
+ "to": "atEnv",
52
+ "kind": "identifier",
53
+ "package": "@noy-db/at-env",
54
+ "safeGlobalReplace": true,
55
+ "section": "at-port",
56
+ "note": "Factory convention: (prefix)(package)() returns exactly one port instance, matching toMemory()/toFile(). The old name described the return type, which the type already does."
57
+ },
58
+ {
59
+ "from": "EnvSealingProviderOptions",
60
+ "to": "AtEnvOptions",
61
+ "kind": "type",
62
+ "package": "@noy-db/at-env",
63
+ "safeGlobalReplace": true,
64
+ "section": "at-port"
65
+ },
66
+ {
67
+ "from": "awsKmsSealingProvider",
68
+ "to": "atAwsKms",
69
+ "kind": "identifier",
70
+ "package": "@noy-db/at-aws-kms",
71
+ "safeGlobalReplace": true,
72
+ "section": "at-port",
73
+ "note": "awsKmsRecipientSealer is NOT renamed: it returns a RecipientSealer, a different contract from NoydbSealer, so the at<Package>() convention would misdescribe it."
74
+ },
75
+ {
76
+ "from": "gcpKmsSealingProvider",
77
+ "to": "atGcpKms",
78
+ "kind": "identifier",
79
+ "package": "@noy-db/at-gcp-kms",
80
+ "safeGlobalReplace": true,
81
+ "section": "at-port"
82
+ },
83
+ {
84
+ "from": "macosKeychainSealingProvider",
85
+ "to": "atMacosKeychain",
86
+ "kind": "identifier",
87
+ "package": "@noy-db/at-macos-keychain",
88
+ "safeGlobalReplace": true,
89
+ "section": "at-port"
90
+ },
91
+ {
92
+ "from": "azureKeyVaultSealingProvider",
93
+ "to": "atAzureKeyvault",
94
+ "kind": "identifier",
95
+ "package": "@noy-db/at-azure-keyvault",
96
+ "safeGlobalReplace": true,
97
+ "section": "at-port"
98
+ },
99
+ {
100
+ "from": "channelCoordination",
101
+ "to": "channelMesh",
102
+ "kind": "identifier",
103
+ "package": "@noy-db/by-peer",
104
+ "safeGlobalReplace": true,
105
+ "section": "by-port",
106
+ "note": "The transport-agnostic drain-barrier core over any PeerChannel. NOT renamed to byPeer: it is not the (prefix)(package)() factory, it is the shared implementation both by-peer and by-tabs delegate to, and by-tabs would otherwise import a factory named for a package it is not."
107
+ },
108
+ {
109
+ "from": "peerCoordination",
110
+ "to": "byPeer",
111
+ "kind": "identifier",
112
+ "package": "@noy-db/by-peer",
113
+ "safeGlobalReplace": true,
114
+ "section": "by-port",
115
+ "note": "Factory convention: (prefix)(package)() returns exactly one port instance. Still the SAME function object as channelMesh — the identity is asserted by a parity test, so a consumer who switched names has not switched behaviour."
116
+ },
117
+ {
118
+ "from": "tabsCoordination",
119
+ "to": "byTabs",
120
+ "kind": "identifier",
121
+ "package": "@noy-db/by-tabs",
122
+ "safeGlobalReplace": true,
123
+ "section": "by-port"
124
+ },
125
+ {
126
+ "from": "coordinationStrategy",
127
+ "to": "mesh",
128
+ "kind": "option-key",
129
+ "package": "@noy-db/hub",
130
+ "safeGlobalReplace": false,
131
+ "section": "by-port",
132
+ "where": "src/kernel/types.ts",
133
+ "note": "createNoydb({ mesh }) — the exact parallel of the store option, which is the other port instance in the same bag. Tagged @internal in 0.6.0 but reachable from NoydbOptions on the root barrel AND ./pod, and taught by name in noy-db-docs core/2.noydb/6.configuration.md, so it is public by every measure that matters. safeGlobalReplace is false: `mesh` is too short and too ordinary to replace blind."
134
+ },
135
+ {
136
+ "from": "coordination",
137
+ "to": "mesh",
138
+ "kind": "method",
139
+ "package": "@noy-db/hub",
140
+ "safeGlobalReplace": false,
141
+ "section": "by-port",
142
+ "where": "src/kernel/noydb.ts",
143
+ "note": "The `Noydb.coordination` getter — how an external orchestrator (@klum-db/lobby) drives the port through the handle. safeGlobalReplace is false: `coordination` is an ordinary English word and appears as such throughout the family's prose. Measured: zero property accesses in any sibling repo today."
144
+ },
145
+ {
146
+ "from": "ShamirRecoveryProvider",
147
+ "to": "NoydbShamir",
148
+ "kind": "type",
149
+ "package": "@noy-db/hub",
150
+ "safeGlobalReplace": true,
151
+ "section": "on-port",
152
+ "note": "The LAST `Provider`-suffixed port instance on the published surface, and the only `on-*` entry among hub's injected ports — `store`/`sealingKey`/`deviceSeal`/`mesh` are the others. Not renamed to `NoydbRecovery`: the contract is Shamir-specific (`splitToShares`/`combineShares`, k-of-n), so a generic name would over-claim what hub accepts. Its module moved with it: with-party/team/shamir-recovery-provider.ts → noydb-shamir.ts."
153
+ },
154
+ {
155
+ "from": "ShamirRecoveryProvider",
156
+ "to": "NoydbShamir",
157
+ "kind": "type",
158
+ "package": "@noy-db/on-shamir",
159
+ "safeGlobalReplace": true,
160
+ "section": "on-port",
161
+ "note": "on-shamir exports a structural MIRROR of hub's port under its own name, because hub devDepends on this package and a peer edge back is a build cycle — measured: turbo refuses `@noy-db/on-shamir#build, @noy-db/hub#build` outright. Renamed in lockstep and deliberately to the SAME name, so the duplication is legible rather than disguised; hub compiles the two against each other in noydb-shamir-satellite.test-d.ts."
162
+ },
163
+ {
164
+ "from": "toString",
165
+ "to": "asCsv",
166
+ "kind": "identifier",
167
+ "package": "@noy-db/as-csv",
168
+ "safeGlobalReplace": false,
169
+ "section": "as-port",
170
+ "note": "The as-* inversion (ADR 0004). `toString(vault, opts)` becomes `vault.export(asCsv(fmtOpts), { collections })` — hub gates, reads and redacts; the format only encodes. Options SPLIT: eol/columns/columnTypes go to asCsv(), collections/redact to vault.export(). Requires formatsStrategy: withFormats(). safeGlobalReplace is false: `toString` is Object.prototype's method name and appears on every value in the language."
171
+ },
172
+ {
173
+ "from": "fromString",
174
+ "to": "asCsv",
175
+ "kind": "identifier",
176
+ "package": "@noy-db/as-csv",
177
+ "safeGlobalReplace": false,
178
+ "section": "as-port",
179
+ "note": "`fromString(vault, csv, opts)` becomes `vault.import(asCsv(fmtOpts), csv, { collection, policy, idKey })`. The returned ImportPlan is now hub's — same shape, one definition. safeGlobalReplace is false: several as-* packages export a `fromString` and they migrate on their own schedule."
180
+ },
181
+ {
182
+ "from": "AsCSVImportOptions",
183
+ "to": "FormatImportOptions",
184
+ "kind": "type",
185
+ "package": "@noy-db/as-csv",
186
+ "toPackage": "@noy-db/hub/as",
187
+ "safeGlobalReplace": true,
188
+ "section": "as-port",
189
+ "note": "Split across the new boundary: collection/policy/idKey are hub's FormatImportOptions on `/as`; columnTypes is an asCsv() option. `toPackage` records that the target moved REPOSITORIES of ownership — the type is hub's now, not as-csv's, which no other row in either map has needed to say."
190
+ },
191
+ {
192
+ "from": "toString",
193
+ "to": "asSql",
194
+ "kind": "identifier",
195
+ "package": "@noy-db/as-sql",
196
+ "safeGlobalReplace": false,
197
+ "section": "as-port",
198
+ "note": "`toString(vault, opts)` becomes `vault.export(asSql(fmtOpts), { collections, redact })`. EXPORT-ONLY: as-sql declares no decode(), so `vault.import(asSql(), ...)` throws naming the format. ⚠️ Removing an export called `toString` fails SILENTLY at the call site: a bare `toString(x)` resolves to globalThis.toString and returns '[object Undefined]' instead of throwing ReferenceError. Grep for the call, do not rely on a red build."
199
+ },
200
+ {
201
+ "from": "toString",
202
+ "to": "asXml",
203
+ "kind": "identifier",
204
+ "package": "@noy-db/as-xml",
205
+ "safeGlobalReplace": false,
206
+ "section": "as-port",
207
+ "note": "`toString(vault, opts)` becomes `vault.export(asXml(fmtOpts), { collections, redact })`. Options SPLIT: rootElement/recordElement/fields/pretty/xmlDeclaration/namespace/fieldTypes are the format's; collection and redact are hub's. Same silent-removal hazard as as-sql: a bare `toString(x)` resolves to globalThis.toString rather than throwing."
208
+ },
209
+ {
210
+ "from": "fromString",
211
+ "to": "asXml",
212
+ "kind": "identifier",
213
+ "package": "@noy-db/as-xml",
214
+ "safeGlobalReplace": false,
215
+ "section": "as-port",
216
+ "note": "`fromString(vault, xml, opts)` becomes `vault.import(asXml(fmtOpts), xml, { collection, policy, idKey })`."
217
+ },
218
+ {
219
+ "from": "fromString",
220
+ "to": "asJson",
221
+ "kind": "identifier",
222
+ "package": "@noy-db/as-json",
223
+ "safeGlobalReplace": false,
224
+ "section": "as-port",
225
+ "note": "`fromString(vault, json, opts)` becomes `vault.import(asJson(), json, { policy, idKey })`. JSON carries collection names in the payload, so unlike as-csv and as-xml it needs no `{ collection }`. `toString` and `toObject` are NOT removed here — a document is not bytes, so NoydbFormat<string> cannot express toObject, and removing one while keeping the other would be a worse API than keeping both as thin wrappers over vault.export."
226
+ },
227
+ {
228
+ "from": "fromObject",
229
+ "to": "asJson",
230
+ "kind": "identifier",
231
+ "package": "@noy-db/as-json",
232
+ "safeGlobalReplace": false,
233
+ "section": "as-port",
234
+ "note": "`fromObject(vault, doc, opts)` becomes `vault.import(asJson(), JSON.stringify(doc), opts)` — the port takes bytes, so a caller holding a parsed document serialises it first."
235
+ },
236
+ {
237
+ "from": "FenceState",
238
+ "to": "FenceDoc",
239
+ "kind": "type",
240
+ "package": "@noy-db/hub",
241
+ "safeGlobalReplace": false,
242
+ "section": "by-port",
243
+ "note": "A DE-DUPLICATION, not a rename: `./by` declared its own two-field interface that was a hand-copy of the vault's `FenceDoc` (measured mutually assignable under --strict --exactOptionalPropertyTypes), and `./cargo` re-exported that duplicate. Both now name `FenceDoc`; the duplicate is gone. A DIFFERENT type of the same name — the `FenceState` string union on the ROOT barrel — is NOT renamed and must not be rewritten, which is why safeGlobalReplace is false (#1188). Judge by import source: `from '@noy-db/hub/by'` or `/cargo` renames; `from '@noy-db/hub'` does not.",
244
+ "subpaths": [
245
+ "./by",
246
+ "./cargo"
247
+ ]
248
+ }
249
+ ],
250
+ "unretired": [
251
+ "@noy-db/hub/as",
252
+ "@noy-db/hub/at",
253
+ "@noy-db/hub/on",
254
+ "@noy-db/hub/by"
255
+ ],
256
+ "$unretiredComment": "Subpaths this line RE-INTRODUCES after an earlier line retired them. `/by` is the second, on identical grounds: @noy-db/test-mesh-conformance publishes the NoydbMesh contract as an executable suite, and by-peer/by-tabs bind the seam. Re-introducing it also EXPOSED A GAP IN THE 0.4 MAP: that prune removed seven subpaths and recorded five, so `/by` and `/with` had no row until 2026-08-22 — the un-retired guard refuses a path no earlier map says was retired, and it was right. `/at` was removed in 0.4.0 (see codemods/0.4.0-pre.json, kind:'subpath') because it 'had zero importers' — it was a second place to find a type already on the root barrel. It returns now because something stands behind it: @noy-db/test-sealer-conformance publishes the NoydbSealer contract as an executable suite, and the five at-* packages bind the seam. Listing a subpath here is a CLAIM, and codemod-map.test.ts refuses it unless the subpath actually resolves — so this field cannot be used to silence the retired-subpath guard without shipping the seam. Purely additive: the root barrel and /cargo keep exporting everything they did, so a consumer who followed the 0.4 row onto the root barrel is untouched.",
257
+ "version": "0.7.0-pre"
258
+ }
@@ -0,0 +1,20 @@
1
+ import {
2
+ UserApi,
3
+ createUserApi
4
+ } from "./chunk-DBNYPLWY.js";
5
+ import "./chunk-DFAUMLD7.js";
6
+ import "./chunk-2LPVI4PX.js";
7
+ import "./chunk-N4CNVSUF.js";
8
+ import "./chunk-FOG7YEJP.js";
9
+ import "./chunk-KDJGJR7F.js";
10
+ import "./chunk-LKFKXS5K.js";
11
+ import "./chunk-LP7BEXCT.js";
12
+ import "./chunk-W5LHQXZU.js";
13
+ import "./chunk-RK7N4OQ5.js";
14
+ import "./chunk-JBIV4FLR.js";
15
+ import "./chunk-PZ5AY32C.js";
16
+ export {
17
+ UserApi,
18
+ createUserApi
19
+ };
20
+ //# sourceMappingURL=api-EQYRTZO2.js.map
@@ -0,0 +1,146 @@
1
+ import "../chunk-UBSFPGVJ.js";
2
+ import "../chunk-HM4JSXX2.js";
3
+ import {
4
+ applyListProjection
5
+ } from "../chunk-VG2ZSFYD.js";
6
+ import "../chunk-KHKKD62N.js";
7
+ import "../chunk-P6ASQOZR.js";
8
+ import "../chunk-Y2NBBT6K.js";
9
+ import "../chunk-YXA2TCTZ.js";
10
+ import "../chunk-2LPVI4PX.js";
11
+ import "../chunk-N4CNVSUF.js";
12
+ import "../chunk-FOG7YEJP.js";
13
+ import "../chunk-KDJGJR7F.js";
14
+ import "../chunk-LKFKXS5K.js";
15
+ import "../chunk-LP7BEXCT.js";
16
+ import "../chunk-W5LHQXZU.js";
17
+ import "../chunk-RK7N4OQ5.js";
18
+ import {
19
+ ValidationError
20
+ } from "../chunk-JBIV4FLR.js";
21
+ import "../chunk-PZ5AY32C.js";
22
+
23
+ // src/port/as/active.ts
24
+ function redactChunk(chunk, ctx, redact) {
25
+ if (redact === void 0) return chunk;
26
+ const described = ctx.describe(chunk.collection);
27
+ if (!described) {
28
+ throw new Error(
29
+ `vault.export: redaction was requested but '${chunk.collection}' has no description to redact against. Open the collection with its classifiedFields / fieldMeta options first.`
30
+ );
31
+ }
32
+ const opts = redact === true ? void 0 : { sensitivity: redact.sensitivity };
33
+ const records = chunk.records.map(
34
+ (r) => applyListProjection(described, r, opts)
35
+ );
36
+ return { ...chunk, records };
37
+ }
38
+ function contextFor(vault) {
39
+ return {
40
+ // The empty-id guards are NOT defensive padding. The
41
+ // plaintext tier is gated per-format, so a missing id means the calling
42
+ // binding is broken — and without this it would reach the gate, miss the
43
+ // allowlist, and surface as `ExportCapabilityError`: "the owner did not
44
+ // grant this", which sends the reader to the keyring instead of to the
45
+ // format. A loud TypeError names the real fault.
46
+ assertCanExport: (tier, format) => {
47
+ if (tier === "bundle") return vault.assertCanExport("bundle");
48
+ if (!format) throw new TypeError("assertCanExport('plaintext') requires a non-empty format id");
49
+ vault.assertCanExport("plaintext", format);
50
+ },
51
+ assertCanImport: (tier, format) => {
52
+ if (tier === "bundle") return vault.assertCanImport("bundle");
53
+ if (!format) throw new TypeError("assertCanImport('plaintext') requires a non-empty format id");
54
+ vault.assertCanImport("plaintext", format);
55
+ },
56
+ // ⚠️ Filtered HERE, not passed to exportStream — `ExportStreamOptions`
57
+ // has no `collections` field, so the option I first passed was silently
58
+ // dropped and hub read every collection. Caught by an as-json test
59
+ // expecting ['invoices'] and getting ['invoices','payments'].
60
+ //
61
+ // Post-read filtering is correct but not free: hub still DECRYPTS the
62
+ // collections the caller excluded. Pushing the filter down into
63
+ // exportStream is the real fix and is a hub change beyond this port.
64
+ chunks: async function* (collections) {
65
+ const wanted = collections ? new Set(collections) : null;
66
+ for await (const chunk of vault.exportStream({ granularity: "collection" })) {
67
+ if (wanted && !wanted.has(chunk.collection)) continue;
68
+ yield chunk;
69
+ }
70
+ },
71
+ // NOT swallowed. A caller who asked for redaction and silently got
72
+ // unredacted output is the exact failure this port exists to remove — a
73
+ // security duty that fails quiet. If the description cannot be read, the
74
+ // export fails instead.
75
+ describe: (collection) => vault.collection(collection).describe(),
76
+ plan: async (records, policy, formatId, idKey) => {
77
+ const { diffVault } = await import("../vault-diff-FE5J35NJ.js");
78
+ const plan = await diffVault(vault, records, idKey ? { idKey } : {});
79
+ return {
80
+ plan,
81
+ policy,
82
+ // The apply walk every as-* package had independently: added always,
83
+ // modified unless insert-only, deleted only on replace — in one
84
+ // transaction so a partial failure rolls back. Owned once, here.
85
+ apply: async () => {
86
+ await vault.noydb.transaction((tx) => {
87
+ const txVault = tx.vault(vault.name);
88
+ const reason = `import:${formatId}`;
89
+ for (const e of plan.added) {
90
+ txVault.collection(e.collection).put(e.id, e.record, { reason });
91
+ }
92
+ if (policy !== "insert-only") {
93
+ for (const e of plan.modified) {
94
+ txVault.collection(e.collection).put(e.id, e.record, { reason });
95
+ }
96
+ }
97
+ if (policy === "replace") {
98
+ for (const e of plan.deleted) txVault.collection(e.collection).delete(e.id);
99
+ }
100
+ });
101
+ }
102
+ };
103
+ }
104
+ };
105
+ }
106
+ function withFormats() {
107
+ return {
108
+ enabled: true,
109
+ async exportWith(vault, format, options = {}) {
110
+ const ctx = contextFor(vault);
111
+ if (format.tier === "bundle") ctx.assertCanExport("bundle");
112
+ else ctx.assertCanExport("plaintext", format.id);
113
+ const chunks = [];
114
+ for await (const chunk of ctx.chunks(options.collections)) {
115
+ chunks.push(redactChunk(chunk, ctx, options.redact));
116
+ }
117
+ return format.encode(chunks);
118
+ },
119
+ async importWith(vault, format, input, options = {}) {
120
+ const ctx = contextFor(vault);
121
+ if (format.tier === "bundle") ctx.assertCanImport("bundle");
122
+ else ctx.assertCanImport("plaintext", format.id);
123
+ if (!format.decode) {
124
+ throw new ValidationError(
125
+ `vault.import: the '${format.id}' format is export-only \u2014 it declares no decode(). Pick a format that round-trips, or write the records directly.`
126
+ );
127
+ }
128
+ const decoded = await format.decode(input);
129
+ const candidate = {};
130
+ for (const chunk of decoded) {
131
+ const target = chunk.collection || options.collection;
132
+ if (!target) {
133
+ throw new ValidationError(
134
+ `vault.import: the '${format.id}' input names no collection and none was supplied. Pass { collection } for formats whose payload is collection-less.`
135
+ );
136
+ }
137
+ candidate[target] = [...candidate[target] ?? [], ...chunk.records];
138
+ }
139
+ return ctx.plan(candidate, options.policy ?? "merge", format.id, options.idKey);
140
+ }
141
+ };
142
+ }
143
+ export {
144
+ withFormats
145
+ };
146
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/port/as/active.ts"],"sourcesContent":["/**\n * `withFormats()` — the service that consumes the `as-*` port.\n *\n * Everything with a correctness or security consequence lives here rather\n * than in each format: the capability gate, the vault read, and redaction.\n * A {@link NoydbFormat} receives records and returns bytes.\n *\n * That is the whole point of the inversion (ADR 0004). The conformance kit it\n * replaces could only check implementors who ran it; a format that cannot\n * reach a vault is gated whether its author cooperated or not.\n *\n * @module\n */\nimport type { NoydbFormat, ImportPlan } from './types.js'\nimport type {\n FormatsStrategy,\n FormatsContext,\n FormatExportOptions,\n FormatImportOptions,\n} from '../with/formats-strategy.js'\nimport type { ExportChunk } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { ImportPolicy } from './types.js'\nimport { applyListProjection } from '../../with-shape/introspection/index.js'\nimport type { CollectionDescription, ListProjectionOptions } from '../../with-shape/introspection/index.js'\nimport { ValidationError } from '../../kernel/errors.js'\n\n/** Apply the redaction projection hub owns, so a format never asks for it. */\nfunction redactChunk(\n chunk: ExportChunk,\n ctx: FormatsContext,\n redact: FormatExportOptions['redact'],\n): ExportChunk {\n if (redact === undefined) return chunk\n const described = ctx.describe(chunk.collection) as CollectionDescription | undefined\n if (!described) {\n throw new Error(\n `vault.export: redaction was requested but '${chunk.collection}' has no description to redact against. ` +\n 'Open the collection with its classifiedFields / fieldMeta options first.',\n )\n }\n const opts: ListProjectionOptions | undefined =\n redact === true ? undefined : { sensitivity: redact.sensitivity as never }\n const records = chunk.records.map((r) =>\n applyListProjection(described, r as Record<string, unknown>, opts),\n )\n return { ...chunk, records: records as typeof chunk.records }\n}\n\n/**\n * Derive the narrow, format-facing capability from the vault.\n *\n * Lives here rather than on `Vault` because `kernel-surface` said so, and it\n * was right: this is service capability, not spine. The spine keeps two\n * delegating methods and nothing else.\n */\nfunction contextFor(vault: Vault): FormatsContext {\n return {\n // The empty-id guards are NOT defensive padding. The\n // plaintext tier is gated per-format, so a missing id means the calling\n // binding is broken — and without this it would reach the gate, miss the\n // allowlist, and surface as `ExportCapabilityError`: \"the owner did not\n // grant this\", which sends the reader to the keyring instead of to the\n // format. A loud TypeError names the real fault.\n assertCanExport: (tier, format) => {\n if (tier === 'bundle') return vault.assertCanExport('bundle')\n if (!format) throw new TypeError(\"assertCanExport('plaintext') requires a non-empty format id\")\n vault.assertCanExport('plaintext', format)\n },\n assertCanImport: (tier, format) => {\n if (tier === 'bundle') return vault.assertCanImport('bundle')\n if (!format) throw new TypeError(\"assertCanImport('plaintext') requires a non-empty format id\")\n vault.assertCanImport('plaintext', format)\n },\n // ⚠️ Filtered HERE, not passed to exportStream — `ExportStreamOptions`\n // has no `collections` field, so the option I first passed was silently\n // dropped and hub read every collection. Caught by an as-json test\n // expecting ['invoices'] and getting ['invoices','payments'].\n //\n // Post-read filtering is correct but not free: hub still DECRYPTS the\n // collections the caller excluded. Pushing the filter down into\n // exportStream is the real fix and is a hub change beyond this port.\n chunks: async function* (collections) {\n const wanted = collections ? new Set(collections) : null\n for await (const chunk of vault.exportStream({ granularity: 'collection' })) {\n if (wanted && !wanted.has(chunk.collection)) continue\n yield chunk\n }\n },\n // NOT swallowed. A caller who asked for redaction and silently got\n // unredacted output is the exact failure this port exists to remove — a\n // security duty that fails quiet. If the description cannot be read, the\n // export fails instead.\n describe: (collection) => vault.collection(collection).describe() as never,\n plan: async (records, policy: ImportPolicy, formatId: string, idKey?: string) => {\n const { diffVault } = await import('../../with-cargo/vault-diff.js')\n const plan = await diffVault(vault, records as never, idKey ? { idKey } : {})\n return {\n plan,\n policy,\n // The apply walk every as-* package had independently: added always,\n // modified unless insert-only, deleted only on replace — in one\n // transaction so a partial failure rolls back. Owned once, here.\n apply: async () => {\n await vault.noydb.transaction((tx) => {\n const txVault = tx.vault(vault.name)\n const reason = `import:${formatId}`\n for (const e of plan.added) {\n txVault.collection(e.collection).put(e.id, e.record as never, { reason })\n }\n if (policy !== 'insert-only') {\n for (const e of plan.modified) {\n txVault.collection(e.collection).put(e.id, e.record as never, { reason })\n }\n }\n if (policy === 'replace') {\n for (const e of plan.deleted) txVault.collection(e.collection).delete(e.id)\n }\n })\n },\n }\n },\n }\n}\n\n/**\n * Enable `vault.export()` / `vault.import()`.\n *\n * ```ts\n * const db = await createNoydb({ store, user, secret, formatsStrategy: withFormats() })\n * const csv = await vault.export(asCsv(), { collections: ['invoices'] })\n * ```\n */\nexport function withFormats(): FormatsStrategy {\n return {\n enabled: true,\n\n async exportWith<Out extends string | Uint8Array>(\n vault: Vault,\n format: NoydbFormat<Out>,\n options: FormatExportOptions = {},\n ): Promise<Out> {\n const ctx = contextFor(vault)\n // FIRST, and before a single record is read. The format is not in scope\n // yet and could not reach the vault if it were.\n if (format.tier === 'bundle') ctx.assertCanExport('bundle')\n else ctx.assertCanExport('plaintext', format.id)\n\n const chunks: ExportChunk[] = []\n for await (const chunk of ctx.chunks(options.collections)) {\n chunks.push(redactChunk(chunk, ctx, options.redact))\n }\n return format.encode(chunks)\n },\n\n async importWith<Out extends string | Uint8Array>(\n vault: Vault,\n format: NoydbFormat<Out>,\n input: Out,\n options: FormatImportOptions = {},\n ): Promise<ImportPlan> {\n const ctx = contextFor(vault)\n // Mirrors the export side: the import gate is two-tier as well, and a\n // bundle format importing under the plaintext tier would be a silent\n // downgrade in the other direction.\n if (format.tier === 'bundle') ctx.assertCanImport('bundle')\n else ctx.assertCanImport('plaintext', format.id)\n if (!format.decode) {\n throw new ValidationError(\n `vault.import: the '${format.id}' format is export-only — it declares no decode(). ` +\n 'Pick a format that round-trips, or write the records directly.',\n )\n }\n const decoded = await format.decode(input)\n const candidate: Record<string, readonly unknown[]> = {}\n for (const chunk of decoded) {\n const target = chunk.collection || options.collection\n if (!target) {\n throw new ValidationError(\n `vault.import: the '${format.id}' input names no collection and none was supplied. ` +\n 'Pass { collection } for formats whose payload is collection-less.',\n )\n }\n candidate[target] = [...(candidate[target] ?? []), ...chunk.records]\n }\n return ctx.plan(candidate, options.policy ?? 'merge', format.id, options.idKey)\n },\n }\n}\n"],"mappings":"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","names":[]}
@@ -0,0 +1,23 @@
1
+ import {
2
+ MemoryRecipientSealer,
3
+ MemorySealer,
4
+ SEALED_SECRET_RECORD_ID,
5
+ parseSealedEnvelope
6
+ } from "../chunk-Z2WK53N6.js";
7
+ import "../chunk-2LPVI4PX.js";
8
+ import "../chunk-N4CNVSUF.js";
9
+ import "../chunk-FOG7YEJP.js";
10
+ import "../chunk-KDJGJR7F.js";
11
+ import "../chunk-LKFKXS5K.js";
12
+ import "../chunk-LP7BEXCT.js";
13
+ import "../chunk-W5LHQXZU.js";
14
+ import "../chunk-RK7N4OQ5.js";
15
+ import "../chunk-JBIV4FLR.js";
16
+ import "../chunk-PZ5AY32C.js";
17
+ export {
18
+ MemoryRecipientSealer,
19
+ MemorySealer,
20
+ SEALED_SECRET_RECORD_ID,
21
+ parseSealedEnvelope
22
+ };
23
+ //# sourceMappingURL=index.js.map