@noy-db/hub 0.3.0-pre.7 → 0.3.0-pre.8

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 (240) hide show
  1. package/dist/adapter/index.d.ts +1 -1
  2. package/dist/aggregate/index.d.ts +2 -2
  3. package/dist/{api-Z66JMGOU.js → api-JDWL67WL.js} +6 -6
  4. package/dist/as/index.d.ts +3 -3
  5. package/dist/as/index.js +5 -5
  6. package/dist/at/index.d.ts +1 -1
  7. package/dist/attestation/index.d.ts +2 -2
  8. package/dist/attestation/index.js +12 -12
  9. package/dist/{backup-7PX6NDKT.js → backup-WRGNTGJF.js} +6 -6
  10. package/dist/blobs/index.d.ts +3 -3
  11. package/dist/blobs/index.js +5 -5
  12. package/dist/bundle/index.d.ts +4 -4
  13. package/dist/bundle/index.js +14 -14
  14. package/dist/{bundle-BN_VSq5L.d.ts → bundle-DzWtVw7w.d.ts} +1 -1
  15. package/dist/cargo/index.d.ts +3 -3
  16. package/dist/cargo/index.js +13 -13
  17. package/dist/{chunk-2L7PPF2C.js → chunk-25G7PUTA.js} +7 -7
  18. package/dist/{chunk-7AERMJP6.js → chunk-2PJB6H3H.js} +2 -2
  19. package/dist/{chunk-YSU2E4GZ.js → chunk-37JZR7CY.js} +18 -5
  20. package/dist/chunk-37JZR7CY.js.map +1 -0
  21. package/dist/{chunk-DJ4TNF4N.js → chunk-3KBK5LU4.js} +3 -3
  22. package/dist/{chunk-62TTFKU4.js → chunk-3YKBGS3I.js} +4 -4
  23. package/dist/{chunk-YSJG4L4A.js → chunk-44DV37ZV.js} +2 -2
  24. package/dist/{chunk-E3LURVGQ.js → chunk-4VDFUBTS.js} +3 -3
  25. package/dist/{chunk-5K7KZMXG.js → chunk-56JB2BGI.js} +355 -74
  26. package/dist/chunk-56JB2BGI.js.map +1 -0
  27. package/dist/{chunk-IEKK2XI4.js → chunk-5HRJQSKN.js} +3 -3
  28. package/dist/{chunk-PE25C4QL.js → chunk-5YBUFCFF.js} +5 -5
  29. package/dist/{chunk-J54DC5IC.js → chunk-62APEMF3.js} +3 -3
  30. package/dist/{chunk-RUWEHFRB.js → chunk-723XB5NX.js} +3 -3
  31. package/dist/{chunk-JIW3Q5JN.js → chunk-7TAV3BFQ.js} +3 -3
  32. package/dist/{chunk-CND5WQLO.js → chunk-BJ2XF2RC.js} +3 -3
  33. package/dist/{chunk-H3MPSYCH.js → chunk-BM6E4MUT.js} +3 -3
  34. package/dist/{chunk-NO53W6O5.js → chunk-BTFTHF6Q.js} +2 -2
  35. package/dist/{chunk-DKGZIX6S.js → chunk-DCVVCJVB.js} +2 -2
  36. package/dist/{chunk-AG2PLGQ2.js → chunk-F3EKFGUS.js} +4 -4
  37. package/dist/{chunk-VUHXLL32.js → chunk-FWART3VA.js} +2 -2
  38. package/dist/{chunk-3CHNKEFI.js → chunk-FZK3JJJK.js} +3 -3
  39. package/dist/{chunk-VFG5YXWM.js → chunk-GDOOG5YQ.js} +2 -2
  40. package/dist/{chunk-T4NQMPBN.js → chunk-GLVXQU3E.js} +2 -2
  41. package/dist/{chunk-RHB7BOEO.js → chunk-I6URUNTD.js} +3 -3
  42. package/dist/{chunk-K6WHZBCO.js → chunk-IARAK3PK.js} +2 -2
  43. package/dist/{chunk-OFYY5Q4R.js → chunk-J5YUA6JB.js} +2 -2
  44. package/dist/{chunk-7F2P2NHX.js → chunk-J7OH6R4K.js} +3 -3
  45. package/dist/{chunk-WRLPV6SI.js → chunk-L6Q5NA22.js} +2 -2
  46. package/dist/{chunk-7L6EH6S7.js → chunk-M3OYTM5Z.js} +4 -4
  47. package/dist/{chunk-WGH3YV6Y.js → chunk-NTPWQH4S.js} +5 -5
  48. package/dist/{chunk-H7WQMGXH.js → chunk-P2PEPSPK.js} +2 -2
  49. package/dist/{chunk-J5YDMJHG.js → chunk-P6TZ3IVN.js} +7 -7
  50. package/dist/{chunk-WFBZRXS5.js → chunk-PMMV5SQC.js} +5 -5
  51. package/dist/{chunk-I6Q7YECW.js → chunk-PPPZIBKY.js} +2 -2
  52. package/dist/{chunk-HGQ6UNHE.js → chunk-PVC2FBCQ.js} +2 -2
  53. package/dist/{chunk-HBVEGUON.js → chunk-QABECTNN.js} +2 -2
  54. package/dist/{chunk-HV3VNAYI.js → chunk-QYMMMKOO.js} +4 -4
  55. package/dist/{chunk-AZPGB4OD.js → chunk-R4IVPJHN.js} +3 -3
  56. package/dist/{chunk-HCK2DFEK.js → chunk-REWTMYSF.js} +1 -1
  57. package/dist/{chunk-HCK2DFEK.js.map → chunk-REWTMYSF.js.map} +1 -1
  58. package/dist/{chunk-UJJJPKJO.js → chunk-TCGVRKOS.js} +2 -2
  59. package/dist/{chunk-U5IJHUHZ.js → chunk-TIAYXOEI.js} +2 -2
  60. package/dist/{chunk-GMZFHDSG.js → chunk-TUL5YQWF.js} +3 -3
  61. package/dist/{chunk-G5CFMITA.js → chunk-UMH35AQV.js} +2 -2
  62. package/dist/{chunk-VMRXI3IF.js → chunk-VVLOWY74.js} +3 -3
  63. package/dist/{chunk-WJEMUO32.js → chunk-W3JABOVB.js} +2 -2
  64. package/dist/{chunk-QAVFI23O.js → chunk-WPNP3NF5.js} +4 -4
  65. package/dist/{chunk-JT4A6OAJ.js → chunk-X5QZAJDB.js} +3 -3
  66. package/dist/{chunk-QYNBPDGO.js → chunk-X6VNIRHS.js} +2 -2
  67. package/dist/{chunk-CP3GUIAN.js → chunk-XBPUVQDO.js} +8 -8
  68. package/dist/classified/index.d.ts +3 -3
  69. package/dist/classified/index.js +1 -1
  70. package/dist/{collection-facade-JP6N7USE.js → collection-facade-EJVIN2BY.js} +9 -9
  71. package/dist/{config-drift-LRKCC3VZ.js → config-drift-RFEVGBKR.js} +3 -3
  72. package/dist/consent/index.d.ts +2 -2
  73. package/dist/consent/index.js +4 -4
  74. package/dist/crdt/index.d.ts +2 -2
  75. package/dist/{dead-filter-NZORV45S.js → dead-filter-RHMNYOXP.js} +2 -2
  76. package/dist/{delegation-FDOXXHNG.js → delegation-IHXOASHV.js} +5 -5
  77. package/dist/derivations/index.d.ts +3 -3
  78. package/dist/derivations/index.js +3 -3
  79. package/dist/{derive-JR2C5JFG.js → derive-CD3ZVIXK.js} +4 -4
  80. package/dist/{dev-unlock-CsOqX7O2.d.ts → dev-unlock-wgQ7Ci5I.d.ts} +1 -1
  81. package/dist/{enclave-7X5BUAMS.js → enclave-KGEUW2GL.js} +4 -4
  82. package/dist/{executor-6LHOV7MN.js → executor-MHUM2VZK.js} +4 -4
  83. package/dist/{export-accessible-7XLSZBGJ.js → export-accessible-Z3NSZZHN.js} +7 -7
  84. package/dist/{extract-partition-RM6EROS5.js → extract-partition-VSKT35JG.js} +10 -10
  85. package/dist/{fanout-sidecar-BDKLP5GG.js → fanout-sidecar-NBDKKCHT.js} +4 -4
  86. package/dist/forget/index.js +4 -4
  87. package/dist/guards/index.d.ts +3 -3
  88. package/dist/{hash-BPzm02Za.d.ts → hash-CwHnoKyW.d.ts} +1 -1
  89. package/dist/history/index.d.ts +3 -3
  90. package/dist/history/index.js +6 -6
  91. package/dist/i18n/index.d.ts +2 -2
  92. package/dist/i18n/index.js +7 -7
  93. package/dist/in/index.d.ts +1 -1
  94. package/dist/{index-CLucFLeN.d.ts → index-CTvUp94-.d.ts} +2 -2
  95. package/dist/{index-BJ3L-XcV.d.ts → index-Dn5GzPg_.d.ts} +243 -9
  96. package/dist/index.d.ts +26 -19
  97. package/dist/index.js +52 -51
  98. package/dist/index.js.map +1 -1
  99. package/dist/indexing/index.d.ts +2 -2
  100. package/dist/{issue-FJE2IHUI.js → issue-AEOL6RXA.js} +6 -6
  101. package/dist/kernel/index.d.ts +2 -2
  102. package/dist/kernel/index.js +3 -3
  103. package/dist/lazy/index.d.ts +2 -2
  104. package/dist/{ledger-EMDHRJJN.js → ledger-3LR3YO2W.js} +6 -6
  105. package/dist/liberate-XSEPRWEA.js +24 -0
  106. package/dist/{link-set-62Y36TOG.js → link-set-NSUIX6BR.js} +5 -5
  107. package/dist/materialized-views/index.d.ts +3 -3
  108. package/dist/materialized-views/index.js +4 -4
  109. package/dist/{mime-magic-BlE9fzn2.d.ts → mime-magic-CYbFNQ4h.d.ts} +1 -1
  110. package/dist/{noydb-4ZASGII5.js → noydb-POVTIVQ6.js} +23 -23
  111. package/dist/on/index.d.ts +1 -1
  112. package/dist/on/index.js +4 -4
  113. package/dist/overlay-views/index.d.ts +3 -3
  114. package/dist/periods/index.d.ts +2 -2
  115. package/dist/periods/index.js +15 -7
  116. package/dist/pod/index.d.ts +2 -2
  117. package/dist/pod/index.js +5 -5
  118. package/dist/{policy-SXPLTQS4.js → policy-Y7HL2KGA.js} +4 -4
  119. package/dist/portability/index.d.ts +2 -2
  120. package/dist/portability/index.js +6 -6
  121. package/dist/{post-register-DCJ2SRVG.js → post-register-KOFRTCDD.js} +4 -4
  122. package/dist/{public-envelope-CBRIJORQ.js → public-envelope-NC7SPNMV.js} +3 -3
  123. package/dist/query/index.d.ts +1 -1
  124. package/dist/{register-5NRE7HBZ.js → register-3D6R2MKN.js} +6 -6
  125. package/dist/{registry-DYTNLOJC.js → registry-AI4E46PD.js} +4 -4
  126. package/dist/{registry-5QLETK3Q.js → registry-WIX6QCV5.js} +4 -4
  127. package/dist/{request-withdrawal-5APB7RKN.js → request-withdrawal-GU4XS2R5.js} +9 -9
  128. package/dist/{reveal-R5N7JKA5.js → reveal-5Y777N5Q.js} +3 -3
  129. package/dist/{revoke-VELFCK7S.js → revoke-ZFETCLYV.js} +6 -6
  130. package/dist/satellites/index.d.ts +1 -1
  131. package/dist/sealed-record/index.d.ts +2 -2
  132. package/dist/sealed-record/index.js +6 -6
  133. package/dist/session/index.d.ts +3 -3
  134. package/dist/session/index.js +3 -3
  135. package/dist/shadow/index.d.ts +2 -2
  136. package/dist/{signer-IVU3B6DP.js → signer-GAIMQQ2J.js} +5 -5
  137. package/dist/snapshots/index.d.ts +2 -2
  138. package/dist/snapshots/index.js +5 -5
  139. package/dist/{stale-DP66HFT3.js → stale-77LP2EEF.js} +2 -2
  140. package/dist/{storage-RH5VBLLL.js → storage-KEXIXLGM.js} +5 -5
  141. package/dist/{store-coordination-provider-F5N5ASDF.js → store-coordination-provider-NJDDZ264.js} +3 -3
  142. package/dist/sync/index.d.ts +1 -1
  143. package/dist/sync/index.js +4 -4
  144. package/dist/team/index.d.ts +2 -2
  145. package/dist/team/index.js +9 -9
  146. package/dist/tiers/index.d.ts +1 -1
  147. package/dist/tiers/index.js +4 -4
  148. package/dist/to/index.d.ts +1 -1
  149. package/dist/{transition-guard-BzsAQEd-.d.ts → transition-guard-D5RLJv8S.d.ts} +1 -1
  150. package/dist/tx/index.d.ts +2 -2
  151. package/dist/{validators-DGmYFP51.d.ts → validators-C3lrVF-c.d.ts} +1 -1
  152. package/dist/{vault-diff-DmBBatkx.d.ts → vault-diff-_LSIcOMv.d.ts} +1 -1
  153. package/dist/{walk-3SB25HF2.js → walk-SMAE4IEI.js} +5 -5
  154. package/dist/with/index.d.ts +2 -2
  155. package/dist/with/index.js +6 -6
  156. package/dist/{with-materialized-view-DPEVoGoB.d.ts → with-materialized-view-Xv1-9Bh0.d.ts} +1 -1
  157. package/dist/{with-overlayed-view-DGpKFSv1.d.ts → with-overlayed-view-CuWhq_-C.d.ts} +1 -1
  158. package/dist/{with-rollup-B2RwnTq0.d.ts → with-rollup-K_iwal4b.d.ts} +1 -1
  159. package/dist/{withdraw-accessible-LN4AOJDD.js → withdraw-accessible-Q7BULAN5.js} +8 -8
  160. package/package.json +3 -3
  161. package/dist/chunk-5K7KZMXG.js.map +0 -1
  162. package/dist/chunk-YSU2E4GZ.js.map +0 -1
  163. package/dist/liberate-HFIPHJGR.js +0 -24
  164. /package/dist/{api-Z66JMGOU.js.map → api-JDWL67WL.js.map} +0 -0
  165. /package/dist/{backup-7PX6NDKT.js.map → backup-WRGNTGJF.js.map} +0 -0
  166. /package/dist/{chunk-2L7PPF2C.js.map → chunk-25G7PUTA.js.map} +0 -0
  167. /package/dist/{chunk-7AERMJP6.js.map → chunk-2PJB6H3H.js.map} +0 -0
  168. /package/dist/{chunk-DJ4TNF4N.js.map → chunk-3KBK5LU4.js.map} +0 -0
  169. /package/dist/{chunk-62TTFKU4.js.map → chunk-3YKBGS3I.js.map} +0 -0
  170. /package/dist/{chunk-YSJG4L4A.js.map → chunk-44DV37ZV.js.map} +0 -0
  171. /package/dist/{chunk-E3LURVGQ.js.map → chunk-4VDFUBTS.js.map} +0 -0
  172. /package/dist/{chunk-IEKK2XI4.js.map → chunk-5HRJQSKN.js.map} +0 -0
  173. /package/dist/{chunk-PE25C4QL.js.map → chunk-5YBUFCFF.js.map} +0 -0
  174. /package/dist/{chunk-J54DC5IC.js.map → chunk-62APEMF3.js.map} +0 -0
  175. /package/dist/{chunk-RUWEHFRB.js.map → chunk-723XB5NX.js.map} +0 -0
  176. /package/dist/{chunk-JIW3Q5JN.js.map → chunk-7TAV3BFQ.js.map} +0 -0
  177. /package/dist/{chunk-CND5WQLO.js.map → chunk-BJ2XF2RC.js.map} +0 -0
  178. /package/dist/{chunk-H3MPSYCH.js.map → chunk-BM6E4MUT.js.map} +0 -0
  179. /package/dist/{chunk-NO53W6O5.js.map → chunk-BTFTHF6Q.js.map} +0 -0
  180. /package/dist/{chunk-DKGZIX6S.js.map → chunk-DCVVCJVB.js.map} +0 -0
  181. /package/dist/{chunk-AG2PLGQ2.js.map → chunk-F3EKFGUS.js.map} +0 -0
  182. /package/dist/{chunk-VUHXLL32.js.map → chunk-FWART3VA.js.map} +0 -0
  183. /package/dist/{chunk-3CHNKEFI.js.map → chunk-FZK3JJJK.js.map} +0 -0
  184. /package/dist/{chunk-VFG5YXWM.js.map → chunk-GDOOG5YQ.js.map} +0 -0
  185. /package/dist/{chunk-T4NQMPBN.js.map → chunk-GLVXQU3E.js.map} +0 -0
  186. /package/dist/{chunk-RHB7BOEO.js.map → chunk-I6URUNTD.js.map} +0 -0
  187. /package/dist/{chunk-K6WHZBCO.js.map → chunk-IARAK3PK.js.map} +0 -0
  188. /package/dist/{chunk-OFYY5Q4R.js.map → chunk-J5YUA6JB.js.map} +0 -0
  189. /package/dist/{chunk-7F2P2NHX.js.map → chunk-J7OH6R4K.js.map} +0 -0
  190. /package/dist/{chunk-WRLPV6SI.js.map → chunk-L6Q5NA22.js.map} +0 -0
  191. /package/dist/{chunk-7L6EH6S7.js.map → chunk-M3OYTM5Z.js.map} +0 -0
  192. /package/dist/{chunk-WGH3YV6Y.js.map → chunk-NTPWQH4S.js.map} +0 -0
  193. /package/dist/{chunk-H7WQMGXH.js.map → chunk-P2PEPSPK.js.map} +0 -0
  194. /package/dist/{chunk-J5YDMJHG.js.map → chunk-P6TZ3IVN.js.map} +0 -0
  195. /package/dist/{chunk-WFBZRXS5.js.map → chunk-PMMV5SQC.js.map} +0 -0
  196. /package/dist/{chunk-I6Q7YECW.js.map → chunk-PPPZIBKY.js.map} +0 -0
  197. /package/dist/{chunk-HGQ6UNHE.js.map → chunk-PVC2FBCQ.js.map} +0 -0
  198. /package/dist/{chunk-HBVEGUON.js.map → chunk-QABECTNN.js.map} +0 -0
  199. /package/dist/{chunk-HV3VNAYI.js.map → chunk-QYMMMKOO.js.map} +0 -0
  200. /package/dist/{chunk-AZPGB4OD.js.map → chunk-R4IVPJHN.js.map} +0 -0
  201. /package/dist/{chunk-UJJJPKJO.js.map → chunk-TCGVRKOS.js.map} +0 -0
  202. /package/dist/{chunk-U5IJHUHZ.js.map → chunk-TIAYXOEI.js.map} +0 -0
  203. /package/dist/{chunk-GMZFHDSG.js.map → chunk-TUL5YQWF.js.map} +0 -0
  204. /package/dist/{chunk-G5CFMITA.js.map → chunk-UMH35AQV.js.map} +0 -0
  205. /package/dist/{chunk-VMRXI3IF.js.map → chunk-VVLOWY74.js.map} +0 -0
  206. /package/dist/{chunk-WJEMUO32.js.map → chunk-W3JABOVB.js.map} +0 -0
  207. /package/dist/{chunk-QAVFI23O.js.map → chunk-WPNP3NF5.js.map} +0 -0
  208. /package/dist/{chunk-JT4A6OAJ.js.map → chunk-X5QZAJDB.js.map} +0 -0
  209. /package/dist/{chunk-QYNBPDGO.js.map → chunk-X6VNIRHS.js.map} +0 -0
  210. /package/dist/{chunk-CP3GUIAN.js.map → chunk-XBPUVQDO.js.map} +0 -0
  211. /package/dist/{collection-facade-JP6N7USE.js.map → collection-facade-EJVIN2BY.js.map} +0 -0
  212. /package/dist/{config-drift-LRKCC3VZ.js.map → config-drift-RFEVGBKR.js.map} +0 -0
  213. /package/dist/{dead-filter-NZORV45S.js.map → dead-filter-RHMNYOXP.js.map} +0 -0
  214. /package/dist/{delegation-FDOXXHNG.js.map → delegation-IHXOASHV.js.map} +0 -0
  215. /package/dist/{derive-JR2C5JFG.js.map → derive-CD3ZVIXK.js.map} +0 -0
  216. /package/dist/{enclave-7X5BUAMS.js.map → enclave-KGEUW2GL.js.map} +0 -0
  217. /package/dist/{executor-6LHOV7MN.js.map → executor-MHUM2VZK.js.map} +0 -0
  218. /package/dist/{export-accessible-7XLSZBGJ.js.map → export-accessible-Z3NSZZHN.js.map} +0 -0
  219. /package/dist/{extract-partition-RM6EROS5.js.map → extract-partition-VSKT35JG.js.map} +0 -0
  220. /package/dist/{fanout-sidecar-BDKLP5GG.js.map → fanout-sidecar-NBDKKCHT.js.map} +0 -0
  221. /package/dist/{issue-FJE2IHUI.js.map → issue-AEOL6RXA.js.map} +0 -0
  222. /package/dist/{ledger-EMDHRJJN.js.map → ledger-3LR3YO2W.js.map} +0 -0
  223. /package/dist/{liberate-HFIPHJGR.js.map → liberate-XSEPRWEA.js.map} +0 -0
  224. /package/dist/{link-set-62Y36TOG.js.map → link-set-NSUIX6BR.js.map} +0 -0
  225. /package/dist/{noydb-4ZASGII5.js.map → noydb-POVTIVQ6.js.map} +0 -0
  226. /package/dist/{policy-SXPLTQS4.js.map → policy-Y7HL2KGA.js.map} +0 -0
  227. /package/dist/{post-register-DCJ2SRVG.js.map → post-register-KOFRTCDD.js.map} +0 -0
  228. /package/dist/{public-envelope-CBRIJORQ.js.map → public-envelope-NC7SPNMV.js.map} +0 -0
  229. /package/dist/{register-5NRE7HBZ.js.map → register-3D6R2MKN.js.map} +0 -0
  230. /package/dist/{registry-5QLETK3Q.js.map → registry-AI4E46PD.js.map} +0 -0
  231. /package/dist/{registry-DYTNLOJC.js.map → registry-WIX6QCV5.js.map} +0 -0
  232. /package/dist/{request-withdrawal-5APB7RKN.js.map → request-withdrawal-GU4XS2R5.js.map} +0 -0
  233. /package/dist/{reveal-R5N7JKA5.js.map → reveal-5Y777N5Q.js.map} +0 -0
  234. /package/dist/{revoke-VELFCK7S.js.map → revoke-ZFETCLYV.js.map} +0 -0
  235. /package/dist/{signer-IVU3B6DP.js.map → signer-GAIMQQ2J.js.map} +0 -0
  236. /package/dist/{stale-DP66HFT3.js.map → stale-77LP2EEF.js.map} +0 -0
  237. /package/dist/{storage-RH5VBLLL.js.map → storage-KEXIXLGM.js.map} +0 -0
  238. /package/dist/{store-coordination-provider-F5N5ASDF.js.map → store-coordination-provider-NJDDZ264.js.map} +0 -0
  239. /package/dist/{walk-3SB25HF2.js.map → walk-SMAE4IEI.js.map} +0 -0
  240. /package/dist/{withdraw-accessible-LN4AOJDD.js.map → withdraw-accessible-Q7BULAN5.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- export { dq as BundleVersionConflictError, f0 as ConflictError, cV as EncryptedEnvelope, gy as ListPageResult, h5 as NetworkError, hb as NoydbBundleStore, cT as NoydbStore, iX as StoreCapabilities, iY as StoreCapabilityError, iZ as StoreTime, jn as TxOp, jC as VaultSnapshot } from '../index-BJ3L-XcV.js';
1
+ export { dy as BundleVersionConflictError, f8 as ConflictError, d1 as EncryptedEnvelope, gG as ListPageResult, hd as NetworkError, hj as NoydbBundleStore, c$ as NoydbStore, j3 as StoreCapabilities, j4 as StoreCapabilityError, j5 as StoreTime, jv as TxOp, jK as VaultSnapshot } from '../index-Dn5GzPg_.js';
2
2
  import '../subject-index-O75wKshW.js';
3
3
  import '../describe-C6iHNlqJ.js';
4
4
  import '../index-B9QdHytu.js';
@@ -1,5 +1,5 @@
1
- import { aO as AggregateStrategy } from '../index-BJ3L-XcV.js';
2
- export { aP as AggregateResult, aQ as AggregateSpec, aR as Aggregation, aS as AggregationUpstream, aT as GROUPBY_MAX_CARDINALITY, aU as GROUPBY_WARN_CARDINALITY, aV as GroupedAggregation, aW as GroupedQuery, aX as GroupedQueryN, aY as GroupedRow, aZ as GroupedRowN, a_ as LiveAggregation, a$ as Reducer, b0 as ReducerBuilder, b1 as ReducerOptions, b2 as avg, b3 as buildLiveAggregation, b4 as count, b5 as groupAndReduce, b6 as max, b7 as min, b8 as moneyMax, b9 as moneyMin, ba as moneySum, bb as reduceRecords, bc as reducerBuilder, bd as resetGroupByWarnings, be as sum } from '../index-BJ3L-XcV.js';
1
+ import { aO as AggregateStrategy } from '../index-Dn5GzPg_.js';
2
+ export { aP as AggregateResult, aQ as AggregateSpec, aR as Aggregation, aS as AggregationUpstream, aT as GROUPBY_MAX_CARDINALITY, aU as GROUPBY_WARN_CARDINALITY, aV as GroupedAggregation, aW as GroupedQuery, aX as GroupedQueryN, aY as GroupedRow, aZ as GroupedRowN, a_ as LiveAggregation, a$ as Reducer, b0 as ReducerBuilder, b1 as ReducerOptions, b2 as avg, b3 as buildLiveAggregation, b4 as count, b5 as groupAndReduce, b6 as max, b7 as min, b8 as moneyMax, b9 as moneyMin, ba as moneySum, bb as reduceRecords, bc as reducerBuilder, bd as resetGroupByWarnings, be as sum } from '../index-Dn5GzPg_.js';
3
3
  import '../subject-index-O75wKshW.js';
4
4
  import '../describe-C6iHNlqJ.js';
5
5
  import '../index-B9QdHytu.js';
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  UserApi,
3
3
  createUserApi
4
- } from "./chunk-VFG5YXWM.js";
5
- import "./chunk-3CHNKEFI.js";
6
- import "./chunk-JIW3Q5JN.js";
7
- import "./chunk-HGQ6UNHE.js";
4
+ } from "./chunk-GDOOG5YQ.js";
5
+ import "./chunk-FZK3JJJK.js";
6
+ import "./chunk-7TAV3BFQ.js";
7
+ import "./chunk-PVC2FBCQ.js";
8
8
  import "./chunk-5UOPIPZC.js";
