@noy-db/hub 0.4.0-pre.0 → 0.4.0-pre.1

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 (220) hide show
  1. package/dist/{api-3A3S4SHH.js → api-IQFZJSQO.js} +6 -6
  2. package/dist/as/index.js +5 -5
  3. package/dist/attestation/index.js +12 -12
  4. package/dist/{backup-YPUEKIJC.js → backup-LU2DTZTI.js} +6 -6
  5. package/dist/blobs/index.js +5 -5
  6. package/dist/broker/index.js +6 -6
  7. package/dist/bundle/index.js +18 -66
  8. package/dist/bundle/index.js.map +1 -1
  9. package/dist/cargo/index.js +32 -13
  10. package/dist/chunk-2IALOXZS.js +24 -0
  11. package/dist/chunk-2IALOXZS.js.map +1 -0
  12. package/dist/{chunk-ANATMTOA.js → chunk-2MUZ3LY6.js} +2 -2
  13. package/dist/{chunk-U6JMEH2P.js → chunk-2P7EGNKF.js} +2 -2
  14. package/dist/{chunk-PK6JIDQ4.js → chunk-3PF6CRDT.js} +68 -66
  15. package/dist/chunk-3PF6CRDT.js.map +1 -0
  16. package/dist/{chunk-554KLAAN.js → chunk-3SV2EPMN.js} +3 -3
  17. package/dist/{chunk-RJ6K6K5M.js → chunk-3U3FBR7O.js} +2 -2
  18. package/dist/{chunk-IAO54J4R.js → chunk-4BRCIYFG.js} +4 -4
  19. package/dist/{chunk-UHNGNKLV.js → chunk-5OI6BR4H.js} +3 -3
  20. package/dist/{chunk-EO43ANYJ.js → chunk-6B4DYGWO.js} +2 -2
  21. package/dist/{chunk-H2KSZMIX.js → chunk-7CI6CP7Z.js} +4 -4
  22. package/dist/{chunk-UDSR4X4L.js → chunk-7O3AYBC7.js} +61 -8
  23. package/dist/chunk-7O3AYBC7.js.map +1 -0
  24. package/dist/{chunk-FXZDAV62.js → chunk-A7JJLVGH.js} +3 -3
  25. package/dist/{chunk-WG4QBZDN.js → chunk-BGK233EA.js} +2 -2
  26. package/dist/{chunk-IK43HLDQ.js → chunk-BMQWTQZ4.js} +8 -8
  27. package/dist/{chunk-XDIAFPUM.js → chunk-CBSY2N76.js} +2 -2
  28. package/dist/{chunk-GDG5VVYG.js → chunk-CCOP5XDW.js} +2 -2
  29. package/dist/{chunk-CZTLE22N.js → chunk-DDATL6PU.js} +4 -4
  30. package/dist/{chunk-W4TCUGQR.js → chunk-DVUZMT2W.js} +7 -3
  31. package/dist/{chunk-W4TCUGQR.js.map → chunk-DVUZMT2W.js.map} +1 -1
  32. package/dist/{chunk-RNG4VRP4.js → chunk-EGCRBCNA.js} +2 -2
  33. package/dist/{chunk-CJ5KKU6X.js → chunk-F6T6L2UK.js} +3 -3
  34. package/dist/{chunk-WOM2HTML.js → chunk-G6EQYAL6.js} +3 -3
  35. package/dist/{chunk-WKGF2TJR.js → chunk-GQNGCEP5.js} +2 -2
  36. package/dist/{chunk-TIGPQDYP.js → chunk-GVZQ4NAM.js} +2 -2
  37. package/dist/{chunk-OCVM6KDH.js → chunk-GYYCX5K6.js} +2 -2
  38. package/dist/{chunk-DSBQODMZ.js → chunk-HPUWOVR7.js} +3 -3
  39. package/dist/{chunk-R3BLCFD2.js → chunk-IM3QVF53.js} +3 -3
  40. package/dist/{chunk-MT62YSPZ.js → chunk-IRQY7IR5.js} +3 -3
  41. package/dist/{chunk-XUW3PXHU.js → chunk-J6Q7UVQE.js} +2 -2
  42. package/dist/{chunk-YCH5GBN6.js → chunk-JZWWLLVY.js} +4 -4
  43. package/dist/{chunk-XJMBYYQK.js → chunk-KUIB4B5Q.js} +2 -2
  44. package/dist/{chunk-WHXXI3W5.js → chunk-KUPKLSX5.js} +3 -3
  45. package/dist/{chunk-IFJTPAQQ.js → chunk-KWVJAOIN.js} +3 -3
  46. package/dist/{chunk-RFI7GGFO.js → chunk-LB6OH6K2.js} +2 -2
  47. package/dist/{chunk-VKCADNMR.js → chunk-LOF2W3JU.js} +5 -5
  48. package/dist/{chunk-VCTXU4AT.js → chunk-LSASLXGC.js} +1 -1
  49. package/dist/chunk-LSASLXGC.js.map +1 -0
  50. package/dist/{chunk-WZSHL6DQ.js → chunk-MQ6WOPSY.js} +3 -3
  51. package/dist/{chunk-LVGTA624.js → chunk-MTQPRQHB.js} +2 -2
  52. package/dist/{chunk-YZQOGE2L.js → chunk-N55W7KUL.js} +2 -2
  53. package/dist/{chunk-SV6EAJEP.js → chunk-O7WJ47EF.js} +3 -3
  54. package/dist/{chunk-THVIPWRF.js → chunk-OF75ACKS.js} +7 -7
  55. package/dist/{chunk-NCCBLYEB.js → chunk-PK6QCH2C.js} +3 -3
  56. package/dist/{chunk-EWPOHMN2.js → chunk-PT37L5DV.js} +2 -2
  57. package/dist/{chunk-WQIYTNJV.js → chunk-RM2XV574.js} +2 -2
  58. package/dist/{chunk-T3GY65MA.js → chunk-RND5ZPNP.js} +2 -2
  59. package/dist/{chunk-HQBM64EE.js → chunk-SMGEYW6G.js} +125 -6
  60. package/dist/chunk-SMGEYW6G.js.map +1 -0
  61. package/dist/{chunk-KS6SAVCZ.js → chunk-T6GU5PPZ.js} +2 -2
  62. package/dist/{chunk-ZXEZCY6F.js → chunk-TOPYT5U5.js} +4 -4
  63. package/dist/{chunk-Z4PD65VQ.js → chunk-UBNCR3YK.js} +2 -2
  64. package/dist/{chunk-VRBTNCM4.js → chunk-UFEVO57O.js} +4 -4
  65. package/dist/{chunk-5PFOMHTB.js → chunk-UNCOC7QH.js} +5 -5
  66. package/dist/{chunk-A4FXFAKF.js → chunk-WEYZTLXN.js} +2 -2
  67. package/dist/{chunk-JFCV5QIK.js → chunk-YJV2UZ7H.js} +3 -3
  68. package/dist/{chunk-XTHCN77N.js → chunk-ZEQWCBCM.js} +6 -18
  69. package/dist/chunk-ZEQWCBCM.js.map +1 -0
  70. package/dist/classified/index.js +3 -3
  71. package/dist/{classified-marker-QWMASIT7.js → classified-marker-WQVIJAW2.js} +3 -3
  72. package/dist/{collection-facade-KMBWNCYP.js → collection-facade-MJXSC3Q6.js} +7 -7
  73. package/dist/consent/index.js +4 -4
  74. package/dist/{cover-QJRXINN5.js → cover-B5SJDHR3.js} +3 -3
  75. package/dist/{dead-filter-66VGI6JV.js → dead-filter-2A7IAJ3D.js} +2 -2
  76. package/dist/{delegation-SU6CV3W7.js → delegation-A5A75KQO.js} +5 -5
  77. package/dist/derivations/index.js +3 -3
  78. package/dist/{derive-6RWU4EOA.js → derive-HJSMH7RA.js} +4 -4
  79. package/dist/{enclave-TKPN2G2U.js → enclave-7MW6ZGXW.js} +6 -4
  80. package/dist/{executor-UX4FASYZ.js → executor-AXE4XMLT.js} +8 -8
  81. package/dist/{export-accessible-LKW3QV22.js → export-accessible-VVBJM3MM.js} +7 -7
  82. package/dist/{extract-partition-UP2ARO75.js → extract-partition-LGGBTQET.js} +10 -10
  83. package/dist/{fanout-sidecar-B5LVUMQX.js → fanout-sidecar-WDYQ77VB.js} +4 -4
  84. package/dist/forget/index.js +4 -4
  85. package/dist/guards/index.js +3 -3
  86. package/dist/history/index.js +6 -6
  87. package/dist/i18n/index.js +6 -6
  88. package/dist/index.js +80 -78
  89. package/dist/index.js.map +1 -1
  90. package/dist/{issue-3ACYX7LO.js → issue-LSR5PS6H.js} +6 -6
  91. package/dist/kernel/enclave/index.d.ts +1 -1
  92. package/dist/kernel/enclave/record-keys/envelope-body.d.ts +8 -0
  93. package/dist/kernel/types.d.ts +41 -0
  94. package/dist/{ledger-PTK7XZYT.js → ledger-33BC4TR7.js} +6 -6
  95. package/dist/liberate-GBSAYLPJ.js +24 -0
  96. package/dist/{link-set-SLJHDNRB.js → link-set-QK22TDEX.js} +5 -5
  97. package/dist/materialized-views/index.js +8 -8
  98. package/dist/{noydb-ANIW5FLE.js → noydb-MTUBMWFE.js} +27 -26
  99. package/dist/on/index.js +4 -4
  100. package/dist/periods/index.js +14 -12
  101. package/dist/pod/index.js +5 -5
  102. package/dist/{policy-YDLCOX4P.js → policy-NAHB2TUT.js} +4 -4
  103. package/dist/portability/index.js +6 -6
  104. package/dist/{post-register-2YHSADFI.js → post-register-JVTMJ6OW.js} +4 -4
  105. package/dist/{register-PAM3ASRZ.js → register-X462DNDM.js} +6 -6
  106. package/dist/{registry-VZ3CCI2R.js → registry-3XMCT7MQ.js} +4 -4
  107. package/dist/{registry-4S2U2TR4.js → registry-KHD2I3M2.js} +4 -4
  108. package/dist/{request-withdrawal-DI3H5WUI.js → request-withdrawal-U7K3JTMY.js} +9 -9
  109. package/dist/{reveal-HWO4YMTJ.js → reveal-LGBOM2BO.js} +3 -3
  110. package/dist/{revoke-R5CZSVUT.js → revoke-OCWDSWRQ.js} +6 -6
  111. package/dist/sealed-record/index.js +6 -6
  112. package/dist/{seed-3ZMF5EQA.js → seed-PWK45HDF.js} +6 -6
  113. package/dist/session/index.js +3 -3
  114. package/dist/share-link/index.d.ts +19 -0
  115. package/dist/share-link/index.js +201 -0
  116. package/dist/share-link/index.js.map +1 -0
  117. package/dist/share-link/share-link.d.ts +123 -0
  118. package/dist/{signer-MBVHW4WE.js → signer-3YFBLZRN.js} +5 -5
  119. package/dist/snapshots/index.js +5 -5
  120. package/dist/{stale-VZL4OGUB.js → stale-FJED42DM.js} +5 -5
  121. package/dist/{storage-3MEJUENZ.js → storage-W3GURVFU.js} +5 -5
  122. package/dist/{store-coordination-provider-FKX3F6TQ.js → store-coordination-provider-APODTV4W.js} +3 -3
  123. package/dist/sync/index.js +5 -4
  124. package/dist/sync/index.js.map +1 -1
  125. package/dist/team/index.js +10 -9
  126. package/dist/tiers/index.js +4 -4
  127. package/dist/{walk-IPLXE36W.js → walk-XS3PKM6I.js} +5 -5
  128. package/dist/with/index.js +6 -6
  129. package/dist/with-audit/periods/periods.d.ts +1 -16
  130. package/dist/with-audit/periods/window.d.ts +16 -0
  131. package/dist/with-cargo/index.d.ts +6 -0
  132. package/dist/with-party/team/sync-period-scope.d.ts +78 -0
  133. package/dist/with-party/team/sync.d.ts +13 -0
  134. package/dist/{withdraw-accessible-TZDATQVR.js → withdraw-accessible-Y3B2535F.js} +8 -8
  135. package/package.json +7 -3
  136. package/dist/chunk-HQBM64EE.js.map +0 -1
  137. package/dist/chunk-PK6JIDQ4.js.map +0 -1
  138. package/dist/chunk-UDSR4X4L.js.map +0 -1
  139. package/dist/chunk-VCTXU4AT.js.map +0 -1
  140. package/dist/chunk-XTHCN77N.js.map +0 -1
  141. package/dist/liberate-MQQXBUCY.js +0 -24
  142. /package/dist/{api-3A3S4SHH.js.map → api-IQFZJSQO.js.map} +0 -0
  143. /package/dist/{backup-YPUEKIJC.js.map → backup-LU2DTZTI.js.map} +0 -0
  144. /package/dist/{chunk-ANATMTOA.js.map → chunk-2MUZ3LY6.js.map} +0 -0
  145. /package/dist/{chunk-U6JMEH2P.js.map → chunk-2P7EGNKF.js.map} +0 -0
  146. /package/dist/{chunk-554KLAAN.js.map → chunk-3SV2EPMN.js.map} +0 -0
  147. /package/dist/{chunk-RJ6K6K5M.js.map → chunk-3U3FBR7O.js.map} +0 -0
  148. /package/dist/{chunk-IAO54J4R.js.map → chunk-4BRCIYFG.js.map} +0 -0
  149. /package/dist/{chunk-UHNGNKLV.js.map → chunk-5OI6BR4H.js.map} +0 -0
  150. /package/dist/{chunk-EO43ANYJ.js.map → chunk-6B4DYGWO.js.map} +0 -0
  151. /package/dist/{chunk-H2KSZMIX.js.map → chunk-7CI6CP7Z.js.map} +0 -0
  152. /package/dist/{chunk-FXZDAV62.js.map → chunk-A7JJLVGH.js.map} +0 -0
  153. /package/dist/{chunk-WG4QBZDN.js.map → chunk-BGK233EA.js.map} +0 -0
  154. /package/dist/{chunk-IK43HLDQ.js.map → chunk-BMQWTQZ4.js.map} +0 -0
  155. /package/dist/{chunk-XDIAFPUM.js.map → chunk-CBSY2N76.js.map} +0 -0
  156. /package/dist/{chunk-GDG5VVYG.js.map → chunk-CCOP5XDW.js.map} +0 -0
  157. /package/dist/{chunk-CZTLE22N.js.map → chunk-DDATL6PU.js.map} +0 -0
  158. /package/dist/{chunk-RNG4VRP4.js.map → chunk-EGCRBCNA.js.map} +0 -0
  159. /package/dist/{chunk-CJ5KKU6X.js.map → chunk-F6T6L2UK.js.map} +0 -0
  160. /package/dist/{chunk-WOM2HTML.js.map → chunk-G6EQYAL6.js.map} +0 -0
  161. /package/dist/{chunk-WKGF2TJR.js.map → chunk-GQNGCEP5.js.map} +0 -0
  162. /package/dist/{chunk-TIGPQDYP.js.map → chunk-GVZQ4NAM.js.map} +0 -0
  163. /package/dist/{chunk-OCVM6KDH.js.map → chunk-GYYCX5K6.js.map} +0 -0
  164. /package/dist/{chunk-DSBQODMZ.js.map → chunk-HPUWOVR7.js.map} +0 -0
  165. /package/dist/{chunk-R3BLCFD2.js.map → chunk-IM3QVF53.js.map} +0 -0
  166. /package/dist/{chunk-MT62YSPZ.js.map → chunk-IRQY7IR5.js.map} +0 -0
  167. /package/dist/{chunk-XUW3PXHU.js.map → chunk-J6Q7UVQE.js.map} +0 -0
  168. /package/dist/{chunk-YCH5GBN6.js.map → chunk-JZWWLLVY.js.map} +0 -0
  169. /package/dist/{chunk-XJMBYYQK.js.map → chunk-KUIB4B5Q.js.map} +0 -0
  170. /package/dist/{chunk-WHXXI3W5.js.map → chunk-KUPKLSX5.js.map} +0 -0
  171. /package/dist/{chunk-IFJTPAQQ.js.map → chunk-KWVJAOIN.js.map} +0 -0
  172. /package/dist/{chunk-RFI7GGFO.js.map → chunk-LB6OH6K2.js.map} +0 -0
  173. /package/dist/{chunk-VKCADNMR.js.map → chunk-LOF2W3JU.js.map} +0 -0
  174. /package/dist/{chunk-WZSHL6DQ.js.map → chunk-MQ6WOPSY.js.map} +0 -0
  175. /package/dist/{chunk-LVGTA624.js.map → chunk-MTQPRQHB.js.map} +0 -0
  176. /package/dist/{chunk-YZQOGE2L.js.map → chunk-N55W7KUL.js.map} +0 -0
  177. /package/dist/{chunk-SV6EAJEP.js.map → chunk-O7WJ47EF.js.map} +0 -0
  178. /package/dist/{chunk-THVIPWRF.js.map → chunk-OF75ACKS.js.map} +0 -0
  179. /package/dist/{chunk-NCCBLYEB.js.map → chunk-PK6QCH2C.js.map} +0 -0
  180. /package/dist/{chunk-EWPOHMN2.js.map → chunk-PT37L5DV.js.map} +0 -0
  181. /package/dist/{chunk-WQIYTNJV.js.map → chunk-RM2XV574.js.map} +0 -0
  182. /package/dist/{chunk-T3GY65MA.js.map → chunk-RND5ZPNP.js.map} +0 -0
  183. /package/dist/{chunk-KS6SAVCZ.js.map → chunk-T6GU5PPZ.js.map} +0 -0
  184. /package/dist/{chunk-ZXEZCY6F.js.map → chunk-TOPYT5U5.js.map} +0 -0
  185. /package/dist/{chunk-Z4PD65VQ.js.map → chunk-UBNCR3YK.js.map} +0 -0
  186. /package/dist/{chunk-VRBTNCM4.js.map → chunk-UFEVO57O.js.map} +0 -0
  187. /package/dist/{chunk-5PFOMHTB.js.map → chunk-UNCOC7QH.js.map} +0 -0
  188. /package/dist/{chunk-A4FXFAKF.js.map → chunk-WEYZTLXN.js.map} +0 -0
  189. /package/dist/{chunk-JFCV5QIK.js.map → chunk-YJV2UZ7H.js.map} +0 -0
  190. /package/dist/{classified-marker-QWMASIT7.js.map → classified-marker-WQVIJAW2.js.map} +0 -0
  191. /package/dist/{collection-facade-KMBWNCYP.js.map → collection-facade-MJXSC3Q6.js.map} +0 -0
  192. /package/dist/{cover-QJRXINN5.js.map → cover-B5SJDHR3.js.map} +0 -0
  193. /package/dist/{dead-filter-66VGI6JV.js.map → dead-filter-2A7IAJ3D.js.map} +0 -0
  194. /package/dist/{delegation-SU6CV3W7.js.map → delegation-A5A75KQO.js.map} +0 -0
  195. /package/dist/{derive-6RWU4EOA.js.map → derive-HJSMH7RA.js.map} +0 -0
  196. /package/dist/{enclave-TKPN2G2U.js.map → enclave-7MW6ZGXW.js.map} +0 -0
  197. /package/dist/{executor-UX4FASYZ.js.map → executor-AXE4XMLT.js.map} +0 -0
  198. /package/dist/{export-accessible-LKW3QV22.js.map → export-accessible-VVBJM3MM.js.map} +0 -0
  199. /package/dist/{extract-partition-UP2ARO75.js.map → extract-partition-LGGBTQET.js.map} +0 -0
  200. /package/dist/{fanout-sidecar-B5LVUMQX.js.map → fanout-sidecar-WDYQ77VB.js.map} +0 -0
  201. /package/dist/{issue-3ACYX7LO.js.map → issue-LSR5PS6H.js.map} +0 -0
  202. /package/dist/{ledger-PTK7XZYT.js.map → ledger-33BC4TR7.js.map} +0 -0
  203. /package/dist/{liberate-MQQXBUCY.js.map → liberate-GBSAYLPJ.js.map} +0 -0
  204. /package/dist/{link-set-SLJHDNRB.js.map → link-set-QK22TDEX.js.map} +0 -0
  205. /package/dist/{noydb-ANIW5FLE.js.map → noydb-MTUBMWFE.js.map} +0 -0
  206. /package/dist/{policy-YDLCOX4P.js.map → policy-NAHB2TUT.js.map} +0 -0
  207. /package/dist/{post-register-2YHSADFI.js.map → post-register-JVTMJ6OW.js.map} +0 -0
  208. /package/dist/{register-PAM3ASRZ.js.map → register-X462DNDM.js.map} +0 -0
  209. /package/dist/{registry-4S2U2TR4.js.map → registry-3XMCT7MQ.js.map} +0 -0
  210. /package/dist/{registry-VZ3CCI2R.js.map → registry-KHD2I3M2.js.map} +0 -0
  211. /package/dist/{request-withdrawal-DI3H5WUI.js.map → request-withdrawal-U7K3JTMY.js.map} +0 -0
  212. /package/dist/{reveal-HWO4YMTJ.js.map → reveal-LGBOM2BO.js.map} +0 -0
  213. /package/dist/{revoke-R5CZSVUT.js.map → revoke-OCWDSWRQ.js.map} +0 -0
  214. /package/dist/{seed-3ZMF5EQA.js.map → seed-PWK45HDF.js.map} +0 -0
  215. /package/dist/{signer-MBVHW4WE.js.map → signer-3YFBLZRN.js.map} +0 -0
  216. /package/dist/{stale-VZL4OGUB.js.map → stale-FJED42DM.js.map} +0 -0
  217. /package/dist/{storage-3MEJUENZ.js.map → storage-W3GURVFU.js.map} +0 -0
  218. /package/dist/{store-coordination-provider-FKX3F6TQ.js.map → store-coordination-provider-APODTV4W.js.map} +0 -0
  219. /package/dist/{walk-IPLXE36W.js.map → walk-XS3PKM6I.js.map} +0 -0
  220. /package/dist/{withdraw-accessible-TZDATQVR.js.map → withdraw-accessible-Y3B2535F.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  readDirectoryConfig,
6
6
  readUserVisibility,
7
7
  saveUserEnvelope
8
- } from "./chunk-NCCBLYEB.js";
8
+ } from "./chunk-PK6QCH2C.js";
9
9
  import {
10
10
  base64ToBuffer,
11
11
  bufferToBase64,
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  NOYDB_FORMAT_VERSION,
22
22
  NOYDB_KEYRING_VERSION
23
- } from "./chunk-VCTXU4AT.js";
23
+ } from "./chunk-LSASLXGC.js";
24
24
  import {
25
25
  DirectoryDisabledError,
26
26
  InvalidKeyError,
@@ -775,4 +775,4 @@ export {
775
775
  hasImportCapability,
776
776
  evaluateImportCapability
777
777
  };
778
- //# sourceMappingURL=chunk-554KLAAN.js.map
778
+ //# sourceMappingURL=chunk-3SV2EPMN.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LookupHandle
3
- } from "./chunk-MT62YSPZ.js";
3
+ } from "./chunk-IRQY7IR5.js";
4
4
 
