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

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 (264) 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 +5 -5
  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 +5 -5
  13. package/dist/bundle/index.cjs +4 -207
  14. package/dist/bundle/index.cjs.map +1 -1
  15. package/dist/bundle/index.d.cts +6 -6
  16. package/dist/bundle/index.d.ts +6 -6
  17. package/dist/bundle/index.js +10 -26
  18. package/dist/bundle/index.js.map +1 -1
  19. package/dist/{chunk-ZBENTRFS.js → chunk-2KA3PDUR.js} +2 -2
  20. package/dist/{chunk-OWAMTSAI.js → chunk-2RHBFCWQ.js} +5 -5
  21. package/dist/{chunk-GEWIFM4J.js → chunk-3BANVNDH.js} +2 -2
  22. package/dist/{chunk-QOXZM3L2.js → chunk-56ENKU46.js} +49 -62
  23. package/dist/{chunk-QOXZM3L2.js.map → chunk-56ENKU46.js.map} +1 -1
  24. package/dist/{chunk-WQ3KAGOV.js → chunk-7JSP3E67.js} +2 -2
  25. package/dist/{chunk-RNQPDV75.js → chunk-ANLOD6IS.js} +4 -4
  26. package/dist/{chunk-77WF53XY.js → chunk-C7UIT5XY.js} +4 -4
  27. package/dist/{chunk-4BB4T3O7.js → chunk-DDOYOMAD.js} +2 -12
  28. package/dist/chunk-DDOYOMAD.js.map +1 -0
  29. package/dist/{chunk-R5ZECURV.js → chunk-E5TJAQS7.js} +2 -2
  30. package/dist/{chunk-BCMHJYVT.js → chunk-EJJTUDNI.js} +3 -3
  31. package/dist/{chunk-JKM2AVVH.js → chunk-EW3H5Y7N.js} +2 -2
  32. package/dist/{chunk-AONK5GCC.js → chunk-EYZJULEN.js} +3 -3
  33. package/dist/{chunk-HHJ5DZCZ.js → chunk-FCIZXX56.js} +3 -3
  34. package/dist/{chunk-G4GW5VOS.js → chunk-FJ3C3ELF.js} +2 -2
  35. package/dist/{chunk-TQMQZOMX.js → chunk-FO5WEDKF.js} +2 -2
  36. package/dist/{chunk-7ZCTUI26.js → chunk-FUDVHE2U.js} +2 -2
  37. package/dist/{chunk-4HEGG5NJ.js → chunk-GHXOVGTX.js} +4 -4
  38. package/dist/{chunk-UAK2AMO2.js → chunk-GPZHHTJU.js} +3 -3
  39. package/dist/{chunk-U6LTLN7O.js → chunk-H4XFA2LM.js} +3 -3
  40. package/dist/{chunk-P7OL22JP.js → chunk-HUXDQIVU.js} +2 -2
  41. package/dist/{chunk-TOMSCJRV.js → chunk-J73KU4AE.js} +2 -2
  42. package/dist/{chunk-7X4EF35A.js → chunk-JJKXJAH2.js} +4 -4
  43. package/dist/{chunk-HD4QCT2O.js → chunk-KD253AI5.js} +2 -2
  44. package/dist/{chunk-SGM7CK7R.js → chunk-KJ37E3R5.js} +4 -4
  45. package/dist/{chunk-LMWVNF6X.js → chunk-KNJ7MK4B.js} +2 -2
  46. package/dist/{chunk-AO3QSMCU.js → chunk-LX4CPLU6.js} +2 -2
  47. package/dist/{chunk-4TCMCCC3.js → chunk-N4EXCKWP.js} +3 -5
  48. package/dist/{chunk-JRMOSIH4.js → chunk-OCRDV3NU.js} +4 -4
  49. package/dist/{chunk-DCICHSRS.js → chunk-OMBPGXCL.js} +2 -2
  50. package/dist/{chunk-3XJU3OHE.js → chunk-PS6PSEZL.js} +5 -5
  51. package/dist/{chunk-ZDITTESU.js → chunk-Q7P4WHTL.js} +2 -2
  52. package/dist/{chunk-OKV7S356.js → chunk-QYQRAOEF.js} +3 -3
  53. package/dist/{chunk-IEIADIPM.js → chunk-RHVYFAVQ.js} +2 -2
  54. package/dist/{chunk-R43KS34V.js → chunk-RZOGD7IF.js} +10 -177
  55. package/dist/chunk-RZOGD7IF.js.map +1 -0
  56. package/dist/{chunk-IHAISFXP.js → chunk-SKYBEGHB.js} +2 -2
  57. package/dist/{chunk-SOQE5DUV.js → chunk-TESFHBOW.js} +3 -3
  58. package/dist/{chunk-35U5YNRR.js → chunk-TSUICI5N.js} +2 -2
  59. package/dist/{chunk-B5CSNGSE.js → chunk-UNBX2HMA.js} +3 -3
  60. package/dist/{chunk-C472BRJ4.js → chunk-VGAN5RLD.js} +3 -3
  61. package/dist/{chunk-5A2FVGHT.js → chunk-VJNV2GRF.js} +5 -5
  62. package/dist/{chunk-5GZC2ZM3.js → chunk-VUUQYWF5.js} +2 -2
  63. package/dist/{chunk-P5A4E53B.js → chunk-WVYL6HM7.js} +2 -2
  64. package/dist/{chunk-DCA2BDHA.js → chunk-Y5CTT6K5.js} +3 -3
  65. package/dist/{chunk-XC32SZPW.js → chunk-YP2AYE5W.js} +2 -2
  66. package/dist/{chunk-RFEXGW3L.js → chunk-YRQPI67X.js} +2 -2
  67. package/dist/{chunk-CCNRFAL3.js → chunk-YYTM4U4J.js} +2 -2
  68. package/dist/{chunk-FG6IQ3ZL.js → chunk-ZCBJIDT4.js} +2 -2
  69. package/dist/{chunk-XQO4TAJS.js → chunk-ZW2YSN6G.js} +4 -4
  70. package/dist/consent/index.cjs.map +1 -1
  71. package/dist/consent/index.d.cts +5 -5
  72. package/dist/consent/index.d.ts +5 -5
  73. package/dist/consent/index.js +3 -3
  74. package/dist/{crypto-2LU6XUFF.js → crypto-YBKBNPVM.js} +3 -3
  75. package/dist/{multi-bundle-6s5nKAZX.d.ts → decrypt-partition-C71vhnND.d.cts} +2 -103
  76. package/dist/{multi-bundle-WhYiJEgV.d.cts → decrypt-partition-CyyJUWLR.d.ts} +2 -103
  77. package/dist/{delegation-6ABSJGXV.js → delegation-4JSMM6BB.js} +5 -5
  78. package/dist/derivations/index.cjs.map +1 -1
  79. package/dist/derivations/index.d.cts +6 -6
  80. package/dist/derivations/index.d.ts +6 -6
  81. package/dist/derivations/index.js +4 -4
  82. package/dist/{dev-unlock-DURe4IvF.d.cts → dev-unlock-BdrE0kbS.d.cts} +1 -1
  83. package/dist/{dev-unlock-BlhRHr6p.d.ts → dev-unlock-ByBkl99-.d.ts} +1 -1
  84. package/dist/{errors-B2tUcRPg.d.ts → errors-Dwk2k1xY.d.cts} +1 -6
  85. package/dist/{errors-B2tUcRPg.d.cts → errors-Dwk2k1xY.d.ts} +1 -6
  86. package/dist/executor-3SVNESQ3.js +8 -0
  87. package/dist/executor-BIW4FT5R.js +12 -0
  88. package/dist/executor-VEZUBJNQ.js +8 -0
  89. package/dist/forget/index.js +3 -3
  90. package/dist/guards/index.cjs.map +1 -1
  91. package/dist/guards/index.d.cts +6 -6
  92. package/dist/guards/index.d.ts +6 -6
  93. package/dist/guards/index.js +3 -3
  94. package/dist/{hash-CqRZfDZH.d.cts → hash-BUkDp_8Q.d.cts} +1 -1
  95. package/dist/{hash-cF4iWaBV.d.ts → hash-CZxVv8RH.d.ts} +1 -1
  96. package/dist/history/index.cjs.map +1 -1
  97. package/dist/history/index.d.cts +6 -6
  98. package/dist/history/index.d.ts +6 -6
  99. package/dist/history/index.js +4 -4
  100. package/dist/i18n/index.cjs.map +1 -1
  101. package/dist/i18n/index.d.cts +5 -5
  102. package/dist/i18n/index.d.ts +5 -5
  103. package/dist/i18n/index.js +5 -5
  104. package/dist/{index-da0M3NnR.d.cts → index-CBUhOmrM.d.cts} +4 -4
  105. package/dist/{index-B8MoIS7B.d.ts → index-DFhKV-6A.d.ts} +4 -4
  106. package/dist/{index-BthnP2MA.d.cts → index-DoxKSsMj.d.cts} +2 -2
  107. package/dist/{index-BLff_E35.d.ts → index-LaexBi3v.d.ts} +2 -2
  108. package/dist/index.cjs +5 -190
  109. package/dist/index.cjs.map +1 -1
  110. package/dist/index.d.cts +17 -17
  111. package/dist/index.d.ts +17 -17
  112. package/dist/index.js +46 -54
  113. package/dist/index.js.map +1 -1
  114. package/dist/indexing/index.cjs.map +1 -1
  115. package/dist/indexing/index.js +4 -4
  116. package/dist/issue-LEBPVF3Y.js +12 -0
  117. package/dist/kernel/index.cjs +1 -1
  118. package/dist/kernel/index.cjs.map +1 -1
  119. package/dist/kernel/index.d.cts +5 -5
  120. package/dist/kernel/index.d.ts +5 -5
  121. package/dist/kernel/index.js +5 -5
  122. package/dist/{ledger-VOS2X3WJ.js → ledger-FLRTSOYH.js} +4 -4
  123. package/dist/materialized-views/index.cjs.map +1 -1
  124. package/dist/materialized-views/index.d.cts +6 -6
  125. package/dist/materialized-views/index.d.ts +6 -6
  126. package/dist/materialized-views/index.js +8 -8
  127. package/dist/{mime-magic-CCrP-iXJ.d.cts → mime-magic-BAhLjkHw.d.cts} +1 -1
  128. package/dist/{mime-magic-BswIvWkR.d.ts → mime-magic-C1UbcBxP.d.ts} +1 -1
  129. package/dist/noydb-6FA46A4M.js +38 -0
  130. package/dist/overlay-views/index.cjs.map +1 -1
  131. package/dist/overlay-views/index.d.cts +6 -6
  132. package/dist/overlay-views/index.d.ts +6 -6
  133. package/dist/overlay-views/index.js +4 -4
  134. package/dist/periods/index.cjs.map +1 -1
  135. package/dist/periods/index.d.cts +5 -5
  136. package/dist/periods/index.d.ts +5 -5
  137. package/dist/periods/index.js +4 -4
  138. package/dist/{public-envelope-IJJMWSTJ.js → public-envelope-DBKJEBBF.js} +3 -3
  139. package/dist/query/index.cjs.map +1 -1
  140. package/dist/query/index.d.cts +3 -3
  141. package/dist/query/index.d.ts +3 -3
  142. package/dist/query/index.js +7 -7
  143. package/dist/registry-CMEVTOCN.js +8 -0
  144. package/dist/{registry-JGEVJ6YC.js → registry-OUZ3VBZA.js} +3 -3
  145. package/dist/registry-XUBRO5JJ.js +8 -0
  146. package/dist/{revoke-WUY4AYRJ.js → revoke-P5D3UTRX.js} +5 -5
  147. package/dist/sealed-record/index.cjs.map +1 -1
  148. package/dist/sealed-record/index.d.cts +1 -1
  149. package/dist/sealed-record/index.d.ts +1 -1
  150. package/dist/sealed-record/index.js +2 -2
  151. package/dist/session/index.cjs.map +1 -1
  152. package/dist/session/index.d.cts +6 -6
  153. package/dist/session/index.d.ts +6 -6
  154. package/dist/session/index.js +3 -3
  155. package/dist/shadow/index.cjs.map +1 -1
  156. package/dist/shadow/index.d.cts +5 -5
  157. package/dist/shadow/index.d.ts +5 -5
  158. package/dist/shadow/index.js +2 -2
  159. package/dist/{signer-UJF3CFDC.js → signer-NEQPCHMW.js} +4 -4
  160. package/dist/snapshots/index.cjs.map +1 -1
  161. package/dist/snapshots/index.d.cts +5 -5
  162. package/dist/snapshots/index.d.ts +5 -5
  163. package/dist/snapshots/index.js +3 -3
  164. package/dist/{stale-PW6VBGSP.js → stale-KKCHF2VB.js} +2 -2
  165. package/dist/store/index.cjs.map +1 -1
  166. package/dist/store/index.d.cts +5 -5
  167. package/dist/store/index.d.ts +5 -5
  168. package/dist/store/index.js +2 -2
  169. package/dist/{strategy-BWmgRPA2.d.cts → strategy-D1zjEV3n.d.cts} +1 -1
  170. package/dist/{strategy-D47TC5X6.d.ts → strategy-YQ1qJWyq.d.ts} +1 -1
  171. package/dist/sync/index.cjs.map +1 -1
  172. package/dist/sync/index.d.cts +4 -4
  173. package/dist/sync/index.d.ts +4 -4
  174. package/dist/sync/index.js +3 -3
  175. package/dist/team/index.cjs.map +1 -1
  176. package/dist/team/index.d.cts +5 -5
  177. package/dist/team/index.d.ts +5 -5
  178. package/dist/team/index.js +7 -7
  179. package/dist/{transition-guard-CQH5263l.d.ts → transition-guard-BSLdikC_.d.ts} +1 -1
  180. package/dist/{transition-guard-C3NxfVKk.d.cts → transition-guard-DPs6al8h.d.cts} +1 -1
  181. package/dist/tx/index.cjs.map +1 -1
  182. package/dist/tx/index.d.cts +5 -5
  183. package/dist/tx/index.d.ts +5 -5
  184. package/dist/tx/index.js +3 -3
  185. package/dist/{types-COQ6qJZh.d.cts → types-BCYvhKzr.d.cts} +7 -13
  186. package/dist/{types-BGRX6sPT.d.ts → types-CCq0WHh9.d.ts} +7 -13
  187. package/dist/util/index.cjs.map +1 -1
  188. package/dist/util/index.js +1 -1
  189. package/dist/{with-materialized-view-D4U-KrBH.d.cts → with-materialized-view-CTHe6uh9.d.cts} +1 -1
  190. package/dist/{with-materialized-view-Cj-6fuav.d.ts → with-materialized-view-DiD41wQp.d.ts} +1 -1
  191. package/dist/{with-overlayed-view-COp_7EEy.d.ts → with-overlayed-view-DlbsJMhF.d.ts} +1 -1
  192. package/dist/{with-overlayed-view-BKjdUPRx.d.cts → with-overlayed-view-Dlz5hcM8.d.cts} +1 -1
  193. package/dist/{with-rollup-C-Bok_o2.d.cts → with-rollup-BBWdrCvu.d.cts} +1 -1
  194. package/dist/{with-rollup-B1_ZjG02.d.ts → with-rollup-mT4_CWaU.d.ts} +1 -1
  195. package/package.json +3 -3
  196. package/dist/chunk-4BB4T3O7.js.map +0 -1
  197. package/dist/chunk-R43KS34V.js.map +0 -1
  198. package/dist/executor-JKMSEB34.js +0 -8
  199. package/dist/executor-UYXSQB4D.js +0 -12
  200. package/dist/executor-VJSCTBWY.js +0 -8
  201. package/dist/issue-KLRMW5DH.js +0 -12
  202. package/dist/noydb-2PI2ZBX6.js +0 -38
  203. package/dist/registry-GAIFVWXF.js +0 -8
  204. package/dist/registry-J77ZUQ7G.js +0 -8
  205. /package/dist/{chunk-ZBENTRFS.js.map → chunk-2KA3PDUR.js.map} +0 -0
  206. /package/dist/{chunk-OWAMTSAI.js.map → chunk-2RHBFCWQ.js.map} +0 -0
  207. /package/dist/{chunk-GEWIFM4J.js.map → chunk-3BANVNDH.js.map} +0 -0
  208. /package/dist/{chunk-WQ3KAGOV.js.map → chunk-7JSP3E67.js.map} +0 -0
  209. /package/dist/{chunk-RNQPDV75.js.map → chunk-ANLOD6IS.js.map} +0 -0
  210. /package/dist/{chunk-77WF53XY.js.map → chunk-C7UIT5XY.js.map} +0 -0
  211. /package/dist/{chunk-R5ZECURV.js.map → chunk-E5TJAQS7.js.map} +0 -0
  212. /package/dist/{chunk-BCMHJYVT.js.map → chunk-EJJTUDNI.js.map} +0 -0
  213. /package/dist/{chunk-JKM2AVVH.js.map → chunk-EW3H5Y7N.js.map} +0 -0
  214. /package/dist/{chunk-AONK5GCC.js.map → chunk-EYZJULEN.js.map} +0 -0
  215. /package/dist/{chunk-HHJ5DZCZ.js.map → chunk-FCIZXX56.js.map} +0 -0
  216. /package/dist/{chunk-G4GW5VOS.js.map → chunk-FJ3C3ELF.js.map} +0 -0
  217. /package/dist/{chunk-TQMQZOMX.js.map → chunk-FO5WEDKF.js.map} +0 -0
  218. /package/dist/{chunk-7ZCTUI26.js.map → chunk-FUDVHE2U.js.map} +0 -0
  219. /package/dist/{chunk-4HEGG5NJ.js.map → chunk-GHXOVGTX.js.map} +0 -0
  220. /package/dist/{chunk-UAK2AMO2.js.map → chunk-GPZHHTJU.js.map} +0 -0
  221. /package/dist/{chunk-U6LTLN7O.js.map → chunk-H4XFA2LM.js.map} +0 -0
  222. /package/dist/{chunk-P7OL22JP.js.map → chunk-HUXDQIVU.js.map} +0 -0
  223. /package/dist/{chunk-TOMSCJRV.js.map → chunk-J73KU4AE.js.map} +0 -0
  224. /package/dist/{chunk-7X4EF35A.js.map → chunk-JJKXJAH2.js.map} +0 -0
  225. /package/dist/{chunk-HD4QCT2O.js.map → chunk-KD253AI5.js.map} +0 -0
  226. /package/dist/{chunk-SGM7CK7R.js.map → chunk-KJ37E3R5.js.map} +0 -0
  227. /package/dist/{chunk-LMWVNF6X.js.map → chunk-KNJ7MK4B.js.map} +0 -0
  228. /package/dist/{chunk-AO3QSMCU.js.map → chunk-LX4CPLU6.js.map} +0 -0
  229. /package/dist/{chunk-4TCMCCC3.js.map → chunk-N4EXCKWP.js.map} +0 -0
  230. /package/dist/{chunk-JRMOSIH4.js.map → chunk-OCRDV3NU.js.map} +0 -0
  231. /package/dist/{chunk-DCICHSRS.js.map → chunk-OMBPGXCL.js.map} +0 -0
  232. /package/dist/{chunk-3XJU3OHE.js.map → chunk-PS6PSEZL.js.map} +0 -0
  233. /package/dist/{chunk-ZDITTESU.js.map → chunk-Q7P4WHTL.js.map} +0 -0
  234. /package/dist/{chunk-OKV7S356.js.map → chunk-QYQRAOEF.js.map} +0 -0
  235. /package/dist/{chunk-IEIADIPM.js.map → chunk-RHVYFAVQ.js.map} +0 -0
  236. /package/dist/{chunk-IHAISFXP.js.map → chunk-SKYBEGHB.js.map} +0 -0
  237. /package/dist/{chunk-SOQE5DUV.js.map → chunk-TESFHBOW.js.map} +0 -0
  238. /package/dist/{chunk-35U5YNRR.js.map → chunk-TSUICI5N.js.map} +0 -0
  239. /package/dist/{chunk-B5CSNGSE.js.map → chunk-UNBX2HMA.js.map} +0 -0
  240. /package/dist/{chunk-C472BRJ4.js.map → chunk-VGAN5RLD.js.map} +0 -0
  241. /package/dist/{chunk-5A2FVGHT.js.map → chunk-VJNV2GRF.js.map} +0 -0
  242. /package/dist/{chunk-5GZC2ZM3.js.map → chunk-VUUQYWF5.js.map} +0 -0
  243. /package/dist/{chunk-P5A4E53B.js.map → chunk-WVYL6HM7.js.map} +0 -0
  244. /package/dist/{chunk-DCA2BDHA.js.map → chunk-Y5CTT6K5.js.map} +0 -0
  245. /package/dist/{chunk-XC32SZPW.js.map → chunk-YP2AYE5W.js.map} +0 -0
  246. /package/dist/{chunk-RFEXGW3L.js.map → chunk-YRQPI67X.js.map} +0 -0
  247. /package/dist/{chunk-CCNRFAL3.js.map → chunk-YYTM4U4J.js.map} +0 -0
  248. /package/dist/{chunk-FG6IQ3ZL.js.map → chunk-ZCBJIDT4.js.map} +0 -0
  249. /package/dist/{chunk-XQO4TAJS.js.map → chunk-ZW2YSN6G.js.map} +0 -0
  250. /package/dist/{crypto-2LU6XUFF.js.map → crypto-YBKBNPVM.js.map} +0 -0
  251. /package/dist/{delegation-6ABSJGXV.js.map → delegation-4JSMM6BB.js.map} +0 -0
  252. /package/dist/{executor-JKMSEB34.js.map → executor-3SVNESQ3.js.map} +0 -0
  253. /package/dist/{executor-UYXSQB4D.js.map → executor-BIW4FT5R.js.map} +0 -0
  254. /package/dist/{executor-VJSCTBWY.js.map → executor-VEZUBJNQ.js.map} +0 -0
  255. /package/dist/{issue-KLRMW5DH.js.map → issue-LEBPVF3Y.js.map} +0 -0
  256. /package/dist/{ledger-VOS2X3WJ.js.map → ledger-FLRTSOYH.js.map} +0 -0
  257. /package/dist/{noydb-2PI2ZBX6.js.map → noydb-6FA46A4M.js.map} +0 -0
  258. /package/dist/{public-envelope-IJJMWSTJ.js.map → public-envelope-DBKJEBBF.js.map} +0 -0
  259. /package/dist/{registry-GAIFVWXF.js.map → registry-CMEVTOCN.js.map} +0 -0
  260. /package/dist/{registry-J77ZUQ7G.js.map → registry-OUZ3VBZA.js.map} +0 -0
  261. /package/dist/{registry-JGEVJ6YC.js.map → registry-XUBRO5JJ.js.map} +0 -0
  262. /package/dist/{revoke-WUY4AYRJ.js.map → revoke-P5D3UTRX.js.map} +0 -0
  263. /package/dist/{signer-UJF3CFDC.js.map → signer-NEQPCHMW.js.map} +0 -0
  264. /package/dist/{stale-PW6VBGSP.js.map → stale-KKCHF2VB.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCollectionDEK
3
- } from "./chunk-B5CSNGSE.js";
3
+ } from "./chunk-UNBX2HMA.js";
4
4
  import {
5
5
  envelopePayloadHash
6
6
  } from "./chunk-PDVP3C2I.js";
