@noy-db/hub 0.2.0-pre.21 → 0.2.0-pre.24

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 (285) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.d.cts +3 -3
  3. package/dist/aggregate/index.d.ts +3 -3
  4. package/dist/aggregate/index.js +5 -5
  5. package/dist/attestation/index.cjs.map +1 -1
  6. package/dist/attestation/index.d.cts +4 -4
  7. package/dist/attestation/index.d.ts +4 -4
  8. package/dist/attestation/index.js +6 -6
  9. package/dist/blobs/index.cjs.map +1 -1
  10. package/dist/blobs/index.d.cts +6 -6
  11. package/dist/blobs/index.d.ts +6 -6
  12. package/dist/blobs/index.js +6 -6
  13. package/dist/bundle/index.cjs +21173 -21341
  14. package/dist/bundle/index.cjs.map +1 -1
  15. package/dist/bundle/index.d.cts +15 -6
  16. package/dist/bundle/index.d.ts +15 -6
  17. package/dist/bundle/index.js +58 -193
  18. package/dist/bundle/index.js.map +1 -1
  19. package/dist/{chunk-CQYEDODS.js → chunk-35U5YNRR.js} +3 -3
  20. package/dist/{chunk-NV4IHBZS.js → chunk-3XJU3OHE.js} +5 -5
  21. package/dist/{chunk-OTWT6BAJ.js → chunk-4BB4T3O7.js} +12 -2
  22. package/dist/chunk-4BB4T3O7.js.map +1 -0
  23. package/dist/{chunk-IVZWHIEK.js → chunk-4HEGG5NJ.js} +5 -5
  24. package/dist/{chunk-WE2BUQD2.js → chunk-4TCMCCC3.js} +5 -3
  25. package/dist/{chunk-5YTXYPES.js → chunk-5A2FVGHT.js} +5 -5
  26. package/dist/{chunk-NSXNXLYM.js → chunk-5GZC2ZM3.js} +2 -2
  27. package/dist/{chunk-JYNH4FIM.js → chunk-77WF53XY.js} +4 -4
  28. package/dist/{chunk-O5XKZCUD.js → chunk-7X4EF35A.js} +5 -5
  29. package/dist/{chunk-SQKAECUL.js → chunk-7ZCTUI26.js} +2 -2
  30. package/dist/{chunk-J6RGRZOY.js → chunk-AO3QSMCU.js} +2 -2
  31. package/dist/{chunk-JDCPRJVS.js → chunk-AONK5GCC.js} +4 -4
  32. package/dist/{chunk-FRRJIUSI.js → chunk-B5CSNGSE.js} +17 -9
  33. package/dist/chunk-B5CSNGSE.js.map +1 -0
  34. package/dist/{chunk-IY24WS2P.js → chunk-BCMHJYVT.js} +4 -4
  35. package/dist/{chunk-IY24WS2P.js.map → chunk-BCMHJYVT.js.map} +1 -1
  36. package/dist/{chunk-TYMDCIQM.js → chunk-C472BRJ4.js} +4 -4
  37. package/dist/{chunk-MBXKRHSS.js → chunk-CCNRFAL3.js} +2 -2
  38. package/dist/{chunk-BZW5IL43.js → chunk-DCA2BDHA.js} +4 -4
  39. package/dist/{chunk-JBBWALNI.js → chunk-DCICHSRS.js} +2 -2
  40. package/dist/{chunk-2XA2ZML4.js → chunk-FG6IQ3ZL.js} +3 -3
  41. package/dist/{chunk-C2RJVZZL.js → chunk-G4GW5VOS.js} +2 -2
  42. package/dist/{chunk-U2XSUCDF.js → chunk-GEWIFM4J.js} +2 -2
  43. package/dist/{chunk-TNH5SLCD.js → chunk-HD4QCT2O.js} +2 -2
  44. package/dist/{chunk-I3IYTUUI.js → chunk-HHJ5DZCZ.js} +3 -3
  45. package/dist/{chunk-6QAZ5O6X.js → chunk-IEIADIPM.js} +2 -2
  46. package/dist/{chunk-YPIOFSN3.js → chunk-IHAISFXP.js} +2 -2
  47. package/dist/{chunk-GJTKMME7.js → chunk-JKM2AVVH.js} +2 -2
  48. package/dist/{chunk-EYK72OTL.js → chunk-JRMOSIH4.js} +5 -5
  49. package/dist/chunk-JRMOSIH4.js.map +1 -0
  50. package/dist/{chunk-S45MDEEF.js → chunk-LMWVNF6X.js} +2 -2
  51. package/dist/{chunk-TA6HPKWQ.js → chunk-LR7CODVN.js} +1 -1
  52. package/dist/chunk-LR7CODVN.js.map +1 -0
  53. package/dist/{chunk-TAMRU7A2.js → chunk-OKV7S356.js} +4 -4
  54. package/dist/{chunk-HYJMAV53.js → chunk-OWAMTSAI.js} +93 -93
  55. package/dist/chunk-OWAMTSAI.js.map +1 -0
  56. package/dist/{chunk-IW4L4X65.js → chunk-P5A4E53B.js} +2 -2
  57. package/dist/{chunk-JOK73NDT.js → chunk-P7OL22JP.js} +3 -3
  58. package/dist/{chunk-7PH4OPBZ.js → chunk-QOXZM3L2.js} +762 -134
  59. package/dist/chunk-QOXZM3L2.js.map +1 -0
  60. package/dist/chunk-R43KS34V.js +399 -0
  61. package/dist/chunk-R43KS34V.js.map +1 -0
  62. package/dist/{chunk-TGIJTNM3.js → chunk-R5ZECURV.js} +2 -2
  63. package/dist/{chunk-KOAJ3TZM.js → chunk-RFEXGW3L.js} +2 -2
  64. package/dist/{chunk-F5ILTHMU.js → chunk-RNQPDV75.js} +5 -5
  65. package/dist/{chunk-WWVJXBOT.js → chunk-SGM7CK7R.js} +5 -5
  66. package/dist/{chunk-7MRT7EPB.js → chunk-SOQE5DUV.js} +3 -3
  67. package/dist/{chunk-F5GWNSE2.js → chunk-TOMSCJRV.js} +3 -3
  68. package/dist/{chunk-F5GWNSE2.js.map → chunk-TOMSCJRV.js.map} +1 -1
  69. package/dist/{chunk-ZONKSLF2.js → chunk-TQMQZOMX.js} +2 -2
  70. package/dist/{chunk-3HNKR65T.js → chunk-U6LTLN7O.js} +3 -3
  71. package/dist/{chunk-UU6M64HI.js → chunk-UAK2AMO2.js} +4 -4
  72. package/dist/{chunk-37VGJM3T.js → chunk-WQ3KAGOV.js} +2 -2
  73. package/dist/{chunk-C6W5KVDV.js → chunk-XC32SZPW.js} +35 -35
  74. package/dist/chunk-XC32SZPW.js.map +1 -0
  75. package/dist/{chunk-AI4USDRI.js → chunk-XQO4TAJS.js} +4 -4
  76. package/dist/{chunk-SQOK5UM6.js → chunk-ZBENTRFS.js} +2 -2
  77. package/dist/{chunk-6QE4DUYC.js → chunk-ZDITTESU.js} +2 -2
  78. package/dist/consent/index.cjs.map +1 -1
  79. package/dist/consent/index.d.cts +5 -5
  80. package/dist/consent/index.d.ts +5 -5
  81. package/dist/consent/index.js +3 -3
  82. package/dist/{crypto-456N7UVX.js → crypto-2LU6XUFF.js} +3 -3
  83. package/dist/{delegation-DP4COTXB.js → delegation-6ABSJGXV.js} +5 -5
  84. package/dist/derivations/index.cjs.map +1 -1
  85. package/dist/derivations/index.d.cts +6 -6
  86. package/dist/derivations/index.d.ts +6 -6
  87. package/dist/derivations/index.js +4 -4
  88. package/dist/{dev-unlock-CpKSkl2c.d.ts → dev-unlock-BlhRHr6p.d.ts} +1 -1
  89. package/dist/{dev-unlock-CY0HIZA0.d.cts → dev-unlock-DURe4IvF.d.cts} +1 -1
  90. package/dist/{errors-Dkc_fi-S.d.cts → errors-B2tUcRPg.d.cts} +19 -5
  91. package/dist/{errors-Dkc_fi-S.d.ts → errors-B2tUcRPg.d.ts} +19 -5
  92. package/dist/executor-JKMSEB34.js +8 -0
  93. package/dist/executor-UYXSQB4D.js +12 -0
  94. package/dist/executor-VJSCTBWY.js +8 -0
  95. package/dist/{fanout-sidecar-YXNAEZ33.js → fanout-sidecar-ZQT4Y7PF.js} +2 -2
  96. package/dist/forget/index.js +4 -4
  97. package/dist/guards/index.cjs.map +1 -1
  98. package/dist/guards/index.d.cts +6 -6
  99. package/dist/guards/index.d.ts +6 -6
  100. package/dist/guards/index.js +6 -6
  101. package/dist/{hash-BSd0-_L8.d.cts → hash-CqRZfDZH.d.cts} +1 -1
  102. package/dist/{hash-BnBQx39y.d.ts → hash-cF4iWaBV.d.ts} +1 -1
  103. package/dist/history/index.cjs.map +1 -1
  104. package/dist/history/index.d.cts +6 -6
  105. package/dist/history/index.d.ts +6 -6
  106. package/dist/history/index.js +5 -5
  107. package/dist/i18n/index.cjs.map +1 -1
  108. package/dist/i18n/index.d.cts +5 -5
  109. package/dist/i18n/index.d.ts +5 -5
  110. package/dist/i18n/index.js +6 -6
  111. package/dist/index-B8MoIS7B.d.ts +70 -0
  112. package/dist/{index-Bm9hIY7t.d.ts → index-BLff_E35.d.ts} +2 -2
  113. package/dist/{index-tZqVB9g5.d.cts → index-BthnP2MA.d.cts} +2 -2
  114. package/dist/index-da0M3NnR.d.cts +70 -0
  115. package/dist/index.cjs +25861 -25119
  116. package/dist/index.cjs.map +1 -1
  117. package/dist/index.d.cts +135 -80
  118. package/dist/index.d.ts +135 -80
  119. package/dist/index.js +93 -52
  120. package/dist/index.js.map +1 -1
  121. package/dist/indexing/index.cjs.map +1 -1
  122. package/dist/indexing/index.js +4 -4
  123. package/dist/issue-KLRMW5DH.js +12 -0
  124. package/dist/kernel/index.cjs +657 -0
  125. package/dist/kernel/index.cjs.map +1 -0
  126. package/dist/kernel/index.d.cts +11 -0
  127. package/dist/kernel/index.d.ts +11 -0
  128. package/dist/kernel/index.js +40 -0
  129. package/dist/{ledger-I7JUYP4L.js → ledger-VOS2X3WJ.js} +5 -5
  130. package/dist/materialized-views/index.cjs.map +1 -1
  131. package/dist/materialized-views/index.d.cts +6 -6
  132. package/dist/materialized-views/index.d.ts +6 -6
  133. package/dist/materialized-views/index.js +8 -8
  134. package/dist/{mime-magic-CjSyakO4.d.ts → mime-magic-BswIvWkR.d.ts} +1 -1
  135. package/dist/{mime-magic-BnJCGJzB.d.cts → mime-magic-CCrP-iXJ.d.cts} +1 -1
  136. package/dist/{ulid-B2L_aqVA.d.ts → multi-bundle-6s5nKAZX.d.ts} +114 -58
  137. package/dist/{ulid-LaxfH2tK.d.cts → multi-bundle-WhYiJEgV.d.cts} +114 -58
  138. package/dist/noydb-2PI2ZBX6.js +38 -0
  139. package/dist/overlay-views/index.cjs.map +1 -1
  140. package/dist/overlay-views/index.d.cts +6 -6
  141. package/dist/overlay-views/index.d.ts +6 -6
  142. package/dist/overlay-views/index.js +4 -4
  143. package/dist/periods/index.cjs.map +1 -1
  144. package/dist/periods/index.d.cts +5 -5
  145. package/dist/periods/index.d.ts +5 -5
  146. package/dist/periods/index.js +5 -5
  147. package/dist/{public-envelope-5XRTUNKF.js → public-envelope-IJJMWSTJ.js} +4 -4
  148. package/dist/query/index.cjs.map +1 -1
  149. package/dist/query/index.d.cts +3 -3
  150. package/dist/query/index.d.ts +3 -3
  151. package/dist/query/index.js +7 -7
  152. package/dist/registry-GAIFVWXF.js +8 -0
  153. package/dist/registry-J77ZUQ7G.js +8 -0
  154. package/dist/{registry-NWHOLD5M.js → registry-JGEVJ6YC.js} +3 -3
  155. package/dist/{revoke-5IEK22KT.js → revoke-WUY4AYRJ.js} +6 -6
  156. package/dist/sealed-record/index.cjs.map +1 -1
  157. package/dist/sealed-record/index.d.cts +1 -1
  158. package/dist/sealed-record/index.d.ts +1 -1
  159. package/dist/sealed-record/index.js +2 -2
  160. package/dist/session/index.cjs.map +1 -1
  161. package/dist/session/index.d.cts +6 -6
  162. package/dist/session/index.d.ts +6 -6
  163. package/dist/session/index.js +3 -3
  164. package/dist/shadow/index.cjs.map +1 -1
  165. package/dist/shadow/index.d.cts +5 -5
  166. package/dist/shadow/index.d.ts +5 -5
  167. package/dist/shadow/index.js +2 -2
  168. package/dist/{signer-I6YARZQA.js → signer-UJF3CFDC.js} +5 -5
  169. package/dist/snapshots/index.cjs.map +1 -1
  170. package/dist/snapshots/index.d.cts +5 -5
  171. package/dist/snapshots/index.d.ts +5 -5
  172. package/dist/snapshots/index.js +4 -4
  173. package/dist/{stale-CPESGAPL.js → stale-PW6VBGSP.js} +2 -2
  174. package/dist/store/index.cjs.map +1 -1
  175. package/dist/store/index.d.cts +5 -5
  176. package/dist/store/index.d.ts +5 -5
  177. package/dist/store/index.js +2 -2
  178. package/dist/{strategy-WtB-jXYv.d.cts → strategy-BWmgRPA2.d.cts} +1 -1
  179. package/dist/{strategy-54eIwox5.d.ts → strategy-D47TC5X6.d.ts} +1 -1
  180. package/dist/sync/index.cjs.map +1 -1
  181. package/dist/sync/index.d.cts +4 -4
  182. package/dist/sync/index.d.ts +4 -4
  183. package/dist/sync/index.js +4 -4
  184. package/dist/team/index.cjs +10 -3
  185. package/dist/team/index.cjs.map +1 -1
  186. package/dist/team/index.d.cts +5 -5
  187. package/dist/team/index.d.ts +5 -5
  188. package/dist/team/index.js +8 -8
  189. package/dist/{transition-guard-Dmpqzg-_.d.cts → transition-guard-C3NxfVKk.d.cts} +1 -1
  190. package/dist/{transition-guard-D4bfIAiW.d.ts → transition-guard-CQH5263l.d.ts} +1 -1
  191. package/dist/tx/index.cjs +1 -1
  192. package/dist/tx/index.cjs.map +1 -1
  193. package/dist/tx/index.d.cts +5 -5
  194. package/dist/tx/index.d.ts +5 -5
  195. package/dist/tx/index.js +3 -3
  196. package/dist/{types-DLfWFr6U.d.ts → types-BGRX6sPT.d.ts} +546 -580
  197. package/dist/{types-DyOI6XZ_.d.cts → types-COQ6qJZh.d.cts} +546 -580
  198. package/dist/ulid-DRH25k3y.d.cts +66 -0
  199. package/dist/ulid-DRH25k3y.d.ts +66 -0
  200. package/dist/util/index.cjs.map +1 -1
  201. package/dist/util/index.js +1 -1
  202. package/dist/{with-materialized-view-DNULSxoP.d.ts → with-materialized-view-Cj-6fuav.d.ts} +1 -1
  203. package/dist/{with-materialized-view-CeZYGJVf.d.cts → with-materialized-view-D4U-KrBH.d.cts} +1 -1
  204. package/dist/{with-overlayed-view-kdcPGHih.d.cts → with-overlayed-view-BKjdUPRx.d.cts} +1 -1
  205. package/dist/{with-overlayed-view-C9joG7UZ.d.ts → with-overlayed-view-COp_7EEy.d.ts} +1 -1
  206. package/dist/{with-rollup-DJDbrxjf.d.ts → with-rollup-B1_ZjG02.d.ts} +1 -1
  207. package/dist/{with-rollup-s58XAeWO.d.cts → with-rollup-C-Bok_o2.d.cts} +1 -1
  208. package/package.json +13 -3
  209. package/dist/chunk-7PH4OPBZ.js.map +0 -1
  210. package/dist/chunk-C6W5KVDV.js.map +0 -1
  211. package/dist/chunk-EYK72OTL.js.map +0 -1
  212. package/dist/chunk-FRRJIUSI.js.map +0 -1
  213. package/dist/chunk-HYJMAV53.js.map +0 -1
  214. package/dist/chunk-JTI57WRT.js +0 -164
  215. package/dist/chunk-JTI57WRT.js.map +0 -1
  216. package/dist/chunk-OTWT6BAJ.js.map +0 -1
  217. package/dist/chunk-TA6HPKWQ.js.map +0 -1
  218. package/dist/chunk-ZC7J6ZYV.js +0 -7
  219. package/dist/chunk-ZC7J6ZYV.js.map +0 -1
  220. package/dist/executor-4IEW4KG5.js +0 -8
  221. package/dist/executor-KYJCJCIN.js +0 -12
  222. package/dist/executor-W7VIBOBZ.js +0 -8
  223. package/dist/issue-JXC6T2QR.js +0 -12
  224. package/dist/noydb-ZZCRF6TE.js +0 -38
  225. package/dist/registry-ATRHOG5B.js +0 -8
  226. package/dist/registry-LEHB26TY.js +0 -8
  227. package/dist/state-vault-JR3CFGNP.js +0 -14
  228. package/dist/vault-group-BB246VIM.js +0 -804
  229. package/dist/vault-group-BB246VIM.js.map +0 -1
  230. /package/dist/{chunk-CQYEDODS.js.map → chunk-35U5YNRR.js.map} +0 -0
  231. /package/dist/{chunk-NV4IHBZS.js.map → chunk-3XJU3OHE.js.map} +0 -0
  232. /package/dist/{chunk-IVZWHIEK.js.map → chunk-4HEGG5NJ.js.map} +0 -0
  233. /package/dist/{chunk-WE2BUQD2.js.map → chunk-4TCMCCC3.js.map} +0 -0
  234. /package/dist/{chunk-5YTXYPES.js.map → chunk-5A2FVGHT.js.map} +0 -0
  235. /package/dist/{chunk-NSXNXLYM.js.map → chunk-5GZC2ZM3.js.map} +0 -0
  236. /package/dist/{chunk-JYNH4FIM.js.map → chunk-77WF53XY.js.map} +0 -0
  237. /package/dist/{chunk-O5XKZCUD.js.map → chunk-7X4EF35A.js.map} +0 -0
  238. /package/dist/{chunk-SQKAECUL.js.map → chunk-7ZCTUI26.js.map} +0 -0
  239. /package/dist/{chunk-J6RGRZOY.js.map → chunk-AO3QSMCU.js.map} +0 -0
  240. /package/dist/{chunk-JDCPRJVS.js.map → chunk-AONK5GCC.js.map} +0 -0
  241. /package/dist/{chunk-TYMDCIQM.js.map → chunk-C472BRJ4.js.map} +0 -0
  242. /package/dist/{chunk-MBXKRHSS.js.map → chunk-CCNRFAL3.js.map} +0 -0
  243. /package/dist/{chunk-BZW5IL43.js.map → chunk-DCA2BDHA.js.map} +0 -0
  244. /package/dist/{chunk-JBBWALNI.js.map → chunk-DCICHSRS.js.map} +0 -0
  245. /package/dist/{chunk-2XA2ZML4.js.map → chunk-FG6IQ3ZL.js.map} +0 -0
  246. /package/dist/{chunk-C2RJVZZL.js.map → chunk-G4GW5VOS.js.map} +0 -0
  247. /package/dist/{chunk-U2XSUCDF.js.map → chunk-GEWIFM4J.js.map} +0 -0
  248. /package/dist/{chunk-TNH5SLCD.js.map → chunk-HD4QCT2O.js.map} +0 -0
  249. /package/dist/{chunk-I3IYTUUI.js.map → chunk-HHJ5DZCZ.js.map} +0 -0
  250. /package/dist/{chunk-6QAZ5O6X.js.map → chunk-IEIADIPM.js.map} +0 -0
  251. /package/dist/{chunk-YPIOFSN3.js.map → chunk-IHAISFXP.js.map} +0 -0
  252. /package/dist/{chunk-GJTKMME7.js.map → chunk-JKM2AVVH.js.map} +0 -0
  253. /package/dist/{chunk-S45MDEEF.js.map → chunk-LMWVNF6X.js.map} +0 -0
  254. /package/dist/{chunk-TAMRU7A2.js.map → chunk-OKV7S356.js.map} +0 -0
  255. /package/dist/{chunk-IW4L4X65.js.map → chunk-P5A4E53B.js.map} +0 -0
  256. /package/dist/{chunk-JOK73NDT.js.map → chunk-P7OL22JP.js.map} +0 -0
  257. /package/dist/{chunk-TGIJTNM3.js.map → chunk-R5ZECURV.js.map} +0 -0
  258. /package/dist/{chunk-KOAJ3TZM.js.map → chunk-RFEXGW3L.js.map} +0 -0
  259. /package/dist/{chunk-F5ILTHMU.js.map → chunk-RNQPDV75.js.map} +0 -0
  260. /package/dist/{chunk-WWVJXBOT.js.map → chunk-SGM7CK7R.js.map} +0 -0
  261. /package/dist/{chunk-7MRT7EPB.js.map → chunk-SOQE5DUV.js.map} +0 -0
  262. /package/dist/{chunk-ZONKSLF2.js.map → chunk-TQMQZOMX.js.map} +0 -0
  263. /package/dist/{chunk-3HNKR65T.js.map → chunk-U6LTLN7O.js.map} +0 -0
  264. /package/dist/{chunk-UU6M64HI.js.map → chunk-UAK2AMO2.js.map} +0 -0
  265. /package/dist/{chunk-37VGJM3T.js.map → chunk-WQ3KAGOV.js.map} +0 -0
  266. /package/dist/{chunk-AI4USDRI.js.map → chunk-XQO4TAJS.js.map} +0 -0
  267. /package/dist/{chunk-SQOK5UM6.js.map → chunk-ZBENTRFS.js.map} +0 -0
  268. /package/dist/{chunk-6QE4DUYC.js.map → chunk-ZDITTESU.js.map} +0 -0
  269. /package/dist/{crypto-456N7UVX.js.map → crypto-2LU6XUFF.js.map} +0 -0
  270. /package/dist/{delegation-DP4COTXB.js.map → delegation-6ABSJGXV.js.map} +0 -0
  271. /package/dist/{executor-4IEW4KG5.js.map → executor-JKMSEB34.js.map} +0 -0
  272. /package/dist/{executor-KYJCJCIN.js.map → executor-UYXSQB4D.js.map} +0 -0
  273. /package/dist/{executor-W7VIBOBZ.js.map → executor-VJSCTBWY.js.map} +0 -0
  274. /package/dist/{fanout-sidecar-YXNAEZ33.js.map → fanout-sidecar-ZQT4Y7PF.js.map} +0 -0
  275. /package/dist/{issue-JXC6T2QR.js.map → issue-KLRMW5DH.js.map} +0 -0
  276. /package/dist/{ledger-I7JUYP4L.js.map → kernel/index.js.map} +0 -0
  277. /package/dist/{noydb-ZZCRF6TE.js.map → ledger-VOS2X3WJ.js.map} +0 -0
  278. /package/dist/{public-envelope-5XRTUNKF.js.map → noydb-2PI2ZBX6.js.map} +0 -0
  279. /package/dist/{registry-ATRHOG5B.js.map → public-envelope-IJJMWSTJ.js.map} +0 -0
  280. /package/dist/{registry-LEHB26TY.js.map → registry-GAIFVWXF.js.map} +0 -0
  281. /package/dist/{registry-NWHOLD5M.js.map → registry-J77ZUQ7G.js.map} +0 -0
  282. /package/dist/{revoke-5IEK22KT.js.map → registry-JGEVJ6YC.js.map} +0 -0
  283. /package/dist/{signer-I6YARZQA.js.map → revoke-WUY4AYRJ.js.map} +0 -0
  284. /package/dist/{stale-CPESGAPL.js.map → signer-UJF3CFDC.js.map} +0 -0
  285. /package/dist/{state-vault-JR3CFGNP.js.map → stale-PW6VBGSP.js.map} +0 -0