5
5
  // src/via/lookup/active.ts
6
6
  function withLookup() {
@@ -33,4 +33,4 @@ function withLookup() {
33
33
  export {
34
34
  withLookup
35
35
  };
36
- //# sourceMappingURL=chunk-RJ6K6K5M.js.map
36
+ //# sourceMappingURL=chunk-3U3FBR7O.js.map
@@ -5,14 +5,14 @@ import {
5
5
  isRewrappedUnder,
6
6
  openEnvelopeJson,
7
7
  rewrapEnvelope
8
- } from "./chunk-W4TCUGQR.js";
8
+ } from "./chunk-DVUZMT2W.js";
9
9
  import {
10
10
  isTombstone,
11
11
  isTombstoneShape
12
- } from "./chunk-A4FXFAKF.js";
12
+ } from "./chunk-WEYZTLXN.js";
13
13
  import {
14
14
  NOYDB_FORMAT_VERSION
15
- } from "./chunk-VCTXU4AT.js";
15
+ } from "./chunk-LSASLXGC.js";
16
16
  import {
17
17
  ReadOnlyAtInstantError
18
18
  } from "./chunk-W2OG6JOL.js";
@@ -330,4 +330,4 @@ export {
330
330
  VaultInstant,
331
331
  CollectionInstant
332
332
  };
