@noy-db/hub 0.4.0-pre.3 → 0.4.0-pre.5

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 (381) hide show
  1. package/README.md +2 -2
  2. package/dist/aggregate/index.js +4 -4
  3. package/dist/api-22ES33N3.js +20 -0
  4. package/dist/as/index.js +11 -11
  5. package/dist/attestation/index.js +20 -20
  6. package/dist/{backup-JL2GOTYQ.js → backup-YCHAC575.js} +11 -11
  7. package/dist/blobs/index.js +12 -12
  8. package/dist/broker/index.js +12 -12
  9. package/dist/by/index.js +2 -2
  10. package/dist/cargo/index.js +29 -29
  11. package/dist/{chunk-2RMDVWGB.js → chunk-2CRZOVDI.js} +2 -2
  12. package/dist/{chunk-T7S4V52L.js → chunk-2PDBYF2O.js} +4 -4
  13. package/dist/{chunk-WJDYZP3U.js → chunk-3LJYHE7S.js} +36 -36
  14. package/dist/chunk-3LJYHE7S.js.map +1 -0
  15. package/dist/{chunk-CCT4WZI6.js → chunk-3OWYOECI.js} +5 -5
  16. package/dist/chunk-3OWYOECI.js.map +1 -0
  17. package/dist/{chunk-L4OA7G5T.js → chunk-522MBPE5.js} +2 -2
  18. package/dist/{chunk-ZJGZDOQO.js → chunk-5ATANZSW.js} +6 -6
  19. package/dist/{chunk-M25ZIEB2.js → chunk-5HSSTOOG.js} +2 -2
  20. package/dist/{chunk-LLVW4V7R.js → chunk-5WLDZZ6S.js} +3 -3
  21. package/dist/{chunk-7B4GPCX7.js → chunk-6RPWILRH.js} +5 -5
  22. package/dist/{chunk-IGM563N5.js → chunk-6SYOHUHM.js} +6 -6
  23. package/dist/chunk-6SYOHUHM.js.map +1 -0
  24. package/dist/{chunk-HGVFJL63.js → chunk-7BIJS6II.js} +15 -5
  25. package/dist/{chunk-HGVFJL63.js.map → chunk-7BIJS6II.js.map} +1 -1
  26. package/dist/{chunk-KR5EGWI4.js → chunk-7ICV4ASA.js} +5 -5
  27. package/dist/{chunk-J3VW4J4E.js → chunk-7LP7FFJ2.js} +2 -2
  28. package/dist/chunk-7LP7FFJ2.js.map +1 -0
  29. package/dist/{chunk-5P5AAXYA.js → chunk-7U6AB7DZ.js} +7 -7
  30. package/dist/chunk-7U6AB7DZ.js.map +1 -0
  31. package/dist/{chunk-KMONEHDJ.js → chunk-AFAPBZAA.js} +2 -2
  32. package/dist/{chunk-GBEXTC6Z.js → chunk-BAAUFCJK.js} +3 -3
  33. package/dist/chunk-BAAUFCJK.js.map +1 -0
  34. package/dist/{chunk-CGPO3ZYB.js → chunk-BY5YBSXA.js} +2 -2
  35. package/dist/{chunk-3O62PVDW.js → chunk-CJVEAVYH.js} +5 -5
  36. package/dist/chunk-CJVEAVYH.js.map +1 -0
  37. package/dist/{chunk-3XVOLB75.js → chunk-CKUYQO2P.js} +3 -3
  38. package/dist/{chunk-2JZ763FV.js → chunk-D4LAJ737.js} +2 -2
  39. package/dist/{chunk-OOTTXUNV.js → chunk-DYZ5CCVM.js} +2 -2
  40. package/dist/{chunk-LUH2MPEF.js → chunk-EEZCB74X.js} +808 -1175
  41. package/dist/chunk-EEZCB74X.js.map +1 -0
  42. package/dist/{chunk-N4FZ6ITM.js → chunk-EGU4PWQW.js} +2 -2
  43. package/dist/{chunk-JKWNG3TM.js → chunk-FHHYCBBP.js} +2 -2
  44. package/dist/{chunk-UBF7HTOR.js → chunk-FIP7KI2P.js} +40 -40
  45. package/dist/chunk-FIP7KI2P.js.map +1 -0
  46. package/dist/{chunk-N4A3DCBT.js → chunk-FTCGEUOY.js} +8 -8
  47. package/dist/{chunk-5BB3N4KU.js → chunk-G4MFQXYX.js} +2 -2
  48. package/dist/{chunk-PEY6ZTCF.js → chunk-GEEJPID6.js} +9 -9
  49. package/dist/{chunk-PEY6ZTCF.js.map → chunk-GEEJPID6.js.map} +1 -1
  50. package/dist/{chunk-KVHWEPT2.js → chunk-GHEMAVTN.js} +2 -2
  51. package/dist/{chunk-OVFCAS7U.js → chunk-GP54LU5N.js} +9 -9
  52. package/dist/{chunk-XW7NWO4A.js → chunk-GTNRMJYH.js} +2 -2
  53. package/dist/{chunk-J6U4BOKP.js → chunk-HAPY7WFP.js} +12 -12
  54. package/dist/{chunk-GU5AYA2Q.js → chunk-HQKRZIX6.js} +5 -5
  55. package/dist/{chunk-OWE4BNTM.js → chunk-I2XEBEEF.js} +4 -4
  56. package/dist/{chunk-WEC3JGBA.js → chunk-IGLU4ME7.js} +3 -3
  57. package/dist/{chunk-BZK6JEX4.js → chunk-ILM6X6CP.js} +5 -5
  58. package/dist/{chunk-2KL6NDD4.js → chunk-J5TEU77Q.js} +4 -4
  59. package/dist/{chunk-UEO5CHOP.js → chunk-JAMDDLIM.js} +13 -13
  60. package/dist/chunk-JAMDDLIM.js.map +1 -0
  61. package/dist/{chunk-V7RGFJ3Z.js → chunk-JIHH26WQ.js} +6 -6
  62. package/dist/{chunk-XGVDLQJE.js → chunk-JN3SGXJE.js} +3 -3
  63. package/dist/{chunk-XULHFSHO.js → chunk-K4BWPNJO.js} +5 -5
  64. package/dist/chunk-K4BWPNJO.js.map +1 -0
  65. package/dist/{chunk-BZEPJJOK.js → chunk-K7BADAOS.js} +4 -4
  66. package/dist/{chunk-OWLPX2GI.js → chunk-KJTIAECI.js} +17 -17
  67. package/dist/chunk-KJTIAECI.js.map +1 -0
  68. package/dist/{chunk-SN75YVM5.js → chunk-L2CAWCQL.js} +18 -18
  69. package/dist/{chunk-SN75YVM5.js.map → chunk-L2CAWCQL.js.map} +1 -1
  70. package/dist/{chunk-MSO2C3KG.js → chunk-LC7DSMHR.js} +2 -2
  71. package/dist/{chunk-JA5B3SLH.js → chunk-M6QA2KK2.js} +2 -2
  72. package/dist/{chunk-IUIVDVXM.js → chunk-MUPZ6IZX.js} +2 -2
  73. package/dist/{chunk-QAFWRGVD.js → chunk-OGVE4IJW.js} +7 -7
  74. package/dist/{chunk-BCOKZC4B.js → chunk-OHV6T5JB.js} +19 -19
  75. package/dist/chunk-OHV6T5JB.js.map +1 -0
  76. package/dist/{chunk-25ZDB25Z.js → chunk-OMSKGLYA.js} +3 -3
  77. package/dist/chunk-OMSKGLYA.js.map +1 -0
  78. package/dist/{chunk-2U7Y7BNJ.js → chunk-ONB627HU.js} +2 -2
  79. package/dist/{chunk-GYB2QK5H.js → chunk-OWLZONGX.js} +2 -2
  80. package/dist/{chunk-YHPUDB7Q.js → chunk-OWOT7CFC.js} +2 -2
  81. package/dist/{chunk-VEX6G3YL.js → chunk-P4NUJVWL.js} +2 -2
  82. package/dist/{chunk-NM4LVUXH.js → chunk-PTT2NB46.js} +2 -2
  83. package/dist/{chunk-2ITLQZV5.js → chunk-PWWWMRT7.js} +2 -2
  84. package/dist/{chunk-GS3Q2KOZ.js → chunk-QBOQI6PG.js} +2 -2
  85. package/dist/{chunk-JIMEB4C6.js → chunk-QMMOMBH6.js} +4 -4
  86. package/dist/{chunk-QDNVHA2F.js → chunk-QMZ5A6FQ.js} +2 -2
  87. package/dist/{chunk-FLHOTGOO.js → chunk-QVGEVZ5F.js} +3 -3
  88. package/dist/{chunk-AFBJHD55.js → chunk-QZJEYZ4I.js} +5 -5
  89. package/dist/{chunk-V3YB7RGR.js → chunk-R2N37AA6.js} +3 -3
  90. package/dist/{chunk-JLHKBAFY.js → chunk-RWW3I3PO.js} +3 -3
  91. package/dist/{chunk-IGAIOGCN.js → chunk-S4YERMGJ.js} +4 -4
  92. package/dist/{chunk-OGFPMCSP.js → chunk-SBOHNJUD.js} +2 -2
  93. package/dist/{chunk-QXPOEAKR.js → chunk-SC4JLMZI.js} +2 -2
  94. package/dist/{chunk-EDC6MLXV.js → chunk-SEU6QHH4.js} +2 -2
  95. package/dist/{chunk-F4COUZLL.js → chunk-TMR64XPL.js} +2 -2
  96. package/dist/{chunk-DEQ2JTBR.js → chunk-TNATF3HB.js} +3 -3
  97. package/dist/{chunk-GZ2GKOF6.js → chunk-TNJVDG2B.js} +3 -3
  98. package/dist/{chunk-5OZCCLNC.js → chunk-TSNRZSRC.js} +2 -2
  99. package/dist/{chunk-QCUH2G77.js → chunk-UTEATWHO.js} +6 -6
  100. package/dist/{chunk-JA5O7UEZ.js → chunk-UVBHM7AK.js} +6 -6
  101. package/dist/chunk-UVBHM7AK.js.map +1 -0
  102. package/dist/{chunk-HKR25MGX.js → chunk-V5JUAW4M.js} +10 -10
  103. package/dist/chunk-V5JUAW4M.js.map +1 -0
  104. package/dist/{chunk-YGBIBOCR.js → chunk-VEGQYPCP.js} +7 -7
  105. package/dist/{chunk-25G7U6RD.js → chunk-WQN5SM7P.js} +2 -2
  106. package/dist/{chunk-NOT7XA7Q.js → chunk-X3MWEFPT.js} +5 -5
  107. package/dist/chunk-XUFAFHQM.js +78 -0
  108. package/dist/chunk-XUFAFHQM.js.map +1 -0
  109. package/dist/{chunk-MEKAMERX.js → chunk-YCAJDK4O.js} +29 -29
  110. package/dist/chunk-YCAJDK4O.js.map +1 -0
  111. package/dist/{chunk-BVZGNMVM.js → chunk-YFFEF6HR.js} +3 -3
  112. package/dist/{chunk-H4SMS4O2.js → chunk-YJ3TREAC.js} +2 -2
  113. package/dist/{chunk-5SZ24DL5.js → chunk-YQQPNXNO.js} +6 -6
  114. package/dist/{chunk-5BHNQNBI.js → chunk-YTW6ZIPD.js} +1 -1
  115. package/dist/chunk-YTW6ZIPD.js.map +1 -0
  116. package/dist/{chunk-EW4HFWGJ.js → chunk-YWZEDG7F.js} +6 -6
  117. package/dist/{chunk-2VUISNGP.js → chunk-YXIVUWDU.js} +5 -5
  118. package/dist/{chunk-YG2EG6CB.js → chunk-YXZNGHID.js} +4 -4
  119. package/dist/{chunk-QYJIOWKN.js → chunk-YZN6NRTR.js} +9 -9
  120. package/dist/{chunk-IZX3WZBF.js → chunk-YZNKFYDC.js} +4 -4
  121. package/dist/{chunk-E2R5NRZD.js → chunk-Z4D3YGAB.js} +2 -2
  122. package/dist/{chunk-STR7WBOB.js → chunk-ZUDAK436.js} +2 -2
  123. package/dist/{chunk-ITI3SJRB.js → chunk-ZX5FNWH7.js} +2 -2
  124. package/dist/classified/index.js +5 -5
  125. package/dist/{classified-marker-7S5IEP6Q.js → classified-marker-52P3D72W.js} +3 -3
  126. package/dist/collection-facade-XKCFHSLR.js +44 -0
  127. package/dist/{computed-WZNKRLCY.js → computed-33DRJDOC.js} +3 -3
  128. package/dist/consent/index.js +9 -9
  129. package/dist/{cover-B5MY43CK.js → cover-5BSNJREH.js} +4 -4
  130. package/dist/{dead-filter-KRRD57MR.js → dead-filter-JXVCKS6W.js} +2 -2
  131. package/dist/delegation-WWZPEDK2.js +25 -0
  132. package/dist/derivations/index.js +12 -12
  133. package/dist/derive-CWWFEQ4N.js +21 -0
  134. package/dist/dispatch-PKQQFDBT.js +193 -0
  135. package/dist/dispatch-PKQQFDBT.js.map +1 -0
  136. package/dist/dispatch-SMXUO7W5.js +72 -0
  137. package/dist/dispatch-SMXUO7W5.js.map +1 -0
  138. package/dist/{enclave-YFKA3GJT.js → enclave-I5H3GINP.js} +11 -11
  139. package/dist/executor-FCJEH3FU.js +9 -0
  140. package/dist/executor-OHET7TF7.js +9 -0
  141. package/dist/executor-SHYLIBOM.js +26 -0
  142. package/dist/export-accessible-FBL6TDSK.js +23 -0
  143. package/dist/extract-partition-ZYIRYMTI.js +38 -0
  144. package/dist/{fanout-sidecar-HJV3A7PM.js → fanout-sidecar-WWXVHHUH.js} +9 -9
  145. package/dist/find-LEBUXVL7.js +11 -0
  146. package/dist/forget/index.js +9 -9
  147. package/dist/guards/index.js +3 -3
  148. package/dist/history/index.js +12 -12
  149. package/dist/i18n/index.js +14 -14
  150. package/dist/index.d.ts +13 -9
  151. package/dist/index.js +119 -118
  152. package/dist/index.js.map +1 -1
  153. package/dist/indexing/index.js +2 -2
  154. package/dist/issue-F76PAGIR.js +19 -0
  155. package/dist/kernel/collection-config.d.ts +11 -69
  156. package/dist/kernel/collection.d.ts +10 -22
  157. package/dist/kernel/enclave/crypto.d.ts +8 -8
  158. package/dist/kernel/enclave/index.d.ts +2 -2
  159. package/dist/kernel/errors.d.ts +20 -20
  160. package/dist/kernel/noydb.d.ts +43 -103
  161. package/dist/kernel/types.d.ts +82 -41
  162. package/dist/kernel/validation.d.ts +33 -33
  163. package/dist/kernel/vault.d.ts +31 -215
  164. package/dist/kernel/via/dispatch.d.ts +7 -0
  165. package/dist/{ledger-SW6QQOAV.js → ledger-M2BKCNVS.js} +11 -11
  166. package/dist/liberate-ZP7UB57K.js +24 -0
  167. package/dist/{link-set-GNGGCFI4.js → link-set-ZU4E5J5S.js} +11 -11
  168. package/dist/materialized-views/index.js +19 -19
  169. package/dist/noydb-BNDGEK5X.js +71 -0
  170. package/dist/on/index.js +9 -9
  171. package/dist/overlay-views/index.js +4 -4
  172. package/dist/periods/index.js +13 -13
  173. package/dist/pod/index.js +11 -11
  174. package/dist/{policy-EAXSJNOT.js → policy-IY2YEA3A.js} +5 -5
  175. package/dist/port/at/index.d.ts +4 -4
  176. package/dist/port/with/archive-strategy.d.ts +31 -0
  177. package/dist/port/with/collection-options.d.ts +171 -0
  178. package/dist/port/with/strategies.d.ts +134 -0
  179. package/dist/port/with/team-strategy.d.ts +1 -1
  180. package/dist/portability/index.js +8 -8
  181. package/dist/{post-register-A7HCFBP5.js → post-register-XIAHB6KF.js} +6 -6
  182. package/dist/query/index.js +6 -6
  183. package/dist/register-HB4TQZSV.js +23 -0
  184. package/dist/registry-6BMBFEXT.js +19 -0
  185. package/dist/registry-7CZWF3EQ.js +9 -0
  186. package/dist/registry-JOFO7RAH.js +18 -0
  187. package/dist/request-withdrawal-UN3TRHWI.js +31 -0
  188. package/dist/{reveal-PB3YG544.js → reveal-VWXRV2XU.js} +6 -6
  189. package/dist/revoke-OLO2OVR7.js +24 -0
  190. package/dist/satellites/index.js +1 -1
  191. package/dist/sealed-record/index.js +12 -12
  192. package/dist/{seed-EKF4DIBB.js → seed-CDBFOTIK.js} +12 -12
  193. package/dist/seed-CDBFOTIK.js.map +1 -0
  194. package/dist/session/index.js +9 -9
  195. package/dist/shadow/index.js +2 -2
  196. package/dist/signer-MGGKPYAN.js +25 -0
  197. package/dist/snapshots/index.js +10 -10
  198. package/dist/{stale-4UNPHWOU.js → stale-NBROTA66.js} +10 -10
  199. package/dist/storage-3R37QZLA.js +23 -0
  200. package/dist/{store-coordination-provider-3AELCZ4Y.js → store-coordination-provider-P3IU5JHD.js} +3 -3
  201. package/dist/sync/index.js +10 -10
  202. package/dist/team/index.js +20 -20
  203. package/dist/tiers/index.js +10 -10
  204. package/dist/to/index.js +1 -1
  205. package/dist/tx/index.js +3 -3
  206. package/dist/util/index.js +1 -1
  207. package/dist/{verify-MXN66IIH.js → verify-5X37OXRY.js} +5 -5
  208. package/dist/{walk-H4YE52S2.js → walk-E3OVLBFR.js} +11 -11
  209. package/dist/with/index.js +11 -11
  210. package/dist/with-audit/portability/export-accessible.d.ts +4 -4
  211. package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
  212. package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
  213. package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
  214. package/dist/with-cargo/adopt-partition.d.ts +7 -7
  215. package/dist/with-cargo/index.d.ts +1 -1
  216. package/dist/with-commit/history/time-machine.d.ts +2 -2
  217. package/dist/with-formula/derivations/dispatch.d.ts +98 -0
  218. package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
  219. package/dist/with-party/custody/liberate.d.ts +3 -3
  220. package/dist/with-party/session/dev-unlock.d.ts +2 -2
  221. package/dist/with-party/session/session.d.ts +2 -2
  222. package/dist/with-party/team/deed.d.ts +8 -8
  223. package/dist/with-party/team/index.d.ts +2 -2
  224. package/dist/with-party/team/keyring.d.ts +19 -19
  225. package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
  226. package/dist/with-party/team/noydb-facade.d.ts +41 -41
  227. package/dist/with-party/team/peer-recover.d.ts +13 -13
  228. package/dist/with-party/team/recovery.d.ts +5 -5
  229. package/dist/with-party/team/rotate-recover.d.ts +30 -30
  230. package/dist/with-pod/bundle.d.ts +30 -30
  231. package/dist/with-pod/format.d.ts +2 -2
  232. package/dist/withdraw-accessible-Q2EMATCU.js +28 -0
  233. package/package.json +3 -3
  234. package/dist/api-UPAT2O3M.js +0 -20
  235. package/dist/chunk-25ZDB25Z.js.map +0 -1
  236. package/dist/chunk-3O62PVDW.js.map +0 -1
  237. package/dist/chunk-5BHNQNBI.js.map +0 -1
  238. package/dist/chunk-5P5AAXYA.js.map +0 -1
  239. package/dist/chunk-BCOKZC4B.js.map +0 -1
  240. package/dist/chunk-CCT4WZI6.js.map +0 -1
  241. package/dist/chunk-GBEXTC6Z.js.map +0 -1
  242. package/dist/chunk-HKR25MGX.js.map +0 -1
  243. package/dist/chunk-IGM563N5.js.map +0 -1
  244. package/dist/chunk-J3VW4J4E.js.map +0 -1
  245. package/dist/chunk-JA5O7UEZ.js.map +0 -1
  246. package/dist/chunk-LUH2MPEF.js.map +0 -1
  247. package/dist/chunk-MEKAMERX.js.map +0 -1
  248. package/dist/chunk-OWLPX2GI.js.map +0 -1
  249. package/dist/chunk-UBF7HTOR.js.map +0 -1
  250. package/dist/chunk-UEO5CHOP.js.map +0 -1
  251. package/dist/chunk-WJDYZP3U.js.map +0 -1
  252. package/dist/chunk-XULHFSHO.js.map +0 -1
  253. package/dist/collection-facade-ENLTJZBT.js +0 -44
  254. package/dist/delegation-UT76AQIG.js +0 -25
  255. package/dist/derive-SGRCCKVP.js +0 -21
  256. package/dist/executor-TEZYRDN3.js +0 -9
  257. package/dist/executor-WQQRU6DO.js +0 -9
  258. package/dist/executor-YORMIBWV.js +0 -26
  259. package/dist/export-accessible-HXMKW5LJ.js +0 -23
  260. package/dist/extract-partition-QGQ2R42J.js +0 -38
  261. package/dist/find-VV6PBIHK.js +0 -11
  262. package/dist/issue-7JJ4Z7E2.js +0 -19
  263. package/dist/liberate-FK7JI2QX.js +0 -24
  264. package/dist/noydb-KUX2TJMX.js +0 -70
  265. package/dist/register-YBMRLZLO.js +0 -23
  266. package/dist/registry-3LXKNXWI.js +0 -9
  267. package/dist/registry-4V4YQCXJ.js +0 -19
  268. package/dist/registry-ZULMLCJK.js +0 -18
  269. package/dist/request-withdrawal-SEVUEUDG.js +0 -31
  270. package/dist/revoke-5QULL5GT.js +0 -24
  271. package/dist/seed-EKF4DIBB.js.map +0 -1
  272. package/dist/signer-ZMH35FT4.js +0 -25
  273. package/dist/storage-QOZKQMID.js +0 -23
  274. package/dist/withdraw-accessible-HPOVNG2G.js +0 -28
  275. /package/dist/{api-UPAT2O3M.js.map → api-22ES33N3.js.map} +0 -0
  276. /package/dist/{backup-JL2GOTYQ.js.map → backup-YCHAC575.js.map} +0 -0
  277. /package/dist/{chunk-2RMDVWGB.js.map → chunk-2CRZOVDI.js.map} +0 -0
  278. /package/dist/{chunk-T7S4V52L.js.map → chunk-2PDBYF2O.js.map} +0 -0
  279. /package/dist/{chunk-L4OA7G5T.js.map → chunk-522MBPE5.js.map} +0 -0
  280. /package/dist/{chunk-ZJGZDOQO.js.map → chunk-5ATANZSW.js.map} +0 -0
  281. /package/dist/{chunk-M25ZIEB2.js.map → chunk-5HSSTOOG.js.map} +0 -0
  282. /package/dist/{chunk-LLVW4V7R.js.map → chunk-5WLDZZ6S.js.map} +0 -0
  283. /package/dist/{chunk-7B4GPCX7.js.map → chunk-6RPWILRH.js.map} +0 -0
  284. /package/dist/{chunk-KR5EGWI4.js.map → chunk-7ICV4ASA.js.map} +0 -0
  285. /package/dist/{chunk-KMONEHDJ.js.map → chunk-AFAPBZAA.js.map} +0 -0
  286. /package/dist/{chunk-CGPO3ZYB.js.map → chunk-BY5YBSXA.js.map} +0 -0
  287. /package/dist/{chunk-3XVOLB75.js.map → chunk-CKUYQO2P.js.map} +0 -0
  288. /package/dist/{chunk-2JZ763FV.js.map → chunk-D4LAJ737.js.map} +0 -0
  289. /package/dist/{chunk-OOTTXUNV.js.map → chunk-DYZ5CCVM.js.map} +0 -0
  290. /package/dist/{chunk-N4FZ6ITM.js.map → chunk-EGU4PWQW.js.map} +0 -0
  291. /package/dist/{chunk-JKWNG3TM.js.map → chunk-FHHYCBBP.js.map} +0 -0
  292. /package/dist/{chunk-N4A3DCBT.js.map → chunk-FTCGEUOY.js.map} +0 -0
  293. /package/dist/{chunk-5BB3N4KU.js.map → chunk-G4MFQXYX.js.map} +0 -0
  294. /package/dist/{chunk-KVHWEPT2.js.map → chunk-GHEMAVTN.js.map} +0 -0
  295. /package/dist/{chunk-OVFCAS7U.js.map → chunk-GP54LU5N.js.map} +0 -0
  296. /package/dist/{chunk-XW7NWO4A.js.map → chunk-GTNRMJYH.js.map} +0 -0
  297. /package/dist/{chunk-J6U4BOKP.js.map → chunk-HAPY7WFP.js.map} +0 -0
  298. /package/dist/{chunk-GU5AYA2Q.js.map → chunk-HQKRZIX6.js.map} +0 -0
  299. /package/dist/{chunk-OWE4BNTM.js.map → chunk-I2XEBEEF.js.map} +0 -0
  300. /package/dist/{chunk-WEC3JGBA.js.map → chunk-IGLU4ME7.js.map} +0 -0
  301. /package/dist/{chunk-BZK6JEX4.js.map → chunk-ILM6X6CP.js.map} +0 -0
  302. /package/dist/{chunk-2KL6NDD4.js.map → chunk-J5TEU77Q.js.map} +0 -0
  303. /package/dist/{chunk-V7RGFJ3Z.js.map → chunk-JIHH26WQ.js.map} +0 -0
  304. /package/dist/{chunk-XGVDLQJE.js.map → chunk-JN3SGXJE.js.map} +0 -0
  305. /package/dist/{chunk-BZEPJJOK.js.map → chunk-K7BADAOS.js.map} +0 -0
  306. /package/dist/{chunk-MSO2C3KG.js.map → chunk-LC7DSMHR.js.map} +0 -0
  307. /package/dist/{chunk-JA5B3SLH.js.map → chunk-M6QA2KK2.js.map} +0 -0
  308. /package/dist/{chunk-IUIVDVXM.js.map → chunk-MUPZ6IZX.js.map} +0 -0
  309. /package/dist/{chunk-QAFWRGVD.js.map → chunk-OGVE4IJW.js.map} +0 -0
  310. /package/dist/{chunk-2U7Y7BNJ.js.map → chunk-ONB627HU.js.map} +0 -0
  311. /package/dist/{chunk-GYB2QK5H.js.map → chunk-OWLZONGX.js.map} +0 -0
  312. /package/dist/{chunk-YHPUDB7Q.js.map → chunk-OWOT7CFC.js.map} +0 -0
  313. /package/dist/{chunk-VEX6G3YL.js.map → chunk-P4NUJVWL.js.map} +0 -0
  314. /package/dist/{chunk-NM4LVUXH.js.map → chunk-PTT2NB46.js.map} +0 -0
  315. /package/dist/{chunk-2ITLQZV5.js.map → chunk-PWWWMRT7.js.map} +0 -0
  316. /package/dist/{chunk-GS3Q2KOZ.js.map → chunk-QBOQI6PG.js.map} +0 -0
  317. /package/dist/{chunk-JIMEB4C6.js.map → chunk-QMMOMBH6.js.map} +0 -0
  318. /package/dist/{chunk-QDNVHA2F.js.map → chunk-QMZ5A6FQ.js.map} +0 -0
  319. /package/dist/{chunk-FLHOTGOO.js.map → chunk-QVGEVZ5F.js.map} +0 -0
  320. /package/dist/{chunk-AFBJHD55.js.map → chunk-QZJEYZ4I.js.map} +0 -0
  321. /package/dist/{chunk-V3YB7RGR.js.map → chunk-R2N37AA6.js.map} +0 -0
  322. /package/dist/{chunk-JLHKBAFY.js.map → chunk-RWW3I3PO.js.map} +0 -0
  323. /package/dist/{chunk-IGAIOGCN.js.map → chunk-S4YERMGJ.js.map} +0 -0
  324. /package/dist/{chunk-OGFPMCSP.js.map → chunk-SBOHNJUD.js.map} +0 -0
  325. /package/dist/{chunk-QXPOEAKR.js.map → chunk-SC4JLMZI.js.map} +0 -0
  326. /package/dist/{chunk-EDC6MLXV.js.map → chunk-SEU6QHH4.js.map} +0 -0
  327. /package/dist/{chunk-F4COUZLL.js.map → chunk-TMR64XPL.js.map} +0 -0
  328. /package/dist/{chunk-DEQ2JTBR.js.map → chunk-TNATF3HB.js.map} +0 -0
  329. /package/dist/{chunk-GZ2GKOF6.js.map → chunk-TNJVDG2B.js.map} +0 -0
  330. /package/dist/{chunk-5OZCCLNC.js.map → chunk-TSNRZSRC.js.map} +0 -0
  331. /package/dist/{chunk-QCUH2G77.js.map → chunk-UTEATWHO.js.map} +0 -0
  332. /package/dist/{chunk-YGBIBOCR.js.map → chunk-VEGQYPCP.js.map} +0 -0
  333. /package/dist/{chunk-25G7U6RD.js.map → chunk-WQN5SM7P.js.map} +0 -0
  334. /package/dist/{chunk-NOT7XA7Q.js.map → chunk-X3MWEFPT.js.map} +0 -0
  335. /package/dist/{chunk-BVZGNMVM.js.map → chunk-YFFEF6HR.js.map} +0 -0
  336. /package/dist/{chunk-H4SMS4O2.js.map → chunk-YJ3TREAC.js.map} +0 -0
  337. /package/dist/{chunk-5SZ24DL5.js.map → chunk-YQQPNXNO.js.map} +0 -0
  338. /package/dist/{chunk-EW4HFWGJ.js.map → chunk-YWZEDG7F.js.map} +0 -0
  339. /package/dist/{chunk-2VUISNGP.js.map → chunk-YXIVUWDU.js.map} +0 -0
  340. /package/dist/{chunk-YG2EG6CB.js.map → chunk-YXZNGHID.js.map} +0 -0
  341. /package/dist/{chunk-QYJIOWKN.js.map → chunk-YZN6NRTR.js.map} +0 -0
  342. /package/dist/{chunk-IZX3WZBF.js.map → chunk-YZNKFYDC.js.map} +0 -0
  343. /package/dist/{chunk-E2R5NRZD.js.map → chunk-Z4D3YGAB.js.map} +0 -0
  344. /package/dist/{chunk-STR7WBOB.js.map → chunk-ZUDAK436.js.map} +0 -0
  345. /package/dist/{chunk-ITI3SJRB.js.map → chunk-ZX5FNWH7.js.map} +0 -0
  346. /package/dist/{classified-marker-7S5IEP6Q.js.map → classified-marker-52P3D72W.js.map} +0 -0
  347. /package/dist/{collection-facade-ENLTJZBT.js.map → collection-facade-XKCFHSLR.js.map} +0 -0
  348. /package/dist/{computed-WZNKRLCY.js.map → computed-33DRJDOC.js.map} +0 -0
  349. /package/dist/{cover-B5MY43CK.js.map → cover-5BSNJREH.js.map} +0 -0
  350. /package/dist/{dead-filter-KRRD57MR.js.map → dead-filter-JXVCKS6W.js.map} +0 -0
  351. /package/dist/{delegation-UT76AQIG.js.map → delegation-WWZPEDK2.js.map} +0 -0
  352. /package/dist/{derive-SGRCCKVP.js.map → derive-CWWFEQ4N.js.map} +0 -0
  353. /package/dist/{enclave-YFKA3GJT.js.map → enclave-I5H3GINP.js.map} +0 -0
  354. /package/dist/{executor-TEZYRDN3.js.map → executor-FCJEH3FU.js.map} +0 -0
  355. /package/dist/{executor-WQQRU6DO.js.map → executor-OHET7TF7.js.map} +0 -0
  356. /package/dist/{executor-YORMIBWV.js.map → executor-SHYLIBOM.js.map} +0 -0
  357. /package/dist/{export-accessible-HXMKW5LJ.js.map → export-accessible-FBL6TDSK.js.map} +0 -0
  358. /package/dist/{extract-partition-QGQ2R42J.js.map → extract-partition-ZYIRYMTI.js.map} +0 -0
  359. /package/dist/{fanout-sidecar-HJV3A7PM.js.map → fanout-sidecar-WWXVHHUH.js.map} +0 -0
  360. /package/dist/{find-VV6PBIHK.js.map → find-LEBUXVL7.js.map} +0 -0
  361. /package/dist/{issue-7JJ4Z7E2.js.map → issue-F76PAGIR.js.map} +0 -0
  362. /package/dist/{ledger-SW6QQOAV.js.map → ledger-M2BKCNVS.js.map} +0 -0
  363. /package/dist/{liberate-FK7JI2QX.js.map → liberate-ZP7UB57K.js.map} +0 -0
  364. /package/dist/{link-set-GNGGCFI4.js.map → link-set-ZU4E5J5S.js.map} +0 -0
  365. /package/dist/{noydb-KUX2TJMX.js.map → noydb-BNDGEK5X.js.map} +0 -0
  366. /package/dist/{policy-EAXSJNOT.js.map → policy-IY2YEA3A.js.map} +0 -0
  367. /package/dist/{post-register-A7HCFBP5.js.map → post-register-XIAHB6KF.js.map} +0 -0
  368. /package/dist/{register-YBMRLZLO.js.map → register-HB4TQZSV.js.map} +0 -0
  369. /package/dist/{registry-3LXKNXWI.js.map → registry-6BMBFEXT.js.map} +0 -0
  370. /package/dist/{registry-4V4YQCXJ.js.map → registry-7CZWF3EQ.js.map} +0 -0
  371. /package/dist/{registry-ZULMLCJK.js.map → registry-JOFO7RAH.js.map} +0 -0
  372. /package/dist/{request-withdrawal-SEVUEUDG.js.map → request-withdrawal-UN3TRHWI.js.map} +0 -0
  373. /package/dist/{reveal-PB3YG544.js.map → reveal-VWXRV2XU.js.map} +0 -0
  374. /package/dist/{revoke-5QULL5GT.js.map → revoke-OLO2OVR7.js.map} +0 -0
  375. /package/dist/{signer-ZMH35FT4.js.map → signer-MGGKPYAN.js.map} +0 -0
  376. /package/dist/{stale-4UNPHWOU.js.map → stale-NBROTA66.js.map} +0 -0
  377. /package/dist/{storage-QOZKQMID.js.map → storage-3R37QZLA.js.map} +0 -0
  378. /package/dist/{store-coordination-provider-3AELCZ4Y.js.map → store-coordination-provider-P3IU5JHD.js.map} +0 -0
  379. /package/dist/{verify-MXN66IIH.js.map → verify-5X37OXRY.js.map} +0 -0
  380. /package/dist/{walk-H4YE52S2.js.map → walk-E3OVLBFR.js.map} +0 -0
  381. /package/dist/{withdraw-accessible-HPOVNG2G.js.map → withdraw-accessible-Q2EMATCU.js.map} +0 -0