@@ -1,13 +1,14 @@
1
- import { T as TransferSealPayload } from '../ulid-LaxfH2tK.cjs';
2
- export { C as COMPRESSION_BROTLI, a as COMPRESSION_GZIP, b as COMPRESSION_NONE, c as CompressionAlgo, F as FLAG_COMPRESSED, d as FLAG_HAS_INTEGRITY_HASH, N as NOYDB_BUNDLE_FORMAT_VERSION, e as NOYDB_BUNDLE_MAGIC, f as NOYDB_BUNDLE_PREFIX_BYTES, g as NoydbBundleHeader, h as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, i as encodeBundleHeader, j as generateULID, k as isULID, r as readNoydbBundle, l as readNoydbBundleHeader, m as resetBrotliSupportCache, v as validateBundleHeader, w as writeNoydbBundle } from '../ulid-LaxfH2tK.cjs';
3
- import { bh as Vault, aW as NoydbStore, bd as SealingKeyProvider, bi as RecoveryEnrollmentInput, bj as ShamirRecoveryProvider } from '../types-DyOI6XZ_.cjs';
4
- export { t as AdoptionStateError, B as BackupCorruptedError, u as BackupLedgerError, v as BundleIntegrityError, w as BundleSealMismatchError, x as BundleVersionConflictError, P as PartitionExtractionError, y as TransferSealError } from '../errors-Dkc_fi-S.cjs';
1
+ import { T as TransferSealPayload } from '../multi-bundle-WhYiJEgV.cjs';
2
+ export { C as COMPRESSION_BROTLI, a as COMPRESSION_GZIP, b as COMPRESSION_NONE, c as CompartmentManifest, d as CompressionAlgo, D as DecryptedRecord, F as FLAG_COMPRESSED, e as FLAG_HAS_INTEGRITY_HASH, M as MultiBundleManifest, f as MultiVaultCompartmentInput, N as NOYDB_BUNDLE_FORMAT_VERSION, g as NOYDB_BUNDLE_MAGIC, h as NOYDB_BUNDLE_PREFIX_BYTES, i as NOYDB_MULTI_BUNDLE_MAGIC, j as NOYDB_MULTI_BUNDLE_PREFIX_BYTES, k as NOYDB_MULTI_BUNDLE_VERSION, l as NoydbBundleHeader, m as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, n as decodeMultiBundle, o as decryptExtractedPartition, p as encodeBundleHeader, q as encodeMultiBundle, r as readMultiVaultBundleCompartment, s as readNoydbBundle, t as readNoydbBundleHeader, u as readNoydbBundleManifest, v as resetBrotliSupportCache, w as validateBundleHeader, x as writeMultiVaultBundle, y as writeNoydbBundle } from '../multi-bundle-WhYiJEgV.cjs';
3
+ export { g as generateULID, i as isULID } from '../ulid-DRH25k3y.cjs';
4
+ import { bc as Vault, aW as NoydbStore, bd as SealingKeyProvider, be as RecoveryEnrollmentInput, bf as ShamirRecoveryProvider } from '../types-COQ6qJZh.cjs';
5
+ export { t as AdoptionStateError, B as BackupCorruptedError, u as BackupLedgerError, v as BundleIntegrityError, w as BundleSealMismatchError, x as BundleVersionConflictError, P as PartitionExtractionError, y as TransferSealError } from '../errors-B2tUcRPg.cjs';
5
6
  import '../lazy-builder-eYZzLEL1.cjs';