9
9
  import "./chunk-UWZ7O4NR.js";
10
- import "./chunk-HCK2DFEK.js";
10
+ import "./chunk-REWTMYSF.js";
11
11
  import "./chunk-VFQOE76I.js";
12
12
  import "./chunk-LP7BEXCT.js";
13
13
  import "./chunk-5HZULLHE.js";
@@ -17,4 +17,4 @@ export {
17
17
  UserApi,
18
18
  createUserApi
19
19
  };
20
- //# sourceMappingURL=api-Z66JMGOU.js.map
20
+ //# sourceMappingURL=api-JDWL67WL.js.map
@@ -1,6 +1,6 @@
1
- export { V as VaultDiff, d as diffVault } from '../vault-diff-DmBBatkx.js';
2
- export { N as NoydbPodHeader, W as WritePodOptions, r as readPod, a as readPodHeader, w as writePod } from '../bundle-BN_VSq5L.js';
3
- export { V as Vault } from '../index-BJ3L-XcV.js';
1
+ export { V as VaultDiff, d as diffVault } from '../vault-diff-_LSIcOMv.js';
2
+ export { N as NoydbPodHeader, W as WritePodOptions, r as readPod, a as readPodHeader, w as writePod } from '../bundle-DzWtVw7w.js';
3
+ export { V as Vault } from '../index-Dn5GzPg_.js';
4
4
  import '../subject-index-O75wKshW.js';
