@noy-db/hub 0.7.0-pre.8 → 0.7.0

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 (447) hide show
  1. package/CHANGELOG.md +1379 -0
  2. package/README.md +7 -6
  3. package/dist/api-TXFOVOXX.js +19 -0
  4. package/dist/as/index.js +14 -14
  5. package/dist/at/index.js +9 -10
  6. package/dist/attestation/index.js +18 -19
  7. package/dist/attestation/index.js.map +1 -1
  8. package/dist/{backup-SZBDQQSL.js → backup-IJTB4S4M.js} +14 -15
  9. package/dist/{backup-SZBDQQSL.js.map → backup-IJTB4S4M.js.map} +1 -1
  10. package/dist/blobs/index.js +13 -14
  11. package/dist/blobs/index.js.map +1 -1
  12. package/dist/broker/index.js +12 -13
  13. package/dist/broker/index.js.map +1 -1
  14. package/dist/by/index.js +2 -3
  15. package/dist/cargo/index.js +33 -34
  16. package/dist/{chunk-X6TBQKHW.js → chunk-2577DKXB.js} +2 -2
  17. package/dist/chunk-2C3AQB46.js +1652 -0
  18. package/dist/chunk-2C3AQB46.js.map +1 -0
  19. package/dist/{chunk-L3FHEWA3.js → chunk-2N4GY74U.js} +6 -6
  20. package/dist/{chunk-626TSARM.js → chunk-2Y4IMKA6.js} +4 -4
  21. package/dist/{chunk-7CWII4BL.js → chunk-3RCJJBNR.js} +10 -10
  22. package/dist/{chunk-M7UC2QPT.js → chunk-453F654R.js} +2 -2
  23. package/dist/{chunk-2QNKXGUS.js → chunk-4GVM6QZA.js} +2 -2
  24. package/dist/{chunk-AB5P32RE.js → chunk-4OZNXTO4.js} +2 -2
  25. package/dist/{chunk-L3HDEHGM.js → chunk-5VCRVKOZ.js} +4 -4
  26. package/dist/{chunk-6AQIFBSP.js → chunk-5WDXHNSW.js} +5 -5
  27. package/dist/chunk-66TQOPFM.js +37 -0
  28. package/dist/chunk-66TQOPFM.js.map +1 -0
  29. package/dist/{chunk-BOFRKAUS.js → chunk-6GMZ7HEE.js} +6 -6
  30. package/dist/{chunk-PRHCMEUK.js → chunk-6GOE5PGN.js} +168 -1328
  31. package/dist/chunk-6GOE5PGN.js.map +1 -0
  32. package/dist/{chunk-XBFEKTIY.js → chunk-6I2RQCET.js} +4 -4
  33. package/dist/{chunk-PUJTKLPL.js → chunk-6X6SEMEE.js} +6 -4
  34. package/dist/{chunk-PUJTKLPL.js.map → chunk-6X6SEMEE.js.map} +1 -1
  35. package/dist/{chunk-UCUALOSM.js → chunk-6YXCPL4T.js} +2 -2
  36. package/dist/{chunk-BYBB4ABD.js → chunk-77K4PG6P.js} +8 -8
  37. package/dist/{chunk-S2VG3ABP.js → chunk-7MG2LHO5.js} +3 -3
  38. package/dist/{chunk-GU3LQYW2.js → chunk-7MG7SJT7.js} +1 -1
  39. package/dist/chunk-7MG7SJT7.js.map +1 -0
  40. package/dist/{chunk-JBIV4FLR.js → chunk-7O3Y4PPD.js} +5 -1
  41. package/dist/chunk-7O3Y4PPD.js.map +1 -0
  42. package/dist/{chunk-EO2KGKEJ.js → chunk-7V4TP3AF.js} +4 -4
  43. package/dist/{chunk-LFDMKZIP.js → chunk-ANATMFIO.js} +5 -5
  44. package/dist/{chunk-T3PHCEN4.js → chunk-ANSIZYEG.js} +3 -3
  45. package/dist/{chunk-ZKRRBRSZ.js → chunk-AO42KJO6.js} +7 -7
  46. package/dist/{chunk-VFIWDPXZ.js → chunk-BLN54W3L.js} +3 -3
  47. package/dist/{chunk-ZQ2UUHSL.js → chunk-BM5TWITZ.js} +7 -7
  48. package/dist/{chunk-WLFABTZ6.js → chunk-BOET4NA4.js} +3 -3
  49. package/dist/{chunk-FOG7YEJP.js → chunk-BOWNCWZT.js} +3 -3
  50. package/dist/{chunk-7XODKGTW.js → chunk-BSFNRLK2.js} +5 -5
  51. package/dist/{chunk-YPSOHDNC.js → chunk-BUE2D7PX.js} +26 -3
  52. package/dist/chunk-BUE2D7PX.js.map +1 -0
  53. package/dist/{chunk-J4MN6XIU.js → chunk-BZ3534YM.js} +2 -2
  54. package/dist/chunk-CARABLSQ.js +176 -0
  55. package/dist/chunk-CARABLSQ.js.map +1 -0
  56. package/dist/{chunk-4MZEZ37W.js → chunk-CHJBLCOG.js} +10 -8
  57. package/dist/{chunk-4MZEZ37W.js.map → chunk-CHJBLCOG.js.map} +1 -1
  58. package/dist/{chunk-IF56DYJK.js → chunk-CPWQB3N5.js} +7 -7
  59. package/dist/{chunk-SHILAQH5.js → chunk-DGOZ4UZD.js} +2 -2
  60. package/dist/{chunk-BWWUXE3L.js → chunk-ELNXJMGB.js} +6 -6
  61. package/dist/{chunk-44C2URL7.js → chunk-EQEYOJBM.js} +3 -3
  62. package/dist/{chunk-Y3XWRDAM.js → chunk-EYBQEIUY.js} +3 -3
  63. package/dist/{chunk-Z7ZXZL6Y.js → chunk-FAHMLERK.js} +2 -2
  64. package/dist/chunk-FFWI7UH7.js +53 -0
  65. package/dist/chunk-FFWI7UH7.js.map +1 -0
  66. package/dist/{chunk-EXDIHWFO.js → chunk-FMZY5Q6L.js} +3 -3
  67. package/dist/{chunk-H6WXKZL7.js → chunk-FXBIP2WD.js} +6 -6
  68. package/dist/{chunk-ZTYG36DH.js → chunk-G56KBWFY.js} +67 -22
  69. package/dist/chunk-G56KBWFY.js.map +1 -0
  70. package/dist/{chunk-672U6STZ.js → chunk-GPEQUXHL.js} +4 -4
  71. package/dist/{chunk-Z2PWOSCJ.js → chunk-GY4WYNNG.js} +2 -2
  72. package/dist/{chunk-RDHUZ674.js → chunk-HDOU6I2Y.js} +80 -8
  73. package/dist/chunk-HDOU6I2Y.js.map +1 -0
  74. package/dist/{chunk-OMHHGOG4.js → chunk-J6FXAEUG.js} +15 -13
  75. package/dist/chunk-J6FXAEUG.js.map +1 -0
  76. package/dist/{chunk-4A4TYISP.js → chunk-JBDFMYKQ.js} +2 -2
  77. package/dist/{chunk-POS53FG6.js → chunk-JMGDHKQF.js} +2 -2
  78. package/dist/{chunk-Q7GEDVHC.js → chunk-K6LHRFBL.js} +7 -7
  79. package/dist/{chunk-4JDIRUTT.js → chunk-K7NTTA6P.js} +2 -2
  80. package/dist/{chunk-26W5VETY.js → chunk-KG7TZKZG.js} +5 -5
  81. package/dist/{chunk-RJ7RIIX6.js → chunk-KJIMGIWO.js} +8 -8
  82. package/dist/{chunk-F7ZFRPGQ.js → chunk-KTFRCC5C.js} +2 -2
  83. package/dist/{chunk-HSGEIMJS.js → chunk-KUJDV5QH.js} +5 -5
  84. package/dist/{chunk-XWNLKG6R.js → chunk-KUX3OB6D.js} +7 -5
  85. package/dist/{chunk-XWNLKG6R.js.map → chunk-KUX3OB6D.js.map} +1 -1
  86. package/dist/{chunk-UPJMBMCR.js → chunk-L742JPKZ.js} +6 -6
  87. package/dist/{chunk-4TZUFNXL.js → chunk-L7CIOOBW.js} +2 -2
  88. package/dist/{chunk-7LYUJNU3.js → chunk-LWBCUYZW.js} +2 -2
  89. package/dist/{chunk-JHLJQUXU.js → chunk-MUM7IANK.js} +3 -3
  90. package/dist/{chunk-2GXEQUEX.js → chunk-MVMXZYXT.js} +2 -2
  91. package/dist/{chunk-XLPXGN66.js → chunk-NA2NIJZI.js} +8 -8
  92. package/dist/{chunk-S6YB5ZRP.js → chunk-NKHRDYOR.js} +4 -4
  93. package/dist/{chunk-XJ3FEKEY.js → chunk-NQKIUNW5.js} +2 -2
  94. package/dist/{chunk-6NRVFD55.js → chunk-PT43Y56J.js} +6 -6
  95. package/dist/{chunk-5ACAVJUI.js → chunk-Q2PU57HC.js} +2 -2
  96. package/dist/{chunk-E6YA6UAP.js → chunk-Q7HZX3IF.js} +2 -2
  97. package/dist/{chunk-4ZPE6SKS.js → chunk-QIBVIOXO.js} +3 -3
  98. package/dist/{chunk-WLLUM35R.js → chunk-QIZPZMUI.js} +2 -2
  99. package/dist/{chunk-P6ASQOZR.js → chunk-REDOOY2Q.js} +3 -3
  100. package/dist/chunk-REDOOY2Q.js.map +1 -0
  101. package/dist/{chunk-LKFKXS5K.js → chunk-RMF67KCG.js} +2 -2
  102. package/dist/{chunk-YCSM3GZU.js → chunk-RMS3NEA3.js} +2 -2
  103. package/dist/{chunk-4FPEWQKF.js → chunk-RRNRNANG.js} +27 -17
  104. package/dist/chunk-RRNRNANG.js.map +1 -0
  105. package/dist/chunk-RTBJ5IOO.js +87 -0
  106. package/dist/chunk-RTBJ5IOO.js.map +1 -0
  107. package/dist/chunk-RXLYKVTF.js +17 -0
  108. package/dist/chunk-RXLYKVTF.js.map +1 -0
  109. package/dist/{chunk-OPXR4PB2.js → chunk-SFAWCTEM.js} +2 -2
  110. package/dist/{chunk-3QARDAYW.js → chunk-SKGMN35F.js} +2 -2
  111. package/dist/{chunk-W5LHQXZU.js → chunk-SL3JAAKN.js} +2 -2
  112. package/dist/chunk-SMH6SRX7.js +87 -0
  113. package/dist/chunk-SMH6SRX7.js.map +1 -0
  114. package/dist/{chunk-JJZIIJSA.js → chunk-SPXXX5E4.js} +12 -82
  115. package/dist/chunk-SPXXX5E4.js.map +1 -0
  116. package/dist/{chunk-UALOYGCP.js → chunk-SPYWXKJN.js} +3 -3
  117. package/dist/{chunk-QU3YUP2X.js → chunk-SZJ3DLZA.js} +2 -2
  118. package/dist/chunk-TFMM5DBB.js +20 -0
  119. package/dist/chunk-TFMM5DBB.js.map +1 -0
  120. package/dist/{chunk-225O5CXQ.js → chunk-TFR7DSOV.js} +2 -2
  121. package/dist/{chunk-X67FCULK.js → chunk-TRGTKX5E.js} +3 -3
  122. package/dist/{chunk-JVLSU7S2.js → chunk-TUFM4UZP.js} +2 -2
  123. package/dist/{chunk-VVAVTSTR.js → chunk-U4FOQDY4.js} +5 -172
  124. package/dist/chunk-U4FOQDY4.js.map +1 -0
  125. package/dist/{chunk-HTGRQZFB.js → chunk-UGTBXF5U.js} +3 -3
  126. package/dist/{chunk-THNJ3IKU.js → chunk-ULUMAZ5S.js} +2 -2
  127. package/dist/{chunk-XDVVBETV.js → chunk-UXVWEX5L.js} +2 -2
  128. package/dist/{chunk-FKFIEEY6.js → chunk-UXWB3FPF.js} +10 -10
  129. package/dist/{chunk-NO272T7Q.js → chunk-V4PXLYWM.js} +2 -31
  130. package/dist/chunk-V4PXLYWM.js.map +1 -0
  131. package/dist/{chunk-CBRS2NEK.js → chunk-VTFVLCUH.js} +2 -2
  132. package/dist/{chunk-TOV6VMHF.js → chunk-VXANTWBJ.js} +3 -3
  133. package/dist/{chunk-VSLUSXVK.js → chunk-VXGSWL6L.js} +6 -6
  134. package/dist/{chunk-KHKKD62N.js → chunk-VYYM3MEN.js} +2 -16
  135. package/dist/chunk-VYYM3MEN.js.map +1 -0
  136. package/dist/{chunk-HQINBNHM.js → chunk-WEQEYLCS.js} +7 -7
  137. package/dist/{chunk-U6GCYG2T.js → chunk-X2DLENDQ.js} +3 -3
  138. package/dist/{chunk-XVU7J43V.js → chunk-XLMEZIAJ.js} +2 -2
  139. package/dist/{chunk-ILSR22WM.js → chunk-XTXOCYOJ.js} +5 -5
  140. package/dist/{chunk-KDJGJR7F.js → chunk-YSRUYAVU.js} +2 -2
  141. package/dist/{chunk-NLKLXXTO.js → chunk-YYP7WSEB.js} +2 -2
  142. package/dist/{chunk-4G25SDQL.js → chunk-ZN4FD4PE.js} +4 -4
  143. package/dist/{chunk-XSN63FUS.js → chunk-ZORTV6NH.js} +2 -2
  144. package/dist/{chunk-S3I7VKID.js → chunk-ZVO4QVPD.js} +5 -5
  145. package/dist/classified/index.js +5 -6
  146. package/dist/{classified-marker-KL4YXUXD.js → classified-marker-LI2SF2E4.js} +3 -5
  147. package/dist/{classified-marker-KL4YXUXD.js.map → classified-marker-LI2SF2E4.js.map} +1 -1
  148. package/dist/collection-facade-4GRREZ6C.js +45 -0
  149. package/dist/computed-VPOKQK4N.js +10 -0
  150. package/dist/consent/index.js +9 -10
  151. package/dist/consent/index.js.map +1 -1
  152. package/dist/cover/index.js +9 -10
  153. package/dist/crdt/index.js +0 -1
  154. package/dist/crdt/index.js.map +1 -1
  155. package/dist/custody/index.js +12 -13
  156. package/dist/{dead-filter-ZGRFZKYE.js → dead-filter-TSWZQRR5.js} +2 -3
  157. package/dist/{dead-filter-ZGRFZKYE.js.map → dead-filter-TSWZQRR5.js.map} +1 -1
  158. package/dist/debug/index.js +1 -2
  159. package/dist/debug/index.js.map +1 -1
  160. package/dist/{delegation-2DO3VI5E.js → delegation-OVIFFPG4.js} +11 -12
  161. package/dist/{delegation-2DO3VI5E.js.map → delegation-OVIFFPG4.js.map} +1 -1
  162. package/dist/derivations/index.js +30 -16
  163. package/dist/derive-6O5SWQKN.js +21 -0
  164. package/dist/directory/index.js +10 -11
  165. package/dist/dispatch-S73TK3IY.js +302 -0
  166. package/dist/dispatch-S73TK3IY.js.map +1 -0
  167. package/dist/{dispatch-M62IAL2S.js → dispatch-WC6X2M6C.js} +5 -7
  168. package/dist/{dispatch-M62IAL2S.js.map → dispatch-WC6X2M6C.js.map} +1 -1
  169. package/dist/{enclave-4P4KH5ZW.js → enclave-KJOTOH7X.js} +9 -10
  170. package/dist/executor-5NIMLSKZ.js +8 -0
  171. package/dist/executor-AQVXV5GZ.js +8 -0
  172. package/dist/executor-PUAO6AKJ.js +29 -0
  173. package/dist/export-accessible-72EQNBMR.js +22 -0
  174. package/dist/extract-partition-PUYNU3UF.js +37 -0
  175. package/dist/{fanout-sidecar-BRQHWTZQ.js → fanout-sidecar-WUFXNYP4.js} +9 -10
  176. package/dist/{fanout-sidecar-BRQHWTZQ.js.map → fanout-sidecar-WUFXNYP4.js.map} +1 -1
  177. package/dist/{fence-watcher-ZVSMLKQD.js → fence-watcher-U2PW6JU5.js} +1 -3
  178. package/dist/{fence-watcher-ZVSMLKQD.js.map → fence-watcher-U2PW6JU5.js.map} +1 -1
  179. package/dist/find-2ABFCZX4.js +10 -0
  180. package/dist/forget/index.js +9 -10
  181. package/dist/forget/index.js.map +1 -1
  182. package/dist/guards/index.js +4 -5
  183. package/dist/history/index.js +13 -14
  184. package/dist/history/index.js.map +1 -1
  185. package/dist/i18n/index.js +14 -15
  186. package/dist/i18n/index.js.map +1 -1
  187. package/dist/index.d.ts +20 -4
  188. package/dist/index.js +122 -115
  189. package/dist/index.js.map +1 -1
  190. package/dist/indexing/index.js +2 -3
  191. package/dist/indexing/index.js.map +1 -1
  192. package/dist/introspection/index.js +13 -13
  193. package/dist/issue-SIDORTSZ.js +18 -0
  194. package/dist/{json-schema-I22JCYCG.js → json-schema-V3M5MUCM.js} +1 -3
  195. package/dist/{json-schema-I22JCYCG.js.map → json-schema-V3M5MUCM.js.map} +1 -1
  196. package/dist/kernel/collection-config.d.ts +34 -0
  197. package/dist/kernel/collection.d.ts +11 -6
  198. package/dist/kernel/errors.d.ts +45 -0
  199. package/dist/kernel/match-pairs.d.ts +30 -0
  200. package/dist/kernel/types.d.ts +66 -0
  201. package/dist/lazy/index.js +3 -3
  202. package/dist/{ledger-4X5ZH43X.js → ledger-F33ZVMTK.js} +11 -12
  203. package/dist/liberate-LCDPNAG2.js +24 -0
  204. package/dist/link-set-FKNWAYKS.js +30 -0
  205. package/dist/{managed-secret-CXALLEUB.js → managed-secret-PQYKSR6T.js} +10 -11
  206. package/dist/materialized-views/index.js +21 -21
  207. package/dist/{migrate-cek-LBRKYUZZ.js → migrate-cek-5ENH64AA.js} +2 -3
  208. package/dist/{migrate-cek-LBRKYUZZ.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
  209. package/dist/money/index.js +4 -5
  210. package/dist/noydb-DUXZPKSN.js +90 -0
  211. package/dist/overlay-views/index.js +4 -5
  212. package/dist/periods/index.js +12 -13
  213. package/dist/pod/index.js +64 -60
  214. package/dist/{pod-handle-DHEYBTJ2.js → pod-handle-Q736KYON.js} +10 -11
  215. package/dist/{pod-handle-DHEYBTJ2.js.map → pod-handle-Q736KYON.js.map} +1 -1
  216. package/dist/policy/index.js +10 -11
  217. package/dist/port/to/index.d.ts +40 -0
  218. package/dist/portability/index.js +8 -9
  219. package/dist/portability/index.js.map +1 -1
  220. package/dist/{post-register-4DXRYGTU.js → post-register-LNE2FE2A.js} +6 -7
  221. package/dist/{post-register-4DXRYGTU.js.map → post-register-LNE2FE2A.js.map} +1 -1
  222. package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
  223. package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
  224. package/dist/query/index.js +3 -4
  225. package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
  226. package/dist/reduce/index.js +4 -5
  227. package/dist/reduce/index.js.map +1 -1
  228. package/dist/register-I2DZXGAR.js +31 -0
  229. package/dist/registry-23WF3TGH.js +8 -0
  230. package/dist/registry-4AYVUNXK.js +8 -0
  231. package/dist/registry-VSSQPIGF.js +18 -0
  232. package/dist/registry-YLEWMGAC.js +32 -0
  233. package/dist/request-withdrawal-KFQHEZ25.js +30 -0
  234. package/dist/{reveal-X2QMWOVX.js → reveal-67RDQRIN.js} +6 -7
  235. package/dist/{reveal-X2QMWOVX.js.map → reveal-67RDQRIN.js.map} +1 -1
  236. package/dist/revoke-DQDZAZZM.js +23 -0
  237. package/dist/satellites/index.js +1 -2
  238. package/dist/schema-update/index.js +2 -3
  239. package/dist/sealed-record/index.js +12 -13
  240. package/dist/sealed-record/index.js.map +1 -1
  241. package/dist/search/index.js +4 -5
  242. package/dist/{seed-IX5NFSH5.js → seed-G42JYN56.js} +12 -13
  243. package/dist/{seed-IX5NFSH5.js.map → seed-G42JYN56.js.map} +1 -1
  244. package/dist/sequence/index.js +9 -10
  245. package/dist/session/index.js +9 -10
  246. package/dist/session/index.js.map +1 -1
  247. package/dist/shadow/index.js +2 -3
  248. package/dist/shadow/index.js.map +1 -1
  249. package/dist/share-link/index.js +0 -1
  250. package/dist/share-link/index.js.map +1 -1
  251. package/dist/signer-WAMDZHEN.js +24 -0
  252. package/dist/snapshots/index.js +10 -11
  253. package/dist/snapshots/index.js.map +1 -1
  254. package/dist/{stale-5I36LPVK.js → stale-DDL7WQEZ.js} +10 -11
  255. package/dist/storage-FLR73HHF.js +22 -0
  256. package/dist/store/index.js +0 -1
  257. package/dist/{store-coordination-provider-OLPNRMFO.js → store-coordination-provider-MEQ2MJQG.js} +10 -11
  258. package/dist/{store-coordination-provider-OLPNRMFO.js.map → store-coordination-provider-MEQ2MJQG.js.map} +1 -1
  259. package/dist/sync/index.js +10 -11
  260. package/dist/sync/index.js.map +1 -1
  261. package/dist/team/index.js +15 -16
  262. package/dist/tiers/index.js +11 -12
  263. package/dist/to/index.js +2 -3
  264. package/dist/to/index.js.map +1 -1
  265. package/dist/transactions/index.js +3 -4
  266. package/dist/transactions/index.js.map +1 -1
  267. package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
  268. package/dist/util/index.js +1 -2
  269. package/dist/util/index.js.map +1 -1
  270. package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
  271. package/dist/vault-head/index.js +8 -9
  272. package/dist/vault-head/index.js.map +1 -1
  273. package/dist/{verify-WYOFLSNA.js → verify-KOV2G5D6.js} +5 -6
  274. package/dist/{verify-WYOFLSNA.js.map → verify-KOV2G5D6.js.map} +1 -1
  275. package/dist/walk-3UQBRMDV.js +21 -0
  276. package/dist/with-formula/derivations/dispatch.d.ts +16 -1
  277. package/dist/with-formula/derivations/registry.d.ts +20 -0
  278. package/dist/with-formula/derivations/trigger-match.d.ts +104 -0
  279. package/dist/with-formula/derivations/types.d.ts +61 -0
  280. package/dist/with-party/team/roster-epoch.d.ts +71 -0
  281. package/dist/with-party/team/roster-tag.d.ts +1 -1
  282. package/dist/with-shape/introspection/behaviors.d.ts +7 -0
  283. package/dist/with-shape/introspection/describe.d.ts +10 -1
  284. package/dist/with-shape/introspection/field-meta.d.ts +86 -0
  285. package/dist/withdraw-accessible-EL5GXZBS.js +27 -0
  286. package/package.json +8 -3
  287. package/dist/api-OAZLPNVV.js +0 -20
  288. package/dist/chunk-4FPEWQKF.js.map +0 -1
  289. package/dist/chunk-5263OEM3.js +0 -344
  290. package/dist/chunk-5263OEM3.js.map +0 -1
  291. package/dist/chunk-GU3LQYW2.js.map +0 -1
  292. package/dist/chunk-JBIV4FLR.js.map +0 -1
  293. package/dist/chunk-JJZIIJSA.js.map +0 -1
  294. package/dist/chunk-KHKKD62N.js.map +0 -1
  295. package/dist/chunk-NO272T7Q.js.map +0 -1
  296. package/dist/chunk-OMHHGOG4.js.map +0 -1
  297. package/dist/chunk-P6ASQOZR.js.map +0 -1
  298. package/dist/chunk-PRHCMEUK.js.map +0 -1
  299. package/dist/chunk-PZ5AY32C.js +0 -10
  300. package/dist/chunk-RDHUZ674.js.map +0 -1
  301. package/dist/chunk-VAG47QHV.js +0 -81
  302. package/dist/chunk-VAG47QHV.js.map +0 -1
  303. package/dist/chunk-VVAVTSTR.js.map +0 -1
  304. package/dist/chunk-YPSOHDNC.js.map +0 -1
  305. package/dist/chunk-ZTYG36DH.js.map +0 -1
  306. package/dist/collection-facade-6IY2LW6W.js +0 -45
  307. package/dist/computed-ASBNTLOK.js +0 -11
  308. package/dist/derive-TCTS7ULE.js +0 -22
  309. package/dist/dispatch-FNCCONFK.js +0 -194
  310. package/dist/dispatch-FNCCONFK.js.map +0 -1
  311. package/dist/executor-AFHQYRAU.js +0 -9
  312. package/dist/executor-CDIMJVE2.js +0 -29
  313. package/dist/executor-YYDW6XQI.js +0 -9
  314. package/dist/export-accessible-WADNWX35.js +0 -23
  315. package/dist/extract-partition-SHQYQSWE.js +0 -38
  316. package/dist/find-SZBL2HPB.js +0 -11
  317. package/dist/issue-2DGG7NKE.js +0 -19
  318. package/dist/liberate-7NEPRE52.js +0 -25
  319. package/dist/link-set-WHTYVTOV.js +0 -31
  320. package/dist/noydb-BQ3ZTN2Z.js +0 -86
  321. package/dist/register-GLCOH73C.js +0 -32
  322. package/dist/registry-GWGHZWGP.js +0 -19
  323. package/dist/registry-IWFMXCHX.js +0 -9
  324. package/dist/registry-Q3FG3OAX.js +0 -9
  325. package/dist/registry-T346IZCF.js +0 -18
  326. package/dist/request-withdrawal-2RERJECX.js +0 -31
  327. package/dist/revoke-4NRSCPNW.js +0 -24
  328. package/dist/signer-HJHTGX7X.js +0 -25
  329. package/dist/storage-ZYYAB3J3.js +0 -23
  330. package/dist/walk-LTV7LOCN.js +0 -21
  331. package/dist/withdraw-accessible-V4XCPH7U.js +0 -28
  332. package/dist/withdraw-accessible-V4XCPH7U.js.map +0 -1
  333. package/dist/zod-HAJM7LMS.js +0 -14763
  334. package/dist/zod-HAJM7LMS.js.map +0 -1
  335. /package/dist/{api-OAZLPNVV.js.map → api-TXFOVOXX.js.map} +0 -0
  336. /package/dist/{chunk-X6TBQKHW.js.map → chunk-2577DKXB.js.map} +0 -0
  337. /package/dist/{chunk-L3FHEWA3.js.map → chunk-2N4GY74U.js.map} +0 -0
  338. /package/dist/{chunk-626TSARM.js.map → chunk-2Y4IMKA6.js.map} +0 -0
  339. /package/dist/{chunk-7CWII4BL.js.map → chunk-3RCJJBNR.js.map} +0 -0
  340. /package/dist/{chunk-M7UC2QPT.js.map → chunk-453F654R.js.map} +0 -0
  341. /package/dist/{chunk-2QNKXGUS.js.map → chunk-4GVM6QZA.js.map} +0 -0
  342. /package/dist/{chunk-AB5P32RE.js.map → chunk-4OZNXTO4.js.map} +0 -0
  343. /package/dist/{chunk-L3HDEHGM.js.map → chunk-5VCRVKOZ.js.map} +0 -0
  344. /package/dist/{chunk-6AQIFBSP.js.map → chunk-5WDXHNSW.js.map} +0 -0
  345. /package/dist/{chunk-BOFRKAUS.js.map → chunk-6GMZ7HEE.js.map} +0 -0
  346. /package/dist/{chunk-XBFEKTIY.js.map → chunk-6I2RQCET.js.map} +0 -0
  347. /package/dist/{chunk-UCUALOSM.js.map → chunk-6YXCPL4T.js.map} +0 -0
  348. /package/dist/{chunk-BYBB4ABD.js.map → chunk-77K4PG6P.js.map} +0 -0
  349. /package/dist/{chunk-S2VG3ABP.js.map → chunk-7MG2LHO5.js.map} +0 -0
  350. /package/dist/{chunk-EO2KGKEJ.js.map → chunk-7V4TP3AF.js.map} +0 -0
  351. /package/dist/{chunk-LFDMKZIP.js.map → chunk-ANATMFIO.js.map} +0 -0
  352. /package/dist/{chunk-T3PHCEN4.js.map → chunk-ANSIZYEG.js.map} +0 -0
  353. /package/dist/{chunk-ZKRRBRSZ.js.map → chunk-AO42KJO6.js.map} +0 -0
  354. /package/dist/{chunk-VFIWDPXZ.js.map → chunk-BLN54W3L.js.map} +0 -0
  355. /package/dist/{chunk-ZQ2UUHSL.js.map → chunk-BM5TWITZ.js.map} +0 -0
  356. /package/dist/{chunk-WLFABTZ6.js.map → chunk-BOET4NA4.js.map} +0 -0
  357. /package/dist/{chunk-FOG7YEJP.js.map → chunk-BOWNCWZT.js.map} +0 -0
  358. /package/dist/{chunk-7XODKGTW.js.map → chunk-BSFNRLK2.js.map} +0 -0
  359. /package/dist/{chunk-J4MN6XIU.js.map → chunk-BZ3534YM.js.map} +0 -0
  360. /package/dist/{chunk-IF56DYJK.js.map → chunk-CPWQB3N5.js.map} +0 -0
  361. /package/dist/{chunk-SHILAQH5.js.map → chunk-DGOZ4UZD.js.map} +0 -0
  362. /package/dist/{chunk-BWWUXE3L.js.map → chunk-ELNXJMGB.js.map} +0 -0
  363. /package/dist/{chunk-44C2URL7.js.map → chunk-EQEYOJBM.js.map} +0 -0
  364. /package/dist/{chunk-Y3XWRDAM.js.map → chunk-EYBQEIUY.js.map} +0 -0
  365. /package/dist/{chunk-Z7ZXZL6Y.js.map → chunk-FAHMLERK.js.map} +0 -0
  366. /package/dist/{chunk-EXDIHWFO.js.map → chunk-FMZY5Q6L.js.map} +0 -0
  367. /package/dist/{chunk-H6WXKZL7.js.map → chunk-FXBIP2WD.js.map} +0 -0
  368. /package/dist/{chunk-672U6STZ.js.map → chunk-GPEQUXHL.js.map} +0 -0
  369. /package/dist/{chunk-Z2PWOSCJ.js.map → chunk-GY4WYNNG.js.map} +0 -0
  370. /package/dist/{chunk-4A4TYISP.js.map → chunk-JBDFMYKQ.js.map} +0 -0
  371. /package/dist/{chunk-POS53FG6.js.map → chunk-JMGDHKQF.js.map} +0 -0
  372. /package/dist/{chunk-Q7GEDVHC.js.map → chunk-K6LHRFBL.js.map} +0 -0
  373. /package/dist/{chunk-4JDIRUTT.js.map → chunk-K7NTTA6P.js.map} +0 -0
  374. /package/dist/{chunk-26W5VETY.js.map → chunk-KG7TZKZG.js.map} +0 -0
  375. /package/dist/{chunk-RJ7RIIX6.js.map → chunk-KJIMGIWO.js.map} +0 -0
  376. /package/dist/{chunk-F7ZFRPGQ.js.map → chunk-KTFRCC5C.js.map} +0 -0
  377. /package/dist/{chunk-HSGEIMJS.js.map → chunk-KUJDV5QH.js.map} +0 -0
  378. /package/dist/{chunk-UPJMBMCR.js.map → chunk-L742JPKZ.js.map} +0 -0
  379. /package/dist/{chunk-4TZUFNXL.js.map → chunk-L7CIOOBW.js.map} +0 -0
  380. /package/dist/{chunk-7LYUJNU3.js.map → chunk-LWBCUYZW.js.map} +0 -0
  381. /package/dist/{chunk-JHLJQUXU.js.map → chunk-MUM7IANK.js.map} +0 -0
  382. /package/dist/{chunk-2GXEQUEX.js.map → chunk-MVMXZYXT.js.map} +0 -0
  383. /package/dist/{chunk-XLPXGN66.js.map → chunk-NA2NIJZI.js.map} +0 -0
  384. /package/dist/{chunk-S6YB5ZRP.js.map → chunk-NKHRDYOR.js.map} +0 -0
  385. /package/dist/{chunk-XJ3FEKEY.js.map → chunk-NQKIUNW5.js.map} +0 -0
  386. /package/dist/{chunk-6NRVFD55.js.map → chunk-PT43Y56J.js.map} +0 -0
  387. /package/dist/{chunk-5ACAVJUI.js.map → chunk-Q2PU57HC.js.map} +0 -0
  388. /package/dist/{chunk-E6YA6UAP.js.map → chunk-Q7HZX3IF.js.map} +0 -0
  389. /package/dist/{chunk-4ZPE6SKS.js.map → chunk-QIBVIOXO.js.map} +0 -0
  390. /package/dist/{chunk-WLLUM35R.js.map → chunk-QIZPZMUI.js.map} +0 -0
  391. /package/dist/{chunk-LKFKXS5K.js.map → chunk-RMF67KCG.js.map} +0 -0
  392. /package/dist/{chunk-YCSM3GZU.js.map → chunk-RMS3NEA3.js.map} +0 -0
  393. /package/dist/{chunk-OPXR4PB2.js.map → chunk-SFAWCTEM.js.map} +0 -0
  394. /package/dist/{chunk-3QARDAYW.js.map → chunk-SKGMN35F.js.map} +0 -0
  395. /package/dist/{chunk-W5LHQXZU.js.map → chunk-SL3JAAKN.js.map} +0 -0
  396. /package/dist/{chunk-UALOYGCP.js.map → chunk-SPYWXKJN.js.map} +0 -0
  397. /package/dist/{chunk-QU3YUP2X.js.map → chunk-SZJ3DLZA.js.map} +0 -0
  398. /package/dist/{chunk-225O5CXQ.js.map → chunk-TFR7DSOV.js.map} +0 -0
  399. /package/dist/{chunk-X67FCULK.js.map → chunk-TRGTKX5E.js.map} +0 -0
  400. /package/dist/{chunk-JVLSU7S2.js.map → chunk-TUFM4UZP.js.map} +0 -0
  401. /package/dist/{chunk-HTGRQZFB.js.map → chunk-UGTBXF5U.js.map} +0 -0
  402. /package/dist/{chunk-THNJ3IKU.js.map → chunk-ULUMAZ5S.js.map} +0 -0
  403. /package/dist/{chunk-XDVVBETV.js.map → chunk-UXVWEX5L.js.map} +0 -0
  404. /package/dist/{chunk-FKFIEEY6.js.map → chunk-UXWB3FPF.js.map} +0 -0
  405. /package/dist/{chunk-CBRS2NEK.js.map → chunk-VTFVLCUH.js.map} +0 -0
  406. /package/dist/{chunk-TOV6VMHF.js.map → chunk-VXANTWBJ.js.map} +0 -0
  407. /package/dist/{chunk-VSLUSXVK.js.map → chunk-VXGSWL6L.js.map} +0 -0
  408. /package/dist/{chunk-HQINBNHM.js.map → chunk-WEQEYLCS.js.map} +0 -0
  409. /package/dist/{chunk-U6GCYG2T.js.map → chunk-X2DLENDQ.js.map} +0 -0
  410. /package/dist/{chunk-XVU7J43V.js.map → chunk-XLMEZIAJ.js.map} +0 -0
  411. /package/dist/{chunk-ILSR22WM.js.map → chunk-XTXOCYOJ.js.map} +0 -0
  412. /package/dist/{chunk-KDJGJR7F.js.map → chunk-YSRUYAVU.js.map} +0 -0
  413. /package/dist/{chunk-NLKLXXTO.js.map → chunk-YYP7WSEB.js.map} +0 -0
  414. /package/dist/{chunk-4G25SDQL.js.map → chunk-ZN4FD4PE.js.map} +0 -0
  415. /package/dist/{chunk-XSN63FUS.js.map → chunk-ZORTV6NH.js.map} +0 -0
  416. /package/dist/{chunk-S3I7VKID.js.map → chunk-ZVO4QVPD.js.map} +0 -0
  417. /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-4GRREZ6C.js.map} +0 -0
  418. /package/dist/{collection-facade-6IY2LW6W.js.map → computed-VPOKQK4N.js.map} +0 -0
  419. /package/dist/{computed-ASBNTLOK.js.map → derive-6O5SWQKN.js.map} +0 -0
  420. /package/dist/{derive-TCTS7ULE.js.map → enclave-KJOTOH7X.js.map} +0 -0
  421. /package/dist/{enclave-4P4KH5ZW.js.map → executor-5NIMLSKZ.js.map} +0 -0
  422. /package/dist/{executor-AFHQYRAU.js.map → executor-AQVXV5GZ.js.map} +0 -0
  423. /package/dist/{executor-CDIMJVE2.js.map → executor-PUAO6AKJ.js.map} +0 -0
  424. /package/dist/{executor-YYDW6XQI.js.map → export-accessible-72EQNBMR.js.map} +0 -0
  425. /package/dist/{export-accessible-WADNWX35.js.map → extract-partition-PUYNU3UF.js.map} +0 -0
  426. /package/dist/{extract-partition-SHQYQSWE.js.map → find-2ABFCZX4.js.map} +0 -0
  427. /package/dist/{find-SZBL2HPB.js.map → issue-SIDORTSZ.js.map} +0 -0
  428. /package/dist/{issue-2DGG7NKE.js.map → ledger-F33ZVMTK.js.map} +0 -0
  429. /package/dist/{ledger-4X5ZH43X.js.map → liberate-LCDPNAG2.js.map} +0 -0
  430. /package/dist/{liberate-7NEPRE52.js.map → link-set-FKNWAYKS.js.map} +0 -0
  431. /package/dist/{link-set-WHTYVTOV.js.map → managed-secret-PQYKSR6T.js.map} +0 -0
  432. /package/dist/{managed-secret-CXALLEUB.js.map → noydb-DUXZPKSN.js.map} +0 -0
  433. /package/dist/{noydb-BQ3ZTN2Z.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
  434. /package/dist/{read-only-facade-CHCKSEPD.js.map → register-I2DZXGAR.js.map} +0 -0
  435. /package/dist/{register-GLCOH73C.js.map → registry-23WF3TGH.js.map} +0 -0
  436. /package/dist/{registry-GWGHZWGP.js.map → registry-4AYVUNXK.js.map} +0 -0
  437. /package/dist/{registry-IWFMXCHX.js.map → registry-VSSQPIGF.js.map} +0 -0
  438. /package/dist/{registry-Q3FG3OAX.js.map → registry-YLEWMGAC.js.map} +0 -0
  439. /package/dist/{registry-T346IZCF.js.map → request-withdrawal-KFQHEZ25.js.map} +0 -0
  440. /package/dist/{request-withdrawal-2RERJECX.js.map → revoke-DQDZAZZM.js.map} +0 -0
  441. /package/dist/{revoke-4NRSCPNW.js.map → signer-WAMDZHEN.js.map} +0 -0
  442. /package/dist/{signer-HJHTGX7X.js.map → stale-DDL7WQEZ.js.map} +0 -0
  443. /package/dist/{stale-5I36LPVK.js.map → storage-FLR73HHF.js.map} +0 -0
  444. /package/dist/{storage-ZYYAB3J3.js.map → ulid-4MKXG325.js.map} +0 -0
  445. /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
  446. /package/dist/{vault-diff-FE5J35NJ.js.map → walk-3UQBRMDV.js.map} +0 -0
  447. /package/dist/{walk-LTV7LOCN.js.map → withdraw-accessible-EL5GXZBS.js.map} +0 -0
@@ -7,27 +7,27 @@ import {
7
7
  PERIOD_FREEZES_COLLECTION,
8
8
  PERIOD_TARGET_PURGES_COLLECTION,
9
9
  periodExclusiveUpperBound
10
- } from "./chunk-Z7ZXZL6Y.js";
10
+ } from "./chunk-FAHMLERK.js";
11
11
  import {
12
12
  envelopeBodySize
13
- } from "./chunk-BYBB4ABD.js";
13
+ } from "./chunk-77K4PG6P.js";
14
14
  import {
15
15
  buildRecordEnvelope,
16
16
  isDeleteMarker,
17
17
  isTombstoneShape
18
- } from "./chunk-QU3YUP2X.js";
18
+ } from "./chunk-SZJ3DLZA.js";
19
19
  import {
20
20
  decrypt,
21
21
  derivePresenceKey,
22
22
  encrypt
23
- } from "./chunk-W5LHQXZU.js";
23
+ } from "./chunk-SL3JAAKN.js";
24
24
  import {
25
25
  NOYDB_SYNC_VERSION
26
- } from "./chunk-GU3LQYW2.js";
26
+ } from "./chunk-7MG7SJT7.js";
27
27
  import {
28
28
  ValidationError,
29
29
  isConflictError
30
- } from "./chunk-JBIV4FLR.js";
30
+ } from "./chunk-7O3Y4PPD.js";
31
31
 