6
7
  import '../predicate-BmhBSPCH.cjs';
7
- import '../strategy-WtB-jXYv.cjs';
8
+ import '../strategy-BWmgRPA2.cjs';
8
9
  import '../strategy-BSxFXGzb.cjs';
9
10
  import '../index-BMmajblo.cjs';
10
- import '../index-tZqVB9g5.cjs';
11
+ import '../index-BthnP2MA.cjs';
11
12
  import '@noy-db/attestation';
12
13
 
13
14
  /**
@@ -106,6 +107,14 @@ declare function extractPartition(vault: Vault, opts: WalkClosureOptions & {
106
107
  readonly compression?: 'auto' | 'brotli' | 'gzip' | 'none';
107
108
  readonly carrySchemas?: boolean;
108
109
  readonly carryLedger?: boolean;
110
+ /**
111
+ * FR-7 structural field projection: per-collection allow-list of fields
112
+ * to keep. Non-listed fields are dropped from each record BEFORE
113
+ * re-encryption (so they never travel in the bundle); `id` is always
114
+ * preserved. A projected collection's persisted schema is NOT carried.
115
+ * Absent/empty → un-projected behavior (byte-identical to today).
116
+ */
117
+ readonly fieldProjection?: Record<string, readonly string[]>;
109
118
  }): Promise<ExtractPartitionResult>;
