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

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 (352) hide show
  1. package/dist/aggregate/index.js +4 -4
  2. package/dist/api-UPAT2O3M.js +20 -0
  3. package/dist/as/index.js +12 -12
  4. package/dist/attestation/index.js +18 -18
  5. package/dist/{backup-LU2DTZTI.js → backup-JL2GOTYQ.js} +11 -11
  6. package/dist/blobs/index.js +27 -15
  7. package/dist/blobs/index.js.map +1 -1
  8. package/dist/broker/index.js +12 -12
  9. package/dist/by/index.js +2 -2
  10. package/dist/cargo/index.js +46 -36
  11. package/dist/{chunk-QDPZWTN2.js → chunk-25G7U6RD.js} +2 -2
  12. package/dist/{chunk-GQNGCEP5.js → chunk-25ZDB25Z.js} +2 -2
  13. package/dist/{chunk-5WZXVULX.js → chunk-2ITLQZV5.js} +2 -2
  14. package/dist/{chunk-WNGGJWF7.js → chunk-2JZ763FV.js} +2 -2
  15. package/dist/{chunk-2P7EGNKF.js → chunk-2KL6NDD4.js} +90 -3
  16. package/dist/chunk-2KL6NDD4.js.map +1 -0
  17. package/dist/{chunk-3U3FBR7O.js → chunk-2RMDVWGB.js} +2 -2
  18. package/dist/{chunk-VAIS3SOM.js → chunk-2U7Y7BNJ.js} +2 -2
  19. package/dist/{chunk-MQ6WOPSY.js → chunk-2VUISNGP.js} +5 -5
  20. package/dist/chunk-2YELV6TV.js +1 -0
  21. package/dist/{chunk-2MUZ3LY6.js → chunk-3O62PVDW.js} +3 -3
  22. package/dist/{chunk-LOF2W3JU.js → chunk-4JYYIFHW.js} +12 -12
  23. package/dist/{chunk-6HY2X62D.js → chunk-5BB3N4KU.js} +2 -2
  24. package/dist/{chunk-LSASLXGC.js → chunk-5BHNQNBI.js} +1 -1
  25. package/dist/{chunk-LSASLXGC.js.map → chunk-5BHNQNBI.js.map} +1 -1
  26. package/dist/{chunk-6NQMXTYC.js → chunk-5OZCCLNC.js} +2 -2
  27. package/dist/{chunk-HOONYZY2.js → chunk-5P5AAXYA.js} +2 -2
  28. package/dist/{chunk-T6GU5PPZ.js → chunk-5SZ24DL5.js} +6 -6
  29. package/dist/{chunk-PK6QCH2C.js → chunk-7B4GPCX7.js} +5 -5
  30. package/dist/{chunk-O7WJ47EF.js → chunk-A64XXIIB.js} +4 -4
  31. package/dist/{chunk-G6EQYAL6.js → chunk-AFBJHD55.js} +5 -5
  32. package/dist/{chunk-LB6OH6K2.js → chunk-BCOKZC4B.js} +2 -2
  33. package/dist/{chunk-J6Q7UVQE.js → chunk-BVZGNMVM.js} +4 -16
  34. package/dist/{chunk-J6Q7UVQE.js.map → chunk-BVZGNMVM.js.map} +1 -1
  35. package/dist/{chunk-IRQY7IR5.js → chunk-BZEPJJOK.js} +4 -4
  36. package/dist/{chunk-GYYCX5K6.js → chunk-BZK6JEX4.js} +5 -5
  37. package/dist/{chunk-7CI6CP7Z.js → chunk-CCT4WZI6.js} +5 -5
  38. package/dist/{chunk-VEALDPHW.js → chunk-CGPO3ZYB.js} +2 -2
  39. package/dist/{chunk-S3BFKGET.js → chunk-DEQ2JTBR.js} +3 -3
  40. package/dist/{chunk-3ELCWU56.js → chunk-E2R5NRZD.js} +2 -2
  41. package/dist/{chunk-BOKIKJJB.js → chunk-EDC6MLXV.js} +2 -2
  42. package/dist/{chunk-2IALOXZS.js → chunk-F4COUZLL.js} +2 -2
  43. package/dist/{chunk-JRBNCUNT.js → chunk-FLHOTGOO.js} +3 -3
  44. package/dist/{chunk-6XE5TMPR.js → chunk-GBEXTC6Z.js} +3 -3
  45. package/dist/{chunk-N55W7KUL.js → chunk-GS3Q2KOZ.js} +2 -2
  46. package/dist/{chunk-M75ZZHSR.js → chunk-GYB2QK5H.js} +2 -2
  47. package/dist/{chunk-6B4DYGWO.js → chunk-GZ2GKOF6.js} +3 -3
  48. package/dist/{chunk-VCBHAE4R.js → chunk-H4SMS4O2.js} +2 -2
  49. package/dist/{chunk-MTQPRQHB.js → chunk-HGVFJL63.js} +4 -4
  50. package/dist/{chunk-3SV2EPMN.js → chunk-HVZT5T22.js} +5 -5
  51. package/dist/{chunk-F6T6L2UK.js → chunk-IGAIOGCN.js} +4 -4
  52. package/dist/{chunk-W2OG6JOL.js → chunk-IGM563N5.js} +18 -1
  53. package/dist/chunk-IGM563N5.js.map +1 -0
  54. package/dist/{chunk-GWKAVKHI.js → chunk-ITI3SJRB.js} +2 -2
  55. package/dist/{chunk-DDATL6PU.js → chunk-IU22SQGU.js} +7 -7
  56. package/dist/{chunk-RTEK4C4I.js → chunk-IUIVDVXM.js} +2 -2
  57. package/dist/{chunk-UBNCR3YK.js → chunk-IZX3WZBF.js} +4 -4
  58. package/dist/{chunk-RDXW3OBQ.js → chunk-J3VW4J4E.js} +2 -2
  59. package/dist/{chunk-BMQWTQZ4.js → chunk-J6U4BOKP.js} +11 -11
  60. package/dist/{chunk-KUIB4B5Q.js → chunk-JA5B3SLH.js} +2 -2
  61. package/dist/{chunk-4BRCIYFG.js → chunk-JA5O7UEZ.js} +6 -6
  62. package/dist/{chunk-6HPG2YNX.js → chunk-JKWNG3TM.js} +2 -2
  63. package/dist/{chunk-RM2XV574.js → chunk-JLHKBAFY.js} +3 -3
  64. package/dist/{chunk-ISMV2QVG.js → chunk-KMONEHDJ.js} +2 -2
  65. package/dist/{chunk-ZEQWCBCM.js → chunk-KR5EGWI4.js} +5 -5
  66. package/dist/{chunk-JBBSYJHP.js → chunk-KVHWEPT2.js} +2 -2
  67. package/dist/{chunk-2PCAVW2I.js → chunk-L4OA7G5T.js} +2 -2
  68. package/dist/{chunk-IY23KFNZ.js → chunk-LLVW4V7R.js} +3 -3
  69. package/dist/{chunk-N6WF5PKC.js → chunk-M25ZIEB2.js} +2 -2
  70. package/dist/{chunk-A7JJLVGH.js → chunk-MEKAMERX.js} +5 -7
  71. package/dist/{chunk-A7JJLVGH.js.map → chunk-MEKAMERX.js.map} +1 -1
  72. package/dist/{chunk-UC2ETWF3.js → chunk-MSO2C3KG.js} +2 -2
  73. package/dist/{chunk-ONTBCHCP.js → chunk-N4FZ6ITM.js} +2 -2
  74. package/dist/{chunk-DRWBEDYO.js → chunk-NM4LVUXH.js} +2 -2
  75. package/dist/{chunk-HPUWOVR7.js → chunk-NOT7XA7Q.js} +5 -5
  76. package/dist/{chunk-RA5VTXXG.js → chunk-OGFPMCSP.js} +2 -2
  77. package/dist/{chunk-KUPKLSX5.js → chunk-OGY4ELVE.js} +3 -3
  78. package/dist/{chunk-T36RFODW.js → chunk-OOTTXUNV.js} +2 -2
  79. package/dist/{chunk-A5BDDEXK.js → chunk-OTU5ZI3U.js} +4 -4
  80. package/dist/{chunk-OF75ACKS.js → chunk-OVFCAS7U.js} +9 -9
  81. package/dist/{chunk-KWVJAOIN.js → chunk-OWE4BNTM.js} +4 -4
  82. package/dist/{chunk-DVUZMT2W.js → chunk-PEY6ZTCF.js} +8 -8
  83. package/dist/{chunk-7O3AYBC7.js → chunk-PWZKD4HW.js} +70 -59
  84. package/dist/chunk-PWZKD4HW.js.map +1 -0
  85. package/dist/{chunk-SMGEYW6G.js → chunk-QAFWRGVD.js} +7 -7
  86. package/dist/{chunk-TOPYT5U5.js → chunk-QCUH2G77.js} +6 -6
  87. package/dist/{chunk-CBSY2N76.js → chunk-QDNVHA2F.js} +2 -2
  88. package/dist/{chunk-FH52K7EG.js → chunk-QRHEAZ2Q.js} +2 -6
  89. package/dist/{chunk-FH52K7EG.js.map → chunk-QRHEAZ2Q.js.map} +1 -1
  90. package/dist/{chunk-WEYZTLXN.js → chunk-QXPOEAKR.js} +2 -2
  91. package/dist/{chunk-PT37L5DV.js → chunk-RGL53NXZ.js} +3 -3
  92. package/dist/{chunk-TAGR72IR.js → chunk-RI3OKC3Y.js} +4 -4
  93. package/dist/{chunk-UNCOC7QH.js → chunk-S3OYXPSE.js} +9 -9
  94. package/dist/{chunk-JVBO4SZL.js → chunk-STR7WBOB.js} +2 -2
  95. package/dist/{chunk-DDHM2TLX.js → chunk-T7S4V52L.js} +4 -4
  96. package/dist/{chunk-BGK233EA.js → chunk-TYBXP6WE.js} +7 -7
  97. package/dist/{chunk-RND5ZPNP.js → chunk-UEO5CHOP.js} +3 -3
  98. package/dist/{chunk-EGCRBCNA.js → chunk-V3YB7RGR.js} +3 -3
  99. package/dist/{chunk-IM3QVF53.js → chunk-V7RGFJ3Z.js} +6 -6
  100. package/dist/{chunk-SMIRGMS7.js → chunk-VEX6G3YL.js} +2 -2
  101. package/dist/{chunk-3PF6CRDT.js → chunk-VZELV7ZJ.js} +115 -120
  102. package/dist/{chunk-3PF6CRDT.js.map → chunk-VZELV7ZJ.js.map} +1 -1
  103. package/dist/{chunk-GULTLPFB.js → chunk-XGVDLQJE.js} +3 -3
  104. package/dist/{chunk-YJV2UZ7H.js → chunk-XULHFSHO.js} +5 -5
  105. package/dist/{chunk-S6Q37VGE.js → chunk-XW7NWO4A.js} +2 -2
  106. package/dist/{chunk-JZWWLLVY.js → chunk-Y5E6CH6S.js} +6 -6
  107. package/dist/{chunk-CCOP5XDW.js → chunk-YG2EG6CB.js} +4 -4
  108. package/dist/{chunk-5OI6BR4H.js → chunk-YGBIBOCR.js} +307 -17
  109. package/dist/chunk-YGBIBOCR.js.map +1 -0
  110. package/dist/{chunk-YTGDPCPW.js → chunk-YHPUDB7Q.js} +2 -2
  111. package/dist/{chunk-UFEVO57O.js → chunk-ZJGZDOQO.js} +6 -6
  112. package/dist/classified/index.js +5 -5
  113. package/dist/{classified-marker-WQVIJAW2.js → classified-marker-7S5IEP6Q.js} +3 -3
  114. package/dist/collection-facade-ENLTJZBT.js +44 -0
  115. package/dist/{computed-DSMPXG2Y.js → computed-WZNKRLCY.js} +3 -3
  116. package/dist/consent/index.js +9 -9
  117. package/dist/cover-B5MY43CK.js +36 -0
  118. package/dist/{dead-filter-2A7IAJ3D.js → dead-filter-KRRD57MR.js} +2 -2
  119. package/dist/delegation-UT76AQIG.js +25 -0
  120. package/dist/derivations/index.js +12 -12
  121. package/dist/derive-SGRCCKVP.js +21 -0
  122. package/dist/{enclave-7MW6ZGXW.js → enclave-YFKA3GJT.js} +9 -9
  123. package/dist/executor-TEZYRDN3.js +9 -0
  124. package/dist/executor-UF7LTX6O.js +26 -0
  125. package/dist/executor-WQQRU6DO.js +9 -0
  126. package/dist/export-accessible-HXMKW5LJ.js +23 -0
  127. package/dist/extract-partition-QGQ2R42J.js +38 -0
  128. package/dist/{fanout-sidecar-WDYQ77VB.js → fanout-sidecar-HJV3A7PM.js} +9 -9
  129. package/dist/find-VV6PBIHK.js +11 -0
  130. package/dist/forget/index.js +9 -9
  131. package/dist/guards/index.js +6 -6
  132. package/dist/history/index.js +12 -12
  133. package/dist/i18n/index.js +14 -14
  134. package/dist/index.d.ts +1 -4
  135. package/dist/index.js +173 -192
  136. package/dist/index.js.map +1 -1
  137. package/dist/indexing/index.js +2 -2
  138. package/dist/issue-7JJ4Z7E2.js +19 -0
  139. package/dist/kernel/errors.d.ts +19 -0
  140. package/dist/kernel/noydb.d.ts +0 -6
  141. package/dist/kernel/types.d.ts +20 -17
  142. package/dist/kernel/vault.d.ts +0 -4
  143. package/dist/{ledger-33BC4TR7.js → ledger-SW6QQOAV.js} +11 -11
  144. package/dist/liberate-W5MDWYOV.js +24 -0
  145. package/dist/{link-set-QK22TDEX.js → link-set-GNGGCFI4.js} +11 -11
  146. package/dist/materialized-views/index.js +19 -19
  147. package/dist/noydb-U63S3Z7F.js +70 -0
  148. package/dist/on/index.js +9 -9
  149. package/dist/overlay-views/index.js +4 -4
  150. package/dist/periods/index.js +13 -13
  151. package/dist/pod/index.js +27 -12
  152. package/dist/{policy-NAHB2TUT.js → policy-EAXSJNOT.js} +5 -5
  153. package/dist/portability/index.js +8 -8
  154. package/dist/{post-register-JVTMJ6OW.js → post-register-A7HCFBP5.js} +6 -6
  155. package/dist/query/index.js +6 -6
  156. package/dist/register-YBMRLZLO.js +23 -0
  157. package/dist/registry-3LXKNXWI.js +9 -0
  158. package/dist/registry-4V4YQCXJ.js +19 -0
  159. package/dist/registry-ZULMLCJK.js +18 -0
  160. package/dist/request-withdrawal-SEVUEUDG.js +31 -0
  161. package/dist/{reveal-LGBOM2BO.js → reveal-PB3YG544.js} +6 -6
  162. package/dist/revoke-5QULL5GT.js +24 -0
  163. package/dist/satellites/index.js +1 -1
  164. package/dist/sealed-record/index.js +12 -12
  165. package/dist/{seed-PWK45HDF.js → seed-6GTDHL4E.js} +11 -11
  166. package/dist/session/index.js +9 -9
  167. package/dist/shadow/index.js +2 -2
  168. package/dist/signer-ZMH35FT4.js +25 -0
  169. package/dist/snapshots/index.js +10 -10
  170. package/dist/{stale-FJED42DM.js → stale-NB5BGRVU.js} +10 -10
  171. package/dist/storage-QOZKQMID.js +23 -0
  172. package/dist/{store-coordination-provider-APODTV4W.js → store-coordination-provider-3AELCZ4Y.js} +3 -3
  173. package/dist/sync/index.js +10 -10
  174. package/dist/team/index.js +29 -29
  175. package/dist/tiers/index.js +10 -10
  176. package/dist/to/index.js +1 -1
  177. package/dist/tx/index.js +3 -3
  178. package/dist/util/index.js +1 -1
  179. package/dist/{verify-26Y5GNMK.js → verify-MXN66IIH.js} +5 -5
  180. package/dist/via/blob/active.d.ts +27 -1
  181. package/dist/via/blob/index.d.ts +4 -0
  182. package/dist/{walk-XS3PKM6I.js → walk-H4YE52S2.js} +11 -11
  183. package/dist/with/index.js +11 -11
  184. package/dist/with-audit/periods/vault-facade.d.ts +6 -0
  185. package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +1 -1
  186. package/dist/with-cargo/index.d.ts +6 -1
  187. package/dist/with-party/directory/cover/index.d.ts +0 -5
  188. package/dist/with-party/directory/cover/schema.d.ts +0 -6
  189. package/dist/with-party/directory/cover/storage.d.ts +0 -8
  190. package/dist/with-party/directory/cover/types.d.ts +0 -21
  191. package/dist/with-pod/bundle.d.ts +0 -2
  192. package/dist/with-pod/index.d.ts +2 -1
  193. package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
  194. package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
  195. package/dist/with-shape/blobs/blob-set.d.ts +85 -1
  196. package/dist/withdraw-accessible-HPOVNG2G.js +28 -0
  197. package/package.json +3 -7
  198. package/dist/api-IQFZJSQO.js +0 -20
  199. package/dist/bundle/index.js +0 -105
  200. package/dist/chunk-2P7EGNKF.js.map +0 -1
  201. package/dist/chunk-5OI6BR4H.js.map +0 -1
  202. package/dist/chunk-7O3AYBC7.js.map +0 -1
  203. package/dist/chunk-CHFZDSE4.js +0 -1
  204. package/dist/chunk-GVZQ4NAM.js +0 -14
  205. package/dist/chunk-GVZQ4NAM.js.map +0 -1
  206. package/dist/chunk-W2OG6JOL.js.map +0 -1
  207. package/dist/collection-facade-MJXSC3Q6.js +0 -44
  208. package/dist/cover-B5SJDHR3.js +0 -52
  209. package/dist/delegation-A5A75KQO.js +0 -25
  210. package/dist/derive-HJSMH7RA.js +0 -21
  211. package/dist/executor-AXE4XMLT.js +0 -26
  212. package/dist/executor-KGNLJD6M.js +0 -9
  213. package/dist/executor-XGIS6CR7.js +0 -9
  214. package/dist/export-accessible-VVBJM3MM.js +0 -23
  215. package/dist/extract-partition-LGGBTQET.js +0 -38
  216. package/dist/find-YS6XWB46.js +0 -11
  217. package/dist/issue-LSR5PS6H.js +0 -19
  218. package/dist/legacy/bundle.d.ts +0 -30
  219. package/dist/liberate-GBSAYLPJ.js +0 -24
  220. package/dist/noydb-MTUBMWFE.js +0 -70
  221. package/dist/register-X462DNDM.js +0 -23
  222. package/dist/registry-3XMCT7MQ.js +0 -18
  223. package/dist/registry-KHD2I3M2.js +0 -19
  224. package/dist/registry-NPOWJHC4.js +0 -9
  225. package/dist/request-withdrawal-U7K3JTMY.js +0 -31
  226. package/dist/revoke-OCWDSWRQ.js +0 -24
  227. package/dist/signer-3YFBLZRN.js +0 -25
  228. package/dist/storage-W3GURVFU.js +0 -23
  229. package/dist/withdraw-accessible-Y3B2535F.js +0 -28
  230. package/dist/withdraw-accessible-Y3B2535F.js.map +0 -1
  231. /package/dist/{api-IQFZJSQO.js.map → api-UPAT2O3M.js.map} +0 -0
  232. /package/dist/{backup-LU2DTZTI.js.map → backup-JL2GOTYQ.js.map} +0 -0
  233. /package/dist/{chunk-QDPZWTN2.js.map → chunk-25G7U6RD.js.map} +0 -0
  234. /package/dist/{chunk-GQNGCEP5.js.map → chunk-25ZDB25Z.js.map} +0 -0
  235. /package/dist/{chunk-5WZXVULX.js.map → chunk-2ITLQZV5.js.map} +0 -0
  236. /package/dist/{chunk-WNGGJWF7.js.map → chunk-2JZ763FV.js.map} +0 -0
  237. /package/dist/{chunk-3U3FBR7O.js.map → chunk-2RMDVWGB.js.map} +0 -0
  238. /package/dist/{chunk-VAIS3SOM.js.map → chunk-2U7Y7BNJ.js.map} +0 -0
  239. /package/dist/{chunk-MQ6WOPSY.js.map → chunk-2VUISNGP.js.map} +0 -0
  240. /package/dist/{bundle/index.js.map → chunk-2YELV6TV.js.map} +0 -0
  241. /package/dist/{chunk-2MUZ3LY6.js.map → chunk-3O62PVDW.js.map} +0 -0
  242. /package/dist/{chunk-LOF2W3JU.js.map → chunk-4JYYIFHW.js.map} +0 -0
  243. /package/dist/{chunk-6HY2X62D.js.map → chunk-5BB3N4KU.js.map} +0 -0
  244. /package/dist/{chunk-6NQMXTYC.js.map → chunk-5OZCCLNC.js.map} +0 -0
  245. /package/dist/{chunk-HOONYZY2.js.map → chunk-5P5AAXYA.js.map} +0 -0
  246. /package/dist/{chunk-T6GU5PPZ.js.map → chunk-5SZ24DL5.js.map} +0 -0
  247. /package/dist/{chunk-PK6QCH2C.js.map → chunk-7B4GPCX7.js.map} +0 -0
  248. /package/dist/{chunk-O7WJ47EF.js.map → chunk-A64XXIIB.js.map} +0 -0
  249. /package/dist/{chunk-G6EQYAL6.js.map → chunk-AFBJHD55.js.map} +0 -0
  250. /package/dist/{chunk-LB6OH6K2.js.map → chunk-BCOKZC4B.js.map} +0 -0
  251. /package/dist/{chunk-IRQY7IR5.js.map → chunk-BZEPJJOK.js.map} +0 -0
  252. /package/dist/{chunk-GYYCX5K6.js.map → chunk-BZK6JEX4.js.map} +0 -0
  253. /package/dist/{chunk-7CI6CP7Z.js.map → chunk-CCT4WZI6.js.map} +0 -0
  254. /package/dist/{chunk-VEALDPHW.js.map → chunk-CGPO3ZYB.js.map} +0 -0
  255. /package/dist/{chunk-S3BFKGET.js.map → chunk-DEQ2JTBR.js.map} +0 -0
  256. /package/dist/{chunk-3ELCWU56.js.map → chunk-E2R5NRZD.js.map} +0 -0
  257. /package/dist/{chunk-BOKIKJJB.js.map → chunk-EDC6MLXV.js.map} +0 -0
  258. /package/dist/{chunk-2IALOXZS.js.map → chunk-F4COUZLL.js.map} +0 -0
  259. /package/dist/{chunk-JRBNCUNT.js.map → chunk-FLHOTGOO.js.map} +0 -0
  260. /package/dist/{chunk-6XE5TMPR.js.map → chunk-GBEXTC6Z.js.map} +0 -0
  261. /package/dist/{chunk-N55W7KUL.js.map → chunk-GS3Q2KOZ.js.map} +0 -0
  262. /package/dist/{chunk-M75ZZHSR.js.map → chunk-GYB2QK5H.js.map} +0 -0
  263. /package/dist/{chunk-6B4DYGWO.js.map → chunk-GZ2GKOF6.js.map} +0 -0
  264. /package/dist/{chunk-VCBHAE4R.js.map → chunk-H4SMS4O2.js.map} +0 -0
  265. /package/dist/{chunk-MTQPRQHB.js.map → chunk-HGVFJL63.js.map} +0 -0
  266. /package/dist/{chunk-3SV2EPMN.js.map → chunk-HVZT5T22.js.map} +0 -0
  267. /package/dist/{chunk-F6T6L2UK.js.map → chunk-IGAIOGCN.js.map} +0 -0
  268. /package/dist/{chunk-GWKAVKHI.js.map → chunk-ITI3SJRB.js.map} +0 -0
  269. /package/dist/{chunk-DDATL6PU.js.map → chunk-IU22SQGU.js.map} +0 -0
  270. /package/dist/{chunk-RTEK4C4I.js.map → chunk-IUIVDVXM.js.map} +0 -0
  271. /package/dist/{chunk-UBNCR3YK.js.map → chunk-IZX3WZBF.js.map} +0 -0
  272. /package/dist/{chunk-RDXW3OBQ.js.map → chunk-J3VW4J4E.js.map} +0 -0
  273. /package/dist/{chunk-BMQWTQZ4.js.map → chunk-J6U4BOKP.js.map} +0 -0
  274. /package/dist/{chunk-KUIB4B5Q.js.map → chunk-JA5B3SLH.js.map} +0 -0
  275. /package/dist/{chunk-4BRCIYFG.js.map → chunk-JA5O7UEZ.js.map} +0 -0
  276. /package/dist/{chunk-6HPG2YNX.js.map → chunk-JKWNG3TM.js.map} +0 -0
  277. /package/dist/{chunk-RM2XV574.js.map → chunk-JLHKBAFY.js.map} +0 -0
  278. /package/dist/{chunk-ISMV2QVG.js.map → chunk-KMONEHDJ.js.map} +0 -0
  279. /package/dist/{chunk-ZEQWCBCM.js.map → chunk-KR5EGWI4.js.map} +0 -0
  280. /package/dist/{chunk-JBBSYJHP.js.map → chunk-KVHWEPT2.js.map} +0 -0
  281. /package/dist/{chunk-2PCAVW2I.js.map → chunk-L4OA7G5T.js.map} +0 -0
  282. /package/dist/{chunk-IY23KFNZ.js.map → chunk-LLVW4V7R.js.map} +0 -0
  283. /package/dist/{chunk-N6WF5PKC.js.map → chunk-M25ZIEB2.js.map} +0 -0
  284. /package/dist/{chunk-UC2ETWF3.js.map → chunk-MSO2C3KG.js.map} +0 -0
  285. /package/dist/{chunk-ONTBCHCP.js.map → chunk-N4FZ6ITM.js.map} +0 -0
  286. /package/dist/{chunk-DRWBEDYO.js.map → chunk-NM4LVUXH.js.map} +0 -0
  287. /package/dist/{chunk-HPUWOVR7.js.map → chunk-NOT7XA7Q.js.map} +0 -0
  288. /package/dist/{chunk-RA5VTXXG.js.map → chunk-OGFPMCSP.js.map} +0 -0
  289. /package/dist/{chunk-KUPKLSX5.js.map → chunk-OGY4ELVE.js.map} +0 -0
  290. /package/dist/{chunk-T36RFODW.js.map → chunk-OOTTXUNV.js.map} +0 -0
  291. /package/dist/{chunk-A5BDDEXK.js.map → chunk-OTU5ZI3U.js.map} +0 -0
  292. /package/dist/{chunk-OF75ACKS.js.map → chunk-OVFCAS7U.js.map} +0 -0
  293. /package/dist/{chunk-KWVJAOIN.js.map → chunk-OWE4BNTM.js.map} +0 -0
  294. /package/dist/{chunk-DVUZMT2W.js.map → chunk-PEY6ZTCF.js.map} +0 -0
  295. /package/dist/{chunk-SMGEYW6G.js.map → chunk-QAFWRGVD.js.map} +0 -0
  296. /package/dist/{chunk-TOPYT5U5.js.map → chunk-QCUH2G77.js.map} +0 -0
  297. /package/dist/{chunk-CBSY2N76.js.map → chunk-QDNVHA2F.js.map} +0 -0
  298. /package/dist/{chunk-WEYZTLXN.js.map → chunk-QXPOEAKR.js.map} +0 -0
  299. /package/dist/{chunk-PT37L5DV.js.map → chunk-RGL53NXZ.js.map} +0 -0
  300. /package/dist/{chunk-TAGR72IR.js.map → chunk-RI3OKC3Y.js.map} +0 -0
  301. /package/dist/{chunk-UNCOC7QH.js.map → chunk-S3OYXPSE.js.map} +0 -0
  302. /package/dist/{chunk-JVBO4SZL.js.map → chunk-STR7WBOB.js.map} +0 -0
  303. /package/dist/{chunk-DDHM2TLX.js.map → chunk-T7S4V52L.js.map} +0 -0
  304. /package/dist/{chunk-BGK233EA.js.map → chunk-TYBXP6WE.js.map} +0 -0
  305. /package/dist/{chunk-RND5ZPNP.js.map → chunk-UEO5CHOP.js.map} +0 -0
  306. /package/dist/{chunk-EGCRBCNA.js.map → chunk-V3YB7RGR.js.map} +0 -0
  307. /package/dist/{chunk-IM3QVF53.js.map → chunk-V7RGFJ3Z.js.map} +0 -0
  308. /package/dist/{chunk-SMIRGMS7.js.map → chunk-VEX6G3YL.js.map} +0 -0
  309. /package/dist/{chunk-GULTLPFB.js.map → chunk-XGVDLQJE.js.map} +0 -0
  310. /package/dist/{chunk-YJV2UZ7H.js.map → chunk-XULHFSHO.js.map} +0 -0
  311. /package/dist/{chunk-S6Q37VGE.js.map → chunk-XW7NWO4A.js.map} +0 -0
  312. /package/dist/{chunk-JZWWLLVY.js.map → chunk-Y5E6CH6S.js.map} +0 -0
  313. /package/dist/{chunk-CCOP5XDW.js.map → chunk-YG2EG6CB.js.map} +0 -0
  314. /package/dist/{chunk-YTGDPCPW.js.map → chunk-YHPUDB7Q.js.map} +0 -0
  315. /package/dist/{chunk-UFEVO57O.js.map → chunk-ZJGZDOQO.js.map} +0 -0
  316. /package/dist/{classified-marker-WQVIJAW2.js.map → classified-marker-7S5IEP6Q.js.map} +0 -0
  317. /package/dist/{chunk-CHFZDSE4.js.map → collection-facade-ENLTJZBT.js.map} +0 -0
  318. /package/dist/{collection-facade-MJXSC3Q6.js.map → computed-WZNKRLCY.js.map} +0 -0
  319. /package/dist/{computed-DSMPXG2Y.js.map → cover-B5MY43CK.js.map} +0 -0
  320. /package/dist/{dead-filter-2A7IAJ3D.js.map → dead-filter-KRRD57MR.js.map} +0 -0
  321. /package/dist/{cover-B5SJDHR3.js.map → delegation-UT76AQIG.js.map} +0 -0
  322. /package/dist/{delegation-A5A75KQO.js.map → derive-SGRCCKVP.js.map} +0 -0
  323. /package/dist/{derive-HJSMH7RA.js.map → enclave-YFKA3GJT.js.map} +0 -0
  324. /package/dist/{enclave-7MW6ZGXW.js.map → executor-TEZYRDN3.js.map} +0 -0
  325. /package/dist/{executor-AXE4XMLT.js.map → executor-UF7LTX6O.js.map} +0 -0
  326. /package/dist/{executor-KGNLJD6M.js.map → executor-WQQRU6DO.js.map} +0 -0
  327. /package/dist/{executor-XGIS6CR7.js.map → export-accessible-HXMKW5LJ.js.map} +0 -0
  328. /package/dist/{export-accessible-VVBJM3MM.js.map → extract-partition-QGQ2R42J.js.map} +0 -0
  329. /package/dist/{fanout-sidecar-WDYQ77VB.js.map → fanout-sidecar-HJV3A7PM.js.map} +0 -0
  330. /package/dist/{extract-partition-LGGBTQET.js.map → find-VV6PBIHK.js.map} +0 -0
  331. /package/dist/{find-YS6XWB46.js.map → issue-7JJ4Z7E2.js.map} +0 -0
  332. /package/dist/{issue-LSR5PS6H.js.map → ledger-SW6QQOAV.js.map} +0 -0
  333. /package/dist/{ledger-33BC4TR7.js.map → liberate-W5MDWYOV.js.map} +0 -0
  334. /package/dist/{liberate-GBSAYLPJ.js.map → link-set-GNGGCFI4.js.map} +0 -0
  335. /package/dist/{link-set-QK22TDEX.js.map → noydb-U63S3Z7F.js.map} +0 -0
  336. /package/dist/{noydb-MTUBMWFE.js.map → policy-EAXSJNOT.js.map} +0 -0
  337. /package/dist/{post-register-JVTMJ6OW.js.map → post-register-A7HCFBP5.js.map} +0 -0
  338. /package/dist/{policy-NAHB2TUT.js.map → register-YBMRLZLO.js.map} +0 -0
  339. /package/dist/{register-X462DNDM.js.map → registry-3LXKNXWI.js.map} +0 -0
  340. /package/dist/{registry-3XMCT7MQ.js.map → registry-4V4YQCXJ.js.map} +0 -0
  341. /package/dist/{registry-KHD2I3M2.js.map → registry-ZULMLCJK.js.map} +0 -0
  342. /package/dist/{registry-NPOWJHC4.js.map → request-withdrawal-SEVUEUDG.js.map} +0 -0
  343. /package/dist/{reveal-LGBOM2BO.js.map → reveal-PB3YG544.js.map} +0 -0
  344. /package/dist/{request-withdrawal-U7K3JTMY.js.map → revoke-5QULL5GT.js.map} +0 -0
  345. /package/dist/{seed-PWK45HDF.js.map → seed-6GTDHL4E.js.map} +0 -0
  346. /package/dist/{revoke-OCWDSWRQ.js.map → signer-ZMH35FT4.js.map} +0 -0
  347. /package/dist/{signer-3YFBLZRN.js.map → stale-NB5BGRVU.js.map} +0 -0
  348. /package/dist/{stale-FJED42DM.js.map → storage-QOZKQMID.js.map} +0 -0
  349. /package/dist/{store-coordination-provider-APODTV4W.js.map → store-coordination-provider-3AELCZ4Y.js.map} +0 -0
  350. /package/dist/{verify-26Y5GNMK.js.map → verify-MXN66IIH.js.map} +0 -0
  351. /package/dist/{walk-XS3PKM6I.js.map → walk-H4YE52S2.js.map} +0 -0
  352. /package/dist/{storage-W3GURVFU.js.map → withdraw-accessible-HPOVNG2G.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  applyJoins
3
- } from "./chunk-RA5VTXXG.js";
3
+ } from "./chunk-OGFPMCSP.js";
4
4
  import {
5
5
  reducerBuilder
6
- } from "./chunk-TAGR72IR.js";
6
+ } from "./chunk-RI3OKC3Y.js";
7
7
  import {
8
8
  evaluateClause,
9
9
  hasFnClause,
@@ -14,7 +14,7 @@ import {
14
14
  CrossJoinTooLargeError,
15
15
  DanglingReferenceError,
16
16
  FieldNotQueryableError
17
- } from "./chunk-W2OG6JOL.js";
17
+ } from "./chunk-IGM563N5.js";
18
18
 
