@noy-db/hub 0.6.0-pre.22 → 0.6.0-pre.24

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 (380) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/dist/api-56KUWV6E.js +20 -0
  3. package/dist/attestation/index.js +18 -18
  4. package/dist/{backup-4PZAH67W.js → backup-WLKPDY3V.js} +12 -12
  5. package/dist/blobs/index.js +22 -20
  6. package/dist/blobs/index.js.map +1 -1
  7. package/dist/broker/index.js +12 -12
  8. package/dist/cargo/index.js +29 -29
  9. package/dist/{chunk-PNXJV4OS.js → chunk-24ZDSTEQ.js} +41 -17
  10. package/dist/chunk-24ZDSTEQ.js.map +1 -0
  11. package/dist/{chunk-4RZTW5JH.js → chunk-25HI46CB.js} +2 -2
  12. package/dist/{chunk-PWK3SSNB.js → chunk-264AKW4K.js} +4 -4
  13. package/dist/{chunk-7LJA7T4W.js → chunk-2CURJCLC.js} +3 -3
  14. package/dist/{chunk-YF3CIA6E.js → chunk-2D5NXYWY.js} +2 -2
  15. package/dist/{chunk-REQJLII3.js → chunk-2MYYXXVM.js} +2 -2
  16. package/dist/{chunk-DIYI32MG.js → chunk-2S6HROLU.js} +5 -5
  17. package/dist/{chunk-23XKHFNT.js → chunk-2ZSBPXFW.js} +3 -3
  18. package/dist/{chunk-XZZIZ544.js → chunk-34MSA4AO.js} +51 -16
  19. package/dist/chunk-34MSA4AO.js.map +1 -0
  20. package/dist/{chunk-BXHG26KN.js → chunk-35K4VWMD.js} +2 -2
  21. package/dist/{chunk-DIVPOJPV.js → chunk-43FOH2OK.js} +20 -8
  22. package/dist/chunk-43FOH2OK.js.map +1 -0
  23. package/dist/{chunk-UQUWSM33.js → chunk-4P3OG2AO.js} +5 -5
  24. package/dist/{chunk-KYUKZIW5.js → chunk-4Y7VHLCT.js} +2 -2
  25. package/dist/{chunk-RJYPFCID.js → chunk-576CTQ77.js} +5 -5
  26. package/dist/{chunk-OCW3IM2F.js → chunk-57MEX4LL.js} +3 -3
  27. package/dist/{chunk-PKUJ3JLQ.js → chunk-5OFC3QYL.js} +19 -2
  28. package/dist/chunk-5OFC3QYL.js.map +1 -0
  29. package/dist/{chunk-4O52JH3C.js → chunk-65WBEFVT.js} +6 -6
  30. package/dist/{chunk-JSTQGUE5.js → chunk-6J7SSCJW.js} +15 -10
  31. package/dist/chunk-6J7SSCJW.js.map +1 -0
  32. package/dist/{chunk-7JOXCSDU.js → chunk-6PLCNLBC.js} +2 -2
  33. package/dist/{chunk-QK2QAMF7.js → chunk-ACIEKVFR.js} +10 -10
  34. package/dist/{chunk-JPVJTTHU.js → chunk-AKPIBKHK.js} +4 -4
  35. package/dist/{chunk-AELW6OJZ.js → chunk-AM6V36AG.js} +2 -2
  36. package/dist/{chunk-DUUARUZI.js → chunk-AU45F5FD.js} +2 -2
  37. package/dist/{chunk-4BYZIQ5T.js → chunk-BZKQRED6.js} +2 -2
  38. package/dist/{chunk-OZ5QBLEL.js → chunk-C3FCXXNI.js} +6 -6
  39. package/dist/{chunk-FKZI4NSG.js → chunk-C4DFJ76X.js} +6 -6
  40. package/dist/{chunk-PGHSH4TY.js → chunk-CDHX3SRW.js} +3 -3
  41. package/dist/{chunk-O5QXH7U7.js → chunk-D7STIWJO.js} +11 -2
  42. package/dist/chunk-D7STIWJO.js.map +1 -0
  43. package/dist/{chunk-VMYXYFPX.js → chunk-DBPQUICN.js} +2 -2
  44. package/dist/{chunk-3TWEXEKX.js → chunk-DL7NXFAY.js} +2 -2
  45. package/dist/{chunk-2VMCJUK6.js → chunk-DM2BZDNV.js} +5 -5
  46. package/dist/{chunk-FFSQFH6D.js → chunk-DNKVKO7K.js} +2 -2
  47. package/dist/{chunk-IPA6ODWG.js → chunk-E2LYQUB7.js} +4 -4
  48. package/dist/{chunk-ANYVM4SX.js → chunk-ENTVT7PF.js} +2 -2
  49. package/dist/{chunk-M3FKPVOU.js → chunk-ESP4K32V.js} +3 -3
  50. package/dist/{chunk-A66LJYFG.js → chunk-FEWCVAFV.js} +131 -17
  51. package/dist/chunk-FEWCVAFV.js.map +1 -0
  52. package/dist/{chunk-H27DIXOV.js → chunk-FJGNYSB3.js} +6 -6
  53. package/dist/{chunk-OBPL43F3.js → chunk-FKLKAO2C.js} +54 -7
  54. package/dist/chunk-FKLKAO2C.js.map +1 -0
  55. package/dist/{chunk-PENPHA45.js → chunk-FX3UIDCS.js} +2 -2
  56. package/dist/{chunk-H3SEW5HB.js → chunk-G3ZMEUWD.js} +7 -7
  57. package/dist/{chunk-ZAZW5LLF.js → chunk-GCTZNHDO.js} +2 -2
  58. package/dist/{chunk-D5EXZVQC.js → chunk-GDYDYUO7.js} +6 -6
  59. package/dist/{chunk-47F6AI2K.js → chunk-GU5XWSH4.js} +3 -3
  60. package/dist/{chunk-6ZGDIN2D.js → chunk-H6J6MZ4J.js} +3 -3
  61. package/dist/{chunk-ZUDIY7YP.js → chunk-HMS3OCMA.js} +7 -7
  62. package/dist/{chunk-H6K24KLL.js → chunk-HUAAYTVS.js} +4 -4
  63. package/dist/{chunk-2DFE4TUE.js → chunk-HUDP5NSI.js} +4 -4
  64. package/dist/{chunk-VKYEEJJ2.js → chunk-HWJZCZSI.js} +2 -2
  65. package/dist/{chunk-NB2CKJ27.js → chunk-ICGLT356.js} +2 -2
  66. package/dist/{chunk-CW3VJARJ.js → chunk-IYXP6OR5.js} +3 -3
  67. package/dist/{chunk-A5YEUQOY.js → chunk-JSJS7RHS.js} +2 -2
  68. package/dist/{chunk-NHXIFF4Y.js → chunk-K6J7JKZM.js} +7 -7
  69. package/dist/{chunk-LLLSK7UQ.js → chunk-K7HPGV5K.js} +2 -2
  70. package/dist/{chunk-F3BICEMK.js → chunk-KC3S3OH6.js} +2 -2
  71. package/dist/{chunk-HZIIDYJV.js → chunk-KEMD6B3W.js} +4 -4
  72. package/dist/{chunk-SRR22EW2.js → chunk-L34HKPIS.js} +8 -8
  73. package/dist/{chunk-AGETRKC5.js → chunk-LG2P6S32.js} +3 -3
  74. package/dist/{chunk-FUIG7QSS.js → chunk-LT26SRU5.js} +4 -4
  75. package/dist/{chunk-6QMOJTC6.js → chunk-LTC77D4V.js} +2 -2
  76. package/dist/{chunk-QTWWZ25B.js → chunk-LU2HAOVP.js} +18 -14
  77. package/dist/chunk-LU2HAOVP.js.map +1 -0
  78. package/dist/{chunk-QMJI5VHV.js → chunk-M3XEJJDE.js} +2 -2
  79. package/dist/{chunk-VWPJX5B3.js → chunk-MGIAYREB.js} +5 -5
  80. package/dist/{chunk-VYLC5KAT.js → chunk-MLTGIDNB.js} +2 -2
  81. package/dist/{chunk-L2YYIQYR.js → chunk-MXJMCTSI.js} +2 -2
  82. package/dist/{chunk-F5IFR56V.js → chunk-NFARMKWK.js} +34 -12
  83. package/dist/chunk-NFARMKWK.js.map +1 -0
  84. package/dist/{chunk-IUQPNAGR.js → chunk-NK7DO6A2.js} +3 -3
  85. package/dist/{chunk-TKLQWOTY.js → chunk-NKND2IMW.js} +2 -2
  86. package/dist/{chunk-WUNRUSBJ.js → chunk-NSZGZYZL.js} +13 -3
  87. package/dist/{chunk-WUNRUSBJ.js.map → chunk-NSZGZYZL.js.map} +1 -1
  88. package/dist/{chunk-XPTYXXMD.js → chunk-NUHIPODK.js} +2 -2
  89. package/dist/{chunk-REKDM67V.js → chunk-ODGV6Q6U.js} +2 -2
  90. package/dist/{chunk-WRGNEAUZ.js → chunk-OJYLLNQN.js} +2 -2
  91. package/dist/{chunk-NCAMIRFB.js → chunk-OQT3G55N.js} +2 -2
  92. package/dist/{chunk-BPLSGN4X.js → chunk-PORGC5MH.js} +2 -2
  93. package/dist/{chunk-BFNBYT62.js → chunk-PRBJ4BJD.js} +2 -2
  94. package/dist/{chunk-4IPP2P74.js → chunk-PU5PNTE2.js} +2 -2
  95. package/dist/{chunk-L3AM6EGU.js → chunk-PZEDIO72.js} +7 -7
  96. package/dist/{chunk-M7VSXBUL.js → chunk-RTBCWDJ3.js} +10 -10
  97. package/dist/{chunk-OTHHO3KI.js → chunk-S2I5MYSA.js} +2 -2
  98. package/dist/{chunk-FHEVZQQY.js → chunk-S447GUNV.js} +4 -4
  99. package/dist/{chunk-WKT7NNNR.js → chunk-SP3AFEB7.js} +4 -4
  100. package/dist/{chunk-KMGAFLCK.js → chunk-SQWXF2HP.js} +5 -5
  101. package/dist/{chunk-HRSEAGLI.js → chunk-TTGZ6KGY.js} +3 -3
  102. package/dist/{chunk-MQFKH3ZJ.js → chunk-UHFF4G53.js} +3 -3
  103. package/dist/{chunk-IGNJOJEP.js → chunk-UJ4Z67UQ.js} +2 -2
  104. package/dist/chunk-UJ4Z67UQ.js.map +1 -0
  105. package/dist/{chunk-FGZ7GJXO.js → chunk-VZEBHQRT.js} +3 -3
  106. package/dist/{chunk-HUEG3YP4.js → chunk-VZHEFFUO.js} +97 -82
  107. package/dist/chunk-VZHEFFUO.js.map +1 -0
  108. package/dist/{chunk-OIW75CLW.js → chunk-WN377AAV.js} +6 -6
  109. package/dist/{chunk-ESXVNASI.js → chunk-XCNYOVFV.js} +5 -5
  110. package/dist/{chunk-FFESJQ5A.js → chunk-YEEV4ZXL.js} +95 -32
  111. package/dist/chunk-YEEV4ZXL.js.map +1 -0
  112. package/dist/{chunk-YOMI3ZCA.js → chunk-YIC34H3M.js} +2 -2
  113. package/dist/{chunk-MBZFAJKM.js → chunk-YZWRJRMF.js} +6 -2
  114. package/dist/chunk-YZWRJRMF.js.map +1 -0
  115. package/dist/{chunk-GWJJ5CK3.js → chunk-Z45PK2H5.js} +5 -5
  116. package/dist/{chunk-RT7CWTUG.js → chunk-ZI43U6FN.js} +6 -6
  117. package/dist/{chunk-WFC2GHJG.js → chunk-ZJJ46LNY.js} +3 -3
  118. package/dist/{chunk-3ENNPCIW.js → chunk-ZY6P7M52.js} +2 -2
  119. package/dist/classified/index.js +5 -5
  120. package/dist/{classified-marker-EPL2NX3H.js → classified-marker-DLLGRRXG.js} +3 -3
  121. package/dist/collection-facade-OHBCHCJV.js +45 -0
  122. package/dist/{computed-UXN4AMI5.js → computed-X2RKYFGX.js} +3 -3
  123. package/dist/consent/index.js +9 -9
  124. package/dist/cover/index.js +9 -9
  125. package/dist/custody/index.js +12 -11
  126. package/dist/{dead-filter-56AYTNAO.js → dead-filter-CCLDPNTJ.js} +2 -2
  127. package/dist/debug/index.js +1 -1
  128. package/dist/{delegation-MCCWCFZA.js → delegation-OSXUSSUO.js} +11 -11
  129. package/dist/derivations/index.js +12 -12
  130. package/dist/derive-6K35IOIN.js +22 -0
  131. package/dist/directory/index.js +10 -10
  132. package/dist/{dispatch-JM7X5BLP.js → dispatch-HCCQPOC7.js} +9 -6
  133. package/dist/dispatch-HCCQPOC7.js.map +1 -0
  134. package/dist/{dispatch-UPZW4MAO.js → dispatch-TRXQIBLA.js} +18 -18
  135. package/dist/{enclave-CCXI3WEU.js → enclave-K33BCSHB.js} +13 -9
  136. package/dist/executor-44ONIZTV.js +9 -0
  137. package/dist/executor-H7KLBIJN.js +9 -0
  138. package/dist/executor-PDK7IAPQ.js +29 -0
  139. package/dist/export-accessible-2LJH6JTI.js +23 -0
  140. package/dist/extract-partition-QQFOPCJ6.js +38 -0
  141. package/dist/{fanout-sidecar-2EHAV6UP.js → fanout-sidecar-ORVUHI3J.js} +9 -9
  142. package/dist/find-H6GHRBNL.js +11 -0
  143. package/dist/forget/index.js +9 -9
  144. package/dist/guards/index.js +4 -4
  145. package/dist/history/index.js +13 -13
  146. package/dist/i18n/index.js +14 -14
  147. package/dist/index.d.ts +1 -1
  148. package/dist/index.js +93 -91
  149. package/dist/index.js.map +1 -1
  150. package/dist/indexing/index.js +2 -2
  151. package/dist/introspection/index.js +11 -11
  152. package/dist/issue-LV2IWCKY.js +19 -0
  153. package/dist/kernel/collection.d.ts +8 -2
  154. package/dist/kernel/constants.d.ts +18 -0
  155. package/dist/kernel/enclave/crypto.d.ts +28 -0
  156. package/dist/kernel/enclave/index.d.ts +2 -2
  157. package/dist/kernel/enclave/record-keys/rekey.d.ts +23 -0
  158. package/dist/kernel/errors.d.ts +41 -0
  159. package/dist/kernel/refs.d.ts +3 -1
  160. package/dist/kernel/tier-visibility.d.ts +19 -0
  161. package/dist/kernel/types.d.ts +1 -1
  162. package/dist/kernel/via/reconcile.d.ts +12 -0
  163. package/dist/{ledger-TZIDVW22.js → ledger-RM5672K4.js} +11 -11
  164. package/dist/liberate-PNPIQ45H.js +25 -0
  165. package/dist/{link-set-VOMRQB2H.js → link-set-AZ6VDH5X.js} +11 -11
  166. package/dist/{managed-secret-N6FWB5LX.js → managed-secret-QZKTYCLD.js} +10 -10
  167. package/dist/materialized-views/index.js +20 -20
  168. package/dist/{migrate-cek-UEO2EUWI.js → migrate-cek-BVAPYJ5T.js} +2 -2
  169. package/dist/money/index.js +4 -4
  170. package/dist/noydb-QZN7G26J.js +85 -0
  171. package/dist/overlay-views/index.js +4 -4
  172. package/dist/periods/index.js +12 -12
  173. package/dist/pod/index.js +56 -55
  174. package/dist/{pod-handle-D6ZRTO4N.js → pod-handle-LVSMK4XC.js} +9 -9
  175. package/dist/policy/index.js +10 -10
  176. package/dist/portability/index.js +8 -8
  177. package/dist/{post-register-XVGHYYSB.js → post-register-TZGQ34YR.js} +6 -6
  178. package/dist/query/index.js +3 -3
  179. package/dist/reduce/index.js +4 -4
  180. package/dist/register-IQJGJSQQ.js +32 -0
  181. package/dist/registry-3JY3YSMU.js +9 -0
  182. package/dist/registry-G365BQDC.js +19 -0
  183. package/dist/registry-HVS6PGHV.js +9 -0
  184. package/dist/registry-TQ5FRB4T.js +18 -0
  185. package/dist/request-withdrawal-XQCCKMB3.js +31 -0
  186. package/dist/{reveal-Z62PLVJT.js → reveal-5PXWDCLZ.js} +6 -6
  187. package/dist/revoke-6NSQWTED.js +24 -0
  188. package/dist/satellites/index.js +1 -1
  189. package/dist/schema-update/index.js +2 -2
  190. package/dist/sealed-record/index.js +12 -12
  191. package/dist/search/index.js +4 -4
  192. package/dist/{seed-R2JK2YQK.js → seed-ZLOK3Z4M.js} +12 -11
  193. package/dist/{seed-R2JK2YQK.js.map → seed-ZLOK3Z4M.js.map} +1 -1
  194. package/dist/sequence/index.js +9 -9
  195. package/dist/session/index.js +9 -9
  196. package/dist/shadow/index.js +2 -2
  197. package/dist/signer-AJ3MCSPI.js +25 -0
  198. package/dist/snapshots/index.js +10 -10
  199. package/dist/{stale-FVK3WRMM.js → stale-KQR5QAYJ.js} +10 -10
  200. package/dist/storage-GACYAH6W.js +23 -0
  201. package/dist/{store-coordination-provider-HIPOZMC2.js → store-coordination-provider-RII4H3PJ.js} +10 -10
  202. package/dist/sync/index.js +10 -10
  203. package/dist/team/index.js +15 -15
  204. package/dist/tiers/index.js +11 -11
  205. package/dist/to/index.js +1 -1
  206. package/dist/transactions/index.js +3 -3
  207. package/dist/util/index.js +1 -1
  208. package/dist/vault-head/index.js +8 -8
  209. package/dist/{verify-KYICK5IW.js → verify-OMPYUO7C.js} +5 -5
  210. package/dist/via/blob/index.d.ts +3 -0
  211. package/dist/walk-ZYC74R65.js +21 -0
  212. package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +4 -0
  213. package/dist/with-formula/materialized-views/projection-legs.d.ts +59 -0
  214. package/dist/with-formula/materialized-views/registry.d.ts +50 -0
  215. package/dist/with-formula/materialized-views/types.d.ts +68 -10
  216. package/dist/with-party/team/roster-tag.d.ts +1 -1
  217. package/dist/with-shape/blobs/blob-compaction.d.ts +13 -0
  218. package/dist/with-shape/blobs/blob-set.d.ts +23 -3
  219. package/dist/with-shape/blobs/orphan-report.d.ts +62 -0
  220. package/dist/withdraw-accessible-MEFFAGRD.js +28 -0
  221. package/package.json +3 -3
  222. package/dist/api-D6DBNTOS.js +0 -20
  223. package/dist/chunk-A66LJYFG.js.map +0 -1
  224. package/dist/chunk-DIVPOJPV.js.map +0 -1
  225. package/dist/chunk-F5IFR56V.js.map +0 -1
  226. package/dist/chunk-FFESJQ5A.js.map +0 -1
  227. package/dist/chunk-HUEG3YP4.js.map +0 -1
  228. package/dist/chunk-IGNJOJEP.js.map +0 -1
  229. package/dist/chunk-JSTQGUE5.js.map +0 -1
  230. package/dist/chunk-MBZFAJKM.js.map +0 -1
  231. package/dist/chunk-O5QXH7U7.js.map +0 -1
  232. package/dist/chunk-OBPL43F3.js.map +0 -1
  233. package/dist/chunk-PKUJ3JLQ.js.map +0 -1
  234. package/dist/chunk-PNXJV4OS.js.map +0 -1
  235. package/dist/chunk-QTWWZ25B.js.map +0 -1
  236. package/dist/chunk-XZZIZ544.js.map +0 -1
  237. package/dist/collection-facade-3DN4ETEP.js +0 -45
  238. package/dist/derive-BSAF6N5X.js +0 -22
  239. package/dist/dispatch-JM7X5BLP.js.map +0 -1
  240. package/dist/executor-6YQYFGHK.js +0 -9
  241. package/dist/executor-GLKPMISJ.js +0 -9
  242. package/dist/executor-ZEIX7Y7I.js +0 -29
  243. package/dist/export-accessible-SDIQEFHQ.js +0 -23
  244. package/dist/extract-partition-K232SO2V.js +0 -38
  245. package/dist/find-GKFC5753.js +0 -11
  246. package/dist/issue-QTQYQJCB.js +0 -19
  247. package/dist/liberate-FOK7RFYQ.js +0 -24
  248. package/dist/noydb-3BBLBSHI.js +0 -84
  249. package/dist/register-FVUE46K4.js +0 -32
  250. package/dist/registry-7PBVHSD5.js +0 -19
  251. package/dist/registry-CCXD57GV.js +0 -18
  252. package/dist/registry-K75FRKSU.js +0 -9
  253. package/dist/registry-KZYPKIOF.js +0 -9
  254. package/dist/request-withdrawal-WS7PXD7B.js +0 -31
  255. package/dist/revoke-JH4VQTJ3.js +0 -24
  256. package/dist/signer-AFV6AXSN.js +0 -25
  257. package/dist/storage-EIM5HO2O.js +0 -23
  258. package/dist/walk-FV6JFWXV.js +0 -21
  259. package/dist/withdraw-accessible-JYX3SPVY.js +0 -28
  260. /package/dist/{api-D6DBNTOS.js.map → api-56KUWV6E.js.map} +0 -0
  261. /package/dist/{backup-4PZAH67W.js.map → backup-WLKPDY3V.js.map} +0 -0
  262. /package/dist/{chunk-4RZTW5JH.js.map → chunk-25HI46CB.js.map} +0 -0
  263. /package/dist/{chunk-PWK3SSNB.js.map → chunk-264AKW4K.js.map} +0 -0
  264. /package/dist/{chunk-7LJA7T4W.js.map → chunk-2CURJCLC.js.map} +0 -0
  265. /package/dist/{chunk-YF3CIA6E.js.map → chunk-2D5NXYWY.js.map} +0 -0
  266. /package/dist/{chunk-REQJLII3.js.map → chunk-2MYYXXVM.js.map} +0 -0
  267. /package/dist/{chunk-DIYI32MG.js.map → chunk-2S6HROLU.js.map} +0 -0
  268. /package/dist/{chunk-23XKHFNT.js.map → chunk-2ZSBPXFW.js.map} +0 -0
  269. /package/dist/{chunk-BXHG26KN.js.map → chunk-35K4VWMD.js.map} +0 -0
  270. /package/dist/{chunk-UQUWSM33.js.map → chunk-4P3OG2AO.js.map} +0 -0
  271. /package/dist/{chunk-KYUKZIW5.js.map → chunk-4Y7VHLCT.js.map} +0 -0
  272. /package/dist/{chunk-RJYPFCID.js.map → chunk-576CTQ77.js.map} +0 -0
  273. /package/dist/{chunk-OCW3IM2F.js.map → chunk-57MEX4LL.js.map} +0 -0
  274. /package/dist/{chunk-4O52JH3C.js.map → chunk-65WBEFVT.js.map} +0 -0
  275. /package/dist/{chunk-7JOXCSDU.js.map → chunk-6PLCNLBC.js.map} +0 -0
  276. /package/dist/{chunk-QK2QAMF7.js.map → chunk-ACIEKVFR.js.map} +0 -0
  277. /package/dist/{chunk-JPVJTTHU.js.map → chunk-AKPIBKHK.js.map} +0 -0
  278. /package/dist/{chunk-AELW6OJZ.js.map → chunk-AM6V36AG.js.map} +0 -0
  279. /package/dist/{chunk-DUUARUZI.js.map → chunk-AU45F5FD.js.map} +0 -0
  280. /package/dist/{chunk-4BYZIQ5T.js.map → chunk-BZKQRED6.js.map} +0 -0
  281. /package/dist/{chunk-OZ5QBLEL.js.map → chunk-C3FCXXNI.js.map} +0 -0
  282. /package/dist/{chunk-FKZI4NSG.js.map → chunk-C4DFJ76X.js.map} +0 -0
  283. /package/dist/{chunk-PGHSH4TY.js.map → chunk-CDHX3SRW.js.map} +0 -0
  284. /package/dist/{chunk-VMYXYFPX.js.map → chunk-DBPQUICN.js.map} +0 -0
  285. /package/dist/{chunk-3TWEXEKX.js.map → chunk-DL7NXFAY.js.map} +0 -0
  286. /package/dist/{chunk-2VMCJUK6.js.map → chunk-DM2BZDNV.js.map} +0 -0
  287. /package/dist/{chunk-FFSQFH6D.js.map → chunk-DNKVKO7K.js.map} +0 -0
  288. /package/dist/{chunk-IPA6ODWG.js.map → chunk-E2LYQUB7.js.map} +0 -0
  289. /package/dist/{chunk-ANYVM4SX.js.map → chunk-ENTVT7PF.js.map} +0 -0
  290. /package/dist/{chunk-M3FKPVOU.js.map → chunk-ESP4K32V.js.map} +0 -0
  291. /package/dist/{chunk-H27DIXOV.js.map → chunk-FJGNYSB3.js.map} +0 -0
  292. /package/dist/{chunk-PENPHA45.js.map → chunk-FX3UIDCS.js.map} +0 -0
  293. /package/dist/{chunk-H3SEW5HB.js.map → chunk-G3ZMEUWD.js.map} +0 -0
  294. /package/dist/{chunk-ZAZW5LLF.js.map → chunk-GCTZNHDO.js.map} +0 -0
  295. /package/dist/{chunk-D5EXZVQC.js.map → chunk-GDYDYUO7.js.map} +0 -0
  296. /package/dist/{chunk-47F6AI2K.js.map → chunk-GU5XWSH4.js.map} +0 -0
  297. /package/dist/{chunk-6ZGDIN2D.js.map → chunk-H6J6MZ4J.js.map} +0 -0
  298. /package/dist/{chunk-ZUDIY7YP.js.map → chunk-HMS3OCMA.js.map} +0 -0
  299. /package/dist/{chunk-H6K24KLL.js.map → chunk-HUAAYTVS.js.map} +0 -0
  300. /package/dist/{chunk-2DFE4TUE.js.map → chunk-HUDP5NSI.js.map} +0 -0
  301. /package/dist/{chunk-VKYEEJJ2.js.map → chunk-HWJZCZSI.js.map} +0 -0
  302. /package/dist/{chunk-NB2CKJ27.js.map → chunk-ICGLT356.js.map} +0 -0
  303. /package/dist/{chunk-CW3VJARJ.js.map → chunk-IYXP6OR5.js.map} +0 -0
  304. /package/dist/{chunk-A5YEUQOY.js.map → chunk-JSJS7RHS.js.map} +0 -0
  305. /package/dist/{chunk-NHXIFF4Y.js.map → chunk-K6J7JKZM.js.map} +0 -0
  306. /package/dist/{chunk-LLLSK7UQ.js.map → chunk-K7HPGV5K.js.map} +0 -0
  307. /package/dist/{chunk-F3BICEMK.js.map → chunk-KC3S3OH6.js.map} +0 -0
  308. /package/dist/{chunk-HZIIDYJV.js.map → chunk-KEMD6B3W.js.map} +0 -0
  309. /package/dist/{chunk-SRR22EW2.js.map → chunk-L34HKPIS.js.map} +0 -0
  310. /package/dist/{chunk-AGETRKC5.js.map → chunk-LG2P6S32.js.map} +0 -0
  311. /package/dist/{chunk-FUIG7QSS.js.map → chunk-LT26SRU5.js.map} +0 -0
  312. /package/dist/{chunk-6QMOJTC6.js.map → chunk-LTC77D4V.js.map} +0 -0
  313. /package/dist/{chunk-QMJI5VHV.js.map → chunk-M3XEJJDE.js.map} +0 -0
  314. /package/dist/{chunk-VWPJX5B3.js.map → chunk-MGIAYREB.js.map} +0 -0
  315. /package/dist/{chunk-VYLC5KAT.js.map → chunk-MLTGIDNB.js.map} +0 -0
  316. /package/dist/{chunk-L2YYIQYR.js.map → chunk-MXJMCTSI.js.map} +0 -0
  317. /package/dist/{chunk-IUQPNAGR.js.map → chunk-NK7DO6A2.js.map} +0 -0
  318. /package/dist/{chunk-TKLQWOTY.js.map → chunk-NKND2IMW.js.map} +0 -0
  319. /package/dist/{chunk-XPTYXXMD.js.map → chunk-NUHIPODK.js.map} +0 -0
  320. /package/dist/{chunk-REKDM67V.js.map → chunk-ODGV6Q6U.js.map} +0 -0
  321. /package/dist/{chunk-WRGNEAUZ.js.map → chunk-OJYLLNQN.js.map} +0 -0
  322. /package/dist/{chunk-NCAMIRFB.js.map → chunk-OQT3G55N.js.map} +0 -0
  323. /package/dist/{chunk-BPLSGN4X.js.map → chunk-PORGC5MH.js.map} +0 -0
  324. /package/dist/{chunk-BFNBYT62.js.map → chunk-PRBJ4BJD.js.map} +0 -0
  325. /package/dist/{chunk-4IPP2P74.js.map → chunk-PU5PNTE2.js.map} +0 -0
  326. /package/dist/{chunk-L3AM6EGU.js.map → chunk-PZEDIO72.js.map} +0 -0
  327. /package/dist/{chunk-M7VSXBUL.js.map → chunk-RTBCWDJ3.js.map} +0 -0
  328. /package/dist/{chunk-OTHHO3KI.js.map → chunk-S2I5MYSA.js.map} +0 -0
  329. /package/dist/{chunk-FHEVZQQY.js.map → chunk-S447GUNV.js.map} +0 -0
  330. /package/dist/{chunk-WKT7NNNR.js.map → chunk-SP3AFEB7.js.map} +0 -0
  331. /package/dist/{chunk-KMGAFLCK.js.map → chunk-SQWXF2HP.js.map} +0 -0
  332. /package/dist/{chunk-HRSEAGLI.js.map → chunk-TTGZ6KGY.js.map} +0 -0
  333. /package/dist/{chunk-MQFKH3ZJ.js.map → chunk-UHFF4G53.js.map} +0 -0
  334. /package/dist/{chunk-FGZ7GJXO.js.map → chunk-VZEBHQRT.js.map} +0 -0
  335. /package/dist/{chunk-OIW75CLW.js.map → chunk-WN377AAV.js.map} +0 -0
  336. /package/dist/{chunk-ESXVNASI.js.map → chunk-XCNYOVFV.js.map} +0 -0
  337. /package/dist/{chunk-YOMI3ZCA.js.map → chunk-YIC34H3M.js.map} +0 -0
  338. /package/dist/{chunk-GWJJ5CK3.js.map → chunk-Z45PK2H5.js.map} +0 -0
  339. /package/dist/{chunk-RT7CWTUG.js.map → chunk-ZI43U6FN.js.map} +0 -0
  340. /package/dist/{chunk-WFC2GHJG.js.map → chunk-ZJJ46LNY.js.map} +0 -0
  341. /package/dist/{chunk-3ENNPCIW.js.map → chunk-ZY6P7M52.js.map} +0 -0
  342. /package/dist/{classified-marker-EPL2NX3H.js.map → classified-marker-DLLGRRXG.js.map} +0 -0
  343. /package/dist/{collection-facade-3DN4ETEP.js.map → collection-facade-OHBCHCJV.js.map} +0 -0
  344. /package/dist/{computed-UXN4AMI5.js.map → computed-X2RKYFGX.js.map} +0 -0
  345. /package/dist/{dead-filter-56AYTNAO.js.map → dead-filter-CCLDPNTJ.js.map} +0 -0
  346. /package/dist/{delegation-MCCWCFZA.js.map → delegation-OSXUSSUO.js.map} +0 -0
  347. /package/dist/{derive-BSAF6N5X.js.map → derive-6K35IOIN.js.map} +0 -0
  348. /package/dist/{dispatch-UPZW4MAO.js.map → dispatch-TRXQIBLA.js.map} +0 -0
  349. /package/dist/{enclave-CCXI3WEU.js.map → enclave-K33BCSHB.js.map} +0 -0
  350. /package/dist/{executor-6YQYFGHK.js.map → executor-44ONIZTV.js.map} +0 -0
  351. /package/dist/{executor-GLKPMISJ.js.map → executor-H7KLBIJN.js.map} +0 -0
  352. /package/dist/{executor-ZEIX7Y7I.js.map → executor-PDK7IAPQ.js.map} +0 -0
  353. /package/dist/{export-accessible-SDIQEFHQ.js.map → export-accessible-2LJH6JTI.js.map} +0 -0
  354. /package/dist/{extract-partition-K232SO2V.js.map → extract-partition-QQFOPCJ6.js.map} +0 -0
  355. /package/dist/{fanout-sidecar-2EHAV6UP.js.map → fanout-sidecar-ORVUHI3J.js.map} +0 -0
  356. /package/dist/{find-GKFC5753.js.map → find-H6GHRBNL.js.map} +0 -0
  357. /package/dist/{issue-QTQYQJCB.js.map → issue-LV2IWCKY.js.map} +0 -0
  358. /package/dist/{ledger-TZIDVW22.js.map → ledger-RM5672K4.js.map} +0 -0
  359. /package/dist/{liberate-FOK7RFYQ.js.map → liberate-PNPIQ45H.js.map} +0 -0
  360. /package/dist/{link-set-VOMRQB2H.js.map → link-set-AZ6VDH5X.js.map} +0 -0
  361. /package/dist/{managed-secret-N6FWB5LX.js.map → managed-secret-QZKTYCLD.js.map} +0 -0
  362. /package/dist/{migrate-cek-UEO2EUWI.js.map → migrate-cek-BVAPYJ5T.js.map} +0 -0
  363. /package/dist/{noydb-3BBLBSHI.js.map → noydb-QZN7G26J.js.map} +0 -0
  364. /package/dist/{pod-handle-D6ZRTO4N.js.map → pod-handle-LVSMK4XC.js.map} +0 -0
  365. /package/dist/{post-register-XVGHYYSB.js.map → post-register-TZGQ34YR.js.map} +0 -0
  366. /package/dist/{register-FVUE46K4.js.map → register-IQJGJSQQ.js.map} +0 -0
  367. /package/dist/{registry-7PBVHSD5.js.map → registry-3JY3YSMU.js.map} +0 -0
  368. /package/dist/{registry-CCXD57GV.js.map → registry-G365BQDC.js.map} +0 -0
  369. /package/dist/{registry-K75FRKSU.js.map → registry-HVS6PGHV.js.map} +0 -0
  370. /package/dist/{registry-KZYPKIOF.js.map → registry-TQ5FRB4T.js.map} +0 -0
  371. /package/dist/{request-withdrawal-WS7PXD7B.js.map → request-withdrawal-XQCCKMB3.js.map} +0 -0
  372. /package/dist/{reveal-Z62PLVJT.js.map → reveal-5PXWDCLZ.js.map} +0 -0
  373. /package/dist/{revoke-JH4VQTJ3.js.map → revoke-6NSQWTED.js.map} +0 -0
  374. /package/dist/{signer-AFV6AXSN.js.map → signer-AJ3MCSPI.js.map} +0 -0
  375. /package/dist/{stale-FVK3WRMM.js.map → stale-KQR5QAYJ.js.map} +0 -0
  376. /package/dist/{storage-EIM5HO2O.js.map → storage-GACYAH6W.js.map} +0 -0
  377. /package/dist/{store-coordination-provider-HIPOZMC2.js.map → store-coordination-provider-RII4H3PJ.js.map} +0 -0
  378. /package/dist/{verify-KYICK5IW.js.map → verify-OMPYUO7C.js.map} +0 -0
  379. /package/dist/{walk-FV6JFWXV.js.map → walk-ZYC74R65.js.map} +0 -0
  380. /package/dist/{withdraw-accessible-JYX3SPVY.js.map → withdraw-accessible-MEFFAGRD.js.map} +0 -0