110
119
 
111
120
  /**
@@ -1,13 +1,14 @@
1
- import { T as TransferSealPayload } from '../ulid-B2L_aqVA.js';
2
- export { C as COMPRESSION_BROTLI, a as COMPRESSION_GZIP, b as COMPRESSION_NONE, c as CompressionAlgo, F as FLAG_COMPRESSED, d as FLAG_HAS_INTEGRITY_HASH, N as NOYDB_BUNDLE_FORMAT_VERSION, e as NOYDB_BUNDLE_MAGIC, f as NOYDB_BUNDLE_PREFIX_BYTES, g as NoydbBundleHeader, h as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, i as encodeBundleHeader, j as generateULID, k as isULID, r as readNoydbBundle, l as readNoydbBundleHeader, m as resetBrotliSupportCache, v as validateBundleHeader, w as writeNoydbBundle } from '../ulid-B2L_aqVA.js';
3
- import { bh as Vault, aW as NoydbStore, bd as SealingKeyProvider, bi as RecoveryEnrollmentInput, bj as ShamirRecoveryProvider } from '../types-DLfWFr6U.js';
4
- export { t as AdoptionStateError, B as BackupCorruptedError, u as BackupLedgerError, v as BundleIntegrityError, w as BundleSealMismatchError, x as BundleVersionConflictError, P as PartitionExtractionError, y as TransferSealError } from '../errors-Dkc_fi-S.js';
1
+ import { T as TransferSealPayload } from '../multi-bundle-6s5nKAZX.js';
2
+ export { C as COMPRESSION_BROTLI, a as COMPRESSION_GZIP, b as COMPRESSION_NONE, c as CompartmentManifest, d as CompressionAlgo, D as DecryptedRecord, F as FLAG_COMPRESSED, e as FLAG_HAS_INTEGRITY_HASH, M as MultiBundleManifest, f as MultiVaultCompartmentInput, N as NOYDB_BUNDLE_FORMAT_VERSION, g as NOYDB_BUNDLE_MAGIC, h as NOYDB_BUNDLE_PREFIX_BYTES, i as NOYDB_MULTI_BUNDLE_MAGIC, j as NOYDB_MULTI_BUNDLE_PREFIX_BYTES, k as NOYDB_MULTI_BUNDLE_VERSION, l as NoydbBundleHeader, m as NoydbBundleReadResult, R as ReadNoydbBundleOptions, W as WriteNoydbBundleOptions, n as decodeMultiBundle, o as decryptExtractedPartition, p as encodeBundleHeader, q as encodeMultiBundle, r as readMultiVaultBundleCompartment, s as readNoydbBundle, t as readNoydbBundleHeader, u as readNoydbBundleManifest, v as resetBrotliSupportCache, w as validateBundleHeader, x as writeMultiVaultBundle, y as writeNoydbBundle } from '../multi-bundle-6s5nKAZX.js';
3
+ export { g as generateULID, i as isULID } from '../ulid-DRH25k3y.js';
4
+ import { bc as Vault, aW as NoydbStore, bd as SealingKeyProvider, be as RecoveryEnrollmentInput, bf as ShamirRecoveryProvider } from '../types-BGRX6sPT.js';
5
+ export { t as AdoptionStateError, B as BackupCorruptedError, u as BackupLedgerError, v as BundleIntegrityError, w as BundleSealMismatchError, x as BundleVersionConflictError, P as PartitionExtractionError, y as TransferSealError } from '../errors-B2tUcRPg.js';
5
6
  import '../lazy-builder-ChSqcF5t.js';
6
7
  import '../predicate-BmhBSPCH.js';
7
- import '../strategy-54eIwox5.js';
8
+ import '../strategy-D47TC5X6.js';
8
9
  import '../strategy-BSxFXGzb.js';
9
10
  import '../index-BMmajblo.js';
10
- import '../index-Bm9hIY7t.js';
11
+ import '../index-BLff_E35.js';
11
12
  import '@noy-db/attestation';
12
13
 
13
14
  /**
@@ -106,6 +107,14 @@ declare function extractPartition(vault: Vault, opts: WalkClosureOptions & {
106
107
  readonly compression?: 'auto' | 'brotli' | 'gzip' | 'none';
107
108
  readonly carrySchemas?: boolean;
108
109
  readonly carryLedger?: boolean;
110
+ /**
111
+ * FR-7 structural field projection: per-collection allow-list of fields
112
+ * to keep. Non-listed fields are dropped from each record BEFORE
113
+ * re-encryption (so they never travel in the bundle); `id` is always
114
+ * preserved. A projected collection's persisted schema is NOT carried.
115
+ * Absent/empty → un-projected behavior (byte-identical to today).
116
+ */
117
+ readonly fieldProjection?: Record<string, readonly string[]>;
109
118
  }): Promise<ExtractPartitionResult>;