19
19
  // src/kernel/query/live.ts
20
20
  function buildLiveQuery(recompute, upstreams) {
@@ -1534,4 +1534,4 @@ export {
1534
1534
  executePlan,
1535
1535
  ScanBuilder
1536
1536
  };
1537
- //# sourceMappingURL=chunk-A5BDDEXK.js.map
1537
+ //# sourceMappingURL=chunk-OTU5ZI3U.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SCHEMAS_COLLECTION
3
- } from "./chunk-F6T6L2UK.js";
3
+ } from "./chunk-IGAIOGCN.js";
4
4
  import {
5
5
  BLOB_CHUNKS_COLLECTION,
6
6
  BLOB_COLLECTION,
@@ -8,11 +8,11 @@ import {
8
8
  BLOB_INTENT_COLLECTION,
9
9
  BLOB_SLOTS_PREFIX,
10
10
  BLOB_VERSIONS_PREFIX
11
- } from "./chunk-5OI6BR4H.js";
11
+ } from "./chunk-YGBIBOCR.js";
12
12
  import {
13
13
  assembleBundleContainer,
14
14
  buildExtractedPartitionWrapper
15
- } from "./chunk-A7JJLVGH.js";
15
+ } from "./chunk-MEKAMERX.js";
16
16
  import {
17
17
  generateULID
18
18
  } from "./chunk-ZJADGNYF.js";