@@ -10,11 +10,11 @@ import {
10
10
  import {
11
11
  decrypt,
12
12
  encrypt
13
- } from "./chunk-WQ3KAGOV.js";
13
+ } from "./chunk-7JSP3E67.js";
14
14
  import {
15
15
  DictKeyMissingError,
16
16
  PermissionDeniedError
17
- } from "./chunk-4BB4T3O7.js";
17
+ } from "./chunk-DDOYOMAD.js";
18
18
 
19
19
  // src/i18n/dictionary.ts
20
20
  var DICT_COLLECTION_PREFIX = "_dict_";
@@ -398,4 +398,4 @@ export {
398
398
  isStaticDictDescriptor,
399
399
  DictionaryHandle
400
400
  };
401
- //# sourceMappingURL=chunk-7X4EF35A.js.map
401
+ //# sourceMappingURL=chunk-JJKXJAH2.js.map
@@ -2,7 +2,7 @@ import {
2
2
  LocaleNotSpecifiedError,
3
3
  MissingTranslationError,
4
4
  ScriptViolationError
5
- } from "./chunk-4BB4T3O7.js";
5
+ } from "./chunk-DDOYOMAD.js";
6
6
 
7
7
  // src/i18n/policy.ts
8
8
  function resolvePolicy(onMissing, layer) {
@@ -358,4 +358,4 @@ export {
358
358
  setAtPathInPlace,
359
359
  applyI18nLocale
360
360
  };
361
- //# sourceMappingURL=chunk-HD4QCT2O.js.map
361
+ //# sourceMappingURL=chunk-KD253AI5.js.map
@@ -13,11 +13,11 @@ import {
13
13
  sha256Hex,
14
14
  unwrapCek,
15
15
  wrapCek
16
- } from "./chunk-WQ3KAGOV.js";
16
+ } from "./chunk-7JSP3E67.js";
17
17
  import {
18
18
  ConflictError,
19
19
  NotFoundError
20
- } from "./chunk-4BB4T3O7.js";
20
+ } from "./chunk-DDOYOMAD.js";
21
21
 