@@ -0,0 +1,134 @@
1
+ /**
2
+ * The strategy bag (#838) — one resolved, immutable record of every opt-in
3
+ * service, built once in `createNoydb` and carried by reference down the
4
+ * spine: `Noydb` → `Vault` → `Collection`.
5
+ *
6
+ * ## Why this exists
7
+ *
8
+ * Threading one service through the spine used to cost ~10 mechanical edits
9
+ * with no logic in any of them: a field on `NoydbOptions`, a conditional
10
+ * spread at the `new Vault(` site, a field declaration + constructor
11
+ * parameter + constructor assignment on `Vault`, a forwarding spread into
12
+ * the collection options, a field + `?? NO_*` default in
13
+ * `collection-config.ts`, and a field + assignment on `Collection`. Nothing
14
+ * checked that a new service reached every layer, which is exactly how #834
15
+ * happened — one of three copies of the Vault option block had silently
16
+ * dropped six strategies, and a vault reached that way threw
17
+ * `*NotEnabledError` for services the caller had actually configured.
18
+ *
19
+ * Here the layers hold ONE field. Adding a service is a row in
20
+ * {@link StrategyBag} plus a row in {@link STRATEGY_DEFAULTS} — both in this
21
+ * file, and omitting either is a compile error rather than a bug that only
22
+ * shows up through one construction path.
23
+ *
24
+ * ## Every key always resolves
25
+ *
26
+ * There is no `undefined` in the bag. An un-opted-in service resolves to its
27
+ * `NO_*` stub, which is the tree-shake seam: the stubs are deliberately tiny
28
+ * modules on the `/with` port that the spine may import statically, while the
29
+ * real implementation arrives only when the consumer imports the service's
30
+ * subpath. Holding a stub costs a few hundred bytes; it does not pull the
31
+ * machinery in.
32
+ *
33
+ * Two services needed adjusting to fit that rule, both recorded here because
34
+ * the reasons are not obvious:
35
+ *
36
+ * - `archive` had no stub at all and was held as `ArchiveStrategy |
37
+ * undefined` behind a hand-rolled null gate. {@link NO_ARCHIVE} now stands
38
+ * in and throws on `.store` access — see `port/with/archive-strategy.ts`.
39
+ * - `lazy`'s floor is {@link IMPLICIT_LAZY}, not a no-op: an un-opted-in
40
+ * collection still gets a working LRU, it just warns. So its default row
41
+ * is a real strategy, which is why this table maps keys to defaults rather
42
+ * than assuming a `NO_*` naming convention.
43
+ *
44
+ * `coordinationStrategy` is deliberately NOT in the bag. It is a
45
+ * `CoordinationProvider`, not a service strategy — it has no `with*()`
46
+ * factory, no `NO_*` stub, and is resolved asynchronously from the store
47
+ * (`createDefaultCoordinationProvider`) rather than passed through. The
48
+ * completeness assertion at the bottom of this file excludes it by name so
49
+ * that the exclusion is explicit and survives future edits.
50
+ *
51
+ * @internal
52
+ */
53
+ import type { NoydbOptions } from '../../kernel/types.js';
54
+ import { type AggregateStrategy } from '../../with-lookup/aggregate/strategy.js';
55
+ import { type AttestationStrategy } from '../../with-audit/attestation/strategy.js';
56
+ import { type BlobStrategy } from './blob-strategy.js';
57
+ import { type BrokerStrategy } from './broker-strategy.js';
58
+ import { type CargoStrategy } from '../../with-cargo/strategy.js';
59
+ import { type ClassifiedStrategy } from './classified-strategy.js';
60
+ import { type ConsentStrategy } from '../../with-audit/consent/strategy.js';
61
+ import { type CrdtStrategy } from '../../with-commit/crdt/strategy.js';
62
+ import { type CustodyStrategy } from '../../with-party/custody/strategy.js';
63
+ import { type ForgetStrategy } from '../../with-audit/forget/strategy.js';
64
+ import { type HistoryStrategy } from '../../with-commit/history/strategy.js';
65
+ import { type I18nStrategy } from './i18n-strategy.js';
66
+ import { type IndexStrategy } from '../../with-lookup/indexing/strategy.js';
67
+ import { type PeriodsStrategy } from '../../with-audit/periods/strategy.js';
68
+ import { type PortabilityStrategy } from '../../with-audit/portability/strategy.js';
69
+ import { type SealedRecordStrategy } from '../../with-audit/sealed-record/strategy.js';
70
+ import { type SearchStrategy } from '../../with-lookup/search/strategy.js';
71
+ import { type SequenceStrategy } from '../../with-commit/sequence/strategy.js';
72
+ import { type SessionStrategy } from '../../with-party/session/strategy.js';
73
+ import { type ShadowStrategy } from '../../with-fork/shadow/strategy.js';
74
+ import { type SnapshotStrategy } from '../../with-fork/snapshots/strategy.js';
75
+ import { type SyncStrategy } from '../../with-party/team/sync-strategy.js';
76
+ import { type TeamStrategy } from './team-strategy.js';
77
+ import { type TiersStrategy } from '../../with-audit/tiers/strategy.js';
78
+ import { type TxStrategy } from '../../with-commit/tx/strategy.js';
79
+ import { type LazyStrategy } from './lazy-strategy.js';
80
+ import type { ArchiveStrategy } from '../../with-fork/archive/index.js';
81
+ /**
82
+ * Every opt-in service, resolved. One field per service, never `undefined`.
83
+ *
84
+ * Keys drop the `Strategy` suffix the `createNoydb` option carries, so
85
+ * `searchStrategy: withSearch()` reads back as `strategies.search`. The
86
+ * completeness assertion below pins that correspondence.
87
+ */
88
+ export interface StrategyBag {
89
+ readonly aggregate: AggregateStrategy;
90
+ readonly archive: ArchiveStrategy;
91
+ readonly attestation: AttestationStrategy;
92
+ readonly blob: BlobStrategy;
93
+ readonly broker: BrokerStrategy;
94
+ readonly cargo: CargoStrategy;
95
+ readonly classified: ClassifiedStrategy;
96
+ readonly consent: ConsentStrategy;
97
+ readonly crdt: CrdtStrategy;
98
+ readonly custody: CustodyStrategy;
99
+ readonly forget: ForgetStrategy;
100
+ readonly history: HistoryStrategy;
101
+ readonly i18n: I18nStrategy;
102
+ readonly index: IndexStrategy;
103
+ readonly lazy: LazyStrategy;
104
+ readonly periods: PeriodsStrategy;
105
+ readonly portability: PortabilityStrategy;
106
+ readonly sealedRecord: SealedRecordStrategy;
107
+ readonly search: SearchStrategy;
108
+ readonly sequence: SequenceStrategy;
109
+ readonly session: SessionStrategy;
110
+ readonly shadow: ShadowStrategy;
111
+ readonly snapshot: SnapshotStrategy;
112
+ readonly sync: SyncStrategy;
113
+ readonly team: TeamStrategy;
114
+ readonly tiers: TiersStrategy;
115
+ readonly tx: TxStrategy;
116
+ }
117
+ /** The name of every service in the bag. */
118
+ export type StrategyKey = keyof StrategyBag;
119
+ /**
120
+ * The un-opted-in floor: what each service resolves to when the caller passed
121
+ * no `with*()` factory. Annotating this `StrategyBag` is what makes a missing
122
+ * row a compile error.
123
+ */
124
+ export declare const STRATEGY_DEFAULTS: StrategyBag;
125
+ /**
126
+ * Build the bag from user options. Called ONCE, in `createNoydb` — every
127
+ * layer below shares the resulting reference.
128
+ *
129
+ * The two casts are the price of mapping `blob` ↔ `blobStrategy` in a loop
130
+ * instead of writing 27 hand-copied lines; the correspondence they assume is
131
+ * proven at compile time by the assertion below, so a typo cannot survive a
132
+ * build.
133
+ */
134
+ export declare function resolveStrategies(options: NoydbOptions): StrategyBag;
@@ -16,7 +16,7 @@
16
16
  * argument from the strategy.