@@ -3,22 +3,22 @@ import {
3
3
  } from "./chunk-EPFF7LOX.js";
4
4
  import {
5
5
  loadFence
6
- } from "./chunk-FFSQFH6D.js";
6
+ } from "./chunk-DNKVKO7K.js";
7
7
  import {
8
8
  SCHEMAS_COLLECTION,
9
9
  loadPersistedSchema
10
- } from "./chunk-JPVJTTHU.js";
10
+ } from "./chunk-AKPIBKHK.js";
11
11
  import {
12
12
  canonicalJson,
13
13
  sha256Hex
14
- } from "./chunk-47F6AI2K.js";
14
+ } from "./chunk-GU5XWSH4.js";
15
15
  import {
16
16
  openEnvelopeJson,
17
17
  writeEnvelopeBody
18
- } from "./chunk-DIVPOJPV.js";
18
+ } from "./chunk-43FOH2OK.js";
19
19
  import {
20
20
  buildSealedRecordEnvelope
21
- } from "./chunk-PENPHA45.js";
21
+ } from "./chunk-FX3UIDCS.js";
22
22
 
23
23
  // src/with-shape/manifest/types.ts
24
24
  var MANIFEST_SCHEMA_RECORD_ID = "schema";
@@ -86,4 +86,4 @@ export {
86
86
  saveSchemaManifest,
87
87
  deriveSchemaManifest
88
88
  };