22
22
  // src/blobs/mime-magic.ts
23
23
  function hex(s) {
@@ -1153,7 +1153,7 @@ var BlobSet = class {
1153
1153
  return this.buildResponse(slot, result.blob, { inline: true });
1154
1154
  }
1155
1155
  const aad = chunkAAD(slot.eTag, 0, result.blob.chunkCount);
1156
- const { decryptBytesWithAAD: decryptAAD } = await import("./crypto-2LU6XUFF.js");
1156
+ const { decryptBytesWithAAD: decryptAAD } = await import("./crypto-YBKBNPVM.js");
1157
1157
  const decrypted = await decryptAAD(envelope._iv, envelope._data, blobDEK, aad);
1158
1158
  const plaintext = result.blob.compression === "gzip" ? await decompressBytes(decrypted) : decrypted;
1159
1159
  const body = new ReadableStream({
@@ -1303,4 +1303,4 @@ export {
1303
1303
  memoryObjectProjection,
1304
1304
  importExternalObjects
1305
1305
  };
1306
- //# sourceMappingURL=chunk-SGM7CK7R.js.map
1306
+ //# sourceMappingURL=chunk-KJ37E3R5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DerivationCycleError
3
- } from "./chunk-4BB4T3O7.js";
3
+ } from "./chunk-DDOYOMAD.js";
4
4
 
5
5
  // src/derivations/strategy-hash.ts
6
6
  async function computeStrategyHash(source, outputKeys, derive, sources) {
@@ -115,4 +115,4 @@ var DerivationRegistry = class {
115
115
  export {
116
116
  DerivationRegistry
117
117
  };
118
- //# sourceMappingURL=chunk-LMWVNF6X.js.map
118
+ //# sourceMappingURL=chunk-KNJ7MK4B.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FieldFrozenError,
3
3
  InvariantError
4
- } from "./chunk-4BB4T3O7.js";
4
+ } from "./chunk-DDOYOMAD.js";
5
5
 
6
6
  // src/guards/executor.ts
7
7
  var GuardExecutor = {
@@ -77,4 +77,4 @@ function deepEqual(a, b) {
77
77
  export {
78
78
  GuardExecutor
79
79
  };
80
- //# sourceMappingURL=chunk-AO3QSMCU.js.map
80
+ //# sourceMappingURL=chunk-LX4CPLU6.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  pickLocale
3
- } from "./chunk-P7OL22JP.js";
3
+ } from "./chunk-HUXDQIVU.js";
4
4
  import {
5
5
  BundleIntegrityError,
6
6
  BundleSealMismatchError,
7
7
  ValidationError
8
- } from "./chunk-4BB4T3O7.js";
8
+ } from "./chunk-DDOYOMAD.js";
9
9
 