@@ -23,11 +23,11 @@ import {
23
23
  canonicalJson,
24
24
  envelopePayloadHash,
25
25
  hashEntry
26
- } from "./chunk-RM2XV574.js";
26
+ } from "./chunk-JLHKBAFY.js";
27
27
  import {
28
28
  openEnvelopeJson,
29
29
  writeEnvelopeBody
30
- } from "./chunk-DVUZMT2W.js";
30
+ } from "./chunk-PEY6ZTCF.js";
31
31
  import {
32
32
  bufferToBase64,
33
33
  decrypt,
@@ -37,14 +37,14 @@ import {
37
37
  generateDEK,
38
38
  unwrapCek,
39
39
  wrapCek
40
- } from "./chunk-HOONYZY2.js";
40
+ } from "./chunk-5P5AAXYA.js";
41
41
  import {
42
42
  NOYDB_BACKUP_VERSION,
43
43
  NOYDB_FORMAT_VERSION
44
- } from "./chunk-LSASLXGC.js";
44
+ } from "./chunk-5BHNQNBI.js";
45
45
  import {
46
46
  PartitionExtractionError
47
- } from "./chunk-W2OG6JOL.js";
47
+ } from "./chunk-IGM563N5.js";
48
48
 
49
49
  // src/with-cargo/walk-closure.ts