333
- //# sourceMappingURL=chunk-IAO54J4R.js.map
333
+ //# sourceMappingURL=chunk-4BRCIYFG.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  openEnvelopeJson,
11
11
  writeEnvelopeBody
12
- } from "./chunk-W4TCUGQR.js";
12
+ } from "./chunk-DVUZMT2W.js";
13
13
  import {
14
14
  base64ToBuffer,
15
15
  bufferToBase64,
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-HOONYZY2.js";
25
25
  import {
26
26
  NOYDB_FORMAT_VERSION
27
- } from "./chunk-VCTXU4AT.js";
27
+ } from "./chunk-LSASLXGC.js";
28
28
  import {
29
29
  BlobIntentPendingError,
30
30
  ConflictError,
@@ -2779,4 +2779,4 @@ export {
2779
2779
  DEFAULT_CHUNK_SIZE,
2780
2780
  BlobSet
2781
2781
  };
2782
- //# sourceMappingURL=chunk-UHNGNKLV.js.map
2782
+ //# sourceMappingURL=chunk-5OI6BR4H.js.map
@@ -4,7 +4,7 @@ import {
4
4
  persistUserVisibility,
5
5
  readUserVisibility,
6
6
  saveUserEnvelope
7
- } from "./chunk-NCCBLYEB.js";
7
+ } from "./chunk-PK6QCH2C.js";
8
8
  import {
9
9
  PolicyDeniedError
10
10
  } from "./chunk-W2OG6JOL.js";