5
5
  import '../describe-C6iHNlqJ.js';
6
6
  import '../index-B9QdHytu.js';
package/dist/as/index.js CHANGED
@@ -7,15 +7,15 @@ import {
7
7
  readPod,
8
8
  readPodHeader,
9
9
  writePod
10
- } from "../chunk-CND5WQLO.js";
11
- import "../chunk-T4NQMPBN.js";
10
+ } from "../chunk-BJ2XF2RC.js";
11
+ import "../chunk-GLVXQU3E.js";
12
12
  import "../chunk-ZJADGNYF.js";
13
13
  import "../chunk-SVLR4POP.js";
14
- import "../chunk-JIW3Q5JN.js";
15
- import "../chunk-HGQ6UNHE.js";
14
+ import "../chunk-7TAV3BFQ.js";
15
+ import "../chunk-PVC2FBCQ.js";
16
16
  import "../chunk-5UOPIPZC.js";
17
17
  import "../chunk-UWZ7O4NR.js";
18
- import "../chunk-HCK2DFEK.js";
18
+ import "../chunk-REWTMYSF.js";
19
19
  import "../chunk-VFQOE76I.js";
20
20
  import "../chunk-LP7BEXCT.js";
21
21
  import "../chunk-5HZULLHE.js";
@@ -1,4 +1,4 @@
1
- export { dg as SealingKeyProvider } from '../index-BJ3L-XcV.js';
1
+ export { dp as SealingKeyProvider } from '../index-Dn5GzPg_.js';
2
2
  import '../subject-index-O75wKshW.js';
3
3
  import '../describe-C6iHNlqJ.js';
4
4
  import '../index-B9QdHytu.js';
@@ -1,5 +1,5 @@
1
- import { dy as AttestationStrategy } from '../index-BJ3L-XcV.js';
2
- export { dz as AttestationError, dA as AttestationNotEnabledError, dB as IssueArgs, dC as IssueContext, dD as IssueResult, dE as NO_ATTESTATION, dF as RevokeContext, dG as getRevokedDocIdsCore, dH as issueAttestationCore, dI as publishRevocationListCore, dJ as revokeDocCore, dK as unrevokeDocCore } from '../index-BJ3L-XcV.js';
1
+ import { dG as AttestationStrategy } from '../index-Dn5GzPg_.js';
2
+ export { dH as AttestationError, dI as AttestationNotEnabledError, dJ as IssueArgs, dK as IssueContext, dL as IssueResult, dM as NO_ATTESTATION, dN as RevokeContext, dO as getRevokedDocIdsCore, dP as issueAttestationCore, dQ as publishRevocationListCore, dR as revokeDocCore, dS as unrevokeDocCore } from '../index-Dn5GzPg_.js';
3
3
  export { AttestationFieldSchema, QrPayload, RevocationList, VerifyInput, VerifyResult, decodeQr, isRevoked, signRevocationList, verifyAttestation, verifyRevocationList } from '@noy-db/attestation';
4
4
  import '../subject-index-O75wKshW.js';
5
5
  import '../describe-C6iHNlqJ.js';
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  issueAttestationCore
3
- } from "../chunk-RHB7BOEO.js";
3
+ } from "../chunk-I6URUNTD.js";
4
4
  import {
5
5
  getRevokedDocIdsCore,
6
6
  publishRevocationListCore,
7
7
  revokeDocCore,
8
8
  unrevokeDocCore
9
- } from "../chunk-7L6EH6S7.js";
9
+ } from "../chunk-M3OYTM5Z.js";
10
10
  import {
11
11
  ATTESTATIONS_COLLECTION
12
- } from "../chunk-JT4A6OAJ.js";
12
+ } from "../chunk-X5QZAJDB.js";
13
13
  import {
14
14
  NO_ATTESTATION
15
15
  } from "../chunk-LFGJG4XZ.js";
16
16
  import "../chunk-ZJADGNYF.js";
17
- import "../chunk-JIW3Q5JN.js";
18
- import "../chunk-HGQ6UNHE.js";
17
+ import "../chunk-7TAV3BFQ.js";
18
+ import "../chunk-PVC2FBCQ.js";
19
19
  import "../chunk-5UOPIPZC.js";