17
17
  *
18
18
  * Deliberately NOT gated (single-user primitives): owner keyring creation,
19
- * unlock, `listUsers`, `updateUser`, passphrase rotate/recover, and the
19
+ * unlock, `listUsers`, `updateUser`, secret rotate/recover, and the
20
20
  * `createDeedOwner` free function (no createNoydb instance to gate against —
21
21
  * the same carve-out as `liberateVault`).
22
22
  * @internal
@@ -1,36 +1,36 @@
1
1
  import {
2
2
  NO_PORTABILITY
3
- } from "../chunk-GYB2QK5H.js";
3
+ } from "../chunk-OWLZONGX.js";
4
4
  import {
5
5
  PortabilityNotEnabledError
6
- } from "../chunk-IGM563N5.js";
6
+ } from "../chunk-6SYOHUHM.js";
7
7
  import "../chunk-PZ5AY32C.js";
8
8
 
9
9
  // src/with-audit/portability/active.ts
10
10
  function withPortability() {
11
11
  return {
12
12
  async exportAccessibleData(vault, opts) {
13
- const { exportAccessibleData } = await import("../export-accessible-HXMKW5LJ.js");
13
+ const { exportAccessibleData } = await import("../export-accessible-FBL6TDSK.js");
14
14
  return exportAccessibleData(vault, opts);
15
15
  },
16
16
  async withdrawAccessibleData(vault, opts) {
17
- const { withdrawAccessibleData } = await import("../withdraw-accessible-HPOVNG2G.js");
17
+ const { withdrawAccessibleData } = await import("../withdraw-accessible-Q2EMATCU.js");
18
18
  return withdrawAccessibleData(vault, opts);
19
19
  },
20
20
  async requestWithdrawal(vault, opts) {
21
- const { requestWithdrawal } = await import("../request-withdrawal-SEVUEUDG.js");
21
+ const { requestWithdrawal } = await import("../request-withdrawal-UN3TRHWI.js");
22
22
  return requestWithdrawal(vault, opts);
23
23
  },
24
24
  async listWithdrawalRequests(vault, opts) {
25
- const { listWithdrawalRequests } = await import("../request-withdrawal-SEVUEUDG.js");
25
+ const { listWithdrawalRequests } = await import("../request-withdrawal-UN3TRHWI.js");
26
26
  return listWithdrawalRequests(vault, opts);
27
27
  },
28
28
  async approveWithdrawal(vault, requestId, opts) {
29
- const { approveWithdrawal } = await import("../request-withdrawal-SEVUEUDG.js");
29
+ const { approveWithdrawal } = await import("../request-withdrawal-UN3TRHWI.js");
30
30
  return approveWithdrawal(vault, requestId, opts);
31
31
  },
32
32
  async rejectWithdrawal(vault, requestId, opts) {
33
- const { rejectWithdrawal } = await import("../request-withdrawal-SEVUEUDG.js");
33
+ const { rejectWithdrawal } = await import("../request-withdrawal-UN3TRHWI.js");
34
34
  return rejectWithdrawal(vault, requestId, opts);
35
35
  }
36
36
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  hashFields
3
- } from "./chunk-L4OA7G5T.js";
3
+ } from "./chunk-522MBPE5.js";
4
4
  import {
5
5
  SatelliteConfigError
6
- } from "./chunk-IGM563N5.js";
6
+ } from "./chunk-6SYOHUHM.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
 