@@ -379,4 +379,4 @@ export {
379
379
  UserApi,
380
380
  createUserApi
381
381
  };
382
- //# sourceMappingURL=chunk-EO43ANYJ.js.map
382
+ //# sourceMappingURL=chunk-6B4DYGWO.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  freezeAndDeleteClosure,
3
3
  randomId
4
- } from "./chunk-JFCV5QIK.js";
4
+ } from "./chunk-YJV2UZ7H.js";
5
5
  import {
6
6
  buildAccessibleBundle,
7
7
  resolveAccessibleCollections
8
- } from "./chunk-WKGF2TJR.js";
8
+ } from "./chunk-GQNGCEP5.js";
9
9
  import {
10
10
  NOYDB_FORMAT_VERSION
11
- } from "./chunk-VCTXU4AT.js";
11
+ } from "./chunk-LSASLXGC.js";
12
12
  import {
13
13
  NoydbError
14
14
  } from "./chunk-W2OG6JOL.js";
@@ -161,4 +161,4 @@ export {
161
161
  approveWithdrawal,
162
162
  rejectWithdrawal
163
163
  };
164
- //# sourceMappingURL=chunk-H2KSZMIX.js.map
164
+ //# sourceMappingURL=chunk-7CI6CP7Z.js.map
@@ -1,23 +1,26 @@
1
+ import {
2
+ walkClosure
3
+ } from "./chunk-OF75ACKS.js";
1
4
  import {
2
5
  resolveManagedSecret
3
- } from "./chunk-RFI7GGFO.js";
6
+ } from "./chunk-LB6OH6K2.js";
4
7
  import {
5
8
  parseExtractedPartitionBody,
6
9
  readPod,
7
10
  readPodHeader
8
- } from "./chunk-FXZDAV62.js";
11
+ } from "./chunk-A7JJLVGH.js";
9
12
  import {
10
13
  createOwnerKeyring
11
- } from "./chunk-554KLAAN.js";
14
+ } from "./chunk-3SV2EPMN.js";
12
15
  import {
13
16
  LedgerStore
14
- } from "./chunk-VRBTNCM4.js";
17
+ } from "./chunk-UFEVO57O.js";
15
18
  import {
16
19
  LEDGER_COLLECTION
17
20
  } from "./chunk-I7FD46FF.js";