10
10
  // src/bundle/format.ts
11
11
  var NOYDB_BUNDLE_MAGIC = new Uint8Array([78, 68, 66, 49]);
@@ -782,8 +782,6 @@ export {
782
782
  COMPRESSION_BROTLI,
783
783
  validateBundleHeader,
784
784
  encodeBundleHeader,
785
- readUint32BE,
786
- writeUint32BE,
787
785
  hasNoydbBundleMagic,
788
786
  buildExtractedPartitionWrapper,
789
787
  parseExtractedPartitionBody,
@@ -794,4 +792,4 @@ export {
794
792
  readNoydbBundlePublicEnvelope,
795
793
  readNoydbBundle
796
794
  };
797
- //# sourceMappingURL=chunk-4TCMCCC3.js.map
795
+ //# sourceMappingURL=chunk-N4EXCKWP.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  ensureCollectionDEK
3
- } from "./chunk-B5CSNGSE.js";
3
+ } from "./chunk-UNBX2HMA.js";
4
4
  import {
5
5
  NOYDB_FORMAT_VERSION
6
6
  } from "./chunk-LR7CODVN.js";
7
7
  import {
8
8
  decrypt,
9
9
  encrypt
10
- } from "./chunk-WQ3KAGOV.js";
10
+ } from "./chunk-7JSP3E67.js";
11
11
  import {
12
12
  PermissionDeniedError
13
- } from "./chunk-4BB4T3O7.js";
13
+ } from "./chunk-DDOYOMAD.js";
14
14
 
15
15
  // src/team/sync-credentials.ts
16
16
  var SYNC_CREDENTIALS_COLLECTION = "_sync_credentials";
@@ -76,4 +76,4 @@ export {
76
76
  listCredentials,
77
77
  credentialStatus
78
78
  };
79
- //# sourceMappingURL=chunk-JRMOSIH4.js.map
79
+ //# sourceMappingURL=chunk-OCRDV3NU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ValidationError
3
- } from "./chunk-4BB4T3O7.js";
3
+ } from "./chunk-DDOYOMAD.js";
4
4
 
5
5
  // src/overlay-views/with-overlayed-view.ts
6
6
  function withOverlayedView(spec) {
@@ -33,4 +33,4 @@ function withOverlayedView(spec) {
33
33
  export {
34
34
  withOverlayedView
35
35
  };
36
- //# sourceMappingURL=chunk-DCICHSRS.js.map
36
+ //# sourceMappingURL=chunk-OMBPGXCL.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  wrapMoneyReducers
3
- } from "./chunk-77WF53XY.js";
3
+ } from "./chunk-C7UIT5XY.js";
4
4
  import {
5
5
  MoneyPrecisionError,
6
6
  evaluateClause,
@@ -9,17 +9,17 @@ import {
9
9
  moneyFieldClause,
10
10
  parseToScaledInt,
11
11
  readPath
12
- } from "./chunk-GEWIFM4J.js";
12
+ } from "./chunk-3BANVNDH.js";
13
13
  import {
14
14
  applyI18nLocale
15
- } from "./chunk-HD4QCT2O.js";
15
+ } from "./chunk-KD253AI5.js";
16
16
  import {
17
17
  CrossJoinSourceUnknownError,
18
18
  CrossJoinTooLargeError,
19
19
  DanglingReferenceError,
20
20
  JoinTooLargeError,
21
21
  ValidationError
22
- } from "./chunk-4BB4T3O7.js";
22
+ } from "./chunk-DDOYOMAD.js";
23
23
 
24
24
  // src/query/join.ts
25
25
  var DEFAULT_JOIN_MAX_ROWS = 5e4;
@@ -1977,4 +1977,4 @@ export {
1977
1977
  executePlan,
1978
1978
  ScanBuilder
1979
1979
  };
1980
- //# sourceMappingURL=chunk-3XJU3OHE.js.map
1980
+ //# sourceMappingURL=chunk-PS6PSEZL.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MaterializedViewConfigError,
3
3
  ValidationError
4
- } from "./chunk-4BB4T3O7.js";
4
+ } from "./chunk-DDOYOMAD.js";
5
5
 
6
6
  // src/materialized-views/with-materialized-view.ts
7
7
  function withMaterializedView(spec) {
@@ -94,4 +94,4 @@ function withMaterializedView(spec) {
94
94
  export {
95
95
  withMaterializedView
96
96
  };
97
- //# sourceMappingURL=chunk-ZDITTESU.js.map
97
+ //# sourceMappingURL=chunk-Q7P4WHTL.js.map
@@ -4,10 +4,10 @@ import {
4
4
  import {
5
5
  decrypt,
6
6
  encrypt
7
- } from "./chunk-WQ3KAGOV.js";
7
+ } from "./chunk-7JSP3E67.js";
8
8
  import {
9
9
  ConflictError
10
- } from "./chunk-4BB4T3O7.js";
10
+ } from "./chunk-DDOYOMAD.js";
11
11
 
12
12
  // src/attestation/signer.ts
13
13
  import { generateDocSigningKeyPair } from "@noy-db/attestation";
@@ -54,4 +54,4 @@ export {
54
54
  loadSigner,
55
55
  loadOrCreateSigner
56
56
  };
57
- //# sourceMappingURL=chunk-OKV7S356.js.map
57
+ //# sourceMappingURL=chunk-QYQRAOEF.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DerivationCapExceededError,
3
3
  DerivationOutputShapeError
4
- } from "./chunk-4BB4T3O7.js";
4
+ } from "./chunk-DDOYOMAD.js";
5
5
 
6
6
  // src/derivations/executor.ts
7
7
  var DerivationExecutor = {
@@ -121,4 +121,4 @@ var DerivationExecutor = {
121
121
  export {
122
122
  DerivationExecutor
123
123
  };
124
- //# sourceMappingURL=chunk-IEIADIPM.js.map
124
+ //# sourceMappingURL=chunk-RHVYFAVQ.js.map
@@ -1,38 +1,29 @@
1
1
  import {
2
2
  resolveManagedSecret
3
- } from "./chunk-XC32SZPW.js";
3
+ } from "./chunk-YP2AYE5W.js";
4
4
  import {
5
- hasNoydbBundleMagic,
6
5
  parseExtractedPartitionBody,
7
6
  readNoydbBundle,
8
- readNoydbBundleHeader,
9
- readNoydbBundlePublicEnvelope,
10
- readUint32BE,
11
- writeNoydbBundle,
12
- writeUint32BE
13
- } from "./chunk-4TCMCCC3.js";
7
+ readNoydbBundleHeader
8
+ } from "./chunk-N4EXCKWP.js";
14
9
  import {
15
10
  createOwnerKeyring
16
- } from "./chunk-B5CSNGSE.js";
17
- import {
18
- generateULID
19
- } from "./chunk-FZU343FL.js";
11
+ } from "./chunk-UNBX2HMA.js";
20
12
  import {
21
13
  LEDGER_COLLECTION,
22
14
  LedgerStore
23
- } from "./chunk-AONK5GCC.js";
15
+ } from "./chunk-EYZJULEN.js";
24
16
  import {
25
17
  base64ToBuffer,
26
18
  decrypt,
27
- sha256Hex,
28
19
  unwrapCek,
29
20
  wrapKey
30
- } from "./chunk-WQ3KAGOV.js";
21
+ } from "./chunk-7JSP3E67.js";
31
22
  import {
32
23
  AdoptionStateError,
33
24
  TransferSealError,
34
25
  ValidationError
35
- } from "./chunk-4BB4T3O7.js";
26
+ } from "./chunk-DDOYOMAD.js";
36
27
 
37
28
  // src/bundle/adopt-partition.ts
38
29
  async function unsealDeks(seal, transferKey) {
@@ -185,7 +176,7 @@ async function createOwnerOnAdoptedPartition(store, vaultName, opts) {
185
176
  }
186
177
  }