9
9
  // src/with-shape/satellites/marker.ts
@@ -14,7 +14,7 @@ async function ensureSatelliteMarker(store, vaultName, spec, dek) {
14
14
  joined: spec.joined,
15
15
  epoch: (/* @__PURE__ */ new Date()).toISOString()
16
16
  };
17
- const { loadPersistedSchema } = await import("./storage-QOZKQMID.js");
17
+ const { loadPersistedSchema } = await import("./storage-3R37QZLA.js");
18
18
  const persisted = await loadPersistedSchema(store, vaultName, spec.satellite, dek);
19
19
  const prior = persisted?.satellite;
20
20
  if (prior) {
@@ -25,7 +25,7 @@ async function ensureSatelliteMarker(store, vaultName, spec, dek) {
25
25
  }
26
26
  return;
27
27
  }
28
- const { persistSatelliteMarker } = await import("./register-YBMRLZLO.js");
28
+ const { persistSatelliteMarker } = await import("./register-HB4TQZSV.js");
29
29
  await persistSatelliteMarker({ store, vault: vaultName, collectionName: spec.satellite, dek, marker: next });
30
30
  }
31
31
 
@@ -39,7 +39,7 @@ async function postRegister(store, vaultName, spec, getDEK, baseSchema, registry
39
39
  }