18
21
  import {
19
22
  openEnvelopeJson
20
- } from "./chunk-W4TCUGQR.js";
23
+ } from "./chunk-DVUZMT2W.js";
21
24
  import {
22
25
  base64ToBuffer,
23
26
  wrapKey
@@ -179,7 +182,7 @@ async function createOwnerOnAdoptedPartition(store, vaultName, opts) {
179
182
  }
180
183
  }
181
184
  if (isManaged(opts)) {
182
- const { createNoydb } = await import("./noydb-ANIW5FLE.js");
185
+ const { createNoydb } = await import("./noydb-MTUBMWFE.js");
183
186
  const db = await createNoydb({
184
187
  store,
185
188
  user: userId,
@@ -226,10 +229,60 @@ async function decryptExtractedPartition(bundleBytes, transferKey) {
226
229
  return out;
227
230
  }
228
231
 
232
+ // src/with-cargo/describe-extraction.ts
233
+ async function describeExtraction(vault, opts) {
234
+ const { closure, graph, danglingRefs } = await walkClosure(vault, opts);
235
+ const { name: vaultName, adapter } = vault._introspectState();
236
+ const encoder = new TextEncoder();
237
+ const byCollection = [];
238
+ const inaccessible = [];
239
+ let totalBytes = 0;
240
+ let totalRecords = 0;
241
+ for (const [collectionName, ids] of closure) {
242
+ let bytes = 0;
243
+ let oldestTs;
244
+ let newestTs;
245
+ let recordCount = 0;
246
+ for (const id of ids) {
247
+ const env = await adapter.get(vaultName, collectionName, id);
248
+ if (!env) {
249
+ inaccessible.push({ collection: collectionName, id });
250
+ continue;
251
+ }
252
+ recordCount++;
253
+ bytes += encoder.encode(JSON.stringify(env)).length;
254
+ const ts = env._ts;
255
+ if (oldestTs === void 0 || ts < oldestTs) oldestTs = ts;
256
+ if (newestTs === void 0 || ts > newestTs) newestTs = ts;
257
+ }
258
+ byCollection.push({
259
+ name: collectionName,
260
+ recordCount,
261
+ bytes,
262
+ // Spread conditionally — exactOptionalPropertyTypes forbids an
263
+ // explicit `undefined` on an optional property.
264
+ ...oldestTs !== void 0 ? { oldestTs } : {},
265
+ ...newestTs !== void 0 ? { newestTs } : {}
266
+ });
267
+ totalBytes += bytes;
268
+ totalRecords += recordCount;
269
+ }
270
+ byCollection.sort((a, b) => a.name.localeCompare(b.name));
271
+ return Object.freeze({
272
+ totalRecords,
273
+ totalBytes,
274
+ byCollection,
275
+ graph,
276
+ inaccessible,
277
+ danglingRefs
278
+ });
279
+ }
280
+
229
281
  export {
230
282
  unsealDeks,
231
283
  adoptPartition,
232
284
  createOwnerOnAdoptedPartition,
233
- decryptExtractedPartition
285
+ decryptExtractedPartition,
286
+ describeExtraction
234
287
  };
235
- //# sourceMappingURL=chunk-UDSR4X4L.js.map
288
+ //# sourceMappingURL=chunk-7O3AYBC7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-cargo/adopt-partition.ts","../src/with-cargo/decrypt-partition.ts","../src/with-cargo/describe-extraction.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, type EnclaveKey } from '../kernel/enclave/index.js'\nimport { TransferSealError, AdoptionStateError, ValidationError } from '../kernel/errors.js'\nimport type { NoydbStore, VaultSnapshot, KeyringFile } from '../kernel/types.js'\nimport { createOwnerKeyring } from '../with-party/team/keyring.js'\nimport { resolveManagedSecret } from '../with-party/team/managed-passphrase.js'\nimport type { SealingKeyProvider } from '../with-party/team/managed-passphrase.js'\nimport type { ShamirRecoveryProvider } from '../with-party/team/shamir-recovery-provider.js'\nimport type { RecoveryEnrollmentInput } from '../with-party/team/rotate-recover.js'\nimport { LedgerStore } from '../with-commit/history/ledger/store.js'\nimport { LEDGER_COLLECTION } from '../with-commit/history/ledger/constants.js'\nimport type { TransferSealPayload } from '../with-pod/bundle.js'\nimport { readPodHeader, readPod, parseExtractedPartitionBody } from '../with-pod/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, EnclaveKey>> {\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, EnclaveKey>()\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 = readPodHeader(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 readPod + vault.load.',\n )\n }\n\n const { dumpJson } = await readPod(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('../kernel/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 '../kernel/types.js'\nimport { openEnvelopeJson } from '../kernel/enclave/index.js'\nimport { readPodHeader, readPod, parseExtractedPartitionBody } from '../with-pod/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 = readPodHeader(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 readPod(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 = await openEnvelopeJson(env, 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","/**\n * Partition-extraction dry-run. Read-only preview of what an\n * `extractPartition` would move: record counts, byte totals, and the\n * timestamp span per collection — computed from raw encrypted\n * envelopes WITHOUT decrypting them. Writes nothing, mutates nothing.\n *\n * @module\n */\nimport type { Vault } from '../kernel/vault.js'\nimport { walkClosure, type WalkClosureOptions, type DanglingRefNotice } from './walk-closure.js'\n\nexport interface ExtractionPreview {\n readonly totalRecords: number\n /** Sum of serialized encrypted-envelope sizes (bytes). */\n readonly totalBytes: number\n readonly byCollection: ReadonlyArray<{\n readonly name: string\n readonly recordCount: number\n readonly bytes: number\n /** Earliest envelope `_ts` in this collection (lexicographic). */\n readonly oldestTs?: string\n readonly newestTs?: string\n }>\n readonly graph: { readonly depth: number; readonly cyclesDetected: boolean }\n /** Records the walk reached but whose envelope couldn't be read. */\n readonly inaccessible: ReadonlyArray<{ readonly collection: string; readonly id: string }>\n /**\n * #772: outbound FK edges whose referenced parent was excluded from the\n * closure (missing, or tier-elevated and therefore invisible) — mirrors\n * `ExtractPartitionResult.danglingRefs` (#759) so a preview/extract pair\n * gives the SAME signal. A parent excluded this way never appears in\n * `byCollection` at all; this is the only preview-time indicator.\n */\n readonly danglingRefs: ReadonlyArray<DanglingRefNotice>\n}\n\nexport async function describeExtraction(\n vault: Vault,\n opts: WalkClosureOptions,\n): Promise<ExtractionPreview> {\n const { closure, graph, danglingRefs } = await walkClosure(vault, opts)\n\n const { name: vaultName, adapter } = vault._introspectState()\n const encoder = new TextEncoder()\n\n const byCollection: Array<{\n name: string; recordCount: number; bytes: number; oldestTs?: string; newestTs?: string\n }> = []\n const inaccessible: Array<{ collection: string; id: string }> = []\n let totalBytes = 0\n let totalRecords = 0\n\n for (const [collectionName, ids] of closure) {\n let bytes = 0\n let oldestTs: string | undefined\n let newestTs: string | undefined\n let recordCount = 0\n\n for (const id of ids) {\n const env = await adapter.get(vaultName, collectionName, id)\n if (!env) {\n // Walk reached it (via decrypted list) but the raw store read\n // returned nothing — surface rather than miscount.\n inaccessible.push({ collection: collectionName, id })\n continue\n }\n recordCount++\n bytes += encoder.encode(JSON.stringify(env)).length\n const ts = env._ts\n if (oldestTs === undefined || ts < oldestTs) oldestTs = ts\n if (newestTs === undefined || ts > newestTs) newestTs = ts\n }\n\n byCollection.push({\n name: collectionName,\n recordCount,\n bytes,\n // Spread conditionally — exactOptionalPropertyTypes forbids an\n // explicit `undefined` on an optional property.\n ...(oldestTs !== undefined ? { oldestTs } : {}),\n ...(newestTs !== undefined ? { newestTs } : {}),\n })\n totalBytes += bytes\n totalRecords += recordCount\n }\n\n byCollection.sort((a, b) => a.name.localeCompare(b.name))\n\n return Object.freeze({\n totalRecords,\n totalBytes,\n byCollection,\n graph,\n inaccessible,\n danglingRefs,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,eAAsB,WACpB,MACA,aACkC;AAClC,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;AAAA,EACzF;AACA,QAAM,OAAO,oBAAI,IAAwB;AAC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;AAEnB,aAAW,CAAC,gBAAgB,GAAG,KAAK,SAAS;AAC3C,QAAI,QAAQ;AACZ,QAAI;AACJ,QAAI;AACJ,QAAI,cAAc;AAElB,eAAW,MAAM,KAAK;AACpB,YAAM,MAAM,MAAM,QAAQ,IAAI,WAAW,gBAAgB,EAAE;AAC3D,UAAI,CAAC,KAAK;AAGR,qBAAa,KAAK,EAAE,YAAY,gBAAgB,GAAG,CAAC;AACpD;AAAA,MACF;AACA;AACA,eAAS,QAAQ,OAAO,KAAK,UAAU,GAAG,CAAC,EAAE;AAC7C,YAAM,KAAK,IAAI;AACf,UAAI,aAAa,UAAa,KAAK,SAAU,YAAW;AACxD,UAAI,aAAa,UAAa,KAAK,SAAU,YAAW;AAAA,IAC1D;AAEA,iBAAa,KAAK;AAAA,MAChB,MAAM;AAAA,MACN;AAAA,MACA;AAAA;AAAA;AAAA,MAGA,GAAI,aAAa,SAAY,EAAE,SAAS,IAAI,CAAC;AAAA,MAC7C,GAAI,aAAa,SAAY,EAAE,SAAS,IAAI,CAAC;AAAA,IAC/C,CAAC;AACD,kBAAc;AACd,oBAAgB;AAAA,EAClB;AAEA,eAAa,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC;AAExD,SAAO,OAAO,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pickLocale
3
- } from "./chunk-XUW3PXHU.js";
3
+ } from "./chunk-J6Q7UVQE.js";
4
4
  import {
5
5
  sha256Hex
6
6
  } from "./chunk-HOONYZY2.js";
@@ -613,7 +613,7 @@ async function applySatelliteLivenessFilter(vault, dumpJson) {
613
613
  if (!backup.collections || typeof backup.collections !== "object") return dumpJson;
614
614
  if (typeof vault._introspectState !== "function") return dumpJson;
615
615
  const { adapter, name, getDEK } = vault._introspectState();
616
- const { liveBaseIdSetsForBundle } = await import("./dead-filter-66VGI6JV.js");
616
+ const { liveBaseIdSetsForBundle } = await import("./dead-filter-2A7IAJ3D.js");
617
617
  const satLive = await liveBaseIdSetsForBundle(adapter, name, Object.keys(backup.collections), getDEK);
618
618
  if (satLive.size === 0) return dumpJson;
619
619
  const next = {};
@@ -823,4 +823,4 @@ export {
823
823
  readPod,
824
824
  readNoydbBundle
825
825
  };
826
- //# sourceMappingURL=chunk-FXZDAV62.js.map
826
+ //# sourceMappingURL=chunk-A7JJLVGH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  putDerivedOutput
3
- } from "./chunk-LVGTA624.js";
3
+ } from "./chunk-MTQPRQHB.js";
4
4
  import {
5
5
  wrapDbWithPredicates
6
6
  } from "./chunk-S3BFKGET.js";