50
50
  async function walkClosure(vault, opts) {
@@ -492,4 +492,4 @@ export {
492
492
  extractPartition,
493
493
  extractPartitionCore
494
494
  };
495
- //# sourceMappingURL=chunk-OF75ACKS.js.map
495
+ //# sourceMappingURL=chunk-OVFCAS7U.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-DVUZMT2W.js";
3
+ } from "./chunk-PEY6ZTCF.js";
4
4
  import {
5
5
  encrypt,
6
6
  hmacSha256Hex,
7
7
  sha256Hex
8
- } from "./chunk-HOONYZY2.js";
8
+ } from "./chunk-5P5AAXYA.js";
9
9
  import {
10
10
  NOYDB_FORMAT_VERSION
11
- } from "./chunk-LSASLXGC.js";
11
+ } from "./chunk-5BHNQNBI.js";
12
12
 
13
13
  // src/with-audit/forget/strategy.ts
14
14
  var NO_FORGET = { subjects: {} };
@@ -147,4 +147,4 @@ export {
147
147
  coerceSubjectId,
148
148
  readDottedPath
149
149
  };
150
- //# sourceMappingURL=chunk-KWVJAOIN.js.map
150
+ //# sourceMappingURL=chunk-OWE4BNTM.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  isDeleteMarker,
3
3
  isTombstone