40
40
  if (baseSchema !== void 0) {
41
41
  try {
42
- const { derivePersistedSchema } = await import("./derive-SGRCCKVP.js");
42
+ const { derivePersistedSchema } = await import("./derive-CWWFEQ4N.js");
43
43
  const envelope = await derivePersistedSchema(baseSchema);
44
44
  const properties = envelope.jsonSchema?.["properties"];
45
45
  const baseFields = Object.keys(properties ?? {});
@@ -57,4 +57,4 @@ async function postRegister(store, vaultName, spec, getDEK, baseSchema, registry
57
57
  export {
58
58
  postRegister
59
59
  };
60
- //# sourceMappingURL=post-register-A7HCFBP5.js.map
60
+ //# sourceMappingURL=post-register-XIAHB6KF.js.map
@@ -4,12 +4,12 @@ import {
4
4
  ScanBuilder,
5
5
  buildLiveQuery,
6
6
  executePlan
7
- } from "../chunk-GU5AYA2Q.js";
7
+ } from "../chunk-HQKRZIX6.js";
8
8
  import {
9
9
  DEFAULT_JOIN_MAX_ROWS,
10
10
  applyJoins,
11
11
  resetJoinWarnings
12
- } from "../chunk-OGFPMCSP.js";
12
+ } from "../chunk-SBOHNJUD.js";
13
13
  import {
14
14
  CollectionIndexes
15
15
  } from "../chunk-KPZS5QAQ.js";
@@ -33,14 +33,14 @@ import {
33
33
  reducerBuilder,
34
34
  resetGroupByWarnings,
35
35
  sum
36
- } from "../chunk-JIMEB4C6.js";
36
+ } from "../chunk-QMMOMBH6.js";
37
37
  import {
38
38
  evaluateClause,
39
39
  evaluateFieldClause,
40
40
  readPath
41
41
  } from "../chunk-IGJCYUT5.js";
42
- import "../chunk-XGVDLQJE.js";
43
- import "../chunk-STR7WBOB.js";
42
+ import "../chunk-JN3SGXJE.js";
43
+ import "../chunk-ZUDAK436.js";
44
44
  import {
45
45
  CrossJoinSourceUnknownError,
46
46
  CrossJoinTooLargeError,
@@ -50,7 +50,7 @@ import {
50
50
  IndexRequiredError,
51
51
  IndexWriteFailureError,
52
52
  JoinTooLargeError
53
- } from "../chunk-IGM563N5.js";
53
+ } from "../chunk-6SYOHUHM.js";
54
54
  import "../chunk-PZ5AY32C.js";