32
32
  // src/with-sync/presence.ts
33
33
  var subtle = globalThis.crypto.subtle;
@@ -1213,4 +1213,4 @@ export {
1213
1213
  SyncEngine,
1214
1214
  SyncTransaction
1215
1215
  };
1216
- //# sourceMappingURL=chunk-IF56DYJK.js.map
1216
+ //# sourceMappingURL=chunk-CPWQB3N5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DuplicateBehaviorNameError
3
- } from "./chunk-JBIV4FLR.js";
3
+ } from "./chunk-7O3Y4PPD.js";
4
4
 
5
5
  // src/with-audit/guards/registry.ts
6
6
  var GuardRegistry = class {
@@ -141,4 +141,4 @@ var GuardRegistry = class {
141
141
  export {
142
142
  GuardRegistry
143
143
  };
144
- //# sourceMappingURL=chunk-SHILAQH5.js.map
144
+ //# sourceMappingURL=chunk-DGOZ4UZD.js.map
@@ -2,21 +2,21 @@ import {
2
2
  ATTESTATIONS_COLLECTION,
3
3
  REVOKED_RECORD_ID,
4
4
  loadOrCreateSigner
5
- } from "./chunk-LFDMKZIP.js";
5
+ } from "./chunk-ANATMFIO.js";
6
6
  import {
7
7
  buildRecordAad,
8
8
  openEnvelopeJson
9
- } from "./chunk-BYBB4ABD.js";
9
+ } from "./chunk-77K4PG6P.js";
10
10
  import {
11
11
  buildRecordEnvelope
12
- } from "./chunk-QU3YUP2X.js";
12
+ } from "./chunk-SZJ3DLZA.js";
13
13
  import {
14
14
  encrypt
15
- } from "./chunk-W5LHQXZU.js";
15
+ } from "./chunk-SL3JAAKN.js";
16
16
  import {
17
17
  AttestationError,
18
18
  ConflictError
19
- } from "./chunk-JBIV4FLR.js";
19
+ } from "./chunk-7O3Y4PPD.js";
20
20
 