20
20
  import "../chunk-UWZ7O4NR.js";
21
- import "../chunk-HCK2DFEK.js";
21
+ import "../chunk-REWTMYSF.js";
22
22
  import "../chunk-VFQOE76I.js";
23
23
  import "../chunk-LP7BEXCT.js";
24
24
  import "../chunk-5HZULLHE.js";
@@ -32,11 +32,11 @@ import "../chunk-PZ5AY32C.js";
32
32
  function withAttestation() {
33
33
  return {
34
34
  async issueAttestation(ctx, args) {
35
- const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-FJE2IHUI.js");
35
+ const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-AEOL6RXA.js");
36
36
  return issueAttestationCore2(ctx, args);
37
37
  },
38
38
  async getDocumentSigningPublicKey(deps) {
39
- const { loadSigner, loadOrCreateSigner } = await import("../signer-IVU3B6DP.js");
39
+ const { loadSigner, loadOrCreateSigner } = await import("../signer-GAIMQQ2J.js");
40
40
  const existing = await loadSigner(deps.adapter, deps.vault, deps.getDEK);
41
41
  if (existing) return { keyId: existing.keyId, publicKeyB64: existing.publicKeyB64 };
42
42
  if (deps.role !== "owner") {
@@ -46,19 +46,19 @@ function withAttestation() {
46
46
  return { keyId: signer.keyId, publicKeyB64: signer.publicKeyB64 };
47
47
  },
48
48
  async revokeAttestation(ctx, docId) {
49
- const { revokeDocCore: revokeDocCore2 } = await import("../revoke-VELFCK7S.js");
49
+ const { revokeDocCore: revokeDocCore2 } = await import("../revoke-ZFETCLYV.js");
50
50
  return revokeDocCore2(ctx, docId);
51
51
  },
52
52
  async unrevokeAttestation(ctx, docId) {
53
- const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-VELFCK7S.js");
53
+ const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-ZFETCLYV.js");
54
54
  return unrevokeDocCore2(ctx, docId);
55
55
  },
56
56
  async getRevokedDocIds(ctx) {
57
- const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-VELFCK7S.js");
57
+ const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-ZFETCLYV.js");
58
58
  return getRevokedDocIdsCore2(ctx);
59
59
  },
60
60
  async publishRevocationList(ctx) {
61
- const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-VELFCK7S.js");
61
+ const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-ZFETCLYV.js");
62
62
  return publishRevocationListCore2(ctx);
63
63
  }
64
64
  };
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  SEQUENCE_COLLECTION
3
- } from "./chunk-IEKK2XI4.js";
3
+ } from "./chunk-5HRJQSKN.js";
4
4
  import {
5
5
  SCHEMAS_COLLECTION
6
- } from "./chunk-7F2P2NHX.js";
6
+ } from "./chunk-J7OH6R4K.js";
7
7
  import {
8
8
  LEDGER_COLLECTION,
9
9
  LEDGER_DELTAS_COLLECTION
10
10
  } from "./chunk-I7FD46FF.js";
11
- import "./chunk-JIW3Q5JN.js";
12
- import "./chunk-HGQ6UNHE.js";
11
+ import "./chunk-7TAV3BFQ.js";
12
+ import "./chunk-PVC2FBCQ.js";
13
13
  import "./chunk-5UOPIPZC.js";
14
14
  import "./chunk-UWZ7O4NR.js";
15
15
  import {
16
16
  NOYDB_BACKUP_VERSION
17
- } from "./chunk-HCK2DFEK.js";
17
+ } from "./chunk-REWTMYSF.js";
18
18
  import "./chunk-VFQOE76I.js";
19
19
  import "./chunk-LP7BEXCT.js";
20
20
  import "./chunk-5HZULLHE.js";
@@ -222,4 +222,4 @@ export {
222
222
  loadVault,
223
223
  verifyBackupIntegrity
224
224
  };
225
- //# sourceMappingURL=backup-7PX6NDKT.js.map
225
+ //# sourceMappingURL=backup-WRGNTGJF.js.map
@@ -1,6 +1,6 @@
1
- import { X as BlobStrategy } from '../index-BJ3L-XcV.js';
2
- export { Y as BLOB_CHUNKS_COLLECTION, Z as BLOB_COLLECTION, _ as BLOB_EVICTION_AUDIT_COLLECTION, $ as BLOB_INDEX_COLLECTION, a0 as BLOB_SLOTS_PREFIX, a1 as BLOB_VERSIONS_PREFIX, a2 as BlobEvictionEntry, a3 as BlobFieldPolicy, a4 as BlobFieldsConfig, a5 as BlobObject, a6 as BlobPutOptions, a7 as BlobResponseOptions, a8 as BlobSet, a9 as BlobStrategyOpenArgs, aa as CompactRunOptions, ab as CompactionContext, ac as CompactionResult, ad as DEFAULT_CHUNK_SIZE, ae as EXPORT_AUDIT_COLLECTION, af as ExportBlobsAbortedError, ag as ExportBlobsAuditEntry, ah as ExportBlobsHandle, ai as ExportBlobsOptions, aj as ExportedBlob, ak as ObjectListEntry, al as ObjectMeta, am as ObjectProjection, an as ObjectUrlOptions, ao as PutObjectOptions, ap as PutUrlOptions, aq as SlotInfo, ar as SlotRecord, as as VersionRecord, at as createExportBlobsHandle, au as memoryObjectProjection, av as runCompaction } from '../index-BJ3L-XcV.js';
3
- export { I as ImportExternalOptions, a as ImportExternalResult, b as ImportableCollection, d as detectMagic, c as detectMimeType, i as importExternalObjects, e as isPreCompressed } from '../mime-magic-BlE9fzn2.js';
1
+ import { X as BlobStrategy } from '../index-Dn5GzPg_.js';
2
+ export { Y as BLOB_CHUNKS_COLLECTION, Z as BLOB_COLLECTION, _ as BLOB_EVICTION_AUDIT_COLLECTION, $ as BLOB_INDEX_COLLECTION, a0 as BLOB_SLOTS_PREFIX, a1 as BLOB_VERSIONS_PREFIX, a2 as BlobEvictionEntry, a3 as BlobFieldPolicy, a4 as BlobFieldsConfig, a5 as BlobObject, a6 as BlobPutOptions, a7 as BlobResponseOptions, a8 as BlobSet, a9 as BlobStrategyOpenArgs, aa as CompactRunOptions, ab as CompactionContext, ac as CompactionResult, ad as DEFAULT_CHUNK_SIZE, ae as EXPORT_AUDIT_COLLECTION, af as ExportBlobsAbortedError, ag as ExportBlobsAuditEntry, ah as ExportBlobsHandle, ai as ExportBlobsOptions, aj as ExportedBlob, ak as ObjectListEntry, al as ObjectMeta, am as ObjectProjection, an as ObjectUrlOptions, ao as PutObjectOptions, ap as PutUrlOptions, aq as SlotInfo, ar as SlotRecord, as as VersionRecord, at as createExportBlobsHandle, au as memoryObjectProjection, av as runCompaction } from '../index-Dn5GzPg_.js';
3
+ export { I as ImportExternalOptions, a as ImportExternalResult, b as ImportableCollection, d as detectMagic, c as detectMimeType, i as importExternalObjects, e as isPreCompressed } from '../mime-magic-CYbFNQ4h.js';
4
4
  import '../subject-index-O75wKshW.js';
5
5
  import '../describe-C6iHNlqJ.js';
6
6
  import '../index-B9QdHytu.js';
@@ -8,7 +8,7 @@ import {
8
8
  ExportBlobsAbortedError,
9
9
  createExportBlobsHandle,
10
10
  runCompaction
11
- } from "../chunk-I6Q7YECW.js";
11
+ } from "../chunk-PPPZIBKY.js";
12
12
  import {
13
13
  BLOB_CHUNKS_COLLECTION,
14
14
  BLOB_COLLECTION,
@@ -20,12 +20,12 @@ import {
20
20
  detectMagic,
21
21
  detectMimeType,
22
22
  isPreCompressed
23
- } from "../chunk-QAVFI23O.js";
24
- import "../chunk-JIW3Q5JN.js";
25
- import "../chunk-HGQ6UNHE.js";
23
+ } from "../chunk-WPNP3NF5.js";
24
+ import "../chunk-7TAV3BFQ.js";
25
+ import "../chunk-PVC2FBCQ.js";
26
26
  import "../chunk-5UOPIPZC.js";
27
27
  import "../chunk-UWZ7O4NR.js";
28
- import "../chunk-HCK2DFEK.js";
28
+ import "../chunk-REWTMYSF.js";
29
29
  import "../chunk-VFQOE76I.js";
30
30
  import "../chunk-LP7BEXCT.js";
31
31
  import "../chunk-5HZULLHE.js";
@@ -1,8 +1,8 @@
1
- import { T as TransferSealPayload } from '../bundle-BN_VSq5L.js';
2
- export { C as COMPRESSION_BROTLI, b as COMPRESSION_GZIP, c as COMPRESSION_NONE, d as CompressionAlgo, F as FLAG_COMPRESSED, e as FLAG_HAS_INTEGRITY_HASH, f as NOYDB_BUNDLE_FORMAT_VERSION, g as NOYDB_BUNDLE_MAGIC, h as NOYDB_BUNDLE_PREFIX_BYTES, i as NoydbBundleHeader, j as NoydbBundleReadResult, N as NoydbPodHeader, R as ReadNoydbBundleOptions, k as WriteNoydbBundleOptions, W as WritePodOptions, l as encodeBundleHeader, m as readNoydbBundle, n as readNoydbBundleHeader, r as readPod, a as readPodHeader, o as resetBrotliSupportCache, v as validateBundleHeader, p as writeNoydbBundle, w as writePod } from '../bundle-BN_VSq5L.js';
1
+ import { T as TransferSealPayload } from '../bundle-DzWtVw7w.js';
2
+ export { C as COMPRESSION_BROTLI, b as COMPRESSION_GZIP, c as COMPRESSION_NONE, d as CompressionAlgo, F as FLAG_COMPRESSED, e as FLAG_HAS_INTEGRITY_HASH, f as NOYDB_BUNDLE_FORMAT_VERSION, g as NOYDB_BUNDLE_MAGIC, h as NOYDB_BUNDLE_PREFIX_BYTES, i as NoydbBundleHeader, j as NoydbBundleReadResult, N as NoydbPodHeader, R as ReadNoydbBundleOptions, k as WriteNoydbBundleOptions, W as WritePodOptions, l as encodeBundleHeader, m as readNoydbBundle, n as readNoydbBundleHeader, r as readPod, a as readPodHeader, o as resetBrotliSupportCache, v as validateBundleHeader, p as writeNoydbBundle, w as writePod } from '../bundle-DzWtVw7w.js';
3
3
  export { g as generateULID, i as isULID } from '../ulid-DRH25k3y.js';