110
119
 
111
120
  /**
@@ -1,7 +1,20 @@
1
1
  import {
2
- SCHEMAS_COLLECTION,
3
- resolveManagedSecret
4
- } from "../chunk-C6W5KVDV.js";
2
+ NOYDB_MULTI_BUNDLE_MAGIC,
3
+ NOYDB_MULTI_BUNDLE_PREFIX_BYTES,
4
+ NOYDB_MULTI_BUNDLE_VERSION,
5
+ adoptPartition,
6
+ createOwnerOnAdoptedPartition,
7
+ decodeMultiBundle,
8
+ decryptExtractedPartition,
9
+ encodeMultiBundle,
10
+ readMultiVaultBundleCompartment,
11
+ readNoydbBundleManifest,
12
+ unsealDeks,
13
+ writeMultiVaultBundle
14
+ } from "../chunk-R43KS34V.js";
15
+ import {
16
+ SCHEMAS_COLLECTION
17
+ } from "../chunk-XC32SZPW.js";
5
18
  import {
6
19
  COMPRESSION_BROTLI,
7
20
  COMPRESSION_GZIP,
@@ -14,26 +27,22 @@ import {
14
27
  assembleBundleContainer,
15
28
  buildExtractedPartitionWrapper,
16
29
  encodeBundleHeader,
17
- parseExtractedPartitionBody,
18
30
  readNoydbBundle,
19
31
  readNoydbBundleHeader,
20
32
  resetBrotliSupportCache,
21
33
  validateBundleHeader,
22
34
  writeNoydbBundle
23
- } from "../chunk-WE2BUQD2.js";
24
- import "../chunk-JOK73NDT.js";
25
- import "../chunk-BZW5IL43.js";
26
- import {
27
- createOwnerKeyring
28
- } from "../chunk-FRRJIUSI.js";
35
+ } from "../chunk-4TCMCCC3.js";
36
+ import "../chunk-P7OL22JP.js";
37
+ import "../chunk-DCA2BDHA.js";
38
+ import "../chunk-B5CSNGSE.js";
29
39
  import {
30
40
  generateULID,
31
41
  isULID
32
42
  } from "../chunk-FZU343FL.js";
33
43
  import {
34
- LEDGER_COLLECTION,
35
- LedgerStore
36
- } from "../chunk-JDCPRJVS.js";
44
+ LEDGER_COLLECTION
45
+ } from "../chunk-AONK5GCC.js";
37
46
  import {
38
47
  canonicalJson,
39
48
  envelopePayloadHash,
@@ -42,17 +51,15 @@ import {
42
51
  import {
43
52
  NOYDB_BACKUP_VERSION,
44
53
  NOYDB_FORMAT_VERSION
45
- } from "../chunk-TA6HPKWQ.js";
54
+ } from "../chunk-LR7CODVN.js";
46
55
  import {
47
- base64ToBuffer,
48
56
  bufferToBase64,
49
57
  decrypt,
50
58
  encrypt,
51
59
  generateDEK,
52
60
  unwrapCek,
53
- wrapCek,
54
- wrapKey
55
- } from "../chunk-37VGJM3T.js";
61
+ wrapCek
62
+ } from "../chunk-WQ3KAGOV.js";
56
63
  import {
57
64
  AdoptionStateError,
58
65
  BackupCorruptedError,
@@ -61,9 +68,8 @@ import {
61
68
  BundleSealMismatchError,
62
69
  BundleVersionConflictError,
63
70
  PartitionExtractionError,
64
- TransferSealError,
65
- ValidationError
66
- } from "../chunk-OTWT6BAJ.js";
71
+ TransferSealError
72
+ } from "../chunk-4BB4T3O7.js";
67
73
 
68
74
  // src/bundle/walk-closure.ts
69
75
  async function walkClosure(vault, opts) {
@@ -208,7 +214,7 @@ async function describeExtraction(vault, opts) {
208
214
  }
209
215
 
210
216
  // src/bundle/extract-partition.ts
211
- async function reKeyClosure(vault, closure) {
217
+ async function reKeyClosure(vault, closure, fieldProjection) {
212
218
  const { name: vaultName, adapter, getDEK } = vault._introspectState();
213
219
  const collections = {};
214
220
  const deks = /* @__PURE__ */ new Map();