89
- //# sourceMappingURL=chunk-OIW75CLW.js.map
89
+ //# sourceMappingURL=chunk-WN377AAV.js.map
@@ -5,7 +5,7 @@ import {
5
5
  buildStringFieldEntries,
6
6
  extractSnippet,
7
7
  searchScan
8
- } from "./chunk-QK2QAMF7.js";
8
+ } from "./chunk-ACIEKVFR.js";
9
9
  import {
10
10
  fuseRetrieval
11
11
  } from "./chunk-AURFOK3D.js";
@@ -13,14 +13,14 @@ import {
13
13
  getAtPath,
14
14
  isStaticDictDescriptor,
15
15
  stripI18nFilled
16
- } from "./chunk-CW3VJARJ.js";
16
+ } from "./chunk-IYXP6OR5.js";
17
17
  import {
18
18
  liveRecordIsElevated
19
- } from "./chunk-WUNRUSBJ.js";
19
+ } from "./chunk-NSZGZYZL.js";
20
20
  import {
21
21
  EmbeddingDimMismatchError,
22
22
  EmbeddingModelMismatchError
23
- } from "./chunk-PKUJ3JLQ.js";
23
+ } from "./chunk-5OFC3QYL.js";
24
24
 
25
25
  // src/with-lookup/embeddings/cosine.ts