21
21
  // src/with-audit/attestation/revoke.ts
22
22
  import { signRevocationList } from "@noy-db/attestation";
@@ -81,4 +81,4 @@ export {
81
81
  getRevokedDocIdsCore,
82
82
  publishRevocationListCore
83
83
  };
84
- //# sourceMappingURL=chunk-BWWUXE3L.js.map
84
+ //# sourceMappingURL=chunk-ELNXJMGB.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  buildRecordEnvelope
3
- } from "./chunk-QU3YUP2X.js";
3
+ } from "./chunk-SZJ3DLZA.js";
4
4
  import {
5
5
  ValidationError
6
- } from "./chunk-JBIV4FLR.js";
6
+ } from "./chunk-7O3Y4PPD.js";
7
7
 
8
8
  // src/with-party/directory/cover/custom.ts
9
9
  var CUSTOM_KEY_PATTERN = /^[a-z0-9]+([.-][a-z0-9]+)+$/i;
@@ -230,4 +230,4 @@ export {
230
230
  resolveLocale,
231
231
  pickLocale
232
232
  };
233
- //# sourceMappingURL=chunk-44C2URL7.js.map
233
+ //# sourceMappingURL=chunk-EQEYOJBM.js.map
@@ -10,14 +10,14 @@ import {
10
10
  verifyPrompt,
11
11
  verifyRoster,
12
12
  verifyTypedEcho
13
- } from "./chunk-ZTYG36DH.js";
13
+ } from "./chunk-G56KBWFY.js";
14
14
  import {
15
15
  NoAccessError,
16
16
  NoydbError,
17
17
  ValidationError,
18
18
  WrongEchoError,
19
19
  WrongPromptError
20
- } from "./chunk-JBIV4FLR.js";
20
+ } from "./chunk-7O3Y4PPD.js";
21
21
 