55
55
  export {
56
56
  Aggregation,
@@ -0,0 +1,23 @@
1
+ import {
2
+ persistClassifiedMarker,
3
+ persistSatelliteMarker,
4
+ persistSchemaIfNeeded
5
+ } from "./chunk-YXZNGHID.js";
6
+ import "./chunk-SEU6QHH4.js";
7
+ import "./chunk-S4YERMGJ.js";
8
+ import "./chunk-GEEJPID6.js";
9
+ import "./chunk-SC4JLMZI.js";
10
+ import "./chunk-5WLDZZ6S.js";
11
+ import "./chunk-5HSSTOOG.js";
12
+ import "./chunk-G4MFQXYX.js";
13
+ import "./chunk-LP7BEXCT.js";
14
+ import "./chunk-7U6AB7DZ.js";
15
+ import "./chunk-YTW6ZIPD.js";
16
+ import "./chunk-6SYOHUHM.js";
17
+ import "./chunk-PZ5AY32C.js";
18
+ export {
19
+ persistClassifiedMarker,
20
+ persistSatelliteMarker,
21
+ persistSchemaIfNeeded
22
+ };
23
+ //# sourceMappingURL=register-HB4TQZSV.js.map
@@ -0,0 +1,19 @@
1
+ import {
2
+ MaterializedViewRegistry,
3
+ wrapDbWithPredicates
4
+ } from "./chunk-TNATF3HB.js";
5
+ import "./chunk-GEEJPID6.js";
6
+ import "./chunk-SC4JLMZI.js";
7
+ import "./chunk-5WLDZZ6S.js";
8
+ import "./chunk-5HSSTOOG.js";
9
+ import "./chunk-G4MFQXYX.js";
10
+ import "./chunk-LP7BEXCT.js";
11
+ import "./chunk-7U6AB7DZ.js";
12
+ import "./chunk-YTW6ZIPD.js";
13
+ import "./chunk-6SYOHUHM.js";
14
+ import "./chunk-PZ5AY32C.js";
15
+ export {
16
+ MaterializedViewRegistry,
17
+ wrapDbWithPredicates
18
+ };
19
+ //# sourceMappingURL=registry-6BMBFEXT.js.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ OverlayedViewRegistry
3
+ } from "./chunk-ZX5FNWH7.js";
4
+ import "./chunk-6SYOHUHM.js";
5
+ import "./chunk-PZ5AY32C.js";
6
+ export {
7
+ OverlayedViewRegistry
8
+ };
9
+ //# sourceMappingURL=registry-7CZWF3EQ.js.map
@@ -0,0 +1,18 @@
1
+ import {
2
+ DerivationRegistry
3
+ } from "./chunk-2PDBYF2O.js";
4
+ import "./chunk-Z4D3YGAB.js";
5
+ import "./chunk-GEEJPID6.js";
6
+ import "./chunk-SC4JLMZI.js";
7
+ import "./chunk-5WLDZZ6S.js";
8
+ import "./chunk-5HSSTOOG.js";
9
+ import "./chunk-G4MFQXYX.js";
10
+ import "./chunk-LP7BEXCT.js";
11
+ import "./chunk-7U6AB7DZ.js";
12
+ import "./chunk-YTW6ZIPD.js";
13
+ import "./chunk-6SYOHUHM.js";
14
+ import "./chunk-PZ5AY32C.js";
15
+ export {
16
+ DerivationRegistry
17
+ };
18
+ //# sourceMappingURL=registry-JOFO7RAH.js.map
@@ -0,0 +1,31 @@
1
+ import {
2
+ WITHDRAWAL_REQUESTS_COLLECTION,
3
+ WithdrawalRequestError,
4
+ approveWithdrawal,
5
+ listWithdrawalRequests,
6
+ rejectWithdrawal,
7
+ requestWithdrawal
8
+ } from "./chunk-3OWYOECI.js";
9
+ import "./chunk-K4BWPNJO.js";
10
+ import "./chunk-OMSKGLYA.js";
11
+ import "./chunk-YCAJDK4O.js";
12
+ import "./chunk-YFFEF6HR.js";
13
+ import "./chunk-GEEJPID6.js";
14
+ import "./chunk-SC4JLMZI.js";
15
+ import "./chunk-5WLDZZ6S.js";
16
+ import "./chunk-5HSSTOOG.js";
17
+ import "./chunk-G4MFQXYX.js";
18
+ import "./chunk-LP7BEXCT.js";
19
+ import "./chunk-7U6AB7DZ.js";
20
+ import "./chunk-YTW6ZIPD.js";
21
+ import "./chunk-6SYOHUHM.js";
22
+ import "./chunk-PZ5AY32C.js";
23
+ export {
24
+ WITHDRAWAL_REQUESTS_COLLECTION,
25
+ WithdrawalRequestError,
26
+ approveWithdrawal,
27
+ listWithdrawalRequests,
28
+ rejectWithdrawal,
29
+ requestWithdrawal
30
+ };
31
+ //# sourceMappingURL=request-withdrawal-UN3TRHWI.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  isTombstone
3
- } from "./chunk-QXPOEAKR.js";
3
+ } from "./chunk-SC4JLMZI.js";
4
4
  import {
5
5
  dualReadSealedSlot
6
- } from "./chunk-M25ZIEB2.js";
7
- import "./chunk-5P5AAXYA.js";
8
- import "./chunk-5BHNQNBI.js";
6
+ } from "./chunk-5HSSTOOG.js";
7
+ import "./chunk-7U6AB7DZ.js";
8
+ import "./chunk-YTW6ZIPD.js";
9
9
  import {
10
10
  ClassifiedRevealError
11
- } from "./chunk-IGM563N5.js";
11
+ } from "./chunk-6SYOHUHM.js";
12
12
  import "./chunk-PZ5AY32C.js";
13
13
 
14
14
  // src/kernel/enclave/classify/reveal.ts
@@ -35,4 +35,4 @@ async function revealSealedField(ctx, id, field) {
35
35
  export {
36
36
  revealSealedField
37
37
  };
38
- //# sourceMappingURL=reveal-PB3YG544.js.map
38
+ //# sourceMappingURL=reveal-VWXRV2XU.js.map
@@ -0,0 +1,24 @@
1
+ import {
2
+ getRevokedDocIdsCore,
3
+ publishRevocationListCore,
4
+ revokeDocCore,
5
+ unrevokeDocCore
6
+ } from "./chunk-UTEATWHO.js";
7
+ import "./chunk-QZJEYZ4I.js";
8
+ import "./chunk-GEEJPID6.js";
9
+ import "./chunk-SC4JLMZI.js";
10
+ import "./chunk-5WLDZZ6S.js";
11
+ import "./chunk-5HSSTOOG.js";
12
+ import "./chunk-G4MFQXYX.js";
13
+ import "./chunk-LP7BEXCT.js";
14
+ import "./chunk-7U6AB7DZ.js";
15
+ import "./chunk-YTW6ZIPD.js";
16
+ import "./chunk-6SYOHUHM.js";
17
+ import "./chunk-PZ5AY32C.js";
18
+ export {
19
+ getRevokedDocIdsCore,
20
+ publishRevocationListCore,
21
+ revokeDocCore,
22
+ unrevokeDocCore
23
+ };
24
+ //# sourceMappingURL=revoke-OLO2OVR7.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SatelliteConfigError
3
- } from "../chunk-IGM563N5.js";
3
+ } from "../chunk-6SYOHUHM.js";
4
4
  import "../chunk-PZ5AY32C.js";
5
5
  export {
6
6
  SatelliteConfigError
@@ -1,38 +1,38 @@
1
1
  import {
2
2
  NO_SEALED_RECORD
3
- } from "../chunk-J3VW4J4E.js";
4
- import "../chunk-PEY6ZTCF.js";
5
- import "../chunk-QXPOEAKR.js";
6
- import "../chunk-LLVW4V7R.js";
7
- import "../chunk-M25ZIEB2.js";
8
- import "../chunk-5BB3N4KU.js";
3
+ } from "../chunk-7LP7FFJ2.js";
4
+ import "../chunk-GEEJPID6.js";
5
+ import "../chunk-SC4JLMZI.js";
6
+ import "../chunk-5WLDZZ6S.js";
7
+ import "../chunk-5HSSTOOG.js";
8
+ import "../chunk-G4MFQXYX.js";
9
9
  import "../chunk-LP7BEXCT.js";
10
10
  import {
11
11
  base64ToBuffer,
12
12
  decrypt,
13
13
  importCek
14
- } from "../chunk-5P5AAXYA.js";
15
- import "../chunk-5BHNQNBI.js";
14
+ } from "../chunk-7U6AB7DZ.js";
15
+ import "../chunk-YTW6ZIPD.js";
16
16
  import {
17
17
  SealedRecordExpiredError,
18
18
  SealedRecordMismatchError,
19
19
  SealedRecordNotEnabledError
20
- } from "../chunk-IGM563N5.js";
20
+ } from "../chunk-6SYOHUHM.js";
21
21
  import "../chunk-PZ5AY32C.js";
22
22
 
23
23
  // src/with-audit/sealed-record/active.ts
24
24
  function withSealedRecord() {
25
25
  return {
26
26
  async sealRecordToHost(ctx, collection, id, hostSealer, opts) {
27
- const { sealRecordToHost } = await import("../enclave-YFKA3GJT.js");
27
+ const { sealRecordToHost } = await import("../enclave-I5H3GINP.js");
28
28
  return sealRecordToHost(ctx, collection, id, hostSealer, opts);
29
29
  },
30
30
  async revokeSealedRecord(ctx, collection, id, pid, opts) {
31
- const { revokeSealedRecord } = await import("../enclave-YFKA3GJT.js");
31
+ const { revokeSealedRecord } = await import("../enclave-I5H3GINP.js");
32
32
  return revokeSealedRecord(ctx, collection, id, pid, opts);
33
33
  },
34
34
  async rotateRecordCek(ctx, collection, id) {
35
- const { rotateRecordCek } = await import("../enclave-YFKA3GJT.js");
35
+ const { rotateRecordCek } = await import("../enclave-I5H3GINP.js");
36
36
  return rotateRecordCek(ctx, collection, id);
37
37
  }
38
38
  };
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  BROKER_COLLECTION,
3
3
  ensureCollectionDEK
4
- } from "./chunk-WJDYZP3U.js";
5
- import "./chunk-7B4GPCX7.js";
4
+ } from "./chunk-3LJYHE7S.js";
5
+ import "./chunk-6RPWILRH.js";
6
6
  import {
7
7
  computeBrokerProof,
8
8
  deriveBrokerProofBits,
9
9
  openEnvelopeJson,
10
10
  writeEnvelopeBody
11
- } from "./chunk-PEY6ZTCF.js";
12
- import "./chunk-QXPOEAKR.js";
13
- import "./chunk-LLVW4V7R.js";
14
- import "./chunk-M25ZIEB2.js";
15
- import "./chunk-5BB3N4KU.js";
11
+ } from "./chunk-GEEJPID6.js";
12
+ import "./chunk-SC4JLMZI.js";
13
+ import "./chunk-5WLDZZ6S.js";
14
+ import "./chunk-5HSSTOOG.js";
15
+ import "./chunk-G4MFQXYX.js";
16
16
  import "./chunk-LP7BEXCT.js";