4
- } from "./chunk-WEYZTLXN.js";
4
+ } from "./chunk-QXPOEAKR.js";
5
5
  import {
6
6
  blindedEqual,
7
7
  openVdigPayload,
8
8
  sealVdigPayload
9
- } from "./chunk-IY23KFNZ.js";
9
+ } from "./chunk-LLVW4V7R.js";
10
10
  import {
11
11
  dualReadSealedSlot,
12
12
  parseSealedSlot
13
- } from "./chunk-N6WF5PKC.js";
13
+ } from "./chunk-M25ZIEB2.js";
14
14
  import {
15
15
  mintBidxTag
16
- } from "./chunk-6HY2X62D.js";
16
+ } from "./chunk-5BB3N4KU.js";
17
17
  import {
18
18
  VDIG_ITERATIONS,
19
19
  normalizeForVerify,
@@ -32,11 +32,11 @@ import {
32
32
  generateSalt,
33
33
  unwrapCek,
34
34
  wrapCek
35
- } from "./chunk-HOONYZY2.js";
35
+ } from "./chunk-5P5AAXYA.js";
36
36
  import {
37
37
  NOYDB_FORMAT_VERSION,
38
38
  SealedHandle
39
- } from "./chunk-LSASLXGC.js";
39
+ } from "./chunk-5BHNQNBI.js";
40
40
  import {
41
41
  ClassifiedConfigError,
42
42
  ClassifiedRotationError,
@@ -45,7 +45,7 @@ import {
45
45
  SchemaValidationError,
46
46
  TamperedError,
47
47
  ValidationError
48
- } from "./chunk-W2OG6JOL.js";
48
+ } from "./chunk-IGM563N5.js";
49
49
 
50
50
  // src/kernel/enclave/record-keys/lifecycle.ts
51
51
  async function resolveStableCek(deps, id) {
@@ -1129,4 +1129,4 @@ export {
1129
1129
  issueChallenge,
1130
1130
  verifyBrokerProof
1131
1131
  };
1132
- //# sourceMappingURL=chunk-DVUZMT2W.js.map
1132
+ //# sourceMappingURL=chunk-PEY6ZTCF.js.map
@@ -1,35 +1,94 @@
1
1
  import {
2
2
  walkClosure
3
- } from "./chunk-OF75ACKS.js";
3
+ } from "./chunk-OVFCAS7U.js";
4
4
  import {
5
5
  resolveManagedSecret
6
- } from "./chunk-LB6OH6K2.js";
6
+ } from "./chunk-BCOKZC4B.js";
7
7
  import {
8
8
  parseExtractedPartitionBody,
9
9
  readPod,
10
10
  readPodHeader
11
- } from "./chunk-A7JJLVGH.js";
11
+ } from "./chunk-MEKAMERX.js";
12
12
  import {
13
13
  createOwnerKeyring
14
- } from "./chunk-3SV2EPMN.js";
14
+ } from "./chunk-HVZT5T22.js";
15
15
  import {
16
16
  LedgerStore
17
- } from "./chunk-UFEVO57O.js";
17
+ } from "./chunk-ZJGZDOQO.js";
18
18
  import {
19
19
  LEDGER_COLLECTION
20
20
  } from "./chunk-I7FD46FF.js";
21
21
  import {
22
22
  openEnvelopeJson
23
- } from "./chunk-DVUZMT2W.js";
23
+ } from "./chunk-PEY6ZTCF.js";
24
24
  import {
25
25
  base64ToBuffer,
26
26
  wrapKey
27
- } from "./chunk-HOONYZY2.js";
27
+ } from "./chunk-5P5AAXYA.js";
28
28
  import {
29
29
  AdoptionStateError,
30
30
  TransferSealError,
31
31
  ValidationError
32
- } from "./chunk-W2OG6JOL.js";
32
+ } from "./chunk-IGM563N5.js";
33
+
34
+ // src/with-cargo/active.ts
35
+ function withCargo() {
36
+ return {
37
+ async extractPartition(vault, opts) {
38
+ const { extractPartitionCore } = await import("./extract-partition-QGQ2R42J.js");
39
+ return extractPartitionCore(vault, opts);
40
+ }
41
+ };
42
+ }
43
+
44
+ // src/with-cargo/describe-extraction.ts
45
+ async function describeExtraction(vault, opts) {
46
+ const { closure, graph, danglingRefs } = await walkClosure(vault, opts);
47
+ const { name: vaultName, adapter } = vault._introspectState();
48
+ const encoder = new TextEncoder();
49
+ const byCollection = [];
50
+ const inaccessible = [];
51
+ let totalBytes = 0;
52
+ let totalRecords = 0;
53
+ for (const [collectionName, ids] of closure) {
54
+ let bytes = 0;
55
+ let oldestTs;
56
+ let newestTs;
57
+ let recordCount = 0;
58
+ for (const id of ids) {
59
+ const env = await adapter.get(vaultName, collectionName, id);
60
+ if (!env) {
61
+ inaccessible.push({ collection: collectionName, id });
62
+ continue;
63
+ }
64
+ recordCount++;
65
+ bytes += encoder.encode(JSON.stringify(env)).length;
66
+ const ts = env._ts;
67
+ if (oldestTs === void 0 || ts < oldestTs) oldestTs = ts;
68
+ if (newestTs === void 0 || ts > newestTs) newestTs = ts;
69
+ }
70
+ byCollection.push({
71
+ name: collectionName,
72
+ recordCount,
73
+ bytes,
74
+ // Spread conditionally — exactOptionalPropertyTypes forbids an
75
+ // explicit `undefined` on an optional property.
76
+ ...oldestTs !== void 0 ? { oldestTs } : {},
77
+ ...newestTs !== void 0 ? { newestTs } : {}
78
+ });
79
+ totalBytes += bytes;
80
+ totalRecords += recordCount;
81
+ }
82
+ byCollection.sort((a, b) => a.name.localeCompare(b.name));
83
+ return Object.freeze({
84
+ totalRecords,
85
+ totalBytes,
86
+ byCollection,
87
+ graph,
88
+ inaccessible,
89
+ danglingRefs
90
+ });
91
+ }
33
92
 
34
93
  // src/with-cargo/adopt-partition.ts
35
94
  async function unsealDeks(seal, transferKey) {
@@ -182,7 +241,7 @@ async function createOwnerOnAdoptedPartition(store, vaultName, opts) {
182
241
  }
183
242
  }