4
- import { V as Vault, df as WalkClosureOptions, cT as NoydbStore, dg as SealingKeyProvider, dh as RecoveryEnrollmentInput, di as ShamirRecoveryProvider, dj as EnclaveKey } from '../index-BJ3L-XcV.js';
5
- export { dk as AdoptionStateError, dl as BackupCorruptedError, dm as BackupLedgerError, dn as BundleIntegrityError, dp as BundleSealMismatchError, dq as BundleVersionConflictError, dr as ClosureResult, ds as ExtractPartitionResult, dt as PartitionExtractionError, du as PodVersionConflictError, dv as TransferSealError, dw as extractPartition, dx as walkClosure } from '../index-BJ3L-XcV.js';
4
+ import { V as Vault, dn as WalkClosureOptions, c$ as NoydbStore, dp as SealingKeyProvider, dq as RecoveryEnrollmentInput, dr as ShamirRecoveryProvider, ds as EnclaveKey } from '../index-Dn5GzPg_.js';
5
+ export { dt as AdoptionStateError, du as BackupCorruptedError, dv as BackupLedgerError, dw as BundleIntegrityError, dx as BundleSealMismatchError, dy as BundleVersionConflictError, dz as ClosureResult, dA as ExtractPartitionResult, dB as PartitionExtractionError, dC as PodVersionConflictError, dD as TransferSealError, dE as extractPartition, dF as walkClosure } from '../index-Dn5GzPg_.js';
6
6
  export { D as DecryptedRecord, d as decryptExtractedPartition } from '../decrypt-partition-IHtxEnTi.js';
7
7
  import '../subject-index-O75wKshW.js';
8
8
  import '../describe-C6iHNlqJ.js';
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  extractPartition,
3
3
  walkClosure
4
- } from "../chunk-J5YDMJHG.js";
4
+ } from "../chunk-P6TZ3IVN.js";
5
5
  import "../chunk-CHFZDSE4.js";
6
6
  import {
7
7
  adoptPartition,
8
8
  createOwnerOnAdoptedPartition,
9
9
  decryptExtractedPartition,
10
10
  unsealDeks
11
- } from "../chunk-2L7PPF2C.js";
12
- import "../chunk-7F2P2NHX.js";
13
- import "../chunk-H7WQMGXH.js";
14
- import "../chunk-QAVFI23O.js";
11
+ } from "../chunk-25G7PUTA.js";
12
+ import "../chunk-J7OH6R4K.js";
13
+ import "../chunk-P2PEPSPK.js";
14
+ import "../chunk-WPNP3NF5.js";
15
15
  import "../chunk-CHK5VVMI.js";
16
16
  import {
17
17
  COMPRESSION_BROTLI,
@@ -31,22 +31,22 @@ import {
31
31
  validateBundleHeader,
32
32
  writeNoydbBundle,
33
33
  writePod
34
- } from "../chunk-CND5WQLO.js";
35
- import "../chunk-T4NQMPBN.js";
36
- import "../chunk-GMZFHDSG.js";
37
- import "../chunk-3CHNKEFI.js";
34
+ } from "../chunk-BJ2XF2RC.js";
35
+ import "../chunk-GLVXQU3E.js";
36
+ import "../chunk-TUL5YQWF.js";
37
+ import "../chunk-FZK3JJJK.js";
38
38
  import {
39
39
  generateULID,
40
40
  isULID
41
41
  } from "../chunk-ZJADGNYF.js";
42
- import "../chunk-62TTFKU4.js";
42
+ import "../chunk-3YKBGS3I.js";
43
43
  import "../chunk-I7FD46FF.js";
44
- import "../chunk-G5CFMITA.js";
45
- import "../chunk-JIW3Q5JN.js";
46
- import "../chunk-HGQ6UNHE.js";
44
+ import "../chunk-UMH35AQV.js";
45
+ import "../chunk-7TAV3BFQ.js";
46
+ import "../chunk-PVC2FBCQ.js";
47
47
  import "../chunk-5UOPIPZC.js";
48
48
  import "../chunk-UWZ7O4NR.js";
49
- import "../chunk-HCK2DFEK.js";
49
+ import "../chunk-REWTMYSF.js";
50
50
  import "../chunk-VFQOE76I.js";
51
51
  import "../chunk-LP7BEXCT.js";
52
52
  import "../chunk-5HZULLHE.js";
@@ -1,4 +1,4 @@
1
- import { e0 as PublicEnvelope, dg as SealingKeyProvider, e1 as BundleRecipient, e2 as RecipientSealer, e3 as RecipientHint, V as Vault } from './index-BJ3L-XcV.js';
1
+ import { e8 as PublicEnvelope, dp as SealingKeyProvider, e9 as BundleRecipient, ea as RecipientSealer, eb as RecipientHint, V as Vault } from './index-Dn5GzPg_.js';
2
2
 