26
26
  function cosine(a, b) {
@@ -394,4 +394,4 @@ export {
394
394
  rebuildEmbeddings,
395
395
  syncTierSearch
396
396
  };
397
- //# sourceMappingURL=chunk-ESXVNASI.js.map
397
+ //# sourceMappingURL=chunk-XCNYOVFV.js.map
@@ -5,14 +5,18 @@ import {
5
5
  readDirectoryConfig,
6
6
  readUserVisibility,
7
7
  saveUserEnvelope
8
- } from "./chunk-KMGAFLCK.js";
8
+ } from "./chunk-SQWXF2HP.js";
9
9
  import {
10
+ parseDekKey
11
+ } from "./chunk-NSZGZYZL.js";
12
+ import {
13
+ envelopeOpensUnderAny,
10
14
  rekeyBlobSet,
11
15
  rekeyEnvelopeIfNeeded
12
- } from "./chunk-DIVPOJPV.js";
16
+ } from "./chunk-43FOH2OK.js";
13
17
  import {
14
18
  buildRecordEnvelope
15
- } from "./chunk-PENPHA45.js";
19
+ } from "./chunk-FX3UIDCS.js";
16
20
  import {
17
21
  base64ToBuffer,
18
22
  bufferToBase64,
@@ -27,11 +31,12 @@ import {
27
31
  generateSalt,
28
32
  unwrapKey,
29
33
  wrapKey
30
- } from "./chunk-O5QXH7U7.js";
34
+ } from "./chunk-D7STIWJO.js";
31
35
  import {
32
36
  NOYDB_KEYRING_VERSION
33
- } from "./chunk-IGNJOJEP.js";
37
+ } from "./chunk-UJ4Z67UQ.js";
34
38
  import {
39
+ BLOB_ADDRESS_KEY_ID,
35
40
  DirectoryDisabledError,
36
41
  EchoCeremonyRequiredError,
37
42
  InvalidKeyError,
@@ -46,7 +51,7 @@ import {
46
51
  USER_ENVELOPE_COLLECTION,
47
52
  ValidationError,
48
53
  WrongPromptError
49
- } from "./chunk-PKUJ3JLQ.js";
54
+ } from "./chunk-5OFC3QYL.js";
50
55
 