@@ -280,4 +280,4 @@ async function listOutputIds(outputColl) {
280
280
  export {
281
281
  MaterializedViewExecutor
282
282
  };
283
- //# sourceMappingURL=chunk-WG4QBZDN.js.map
283
+ //# sourceMappingURL=chunk-BGK233EA.js.map
@@ -376,31 +376,31 @@ function buildBlobFieldEntries(filenamesByField) {
376
376
  function withSearch() {
377
377
  return {
378
378
  async search(ctx, field, query, opts) {
379
- const { search: search2 } = await import("./collection-facade-KMBWNCYP.js");
379
+ const { search: search2 } = await import("./collection-facade-MJXSC3Q6.js");
380
380
  return search2(ctx, field, query, opts);
381
381
  },
382
382
  async retrieve(ctx, query, opts) {
383
- const { retrieve: retrieve2 } = await import("./collection-facade-KMBWNCYP.js");
383
+ const { retrieve: retrieve2 } = await import("./collection-facade-MJXSC3Q6.js");
384
384
  return retrieve2(ctx, query, opts);
385
385
  },
386
386
  async similarTo(ctx, vector, opts) {
387
- const { similarTo: similarTo2 } = await import("./collection-facade-KMBWNCYP.js");
387
+ const { similarTo: similarTo2 } = await import("./collection-facade-MJXSC3Q6.js");
388
388
  return similarTo2(ctx, vector, opts);
389
389
  },
390
390
  async warmIndex(ctx) {
391
- const { warmIndex: warmIndex2 } = await import("./collection-facade-KMBWNCYP.js");
391
+ const { warmIndex: warmIndex2 } = await import("./collection-facade-MJXSC3Q6.js");
392
392
  return warmIndex2(ctx);
393
393
  },
394
394
  async flushIndex(ctx) {
395
- const { flushIndex: flushIndex2 } = await import("./collection-facade-KMBWNCYP.js");
395
+ const { flushIndex: flushIndex2 } = await import("./collection-facade-MJXSC3Q6.js");
396
396
  return flushIndex2(ctx);
397
397
  },
398
398
  async embedOnWrite(ctx, id, record, version) {
399
- const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-KMBWNCYP.js");
399
+ const { embedOnWrite: embedOnWrite2 } = await import("./collection-facade-MJXSC3Q6.js");
400
400
  return embedOnWrite2(ctx, id, record, version);
401
401
  },
402
402
  async rebuildEmbeddings(ctx) {
403
- const { rebuildEmbeddings: rebuildEmbeddings2 } = await import("./collection-facade-KMBWNCYP.js");
403
+ const { rebuildEmbeddings: rebuildEmbeddings2 } = await import("./collection-facade-MJXSC3Q6.js");
404
404
  return rebuildEmbeddings2(ctx);
405
405
  }
406
406
  };
@@ -736,4 +736,4 @@ export {
736
736
  rebuildEmbeddings,
737
737
  syncTierSearch
738
738
  };
739
- //# sourceMappingURL=chunk-IK43HLDQ.js.map
739
+ //# sourceMappingURL=chunk-BMQWTQZ4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-VCTXU4AT.js";
3
+ } from "./chunk-LSASLXGC.js";
4
4
 
5
5
  // src/with-party/policy/storage.ts
6
6
  var META_COLLECTION = "_meta";
@@ -39,4 +39,4 @@ export {
39
39
  loadVaultPolicy,
40
40
  saveVaultPolicy
41
41
  };
42
- //# sourceMappingURL=chunk-XDIAFPUM.js.map
42
+ //# sourceMappingURL=chunk-CBSY2N76.js.map
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  loadPersistedSchemaEntry,
7
7
  savePersistedSchema
8
- } from "./chunk-CJ5KKU6X.js";
8
+ } from "./chunk-F6T6L2UK.js";
9
9
  import {
10
10
  ConflictError
11
11
  } from "./chunk-W2OG6JOL.js";