184
243
  if (isManaged(opts)) {
185
- const { createNoydb } = await import("./noydb-MTUBMWFE.js");
244
+ const { createNoydb } = await import("./noydb-U63S3Z7F.js");
186
245
  const db = await createNoydb({
187
246
  store,
188
247
  user: userId,
@@ -229,60 +288,12 @@ async function decryptExtractedPartition(bundleBytes, transferKey) {
229
288
  return out;
230
289
  }
231
290
 
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
-
281
291
  export {
282
292
  unsealDeks,
283
293
  adoptPartition,
284
294
  createOwnerOnAdoptedPartition,
285
295
  decryptExtractedPartition,
296
+ withCargo,
286
297
  describeExtraction
287
298
  };
288
- //# sourceMappingURL=chunk-7O3AYBC7.js.map
299
+ //# sourceMappingURL=chunk-PWZKD4HW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-cargo/active.ts","../src/with-cargo/describe-extraction.ts","../src/with-cargo/adopt-partition.ts","../src/with-cargo/decrypt-partition.ts"],"sourcesContent":["/**\n * Enable the cargo (partition extraction) capability.\n * Pass to `createNoydb({ cargoStrategy: withCargo() })` to make the source-side\n * `extractPartition(vault, ...)` free function live. The extraction crypto\n * engine is dynamically imported here, so it stays out of the floor bundle\n * until opted in. The recipient-side `adoptPartition` /\n * `decryptExtractedPartition` free functions — and `diffVault` (shared\n * import/merge infra) — are ungated and unaffected.\n */\nimport type { CargoStrategy } from './strategy.js'\n\nexport function withCargo(): CargoStrategy {\n return {\n async extractPartition(vault, opts) {\n const { extractPartitionCore } = await import('./extract-partition.js')\n return extractPartitionCore(vault, opts)\n },\n }\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","/**\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/cargo 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,YAA2B;AACzC,SAAO;AAAA,IACL,MAAM,iBAAiB,OAAO,MAAM;AAClC,YAAM,EAAE,qBAAqB,IAAI,MAAM,OAAO,iCAAwB;AACtE,aAAO,qBAAqB,OAAO,IAAI;AAAA,IACzC;AAAA,EACF;AACF;;;ACkBA,eAAsB,mBACpB,OACA,MAC4B;AAC5B,QAAM,EAAE,SAAS,OAAO,aAAa,IAAI,MAAM,YAAY,OAAO,IAAI;AAEtE,QAAM,EAAE,MAAM,WAAW,QAAQ,IAAI,MAAM,iBAAiB;AAC5D,QAAM,UAAU,IAAI,YAAY;AAEhC,QAAM,eAED,CAAC;AACN,QAAM,eAA0D,CAAC;AACjE,MAAI,aAAa;AACjB,MAAI,eAAe;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,Q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A,aAC4C;AAC5C,QAAM,SAAS,cAAc,WAAW;AACxC,MAAI,OAAO,eAAe,yBAAyB,OAAO,iBAAiB,QAAW;AACpF,UAAM,IAAI,MAAM,kEAAkE;AAAA,EACpF;AACA,QAAM,EAAE,SAAS,IAAI,MAAM,QAAQ,WAAW;AAC9C,QAAM,EAAE,MAAM,KAAK,IAAI,4BAA4B,QAAQ;AAC3D,QAAM,OAAO,MAAM,WAAW,MAAM,WAAW;AAC/C,QAAM,SAAS,KAAK,MAAM,IAAI;AAC9B,QAAM,MAAyC,CAAC;AAChD,aAAW,CAAC,YAAY,IAAI,KAAK,OAAO,QAAQ,OAAO,WAAW,GAAG;AACnE,UAAM,MAAM,KAAK,IAAI,UAAU;AAC/B,QAAI,QAAQ,OAAW;AACvB,UAAM,OAA0B,CAAC;AACjC,eAAW,CAAC,IAAI,GAAG,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC5C,YAAM,YAAY,MAAM,iBAAiB,KAAK,GAAG;AACjD,YAAM,OAAO,KAAK,MAAM,SAAS;AACjC,WAAK,KAAK;AAAA,QACR;AAAA,QACA,QAAQ,EAAE,GAAG,MAAM,GAAG;AAAA,QACtB,IAAI,IAAI;AAAA,QACR,SAAS,IAAI;AAAA,QACb,GAAI,IAAI,YAAY,SAAY,EAAE,QAAQ,IAAI,QAAQ,IAAI,CAAC;AAAA,QAC3D,GAAI,IAAI,cAAc,SAAY,EAAE,UAAU,IAAI,UAAU,IAAI,CAAC;AAAA,MACnE,CAAC;AAAA,IACH;AACA,QAAI,UAAU,IAAI;AAAA,EACpB;AACA,SAAO;AACT;","names":[]}
@@ -7,28 +7,28 @@ import {
7
7
  PERIOD_FREEZES_COLLECTION,
8
8
  PERIOD_TARGET_PURGES_COLLECTION,
9
9
  periodExclusiveUpperBound
10
- } from "./chunk-2IALOXZS.js";
10
+ } from "./chunk-F4COUZLL.js";
11
11
  import {
12
12
  envelopeBodySize
13
- } from "./chunk-DVUZMT2W.js";
13
+ } from "./chunk-PEY6ZTCF.js";
14
14
  import {
15
15
  isDeleteMarker,
16
16
  isTombstoneShape
17
- } from "./chunk-WEYZTLXN.js";
17
+ } from "./chunk-QXPOEAKR.js";
18
18
  import {
19
19
  bufferToBase64,
20
20
  decrypt,
21
21
  derivePresenceKey,
22
22
  encrypt,
23
23
  generateIV
24
- } from "./chunk-HOONYZY2.js";
24
+ } from "./chunk-5P5AAXYA.js";
25
25
  import {
26
26
  NOYDB_SYNC_VERSION
27
- } from "./chunk-LSASLXGC.js";
27
+ } from "./chunk-5BHNQNBI.js";
28
28
  import {
29
29
  ConflictError,
30
30
  ValidationError
31
- } from "./chunk-W2OG6JOL.js";
31
+ } from "./chunk-IGM563N5.js";
32
32
 
33
33
  // src/with-party/team/presence.ts
34
34
  var PresenceHandle = class {
@@ -1073,4 +1073,4 @@ export {
1073
1073
  SyncEngine,
1074
1074
  SyncTransaction
1075
1075
  };
1076
- //# sourceMappingURL=chunk-SMGEYW6G.js.map
1076
+ //# sourceMappingURL=chunk-QAFWRGVD.js.map
@@ -2,20 +2,20 @@ import {
2
2
  ATTESTATIONS_COLLECTION,
3
3
  REVOKED_RECORD_ID,
4
4
  loadOrCreateSigner
5
- } from "./chunk-G6EQYAL6.js";
5
+ } from "./chunk-AFBJHD55.js";
6
6
  import {
7
7
  openEnvelopeJson
8
- } from "./chunk-DVUZMT2W.js";
8
+ } from "./chunk-PEY6ZTCF.js";
9
9
  import {
10
10
  encrypt
11
- } from "./chunk-HOONYZY2.js";
11
+ } from "./chunk-5P5AAXYA.js";
12
12
  import {
13
13
  NOYDB_FORMAT_VERSION
14
- } from "./chunk-LSASLXGC.js";
14
+ } from "./chunk-5BHNQNBI.js";
15
15
  import {
16
16
  AttestationError,
17
17
  ConflictError
18
- } from "./chunk-W2OG6JOL.js";
18
+ } from "./chunk-IGM563N5.js";
19
19
 
20
20
  // src/with-audit/attestation/revoke.ts
21
21
  import { signRevocationList } from "@noy-db/attestation";
@@ -82,4 +82,4 @@ export {
82
82
  getRevokedDocIdsCore,
83
83
  publishRevocationListCore
84
84
  };
85
- //# sourceMappingURL=chunk-TOPYT5U5.js.map
85
+ //# sourceMappingURL=chunk-QCUH2G77.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-LSASLXGC.js";
3
+ } from "./chunk-5BHNQNBI.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-CBSY2N76.js.map
42
+ //# sourceMappingURL=chunk-QDNVHA2F.js.map
@@ -37,14 +37,10 @@ function resolveSchema(schema) {
37
37
  maxCoverBytes: schema.maxCoverBytes ?? DEFAULT_COVER_SCHEMA.maxCoverBytes
38
38
  };
39
39
  }
40
- var PUBLIC_ENVELOPE_FIELDS = COVER_FIELDS;
41
- var DEFAULT_PUBLIC_ENVELOPE_SCHEMA = DEFAULT_COVER_SCHEMA;
42
40
 
43
41
  export {
44
42
  COVER_FIELDS,
45
43
  DEFAULT_COVER_SCHEMA,
46
- resolveSchema,
47
- PUBLIC_ENVELOPE_FIELDS,
48
- DEFAULT_PUBLIC_ENVELOPE_SCHEMA
44
+ resolveSchema
49
45
  };