3
3
  /**
4
4
  * `.noydb` container format — byte layout, header schema, validators.
@@ -1,9 +1,9 @@
1
- export { eD as AccessibleVault, aP as AggregateResult, aQ as AggregateSpec, eO as CargoNotEnabledError, eP as CargoStrategy, eQ as ChangeEvent, ci as Collection, lk as CrossShardJoinError, f6 as CustodyApi, fe as DataResidencyError, fX as GrantCustodianOptions, aB as IndexDef, gf as JoinStrategy, gq as LiberateOptions, gr as LiberateResult, a_ as LiveAggregation, gA as LiveQuery, h0 as NO_CARGO, h7 as NoAccessError, ha as Noydb, hg as Operator, e7 as Query, ic as ReservedVaultNameError, ie as RetrieveHit, ig as RetrieveOptions, dg as SealingKeyProvider, iP as ShardProvisioningError, jq as UnknownShardError, eu as Unsubscribe, jy as ValidationError, V as Vault, jD as VaultTemplateNotFoundError, jK as WriteConflict, jL as WriteQueue, b5 as groupAndReduce, kp as liberateVault, kH as readPath, bb as reduceRecords, ll as sha256Hex } from '../index-BJ3L-XcV.js';
1
+ export { eL as AccessibleVault, aP as AggregateResult, aQ as AggregateSpec, eW as CargoNotEnabledError, eX as CargoStrategy, eY as ChangeEvent, cq as Collection, ls as CrossShardJoinError, fe as CustodyApi, fm as DataResidencyError, g3 as GrantCustodianOptions, aB as IndexDef, gn as JoinStrategy, gy as LiberateOptions, gz as LiberateResult, a_ as LiveAggregation, gI as LiveQuery, h8 as NO_CARGO, hf as NoAccessError, hi as Noydb, ho as Operator, ef as Query, il as ReservedVaultNameError, io as RetrieveHit, ip as RetrieveOptions, dp as SealingKeyProvider, iX as ShardProvisioningError, jy as UnknownShardError, eC as Unsubscribe, jG as ValidationError, V as Vault, jL as VaultTemplateNotFoundError, jS as WriteConflict, jT as WriteQueue, b5 as groupAndReduce, kx as liberateVault, kP as readPath, bb as reduceRecords, lt as sha256Hex } from '../index-Dn5GzPg_.js';
2
2
  export { g as generateULID } from '../ulid-DRH25k3y.js';
3
3
  export { C as CoordinationProvider, D as DrainBarrierOptions, F as FenceState, a as WriteHook, c as WriterPresence, i as isQuorum, r as runDrainBarrier } from '../index-B9QdHytu.js';
4
4
  export { FuseOptions, fuseRetrieval } from '../kernel/index.js';
5
5
  export { a as CollectionMeta, V as VaultMeta } from '../describe-C6iHNlqJ.js';
6
- export { a as DeedMarker, S as STATE_VAULT_NAME, c as createDeedOwner, i as isDeedVault, l as loadDeedMarker, w as withCargo } from '../index-CLucFLeN.js';
7
- export { d as diffVault } from '../vault-diff-DmBBatkx.js';
6
+ export { a as DeedMarker, S as STATE_VAULT_NAME, c as createDeedOwner, i as isDeedVault, l as loadDeedMarker, w as withCargo } from '../index-CTvUp94-.js';
7
+ export { d as diffVault } from '../vault-diff-_LSIcOMv.js';
8
8
  import '../subject-index-O75wKshW.js';
9
9
  import '@noy-db/attestation';
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  withCargo
3
- } from "../chunk-K6WHZBCO.js";
3
+ } from "../chunk-IARAK3PK.js";
4
4
  import {
5
5
  CustodyApi,
6
6
  NO_CARGO
7
- } from "../chunk-RUWEHFRB.js";
7
+ } from "../chunk-723XB5NX.js";
8
8
  import {
9
9
  createDeedOwner,
10
10
  isDeedVault,
11
11
  liberateVault,
12
12
  loadDeedMarker
13
- } from "../chunk-PE25C4QL.js";
14
- import "../chunk-DJ4TNF4N.js";
13
+ } from "../chunk-5YBUFCFF.js";
14
+ import "../chunk-3KBK5LU4.js";
15
15
  import {
16
16
  diffVault
17
17
  } from "../chunk-LB7FD65R.js";
18
- import "../chunk-DKGZIX6S.js";
18
+ import "../chunk-DCVVCJVB.js";
19
19
  import "../chunk-BGIZAFY7.js";
20
20
  import {
21
21
  fuseRetrieval
@@ -24,20 +24,20 @@ import {
24
24
  isQuorum,
25
25
  runDrainBarrier
26
26
  } from "../chunk-EU7HDMT3.js";
27
- import "../chunk-H7WQMGXH.js";
28
- import "../chunk-CND5WQLO.js";
29
- import "../chunk-T4NQMPBN.js";
30
- import "../chunk-GMZFHDSG.js";
31
- import "../chunk-3CHNKEFI.js";
27
+ import "../chunk-P2PEPSPK.js";
28
+ import "../chunk-BJ2XF2RC.js";
29
+ import "../chunk-GLVXQU3E.js";
30
+ import "../chunk-TUL5YQWF.js";
31
+ import "../chunk-FZK3JJJK.js";
32
32
  import {
33
33
  generateULID
34
34
  } from "../chunk-ZJADGNYF.js";
35
35
  import "../chunk-SVLR4POP.js";
36
- import "../chunk-JIW3Q5JN.js";
37
- import "../chunk-HGQ6UNHE.js";
36
+ import "../chunk-7TAV3BFQ.js";
37
+ import "../chunk-PVC2FBCQ.js";
38
38
  import "../chunk-5UOPIPZC.js";
39
39
  import "../chunk-UWZ7O4NR.js";
40
- import "../chunk-HCK2DFEK.js";
40
+ import "../chunk-REWTMYSF.js";
41
41
  import "../chunk-VFQOE76I.js";
42
42
  import "../chunk-LP7BEXCT.js";
43
43
  import {
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  resolveManagedSecret
3
- } from "./chunk-H7WQMGXH.js";
3
+ } from "./chunk-P2PEPSPK.js";
4
4
  import {
5
5
  parseExtractedPartitionBody,
6
6
  readPod,
7
7
  readPodHeader
8
- } from "./chunk-CND5WQLO.js";
8
+ } from "./chunk-BJ2XF2RC.js";
9
9
  import {
10
10
  createOwnerKeyring
11
- } from "./chunk-GMZFHDSG.js";
11
+ } from "./chunk-TUL5YQWF.js";
12
12
  import {
13
13
  LedgerStore
14
- } from "./chunk-62TTFKU4.js";
14
+ } from "./chunk-3YKBGS3I.js";
15
15
  import {
16
16
  LEDGER_COLLECTION
17
17
  } from "./chunk-I7FD46FF.js";
18
18
  import {
19
19
  openEnvelopeJson
20
- } from "./chunk-JIW3Q5JN.js";
20
+ } from "./chunk-7TAV3BFQ.js";
21
21
  import {
22
22
  base64ToBuffer,
23
23
  wrapKey
@@ -179,7 +179,7 @@ async function createOwnerOnAdoptedPartition(store, vaultName, opts) {
179
179
  }
180
180
  }
181
181
  if (isManaged(opts)) {
182
- const { createNoydb } = await import("./noydb-4ZASGII5.js");
182
+ const { createNoydb } = await import("./noydb-POVTIVQ6.js");
183
183
  const db = await createNoydb({
184
184
  store,
185
185
  user: userId,
@@ -232,4 +232,4 @@ export {
232
232
  createOwnerOnAdoptedPartition,
233
233
  decryptExtractedPartition
234
234
  };
235
- //# sourceMappingURL=chunk-2L7PPF2C.js.map
235
+ //# sourceMappingURL=chunk-25G7PUTA.js.map
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  loadPersistedSchemaEntry,
7
7
  savePersistedSchema
8
- } from "./chunk-7F2P2NHX.js";
8
+ } from "./chunk-J7OH6R4K.js";
9
9
  import {
10
10
  ConflictError
11
11
  } from "./chunk-OJ64XMPJ.js";
@@ -164,4 +164,4 @@ export {
164
164
  persistClassifiedMarker,
165
165
  persistSatelliteMarker
166
166
  };
167
- //# sourceMappingURL=chunk-7AERMJP6.js.map
167
+ //# sourceMappingURL=chunk-2PJB6H3H.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canonicalJson,
3
3
  sha256Hex
4
- } from "./chunk-G5CFMITA.js";
4
+ } from "./chunk-UMH35AQV.js";
5
5
  import {
6
6
  PeriodClosedError,
7
7
  ValidationError
@@ -9,6 +9,15 @@ import {
9
9
 
10
10
  // src/with-audit/periods/periods.ts
11
11
  var PERIODS_COLLECTION = "_periods";
12
+ var PERIOD_FREEZES_COLLECTION = "_period_freezes";
13
+ var PERIOD_ARCHIVES_COLLECTION = "_period_archives";
14
+ var PERIOD_TARGET_PURGES_COLLECTION = "_period_target_purges";
15
+ function periodExclusiveUpperBound(endDate) {
16
+ const ms = Date.parse(endDate);
17
+ if (Number.isNaN(ms)) throw new ValidationError(`freezePeriod: unparseable period endDate "${endDate}".`);
18
+ const dateOnly = /^\d{4}-\d{2}-\d{2}$/.test(endDate);
19
+ return new Date(ms + (dateOnly ? 864e5 : 1)).toISOString();
20
+ }
12
21
  async function loadPeriods(adapter, vault, decrypt) {
13
22
  const ids = await adapter.list(vault, PERIODS_COLLECTION);
14
23
  const records = [];
@@ -54,12 +63,12 @@ function validatePeriodName(name, existing) {
54
63
  throw new ValidationError(`Period "${name}" already exists.`);
55
64
  }
56
65
  }
57
- async function appendPeriodLedgerEntry(ledger, actor, envelope, name) {
66
+ async function appendPeriodLedgerEntry(ledger, actor, envelope, name, collection = PERIODS_COLLECTION) {
58
67
  if (!ledger) return;
59
- const { envelopePayloadHash } = await import("./ledger-EMDHRJJN.js");
68
+ const { envelopePayloadHash } = await import("./ledger-3LR3YO2W.js");
60
69
  await ledger.append({
61
70
  op: "put",
62
- collection: PERIODS_COLLECTION,
71
+ collection,
63
72
  id: name,
64
73
  version: envelope._v,
65
74
  actor,
@@ -69,10 +78,14 @@ async function appendPeriodLedgerEntry(ledger, actor, envelope, name) {
69
78
 
70
79
  export {
71
80
  PERIODS_COLLECTION,
81
+ PERIOD_FREEZES_COLLECTION,
82
+ PERIOD_ARCHIVES_COLLECTION,
83
+ PERIOD_TARGET_PURGES_COLLECTION,
84
+ periodExclusiveUpperBound,
72
85
  loadPeriods,
73
86
  chainAnchor,
74
87
  assertTsWritable,
75
88
  validatePeriodName,
76
89
  appendPeriodLedgerEntry
77
90
  };
78
- //# sourceMappingURL=chunk-YSU2E4GZ.js.map
91
+ //# sourceMappingURL=chunk-37JZR7CY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-audit/periods/periods.ts"],"sourcesContent":["/**\n * Accounting-period closure + opening.\n *\n * A closed period seals every record whose envelope `_ts` is at or\n * before the period's `endDate`: further writes (`put` / `delete`)\n * against such records throw {@link PeriodClosedError}. The period\n * itself is stored as a record in the reserved `_periods` collection\n * and written through the normal ledger-instrumented path, so every\n * closure appends a tamper-evident entry to the vault's hash chain.\n *\n * ## Closure model\n *\n * ```\n * vault.closePeriod({ name: 'FY2026-Q1', endDate: '2026-03-31' })\n * └─► PeriodRecord written to _periods/<name>\n * ├─ priorPeriodName / priorPeriodHash — chain to last close\n * ├─ closedAt / closedBy — provenance\n * └─ normal ledger append fires (LedgerStore.append)\n * ```\n *\n * Enforcement (`assertTsWritable`) is vault-local: the Vault caches\n * the list of closed periods on first read and consults that cache in\n * the `Collection.put` / `.delete` path via the `periodGuard` hook.\n *\n * ## Opening model\n *\n * ```\n * vault.openPeriod({\n * name: 'FY2026-Q2',\n * startDate: '2026-04-01',\n * fromPeriod: 'FY2026-Q1',\n * carryForward: async (priorView) => Record<string, Record<string, unknown>>,\n * })\n * ```\n *\n * `carryForward` receives a read-only `VaultInstant` anchored at the\n * prior period's `endDate` (built via `vault.at(endDate)`) so the\n * callback can compute closing aggregates from the sealed state. The\n * returned `{ [collectionName]: { [id]: record } }` map is written\n * before the new `PeriodRecord` lands — opening balances materialise\n * as normal records with fresh timestamps that fall outside every\n * closed period.\n *\n * ## Freeze\n *\n * ```\n * vault.freezePeriod('FY2026-Q1')\n * └─► physically purges delete markers whose write-time falls inside\n * the closed period's window (via the #589 `_purgeDeleteMarkers`\n * seam), then records the fact:\n * ├─ PeriodFreezeRecord written to _period_freezes/<name>\n * └─ normal ledger append fires (LedgerStore.append)\n * ```\n *\n * The chained `_periods/<name>` record is never mutated — `frozenAt` /\n * `frozenBy` / `purgedMarkerCount` are merged onto the returned\n * `PeriodRecord` at read time from the companion, so a tamper with the\n * freeze can never break the inter-period hash chain. Freezing is\n * terminal (a closed period, once frozen, stays frozen) and idempotent\n * (a second call is a no-op that returns the same merged record without\n * re-purging or re-appending a ledger entry). Freeze does NOT purge\n * forget-tombstones (GDPR crypto-shred erasure evidence), `_history`\n * versions, or live records — the delete-markers-only seam leaves all\n * three untouched by construction.\n *\n * Freeze purges the LOCAL adapter only. On a synced vault, markers already\n * pushed to sync targets survive there, and a later pull re-imports them\n * (benign — they still read deleted, but the space isn't reclaimed). A\n * re-imported marker keeps its original `_ts` (inside the already-frozen\n * period's window), so — like any late-booked delete — it is reclaimed by\n * the NEXT period's freeze, whose window covers it; freeze stays terminal\n * and does NOT re-purge an already-frozen period (#611). Sweeping the sync\n * targets themselves is a cross-target-purge concern deferred to the\n * cold-archival spec. Purging re-opens the #589 resurrection window for a\n * peer offline since before the cutoff, which is why the closed period is\n * the operator-asserted safe-point that gates the call.\n *\n * A period whose purge window has not fully elapsed cannot be frozen —\n * `freezePeriod` throws rather than purge markers for deletes that may not\n * have converged yet (#610).\n *\n * ## Archive\n *\n * ```\n * vault.archivePeriod('FY2026-Q1')\n * └─► relocates the closed period's in-window records (those with\n * `_ts < periodExclusiveUpperBound(endDate)`) from the hot store to\n * the configured cold tier (routeStore's `cold` route), then records:\n * ├─ PeriodArchiveRecord written to _period_archives/<name>\n * └─ a ledger entry attributed to _period_archives\n * ```\n *\n * Archival is NON-DESTRUCTIVE: routeStore reads fall through to the cold\n * tier on a hot miss, so an archived record still reads normally. It is\n * therefore gated only on `closed` (not `frozen`) — it does not re-open the\n * #589 resurrection window and needs no convergence safe-point. Freeze\n * (purge markers) and archive (relocate records) are independent and compose\n * in either order. Like freeze, archival keeps the chained `_periods/<name>`\n * record byte-immutable (state lives in the companion) and is idempotent.\n *\n * Bounds by write-time `_ts`, NOT business date: the store tier sees only\n * encrypted envelopes. A record with an in-period business date but a later\n * `_ts` (late-booked) archives at the NEXT period's archive — the same rule\n * freeze uses for late-booked delete markers. Requires a `routeStore` with a\n * cold route (`age: { cold }`); throws otherwise.\n *\n * Read cost: with `withLazy()` (per-id reads) archived records are truly\n * cold — fetched from cold only on access. In the default hydrated mode,\n * `loadAll` merges the cold store, so archived records still load into RAM\n * on vault open (hot-tier STORAGE is reclaimed; RAM is not). Summaries\n * (`_`-prefixed) always stay hot.\n *\n * ## Target-purge\n *\n * ```\n * vault.purgePeriodTargets('FY2026-Q1')\n * └─► sweeps delete markers (`_ts < periodExclusiveUpperBound(endDate)`) off\n * the vault's PUSH-ONLY sync targets (backup/archive roles), then records:\n * ├─ PeriodTargetPurgeRecord written to _period_target_purges/<name>\n * └─ a ledger entry attributed to _period_target_purges\n * ```\n *\n * Extends freeze's local marker purge to the vault's own remote sinks.\n * `sync-peer` (bidirectional) targets are SKIPPED: purging a marker there\n * re-opens the #589 resurrection window for a client offline before the\n * cutoff, an assertion no single vault can verify. Backup/archive targets are\n * push-only — never pulled from into convergence — so sweeping their markers\n * is safe. Requires the period be frozen first (closed → frozen →\n * target-purged) so the local safe-point is already established. Idempotent\n * once run; a vault with no push-only targets writes no companion and is\n * re-runnable (so a target added later is still swept). Single-vault only —\n * fleet-wide purge across sovereign vaults is klum's concern over\n * `@noy-db/hub/cargo`.\n *\n * ## Not covered\n *\n * - Partial re-opening of a closed period. If an auditor needs to\n * make a correction inside a sealed period, the sanctioned path is\n * a compensating entry in the NEW period, not an unlock of the\n * old one.\n * - Automatic period rollover. `closePeriod` / `openPeriod` are\n * deliberately explicit operator calls so the caller decides when\n * the boundary lands.\n *\n * @module\n */\n\nimport type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js'\nimport type { LedgerStore } from '../../with-commit/history/ledger/index.js'\nimport { sha256Hex, canonicalJson } from '../../with-commit/history/ledger/index.js'\nimport { PeriodClosedError, ValidationError } from '../../kernel/errors.js'\n\n/** The reserved collection name holding closed-period metadata. */\nexport const PERIODS_COLLECTION = '_periods'\n\n/** Sibling of {@link PERIODS_COLLECTION} holding freeze companions (#604). */\nexport const PERIOD_FREEZES_COLLECTION = '_period_freezes'\n\n/** Sibling of {@link PERIODS_COLLECTION} holding archive companions (#613). */\nexport const PERIOD_ARCHIVES_COLLECTION = '_period_archives'\n\n/** Sibling of {@link PERIODS_COLLECTION} holding target-purge companions (#615). */\nexport const PERIOD_TARGET_PURGES_COLLECTION = '_period_target_purges'\n\n/**\n * Companion record recording that a closed period was frozen (its delete\n * markers physically purged). Stored in {@link PERIOD_FREEZES_COLLECTION},\n * keyed by period name — kept OFF the hash-chained `_periods/<name>` record so\n * freeze never alters the inter-period chain.\n */\nexport interface PeriodFreezeRecord {\n readonly period: string\n readonly frozenAt: string\n readonly frozenBy: string\n readonly purgedMarkerCount: number\n}\n\n/**\n * Companion record noting that a closed period was cold-archived (its\n * in-window records physically relocated hot → cold). Stored in\n * {@link PERIOD_ARCHIVES_COLLECTION}, keyed by period name — kept OFF the\n * hash-chained `_periods/<name>` record so archive never alters the chain.\n */\nexport interface PeriodArchiveRecord {\n readonly period: string\n readonly archivedAt: string\n readonly archivedBy: string\n readonly archivedRecordCount: number\n}\n\n/** Per-target count of delete markers purged off one push-only sync target (#615). */\nexport interface TargetPurgeCount {\n readonly label?: string\n readonly role: 'backup' | 'archive'\n readonly purgedCount: number\n}\n\n/**\n * Companion record noting that a closed+frozen period's delete markers were\n * swept off the vault's push-only sync targets (#615). Stored in\n * {@link PERIOD_TARGET_PURGES_COLLECTION}, keyed by period name — kept OFF the\n * hash-chained `_periods/<name>` record so target-purge never alters the chain.\n */\nexport interface PeriodTargetPurgeRecord {\n readonly period: string\n readonly purgedAt: string\n readonly purgedBy: string\n readonly targets: readonly TargetPurgeCount[]\n}\n\n/**\n * Exclusive upper bound for a period's delete-marker purge window (#604).\n * Markers carry no business date (empty body), only write-time `_ts`, so freeze\n * purges markers with `_ts < bound`, `bound` being the instant just after the\n * period's inclusive `endDate`: a date-only `endDate` seals through end-of-day\n * → next midnight; a full-timestamp `endDate` seals through that instant → +1ms.\n */\nexport function periodExclusiveUpperBound(endDate: string): string {\n const ms = Date.parse(endDate)\n if (Number.isNaN(ms)) throw new ValidationError(`freezePeriod: unparseable period endDate \"${endDate}\".`)\n const dateOnly = /^\\d{4}-\\d{2}-\\d{2}$/.test(endDate)\n return new Date(ms + (dateOnly ? 86_400_000 : 1)).toISOString()\n}\n\n/**\n * Stored record for one closed or opened accounting period. One entry\n * per period, keyed by `name` in the reserved `_periods` collection.\n *\n * The hash chain between periods is computed at read time by\n * `loadPeriods()` — each record carries the name + hash of its\n * predecessor so a tamper with any period's record breaks the chain\n * into the next one, the same way the ledger's `prevHash` works.\n */\nexport interface PeriodRecord {\n /** Human-readable name (e.g., `'FY2026-Q1'`). Unique per vault. */\n readonly name: string\n /**\n * Role discriminator. A period is `'closed'` from the moment its\n * `closedAt` is recorded; `'opened'` marks a period whose opening\n * entries have been carried forward via {@link openPeriod}. Many\n * workflows will produce one opened period per closed period (the\n * opened one is the SUCCESSOR — its `startDate` equals the prior\n * `endDate + 1 day`).\n */\n readonly kind: 'closed' | 'opened'\n /** ISO date — inclusive upper bound for records belonging to this period. */\n readonly endDate: string\n /** ISO date — lower bound (present on opened periods only). */\n readonly startDate?: string\n /**\n * Record field carrying the business date (e.g. `'date'` on an\n * invoice, `'paidAt'` on a payment). The guard compares\n * `record[dateField]` against `endDate` — NOT the envelope `_ts`.\n * Accounting entries booked late (business date `2026-01-15`,\n * write-time `2026-04-22`) still get sealed when Q1 closes at\n * `2026-03-31` because the comparison uses the business date.\n *\n * Optional for backwards compat. When absent, the guard falls back\n * to envelope `_ts` — that's a write-time seal, appropriate for\n * content that doesn't carry a logical business date (e.g. system\n * settings) but almost never right for accounting ledgers.\n */\n readonly dateField?: string\n /** ISO timestamp recorded at `closePeriod()` / `openPeriod()` call time. */\n readonly closedAt: string\n /** userId of the keyring that invoked the close/open. */\n readonly closedBy: string\n /** Name of the prior period this one chains to, if any. */\n readonly priorPeriodName?: string\n /** sha256(canonicalJson(priorPeriod)) — empty for the first period. */\n readonly priorPeriodHash: string\n /**\n * Opened periods only — the names of the collections whose\n * carry-forward aggregates were written by {@link openPeriod}.\n * Recorded for auditability so a future `verifyPeriodChain()` can\n * cross-check the opening balances against the closing snapshot.\n */\n readonly openingCollections?: readonly string[]\n /** #604 return-only — merged from the `_period_freezes/<name>` companion on\n * read; NEVER written into the stored `_periods/<name>` record (would break\n * the hash chain). Absent = not yet frozen. */\n readonly frozenAt?: string\n readonly frozenBy?: string\n readonly purgedMarkerCount?: number\n /** #613 return-only — merged from the `_period_archives/<name>` companion on\n * read; NEVER written into the stored `_periods/<name>` record. Absent = not\n * yet archived. */\n readonly archivedAt?: string\n readonly archivedBy?: string\n readonly archivedRecordCount?: number\n /** #615 return-only — merged from the `_period_target_purges/<name>` companion\n * on read; NEVER written into the stored `_periods/<name>` record. Absent =\n * target-purge not yet run (or the vault has no push-only targets). */\n readonly targetsPurgedAt?: string\n readonly targetsPurgedBy?: string\n readonly targetsPurged?: readonly TargetPurgeCount[]\n}\n\n/** Options for `vault.closePeriod()`. */\nexport interface ClosePeriodOptions {\n /** Human-readable name. Must not collide with an existing period. */\n readonly name: string\n /**\n * Inclusive upper cutoff. A record is sealed when its\n * `record[dateField]` (or, if absent, the envelope `_ts`) is at or\n * before this ISO timestamp.\n */\n readonly endDate: string\n /**\n * Record field carrying the business date used for period\n * membership. Recommended for accounting workflows — e.g. an\n * invoice booked late (write-time after close) is still sealed\n * when its `invoice.date` falls inside the closed period.\n *\n * Omit to use envelope `_ts` (write-time seal). This fallback\n * rarely matches real-world accounting semantics; prefer passing\n * an explicit `dateField`.\n */\n readonly dateField?: string\n}\n\n/** Options for `vault.openPeriod()`. */\nexport interface OpenPeriodOptions<TCollections = Record<string, Record<string, unknown>>> {\n /** Human-readable name for the new period. Must be unique. */\n readonly name: string\n /** ISO lower bound of the new period (usually prior `endDate + 1 day`). */\n readonly startDate: string\n /**\n * Name of the prior CLOSED period this one chains from. The prior\n * period's record is verified to exist and to be `kind: 'closed'`;\n * its `endDate` is made available to the `carryForward` callback.\n */\n readonly fromPeriod: string\n /**\n * Receives a read-only facade over the vault's CURRENT state,\n * plus the prior period's `endDate`. Accounting semantics: after\n * a period closes, records with `record[dateField] <= endDate`\n * are frozen — current state equals closing state, so a caller\n * can compute closing balances by querying the live collection\n * with a `where('date', '<=', priorEndDate)` filter.\n *\n * Returns opening-balance records keyed by collection name.\n * Example:\n *\n * ```ts\n * carryForward: async (ctx) => {\n * const closing = await ctx.collection<Journal>('journal')\n * .query().where('date', '<=', ctx.priorEndDate).toArray()\n * const opening: Record<string, Journal> = {}\n * for (const entry of closing) {\n * opening[`OB-${entry.id}`] = { ...entry, date: '2026-04-01' }\n * }\n * return { journal: opening }\n * }\n * ```\n */\n readonly carryForward: (\n ctx: CarryForwardContext,\n ) => Promise<TCollections> | TCollections\n}\n\n/**\n * Context passed to `OpenPeriodOptions.carryForward`. Exposes a\n * read-only subset of the live vault (`collection(name).get/list`)\n * plus the prior period's `endDate` so business-date filters can\n * be built by the caller.\n *\n * Writes go via the return value, not via the facade — the\n * `collection()` here is deliberately restricted to reads.\n */\nexport interface CarryForwardContext {\n /** The prior period's `endDate` — the boundary of the closing snapshot. */\n readonly priorEndDate: string\n /** Read-only collection facade over current vault state. */\n collection<T = unknown>(name: string): ReadOnlyCollection<T>\n}\n\n/** Minimum read surface exposed to `carryForward`. */\nexport interface ReadOnlyCollection<T> {\n get(id: string): Promise<T | null>\n list(): Promise<T[]>\n}\n\n/**\n * Load every period record currently stored on the adapter.\n * Decrypting is the caller's responsibility (we return plain records\n * so the vault can use its own `_periods` DEK).\n *\n * @internal — called by Vault methods that need the closed-period\n * cache. Not part of the public API surface.\n */\nexport async function loadPeriods(\n adapter: NoydbStore,\n vault: string,\n decrypt: (envelope: EncryptedEnvelope) => Promise<PeriodRecord>,\n): Promise<PeriodRecord[]> {\n const ids = await adapter.list(vault, PERIODS_COLLECTION)\n const records: PeriodRecord[] = []\n for (const id of ids) {\n const env = await adapter.get(vault, PERIODS_COLLECTION, id)\n if (env) records.push(await decrypt(env))\n }\n // Stable order by closedAt so chain verification is reproducible.\n records.sort((a, b) => a.closedAt.localeCompare(b.closedAt))\n return records\n}\n\n/**\n * Given the current ordered period list, pick the last entry that\n * belongs to the hash chain — used as the `priorPeriodHash` anchor\n * for the next closure/opening.\n *\n * @internal\n */\nexport async function chainAnchor(\n records: readonly PeriodRecord[],\n): Promise<{ priorPeriodName?: string; priorPeriodHash: string }> {\n const last = records[records.length - 1]\n if (!last) return { priorPeriodHash: '' }\n const hash = await sha256Hex(canonicalJson(last as unknown as Record<string, unknown>))\n return { priorPeriodName: last.name, priorPeriodHash: hash }\n}\n\n/**\n * Throw `PeriodClosedError` if the record being touched falls within\n * any closed period.\n *\n * Three signals, evaluated per period:\n *\n * 1. If the period declares a `dateField`, the guard reads\n * `record[dateField]` on BOTH the existing (prior) record AND the\n * incoming (new) record. Either comparing `<= endDate` triggers\n * the error — callers cannot slide a record into a closed period\n * by editing its date field.\n * 2. If the period has no `dateField`, the guard falls back to the\n * envelope `_ts` of the existing record. Fresh inserts (no\n * existing envelope) pass.\n * 3. For a delete, only the existing side is checked.\n *\n * @internal\n */\nexport function assertTsWritable(\n existing: { ts: string | null; record: Record<string, unknown> | null } | null,\n incomingRecord: Record<string, unknown> | null,\n closedPeriods: readonly PeriodRecord[],\n): void {\n for (const p of closedPeriods) {\n if (p.kind !== 'closed') continue\n if (p.dateField) {\n const checkRecord = (label: string, r: Record<string, unknown> | null): void => {\n if (!r) return\n const v = r[p.dateField!]\n if (typeof v === 'string' && v <= p.endDate) {\n throw new PeriodClosedError(p.name, p.endDate, `${label}[${p.dateField}]=${v}`)\n }\n }\n checkRecord('existing', existing?.record ?? null)\n checkRecord('incoming', incomingRecord)\n continue\n }\n // Fallback: write-time seal via envelope _ts.\n const existingTs = existing?.ts ?? null\n if (existingTs !== null && existingTs <= p.endDate) {\n throw new PeriodClosedError(p.name, p.endDate, existingTs)\n }\n }\n}\n\n/**\n * Sanity-check a proposed period name + endDate against existing\n * records. Shared by closePeriod / openPeriod so the two pathways\n * produce identical diagnostics.\n *\n * @internal\n */\nexport function validatePeriodName(\n name: string,\n existing: readonly PeriodRecord[],\n): void {\n if (name.length === 0) {\n throw new ValidationError('Period name cannot be empty.')\n }\n if (existing.some((p) => p.name === name)) {\n throw new ValidationError(`Period \"${name}\" already exists.`)\n }\n}\n\n/**\n * Wire a reserved-collection ledger append for a period record. The\n * period itself is stored via the adapter as an encrypted envelope;\n * the ledger entry is a normal `put` with the period's payloadHash,\n * so period closures inherit the chain's tamper-evidence.\n *\n * @internal\n */\nexport async function appendPeriodLedgerEntry(\n ledger: LedgerStore | null,\n actor: string,\n envelope: EncryptedEnvelope,\n name: string,\n collection: string = PERIODS_COLLECTION,\n): Promise<void> {\n if (!ledger) return\n const { envelopePayloadHash } = await import('../../with-commit/history/ledger/index.js')\n await ledger.append({\n op: 'put',\n collection,\n id: name,\n version: envelope._v,\n actor,\n payloadHash: await envelopePayloadHash(envelope),\n })\n}\n"],"mappings":";;;;;;;;;;AAyJO,IAAM,qBAAqB;AAG3B,IAAM,4BAA4B;AAGlC,IAAM,6BAA6B;AAGnC,IAAM,kCAAkC;AAuDxC,SAAS,0BAA0B,SAAyB;AACjE,QAAM,KAAK,KAAK,MAAM,OAAO;AAC7B,MAAI,OAAO,MAAM,EAAE,EAAG,OAAM,IAAI,gBAAgB,6CAA6C,OAAO,IAAI;AACxG,QAAM,WAAW,sBAAsB,KAAK,OAAO;AACnD,SAAO,IAAI,KAAK,MAAM,WAAW,QAAa,EAAE,EAAE,YAAY;AAChE;AAyKA,eAAsB,YACpB,SACA,OACA,SACyB;AACzB,QAAM,MAAM,MAAM,QAAQ,KAAK,OAAO,kBAAkB;AACxD,QAAM,UAA0B,CAAC;AACjC,aAAW,MAAM,KAAK;AACpB,UAAM,MAAM,MAAM,QAAQ,IAAI,OAAO,oBAAoB,EAAE;AAC3D,QAAI,IAAK,SAAQ,KAAK,MAAM,QAAQ,GAAG,CAAC;AAAA,EAC1C;AAEA,UAAQ,KAAK,CAAC,GAAG,MAAM,EAAE,SAAS,cAAc,EAAE,QAAQ,CAAC;AAC3D,SAAO;AACT;AASA,eAAsB,YACpB,SACgE;AAChE,QAAM,OAAO,QAAQ,QAAQ,SAAS,CAAC;AACvC,MAAI,CAAC,KAAM,QAAO,EAAE,iBAAiB,GAAG;AACxC,QAAM,OAAO,MAAM,UAAU,cAAc,IAA0C,CAAC;AACtF,SAAO,EAAE,iBAAiB,KAAK,MAAM,iBAAiB,KAAK;AAC7D;AAoBO,SAAS,iBACd,UACA,gBACA,eACM;AACN,aAAW,KAAK,eAAe;AAC7B,QAAI,EAAE,SAAS,SAAU;AACzB,QAAI,EAAE,WAAW;AACf,YAAM,cAAc,CAAC,OAAe,MAA4C;AAC9E,YAAI,CAAC,EAAG;AACR,cAAM,IAAI,EAAE,EAAE,SAAU;AACxB,YAAI,OAAO,MAAM,YAAY,KAAK,EAAE,SAAS;AAC3C,gBAAM,IAAI,kBAAkB,EAAE,MAAM,EAAE,SAAS,GAAG,KAAK,IAAI,EAAE,SAAS,KAAK,CAAC,EAAE;AAAA,QAChF;AAAA,MACF;AACA,kBAAY,YAAY,UAAU,UAAU,IAAI;AAChD,kBAAY,YAAY,cAAc;AACtC;AAAA,IACF;AAEA,UAAM,aAAa,UAAU,MAAM;AACnC,QAAI,eAAe,QAAQ,cAAc,EAAE,SAAS;AAClD,YAAM,IAAI,kBAAkB,EAAE,MAAM,EAAE,SAAS,UAAU;AAAA,IAC3D;AAAA,EACF;AACF;AASO,SAAS,mBACd,MACA,UACM;AACN,MAAI,KAAK,WAAW,GAAG;AACrB,UAAM,IAAI,gBAAgB,8BAA8B;AAAA,EAC1D;AACA,MAAI,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,IAAI,GAAG;AACzC,UAAM,IAAI,gBAAgB,WAAW,IAAI,mBAAmB;AAAA,EAC9D;AACF;AAUA,eAAsB,wBACpB,QACA,OACA,UACA,MACA,aAAqB,oBACN;AACf,MAAI,CAAC,OAAQ;AACb,QAAM,EAAE,oBAAoB,IAAI,MAAM,OAAO,sBAA2C;AACxF,QAAM,OAAO,OAAO;AAAA,IAClB,IAAI;AAAA,IACJ;AAAA,IACA,IAAI;AAAA,IACJ,SAAS,SAAS;AAAA,IAClB;AAAA,IACA,aAAa,MAAM,oBAAoB,QAAQ;AAAA,EACjD,CAAC;AACH;","names":[]}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  buildAccessibleBundle,
3
3
  resolveAccessibleCollections
4
- } from "./chunk-DKGZIX6S.js";
4
+ } from "./chunk-DCVVCJVB.js";
5
5
  import {
6
6
  NOYDB_FORMAT_VERSION
7
- } from "./chunk-HCK2DFEK.js";
7
+ } from "./chunk-REWTMYSF.js";
8
8
  import {
9
9
  sha256Hex
10
10
  } from "./chunk-5HZULLHE.js";