51
56
  // src/with-party/team/roster-tag.ts
52
57
  function stable(value) {
@@ -63,6 +68,25 @@ function rosterCanonical(file) {
63
68
  role: file.role,
64
69
  permissions: file.permissions,
65
70
  granted_by: file.granted_by,
71
+ // #1115 — WHICH collections this keyring holds a key for, authenticated.
72
+ //
73
+ // `revoke` derives its rotation scope from `Object.keys(target.deks)`, so
74
+ // while this set was unauthenticated a store could strip entries from the
75
+ // target's file and have those collections silently skipped by the
76
+ // rotation — leaving a revoked member, colluding with that store, holding
77
+ // live DEKs for exactly the collections it removed. That directly
78
+ // contradicts `SECURITY.md`'s "the rotation cannot be skipped".
79
+ //
80
+ // NAMES ONLY, deliberately. The wrapped values are AES-KW, which is
81
+ // self-authenticating: a tampered wrap fails to unwrap. What was
82
+ // unprotected is the SHAPE of the map, not its contents.
83
+ //
84
+ // `pending_deks` is bound for the same reason one field over: stripping it
85
+ // makes an interrupted rotation mint a fresh DEK instead of resuming,
86
+ // permanently orphaning every record already rewritten under the pending
87
+ // key (#1074). Leaving it out would recreate the identical hole.
88
+ dek_slots: Object.keys(file.deks ?? {}).sort(),
89
+ pending_dek_slots: Object.keys(file.pending_deks ?? {}).sort(),
66
90
  expires_at: file.expires_at ?? null,
67
91
  export_capability: file.export_capability ?? null,
68
92
  import_capability: file.import_capability ?? null
@@ -88,12 +112,14 @@ async function assertRosterAuthenticated(file, deks, userId) {
88
112
  }
89
113
  async function assertRosterTagValid(file, rosterKey, userId) {
90
114
  if (!await verifyRosterTag(file, file.roster_tag, rosterKey)) {
91
- throw new KeyringTamperedError({
92
- userId,
93
- reason: file.roster_tag == null ? "roster-tag-missing" : "roster-tag-mismatch"
94
- });
115
+ throw new KeyringTamperedError({ userId, reason: mismatchReason(file) });
95
116
  }
96
117
  }
118
+ function mismatchReason(file) {
119
+ if (file.roster_tag == null) return "roster-tag-missing";
120
+ if (file._noydb_keyring !== NOYDB_KEYRING_VERSION) return "format-superseded";
121
+ return "roster-tag-mismatch";
122
+ }
97
123
 
98
124
  // src/kernel/validation.ts
99
125
  var WeakSecretError = class extends NoydbError {
@@ -478,6 +504,8 @@ async function createOwnerKeyring(store, vault, opts) {
478
504
  const wrappedUserEnvelopeDek = await wrapKey(userEnvelopeDek, kek);
479
505
  const rosterKey = await generateDEK();
480
506
  const wrappedRosterKey = await wrapKey(rosterKey, kek);
507
+ const blobAddressKey = await generateDEK();
508
+ const wrappedBlobAddressKey = await wrapKey(blobAddressKey, kek);
481
509
  const canary = await mintKeyringCanary(kek);
482
510
  const authority = {
483
511
  user_id: userId,
@@ -486,17 +514,21 @@ async function createOwnerKeyring(store, vault, opts) {
486
514
  permissions: {},
487
515
  granted_by: userId
488
516
  };
489
- const keyringFile = {
490
- _noydb_keyring: NOYDB_KEYRING_VERSION,
517
+ const authorityWithDeks = {
491
518
  ...authority,
492
519
  deks: {
493
520
  [USER_ENVELOPE_COLLECTION]: wrappedUserEnvelopeDek,
494
- [ROSTER_KEY_ID]: wrappedRosterKey
495
- },
521
+ [ROSTER_KEY_ID]: wrappedRosterKey,
522
+ [BLOB_ADDRESS_KEY_ID]: wrappedBlobAddressKey
523
+ }
524
+ };
525
+ const keyringFile = {
526
+ _noydb_keyring: NOYDB_KEYRING_VERSION,
527
+ ...authorityWithDeks,
496
528
  salt: bufferToBase64(salt),
497
529
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
498
530
  canary,
499
- roster_tag: await mintRosterTag(authority, rosterKey),
531
+ roster_tag: await mintRosterTag(authorityWithDeks, rosterKey),
500
532
  // The presence of this block is what makes the keyring an echo keyring —
501
533
  // `deriveKekForKeyring` reads it to refuse a single-string unlock (AG-1).
502
534
  ...typeof secret !== "string" ? {
@@ -557,6 +589,8 @@ async function grant(store, vault, callerKeyring, options) {
557
589
  mintedForGrant = true;
558
590
  }
559
591
  if (mintedForGrant) await persistKeyring(store, vault, callerKeyring);
592
+ const previousGrantFound = await readKeyringFile(store, vault, options.userId);
593
+ const previousDekNames = previousGrantFound ? new Set(Object.keys(previousGrantFound.file.deks)) : null;
560
594
  const wrappedDeks = {};
561
595
  for (const collName of Object.keys(permissions)) {
562
596
  if (collName === PERMISSION_WILDCARD) continue;
@@ -593,18 +627,26 @@ async function grant(store, vault, callerKeyring, options) {
593
627
  ...options.exportCapability !== void 0 && { export_capability: options.exportCapability },
594
628
  ...options.importCapability !== void 0 && { import_capability: options.importCapability }
595
629
  };
630
+ const authorityWithDeks = { ...authority, deks: wrappedDeks };
596
631
  const keyringFile = {
597
632
  _noydb_keyring: NOYDB_KEYRING_VERSION,
598
- ...authority,
599
- deks: wrappedDeks,
633
+ ...authorityWithDeks,
600
634
  salt: bufferToBase64(newSalt),
601
635
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
602
636
  canary,
603
637
  // The grantee's own copy of the roster key rode in via the `_`-prefix
604
638
  // propagation loop above, so they can verify this tag on first unlock.
605
- roster_tag: await mintRosterTag(authority, callerRosterKey)
639
+ roster_tag: await mintRosterTag(authorityWithDeks, callerRosterKey)
606
640
  };
607
641
  await writeKeyringFile(store, vault, options.userId, keyringFile);
642
+ if (previousDekNames !== null && options.userId !== callerKeyring.userId) {
643
+ const dropped = [...previousDekNames].filter(
644
+ (name) => !name.startsWith("_") && !(name in wrappedDeks)
645
+ );
646
+ if (dropped.length > 0) {
647
+ await rotateKeys(store, vault, callerKeyring, { collections: dropped });
648
+ }
649
+ }
608
650
  const userEnvelopeDek = callerKeyring.deks.get(USER_ENVELOPE_COLLECTION);
609
651
  if (userEnvelopeDek) {
610
652
  const initialPayload = options.initialProfile ?? {};
@@ -690,6 +732,7 @@ async function revoke(store, vault, callerKeyring, options) {
690
732
  await deleteUserVisibility(store, vault, userId);
691
733
  }
692
734
  affectedCollections.delete(ROSTER_KEY_ID);
735
+ affectedCollections.delete(BLOB_ADDRESS_KEY_ID);
693
736
  if (affectedCollections.size > 0) {
694
737
  const { unverified } = await rotateKeys(store, vault, callerKeyring, {
695
738
  collections: [...affectedCollections]
@@ -865,6 +908,11 @@ async function derivedRefsFor(store, vault, rotated) {
865
908
  }
866
909
  async function rotateKeys(store, vault, callerKeyring, opts) {
867
910
  const { collections } = opts;
911
+ if (collections.includes(BLOB_ADDRESS_KEY_ID)) {
912
+ throw new ValidationError(
913
+ `rotateKeys: "${BLOB_ADDRESS_KEY_ID}" is the vault's blob content-addressing root, not a collection, and cannot be rotated \u2014 every blob eTag is derived from it, so rotating it would invalidate every stored address at once. Remove it from \`collections\`.`
914
+ );
915
+ }
868
916
  if (collections.includes(ROSTER_KEY_ID)) {
869
917
  throw new ValidationError(
870
918
  `rotateKeys: "${ROSTER_KEY_ID}" is the vault roster key, not a collection, and cannot be rotated \u2014 doing so would strip it from every other member and leave the vault unopenable. Remove it from \`collections\`.`
@@ -896,15 +944,27 @@ async function rotateKeys(store, vault, callerKeyring, opts) {
896
944
  for (const [name, dek] of newDeks) if (name !== collName) others.push(dek);
897
945
  await rekeyBlobSet(store, vault, oldDek, newDek, others);
898
946
  }
947
+ const { collection: baseColl } = parseDekKey(collName);
948
+ const siblingSlotDeks = [];
949
+ for (const [name, dek] of callerKeyring.deks) if (name !== collName) siblingSlotDeks.push(dek);
950
+ for (const [name, dek] of newDeks) if (name !== collName) siblingSlotDeks.push(dek);
899
951
  const refs = [
900
- ...(await store.list(vault, collName)).map((id) => ({ collection: collName, id })),
901
- ...await derivedRefsFor(store, vault, collName)
952
+ ...(await store.list(vault, baseColl)).map((id) => ({ collection: baseColl, id })),
953
+ ...await derivedRefsFor(store, vault, baseColl)
902
954
  ];
903
955
  for (const ref of refs) {
904
956
  const { collection: refColl, id } = ref;
905
957
  const envelope = await store.get(vault, refColl, id);
906
958
  if (!envelope || !envelope._iv) continue;
907
- const newEnvelope = await rekeyEnvelopeIfNeeded({ collection: refColl, id }, envelope, oldDek, newDek);
959
+ let newEnvelope;
960
+ try {
961
+ newEnvelope = await rekeyEnvelopeIfNeeded({ collection: refColl, id }, envelope, oldDek, newDek);
962
+ } catch (err) {
963
+ if (await envelopeOpensUnderAny({ collection: refColl, id }, envelope, siblingSlotDeks)) {
964
+ continue;
965
+ }
966
+ throw err;
967
+ }
908
968
  if (newEnvelope !== null) await store.put(vault, refColl, id, newEnvelope);
909
969
  }
910
970
  }
@@ -980,14 +1040,14 @@ async function changeSecret(store, vault, keyring, opts) {
980
1040
  ...existingAuthority?.export_capability !== void 0 && { export_capability: existingAuthority.export_capability },
981
1041
  ...existingAuthority?.import_capability !== void 0 && { import_capability: existingAuthority.import_capability }
982
1042
  };
1043
+ const authorityWithDeks = { ...authority, deks: wrappedDeks };
983
1044
  const keyringFile = {
984
1045
  _noydb_keyring: NOYDB_KEYRING_VERSION,
985
- ...authority,
986
- deks: wrappedDeks,
1046
+ ...authorityWithDeks,
987
1047
  salt: bufferToBase64(newSalt),
988
1048
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
989
1049
  canary,
990
- roster_tag: await mintRosterTag(authority, rosterKey)
1050
+ roster_tag: await mintRosterTag(authorityWithDeks, rosterKey)
991
1051
  };
992
1052
  await writeKeyringFile(store, vault, keyring.userId, keyringFile);
993
1053
  return {
@@ -1054,16 +1114,16 @@ async function buildRecipientKeyringFile(callerKeyring, recipient) {
1054
1114
  ...recipient.importCapability !== void 0 ? { import_capability: recipient.importCapability } : {},
1055
1115
  ...recipient.expiresAt !== void 0 ? { expires_at: recipient.expiresAt } : {}
1056
1116
  };
1117
+ const authorityWithDeks = { ...authority, deks: wrappedDeks };
1057
1118
  return {
1058
1119
  _noydb_keyring: NOYDB_KEYRING_VERSION,
1059
- ...authority,
1060
- deks: wrappedDeks,
1120
+ ...authorityWithDeks,
1061
1121
  salt: bufferToBase64(newSalt),
1062
1122
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1063
1123
  canary,
1064
1124
  // The recipient's copy of the roster key rode in via the `_`-prefix
1065
1125
  // propagation loop above, so the slot verifies on first unlock.
1066
- roster_tag: await mintRosterTag(authority, rosterKey),
1126
+ roster_tag: await mintRosterTag(authorityWithDeks, rosterKey),
1067
1127
  // The presence of this block is what makes the recipient's slot an
1068
1128
  // echo keyring — mirrors `createOwnerKeyring`'s same dance so the
1069
1129
  // ceremony (prompt → echo → key) travels with the pod, not just a
@@ -1217,15 +1277,18 @@ async function persistKeyring(store, vault, keyring) {
1217
1277
  ...keyring.exportCapability !== void 0 && { export_capability: keyring.exportCapability },
1218
1278
  ...keyring.importCapability !== void 0 && { import_capability: keyring.importCapability }
1219
1279
  };
1220
- const keyringFile = {
1221
- _noydb_keyring: NOYDB_KEYRING_VERSION,
1280
+ const authorityWithDeks = {
1222
1281
  ...authority,
1223
1282
  deks: wrappedDeks,
1224
- ...Object.keys(wrappedPending).length > 0 ? { pending_deks: wrappedPending } : {},
1283
+ ...Object.keys(wrappedPending).length > 0 ? { pending_deks: wrappedPending } : {}
1284
+ };
1285
+ const keyringFile = {
1286
+ _noydb_keyring: NOYDB_KEYRING_VERSION,
1287
+ ...authorityWithDeks,
1225
1288
  salt: bufferToBase64(keyring.salt),
1226
1289
  created_at: existingCreatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
1227
1290
  canary,
1228
- roster_tag: await mintRosterTag(authority, rosterKey),
1291
+ roster_tag: await mintRosterTag(authorityWithDeks, rosterKey),
1229
1292
  ...keyring.authenticators.length > 0 && { authenticators: keyring.authenticators },
1230
1293
  ...keyring.policy !== void 0 && { policy: keyring.policy },
1231
1294
  ...existingEcho !== void 0 && { echo: existingEcho }
@@ -1323,4 +1386,4 @@ export {
1323
1386
  hasImportCapability,
1324
1387
  evaluateImportCapability
1325
1388
  };
1326
- //# sourceMappingURL=chunk-FFESJQ5A.js.map
1389
+ //# sourceMappingURL=chunk-YEEV4ZXL.js.map