50
- //# sourceMappingURL=chunk-FH52K7EG.js.map
46
+ //# sourceMappingURL=chunk-QRHEAZ2Q.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/with-party/directory/cover/types.ts"],"sourcesContent":["/**\n * Cover — owner-curated plaintext metadata, readable before vault\n * unlock or bundle decryption. Like a book's cover: title, cover\n * art, back-cover blurb — readable on the shelf without opening\n * the book, and never trusted as the book's contents.\n *\n * (Formerly \"public envelope\" — the wire keeps that name: the\n * record still lives at `_meta/public-envelope` and carries the\n * `_noydb_public: 1` discriminator.)\n *\n * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md\n *\n * @module\n */\n\n/**\n * Either a single string (used when the developer's app is\n * single-locale) or a locale → string map for i18n. Mirrors the\n * shape `@noy-db/hub/i18n` already uses for record fields, so the\n * existing `resolveI18nText` resolver applies.\n */\nexport type CoverText = string | Record<string, string>\n\n/**\n * A JSON-serializable value — what a `custom` namespace payload may\n * hold. No functions, `undefined`, symbols, bigints, or cycles; the\n * validator additionally caps nesting depth at 8 levels.\n */\nexport type JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonValue[]\n | { [key: string]: JsonValue }\n\n/**\n * Persisted shape — both `_meta/public-envelope` (the frozen wire\n * name) and the bundle header carry this. The version number is\n * monotonic per vault and helps cache invalidators detect change\n * without hashing the JSON.\n */\nexport interface Cover {\n readonly _noydb_public: 1\n readonly version: number\n readonly name?: CoverText\n readonly description?: CoverText\n /** Inline `data:` URL (`data:image/png;base64,…` or `data:image/svg+xml;base64,…`). */\n readonly icon?: string\n /** ISO-8601 timestamp; auto-set on first cover write, immutable thereafter. */\n readonly createdAt?: string\n /** ISO-8601 timestamp; auto-updated on every `setCover` call. */\n readonly updatedAt?: string\n /** BCP-47 fallback locale for renderers when the user's locale isn't covered. */\n readonly defaultLocale?: string\n /**\n * Namespaced integrator slot (#800) — e.g.\n * `{ 'noydb.viewer': { defaultCollection: 'invoices' } }`. Keys must\n * be reverse-DNS / package-style (`noydb.viewer`, `com.acme.registry`).\n * Like everything on the cover it is plaintext, public, and\n * unauthenticated — payloads are hints, never authority. Opt-in:\n * excluded from `DEFAULT_COVER_SCHEMA.fields`, so `cover: true`\n * does NOT enable it.\n */\n readonly custom?: Record<string, JsonValue>\n}\n\n/** Field names the developer can allow in `CoverSchema.fields`. */\nexport const COVER_FIELDS = [\n 'name',\n 'description',\n 'icon',\n 'createdAt',\n 'updatedAt',\n 'defaultLocale',\n 'custom',\n] as const\n\nexport type CoverField = (typeof COVER_FIELDS)[number]\n\n/**\n * Build-time schema. The developer enables the feature and bounds\n * what the owner can set. `true` is shorthand for \"all defaults\" —\n * gives the owner the full field set with the standard caps.\n */\nexport interface CoverSchema {\n /**\n * Allowed field names. Setting `name`/`description`/`icon`/`defaultLocale` is\n * gated on the field being listed here. `createdAt` / `updatedAt` are managed\n * by the hub; including them is a no-op (the owner cannot set them\n * directly). Default: every field above.\n */\n readonly fields?: ReadonlyArray<CoverField>\n /**\n * Maximum icon size — measured as the length of the data-URL\n * string. Default 256 KB.\n */\n readonly maxIconBytes?: number\n /** Allowed icon MIME types. Default ['image/png', 'image/svg+xml']. */\n readonly iconMimeTypes?: ReadonlyArray<string>\n /** Maximum length of `name` / `description` per locale. Default 200. */\n readonly maxStringChars?: number\n /**\n * Maximum serialized size (`JSON.stringify` length) of the whole\n * would-be-persisted `custom` object, measured AFTER the namespace\n * patch merge. Default 8 KB.\n */\n readonly maxCustomBytes?: number\n /**\n * Maximum serialized size of the ENTIRE would-be-persisted cover\n * document. The consumer-protection cap — bounds what a pre-auth\n * reader must fetch and parse, and closes the unbounded locale-map\n * key-count hole for `name` / `description`. Default 300 KB\n * (headroom over the 256 KB icon cap + text fields).\n */\n readonly maxCoverBytes?: number\n}\n\n/**\n * Default schema values; merged onto every developer-supplied schema.\n * NOTE: `fields` is the six display fields, deliberately NOT\n * {@link COVER_FIELDS} — the opt-in `'custom'` slot is excluded, so\n * the `cover: true` shorthand never exposes it by accident.\n */\nexport const DEFAULT_COVER_SCHEMA = {\n fields: ['name', 'description', 'icon', 'createdAt', 'updatedAt', 'defaultLocale'],\n maxIconBytes: 256 * 1024,\n iconMimeTypes: ['image/png', 'image/svg+xml'] as const,\n maxStringChars: 200,\n maxCustomBytes: 8 * 1024,\n maxCoverBytes: 300 * 1024,\n} as const satisfies Required<CoverSchema>\n\n/** Resolved schema after merging developer override onto defaults. */\nexport interface ResolvedCoverSchema {\n readonly fields: ReadonlyArray<CoverField>\n readonly maxIconBytes: number\n readonly iconMimeTypes: ReadonlyArray<string>\n readonly maxStringChars: number\n readonly maxCustomBytes: number\n readonly maxCoverBytes: number\n}\n\n/**\n * Merge developer schema onto the defaults. The shorthand `true`\n * resolves to the full default schema; an explicit object only\n * overrides the keys it provides.\n */\nexport function resolveSchema(\n schema: true | CoverSchema | undefined,\n): ResolvedCoverSchema | undefined {\n if (!schema) return undefined\n if (schema === true) {\n return {\n fields: DEFAULT_COVER_SCHEMA.fields,\n maxIconBytes: DEFAULT_COVER_SCHEMA.maxIconBytes,\n iconMimeTypes: DEFAULT_COVER_SCHEMA.iconMimeTypes,\n maxStringChars: DEFAULT_COVER_SCHEMA.maxStringChars,\n maxCustomBytes: DEFAULT_COVER_SCHEMA.maxCustomBytes,\n maxCoverBytes: DEFAULT_COVER_SCHEMA.maxCoverBytes,\n }\n }\n return {\n fields: schema.fields ?? DEFAULT_COVER_SCHEMA.fields,\n maxIconBytes: schema.maxIconBytes ?? DEFAULT_COVER_SCHEMA.maxIconBytes,\n iconMimeTypes: schema.iconMimeTypes ?? DEFAULT_COVER_SCHEMA.iconMimeTypes,\n maxStringChars: schema.maxStringChars ?? DEFAULT_COVER_SCHEMA.maxStringChars,\n maxCustomBytes: schema.maxCustomBytes ?? DEFAULT_COVER_SCHEMA.maxCustomBytes,\n maxCoverBytes: schema.maxCoverBytes ?? DEFAULT_COVER_SCHEMA.maxCoverBytes,\n }\n}\n\n// ─── Deprecated aliases (#799 public-envelope → cover; remove after one pre-release window) ───\n\n/** @deprecated Use {@link Cover}. */\nexport type PublicEnvelope = Cover\n/** @deprecated Use {@link CoverText}. */\nexport type PublicEnvelopeText = CoverText\n/** @deprecated Use {@link CoverField}. */\nexport type PublicEnvelopeField = CoverField\n/** @deprecated Use {@link CoverSchema}. */\nexport type PublicEnvelopeSchema = CoverSchema\n/** @deprecated Use {@link ResolvedCoverSchema}. */\nexport type ResolvedPublicEnvelopeSchema = ResolvedCoverSchema\n/** @deprecated Use {@link COVER_FIELDS}. */\nexport const PUBLIC_ENVELOPE_FIELDS = COVER_FIELDS\n/** @deprecated Use {@link DEFAULT_COVER_SCHEMA}. */\nexport const DEFAULT_PUBLIC_ENVELOPE_SCHEMA = DEFAULT_COVER_SCHEMA\n"],"mappings":";AAoEO,IAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAgDO,IAAM,uBAAuB;AAAA,EAClC,QAAQ,CAAC,QAAQ,eAAe,QAAQ,aAAa,aAAa,eAAe;AAAA,EACjF,cAAc,MAAM;AAAA,EACpB,eAAe,CAAC,aAAa,eAAe;AAAA,EAC5C,gBAAgB;AAAA,EAChB,gBAAgB,IAAI;AAAA,EACpB,eAAe,MAAM;AACvB;AAiBO,SAAS,cACd,QACiC;AACjC,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI,WAAW,MAAM;AACnB,WAAO;AAAA,MACL,QAAQ,qBAAqB;AAAA,MAC7B,cAAc,qBAAqB;AAAA,MACnC,eAAe,qBAAqB;AAAA,MACpC,gBAAgB,qBAAqB;AAAA,MACrC,gBAAgB,qBAAqB;AAAA,MACrC,eAAe,qBAAqB;AAAA,IACtC;AAAA,EACF;AACA,SAAO;AAAA,IACL,QAAQ,OAAO,UAAU,qBAAqB;AAAA,IAC9C,cAAc,OAAO,gBAAgB,qBAAqB;AAAA,IAC1D,eAAe,OAAO,iBAAiB,qBAAqB;AAAA,IAC5D,gBAAgB,OAAO,kBAAkB,qBAAqB;AAAA,IAC9D,gBAAgB,OAAO,kBAAkB,qBAAqB;AAAA,IAC9D,eAAe,OAAO,iBAAiB,qBAAqB;AAAA,EAC9D;AACF;AAeO,IAAM,yBAAyB;AAE/B,IAAM,iCAAiC;","names":[]}
1
+ {"version":3,"sources":["../src/with-party/directory/cover/types.ts"],"sourcesContent":["/**\n * Cover — owner-curated plaintext metadata, readable before vault\n * unlock or bundle decryption. Like a book's cover: title, cover\n * art, back-cover blurb — readable on the shelf without opening\n * the book, and never trusted as the book's contents.\n *\n * (Formerly \"public envelope\" — the wire keeps that name: the\n * record still lives at `_meta/public-envelope` and carries the\n * `_noydb_public: 1` discriminator.)\n *\n * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md\n *\n * @module\n */\n\n/**\n * Either a single string (used when the developer's app is\n * single-locale) or a locale → string map for i18n. Mirrors the\n * shape `@noy-db/hub/i18n` already uses for record fields, so the\n * existing `resolveI18nText` resolver applies.\n */\nexport type CoverText = string | Record<string, string>\n\n/**\n * A JSON-serializable value — what a `custom` namespace payload may\n * hold. No functions, `undefined`, symbols, bigints, or cycles; the\n * validator additionally caps nesting depth at 8 levels.\n */\nexport type JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonValue[]\n | { [key: string]: JsonValue }\n\n/**\n * Persisted shape — both `_meta/public-envelope` (the frozen wire\n * name) and the bundle header carry this. The version number is\n * monotonic per vault and helps cache invalidators detect change\n * without hashing the JSON.\n */\nexport interface Cover {\n readonly _noydb_public: 1\n readonly version: number\n readonly name?: CoverText\n readonly description?: CoverText\n /** Inline `data:` URL (`data:image/png;base64,…` or `data:image/svg+xml;base64,…`). */\n readonly icon?: string\n /** ISO-8601 timestamp; auto-set on first cover write, immutable thereafter. */\n readonly createdAt?: string\n /** ISO-8601 timestamp; auto-updated on every `setCover` call. */\n readonly updatedAt?: string\n /** BCP-47 fallback locale for renderers when the user's locale isn't covered. */\n readonly defaultLocale?: string\n /**\n * Namespaced integrator slot (#800) — e.g.\n * `{ 'noydb.viewer': { defaultCollection: 'invoices' } }`. Keys must\n * be reverse-DNS / package-style (`noydb.viewer`, `com.acme.registry`).\n * Like everything on the cover it is plaintext, public, and\n * unauthenticated — payloads are hints, never authority. Opt-in:\n * excluded from `DEFAULT_COVER_SCHEMA.fields`, so `cover: true`\n * does NOT enable it.\n */\n readonly custom?: Record<string, JsonValue>\n}\n\n/** Field names the developer can allow in `CoverSchema.fields`. */\nexport const COVER_FIELDS = [\n 'name',\n 'description',\n 'icon',\n 'createdAt',\n 'updatedAt',\n 'defaultLocale',\n 'custom',\n] as const\n\nexport type CoverField = (typeof COVER_FIELDS)[number]\n\n/**\n * Build-time schema. The developer enables the feature and bounds\n * what the owner can set. `true` is shorthand for \"all defaults\" —\n * gives the owner the full field set with the standard caps.\n */\nexport interface CoverSchema {\n /**\n * Allowed field names. Setting `name`/`description`/`icon`/`defaultLocale` is\n * gated on the field being listed here. `createdAt` / `updatedAt` are managed\n * by the hub; including them is a no-op (the owner cannot set them\n * directly). Default: every field above.\n */\n readonly fields?: ReadonlyArray<CoverField>\n /**\n * Maximum icon size — measured as the length of the data-URL\n * string. Default 256 KB.\n */\n readonly maxIconBytes?: number\n /** Allowed icon MIME types. Default ['image/png', 'image/svg+xml']. */\n readonly iconMimeTypes?: ReadonlyArray<string>\n /** Maximum length of `name` / `description` per locale. Default 200. */\n readonly maxStringChars?: number\n /**\n * Maximum serialized size (`JSON.stringify` length) of the whole\n * would-be-persisted `custom` object, measured AFTER the namespace\n * patch merge. Default 8 KB.\n */\n readonly maxCustomBytes?: number\n /**\n * Maximum serialized size of the ENTIRE would-be-persisted cover\n * document. The consumer-protection cap — bounds what a pre-auth\n * reader must fetch and parse, and closes the unbounded locale-map\n * key-count hole for `name` / `description`. Default 300 KB\n * (headroom over the 256 KB icon cap + text fields).\n */\n readonly maxCoverBytes?: number\n}\n\n/**\n * Default schema values; merged onto every developer-supplied schema.\n * NOTE: `fields` is the six display fields, deliberately NOT\n * {@link COVER_FIELDS} — the opt-in `'custom'` slot is excluded, so\n * the `cover: true` shorthand never exposes it by accident.\n */\nexport const DEFAULT_COVER_SCHEMA = {\n fields: ['name', 'description', 'icon', 'createdAt', 'updatedAt', 'defaultLocale'],\n maxIconBytes: 256 * 1024,\n iconMimeTypes: ['image/png', 'image/svg+xml'] as const,\n maxStringChars: 200,\n maxCustomBytes: 8 * 1024,\n maxCoverBytes: 300 * 1024,\n} as const satisfies Required<CoverSchema>\n\n/** Resolved schema after merging developer override onto defaults. */\nexport interface ResolvedCoverSchema {\n readonly fields: ReadonlyArray<CoverField>\n readonly maxIconBytes: number\n readonly iconMimeTypes: ReadonlyArray<string>\n readonly maxStringChars: number\n readonly maxCustomBytes: number\n readonly maxCoverBytes: number\n}\n\n/**\n * Merge developer schema onto the defaults. The shorthand `true`\n * resolves to the full default schema; an explicit object only\n * overrides the keys it provides.\n */\nexport function resolveSchema(\n schema: true | CoverSchema | undefined,\n): ResolvedCoverSchema | undefined {\n if (!schema) return undefined\n if (schema === true) {\n return {\n fields: DEFAULT_COVER_SCHEMA.fields,\n maxIconBytes: DEFAULT_COVER_SCHEMA.maxIconBytes,\n iconMimeTypes: DEFAULT_COVER_SCHEMA.iconMimeTypes,\n maxStringChars: DEFAULT_COVER_SCHEMA.maxStringChars,\n maxCustomBytes: DEFAULT_COVER_SCHEMA.maxCustomBytes,\n maxCoverBytes: DEFAULT_COVER_SCHEMA.maxCoverBytes,\n }\n }\n return {\n fields: schema.fields ?? DEFAULT_COVER_SCHEMA.fields,\n maxIconBytes: schema.maxIconBytes ?? DEFAULT_COVER_SCHEMA.maxIconBytes,\n iconMimeTypes: schema.iconMimeTypes ?? DEFAULT_COVER_SCHEMA.iconMimeTypes,\n maxStringChars: schema.maxStringChars ?? DEFAULT_COVER_SCHEMA.maxStringChars,\n maxCustomBytes: schema.maxCustomBytes ?? DEFAULT_COVER_SCHEMA.maxCustomBytes,\n maxCoverBytes: schema.maxCoverBytes ?? DEFAULT_COVER_SCHEMA.maxCoverBytes,\n }\n}\n"],"mappings":";AAoEO,IAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAgDO,IAAM,uBAAuB;AAAA,EAClC,QAAQ,CAAC,QAAQ,eAAe,QAAQ,aAAa,aAAa,eAAe;AAAA,EACjF,cAAc,MAAM;AAAA,EACpB,eAAe,CAAC,aAAa,eAAe;AAAA,EAC5C,gBAAgB;AAAA,EAChB,gBAAgB,IAAI;AAAA,EACpB,eAAe,MAAM;AACvB;AAiBO,SAAS,cACd,QACiC;AACjC,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI,WAAW,MAAM;AACnB,WAAO;AAAA,MACL,QAAQ,qBAAqB;AAAA,MAC7B,cAAc,qBAAqB;AAAA,MACnC,eAAe,qBAAqB;AAAA,MACpC,gBAAgB,qBAAqB;AAAA,MACrC,gBAAgB,qBAAqB;AAAA,MACrC,eAAe,qBAAqB;AAAA,IACtC;AAAA,EACF;AACA,SAAO;AAAA,IACL,QAAQ,OAAO,UAAU,qBAAqB;AAAA,IAC9C,cAAc,OAAO,gBAAgB,qBAAqB;AAAA,IAC1D,eAAe,OAAO,iBAAiB,qBAAqB;AAAA,IAC5D,gBAAgB,OAAO,kBAAkB,qBAAqB;AAAA,IAC9D,gBAAgB,OAAO,kBAAkB,qBAAqB;AAAA,IAC9D,eAAe,OAAO,iBAAiB,qBAAqB;AAAA,EAC9D;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NOYDB_FORMAT_VERSION
3
- } from "./chunk-LSASLXGC.js";
3
+ } from "./chunk-5BHNQNBI.js";
4
4
 