@@ -217,29 +223,40 @@ async function reKeyClosure(vault, closure) {
217
223
  const destDek = await generateDEK();
218
224
  deks.set(collectionName, destDek);
219
225
  const out = {};
226
+ const projList = fieldProjection?.[collectionName];
227
+ const proj = projList ? new Set(projList) : void 0;
228
+ const project = (plaintext) => {
229
+ if (!proj) return plaintext;
230
+ const rec = JSON.parse(plaintext);
231
+ const kept = {};
232
+ if ("id" in rec) kept["id"] = rec["id"];
233
+ for (const f of proj) if (f in rec) kept[f] = rec[f];
234
+ return JSON.stringify(kept);
235
+ };
220
236
  for (const id of ids) {
221
237
  const env = await adapter.get(vaultName, collectionName, id);
222
238
  if (!env) continue;
223
239
  if (env._cek !== void 0) {
224
240
  const cek = await unwrapCek(env._cek, srcDek);
225
241
  const plaintext2 = await decrypt(env._iv, env._data, cek);
226
- const { iv: iv2, data: data2 } = await encrypt(plaintext2, cek);
242
+ const { iv: iv2, data: data2 } = await encrypt(project(plaintext2), cek);
227
243
  const wrapped = await wrapCek(cek, destDek);
228
244
  out[id] = { ...env, _iv: iv2, _data: data2, _cek: wrapped };
229
245
  continue;
230
246
  }
231
247
  const plaintext = await decrypt(env._iv, env._data, srcDek);
232
- const { iv, data } = await encrypt(plaintext, destDek);
248
+ const { iv, data } = await encrypt(project(plaintext), destDek);
233
249
  out[id] = { ...env, _iv: iv, _data: data };
234
250
  }
235
251
  collections[collectionName] = out;
236
252
  }