@@ -114,4 +114,4 @@ export {
114
114
  freezeAndDeleteClosure,
115
115
  withdrawAccessibleData
116
116
  };
117
- //# sourceMappingURL=chunk-DJ4TNF4N.js.map
117
+ //# sourceMappingURL=chunk-3KBK5LU4.js.map
@@ -7,13 +7,13 @@ import {
7
7
  hashEntry,
8
8
  paddedIndex,
9
9
  sha256Hex
10
- } from "./chunk-G5CFMITA.js";
10
+ } from "./chunk-UMH35AQV.js";
11
11
  import {
12
12
  openEnvelopeJson
13
- } from "./chunk-JIW3Q5JN.js";
13
+ } from "./chunk-7TAV3BFQ.js";
14
14
  import {
15
15
  NOYDB_FORMAT_VERSION
16
- } from "./chunk-HCK2DFEK.js";
16
+ } from "./chunk-REWTMYSF.js";
17
17
  import {
18
18
  encrypt
19
19
  } from "./chunk-5HZULLHE.js";
@@ -683,4 +683,4 @@ export {
683
683
  applyPatch,
684
684
  LedgerStore
685
685
  };
686
- //# sourceMappingURL=chunk-62TTFKU4.js.map
686
+ //# sourceMappingURL=chunk-3YKBGS3I.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ZJADGNYF.js";
4
4
  import {
5
5
  openEnvelopeJson
6
- } from "./chunk-JIW3Q5JN.js";
6
+ } from "./chunk-7TAV3BFQ.js";
7
7
  import {
8
8
  encrypt
9
9
  } from "./chunk-5HZULLHE.js";
@@ -72,4 +72,4 @@ export {
72
72
  writeConsentEntry,
73
73
  loadConsentEntries
74
74
  };
75
- //# sourceMappingURL=chunk-YSJG4L4A.js.map
75
+ //# sourceMappingURL=chunk-44DV37ZV.js.map