22
22
  // src/with-party/team/echo-ceremony.ts
23
23
  async function beginEchoUnlock(store, vault, opts) {
@@ -122,4 +122,4 @@ export {
122
122
  MemoryDeviceSeal,
123
123
  withTeam
124
124
  };
125
- //# sourceMappingURL=chunk-Y3XWRDAM.js.map
125
+ //# sourceMappingURL=chunk-EYBQEIUY.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ValidationError
3
- } from "./chunk-JBIV4FLR.js";
3
+ } from "./chunk-7O3Y4PPD.js";
4
4
 
5
5
  // src/with-audit/periods/window.ts
6
6
  var PERIODS_COLLECTION = "_periods";
@@ -23,4 +23,4 @@ export {
23
23
  PERIOD_REOPENS_COLLECTION,
24
24
  periodExclusiveUpperBound
25
25
  };
26
- //# sourceMappingURL=chunk-Z7ZXZL6Y.js.map
26
+ //# sourceMappingURL=chunk-FAHMLERK.js.map
@@ -0,0 +1,53 @@
1
+ // src/with-formula/derivations/trigger-match.ts
2
+ function hopCollections(match) {
3
+ return [...new Set(match.flatMap((p) => p.via ? [p.via.collection] : []))];
4
+ }
5
+ function normalizeTriggerBy(triggerBy) {
6
+ if (triggerBy === void 0) return [];
7
+ return triggerBy.map((t) => ({
8
+ collection: t.collection,
9
+ match: t.match ?? [{ from: "id", to: t.on }],
10
+ ...t.maxFanout !== void 0 ? { maxFanout: t.maxFanout } : {}
11
+ }));
12
+ }
13
+ var scalar = (v) => typeof v === "string" || typeof v === "number" ? String(v) : null;
14
+ async function resolveTuple(match, writtenId, record, lookup) {
15
+ const out = [];
16
+ for (const pair of match) {
17
+ const raw = pair.from === "id" ? writtenId : scalar(record?.[pair.from]);
18
+ if (raw === null) return null;
19
+ if (pair.via === void 0) {
20
+ out.push({ field: pair.to, value: raw });
21
+ continue;
22
+ }
23
+ const intermediate = await lookup(pair.via.collection, pair.via.take, raw);
24
+ if (intermediate === null) return null;
25
+ const hopped = scalar(intermediate[pair.via.on]);
26
+ if (hopped === null) return null;
27
+ out.push({ field: pair.to, value: hopped });
28
+ }
29
+ return out;
30
+ }
31
+ function tupleFromIntermediate(match, collection, record) {
32
+ const out = [];
33
+ for (const pair of match) {
34
+ if (pair.via?.collection !== collection) continue;
35
+ const v = scalar(record?.[pair.via.on]);
36
+ if (v === null) return null;
37
+ out.push({ field: pair.to, value: v });
38
+ }
39
+ return out.length > 0 ? out : null;
40
+ }
41
+ function sameTuple(a, b) {
42
+ if (a === null || b === null) return a === b;
43
+ return a.length === b.length && a.every((p, i) => p.field === b[i].field && p.value === b[i].value);
44
+ }
45
+
46
+ export {
47
+ hopCollections,
48
+ normalizeTriggerBy,
49
+ resolveTuple,
50
+ tupleFromIntermediate,
51
+ sameTuple
52
+ };
53
+ //# sourceMappingURL=chunk-FFWI7UH7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-formula/derivations/trigger-match.ts"],"sourcesContent":["/**\n * Pure helpers behind composite `triggerBy` (#1249).\n *\n * A trigger entry is a CONJUNCTION of equality pairs: a source record\n * matches when EVERY pair satisfies String(source[to]) === String(written[from]).\n * `from: 'id'` reads the written record's id (winning over any stored field\n * named `id`, matching dispatch's `{ ...incoming, id }` convention). The\n * legacy `on` form normalizes to `[{ from: 'id', to: on }]` so everything\n * downstream has ONE shape.\n *\n * Scalar coercion is verbatim from `_findMatchingIds`: both sides must be\n * string | number; anything else fails the pair (never throws).\n * Spec: docs/superpowers/specs/2026-08-29-composite-triggerby-design.md §4-§5.\n * @module\n */\n\n/** One declared hop through an intermediate collection (#1277). */\nexport interface MatchVia {\n /** The intermediate collection to resolve through. */\n readonly collection: string\n /** Field on the intermediate whose value equals `written[from]`. */\n readonly take: string\n /** Field on the intermediate whose value is compared against `source[to]`. */\n readonly on: string\n}\n\nexport interface MatchPair {\n readonly from: string\n readonly to: string\n readonly via?: MatchVia\n}\n\n/** True when any pair in this trigger resolves through an intermediate. */\nexport function hasHop(match: ReadonlyArray<MatchPair>): boolean {\n return match.some((p) => p.via !== undefined)\n}\n\n/** Every intermediate collection named by a trigger's pairs, deduplicated. */\nexport function hopCollections(match: ReadonlyArray<MatchPair>): string[] {\n return [...new Set(match.flatMap((p) => (p.via ? [p.via.collection] : [])))]\n}\n\nexport interface NormalizedTrigger {\n readonly collection: string\n readonly match: ReadonlyArray<MatchPair>\n readonly maxFanout?: number\n}\n\ninterface RawTrigger {\n readonly collection: string\n readonly on?: string\n readonly match?: ReadonlyArray<MatchPair>\n readonly maxFanout?: number\n}\n\nexport function normalizeTriggerBy(triggerBy: ReadonlyArray<RawTrigger> | undefined): NormalizedTrigger[] {\n if (triggerBy === undefined) return []\n return triggerBy.map((t) => ({\n collection: t.collection,\n match: t.match ?? [{ from: 'id', to: t.on! }],\n ...(t.maxFanout !== undefined ? { maxFanout: t.maxFanout } : {}),\n }))\n}\n\nconst scalar = (v: unknown): string | null =>\n (typeof v === 'string' || typeof v === 'number') ? String(v) : null\n\n/**\n * Resolve one trigger's pairs into the value tuple a written record presents,\n * following any declared hop (#1277).\n *\n * Non-hop pairs behave exactly as {@link tupleFromWritten}. A hop pair reads\n * `written[from]`, finds the intermediate record whose `via.take` equals it,\n * and substitutes that record's `via.on` value — so everything downstream\n * still compares a flat `{ field, value }` tuple against source records and\n * the existing index-backed matcher is unchanged.\n *\n * Returns `null` when ANY pair cannot produce a value — a missing field, a\n * non-scalar, or an intermediate that does not resolve. That is a legitimate\n * no-match, not an error: a dangling reference addresses nothing, and refusing\n * here would turn a data condition into a thrown exception on every write.\n *\n * Supersedes the sync `tupleFromWritten`, which was DELETED rather than kept\n * (#1294): having two tuple builders that had to agree is precisely how the\n * delete path drifted — it called the unhopped one, so a mapped pair compared\n * the wrong side of the relationship and matched nothing, silently. One path\n * cannot disagree with itself.\n *\n * ONE lookup per hop per written record. `take: 'id'` is a direct `get`; any\n * other `take` is a field match on the intermediate, which uses its index when\n * one is declared.\n */\nexport async function resolveTuple(\n match: ReadonlyArray<MatchPair>,\n writtenId: string,\n record: Record<string, unknown> | null,\n lookup: (collection: string, field: string, value: string) => Promise<Record<string, unknown> | null>,\n): Promise<Array<{ field: string; value: string }> | null> {\n const out: Array<{ field: string; value: string }> = []\n for (const pair of match) {\n const raw = pair.from === 'id' ? writtenId : scalar(record?.[pair.from])\n if (raw === null) return null\n if (pair.via === undefined) {\n out.push({ field: pair.to, value: raw })\n continue\n }\n const intermediate = await lookup(pair.via.collection, pair.via.take, raw)\n if (intermediate === null) return null\n const hopped = scalar(intermediate[pair.via.on])\n if (hopped === null) return null\n out.push({ field: pair.to, value: hopped })\n }\n return out\n}\n\n/**\n * The tuple a written INTERMEDIATE record presents (#1277 option 2).\n *\n * When a record of `via.collection` is written, the sources it addresses are\n * those whose `to` equals the intermediate's own `via.on` value — no lookup is\n * needed, because the intermediate IS the written record. Pairs that do not\n * hop through this collection cannot be constrained by such a write and are\n * skipped, which makes the fan-out deliberately WIDER than a trigger write:\n * refreshing too much is recoverable, refreshing too little is the silent\n * staleness this feature exists to remove.\n *\n * Returns `null` when no pair hops through `collection`, or when the\n * intermediate carries no scalar at `via.on`.\n */\nexport function tupleFromIntermediate(\n match: ReadonlyArray<MatchPair>,\n collection: string,\n record: Record<string, unknown> | null,\n): Array<{ field: string; value: string }> | null {\n const out: Array<{ field: string; value: string }> = []\n for (const pair of match) {\n if (pair.via?.collection !== collection) continue\n const v = scalar(record?.[pair.via.on])\n if (v === null) return null\n out.push({ field: pair.to, value: v })\n }\n return out.length > 0 ? out : null\n}\n\n/** Any single component differing means NOT the same tuple (spec §7). */\nexport function sameTuple(\n a: Array<{ field: string; value: string }> | null,\n b: Array<{ field: string; value: string }> | null,\n): boolean {\n if (a === null || b === null) return a === b\n return a.length === b.length && a.every((p, i) => p.field === b[i]!.field && p.value === b[i]!.value)\n}\n\n/** Moved to the kernel (#1249) so `collection.ts` can import statically without\n * dragging derivations code into the floor bundle; re-exported here for\n * compatibility with existing consumers of this module. */\nexport { recordMatchesPairs, findMatchingIdsByPairs } from '../../kernel/match-pairs.js'\n"],"mappings":";AAsCO,SAAS,eAAe,OAA2C;AACxE,SAAO,CAAC,GAAG,IAAI,IAAI,MAAM,QAAQ,CAAC,MAAO,EAAE,MAAM,CAAC,EAAE,IAAI,UAAU,IAAI,CAAC,CAAE,CAAC,CAAC;AAC7E;AAeO,SAAS,mBAAmB,WAAuE;AACxG,MAAI,cAAc,OAAW,QAAO,CAAC;AACrC,SAAO,UAAU,IAAI,CAAC,OAAO;AAAA,IAC3B,YAAY,EAAE;AAAA,IACd,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,MAAM,IAAI,EAAE,GAAI,CAAC;AAAA,IAC5C,GAAI,EAAE,cAAc,SAAY,EAAE,WAAW,EAAE,UAAU,IAAI,CAAC;AAAA,EAChE,EAAE;AACJ;AAEA,IAAM,SAAS,CAAC,MACb,OAAO,MAAM,YAAY,OAAO,MAAM,WAAY,OAAO,CAAC,IAAI;AA2BjE,eAAsB,aACpB,OACA,WACA,QACA,QACyD;AACzD,QAAM,MAA+C,CAAC;AACtD,aAAW,QAAQ,OAAO;AACxB,UAAM,MAAM,KAAK,SAAS,OAAO,YAAY,OAAO,SAAS,KAAK,IAAI,CAAC;AACvE,QAAI,QAAQ,KAAM,QAAO;AACzB,QAAI,KAAK,QAAQ,QAAW;AAC1B,UAAI,KAAK,EAAE,OAAO,KAAK,IAAI,OAAO,IAAI,CAAC;AACvC;AAAA,IACF;AACA,UAAM,eAAe,MAAM,OAAO,KAAK,IAAI,YAAY,KAAK,IAAI,MAAM,GAAG;AACzE,QAAI,iBAAiB,KAAM,QAAO;AAClC,UAAM,SAAS,OAAO,aAAa,KAAK,IAAI,EAAE,CAAC;AAC/C,QAAI,WAAW,KAAM,QAAO;AAC5B,QAAI,KAAK,EAAE,OAAO,KAAK,IAAI,OAAO,OAAO,CAAC;AAAA,EAC5C;AACA,SAAO;AACT;AAgBO,SAAS,sBACd,OACA,YACA,QACgD;AAChD,QAAM,MAA+C,CAAC;AACtD,aAAW,QAAQ,OAAO;AACxB,QAAI,KAAK,KAAK,eAAe,WAAY;AACzC,UAAM,IAAI,OAAO,SAAS,KAAK,IAAI,EAAE,CAAC;AACtC,QAAI,MAAM,KAAM,QAAO;AACvB,QAAI,KAAK,EAAE,OAAO,KAAK,IAAI,OAAO,EAAE,CAAC;AAAA,EACvC;AACA,SAAO,IAAI,SAAS,IAAI,MAAM;AAChC;AAGO,SAAS,UACd,GACA,GACS;AACT,MAAI,MAAM,QAAQ,MAAM,KAAM,QAAO,MAAM;AAC3C,SAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,EAAG,SAAS,EAAE,UAAU,EAAE,CAAC,EAAG,KAAK;AACtG;","names":[]}
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-5D2ALSM5.js";
4
4
  import {
5
5
  RecordCodec
6
- } from "./chunk-BYBB4ABD.js";
6
+ } from "./chunk-77K4PG6P.js";
7
7
 