237
253
  return { collections, deks };
238
254
  }
239
- async function reKeySchemas(vault, closure, destDeks) {
255
+ async function reKeySchemas(vault, closure, destDeks, fieldProjection) {
240
256
  const { name: vaultName, adapter, getDEK } = vault._introspectState();
241
257
  const out = {};
242
258
  for (const collectionName of closure.keys()) {
259
+ if (fieldProjection?.[collectionName]) continue;
243
260
  const env = await adapter.get(vaultName, SCHEMAS_COLLECTION, collectionName);
244
261
  if (!env) continue;
245
262
  const destDek = destDeks.get(collectionName);
@@ -331,6 +348,11 @@ async function sealDeks(deks) {
331
348
  };
332
349
  }
333
350
  async function extractPartition(vault, opts) {
351
+ if (vault.role === "custodian") {
352
+ throw new PartitionExtractionError(
353
+ "extractPartition is owner-only; a custodian cannot extract-and-sever (FR-6: producing a re-keyed standalone partition is an ownership operation; use the Deed owner)."
354
+ );
355
+ }
334
356
  if (vault.role !== "owner") {
335
357
  throw new PartitionExtractionError(
336
358
  `extractPartition requires the 'owner' role on the source vault; caller is '${vault.role}'. Producing a re-keyed standalone partition is an ownership operation.`
@@ -338,7 +360,7 @@ async function extractPartition(vault, opts) {
338
360
  }
339
361
  if (opts.carrySchemas) await vault._drainPendingSchemaWrites();
340
362
  const { closure } = await walkClosure(vault, opts);
341
- const { collections, deks } = await reKeyClosure(vault, closure);
363
+ const { collections, deks } = await reKeyClosure(vault, closure, opts.fieldProjection);
342
364
  let ledgerHead;
343
365
  let ledgerEntries;
344
366
  if (opts.carryLedger && vault._getLedgerOrNull() !== null) {
@@ -350,7 +372,7 @@ async function extractPartition(vault, opts) {
350
372
  deks.set(LEDGER_COLLECTION, ledgerDek);
351
373
  }
352
374
  }
353
- const internalSchemas = opts.carrySchemas ? await reKeySchemas(vault, closure, deks) : {};
375
+ const internalSchemas = opts.carrySchemas ? await reKeySchemas(vault, closure, deks, opts.fieldProjection) : {};
354
376
  const internal = {};
355
377
  if (Object.keys(internalSchemas).length > 0) internal[SCHEMAS_COLLECTION] = internalSchemas;
356
378
  if (ledgerEntries) internal[LEDGER_COLLECTION] = ledgerEntries;
@@ -391,172 +413,6 @@ async function extractPartition(vault, opts) {
391
413
  });
392
414
  return { bundleBytes, transferKey, sealId: seal.sealId };
393
415
  }
394
-
395
- // src/bundle/adopt-partition.ts
396
- async function unsealDeks(seal, transferKey) {
397
- if (transferKey.byteLength !== 32) {
398
- throw new TransferSealError(
399
- `transfer key must be 32 bytes, got ${transferKey.byteLength}.`
400
- );
401
- }
402
- const key = await crypto.subtle.importKey("raw", transferKey, "AES-GCM", false, ["decrypt"]);
403
- const raw = base64ToBuffer(seal.payload);
404
- let plaintext;
405
- try {
406
- plaintext = await crypto.subtle.decrypt(
407
- { name: "AES-GCM", iv: raw.slice(0, 12) },
408
- key,
409
- raw.slice(12)
410
- );
411
- } catch {
412
- throw new TransferSealError(
413
- "transfer seal could not be opened \u2014 wrong transfer key (AES-GCM authentication failed)."
414
- );
415
- }
416
- let dekMap;
417
- try {
418
- dekMap = JSON.parse(new TextDecoder().decode(plaintext));
419
- } catch {
420
- throw new TransferSealError("transfer seal payload is not valid JSON after decryption.");
421
- }
422
- const deks = /* @__PURE__ */ new Map();
423
- for (const [collection, b64] of Object.entries(dekMap)) {
424
- const dek = await crypto.subtle.importKey("raw", base64ToBuffer(b64), "AES-GCM", true, ["encrypt", "decrypt"]);
425
- deks.set(collection, dek);
426
- }
427
- return deks;
428
- }
429
- async function adoptPartition(bundleBytes, opts) {
430
- const { transferKey, destinationStore, vaultName } = opts;
431
- const header = readNoydbBundleHeader(bundleBytes);
432
- if (header.bundleKind !== "extracted-partition" || header.transferSeal === void 0) {
433
- throw new ValidationError(
434
- "adoptPartition requires an extracted-partition bundle with a transfer seal. For ordinary backups use readNoydbBundle + vault.load."
435
- );
436
- }
437
- const { dumpJson } = await readNoydbBundle(bundleBytes);
438
- const { dump, seal } = parseExtractedPartitionBody(dumpJson);
439
- await unsealDeks(seal, transferKey);
440
- const existing = await destinationStore.get(vaultName, "_meta", "adoption");
441
- if (existing) {
442
- const prior = JSON.parse(existing._data);
443
- if (prior.sealId === seal.sealId) {
444
- throw new AdoptionStateError(
445
- `partition (sealId ${seal.sealId}) is already adopted into vault "${vaultName}".`
446
- );
447
- }
448
- throw new AdoptionStateError(
449
- `vault "${vaultName}" already holds an adopted partition (sealId ${prior.sealId}); adopting a different partition (sealId ${seal.sealId}) here would overwrite it. Adopt into a fresh vaultName instead.`
450
- );
451
- }
452
- const existingKeyring = await destinationStore.list(vaultName, "_keyring");
453
- if (existingKeyring.length > 0) {
454
- throw new AdoptionStateError(
455
- `vault "${vaultName}" already holds a keyring (an unrelated owner exists at this slot); adoptPartition requires a fresh vaultName to avoid destructive saveAll on SQL adapters.`
456
- );
457
- }
458
- const backup = JSON.parse(dump);
459
- await destinationStore.saveAll(vaultName, backup.collections);
460
- if (backup._internal) {
461
- for (const [collection, records] of Object.entries(backup._internal)) {
462
- for (const [id, envelope] of Object.entries(records)) {
463
- await destinationStore.put(vaultName, collection, id, envelope);
464
- }
465
- }
466
- }
467
- const adoptedAt = (/* @__PURE__ */ new Date()).toISOString();
468
- const adoption = { sealId: seal.sealId, adoptedAt, needsOwner: true, transferSeal: seal };
469
- await destinationStore.put(vaultName, "_meta", "adoption", {
470
- _noydb: 1,
471
- _v: 1,
472
- _ts: adoptedAt,
473
- _iv: "",
474
- _data: JSON.stringify(adoption)
475
- });
476
- return { vaultName, needsOwner: true, sealId: seal.sealId };
477
- }
478
- function isManaged(o) {
479
- return "passphraseMode" in o && o.passphraseMode === "managed";
480
- }
481
- async function createOwnerOnAdoptedPartition(store, vaultName, opts) {
482
- const { userId, transferKey } = opts;
483
- if (isManaged(opts) && !opts.recovery.some((r) => r.profile === "shamir")) {
484
- throw new AdoptionStateError(
485
- "managed-mode adoption requires at least one strong (shamir) recovery profile in `recovery` \u2014 paper alone is not strong when there is no user passphrase to fall back on."
486
- );
487
- }
488
- const adoptionEnv = await store.get(vaultName, "_meta", "adoption");
489
- if (!adoptionEnv) {
490
- throw new AdoptionStateError(
491
- `vault "${vaultName}" is not an adopted partition (no _meta/adoption). createOwnerOnAdoptedPartition only applies to vaults created via adoptPartition.`
492
- );
493
- }
494
- const adoption = JSON.parse(adoptionEnv._data);
495
- if (adoption.consumedAt !== void 0 || adoption.transferSeal === void 0) {
496
- throw new AdoptionStateError(
497
- `vault "${vaultName}" already has an owner (transfer seal consumed at ${adoption.consumedAt}).`
498
- );
499
- }
500
- const partitionDeks = await unsealDeks(adoption.transferSeal, transferKey);
501
- const existingKeyring = await store.get(vaultName, "_keyring", userId);
502
- const otherOwners = (await store.list(vaultName, "_keyring")).filter((u) => u !== userId);
503
- if (otherOwners.length > 0) {
504
- throw new AdoptionStateError(
505
- `vault "${vaultName}" already has a keyring for a different owner; cannot create owner "${userId}".`
506
- );
507
- }
508
- const partitionCollections = [...partitionDeks.keys()];
509
- const priorDeks = existingKeyring ? JSON.parse(existingKeyring._data).deks : {};
510
- const ownerMinted = existingKeyring !== null && partitionCollections.every((c) => c in priorDeks);
511
- if (!ownerMinted) {
512
- const passphrase = isManaged(opts) ? await resolveManagedSecret(store, vaultName, opts.sealingKey) : opts.passphrase;
513
- const unlocked = await createOwnerKeyring(store, vaultName, userId, passphrase);
514
- const env = await store.get(vaultName, "_keyring", userId);
515
- if (!env) throw new AdoptionStateError(`keyring write for "${userId}" did not persist`);
516
- const keyringFile = JSON.parse(env._data);
517
- const kek = unlocked.kek;
518
- if (!kek) throw new AdoptionStateError(`owner keyring for "${userId}" has no KEK to wrap partition DEKs under`);
519
- const mergedDeks = { ...keyringFile.deks };
520
- for (const [collection, dek] of partitionDeks) {
521
- mergedDeks[collection] = await wrapKey(dek, kek);
522
- }
523
- const mergedFile = { ...keyringFile, deks: mergedDeks };
524
- await store.put(vaultName, "_keyring", userId, { ...env, _data: JSON.stringify(mergedFile) });
525
- }
526
- const ledgerDek = partitionDeks.get(LEDGER_COLLECTION);
527
- if (ledgerDek) {
528
- const ledger = new LedgerStore({
529
- adapter: store,
530
- vault: vaultName,
531
- encrypted: true,
532
- getDEK: async () => ledgerDek,
533
- actor: userId
534
- });
535
- const creationReason = `creation-of-new-owner:${userId}`;
536
- const consumedReason = `transfer-seal-consumed:${adoption.sealId}`;
537
- const recordedReasons = new Set((await ledger.loadAllEntries()).map((e) => e.reason));
538
- if (!recordedReasons.has(creationReason)) {
539
- await ledger.append({ op: "lifecycle", collection: "", id: "", version: 0, actor: "", payloadHash: "", reason: creationReason });
540
- }
541
- if (!recordedReasons.has(consumedReason)) {
542
- await ledger.append({ op: "lifecycle", collection: "", id: "", version: 0, actor: "", payloadHash: "", reason: consumedReason });
543
- }
544
- }
545
- if (isManaged(opts)) {
546
- const { createNoydb } = await import("../noydb-ZZCRF6TE.js");
547
- const db = await createNoydb({
548
- store,
549
- user: userId,
550
- passphraseMode: "managed",
551
- sealingKey: opts.sealingKey,
552
- shamirRecovery: opts.shamirRecovery
553
- });
554
- await db.openVaultAndEnrollRecovery(vaultName, { recovery: opts.recovery });
555
- }
556
- const consumed = { sealId: adoption.sealId, adoptedAt: adoption.adoptedAt, consumedAt: (/* @__PURE__ */ new Date()).toISOString() };
557
- await store.put(vaultName, "_meta", "adoption", { ...adoptionEnv, _data: JSON.stringify(consumed) });
558
- return { vaultName, userId };
559
- }
560
416
  export {
561
417
  AdoptionStateError,
562
418
  BackupCorruptedError,
@@ -572,21 +428,30 @@ export {
572
428
  NOYDB_BUNDLE_FORMAT_VERSION,
573
429
  NOYDB_BUNDLE_MAGIC,
574
430
  NOYDB_BUNDLE_PREFIX_BYTES,
431
+ NOYDB_MULTI_BUNDLE_MAGIC,
432
+ NOYDB_MULTI_BUNDLE_PREFIX_BYTES,
433
+ NOYDB_MULTI_BUNDLE_VERSION,
575
434
  PartitionExtractionError,
576
435
  TransferSealError,
577
436
  adoptPartition,
578
437
  createOwnerOnAdoptedPartition,
438
+ decodeMultiBundle,
439
+ decryptExtractedPartition,
579
440
  describeExtraction,
580
441
  encodeBundleHeader,
442
+ encodeMultiBundle,
581
443
  extractPartition,
582
444
  generateULID,
583
445
  isULID,
446
+ readMultiVaultBundleCompartment,
584
447
  readNoydbBundle,
585
448
  readNoydbBundleHeader,
449
+ readNoydbBundleManifest,
586
450
  resetBrotliSupportCache,
587
451
  unsealDeks,
588
452
  validateBundleHeader,
589
453
  walkClosure,
454
+ writeMultiVaultBundle,
590
455
  writeNoydbBundle
591
456
  };
592
457
  //# sourceMappingURL=index.js.map