187
178
  if (isManaged(opts)) {
188
- const { createNoydb } = await import("./noydb-2PI2ZBX6.js");
179
+ const { createNoydb } = await import("./noydb-6FA46A4M.js");
189
180
  const db = await createNoydb({
190
181
  store,
191
182
  user: userId,
@@ -232,168 +223,10 @@ async function decryptExtractedPartition(bundleBytes, transferKey) {
232
223
  return out;
233
224
  }
234
225
 
235
- // src/bundle/multi-bundle.ts
236
- var NOYDB_MULTI_BUNDLE_MAGIC = new Uint8Array([78, 68, 66, 77]);
237
- var NOYDB_MULTI_BUNDLE_PREFIX_BYTES = 10;
238
- var NOYDB_MULTI_BUNDLE_VERSION = 1;
239
- function encodeMultiBundle(manifest, inner) {
240
- validateManifest(manifest);
241
- if (manifest.compartments.length !== inner.length) {
242
- throw new Error(`multi-bundle: manifest has ${manifest.compartments.length} compartments but ${inner.length} inner bundles were provided.`);
243
- }
244
- for (let i = 0; i < inner.length; i++) {
245
- if (manifest.compartments[i].innerBytes !== inner[i].length) {
246
- throw new Error(`multi-bundle: compartment ${i} declares innerBytes ${manifest.compartments[i].innerBytes} but ${inner[i].length} bytes were provided.`);
247
- }
248
- }
249
- const manifestBytes = new TextEncoder().encode(JSON.stringify(manifest));
250
- const bodyLen = inner.reduce((n, b) => n + b.length, 0);
251
- const out = new Uint8Array(NOYDB_MULTI_BUNDLE_PREFIX_BYTES + manifestBytes.length + bodyLen);
252
- out.set(NOYDB_MULTI_BUNDLE_MAGIC, 0);
253
- out[4] = NOYDB_MULTI_BUNDLE_VERSION;
254
- out[5] = 0;
255
- writeUint32BE(out, 6, manifestBytes.length);
256
- out.set(manifestBytes, NOYDB_MULTI_BUNDLE_PREFIX_BYTES);
257
- let off = NOYDB_MULTI_BUNDLE_PREFIX_BYTES + manifestBytes.length;
258
- for (const b of inner) {
259
- out.set(b, off);
260
- off += b.length;
261
- }
262
- return out;
263
- }
264
- function hasMultiMagic(bytes) {
265
- if (bytes.length < NOYDB_MULTI_BUNDLE_MAGIC.length) return false;
266
- for (let i = 0; i < NOYDB_MULTI_BUNDLE_MAGIC.length; i++) if (bytes[i] !== NOYDB_MULTI_BUNDLE_MAGIC[i]) return false;
267
- return true;
268
- }
269
- function validateManifest(parsed) {
270
- if (parsed === null || typeof parsed !== "object") throw new Error("multi-bundle manifest must be a JSON object.");
271
- const m = parsed;
272
- if (m["multiFormatVersion"] !== NOYDB_MULTI_BUNDLE_VERSION) throw new Error(`multi-bundle manifest.multiFormatVersion must be ${NOYDB_MULTI_BUNDLE_VERSION}, got ${String(m["multiFormatVersion"])}.`);
273
- if (typeof m["handle"] !== "string" || m["handle"].length === 0) throw new Error("multi-bundle manifest.handle must be a non-empty string.");
274
- if (!Array.isArray(m["compartments"])) throw new Error("multi-bundle manifest.compartments must be an array.");
275
- const seenHandles = /* @__PURE__ */ new Set();
276
- for (const c of m["compartments"]) {
277
- if (c === null || typeof c !== "object") throw new Error("multi-bundle compartment must be an object.");
278
- const e = c;
279
- if (typeof e["handle"] !== "string" || e["handle"].length === 0) throw new Error("multi-bundle compartment.handle must be a non-empty string.");
280
- if (seenHandles.has(e["handle"])) {
281
- throw new Error(`multi-bundle manifest has a duplicate compartment handle "${e["handle"]}".`);
282
- }
283
- seenHandles.add(e["handle"]);
284
- if (typeof e["innerBytes"] !== "number" || !Number.isInteger(e["innerBytes"]) || e["innerBytes"] < 0) throw new Error("multi-bundle compartment.innerBytes must be a non-negative integer.");
285
- if (typeof e["innerSha256"] !== "string" || !/^[0-9a-f]{64}$/.test(e["innerSha256"])) throw new Error("multi-bundle compartment.innerSha256 must be 64-char lowercase hex.");
286
- }
287
- }
288
- function decodeMultiBundle(bytes) {
289
- if (!hasMultiMagic(bytes)) throw new Error("not a NOYDB multi-bundle: missing NDBM magic.");
290
- if (bytes.length < NOYDB_MULTI_BUNDLE_PREFIX_BYTES) throw new Error("multi-bundle truncated: shorter than the fixed prefix.");
291
- if (bytes[4] !== NOYDB_MULTI_BUNDLE_VERSION) throw new Error(`unsupported multi-bundle version ${String(bytes[4])}.`);
292
- const manifestLen = readUint32BE(bytes, 6);
293
- const manifestEnd = NOYDB_MULTI_BUNDLE_PREFIX_BYTES + manifestLen;
294
- if (manifestEnd > bytes.length) throw new Error("multi-bundle truncated: manifest length overruns the buffer.");
295
- const manifestJson = new TextDecoder("utf-8", { fatal: true }).decode(bytes.subarray(NOYDB_MULTI_BUNDLE_PREFIX_BYTES, manifestEnd));
296
- let parsed;
297
- try {
298
- parsed = JSON.parse(manifestJson);
299
- } catch (err) {
300
- throw new Error(`multi-bundle manifest is not valid JSON: ${err.message}`);
301
- }
302
- validateManifest(parsed);
303
- const inner = [];
304
- let off = manifestEnd;
305
- for (const c of parsed.compartments) {
306
- const end = off + c.innerBytes;
307
- if (end > bytes.length) throw new Error(`multi-bundle truncated: compartment "${c.handle}" innerBytes overruns the buffer.`);
308
- inner.push(bytes.subarray(off, end));
309
- off = end;
310
- }
311
- if (off !== bytes.length) {
312
- throw new Error(`multi-bundle: ${bytes.length - off} trailing byte(s) after the last compartment \u2014 buffer may be corrupt.`);
313
- }
314
- return { manifest: parsed, inner };
315
- }
316
- async function writeMultiVaultBundle(compartments, opts = {}) {
317
- if (compartments.length === 0) throw new Error("writeMultiVaultBundle: at least one compartment is required.");
318
- const inner = [];
319
- const entries = [];
320
- for (const c of compartments) {
321
- const innerBytes = await writeNoydbBundle(c.vault, c.bundleOptions ?? {});
322
- const header = readNoydbBundleHeader(innerBytes);
323
- const entry = {
324
- handle: header.handle,
325
- exportedAt: c.exportedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
326
- innerBytes: innerBytes.length,
327
- innerSha256: await sha256Hex(innerBytes)
328
- };
329
- if (c.roleTag !== void 0) entry.roleTag = c.roleTag;
330
- if (c.disclose?.name !== void 0 && c.disclose.name !== false) {
331
- entry.name = c.disclose.name === true ? c.vault.name : c.disclose.name;
332
- }
333
- if (c.disclose?.collections === true) {
334
- const names = await c.vault.collections();
335
- entry.collections = await Promise.all(
336
- names.map(async (n) => ({ name: n, count: await c.vault.collection(n).count() }))
337
- );
338
- }
339
- if (c.disclose?.publicEnvelope === true) {
340
- const env = readNoydbBundlePublicEnvelope(innerBytes);
341
- if (env !== void 0) entry.publicEnvelope = env;
342
- }
343
- const fence = await c.vault.schemaFenceState();
344
- entry.schemaVersion = fence.currentSchemaVersion;
345
- inner.push(innerBytes);
346
- entries.push(entry);
347
- }
348
- const manifest = {
349
- multiFormatVersion: NOYDB_MULTI_BUNDLE_VERSION,
350
- handle: opts.handle ?? generateULID(),
351
- compartments: entries
352
- };
353
- return encodeMultiBundle(manifest, inner);
354
- }
355
- async function readNoydbBundleManifest(bytes) {
356
- if (hasMultiMagic(bytes)) return [...decodeMultiBundle(bytes).manifest.compartments];
357
- if (hasNoydbBundleMagic(bytes)) {
358
- const header = readNoydbBundleHeader(bytes);
359
- const env = readNoydbBundlePublicEnvelope(bytes);
360
- const entry = {
361
- handle: header.handle,
362
- innerBytes: bytes.length,
363
- innerSha256: await sha256Hex(bytes)
364
- };
365
- if (env !== void 0) entry.publicEnvelope = env;
366
- return [entry];
367
- }
368
- throw new Error("readNoydbBundleManifest: not a NOYDB bundle (no NDB1 or NDBM magic).");
369
- }
370
- function readMultiVaultBundleCompartment(bytes, selector) {
371
- if (typeof selector === "number" && !Number.isInteger(selector)) {
372
- throw new Error(`readMultiVaultBundleCompartment: numeric selector must be an integer, got ${selector}.`);
373
- }
374
- if (hasNoydbBundleMagic(bytes) && !hasMultiMagic(bytes)) {
375
- const header = readNoydbBundleHeader(bytes);
376
- if (selector === 0 || selector === header.handle) return bytes;
377
- throw new Error(`readMultiVaultBundleCompartment: single v1 bundle has only compartment "${header.handle}".`);
378
- }
379
- const { manifest, inner } = decodeMultiBundle(bytes);
380
- const idx = typeof selector === "number" ? selector : manifest.compartments.findIndex((c) => c.handle === selector);
381
- if (idx < 0 || idx >= inner.length) throw new Error(`readMultiVaultBundleCompartment: no compartment ${typeof selector === "number" ? `at index ${selector}` : `"${selector}"`}.`);
382
- return inner[idx];
383
- }
384
-
385
226
  export {
386
227
  unsealDeks,
387
228
  adoptPartition,
388
229
  createOwnerOnAdoptedPartition,
389
- decryptExtractedPartition,
390
- NOYDB_MULTI_BUNDLE_MAGIC,
391
- NOYDB_MULTI_BUNDLE_PREFIX_BYTES,
392
- NOYDB_MULTI_BUNDLE_VERSION,
393
- encodeMultiBundle,
394
- decodeMultiBundle,
395
- writeMultiVaultBundle,
396
- readNoydbBundleManifest,
397
- readMultiVaultBundleCompartment
230
+ decryptExtractedPartition
398
231
  };
399
- //# sourceMappingURL=chunk-R43KS34V.js.map
232
+ //# sourceMappingURL=chunk-RZOGD7IF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/bundle/adopt-partition.ts","../src/bundle/decrypt-partition.ts"],"sourcesContent":["/**\n * Partition adoption. Recipient side: verify an extracted bundle,\n * validate the transfer key, import the re-keyed collections into a\n * destination store, and record an `_meta/adoption` marker. The bundle\n * stays UNOWNED after adoption — `createOwnerOnAdoptedPartition`\n * mints the owner; the transfer seal is then destroyed.\n *\n * @module\n */\nimport { base64ToBuffer, wrapKey } from '../crypto.js'\nimport { TransferSealError, AdoptionStateError, ValidationError } from '../errors.js'\nimport type { NoydbStore, VaultSnapshot, KeyringFile } from '../types.js'\nimport { createOwnerKeyring } from '../team/keyring.js'\nimport { resolveManagedSecret } from '../team/managed-passphrase.js'\nimport type { SealingKeyProvider } from '../team/managed-passphrase.js'\nimport type { ShamirRecoveryProvider } from '../team/shamir-recovery-provider.js'\nimport type { RecoveryEnrollmentInput } from '../team/rotate-recover.js'\nimport { LedgerStore } from '../history/ledger/store.js'\nimport { LEDGER_COLLECTION } from '../history/ledger/constants.js'\nimport type { TransferSealPayload } from './bundle.js'\nimport { readNoydbBundleHeader, readNoydbBundle, parseExtractedPartitionBody } from './bundle.js'\n\n/**\n * Reverse of `sealDeks`. Imports the transfer key, decrypts the\n * sealed `{ collection: base64(rawDEK) }` map (layout iv(12)‖ct‖tag), and\n * re-imports each DEK as an AES-GCM key. Throws `TransferSealError` on a\n * wrong key (AES-GCM auth-tag failure) or malformed payload.\n */\nexport async function unsealDeks(\n seal: TransferSealPayload,\n transferKey: Uint8Array,\n): Promise<Map<string, CryptoKey>> {\n if (transferKey.byteLength !== 32) {\n throw new TransferSealError(\n `transfer key must be 32 bytes, got ${transferKey.byteLength}.`,\n )\n }\n const key = await crypto.subtle.importKey('raw', transferKey as BufferSource, 'AES-GCM', false, ['decrypt'])\n const raw = base64ToBuffer(seal.payload)\n let plaintext: ArrayBuffer\n try {\n plaintext = await crypto.subtle.decrypt(\n { name: 'AES-GCM', iv: raw.slice(0, 12) as BufferSource },\n key,\n raw.slice(12) as BufferSource,\n )\n } catch {\n throw new TransferSealError(\n 'transfer seal could not be opened — wrong transfer key (AES-GCM authentication failed).',\n )\n }\n let dekMap: Record<string, string>\n try {\n dekMap = JSON.parse(new TextDecoder().decode(plaintext)) as Record<string, string>\n } catch {\n throw new TransferSealError('transfer seal payload is not valid JSON after decryption.')\n }\n const deks = new Map<string, CryptoKey>()\n for (const [collection, b64] of Object.entries(dekMap)) {\n // Extractable: the recipient must be able to re-wrap these under their\n // own KEK (AES-KW) at owner-creation. Matches generateDEK.\n const dek = await crypto.subtle.importKey('raw', base64ToBuffer(b64) as BufferSource, 'AES-GCM', true, ['encrypt', 'decrypt'])\n deks.set(collection, dek)\n }\n return deks\n}\n\nexport interface AdoptPartitionOptions {\n readonly transferKey: Uint8Array\n readonly destinationStore: NoydbStore\n readonly vaultName: string\n}\n\nexport interface AdoptPartitionResult {\n readonly vaultName: string\n readonly needsOwner: true\n readonly sealId: string\n}\n\nexport async function adoptPartition(\n bundleBytes: Uint8Array,\n opts: AdoptPartitionOptions,\n): Promise<AdoptPartitionResult> {\n const { transferKey, destinationStore, vaultName } = opts\n\n const header = readNoydbBundleHeader(bundleBytes)\n if (header.bundleKind !== 'extracted-partition' || header.transferSeal === undefined) {\n throw new ValidationError(\n 'adoptPartition requires an extracted-partition bundle with a transfer seal. '\n + 'For ordinary backups use readNoydbBundle + vault.load.',\n )\n }\n\n const { dumpJson } = await readNoydbBundle(bundleBytes)\n const { dump, seal } = parseExtractedPartitionBody(dumpJson)\n\n // Validate the transfer key by unsealing in memory; throws\n // TransferSealError on mismatch. DEKs are discarded here — they stay\n // sealed at rest (in _meta/adoption) until owner-creation wraps them under the\n // recipient's KEK.\n await unsealDeks(seal, transferKey)\n\n // Single-occupancy per vaultName: an `_meta/adoption` marker already present\n // means this slot holds a partition (adopted-and-unowned, or already owned).\n // saveAll below would overwrite its data and replace the marker, stranding the\n // prior adoption's transfer seal. Refuse regardless of sealId — re-adopting the\n // SAME bundle is a redundant call, and adopting a DIFFERENT bundle here would\n // clobber the existing partition. Either way, pick a fresh vaultName.\n const existing = await destinationStore.get(vaultName, '_meta', 'adoption')\n if (existing) {\n const prior = JSON.parse(existing._data) as { sealId?: string }\n if (prior.sealId === seal.sealId) {\n throw new AdoptionStateError(\n `partition (sealId ${seal.sealId}) is already adopted into vault \"${vaultName}\".`,\n )\n }\n throw new AdoptionStateError(\n `vault \"${vaultName}\" already holds an adopted partition (sealId ${prior.sealId}); `\n + `adopting a different partition (sealId ${seal.sealId}) here would overwrite it. `\n + `Adopt into a fresh vaultName instead.`,\n )\n }\n\n // The marker-only check above misses a worse case: a vaultName already in use\n // by an ORDINARY vault (createNoydb + openVault) carries no `_meta/adoption`,\n // yet `saveAll` below is destructive on SQL adapters (`DELETE FROM ... WHERE\n // vault = ?` followed by upsert) and would wipe the legitimate keyring +\n // data. Refuse adoption into ANY occupied slot — a fresh vaultName is the\n // documented precondition.\n const existingKeyring = await destinationStore.list(vaultName, '_keyring')\n if (existingKeyring.length > 0) {\n throw new AdoptionStateError(\n `vault \"${vaultName}\" already holds a keyring (an unrelated owner exists at this slot); `\n + `adoptPartition requires a fresh vaultName to avoid destructive saveAll on SQL adapters.`,\n )\n }\n\n const backup = JSON.parse(dump) as { collections: VaultSnapshot; _internal?: VaultSnapshot }\n await destinationStore.saveAll(vaultName, backup.collections)\n\n // Import carried internal collections (e.g. _schemas from carrySchemas).\n // saveAll only writes data collections; _internal is written per-record.\n if (backup._internal) {\n for (const [collection, records] of Object.entries(backup._internal)) {\n for (const [id, envelope] of Object.entries(records)) {\n await destinationStore.put(vaultName, collection, id, envelope)\n }\n }\n }\n\n const adoptedAt = new Date().toISOString()\n const adoption = { sealId: seal.sealId, adoptedAt, needsOwner: true as const, transferSeal: seal }\n await destinationStore.put(vaultName, '_meta', 'adoption', {\n _noydb: 1, _v: 1, _ts: adoptedAt, _iv: '', _data: JSON.stringify(adoption),\n })\n\n return { vaultName, needsOwner: true, sealId: seal.sealId }\n}\n\nexport interface CreateOwnerResult {\n readonly vaultName: string\n readonly userId: string\n}\n\n/** Standard-mode owner: recipient supplies the passphrase. */\nexport interface CreateOwnerStandardOptions {\n readonly userId: string\n readonly passphrase: string\n readonly transferKey: Uint8Array\n}\n\n/**\n * Managed-mode owner: the passphrase is minted + sealed under\n * a `SealingKeyProvider` (e.g. an `at-*` OS keychain) so the partition\n * auto-unlocks on the recipient's device. Managed mode mandates a strong\n * (Shamir) recovery profile at creation, which needs the\n * `shamirRecovery` provider injected.\n */\nexport interface CreateOwnerManagedOptions {\n readonly userId: string\n readonly passphraseMode: 'managed'\n readonly sealingKey: SealingKeyProvider\n readonly recovery: ReadonlyArray<RecoveryEnrollmentInput>\n readonly shamirRecovery: ShamirRecoveryProvider\n readonly transferKey: Uint8Array\n}\n\nexport type CreateOwnerOptions = CreateOwnerStandardOptions | CreateOwnerManagedOptions\n\nfunction isManaged(o: CreateOwnerOptions): o is CreateOwnerManagedOptions {\n return 'passphraseMode' in o && o.passphraseMode === 'managed'\n}\n\n/**\n * Mint the first owner keyring on an adopted-but-unowned partition,\n * then destroy the transfer seal.\n *\n * Standard mode: the recipient supplies a passphrase. Managed mode: the\n * passphrase is minted + sealed under a `SealingKeyProvider` and a strong\n * (Shamir) recovery profile is enrolled — orchestrated via the existing\n * `openVaultAndEnrollRecovery` ceremony.\n *\n * Either way, reuses `createOwnerKeyring` to derive the KEK + write the base\n * keyring, then wraps the partition's DEKs (recovered from the seal) under that\n * KEK and re-persists the merged keyring file.\n *\n * Idempotent under retry: the seal is destroyed LAST (Stage D), after the\n * keyring (Stage A), the ledger transition (Stage B), and — in managed mode —\n * strong-recovery enrollment (Stage C). A failure in the fallible enrollment\n * step leaves the seal intact, and re-running with the same `userId` +\n * `transferKey` resumes from the first incomplete stage. (Multi-profile recovery\n * arrays may re-enroll an already-enrolled profile on retry; managed mode's\n * mandated single Shamir profile does not.)\n */\nexport async function createOwnerOnAdoptedPartition(\n store: NoydbStore,\n vaultName: string,\n opts: CreateOwnerOptions,\n): Promise<CreateOwnerResult> {\n const { userId, transferKey } = opts\n\n // Managed mode requires a strong (Shamir) recovery profile, validated BEFORE\n // any disk write — same gate as createNoydb.\n if (isManaged(opts) && !opts.recovery.some((r) => r.profile === 'shamir')) {\n throw new AdoptionStateError(\n 'managed-mode adoption requires at least one strong (shamir) recovery profile in '\n + '`recovery` — paper alone is not strong when there is no user passphrase to fall back on.',\n )\n }\n\n // 1. Verify adopted-unowned state.\n const adoptionEnv = await store.get(vaultName, '_meta', 'adoption')\n if (!adoptionEnv) {\n throw new AdoptionStateError(\n `vault \"${vaultName}\" is not an adopted partition (no _meta/adoption). `\n + `createOwnerOnAdoptedPartition only applies to vaults created via adoptPartition.`,\n )\n }\n const adoption = JSON.parse(adoptionEnv._data) as {\n sealId: string; adoptedAt: string; needsOwner?: boolean\n consumedAt?: string; transferSeal?: TransferSealPayload\n }\n if (adoption.consumedAt !== undefined || adoption.transferSeal === undefined) {\n throw new AdoptionStateError(\n `vault \"${vaultName}\" already has an owner (transfer seal consumed at ${adoption.consumedAt}).`,\n )\n }\n\n // 2. Recover the partition DEKs from the seal (throws on wrong key) BEFORE\n // writing any keyring, so a bad transfer key leaves no trace. Always\n // validated, including when resuming a partial prior call.\n const partitionDeks = await unsealDeks(adoption.transferSeal, transferKey)\n\n // The ceremony below is split into stages so a failure in the fallible\n // managed-enrollment step (network/provider outage) leaves the call RETRYABLE\n // — the seal is destroyed only once everything durable is in place. Each stage\n // detects its own prior completion rather than relying on a single resume bit.\n\n // A keyring present for a DIFFERENT user (with the seal still unconsumed) is a\n // genuine second-owner attempt — refuse it. A same-user keyring is a resumed\n // partial call and is handled by the stage checks below.\n const existingKeyring = await store.get(vaultName, '_keyring', userId)\n const otherOwners = (await store.list(vaultName, '_keyring')).filter((u) => u !== userId)\n if (otherOwners.length > 0) {\n throw new AdoptionStateError(\n `vault \"${vaultName}\" already has a keyring for a different owner; cannot create owner \"${userId}\".`,\n )\n }\n\n // Stage A — mint the owner keyring + merge the partition DEKs. Considered done\n // only when the keyring already holds every partition DEK. createOwnerKeyring\n // overwrites (fresh KEK + fresh _users DEK), so re-running is safe ONLY while\n // no recovery has been enrolled yet — guaranteed here because enrollment\n // (Stage C) runs strictly after Stage A completes.\n const partitionCollections = [...partitionDeks.keys()]\n const priorDeks = existingKeyring ? (JSON.parse(existingKeyring._data) as KeyringFile).deks : {}\n const ownerMinted = existingKeyring !== null && partitionCollections.every((c) => c in priorDeks)\n if (!ownerMinted) {\n // Resolve the owner passphrase. Managed mode mints a random passphrase, seals\n // it under the provider, and persists _meta/sealed-passphrase (so the\n // partition auto-unlocks on the recipient's device); standard mode uses the\n // caller's passphrase. Idempotent under retry — resolveManagedSecret's reopen\n // arm reuses an already-sealed passphrase.\n const passphrase = isManaged(opts)\n ? await resolveManagedSecret(store, vaultName, opts.sealingKey)\n : opts.passphrase\n\n // Mint the owner keyring (KEK + _users DEK + canary, written to disk).\n const unlocked = await createOwnerKeyring(store, vaultName, userId, passphrase)\n\n // Merge the partition DEKs (wrapped under the new KEK) into the keyring.\n const env = await store.get(vaultName, '_keyring', userId)\n if (!env) throw new AdoptionStateError(`keyring write for \"${userId}\" did not persist`)\n const keyringFile = JSON.parse(env._data) as KeyringFile\n const kek = unlocked.kek\n if (!kek) throw new AdoptionStateError(`owner keyring for \"${userId}\" has no KEK to wrap partition DEKs under`)\n const mergedDeks: Record<string, string> = { ...keyringFile.deks }\n for (const [collection, dek] of partitionDeks) {\n mergedDeks[collection] = await wrapKey(dek, kek)\n }\n const mergedFile: KeyringFile = { ...keyringFile, deks: mergedDeks }\n await store.put(vaultName, '_keyring', userId, { ...env, _data: JSON.stringify(mergedFile) })\n }\n\n // Stage B — record the ownership transition on the carried\n // audit chain (carryLedger sealed the _ledger DEK). No-op without that DEK.\n // Idempotent: appended only if the closing `transfer-seal-consumed` entry is\n // absent, so a retry does not duplicate the pair.\n const ledgerDek = partitionDeks.get(LEDGER_COLLECTION)\n if (ledgerDek) {\n const ledger = new LedgerStore({\n adapter: store,\n vault: vaultName,\n encrypted: true,\n getDEK: async () => ledgerDek,\n actor: userId,\n })\n const creationReason = `creation-of-new-owner:${userId}`\n const consumedReason = `transfer-seal-consumed:${adoption.sealId}`\n // Gate each append on its own presence — a crash or store error strictly\n // between the two adjacent puts would otherwise re-append the first one\n // on retry. The pair is the audit record, not a single transaction.\n const recordedReasons = new Set((await ledger.loadAllEntries()).map((e) => e.reason))\n if (!recordedReasons.has(creationReason)) {\n await ledger.append({ op: 'lifecycle', collection: '', id: '', version: 0, actor: '', payloadHash: '', reason: creationReason })\n }\n if (!recordedReasons.has(consumedReason)) {\n await ledger.append({ op: 'lifecycle', collection: '', id: '', version: 0, actor: '', payloadHash: '', reason: consumedReason })\n }\n }\n\n // Stage C — Managed mode: enroll the mandatory strong recovery\n // by orchestrating the existing public ceremony. The partition is\n // now a managed-mode vault on disk (sealed passphrase + keyring), so we\n // open it as a normal client and let openVaultAndEnrollRecovery do the\n // gate-bypass + enroll + re-assert. Dynamic import keeps the Noydb class\n // out of the @noy-db/hub/bundle static graph. Runs BEFORE seal destruction\n // so a failure here leaves the seal intact and the call retryable.\n if (isManaged(opts)) {\n const { createNoydb } = await import('../noydb.js')\n const db = await createNoydb({\n store,\n user: userId,\n passphraseMode: 'managed',\n sealingKey: opts.sealingKey,\n shamirRecovery: opts.shamirRecovery,\n })\n await db.openVaultAndEnrollRecovery(vaultName, { recovery: opts.recovery })\n }\n\n // Stage D — Destroy the transfer seal LAST — the commit point. Everything\n // above is either idempotent or resumable, so the seal is only consumed\n // once the owner keyring (and, in managed mode, strong recovery) is\n // durably in place. Retain sealId + consumedAt for audit.\n const consumed = { sealId: adoption.sealId, adoptedAt: adoption.adoptedAt, consumedAt: new Date().toISOString() }\n await store.put(vaultName, '_meta', 'adoption', { ...adoptionEnv, _data: JSON.stringify(consumed) })\n\n return { vaultName, userId }\n}\n","/**\n * Read-side counterpart to `extractPartition`: decrypt an\n * extracted-partition bundle's records to plaintext using its transfer\n * key, WITHOUT adopting it into a vault. Used by an outward\n * orchestration layer's reconcile/merge and field-authority flows to\n * compare incoming records against a receiver. The transfer key validates the bundle\n * (wrong key throws).\n * @module\n */\nimport type { EncryptedEnvelope } from '../types.js'\nimport { decrypt } from '../crypto.js'\nimport { unwrapCek } from '../record-keys/index.js'\nimport { readNoydbBundleHeader, readNoydbBundle, parseExtractedPartitionBody } from './bundle.js'\nimport { unsealDeks } from './adopt-partition.js'\n\n/** One decrypted record from an extracted-partition compartment. */\nexport interface DecryptedRecord {\n readonly id: string\n readonly record: Record<string, unknown>\n /** Source envelope write timestamp (ISO) — for last-write-wins merges. */\n readonly ts: string\n /** Source envelope version. */\n readonly version: number\n /** Provenance source id (FR-5). Present only when the source collection had provenance:true and a source was supplied on put. */\n readonly source?: string\n /** ISO-8601 timestamp the provenance source was recorded (FR-5). */\n readonly sourceTs?: string\n}\n\n/**\n * Decrypt every record of an extracted-partition bundle to plaintext,\n * grouped by collection. Throws if the bundle isn't an\n * extracted-partition or the transfer key is wrong.\n */\nexport async function decryptExtractedPartition(\n bundleBytes: Uint8Array,\n transferKey: Uint8Array,\n): Promise<Record<string, DecryptedRecord[]>> {\n const header = readNoydbBundleHeader(bundleBytes)\n if (header.bundleKind !== 'extracted-partition' || header.transferSeal === undefined) {\n throw new Error('decryptExtractedPartition: bundle is not an extracted-partition.')\n }\n const { dumpJson } = await readNoydbBundle(bundleBytes)\n const { dump, seal } = parseExtractedPartitionBody(dumpJson)\n const deks = await unsealDeks(seal, transferKey) // throws TransferSealError on wrong key\n const backup = JSON.parse(dump) as { collections: Record<string, Record<string, EncryptedEnvelope>> }\n const out: Record<string, DecryptedRecord[]> = {}\n for (const [collection, byId] of Object.entries(backup.collections)) {\n const dek = deks.get(collection)\n if (dek === undefined) continue // no DEK sealed for this collection — skip\n const recs: DecryptedRecord[] = []\n for (const [id, env] of Object.entries(byId)) {\n const plaintext = env._cek !== undefined\n ? await decrypt(env._iv, env._data, await unwrapCek(env._cek, dek))\n : await decrypt(env._iv, env._data, dek)\n const body = JSON.parse(plaintext) as Record<string, unknown>\n recs.push({\n id,\n record: { ...body, id },\n ts: env._ts,\n version: env._v,\n ...(env._source !== undefined ? { source: env._source } : {}),\n ...(env._sourceTs !== undefined ? { sourceTs: env._sourceTs } : {}),\n })\n }\n out[collection] = recs\n }\n return out\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,eAAsB,WACpB,MACA,aACiC;AACjC,MAAI,YAAY,eAAe,IAAI;AACjC,UAAM,IAAI;AAAA,MACR,sCAAsC,YAAY,UAAU;AAAA,IAC9D;AAAA,EACF;AACA,QAAM,MAAM,MAAM,OAAO,OAAO,UAAU,OAAO,aAA6B,WAAW,OAAO,CAAC,SAAS,CAAC;AAC3G,QAAM,MAAM,eAAe,KAAK,OAAO;AACvC,MAAI;AACJ,MAAI;AACF,gBAAY,MAAM,OAAO,OAAO;AAAA,MAC9B,EAAE,MAAM,WAAW,IAAI,IAAI,MAAM,GAAG,EAAE,EAAkB;AAAA,MACxD;AAAA,MACA,IAAI,MAAM,EAAE;AAAA,IACd;AAAA,EACF,QAAQ;AACN,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI;AACJ,MAAI;AACF,aAAS,KAAK,MAAM,IAAI,YAAY,EAAE,OAAO,SAAS,CAAC;AAAA,EACzD,QAAQ;AACN,UAAM,IAAI,kBAAkB,2DAA2D;A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
5
5
  // src/derivations/with-derivation.ts
6
6
  function withDerivation(spec) {
@@ -126,4 +126,4 @@ export {
126
126
  withDerivation,
127
127
  withRollup
128
128
  };
129
- //# sourceMappingURL=chunk-IHAISFXP.js.map
129
+ //# sourceMappingURL=chunk-SKYBEGHB.js.map
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  base64ToBuffer,
6
6
  bufferToBase64
7
- } from "./chunk-WQ3KAGOV.js";
7
+ } from "./chunk-7JSP3E67.js";
8
8
  import {
9
9
  SessionExpiredError,
10
10
  SessionNotFoundError,
11
11
  SessionPolicyError,
12
12
  ValidationError
13
- } from "./chunk-4BB4T3O7.js";
13
+ } from "./chunk-DDOYOMAD.js";
14
14
 
15
15
  // src/session/session.ts
16
16
  var subtle = globalThis.crypto.subtle;
@@ -364,4 +364,4 @@ export {
364
364
  clearDevUnlock,
365
365
  isDevUnlockActive
366
366
  };
367
- //# sourceMappingURL=chunk-SOQE5DUV.js.map
367
+ //# sourceMappingURL=chunk-TESFHBOW.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  decrypt,
6
6
  encrypt
7
- } from "./chunk-WQ3KAGOV.js";
7
+ } from "./chunk-7JSP3E67.js";
8
8
 