8
8
  // src/with-formula/materialized-views/stale.ts
9
- var loadMVExecutor = lazy(() => import("./executor-CDIMJVE2.js"));
9
+ var loadMVExecutor = lazy(() => import("./executor-PUAO6AKJ.js"));
10
10
  var _staleByRegistry = /* @__PURE__ */ new WeakMap();
11
11
  function markMVStale(registry, mvName) {
12
12
  let set = _staleByRegistry.get(registry);
@@ -134,4 +134,4 @@ export {
134
134
  clearMVStale,
135
135
  clearMVStaleFully
136
136
  };
137
- //# sourceMappingURL=chunk-EXDIHWFO.js.map
137
+ //# sourceMappingURL=chunk-FMZY5Q6L.js.map
@@ -201,7 +201,7 @@ var engineCtx = (ctx) => ({
201
201
  function withClassified() {
202
202
  return {
203
203
  async reveal(ctx, id, field) {
204
- const { revealSealedField } = await import("./reveal-X2QMWOVX.js");
204
+ const { revealSealedField } = await import("./reveal-67RDQRIN.js");
205
205
  const value = await revealSealedField({
206
206
  collection: ctx.collection,
207
207
  encrypted: ctx.encrypted,
@@ -213,26 +213,26 @@ function withClassified() {
213
213
  return value;
214
214
  },
215
215
  async verify(ctx, id, field, candidate) {
216
- const { verifyDigestField } = await import("./verify-WYOFLSNA.js");
216
+ const { verifyDigestField } = await import("./verify-KOV2G5D6.js");
217
217
  const verdict = await verifyDigestField(engineCtx(ctx), id, field, candidate, policyOf(ctx.spec));
218
218
  await ctx.onAccess?.("verify", id);
219
219
  return verdict;
220
220
  },
221
221
  async verifyText(ctx, id, field, candidate) {
222
- const { verifyTextField } = await import("./verify-WYOFLSNA.js");
222
+ const { verifyTextField } = await import("./verify-KOV2G5D6.js");
223
223
  const verdict = await verifyTextField(engineCtx(ctx), id, field, candidate, ctx.spec.verifyNormalize ?? "password");
224
224
  await ctx.onAccess?.("verify", id);
225
225
  return verdict;
226
226
  },
227
227
  async matchGroup(ctx, id, answers, opts) {
228
- const { matchGroupFields } = await import("./verify-WYOFLSNA.js");
228
+ const { matchGroupFields } = await import("./verify-KOV2G5D6.js");
229
229
  const members = (ctx.groupMembers ?? []).map((m) => ({ field: m.field, policy: policyOf(m.spec) }));
230
230
  const result = await matchGroupFields(engineCtx(ctx), id, answers, members, opts);
231
231
  await ctx.onAccess?.("verify", id);
232
232
  return result;
233
233
  },
234
234
  async computeTarget(ctx, field, candidate, costByte) {
235
- const { computeBidxTarget } = await import("./find-SZBL2HPB.js");
235
+ const { computeBidxTarget } = await import("./find-2ABFCZX4.js");
236
236
  const dek = await ctx.getDEK();
237
237
  return computeBidxTarget(candidate, policyOf(ctx.spec).normalize, dek, ctx.collection, field, costByte);
238
238
  }
@@ -244,4 +244,4 @@ export {
244
244
  classified,
245
245
  withClassified
246
246
  };
247
- //# sourceMappingURL=chunk-H6WXKZL7.js.map
247
+ //# sourceMappingURL=chunk-FXBIP2WD.js.map
@@ -5,18 +5,18 @@ import {
5
5
  readDirectoryConfig,
6
6
  readUserVisibility,
7
7
  saveUserEnvelope
8
- } from "./chunk-26W5VETY.js";
8
+ } from "./chunk-KG7TZKZG.js";
9
9
  import {
10
10
  parseDekKey
11
- } from "./chunk-POS53FG6.js";
11
+ } from "./chunk-JMGDHKQF.js";
12
12
  import {
13
13
  envelopeOpensUnderAny,
14
14
  rekeyBlobSet,
15
15
  rekeyEnvelopeIfNeeded
16
- } from "./chunk-BYBB4ABD.js";
16
+ } from "./chunk-77K4PG6P.js";
17
17
  import {
18
18
  buildRecordEnvelope
19
- } from "./chunk-QU3YUP2X.js";
19
+ } from "./chunk-SZJ3DLZA.js";
20
20
  import {
21
21
  base64ToBuffer,
22
22
  bufferToBase64,
@@ -31,10 +31,10 @@ import {
31
31
  generateSalt,
32
32
  unwrapKey,
33
33
  wrapKey
34
- } from "./chunk-W5LHQXZU.js";
34
+ } from "./chunk-SL3JAAKN.js";
35
35
  import {
36
36
  NOYDB_KEYRING_VERSION
37
- } from "./chunk-GU3LQYW2.js";
37
+ } from "./chunk-7MG7SJT7.js";
38
38
  import {
39
39
  BLOB_ADDRESS_KEY_ID,
40
40
  DirectoryDisabledError,
@@ -51,7 +51,21 @@ import {
51
51
  USER_ENVELOPE_COLLECTION,
52
52
  ValidationError,
53
53
  WrongPromptError
54
- } from "./chunk-JBIV4FLR.js";
54
+ } from "./chunk-7O3Y4PPD.js";
55
+
56
+ // src/with-party/team/roster-epoch.ts
57
+ function assertRosterEpochCurrent(found, expected, userId) {
58
+ if (expected === void 0) return;
59
+ if (found === void 0) {
60
+ throw new KeyringTamperedError({ userId, reason: "roster-epoch-absent" });
61
+ }
62
+ if (!Number.isFinite(found) || found < expected) {
63
+ throw new KeyringTamperedError({ userId, reason: "roster-epoch-rewound" });
64
+ }
65
+ }
66
+ function nextRosterEpoch(current) {
67
+ return Number.isFinite(current) ? current + 1 : 1;
68
+ }
55
69
 
56
70
  // src/with-party/team/roster-tag.ts
57
71
  function stable(value) {
@@ -89,7 +103,24 @@ function rosterCanonical(file) {
89
103
  pending_dek_slots: Object.keys(file.pending_deks ?? {}).sort(),
90
104
  expires_at: file.expires_at ?? null,
91
105
  export_capability: file.export_capability ?? null,
92
- import_capability: file.import_capability ?? null
106
+ import_capability: file.import_capability ?? null,
107
+ // #1097 — the roster epoch, bound ONLY WHEN PRESENT.
108
+ //
109
+ // The conditional spread is the entire backward-compatibility story, not a
110
+ // style choice. `stable()` drops `undefined`, so a file written before the
111
+ // epoch existed produces the byte-identical canonical string it always did
112
+ // and its roster tag still verifies. Writing `file.roster_epoch ?? null` —
113
+ // the shape every other optional field above uses — would have changed that
114
+ // string for every existing keyring, failed every existing tag, and
115
+ // rendered every existing vault unopenable. #1115 took exactly that cost
116
+ // deliberately; there is no reason to take it again for a field that can be
117
+ // additive.
118
+ //
119
+ // A PRESENT epoch is authenticated: stripping it changes the canonical and
120
+ // the tag stops verifying, so a store cannot downgrade a file to the
121
+ // no-epoch shape. It can only replay a file that genuinely never had one,
122
+ // which is why absence must read as UNKNOWN rather than as zero.
123
+ ...file.roster_epoch !== void 0 ? { roster_epoch: file.roster_epoch } : {}
93
124
  });
94
125
  }
95
126
  async function mintRosterTag(file, rosterKey) {
@@ -531,13 +562,14 @@ async function createOwnerKeyring(store, vault, opts) {
531
562
  [BLOB_ADDRESS_KEY_ID]: wrappedBlobAddressKey
532
563
  }
533
564
  };
565
+ const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(void 0) };
534
566
  const keyringFile = {
535
567
  _noydb_keyring: NOYDB_KEYRING_VERSION,
536
- ...authorityWithDeks,
568
+ ...withEpoch,
537
569
  salt: bufferToBase64(salt),
538
570
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
539
571
  canary,
540
- roster_tag: await mintRosterTag(authorityWithDeks, rosterKey),
572
+ roster_tag: await mintRosterTag(withEpoch, rosterKey),
541
573
  // The presence of this block is what makes the keyring an echo keyring —
542
574
  // `deriveKekForKeyring` reads it to refuse a single-string unlock (AG-1).
543
575
  ...typeof secret !== "string" ? {
@@ -637,15 +669,16 @@ async function grant(store, vault, callerKeyring, options) {
637
669
  ...options.importCapability !== void 0 && { import_capability: options.importCapability }
638
670
  };
639
671
  const authorityWithDeks = { ...authority, deks: wrappedDeks };
672
+ const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(previousGrantFound?.file.roster_epoch) };
640
673
  const keyringFile = {
641
674
  _noydb_keyring: NOYDB_KEYRING_VERSION,
642
- ...authorityWithDeks,
675
+ ...withEpoch,
643
676
  salt: bufferToBase64(newSalt),
644
677
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
645
678
  canary,
646
679
  // The grantee's own copy of the roster key rode in via the `_`-prefix
647
680
  // propagation loop above, so they can verify this tag on first unlock.
648
- roster_tag: await mintRosterTag(authorityWithDeks, callerRosterKey)
681
+ roster_tag: await mintRosterTag(withEpoch, callerRosterKey)
649
682
  };
650
683
  await writeKeyringFile(store, vault, options.userId, keyringFile);
651
684
  if (previousDekNames !== null && options.userId !== callerKeyring.userId) {
@@ -873,7 +906,8 @@ async function updateKeyringIdentity(store, vault, callerKeyring, options) {
873
906
  },
874
907
  ...options.permissions !== void 0 && { permissions: options.permissions }
875
908
  };
876
- const next = { ...edited, roster_tag: await mintRosterTag(edited, rosterKey) };
909
+ const withEpoch = { ...edited, roster_epoch: nextRosterEpoch(target.roster_epoch) };
910
+ const next = { ...withEpoch, roster_tag: await mintRosterTag(withEpoch, rosterKey) };
877
911
  await writeKeyringFile(store, vault, options.userId, next);
878
912
  }
879
913
  var HISTORY_COLLECTION = "_history";
@@ -1011,9 +1045,10 @@ async function rotateKeys(store, vault, callerKeyring, opts) {
1011
1045
  deks: updatedDeks,
1012
1046
  permissions: updatedPermissions
1013
1047
  };
1048
+ const withEpoch = { ...edited, roster_epoch: nextRosterEpoch(userKeyringFile.roster_epoch) };
1014
1049
  const updatedKeyring = {
1015
- ...edited,
1016
- roster_tag: await mintRosterTag(edited, callerRosterKey)
1050
+ ...withEpoch,
1051
+ roster_tag: await mintRosterTag(withEpoch, callerRosterKey)
1017
1052
  };
1018
1053
  await writeKeyringFile(store, vault, userId, updatedKeyring);
1019
1054
  }