17
17
  import {
18
18
  base64ToBuffer,
19
19
  bufferToBase64
20
- } from "./chunk-5P5AAXYA.js";
20
+ } from "./chunk-7U6AB7DZ.js";
21
21
  import {
22
22
  NOYDB_FORMAT_VERSION
23
- } from "./chunk-5BHNQNBI.js";
23
+ } from "./chunk-YTW6ZIPD.js";
24
24
  import {
25
25
  BrokerEnrolmentError,
26
26
  BrokerProofError,
@@ -28,7 +28,7 @@ import {
28
28
  NetworkError,
29
29
  PermissionDeniedError,
30
30
  ValidationError
31
- } from "./chunk-IGM563N5.js";
31
+ } from "./chunk-6SYOHUHM.js";
32
32
  import "./chunk-PZ5AY32C.js";
33
33
 
34
34
  // src/with-party/broker/seed.ts
@@ -57,7 +57,7 @@ async function brokerDek(store, vault, keyring) {
57
57
  } catch (err) {
58
58
  if (err instanceof ValidationError) {
59
59
  throw new BrokerEnrolmentError(
60
- "enroll()/rotate() need the KEK to provision the _broker DEK on first use \u2014 re-authenticate at tier 1 (passphrase) before enrolling. Using an already-enrolled seed (credentialSource()) needs only the DEK."
60
+ "enroll()/rotate() need the KEK to provision the _broker DEK on first use \u2014 re-authenticate at tier 1 (secret) before enrolling. Using an already-enrolled seed (credentialSource()) needs only the DEK."
61
61
  );
62
62
  }
63
63
  throw err;
@@ -228,4 +228,4 @@ export {
228
228
  mintStoreCredentials,
229
229
  rotateSeed
230
230
  };
231
- //# sourceMappingURL=seed-EKF4DIBB.js.map
231
+ //# sourceMappingURL=seed-CDBFOTIK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-party/broker/seed.ts"],"sourcesContent":["/**\n * `_broker` reserved-collection seed lifecycle (#479, credential-broker\n * spec §2/§3). Modeled on `with-party/team/sync-credentials.ts`: a\n * `_`-prefixed reserved collection, record id = `brokerId`, encrypted under\n * the collection's own DEK, `requireAdminAccess` role gate (owner/admin\n * only — custodian intentionally excluded, same rationale as\n * `_sync_credentials`: this is transport-auth material, not the\n * custodian's operational scope).\n *\n * Three operations, each a free function taking a {@link BrokerSeedCtx}\n * (the {@link BrokerCtx} threaded through `with-party/broker/active.ts`,\n * augmented there with the `config` its closure was built with):\n *\n * - {@link enrollSeed} — two-phase commit (I9): create-if-absent CAS the\n * seed (I4), then register its derived proof key with the broker host,\n * then (only on a 2xx) mark the record `registered: true`. A seed\n * persisted whose `/enroll` POST failed stays `registered: false` so a\n * later `credentialSource()` fails fast instead of degrading into an\n * opaque `BrokerProofError` (I9/V23).\n * - {@link rotateSeed} — quiesce-then-swap (I5): mint a fresh seed,\n * register-new-first, THEN overwrite the local record — closing the\n * torn-proof window a naive local-overwrite-then-register order would\n * open. The single-flight cache quiesce itself (await in-flight, bump\n * epoch) is the caller's job (`with-party/broker/active.ts`) since the\n * cache lives in that closure, not here.\n * - {@link mintStoreCredentials} — the challenge/response round trip\n * (`/challenge` then `/credentials`) that produces one `StoreCredentials`\n * value; the single-flight cache wrapping it lives in `active.ts`.\n *\n * First-seed creation calls `ensureCollectionDEK`, which throws\n * (`ValidationError`) when the keyring's KEK is `null` (PIN quick-resume /\n * session-restore) — this module intercepts that and re-surfaces it as\n * {@link BrokerEnrolmentError} (R-B8/I3): *enrol* needs the KEK; *use* of an\n * already-enrolled seed needs only the DEK.\n *\n * @module\n */\nimport type { NoydbStore, EncryptedEnvelope, StoreCredentials } from '../../kernel/types.js'\nimport { NOYDB_FORMAT_VERSION } from '../../kernel/types.js'\nimport type { UnlockedKeyring } from '../../with-party/team/keyring.js'\nimport { ensureCollectionDEK } from '../../with-party/team/keyring.js'\nimport { BROKER_COLLECTION } from '../../with-party/team/reserved-secret-collections.js'\nimport {\n openEnvelopeJson,\n writeEnvelopeBody,\n bufferToBase64,\n base64ToBuffer,\n deriveBrokerProofBits,\n computeBrokerProof,\n} from '../../kernel/enclave/index.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport {\n PermissionDeniedError,\n ValidationError,\n ConflictError,\n NetworkError,\n BrokerEnrolmentError,\n BrokerProofError,\n} from '../../kernel/errors.js'\nimport type { BrokerSeedCtx, BrokerConfig } from '../../port/with/broker-strategy.js'\n\n/** The `_broker/<brokerId>` record payload (spec §3). */\nexport interface BrokerSeedRecord {\n readonly brokerId: string\n /** base64(32 random bytes). */\n readonly seed: string\n readonly endpoint: string\n readonly createdAt: string\n /** `true` only once `/enroll` has returned a 2xx for this seed (I9). */\n readonly registered: boolean\n}\n\nfunction requireAdminAccess(keyring: UnlockedKeyring): void {\n // Custodian is INTENTIONALLY excluded — the _broker seed is transport-auth\n // material (mints cloud store credentials), not the custodian's\n // operational data scope. Same rationale as _sync_credentials' FR-6 note.\n if (keyring.role !== 'owner' && keyring.role !== 'admin') {\n throw new PermissionDeniedError(\n `Credential-broker operations require owner or admin role. Current role: \"${keyring.role}\"`,\n )\n }\n}\n\n// `ensureCollectionDEK` only dedupes concurrent first-time DEK creates WITHIN one\n// closure instance — since every call site here asks for a fresh closure, two\n// concurrent `enrollSeed()` calls sharing the same (store, vault, keyring) would\n// otherwise each mint a DIFFERENT `_broker` DEK and race `persistKeyring`, leaving\n// the seed record encrypted under a DEK the keyring no longer holds (TamperedError\n// on the next read). Dedupe across calls here, keyed by store identity + vault\n// (V20 — the CAS enrol vector actually exercises this).\nconst inFlightDekByStore = new WeakMap<NoydbStore, Map<string, Promise<EnclaveKey>>>()\n\nasync function brokerDek(store: NoydbStore, vault: string, keyring: UnlockedKeyring): Promise<EnclaveKey> {\n const existing = keyring.deks.get(BROKER_COLLECTION)\n if (existing) return existing\n\n let perStore = inFlightDekByStore.get(store)\n if (!perStore) { perStore = new Map(); inFlightDekByStore.set(store, perStore) }\n const pending = perStore.get(vault)\n if (pending) return pending\n\n const promise = (async () => {\n try {\n const getDek = await ensureCollectionDEK(store, vault, keyring)\n return await getDek(BROKER_COLLECTION)\n } catch (err) {\n if (err instanceof ValidationError) {\n throw new BrokerEnrolmentError(\n 'enroll()/rotate() need the KEK to provision the _broker DEK on first use — ' +\n 're-authenticate at tier 1 (secret) before enrolling. Using an already-' +\n 'enrolled seed (credentialSource()) needs only the DEK.',\n )\n }\n throw err\n }\n })()\n perStore.set(vault, promise)\n try {\n return await promise\n } finally {\n perStore.delete(vault)\n }\n}\n\nasync function readRecord(\n store: NoydbStore,\n vault: string,\n brokerId: string,\n dek: EnclaveKey,\n): Promise<{ envelope: EncryptedEnvelope; record: BrokerSeedRecord } | null> {\n const envelope = await store.get(vault, BROKER_COLLECTION, brokerId)\n if (!envelope) return null\n const record = JSON.parse(await openEnvelopeJson(envelope, dek)) as BrokerSeedRecord\n return { envelope, record }\n}\n\nasync function persistRecord(\n store: NoydbStore,\n vault: string,\n keyring: UnlockedKeyring,\n dek: EnclaveKey,\n record: BrokerSeedRecord,\n expectedVersion: number,\n): Promise<void> {\n const body = await writeEnvelopeBody(JSON.stringify(record), dek)\n const envelope: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: expectedVersion + 1,\n _ts: new Date().toISOString(),\n ...body,\n _by: keyring.userId,\n }\n await store.put(vault, BROKER_COLLECTION, record.brokerId, envelope, expectedVersion)\n}\n\ninterface SeedState {\n readonly seedBytes: Uint8Array\n readonly record: BrokerSeedRecord\n readonly dek: EnclaveKey\n readonly version: number\n}\n\n/** Create-if-absent CAS (I4/V20): a concurrent enrol that loses the race\n * re-reads the winner's seed instead of persisting a second one. */\nasync function ensureSeedRecord(store: NoydbStore, vault: string, keyring: UnlockedKeyring, config: BrokerConfig): Promise<SeedState> {\n requireAdminAccess(keyring)\n const dek = await brokerDek(store, vault, keyring)\n\n const existing = await readRecord(store, vault, config.brokerId, dek)\n if (existing) {\n return { seedBytes: base64ToBuffer(existing.record.seed), record: existing.record, dek, version: existing.envelope._v }\n }\n\n const seedBytes = globalThis.crypto.getRandomValues(new Uint8Array(32))\n const record: BrokerSeedRecord = {\n brokerId: config.brokerId,\n seed: bufferToBase64(seedBytes),\n endpoint: config.endpoint,\n createdAt: new Date().toISOString(),\n registered: false,\n }\n try {\n await persistRecord(store, vault, keyring, dek, record, 0)\n return { seedBytes, record, dek, version: 1 }\n } catch (err) {\n if (!(err instanceof ConflictError)) throw err\n const winner = await readRecord(store, vault, config.brokerId, dek)\n if (!winner) throw err\n return { seedBytes: base64ToBuffer(winner.record.seed), record: winner.record, dek, version: winner.envelope._v }\n }\n}\n\nasync function postEnroll(config: BrokerConfig, vault: string, proofBits: Uint8Array): Promise<void> {\n const fetchFn = config.fetch ?? globalThis.fetch\n const attestation = config.attestation ? await config.attestation() : undefined\n let res: Response\n try {\n res = await fetchFn(`${config.endpoint}/enroll`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n ...(attestation !== undefined ? { authorization: `Bearer ${attestation}` } : {}),\n },\n body: JSON.stringify({ vaultId: vault, brokerId: config.brokerId, proofKey: bufferToBase64(proofBits) }),\n })\n } catch (err) {\n throw new BrokerEnrolmentError(`broker /enroll request failed: ${(err as Error).message}`)\n }\n if (!res.ok) {\n throw new BrokerEnrolmentError(`broker refused enrolment (status ${res.status}) — attestation likely missing or invalid`)\n }\n}\n\n/**\n * Enrol (idempotent, two-phase commit — I9): create-if-absent the `_broker`\n * seed (I4), derive+register its proof key with the broker host, and only\n * on a 2xx mark the record `registered: true`. Requires owner/admin role\n * and (for first-seed creation only) the KEK.\n */\nexport async function enrollSeed(ctx: BrokerSeedCtx): Promise<void> {\n const { store, vault, keyring, config } = ctx\n const { seedBytes, record, dek, version } = await ensureSeedRecord(store, vault, keyring, config)\n if (record.registered) {\n seedBytes.fill(0)\n return\n }\n\n const proofBits = await deriveBrokerProofBits(seedBytes, vault, config.brokerId)\n seedBytes.fill(0)\n try {\n await postEnroll(config, vault, proofBits)\n } finally {\n proofBits.fill(0)\n }\n\n try {\n await persistRecord(store, vault, keyring, dek, { ...record, registered: true }, version)\n } catch (err) {\n if (err instanceof ConflictError) {\n const latest = await readRecord(store, vault, config.brokerId, dek)\n if (latest?.record.registered) return // a concurrent enrol already committed the same outcome\n }\n throw err\n }\n}\n\n/**\n * Rotate (quiesce-then-swap — I5): mint a fresh seed, register its proof\n * key with the broker host FIRST, then overwrite the local `_broker`\n * record. The broker host is expected to accept both the old and new\n * registration for a short grace window, so an in-flight proof computed\n * under the old key (from before rotation started) still verifies. Cache\n * quiescing (awaiting any in-flight round-trip, bumping the refresh-cache\n * epoch) is the caller's job — `with-party/broker/active.ts` — since the\n * cache lives in that closure, not here.\n */\nexport async function rotateSeed(ctx: BrokerSeedCtx): Promise<void> {\n const { store, vault, keyring, config } = ctx\n requireAdminAccess(keyring)\n const dek = await brokerDek(store, vault, keyring)\n\n const existing = await readRecord(store, vault, config.brokerId, dek)\n if (!existing) {\n // Nothing to rotate yet — behaves like a first enrol.\n await enrollSeed(ctx)\n return\n }\n\n const newSeedBytes = globalThis.crypto.getRandomValues(new Uint8Array(32))\n const newProofBits = await deriveBrokerProofBits(newSeedBytes, vault, config.brokerId)\n try {\n await postEnroll(config, vault, newProofBits)\n } finally {\n newProofBits.fill(0)\n }\n\n const record: BrokerSeedRecord = {\n brokerId: config.brokerId,\n seed: bufferToBase64(newSeedBytes),\n endpoint: config.endpoint,\n createdAt: new Date().toISOString(),\n registered: true,\n }\n newSeedBytes.fill(0)\n await persistRecord(store, vault, keyring, dek, record, existing.envelope._v)\n}\n\n/**\n * The challenge/response round trip: `POST /challenge`, derive+sign the\n * proof from the decrypted seed, `POST /credentials`. One network round\n * trip per call — the single-flight/cache wrapping lives in `active.ts`.\n *\n * Fails fast with {@link BrokerEnrolmentError} if the seed hasn't completed\n * enrolment yet (`registered !== true` — I9/V23), never degrading into an\n * opaque {@link BrokerProofError}.\n */\nexport async function mintStoreCredentials(ctx: BrokerSeedCtx, profile?: string): Promise<StoreCredentials> {\n const { store, vault, keyring, config } = ctx\n requireAdminAccess(keyring)\n const dek = await brokerDek(store, vault, keyring)\n\n const found = await readRecord(store, vault, config.brokerId, dek)\n if (!found) throw new BrokerEnrolmentError(`No _broker seed enrolled for brokerId \"${config.brokerId}\" — call enroll() first.`)\n if (!found.record.registered) {\n throw new BrokerEnrolmentError(\n `The _broker seed for \"${config.brokerId}\" has not completed enrolment with the broker host — call enroll() again.`,\n )\n }\n\n const fetchFn = config.fetch ?? globalThis.fetch\n const endpointOrigin = new URL(config.endpoint).origin\n\n let challengeRes: Response\n try {\n challengeRes = await fetchFn(`${config.endpoint}/challenge`, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ vaultId: vault, brokerId: config.brokerId }),\n })\n } catch (err) {\n throw new NetworkError(`broker /challenge request failed: ${(err as Error).message}`)\n }\n if (!challengeRes.ok) throw new NetworkError(`broker /challenge failed with status ${challengeRes.status}`)\n const { challenge, expiresAt } = (await challengeRes.json()) as { challenge: string; expiresAt: string }\n\n const seedBytes = base64ToBuffer(found.record.seed)\n const proof = await computeBrokerProof(seedBytes, vault, config.brokerId, { endpointOrigin, profile, challenge, expiresAt })\n\n let credsRes: Response\n try {\n credsRes = await fetchFn(`${config.endpoint}/credentials`, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ vaultId: vault, brokerId: config.brokerId, challenge, proof, ...(profile !== undefined ? { profile } : {}) }),\n })\n } catch (err) {\n throw new NetworkError(`broker /credentials request failed: ${(err as Error).message}`)\n }\n if (credsRes.status === 401 || credsRes.status === 403) throw new BrokerProofError('broker rejected the challenge proof')\n if (!credsRes.ok) throw new NetworkError(`broker /credentials failed with status ${credsRes.status}`)\n return (await credsRes.json()) as StoreCredentials\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,mBAAmB,SAAgC;AAI1D,MAAI,QAAQ,SAAS,WAAW,QAAQ,SAAS,SAAS;AACxD,UAAM,IAAI;AAAA,MACR,4EAA4E,QAAQ,IAAI;AAAA,IAC1F;AAAA,EACF;AACF;AASA,IAAM,qBAAqB,oBAAI,QAAsD;AAErF,eAAe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AM,KAAK,UAAU,EAAE,SAAS,OAAO,UAAU,OAAO,SAAS,CAAC;AAAA,IACpE,CAAC;AAAA,EACH,SAAS,KAAK;AACZ,UAAM,IAAI,aAAa,qCAAsC,IAAc,OAAO,EAAE;AAAA,EACtF;AACA,MAAI,CAAC,aAAa,GAAI,OAAM,IAAI,aAAa,wCAAwC,aAAa,MAAM,EAAE;AAC1G,QAAM,EAAE,WAAW,UAAU,IAAK,MAAM,aAAa,KAAK;AAE1D,QAAM,YAAY,eAAe,MAAM,OAAO,IAAI;AAClD,QAAM,QAAQ,MAAM,mBAAmB,WAAW,OAAO,OAAO,UAAU,EAAE,gBAAgB,SAAS,WAAW,UAAU,CAAC;AAE3H,MAAI;AACJ,MAAI;AACF,eAAW,MAAM,QAAQ,GAAG,OAAO,QAAQ,gBAAgB;AAAA,MACzD,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,mBAAmB;AAAA,MAC9C,MAAM,KAAK,UAAU,EAAE,SAAS,OAAO,UAAU,OAAO,UAAU,WAAW,OAAO,GAAI,YAAY,SAAY,EAAE,QAAQ,IAAI,CAAC,EAAG,CAAC;AAAA,IACrI,CAAC;AAAA,EACH,SAAS,KAAK;AACZ,UAAM,IAAI,aAAa,uCAAwC,IAAc,OAAO,EAAE;AAAA,EACxF;AACA,MAAI,SAAS,WAAW,OAAO,SAAS,WAAW,IAAK,OAAM,IAAI,iBAAiB,qCAAqC;AACxH,MAAI,CAAC,SAAS,GAAI,OAAM,IAAI,aAAa,0CAA0C,SAAS,MAAM,EAAE;AACpG,SAAQ,MAAM,SAAS,KAAK;AAC9B;","names":[]}
@@ -12,21 +12,21 @@ import {
12
12
  revokeAllSessions,
13
13
  revokeSession,
14
14
  validateSessionPolicy
15
- } from "../chunk-GBEXTC6Z.js";
15
+ } from "../chunk-BAAUFCJK.js";
16
16
  import "../chunk-ZJADGNYF.js";