9
9
  // src/forget/strategy.ts
10
10
  var NO_FORGET = { subjects: {} };
@@ -122,4 +122,4 @@ export {
122
122
  coerceSubjectId,
123
123
  readDottedPath
124
124
  };
125
- //# sourceMappingURL=chunk-35U5YNRR.js.map
125
+ //# sourceMappingURL=chunk-TSUICI5N.js.map
@@ -12,7 +12,7 @@ import {
12
12
  generateSalt,
13
13
  unwrapKey,
14
14
  wrapKey
15
- } from "./chunk-WQ3KAGOV.js";
15
+ } from "./chunk-7JSP3E67.js";
16
16
  import {
17
17
  ConflictError,
18
18
  DirectoryDisabledError,
@@ -24,7 +24,7 @@ import {
24
24
  PermissionDeniedError,
25
25
  PrivilegeEscalationError,
26
26
  ValidationError
27
- } from "./chunk-4BB4T3O7.js";
27
+ } from "./chunk-DDOYOMAD.js";
28
28
 
29
29
  // src/directory/storage.ts
30
30
  var META_COLLECTION = "_meta";
@@ -902,4 +902,4 @@ export {
902
902
  hasImportCapability,
903
903
  evaluateImportCapability
904
904
  };
905
- //# sourceMappingURL=chunk-B5CSNGSE.js.map
905
+ //# sourceMappingURL=chunk-UNBX2HMA.js.map
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-LR7CODVN.js";
4
4
  import {
5
5
  decrypt
6
- } from "./chunk-WQ3KAGOV.js";
6
+ } from "./chunk-7JSP3E67.js";
7
7
  import {
8
8
  ReadOnlyAtInstantError
9
- } from "./chunk-4BB4T3O7.js";
9
+ } from "./chunk-DDOYOMAD.js";
10
10
 
11
11
  // src/history/history.ts
12
12
  var HISTORY_COLLECTION = "_history";
@@ -335,4 +335,4 @@ export {
335
335
  diff,
336
336
  formatDiff
337
337
  };
338
- //# sourceMappingURL=chunk-C472BRJ4.js.map
338
+ //# sourceMappingURL=chunk-VGAN5RLD.js.map