@@ -1050,13 +1085,14 @@ async function changeSecret(store, vault, keyring, opts) {
1050
1085
  ...existingAuthority?.import_capability !== void 0 && { import_capability: existingAuthority.import_capability }
1051
1086
  };
1052
1087
  const authorityWithDeks = { ...authority, deks: wrappedDeks };
1088
+ const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(existingAuthority?.roster_epoch) };
1053
1089
  const keyringFile = {
1054
1090
  _noydb_keyring: NOYDB_KEYRING_VERSION,
1055
- ...authorityWithDeks,
1091
+ ...withEpoch,
1056
1092
  salt: bufferToBase64(newSalt),
1057
1093
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1058
1094
  canary,
1059
- roster_tag: await mintRosterTag(authorityWithDeks, rosterKey)
1095
+ roster_tag: await mintRosterTag(withEpoch, rosterKey)
1060
1096
  };
1061
1097
  await writeKeyringFile(store, vault, keyring.userId, keyringFile);
1062
1098
  return {
@@ -1124,15 +1160,16 @@ async function buildRecipientKeyringFile(callerKeyring, recipient) {
1124
1160
  ...recipient.expiresAt !== void 0 ? { expires_at: recipient.expiresAt } : {}
1125
1161
  };
1126
1162
  const authorityWithDeks = { ...authority, deks: wrappedDeks };
1163
+ const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(void 0) };
1127
1164
  return {
1128
1165
  _noydb_keyring: NOYDB_KEYRING_VERSION,
1129
- ...authorityWithDeks,
1166
+ ...withEpoch,
1130
1167
  salt: bufferToBase64(newSalt),
1131
1168
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1132
1169
  canary,
1133
1170
  // The recipient's copy of the roster key rode in via the `_`-prefix
1134
1171
  // propagation loop above, so the slot verifies on first unlock.
1135
- roster_tag: await mintRosterTag(authorityWithDeks, rosterKey),
1172
+ roster_tag: await mintRosterTag(withEpoch, rosterKey),
1136
1173
  // The presence of this block is what makes the recipient's slot an
1137
1174
  // echo keyring — mirrors `createOwnerKeyring`'s same dance so the
1138
1175
  // ceremony (prompt → echo → key) travels with the pod, not just a
@@ -1291,13 +1328,14 @@ async function persistKeyring(store, vault, keyring) {
1291
1328
  deks: wrappedDeks,
1292
1329
  ...Object.keys(wrappedPending).length > 0 ? { pending_deks: wrappedPending } : {}
1293
1330
  };
1331
+ const withEpoch = { ...authorityWithDeks, roster_epoch: nextRosterEpoch(existingFound?.file.roster_epoch) };
1294
1332
  const keyringFile = {
1295
1333
  _noydb_keyring: NOYDB_KEYRING_VERSION,
1296
- ...authorityWithDeks,
1334
+ ...withEpoch,
1297
1335
  salt: bufferToBase64(keyring.salt),
1298
1336
  created_at: existingCreatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
1299
1337
  canary,
1300
- roster_tag: await mintRosterTag(authorityWithDeks, rosterKey),
1338
+ roster_tag: await mintRosterTag(withEpoch, rosterKey),
1301
1339
  ...keyring.authenticators.length > 0 && { authenticators: keyring.authenticators },
1302
1340
  ...keyring.policy !== void 0 && { policy: keyring.policy },
1303
1341
  ...existingEcho !== void 0 && { echo: existingEcho }
@@ -1342,6 +1380,11 @@ function resolvePermissions(role, explicit) {
1342
1380
  return explicit ?? {};
1343
1381
  }
1344
1382
  async function writeKeyringFile(store, vault, userId, keyringFile) {
1383
+ if (keyringFile.roster_epoch === void 0) {
1384
+ throw new Error(
1385
+ `writeKeyringFile: refusing to write a keyring for "${userId}" with no roster_epoch (#1097). Stamp it with nextRosterEpoch(previous) onto the authority object BEFORE minting the roster tag, so it is covered by rosterCanonical.`
1386
+ );
1387
+ }
1345
1388
  const envelope = buildRecordEnvelope(
1346
1389
  { collection: "_keyring", id: userId, version: 1 },
1347
1390
  { iv: "", data: JSON.stringify(keyringFile) }
@@ -1350,6 +1393,8 @@ async function writeKeyringFile(store, vault, userId, keyringFile) {
1350
1393
  }
1351
1394
 
1352
1395
  export {
1396
+ assertRosterEpochCurrent,
1397
+ nextRosterEpoch,
1353
1398
  mintRosterTag,
1354
1399
  assertRosterAuthenticated,
1355
1400
  assertRosterTagValid,
@@ -1395,4 +1440,4 @@ export {
1395
1440
  hasImportCapability,
1396
1441
  evaluateImportCapability
1397
1442
  };
1398
- //# sourceMappingURL=chunk-ZTYG36DH.js.map
1443
+ //# sourceMappingURL=chunk-G56KBWFY.js.map