@@ -164,4 +164,4 @@ export {
164
164
  persistClassifiedMarker,
165
165
  persistSatelliteMarker
166
166
  };
167
- //# sourceMappingURL=chunk-GDG5VVYG.js.map
167
+ //# sourceMappingURL=chunk-CCOP5XDW.js.map
@@ -5,11 +5,11 @@ import {
5
5
  import {
6
6
  applyRewrappedBody,
7
7
  rewrapBodyToDek
8
- } from "./chunk-W4TCUGQR.js";
8
+ } from "./chunk-DVUZMT2W.js";
9
9
  import {
10
10
  isDeleteMarker,
11
11
  isTombstoneShape
12
- } from "./chunk-A4FXFAKF.js";
12
+ } from "./chunk-WEYZTLXN.js";
13
13
  import {
14
14
  decrypt,
15
15
  encrypt,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-HOONYZY2.js";
18
18
  import {
19
19
  NOYDB_FORMAT_VERSION
20
- } from "./chunk-VCTXU4AT.js";
20
+ } from "./chunk-LSASLXGC.js";
21
21
  import {
22
22
  PersistedIndexCompensationError,
23
23
  TierDemoteDeniedError,
@@ -378,4 +378,4 @@ export {
378
378
  demote,
379
379
  classifySealedShred
380
380
  };
381
- //# sourceMappingURL=chunk-CZTLE22N.js.map
381
+ //# sourceMappingURL=chunk-DDATL6PU.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isDeleteMarker,
3
3
  isTombstone
4
- } from "./chunk-A4FXFAKF.js";
4
+ } from "./chunk-WEYZTLXN.js";
5
5
  import {
6
6
  blindedEqual,
7
7
  openVdigPayload,
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  NOYDB_FORMAT_VERSION,
38
38
  SealedHandle
39
- } from "./chunk-VCTXU4AT.js";
39
+ } from "./chunk-LSASLXGC.js";
40
40
  import {
41
41
  ClassifiedConfigError,
42
42
  ClassifiedRotationError,
@@ -998,6 +998,9 @@ async function writeEnvelopeBody(json, key, opts) {
998
998
  const { iv, data } = await encrypt(json, key);
999
999
  return { _iv: iv, _data: data };
1000
1000
  }
1001
+ function envelopeBodySize(env) {
1002
+ return env._data.length + env._iv.length;
1003
+ }
1001
1004
  function hasPerRecordKey(env) {
1002
1005
  return env._cek !== void 0;
1003
1006
  }
@@ -1117,6 +1120,7 @@ export {
1117
1120
  queryByDet,
1118
1121
  openEnvelopeJson,
1119
1122
  writeEnvelopeBody,
1123
+ envelopeBodySize,
1120
1124
  hasPerRecordKey,
1121
1125
  envelopeBodyForHash,
1122
1126
  deriveBrokerProofBits,
@@ -1125,4 +1129,4 @@ export {
1125
1129
  issueChallenge,
1126
1130
  verifyBrokerProof
1127
1131
  };
1128
- //# sourceMappingURL=chunk-W4TCUGQR.js.map
1132
+ //# sourceMappingURL=chunk-DVUZMT2W.js.map