5
5
  // src/kernel/enclave/record-keys/tombstone.ts
6
6
  function isTombstoneShape(envelope) {
@@ -42,4 +42,4 @@ export {
42
42
  isDeleteMarker,
43
43
  buildDeleteMarker
44
44
  };
45
- //# sourceMappingURL=chunk-WEYZTLXN.js.map
45
+ //# sourceMappingURL=chunk-QXPOEAKR.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  hasExportCapability,
3
3
  hasImportCapability
4
- } from "./chunk-3SV2EPMN.js";
4
+ } from "./chunk-HVZT5T22.js";
5
5
  import {
6
6
  ExportCapabilityError,
7
7
  ImportCapabilityError
8
- } from "./chunk-W2OG6JOL.js";
8
+ } from "./chunk-IGM563N5.js";
9
9
 
10
10
  // src/port/with/capabilities.ts
11
11
  function assertCanExport(keyring, tier, format) {
@@ -252,4 +252,4 @@ export {
252
252
  ServiceBus,
253
253
  SubsystemBus
254
254
  };
255
- //# sourceMappingURL=chunk-PT37L5DV.js.map
255
+ //# sourceMappingURL=chunk-RGL53NXZ.js.map
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-IGJCYUT5.js";
4
4
  import {
5
5
  applyI18nLocale
6
- } from "./chunk-GULTLPFB.js";
6
+ } from "./chunk-XGVDLQJE.js";
7
7
  import {
8
8
  viaBinder
9
- } from "./chunk-JVBO4SZL.js";
9
+ } from "./chunk-STR7WBOB.js";
10
10
  import {
11
11
  GroupCardinalityError
12
- } from "./chunk-W2OG6JOL.js";
12
+ } from "./chunk-IGM563N5.js";
13
13
 
14
14
  // src/with-lookup/aggregate/reducers.ts
15
15
  function count(opts) {
@@ -512,4 +512,4 @@ export {
512
512
  groupAndReduce,
513
513
  GroupedAggregation
514
514
  };
515
- //# sourceMappingURL=chunk-TAGR72IR.js.map
515
+ //# sourceMappingURL=chunk-RI3OKC3Y.js.map
@@ -1,21 +1,21 @@
1
- import {
2
- freezeSnapshotOnly
3
- } from "./chunk-YJV2UZ7H.js";
4
1
  import {
5
2
  resolveManagedSecret
6
- } from "./chunk-LB6OH6K2.js";
3
+ } from "./chunk-BCOKZC4B.js";
4
+ import {
5
+ freezeSnapshotOnly
6
+ } from "./chunk-XULHFSHO.js";
7
7
  import {
8
8
  createOwnerKeyring
9
- } from "./chunk-3SV2EPMN.js";
9
+ } from "./chunk-HVZT5T22.js";
10
10
  import {
11
11
  wrapKey
12
- } from "./chunk-HOONYZY2.js";
12
+ } from "./chunk-5P5AAXYA.js";
13
13
  import {
14
14
  NOYDB_FORMAT_VERSION
15
- } from "./chunk-LSASLXGC.js";
15
+ } from "./chunk-5BHNQNBI.js";
16
16
  import {
17
17
  PermissionDeniedError
18
- } from "./chunk-W2OG6JOL.js";
18
+ } from "./chunk-IGM563N5.js";
19
19
 
20
20
  // src/with-party/team/deed.ts
21
21
  var DEED_RECORD_ID = "deed";
@@ -132,4 +132,4 @@ export {
132
132
  isDeedVault,
133
133
  liberateVault
134
134
  };
135
- //# sourceMappingURL=chunk-UNCOC7QH.js.map
135
+ //# sourceMappingURL=chunk-S3OYXPSE.js.map