17
- import "../chunk-PEY6ZTCF.js";
18
- import "../chunk-QXPOEAKR.js";
19
- import "../chunk-LLVW4V7R.js";
20
- import "../chunk-M25ZIEB2.js";
21
- import "../chunk-5BB3N4KU.js";
17
+ import "../chunk-GEEJPID6.js";
18
+ import "../chunk-SC4JLMZI.js";
19
+ import "../chunk-5WLDZZ6S.js";
20
+ import "../chunk-5HSSTOOG.js";
21
+ import "../chunk-G4MFQXYX.js";
22
22
  import "../chunk-LP7BEXCT.js";
23
- import "../chunk-5P5AAXYA.js";
24
- import "../chunk-5BHNQNBI.js";
23
+ import "../chunk-7U6AB7DZ.js";
24
+ import "../chunk-YTW6ZIPD.js";
25
25
  import {
26
26
  SessionExpiredError,
27
27
  SessionNotFoundError,
28
28
  SessionPolicyError
29
- } from "../chunk-IGM563N5.js";
29
+ } from "../chunk-6SYOHUHM.js";
30
30
  import "../chunk-PZ5AY32C.js";
31
31
 
32
32
  // src/with-party/session/active.ts
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  CollectionFrame,
3
3
  VaultFrame
4
- } from "../chunk-2U7Y7BNJ.js";
5
- import "../chunk-IGM563N5.js";
4
+ } from "../chunk-ONB627HU.js";
5
+ import "../chunk-6SYOHUHM.js";
6
6
  import "../chunk-PZ5AY32C.js";
7
7
 
8
8
  // src/with-fork/shadow/active.ts