@noy-db/hub 0.7.0-pre.9 → 0.7.1-pre.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 (452) hide show
  1. package/CHANGELOG.md +1327 -0
  2. package/README.md +29 -11
  3. package/dist/api-WYW4YEQG.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-QZQEP5RO.js → backup-XKCXVKV3.js} +23 -18
  9. package/dist/backup-XKCXVKV3.js.map +1 -0
  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-5UKIZIO3.js → chunk-2577DKXB.js} +2 -2
  17. package/dist/{chunk-SWFIXQF5.js → chunk-2ENE6445.js} +6 -6
  18. package/dist/{chunk-HLFLJCDX.js → chunk-2N5ML6HT.js} +7 -7
  19. package/dist/{chunk-X6YRP5EC.js → chunk-334WSVOW.js} +5 -5
  20. package/dist/{chunk-5EC7X5QA.js → chunk-3BVH633C.js} +5 -5
  21. package/dist/chunk-3BZZJJMQ.js +176 -0
  22. package/dist/chunk-3BZZJJMQ.js.map +1 -0
  23. package/dist/{chunk-7XT7KZTN.js → chunk-3PGS7TYR.js} +10 -10
  24. package/dist/{chunk-OHGCRKWA.js → chunk-3V4KWFX7.js} +18 -8
  25. package/dist/chunk-3V4KWFX7.js.map +1 -0
  26. package/dist/{chunk-AHIIBDNH.js → chunk-3VF3WQ4F.js} +7 -7
  27. package/dist/{chunk-GM4IM7TC.js → chunk-453F654R.js} +2 -2
  28. package/dist/{chunk-5W5CEHLA.js → chunk-4GFX6MPA.js} +6 -6
  29. package/dist/{chunk-JUBWUJY5.js → chunk-4GVM6QZA.js} +2 -2
  30. package/dist/{chunk-2DGBRE4K.js → chunk-4OZNXTO4.js} +2 -2
  31. package/dist/{chunk-DOPZWTMJ.js → chunk-4ZS56W5S.js} +8 -8
  32. package/dist/{chunk-P2RJAVMR.js → chunk-5VCRVKOZ.js} +4 -4
  33. package/dist/chunk-66TQOPFM.js +37 -0
  34. package/dist/chunk-66TQOPFM.js.map +1 -0
  35. package/dist/{chunk-FN26SFGH.js → chunk-6LKOJBV6.js} +2 -2
  36. package/dist/{chunk-P7KJME6C.js → chunk-6YXCPL4T.js} +2 -2
  37. package/dist/{chunk-IS5LFHV2.js → chunk-7APJ6CO6.js} +7 -7
  38. package/dist/{chunk-LAI7ENPW.js → chunk-7MG2LHO5.js} +3 -3
  39. package/dist/{chunk-N4CHCXDL.js → chunk-7MG7SJT7.js} +1 -1
  40. package/dist/{chunk-N4CHCXDL.js.map → chunk-7MG7SJT7.js.map} +1 -1
  41. package/dist/{chunk-SW4TOSJL.js → chunk-7O3Y4PPD.js} +1 -1
  42. package/dist/chunk-7O3Y4PPD.js.map +1 -0
  43. package/dist/{chunk-MU74BYOD.js → chunk-A2HKRLPV.js} +3 -3
  44. package/dist/{chunk-357ECVLE.js → chunk-A66I4JOA.js} +3 -3
  45. package/dist/{chunk-VT4DTCK5.js → chunk-ACAQ2DSG.js} +3 -3
  46. package/dist/chunk-ACAQ2DSG.js.map +1 -0
  47. package/dist/{chunk-TAJZ7GXO.js → chunk-AYX7AINO.js} +3 -3
  48. package/dist/{chunk-RPX2H2OL.js → chunk-BLN54W3L.js} +3 -3
  49. package/dist/{chunk-XGXVPCYW.js → chunk-BRLKZUBT.js} +3 -3
  50. package/dist/{chunk-CWFH36SI.js → chunk-BTDR2PXY.js} +2 -2
  51. package/dist/{chunk-65ZYRK7O.js → chunk-BUE2D7PX.js} +26 -3
  52. package/dist/chunk-BUE2D7PX.js.map +1 -0
  53. package/dist/{chunk-RCONOOVF.js → chunk-BVN6KXL2.js} +5 -5
  54. package/dist/chunk-BVN6KXL2.js.map +1 -0
  55. package/dist/{chunk-UTFY6W6X.js → chunk-BZ3534YM.js} +2 -2
  56. package/dist/{chunk-KZTPL7NL.js → chunk-CHQCZZWC.js} +2 -2
  57. package/dist/chunk-CUQPWYRX.js +1652 -0
  58. package/dist/chunk-CUQPWYRX.js.map +1 -0
  59. package/dist/{chunk-MQPHKJ74.js → chunk-DFMWUOU5.js} +12 -12
  60. package/dist/{chunk-3GIA3HJ2.js → chunk-DGOZ4UZD.js} +2 -2
  61. package/dist/{chunk-NMDMSHBF.js → chunk-EQEYOJBM.js} +3 -3
  62. package/dist/{chunk-OQDHIAR2.js → chunk-F3W6YMDC.js} +80 -8
  63. package/dist/chunk-F3W6YMDC.js.map +1 -0
  64. package/dist/{chunk-Q2ZN5DWZ.js → chunk-FAHMLERK.js} +2 -2
  65. package/dist/{chunk-PCIBCL26.js → chunk-FET5XCAT.js} +7 -5
  66. package/dist/{chunk-PCIBCL26.js.map → chunk-FET5XCAT.js.map} +1 -1
  67. package/dist/chunk-FFWI7UH7.js +53 -0
  68. package/dist/chunk-FFWI7UH7.js.map +1 -0
  69. package/dist/{chunk-GKOJR53Y.js → chunk-G73UVHCA.js} +5 -5
  70. package/dist/{chunk-H5GVPOB4.js → chunk-GPNTB4Y7.js} +5 -5
  71. package/dist/{chunk-DNMTN46H.js → chunk-GY4WYNNG.js} +2 -2
  72. package/dist/{chunk-HS3LEVT4.js → chunk-HIWCKBEY.js} +7 -7
  73. package/dist/{chunk-UL7TLJ54.js → chunk-HJUWN7JN.js} +6 -4
  74. package/dist/{chunk-UL7TLJ54.js.map → chunk-HJUWN7JN.js.map} +1 -1
  75. package/dist/{chunk-USKHHOIV.js → chunk-HPVZCW43.js} +30 -2
  76. package/dist/chunk-HPVZCW43.js.map +1 -0
  77. package/dist/{chunk-PV7XXAXK.js → chunk-JBDFMYKQ.js} +2 -2
  78. package/dist/{chunk-IZTU6RKH.js → chunk-JMGDHKQF.js} +2 -2
  79. package/dist/{chunk-P22XPNFW.js → chunk-JVIBCBC7.js} +2 -2
  80. package/dist/{chunk-OLUTCM23.js → chunk-K23VKTN4.js} +7 -7
  81. package/dist/{chunk-3SWP2FYA.js → chunk-KKEESNPE.js} +8 -8
  82. package/dist/{chunk-ZB2K3FV7.js → chunk-KTFRCC5C.js} +2 -2
  83. package/dist/{chunk-IAHDSFFA.js → chunk-LH5A3ZPG.js} +10 -10
  84. package/dist/{chunk-QOHGWFAW.js → chunk-LWBCUYZW.js} +2 -2
  85. package/dist/{chunk-5NKHCJU5.js → chunk-M4YPHYEH.js} +8 -8
  86. package/dist/{chunk-JFSUYGNE.js → chunk-MVMXZYXT.js} +2 -2
  87. package/dist/{chunk-FKQCC4C5.js → chunk-NQKIUNW5.js} +2 -2
  88. package/dist/{chunk-Q2OAAREU.js → chunk-OTQZ7ZWU.js} +6 -6
  89. package/dist/{chunk-MOQ6OGKS.js → chunk-P3MG6QCN.js} +4 -4
  90. package/dist/{chunk-75WNTBZL.js → chunk-PPTHY5QO.js} +3 -3
  91. package/dist/{chunk-TQGT5BZE.js → chunk-Q2MPFCQ7.js} +4 -4
  92. package/dist/{chunk-MTTPHBIE.js → chunk-Q2PU57HC.js} +2 -2
  93. package/dist/{chunk-FLRLZ4XZ.js → chunk-Q7HZX3IF.js} +2 -2
  94. package/dist/{chunk-KQIDBIZL.js → chunk-QIZPZMUI.js} +2 -2
  95. package/dist/{chunk-JRWLUWDM.js → chunk-QPQUVOZ2.js} +3 -3
  96. package/dist/{chunk-7YVSWPZB.js → chunk-QTQUH4DS.js} +7 -7
  97. package/dist/{chunk-2MQ2D5OZ.js → chunk-R42NSZI6.js} +5 -5
  98. package/dist/{chunk-FRIVOR5N.js → chunk-R7BX2NB3.js} +5 -172
  99. package/dist/chunk-R7BX2NB3.js.map +1 -0
  100. package/dist/{chunk-HOIWW2LV.js → chunk-RF6D3Y5E.js} +4 -4
  101. package/dist/{chunk-OEJ4R52I.js → chunk-RMS3NEA3.js} +2 -2
  102. package/dist/{chunk-FPN5D4JX.js → chunk-RSGLUIO6.js} +6 -6
  103. package/dist/chunk-RTBJ5IOO.js +87 -0
  104. package/dist/chunk-RTBJ5IOO.js.map +1 -0
  105. package/dist/chunk-RXLYKVTF.js +17 -0
  106. package/dist/chunk-RXLYKVTF.js.map +1 -0
  107. package/dist/{chunk-XKA6UH5V.js → chunk-SFAWCTEM.js} +2 -2
  108. package/dist/{chunk-I5LSKXT6.js → chunk-SGZAIJCV.js} +4 -4
  109. package/dist/{chunk-FYT3DXPN.js → chunk-SKGMN35F.js} +2 -2
  110. package/dist/chunk-SMH6SRX7.js +87 -0
  111. package/dist/chunk-SMH6SRX7.js.map +1 -0
  112. package/dist/{chunk-JILOSL4O.js → chunk-SPYWXKJN.js} +3 -3
  113. package/dist/{chunk-4RUFYGWG.js → chunk-SZJ3DLZA.js} +2 -2
  114. package/dist/chunk-TFMM5DBB.js +20 -0
  115. package/dist/chunk-TFMM5DBB.js.map +1 -0
  116. package/dist/{chunk-O3SNM66K.js → chunk-TFR7DSOV.js} +2 -2
  117. package/dist/{chunk-DIVY2CJZ.js → chunk-TRGTKX5E.js} +3 -3
  118. package/dist/{chunk-JY4U6CYV.js → chunk-TUFM4UZP.js} +2 -2
  119. package/dist/{chunk-LUVGSKXE.js → chunk-UDHWDSRL.js} +6 -6
  120. package/dist/{chunk-DZPMKY3J.js → chunk-UGTBXF5U.js} +3 -3
  121. package/dist/{chunk-K432FT7T.js → chunk-UHHPLO3I.js} +4 -4
  122. package/dist/{chunk-THNJ3IKU.js → chunk-ULUMAZ5S.js} +2 -2
  123. package/dist/{chunk-QJLOWGOU.js → chunk-UP4BECPY.js} +12 -82
  124. package/dist/chunk-UP4BECPY.js.map +1 -0
  125. package/dist/{chunk-YHIAWECL.js → chunk-UXVWEX5L.js} +2 -2
  126. package/dist/{chunk-NO272T7Q.js → chunk-V4PXLYWM.js} +2 -31
  127. package/dist/chunk-V4PXLYWM.js.map +1 -0
  128. package/dist/{chunk-OKCQNMO6.js → chunk-V7ZRRCRJ.js} +6 -6
  129. package/dist/{chunk-GHADG5QZ.js → chunk-VTFVLCUH.js} +2 -2
  130. package/dist/{chunk-U3RMWOXY.js → chunk-VXANTWBJ.js} +3 -3
  131. package/dist/{chunk-KHKKD62N.js → chunk-VYYM3MEN.js} +2 -16
  132. package/dist/chunk-VYYM3MEN.js.map +1 -0
  133. package/dist/{chunk-VTTDPGEK.js → chunk-WQBG4SZS.js} +26 -57
  134. package/dist/chunk-WQBG4SZS.js.map +1 -0
  135. package/dist/{chunk-MV2OEK3K.js → chunk-XKWGNJ26.js} +5 -5
  136. package/dist/{chunk-2E2LT37H.js → chunk-XLMEZIAJ.js} +2 -2
  137. package/dist/{chunk-RHTPGS56.js → chunk-YJRT5UQM.js} +3 -3
  138. package/dist/{chunk-FZWAGG5T.js → chunk-YJX7EOJD.js} +6 -6
  139. package/dist/{chunk-ZQGRZN5L.js → chunk-YYP7WSEB.js} +2 -2
  140. package/dist/{chunk-MENI33ZV.js → chunk-ZHKOPKE3.js} +3 -3
  141. package/dist/{chunk-4U52PMEL.js → chunk-ZN4FD4PE.js} +4 -4
  142. package/dist/{chunk-AW4KTQA4.js → chunk-ZORTV6NH.js} +2 -2
  143. package/dist/{chunk-6L5IMNJX.js → chunk-ZYIYHJ5R.js} +236 -1333
  144. package/dist/chunk-ZYIYHJ5R.js.map +1 -0
  145. package/dist/classified/index.js +5 -6
  146. package/dist/{classified-marker-R37XW5PC.js → classified-marker-BWOFVYAC.js} +3 -5
  147. package/dist/{classified-marker-R37XW5PC.js.map → classified-marker-BWOFVYAC.js.map} +1 -1
  148. package/dist/collection-facade-JSJYIKS4.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-GRT6RAML.js → dead-filter-PKQDLOT4.js} +2 -3
  157. package/dist/{dead-filter-GRT6RAML.js.map → dead-filter-PKQDLOT4.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-6QRAYSK6.js → delegation-DS5NRILW.js} +11 -12
  161. package/dist/{delegation-6QRAYSK6.js.map → delegation-DS5NRILW.js.map} +1 -1
  162. package/dist/derivations/index.js +30 -16
  163. package/dist/derive-E642AOUB.js +21 -0
  164. package/dist/directory/index.js +10 -11
  165. package/dist/{dispatch-QCF7KPIP.js → dispatch-IEPAVQUM.js} +5 -7
  166. package/dist/{dispatch-QCF7KPIP.js.map → dispatch-IEPAVQUM.js.map} +1 -1
  167. package/dist/dispatch-Q6MWLOJY.js +302 -0
  168. package/dist/dispatch-Q6MWLOJY.js.map +1 -0
  169. package/dist/{enclave-OXZY3NOP.js → enclave-55PAM4YO.js} +15 -10
  170. package/dist/executor-5NIMLSKZ.js +8 -0
  171. package/dist/executor-7UQ3BZ4F.js +29 -0
  172. package/dist/executor-AQVXV5GZ.js +8 -0
  173. package/dist/export-accessible-ORMKLA3E.js +22 -0
  174. package/dist/extract-partition-NKYO3WNG.js +37 -0
  175. package/dist/{fanout-sidecar-KGQCUJ7P.js → fanout-sidecar-S3QL53YX.js} +9 -10
  176. package/dist/{fanout-sidecar-KGQCUJ7P.js.map → fanout-sidecar-S3QL53YX.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-NOGJ25VX.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 +21 -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-3DTQ7VJJ.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/enclave/crypto.d.ts +16 -0
  199. package/dist/kernel/enclave/index.d.ts +1 -1
  200. package/dist/kernel/errors.d.ts +28 -0
  201. package/dist/kernel/match-pairs.d.ts +30 -0
  202. package/dist/kernel/memory-store.d.ts +35 -7
  203. package/dist/kernel/types.d.ts +39 -0
  204. package/dist/lazy/index.js +3 -3
  205. package/dist/{ledger-ZAFULLAF.js → ledger-EDXFFZQL.js} +11 -12
  206. package/dist/liberate-V35QUHJP.js +24 -0
  207. package/dist/link-set-2TTM3IZC.js +30 -0
  208. package/dist/{managed-secret-7OH7HKXV.js → managed-secret-NCWEMPUQ.js} +10 -11
  209. package/dist/materialized-views/index.js +21 -21
  210. package/dist/{migrate-cek-QHZ75E6E.js → migrate-cek-5ENH64AA.js} +2 -3
  211. package/dist/{migrate-cek-QHZ75E6E.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
  212. package/dist/money/index.js +4 -5
  213. package/dist/noydb-62MX4QUG.js +90 -0
  214. package/dist/overlay-views/index.js +4 -5
  215. package/dist/periods/index.js +12 -13
  216. package/dist/pod/index.js +64 -60
  217. package/dist/{pod-handle-BLOI4IFY.js → pod-handle-ECVCDIXW.js} +10 -11
  218. package/dist/{pod-handle-BLOI4IFY.js.map → pod-handle-ECVCDIXW.js.map} +1 -1
  219. package/dist/policy/index.js +10 -11
  220. package/dist/port/to/index.d.ts +40 -0
  221. package/dist/portability/index.js +8 -9
  222. package/dist/portability/index.js.map +1 -1
  223. package/dist/{post-register-R33EKJQR.js → post-register-3IPCSG6Q.js} +6 -7
  224. package/dist/{post-register-R33EKJQR.js.map → post-register-3IPCSG6Q.js.map} +1 -1
  225. package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
  226. package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
  227. package/dist/query/index.js +3 -4
  228. package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
  229. package/dist/reduce/index.js +4 -5
  230. package/dist/reduce/index.js.map +1 -1
  231. package/dist/register-HHLXEQDN.js +31 -0
  232. package/dist/registry-23WF3TGH.js +8 -0
  233. package/dist/registry-4AYVUNXK.js +8 -0
  234. package/dist/registry-JS3YFQQM.js +18 -0
  235. package/dist/registry-XX2Z7B46.js +32 -0
  236. package/dist/request-withdrawal-CHPATE4G.js +30 -0
  237. package/dist/{reveal-PI6ADRQU.js → reveal-QZDHSGD4.js} +6 -7
  238. package/dist/{reveal-PI6ADRQU.js.map → reveal-QZDHSGD4.js.map} +1 -1
  239. package/dist/revoke-7M2VW4ON.js +23 -0
  240. package/dist/satellites/index.js +1 -2
  241. package/dist/schema-update/index.js +2 -3
  242. package/dist/sealed-record/index.js +12 -13
  243. package/dist/sealed-record/index.js.map +1 -1
  244. package/dist/search/index.js +4 -5
  245. package/dist/{seed-CG7JMJNY.js → seed-X5CC22CQ.js} +12 -13
  246. package/dist/{seed-CG7JMJNY.js.map → seed-X5CC22CQ.js.map} +1 -1
  247. package/dist/sequence/index.js +9 -10
  248. package/dist/session/index.js +9 -10
  249. package/dist/session/index.js.map +1 -1
  250. package/dist/shadow/index.js +2 -3
  251. package/dist/shadow/index.js.map +1 -1
  252. package/dist/share-link/index.js +0 -1
  253. package/dist/share-link/index.js.map +1 -1
  254. package/dist/signer-SJQJVSM6.js +24 -0
  255. package/dist/snapshots/index.js +10 -11
  256. package/dist/snapshots/index.js.map +1 -1
  257. package/dist/{stale-HZR7745Y.js → stale-BZS6H2RY.js} +10 -11
  258. package/dist/storage-RW4QBS23.js +22 -0
  259. package/dist/store/index.js +0 -1
  260. package/dist/{store-coordination-provider-MYIHSZXT.js → store-coordination-provider-4WZAIRHC.js} +10 -11
  261. package/dist/{store-coordination-provider-MYIHSZXT.js.map → store-coordination-provider-4WZAIRHC.js.map} +1 -1
  262. package/dist/sync/index.js +10 -11
  263. package/dist/sync/index.js.map +1 -1
  264. package/dist/team/index.js +15 -16
  265. package/dist/tiers/index.js +11 -12
  266. package/dist/to/index.js +2 -3
  267. package/dist/to/index.js.map +1 -1
  268. package/dist/transactions/index.js +3 -4
  269. package/dist/transactions/index.js.map +1 -1
  270. package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
  271. package/dist/util/index.js +1 -2
  272. package/dist/util/index.js.map +1 -1
  273. package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
  274. package/dist/vault-head/index.js +8 -9
  275. package/dist/vault-head/index.js.map +1 -1
  276. package/dist/{verify-R6CCBUA3.js → verify-6MDTIUEV.js} +5 -6
  277. package/dist/{verify-R6CCBUA3.js.map → verify-6MDTIUEV.js.map} +1 -1
  278. package/dist/walk-ZURCH6RZ.js +21 -0
  279. package/dist/with-formula/derivations/dispatch.d.ts +16 -1
  280. package/dist/with-formula/derivations/registry.d.ts +20 -0
  281. package/dist/with-formula/derivations/trigger-match.d.ts +104 -0
  282. package/dist/with-formula/derivations/types.d.ts +61 -0
  283. package/dist/with-party/team/keyring.d.ts +12 -5
  284. package/dist/with-party/team/wrapped-deks.d.ts +4 -4
  285. package/dist/with-pod/pod.d.ts +4 -4
  286. package/dist/with-shape/introspection/behaviors.d.ts +7 -0
  287. package/dist/with-shape/introspection/describe.d.ts +10 -1
  288. package/dist/with-shape/introspection/field-meta.d.ts +86 -0
  289. package/dist/withdraw-accessible-PXR4IXDX.js +27 -0
  290. package/package.json +8 -3
  291. package/dist/api-GJQF7OAJ.js +0 -20
  292. package/dist/backup-QZQEP5RO.js.map +0 -1
  293. package/dist/chunk-65ZYRK7O.js.map +0 -1
  294. package/dist/chunk-6L5IMNJX.js.map +0 -1
  295. package/dist/chunk-FRIVOR5N.js.map +0 -1
  296. package/dist/chunk-J6FXVDKC.js +0 -81
  297. package/dist/chunk-J6FXVDKC.js.map +0 -1
  298. package/dist/chunk-KHKKD62N.js.map +0 -1
  299. package/dist/chunk-NO272T7Q.js.map +0 -1
  300. package/dist/chunk-OHGCRKWA.js.map +0 -1
  301. package/dist/chunk-OQDHIAR2.js.map +0 -1
  302. package/dist/chunk-PZ5AY32C.js +0 -10
  303. package/dist/chunk-QJLOWGOU.js.map +0 -1
  304. package/dist/chunk-RCONOOVF.js.map +0 -1
  305. package/dist/chunk-SW4TOSJL.js.map +0 -1
  306. package/dist/chunk-USKHHOIV.js.map +0 -1
  307. package/dist/chunk-VT4DTCK5.js.map +0 -1
  308. package/dist/chunk-VTTDPGEK.js.map +0 -1
  309. package/dist/chunk-XJP66QEN.js +0 -344
  310. package/dist/chunk-XJP66QEN.js.map +0 -1
  311. package/dist/collection-facade-OPJ3EC4L.js +0 -45
  312. package/dist/computed-HW6IG5UH.js +0 -11
  313. package/dist/derive-AAIXSQIE.js +0 -22
  314. package/dist/dispatch-DR3XITEC.js +0 -194
  315. package/dist/dispatch-DR3XITEC.js.map +0 -1
  316. package/dist/executor-67NA4KPO.js +0 -29
  317. package/dist/executor-7JDP7UBK.js +0 -9
  318. package/dist/executor-CRH5OB4V.js +0 -9
  319. package/dist/export-accessible-K4GJAU7U.js +0 -23
  320. package/dist/extract-partition-YJFL5OKK.js +0 -38
  321. package/dist/find-SVZHMEQI.js +0 -11
  322. package/dist/issue-64N6OG7U.js +0 -19
  323. package/dist/liberate-XL6NSGOL.js +0 -25
  324. package/dist/link-set-LQI2IJX6.js +0 -31
  325. package/dist/noydb-SWUGPFBK.js +0 -86
  326. package/dist/register-AYBQNTM3.js +0 -32
  327. package/dist/registry-CQWWOBO4.js +0 -9
  328. package/dist/registry-JCZ4BNLV.js +0 -18
  329. package/dist/registry-JFFENZ44.js +0 -9
  330. package/dist/registry-ZA4HACYR.js +0 -19
  331. package/dist/request-withdrawal-7IKUIAEB.js +0 -31
  332. package/dist/revoke-PUJKRYJF.js +0 -24
  333. package/dist/signer-5TA7FUC3.js +0 -25
  334. package/dist/storage-J2QHNJCB.js +0 -23
  335. package/dist/walk-3PA4ZOKS.js +0 -21
  336. package/dist/withdraw-accessible-62VI4W7D.js +0 -28
  337. package/dist/withdraw-accessible-62VI4W7D.js.map +0 -1
  338. package/dist/zod-HAJM7LMS.js +0 -14763
  339. package/dist/zod-HAJM7LMS.js.map +0 -1
  340. /package/dist/{api-GJQF7OAJ.js.map → api-WYW4YEQG.js.map} +0 -0
  341. /package/dist/{chunk-5UKIZIO3.js.map → chunk-2577DKXB.js.map} +0 -0
  342. /package/dist/{chunk-SWFIXQF5.js.map → chunk-2ENE6445.js.map} +0 -0
  343. /package/dist/{chunk-HLFLJCDX.js.map → chunk-2N5ML6HT.js.map} +0 -0
  344. /package/dist/{chunk-X6YRP5EC.js.map → chunk-334WSVOW.js.map} +0 -0
  345. /package/dist/{chunk-5EC7X5QA.js.map → chunk-3BVH633C.js.map} +0 -0
  346. /package/dist/{chunk-7XT7KZTN.js.map → chunk-3PGS7TYR.js.map} +0 -0
  347. /package/dist/{chunk-AHIIBDNH.js.map → chunk-3VF3WQ4F.js.map} +0 -0
  348. /package/dist/{chunk-GM4IM7TC.js.map → chunk-453F654R.js.map} +0 -0
  349. /package/dist/{chunk-5W5CEHLA.js.map → chunk-4GFX6MPA.js.map} +0 -0
  350. /package/dist/{chunk-JUBWUJY5.js.map → chunk-4GVM6QZA.js.map} +0 -0
  351. /package/dist/{chunk-2DGBRE4K.js.map → chunk-4OZNXTO4.js.map} +0 -0
  352. /package/dist/{chunk-DOPZWTMJ.js.map → chunk-4ZS56W5S.js.map} +0 -0
  353. /package/dist/{chunk-P2RJAVMR.js.map → chunk-5VCRVKOZ.js.map} +0 -0
  354. /package/dist/{chunk-FN26SFGH.js.map → chunk-6LKOJBV6.js.map} +0 -0
  355. /package/dist/{chunk-P7KJME6C.js.map → chunk-6YXCPL4T.js.map} +0 -0
  356. /package/dist/{chunk-IS5LFHV2.js.map → chunk-7APJ6CO6.js.map} +0 -0
  357. /package/dist/{chunk-LAI7ENPW.js.map → chunk-7MG2LHO5.js.map} +0 -0
  358. /package/dist/{chunk-MU74BYOD.js.map → chunk-A2HKRLPV.js.map} +0 -0
  359. /package/dist/{chunk-357ECVLE.js.map → chunk-A66I4JOA.js.map} +0 -0
  360. /package/dist/{chunk-TAJZ7GXO.js.map → chunk-AYX7AINO.js.map} +0 -0
  361. /package/dist/{chunk-RPX2H2OL.js.map → chunk-BLN54W3L.js.map} +0 -0
  362. /package/dist/{chunk-XGXVPCYW.js.map → chunk-BRLKZUBT.js.map} +0 -0
  363. /package/dist/{chunk-CWFH36SI.js.map → chunk-BTDR2PXY.js.map} +0 -0
  364. /package/dist/{chunk-UTFY6W6X.js.map → chunk-BZ3534YM.js.map} +0 -0
  365. /package/dist/{chunk-KZTPL7NL.js.map → chunk-CHQCZZWC.js.map} +0 -0
  366. /package/dist/{chunk-MQPHKJ74.js.map → chunk-DFMWUOU5.js.map} +0 -0
  367. /package/dist/{chunk-3GIA3HJ2.js.map → chunk-DGOZ4UZD.js.map} +0 -0
  368. /package/dist/{chunk-NMDMSHBF.js.map → chunk-EQEYOJBM.js.map} +0 -0
  369. /package/dist/{chunk-Q2ZN5DWZ.js.map → chunk-FAHMLERK.js.map} +0 -0
  370. /package/dist/{chunk-GKOJR53Y.js.map → chunk-G73UVHCA.js.map} +0 -0
  371. /package/dist/{chunk-H5GVPOB4.js.map → chunk-GPNTB4Y7.js.map} +0 -0
  372. /package/dist/{chunk-DNMTN46H.js.map → chunk-GY4WYNNG.js.map} +0 -0
  373. /package/dist/{chunk-HS3LEVT4.js.map → chunk-HIWCKBEY.js.map} +0 -0
  374. /package/dist/{chunk-PV7XXAXK.js.map → chunk-JBDFMYKQ.js.map} +0 -0
  375. /package/dist/{chunk-IZTU6RKH.js.map → chunk-JMGDHKQF.js.map} +0 -0
  376. /package/dist/{chunk-P22XPNFW.js.map → chunk-JVIBCBC7.js.map} +0 -0
  377. /package/dist/{chunk-OLUTCM23.js.map → chunk-K23VKTN4.js.map} +0 -0
  378. /package/dist/{chunk-3SWP2FYA.js.map → chunk-KKEESNPE.js.map} +0 -0
  379. /package/dist/{chunk-ZB2K3FV7.js.map → chunk-KTFRCC5C.js.map} +0 -0
  380. /package/dist/{chunk-IAHDSFFA.js.map → chunk-LH5A3ZPG.js.map} +0 -0
  381. /package/dist/{chunk-QOHGWFAW.js.map → chunk-LWBCUYZW.js.map} +0 -0
  382. /package/dist/{chunk-5NKHCJU5.js.map → chunk-M4YPHYEH.js.map} +0 -0
  383. /package/dist/{chunk-JFSUYGNE.js.map → chunk-MVMXZYXT.js.map} +0 -0
  384. /package/dist/{chunk-FKQCC4C5.js.map → chunk-NQKIUNW5.js.map} +0 -0
  385. /package/dist/{chunk-Q2OAAREU.js.map → chunk-OTQZ7ZWU.js.map} +0 -0
  386. /package/dist/{chunk-MOQ6OGKS.js.map → chunk-P3MG6QCN.js.map} +0 -0
  387. /package/dist/{chunk-75WNTBZL.js.map → chunk-PPTHY5QO.js.map} +0 -0
  388. /package/dist/{chunk-TQGT5BZE.js.map → chunk-Q2MPFCQ7.js.map} +0 -0
  389. /package/dist/{chunk-MTTPHBIE.js.map → chunk-Q2PU57HC.js.map} +0 -0
  390. /package/dist/{chunk-FLRLZ4XZ.js.map → chunk-Q7HZX3IF.js.map} +0 -0
  391. /package/dist/{chunk-KQIDBIZL.js.map → chunk-QIZPZMUI.js.map} +0 -0
  392. /package/dist/{chunk-JRWLUWDM.js.map → chunk-QPQUVOZ2.js.map} +0 -0
  393. /package/dist/{chunk-7YVSWPZB.js.map → chunk-QTQUH4DS.js.map} +0 -0
  394. /package/dist/{chunk-2MQ2D5OZ.js.map → chunk-R42NSZI6.js.map} +0 -0
  395. /package/dist/{chunk-HOIWW2LV.js.map → chunk-RF6D3Y5E.js.map} +0 -0
  396. /package/dist/{chunk-OEJ4R52I.js.map → chunk-RMS3NEA3.js.map} +0 -0
  397. /package/dist/{chunk-FPN5D4JX.js.map → chunk-RSGLUIO6.js.map} +0 -0
  398. /package/dist/{chunk-XKA6UH5V.js.map → chunk-SFAWCTEM.js.map} +0 -0
  399. /package/dist/{chunk-I5LSKXT6.js.map → chunk-SGZAIJCV.js.map} +0 -0
  400. /package/dist/{chunk-FYT3DXPN.js.map → chunk-SKGMN35F.js.map} +0 -0
  401. /package/dist/{chunk-JILOSL4O.js.map → chunk-SPYWXKJN.js.map} +0 -0
  402. /package/dist/{chunk-4RUFYGWG.js.map → chunk-SZJ3DLZA.js.map} +0 -0
  403. /package/dist/{chunk-O3SNM66K.js.map → chunk-TFR7DSOV.js.map} +0 -0
  404. /package/dist/{chunk-DIVY2CJZ.js.map → chunk-TRGTKX5E.js.map} +0 -0
  405. /package/dist/{chunk-JY4U6CYV.js.map → chunk-TUFM4UZP.js.map} +0 -0
  406. /package/dist/{chunk-LUVGSKXE.js.map → chunk-UDHWDSRL.js.map} +0 -0
  407. /package/dist/{chunk-DZPMKY3J.js.map → chunk-UGTBXF5U.js.map} +0 -0
  408. /package/dist/{chunk-K432FT7T.js.map → chunk-UHHPLO3I.js.map} +0 -0
  409. /package/dist/{chunk-THNJ3IKU.js.map → chunk-ULUMAZ5S.js.map} +0 -0
  410. /package/dist/{chunk-YHIAWECL.js.map → chunk-UXVWEX5L.js.map} +0 -0
  411. /package/dist/{chunk-OKCQNMO6.js.map → chunk-V7ZRRCRJ.js.map} +0 -0
  412. /package/dist/{chunk-GHADG5QZ.js.map → chunk-VTFVLCUH.js.map} +0 -0
  413. /package/dist/{chunk-U3RMWOXY.js.map → chunk-VXANTWBJ.js.map} +0 -0
  414. /package/dist/{chunk-MV2OEK3K.js.map → chunk-XKWGNJ26.js.map} +0 -0
  415. /package/dist/{chunk-2E2LT37H.js.map → chunk-XLMEZIAJ.js.map} +0 -0
  416. /package/dist/{chunk-RHTPGS56.js.map → chunk-YJRT5UQM.js.map} +0 -0
  417. /package/dist/{chunk-FZWAGG5T.js.map → chunk-YJX7EOJD.js.map} +0 -0
  418. /package/dist/{chunk-ZQGRZN5L.js.map → chunk-YYP7WSEB.js.map} +0 -0
  419. /package/dist/{chunk-MENI33ZV.js.map → chunk-ZHKOPKE3.js.map} +0 -0
  420. /package/dist/{chunk-4U52PMEL.js.map → chunk-ZN4FD4PE.js.map} +0 -0
  421. /package/dist/{chunk-AW4KTQA4.js.map → chunk-ZORTV6NH.js.map} +0 -0
  422. /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-JSJYIKS4.js.map} +0 -0
  423. /package/dist/{collection-facade-OPJ3EC4L.js.map → computed-VPOKQK4N.js.map} +0 -0
  424. /package/dist/{computed-HW6IG5UH.js.map → derive-E642AOUB.js.map} +0 -0
  425. /package/dist/{derive-AAIXSQIE.js.map → enclave-55PAM4YO.js.map} +0 -0
  426. /package/dist/{enclave-OXZY3NOP.js.map → executor-5NIMLSKZ.js.map} +0 -0
  427. /package/dist/{executor-67NA4KPO.js.map → executor-7UQ3BZ4F.js.map} +0 -0
  428. /package/dist/{executor-7JDP7UBK.js.map → executor-AQVXV5GZ.js.map} +0 -0
  429. /package/dist/{executor-CRH5OB4V.js.map → export-accessible-ORMKLA3E.js.map} +0 -0
  430. /package/dist/{export-accessible-K4GJAU7U.js.map → extract-partition-NKYO3WNG.js.map} +0 -0
  431. /package/dist/{extract-partition-YJFL5OKK.js.map → find-NOGJ25VX.js.map} +0 -0
  432. /package/dist/{find-SVZHMEQI.js.map → issue-3DTQ7VJJ.js.map} +0 -0
  433. /package/dist/{issue-64N6OG7U.js.map → ledger-EDXFFZQL.js.map} +0 -0
  434. /package/dist/{ledger-ZAFULLAF.js.map → liberate-V35QUHJP.js.map} +0 -0
  435. /package/dist/{liberate-XL6NSGOL.js.map → link-set-2TTM3IZC.js.map} +0 -0
  436. /package/dist/{link-set-LQI2IJX6.js.map → managed-secret-NCWEMPUQ.js.map} +0 -0
  437. /package/dist/{managed-secret-7OH7HKXV.js.map → noydb-62MX4QUG.js.map} +0 -0
  438. /package/dist/{noydb-SWUGPFBK.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
  439. /package/dist/{read-only-facade-CHCKSEPD.js.map → register-HHLXEQDN.js.map} +0 -0
  440. /package/dist/{register-AYBQNTM3.js.map → registry-23WF3TGH.js.map} +0 -0
  441. /package/dist/{registry-CQWWOBO4.js.map → registry-4AYVUNXK.js.map} +0 -0
  442. /package/dist/{registry-JCZ4BNLV.js.map → registry-JS3YFQQM.js.map} +0 -0
  443. /package/dist/{registry-JFFENZ44.js.map → registry-XX2Z7B46.js.map} +0 -0
  444. /package/dist/{registry-ZA4HACYR.js.map → request-withdrawal-CHPATE4G.js.map} +0 -0
  445. /package/dist/{request-withdrawal-7IKUIAEB.js.map → revoke-7M2VW4ON.js.map} +0 -0
  446. /package/dist/{revoke-PUJKRYJF.js.map → signer-SJQJVSM6.js.map} +0 -0
  447. /package/dist/{signer-5TA7FUC3.js.map → stale-BZS6H2RY.js.map} +0 -0
  448. /package/dist/{stale-HZR7745Y.js.map → storage-RW4QBS23.js.map} +0 -0
  449. /package/dist/{storage-J2QHNJCB.js.map → ulid-4MKXG325.js.map} +0 -0
  450. /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
  451. /package/dist/{vault-diff-FE5J35NJ.js.map → walk-ZURCH6RZ.js.map} +0 -0
  452. /package/dist/{walk-3PA4ZOKS.js.map → withdraw-accessible-PXR4IXDX.js.map} +0 -0
@@ -5,74 +5,74 @@ import {
5
5
  describeExtraction,
6
6
  unsealDeks,
7
7
  withCargo
8
- } from "../chunk-MQPHKJ74.js";
9
- import {
10
- extractPartition,
11
- walkClosure
12
- } from "../chunk-7XT7KZTN.js";
8
+ } from "../chunk-DFMWUOU5.js";
13
9
  import {
14
10
  diffVault
15
11
  } from "../chunk-LFUID7OW.js";
12
+ import {
13
+ extractPartition,
14
+ walkClosure
15
+ } from "../chunk-3PGS7TYR.js";
16
16
  import {
17
17
  createDeedOwner,
18
18
  isDeedVault,
19
19
  liberateVault,
20
20
  loadDeedMarker
21
- } from "../chunk-HLFLJCDX.js";
22
- import "../chunk-5EC7X5QA.js";
23
- import "../chunk-P22XPNFW.js";
21
+ } from "../chunk-2N5ML6HT.js";
22
+ import "../chunk-3BVH633C.js";
23
+ import "../chunk-JVIBCBC7.js";
24
24
  import {
25
25
  NO_CARGO
26
- } from "../chunk-FKQCC4C5.js";
27
- import "../chunk-JUBWUJY5.js";
26
+ } from "../chunk-NQKIUNW5.js";
27
+ import "../chunk-4GVM6QZA.js";
28
28
  import {
29
29
  isQuorum,
30
30
  runDrainBarrier
31
- } from "../chunk-GHADG5QZ.js";
32
- import "../chunk-I5LSKXT6.js";
31
+ } from "../chunk-VTFVLCUH.js";
33
32
  import {
34
33
  CustodyApi
35
- } from "../chunk-K432FT7T.js";
36
- import "../chunk-RCONOOVF.js";
37
- import "../chunk-NMDMSHBF.js";
34
+ } from "../chunk-UHHPLO3I.js";
35
+ import "../chunk-SGZAIJCV.js";
36
+ import "../chunk-BVN6KXL2.js";
37
+ import "../chunk-EQEYOJBM.js";
38
38
  import {
39
39
  fuseRetrieval
40
40
  } from "../chunk-AURFOK3D.js";
41
- import "../chunk-HS3LEVT4.js";
41
+ import "../chunk-HIWCKBEY.js";
42
42
  import {
43
43
  groupAndReduce,
44
44
  reduceRecords
45
- } from "../chunk-4U52PMEL.js";
45
+ } from "../chunk-ZN4FD4PE.js";
46
46
  import "../chunk-XZHEOSQ2.js";
47
47
  import "../chunk-ATL3ZVXT.js";
48
48
  import {
49
49
  readPath
50
50
  } from "../chunk-NSITFOCJ.js";
51
- import "../chunk-DIVY2CJZ.js";
52
- import "../chunk-YHIAWECL.js";
53
- import "../chunk-OHGCRKWA.js";
54
- import "../chunk-MV2OEK3K.js";
55
- import "../chunk-DZPMKY3J.js";
51
+ import "../chunk-TRGTKX5E.js";
52
+ import "../chunk-UXVWEX5L.js";
53
+ import "../chunk-3V4KWFX7.js";
54
+ import "../chunk-XKWGNJ26.js";
55
+ import "../chunk-UGTBXF5U.js";
56
56
  import {
57
57
  generateULID
58
58
  } from "../chunk-4AOERLTV.js";
59
59
  import "../chunk-SVLR4POP.js";
60
- import "../chunk-OKCQNMO6.js";
60
+ import "../chunk-V7ZRRCRJ.js";
61
61
  import "../chunk-I7FD46FF.js";
62
- import "../chunk-JRWLUWDM.js";
63
- import "../chunk-IZTU6RKH.js";
64
- import "../chunk-DOPZWTMJ.js";
65
- import "../chunk-4RUFYGWG.js";
66
- import "../chunk-XGXVPCYW.js";
67
- import "../chunk-CWFH36SI.js";
68
- import "../chunk-KZTPL7NL.js";
62
+ import "../chunk-QPQUVOZ2.js";
63
+ import "../chunk-JMGDHKQF.js";
64
+ import "../chunk-4ZS56W5S.js";
65
+ import "../chunk-SZJ3DLZA.js";
66
+ import "../chunk-BRLKZUBT.js";
67
+ import "../chunk-BTDR2PXY.js";
68
+ import "../chunk-CHQCZZWC.js";
69
69
  import "../chunk-LP7BEXCT.js";
70
70
  import {
71
71
  sha256Hex
72
- } from "../chunk-USKHHOIV.js";
72
+ } from "../chunk-HPVZCW43.js";
73
73
  import {
74
74
  NOYDB_ENVELOPE_GENERATION
75
- } from "../chunk-N4CHCXDL.js";
75
+ } from "../chunk-7MG7SJT7.js";
76
76
  import {
77
77
  AdoptionStateError,
78
78
  CargoNotEnabledError,
@@ -87,8 +87,7 @@ import {
87
87
  UnknownShardError,
88
88
  ValidationError,
89
89
  VaultTemplateNotFoundError
90
- } from "../chunk-SW4TOSJL.js";
91
- import "../chunk-PZ5AY32C.js";
90
+ } from "../chunk-7O3Y4PPD.js";
92
91
  export {
93
92
  AdoptionStateError,
94
93
  CargoNotEnabledError,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildRecordEnvelope
3
- } from "./chunk-4RUFYGWG.js";
3
+ } from "./chunk-SZJ3DLZA.js";
4
4
 
5
5
  // src/with-party/policy/storage.ts
6
6
  var META_COLLECTION = "_meta";
@@ -36,4 +36,4 @@ export {
36
36
  loadVaultPolicy,
37
37
  saveVaultPolicy
38
38
  };
39
- //# sourceMappingURL=chunk-5UKIZIO3.js.map
39
+ //# sourceMappingURL=chunk-2577DKXB.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  PERIODS_COLLECTION
3
- } from "./chunk-Q2ZN5DWZ.js";
3
+ } from "./chunk-FAHMLERK.js";
4
4
  import {
5
5
  canonicalJson,
6
6
  sha256Hex
7
- } from "./chunk-JRWLUWDM.js";
7
+ } from "./chunk-QPQUVOZ2.js";
8
8
  import {
9
9
  isDeleteMarker
10
- } from "./chunk-4RUFYGWG.js";
10
+ } from "./chunk-SZJ3DLZA.js";
11
11
  import {
12
12
  PeriodClosedError,
13
13
  ValidationError
14
- } from "./chunk-SW4TOSJL.js";
14
+ } from "./chunk-7O3Y4PPD.js";
15
15
 
16
16
  // src/with-audit/periods/periods.ts
17
17
  function resolveReopenState(events) {
@@ -124,7 +124,7 @@ function validatePeriodName(name, existing, partition) {
124
124
  }
125
125
  async function appendPeriodLedgerEntry(ledger, actor, envelope, name, collection = PERIODS_COLLECTION) {
126
126
  if (!ledger) return;
127
- const { envelopePayloadHash } = await import("./ledger-ZAFULLAF.js");
127
+ const { envelopePayloadHash } = await import("./ledger-EDXFFZQL.js");
128
128
  await ledger.append({
129
129
  op: "put",
130
130
  collection,
@@ -198,4 +198,4 @@ export {
198
198
  purgeMarkersOn,
199
199
  withPeriods
200
200
  };
201
- //# sourceMappingURL=chunk-SWFIXQF5.js.map
201
+ //# sourceMappingURL=chunk-2ENE6445.js.map
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  freezeSnapshotOnly
3
- } from "./chunk-5EC7X5QA.js";
3
+ } from "./chunk-3BVH633C.js";
4
4
  import {
5
5
  resolveManagedSecret
6
- } from "./chunk-JUBWUJY5.js";
6
+ } from "./chunk-4GVM6QZA.js";
7
7
  import {
8
8
  assertRosterTagValid,
9
9
  createOwnerKeyring,
10
10
  mintRosterTag,
11
11
  nextRosterEpoch,
12
12
  requireRosterKey
13
- } from "./chunk-OHGCRKWA.js";
13
+ } from "./chunk-3V4KWFX7.js";
14
14
  import {
15
15
  buildRecordEnvelope
16
- } from "./chunk-4RUFYGWG.js";
16
+ } from "./chunk-SZJ3DLZA.js";
17
17
  import {
18
18
  wrapKey
19
- } from "./chunk-USKHHOIV.js";
19
+ } from "./chunk-HPVZCW43.js";
20
20
  import {
21
21
  PermissionDeniedError
22
- } from "./chunk-SW4TOSJL.js";
22
+ } from "./chunk-7O3Y4PPD.js";
23
23
 
24
24
  // src/with-party/team/deed.ts
25
25
  var DEED_RECORD_ID = "deed";
@@ -137,4 +137,4 @@ export {
137
137
  isDeedVault,
138
138
  liberateVault
139
139
  };
140
- //# sourceMappingURL=chunk-HLFLJCDX.js.map
140
+ //# sourceMappingURL=chunk-2N5ML6HT.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  getHistory,
3
3
  historyIdentity
4
- } from "./chunk-TAJZ7GXO.js";
4
+ } from "./chunk-AYX7AINO.js";
5
5
  import {
6
6
  liveRecordIsElevated
7
- } from "./chunk-IZTU6RKH.js";
7
+ } from "./chunk-JMGDHKQF.js";
8
8
  import {
9
9
  openEnvelopeJson
10
- } from "./chunk-DOPZWTMJ.js";
10
+ } from "./chunk-4ZS56W5S.js";
11
11
  import {
12
12
  ReadOnlyAtInstantError
13
- } from "./chunk-SW4TOSJL.js";
13
+ } from "./chunk-7O3Y4PPD.js";
14
14
 
15
15
  // src/with-commit/history/time-machine.ts
16
16
  var VaultInstant = class {
@@ -208,4 +208,4 @@ export {
208
208
  VaultInstant,
209
209
  CollectionInstant
210
210
  };
211
- //# sourceMappingURL=chunk-X6YRP5EC.js.map
211
+ //# sourceMappingURL=chunk-334WSVOW.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  buildAccessibleBundle,
3
3
  resolveAccessibleCollections
4
- } from "./chunk-P22XPNFW.js";
4
+ } from "./chunk-JVIBCBC7.js";
5
5
  import {
6
6
  buildRecordEnvelope
7
- } from "./chunk-4RUFYGWG.js";
7
+ } from "./chunk-SZJ3DLZA.js";
8
8
  import {
9
9
  sha256Hex
10
- } from "./chunk-USKHHOIV.js";
10
+ } from "./chunk-HPVZCW43.js";
11
11
  import {
12
12
  ReadOnlyError
13
- } from "./chunk-SW4TOSJL.js";
13
+ } from "./chunk-7O3Y4PPD.js";
14
14
 
15
15
  // src/with-audit/portability/withdraw-accessible.ts
16
16
  var FROZEN_SNAPSHOTS_COLLECTION = "_frozen_snapshots";
@@ -117,4 +117,4 @@ export {
117
117
  freezeAndDeleteClosure,
118
118
  withdrawAccessibleData
119
119
  };
120
- //# sourceMappingURL=chunk-5EC7X5QA.js.map
120
+ //# sourceMappingURL=chunk-3BVH633C.js.map
@@ -0,0 +1,176 @@
1
+ import {
2
+ matchesReferencingValue
3
+ } from "./chunk-R7BX2NB3.js";
4
+ import {
5
+ PeriodClosedError
6
+ } from "./chunk-7O3Y4PPD.js";
7
+
8
+ // src/kernel/via/dispatch.ts
9
+ function touchFor(batch, collection) {
10
+ let t = batch.get(collection);
11
+ if (!t) {
12
+ t = { puts: /* @__PURE__ */ new Set(), deletes: /* @__PURE__ */ new Map() };
13
+ batch.set(collection, t);
14
+ }
15
+ return t;
16
+ }
17
+ function resolveRollupDeleteIntents(registry, collectionName, deleted) {
18
+ if (!registry) return [];
19
+ const intents = [];
20
+ for (const { spec } of registry.strategiesForSource(collectionName)) {
21
+ if (!spec.rollup || spec.rollup.from !== collectionName) continue;
22
+ const kv = deleted[spec.rollup.key];
23
+ if (typeof kv === "string" || typeof kv === "number") intents.push({ into: spec.source, parentId: String(kv), field: spec.rollup.field });
24
+ }
25
+ return intents;
26
+ }
27
+ function findRollupSpecForIntent(registry, collectionName, intent) {
28
+ return registry?.strategiesForSource(collectionName).find((s) => s.spec.source === intent.into && s.spec.rollup?.field === intent.field && s.spec.rollup?.from === collectionName)?.spec;
29
+ }
30
+ var WaveContext = class {
31
+ _seen = /* @__PURE__ */ new Set();
32
+ seen(targetKey) {
33
+ if (this._seen.has(targetKey)) return true;
34
+ this._seen.add(targetKey);
35
+ return false;
36
+ }
37
+ };
38
+ async function runGraphDispatchWave(vault, batch) {
39
+ const wave = new WaveContext();
40
+ for (const [collectionName, touch] of batch) {
41
+ if (vault.graph.dependentsOf(collectionName).length === 0) continue;
42
+ const coll = vault._getCollection(collectionName);
43
+ if (!coll) continue;
44
+ for (const id of touch.puts) {
45
+ try {
46
+ const stored = await coll._getStoredRecordForDispatch(id);
47
+ if (!stored) continue;
48
+ await coll.dispatchDerivations(id, stored.record, stored.version, wave);
49
+ await coll.dispatchMaterializedViews(id, stored.record, wave);
50
+ } catch (err) {
51
+ console.warn(`[via-dispatch] wave recompute failed for ${collectionName}/${id}:`, err);
52
+ vault._emit("derivation:wave-error", { collection: collectionName, id, error: err });
53
+ }
54
+ }
55
+ for (const [id, intents] of touch.deletes) {
56
+ try {
57
+ await coll._recomputeDeletedRollups(intents, wave);
58
+ await coll.dispatchMaterializedViewsOnDelete(id);
59
+ await coll.dispatchArrayDerivationsOnDelete(id);
60
+ } catch (err) {
61
+ console.warn(`[via-dispatch] wave delete-recompute failed for ${collectionName}/${id}:`, err);
62
+ vault._emit("derivation:wave-error", { collection: collectionName, id, error: err });
63
+ }
64
+ }
65
+ }
66
+ }
67
+ async function putDerivedOutput(outColl, id, value, ctx, options) {
68
+ try {
69
+ await outColl.put(id, value, options);
70
+ return "written";
71
+ } catch (err) {
72
+ if (!(err instanceof PeriodClosedError)) throw err;
73
+ const targetCollection = outColl.name;
74
+ const event = {
75
+ source: ctx.source,
76
+ target: { collection: targetCollection, id },
77
+ period: err.periodName,
78
+ endDate: err.endDate
79
+ };
80
+ ctx.emit("derivation:skipped-frozen", event);
81
+ if (ctx.audit) await ctx.audit(event);
82
+ return "skipped-frozen";
83
+ }
84
+ }
85
+ function ledgerAuditHook(ledger, actor) {
86
+ if (!ledger) return void 0;
87
+ return async (e) => {
88
+ await ledger.append({
89
+ op: "lifecycle",
90
+ collection: e.target.collection,
91
+ id: e.target.id,
92
+ version: 0,
93
+ actor,
94
+ payloadHash: "",
95
+ reason: JSON.stringify({ event: "derivation-skipped-frozen", ...e })
96
+ });
97
+ };
98
+ }
99
+ async function forgetDerivedFanout(vault, ref, envelope, stats, lookupCompareKeys) {
100
+ const coll = vault._getCollection(ref.collection);
101
+ if (coll) {
102
+ const mv = await coll.dispatchMaterializedViewsOnDelete(ref.id);
103
+ stats.recordsErased += mv.deleted;
104
+ stats.derivedResidueUndecodable.push(...mv.residueUndecodable);
105
+ stats.derivedResidueDeclined.push(...mv.residueDeclined);
106
+ }
107
+ const edges = vault.graph.derivedArtifactsOf(ref.collection);
108
+ if (edges.length === 0 || !coll) return;
109
+ if (edges.some((e) => e.kind === "ref")) {
110
+ const { cascaded, nullified, residue } = await applyLookupRefsFanout(vault, ref.collection, ref.id, lookupCompareKeys);
111
+ stats.lookupReferencesCascaded += cascaded;
112
+ stats.lookupReferencesNullified += nullified;
113
+ stats.lookupReferencesResidue.push(...residue);
114
+ }
115
+ if (edges.some((e) => e.kind === "derivation")) {
116
+ stats.recordsErased += await coll.dispatchArrayDerivationsOnDelete(ref.id, true);
117
+ }
118
+ if (envelope && edges.some((e) => e.kind === "rollup")) {
119
+ const priorRecord = await coll._decodeEnvelope(envelope, ref.id);
120
+ if (priorRecord) {
121
+ for (const r of await coll.dispatchRollupsOnDelete(ref.id, priorRecord)) {
122
+ if (r.outcome === "written") stats.aggregatesRecomputed += 1;
123
+ else if (r.outcome === "skipped-frozen") stats.residueFrozen.push(`${r.into}:${r.parentId}`);
124
+ }
125
+ }
126
+ }
127
+ }
128
+ async function applyLookupRefsFanout(vault, backing, key, compareKeys) {
129
+ let cascaded = 0;
130
+ let nullified = 0;
131
+ const residue = [];
132
+ for (const { referencing, onDelete, keyField } of vault.graph.referencingEdgesOf(backing)) {
133
+ if (onDelete === "restrict") continue;
134
+ const compareKey = keyField === "id" ? key : compareKeys.get(keyField);
135
+ if (compareKey === void 0) {
136
+ residue.push(`${backing}:${key}:${referencing.collection}.${referencing.field}`);
137
+ continue;
138
+ }
139
+ const coll = vault._getCollection(referencing.collection);
140
+ if (!coll) continue;
141
+ const matches = (await coll.list()).filter((rec) => matchesReferencingValue(rec, referencing.field, compareKey));
142
+ for (const rec of matches) {
143
+ const id = rec["id"];
144
+ if (id === void 0) continue;
145
+ if (onDelete === "cascade") {
146
+ await coll.delete(id);
147
+ cascaded++;
148
+ } else if (onDelete === "nullify") {
149
+ await coll.put(id, { ...rec, [referencing.field]: null });
150
+ nullified++;
151
+ }
152
+ }
153
+ }
154
+ return { cascaded, nullified, residue };
155
+ }
156
+ function selfWriteFieldEqual(a, b) {
157
+ if (a === b) return true;
158
+ if (a === null || b === null || typeof a !== "object" || typeof b !== "object") return false;
159
+ try {
160
+ return JSON.stringify(a) === JSON.stringify(b);
161
+ } catch {
162
+ return false;
163
+ }
164
+ }
165
+
166
+ export {
167
+ touchFor,
168
+ resolveRollupDeleteIntents,
169
+ findRollupSpecForIntent,
170
+ runGraphDispatchWave,
171
+ putDerivedOutput,
172
+ ledgerAuditHook,
173
+ forgetDerivedFanout,
174
+ selfWriteFieldEqual
175
+ };
176
+ //# sourceMappingURL=chunk-3BZZJJMQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/kernel/via/dispatch.ts"],"sourcesContent":["// kernel/via/dispatch.ts — the batched, origin-aware sync/cutover/restore dispatch wave\n// (Via port phase C, #638 Task 4, fixes #621).\n//\n// `Collection._onRecordMutated`'s `sync-apply`/`cutover`/`restore` cases feed touched\n// (collection, id) pairs into a per-session `GraphBatch` (owned by `Vault._collectGraphTouch`)\n// instead of dispatching inline — the `local-write` path keeps its own byte-identical inline\n// dispatch (`wave` stays `undefined` there, per the spec's behavior lock). At batch-flush time\n// `runGraphDispatchWave` decrypts each touched record (id threaded into the decrypt, matching\n// the phase-B at-rest contract) and re-runs the SAME `dispatchDerivations`/\n// `dispatchMaterializedViews` the local-write path uses, sharing one `WaveContext` so N touched\n// records feeding the SAME rollup/MV target recompute exactly once (per-target dedup).\n// See design-history/2026-07-11-via-phase-c-design.md §3.\n\nimport type { ViaGraph } from './graph.js'\nimport type { Collection } from '../collection.js'\nimport type { EncryptedEnvelope } from '../types.js'\nimport { PeriodClosedError } from '../errors.js'\nimport { matchesReferencingValue } from '../../port/with/lookup-strategy.js'\n\n/** One deleted child's resolved rollup PARENT intent (#640) — ids + a field name only. A\n * resolved `parentId` is an id, same class as any touched record id — never a stored value. */\nexport interface RollupDeleteIntent {\n readonly into: string\n readonly parentId: string\n readonly field: string\n}\n\n/** One collection's batched touches this session (#640 widens the #638 `Set<string>` shape):\n * `puts` — the original semantics, unchanged; `deletes` — a deleted record's id mapped to its\n * resolved rollup-parent intents, captured PRE-invalidation by `Collection._onRecordMutated`'s\n * sync-apply delete case (the FK is only readable there — see `kernel/collection.ts\n * #_rollupDeleteIntents`). */\nexport interface GraphTouch {\n readonly puts: Set<string>\n readonly deletes: Map<string, readonly RollupDeleteIntent[]>\n}\n\n/** Per-session touched set — collection → its `GraphTouch`. Metadata only — ids (collection\n * names, record ids INCLUDING resolved rollup parent ids) and field names; NEVER record payload\n * or key material. A resolved parentId is an id, same class as the touched ids — not a stored\n * value. */\nexport type GraphBatch = Map<string, GraphTouch>\n\n/** Get-or-create `batch`'s `GraphTouch` entry for `collection` (#640) — shared by\n * `Vault._collectGraphTouch`/`_collectGraphDelete` so each stays a one-line call. */\nexport function touchFor(batch: GraphBatch, collection: string): GraphTouch {\n let t = batch.get(collection)\n if (!t) {\n t = { puts: new Set(), deletes: new Map() }\n batch.set(collection, t)\n }\n return t\n}\n\n/** #640 — sync, I/O-free: `deleted`'s resolved rollup PARENT intents (the FK is only readable\n * NOW, before the record is gone) — a pure function so `Collection._rollupDeleteIntents` stays\n * a one-line delegator under the kernel-surface ceiling. `registry` is `this.derivationSource\n * ?.registry()`; `collectionName` is `this.name` (the CHILD/`rollup.from` side). Generic over\n * the registry's own spec shape so this file never imports a `with-formula` type (port-layering\n * — via/dispatch.ts must not gain a with-* import). */\nexport function resolveRollupDeleteIntents<S extends { source: string; rollup?: { from: string; key: string; field: string } }>(\n registry: { strategiesForSource(name: string): ReadonlyArray<{ spec: S }> } | undefined,\n collectionName: string,\n deleted: Record<string, unknown>,\n): RollupDeleteIntent[] {\n if (!registry) return []\n const intents: RollupDeleteIntent[] = []\n for (const { spec } of registry.strategiesForSource(collectionName)) {\n if (!spec.rollup || spec.rollup.from !== collectionName) continue\n const kv = deleted[spec.rollup.key]\n if (typeof kv === 'string' || typeof kv === 'number') intents.push({ into: spec.source, parentId: String(kv), field: spec.rollup.field })\n }\n return intents\n}\n\n/** #640 — resolve a `RollupDeleteIntent` back to its registry `spec`. The wave's per-intent\n * driver needs `spec.rollup.compute`, which `GraphBatch`'s metadata-only pin forbids batching —\n * so it's re-resolved here, post-boundary, instead of carried across it. `undefined` if the\n * intent's originating strategy was unregistered between collect time and wave time (residual\n * gap, freshness-only). */\nexport function findRollupSpecForIntent<S extends { source: string; rollup?: { from: string; field: string } }>(\n registry: { strategiesForSource(name: string): ReadonlyArray<{ spec: S }> } | undefined,\n collectionName: string,\n intent: RollupDeleteIntent,\n): S | undefined {\n return registry?.strategiesForSource(collectionName).find((s) => s.spec.source === intent.into && s.spec.rollup?.field === intent.field && s.spec.rollup?.from === collectionName)?.spec\n}\n\n/** One dedup ledger for a single wave — a target is recomputed at most once (mark-on-check). */\nexport class WaveContext {\n private readonly _seen = new Set<string>()\n seen(targetKey: string): boolean {\n if (this._seen.has(targetKey)) return true\n this._seen.add(targetKey)\n return false\n }\n}\n\n/** The slice of `Vault` the wave needs: the shared graph (the #553 zero-cost skip) and cached-\n * collection lookup — never constructs, since a touched collection is, by construction,\n * already open (it just fired `_onRecordMutated`). */\nexport interface VaultLike {\n readonly graph: ViaGraph\n _getCollection(name: string): Collection<Record<string, unknown>> | undefined\n /** #640 (#644 item 3) — structured wave-error surfacing, additive to the existing console.warn. */\n _emit(event: string, payload: unknown): void\n}\n\n/**\n * Run ONE dispatch wave for a completed batch: for each touched (collection, id), decrypt the\n * applied envelope (id threaded), then run the SAME `dispatchDerivations` +\n * `dispatchMaterializedViews` the local-write path uses — with a shared `WaveContext` so N\n * touched records feeding the SAME target recompute once. #553: a collection with no graph\n * out-edges (e.g. money-only) is skipped before any decrypt/dispatch async work.\n */\nexport async function runGraphDispatchWave(vault: VaultLike, batch: GraphBatch): Promise<void> {\n const wave = new WaveContext()\n for (const [collectionName, touch] of batch) {\n if (vault.graph.dependentsOf(collectionName).length === 0) continue\n const coll = vault._getCollection(collectionName)\n if (!coll) continue\n for (const id of touch.puts) {\n try {\n // Decrypt is INSIDE the per-id isolation boundary (whole-branch review Important\n // finding, #638): an undecryptable synced envelope (`TamperedError`) must not\n // escape `_getStoredRecordForDispatch` and abort the wave — that would propagate\n // through `_flushGraphBatch` and reject the surrounding `SyncEngine.pull`/`push`\n // AFTER records were already applied + meta persisted, starving every other\n // touched target in the same batch.\n const stored = await coll._getStoredRecordForDispatch(id)\n if (!stored) continue\n await coll.dispatchDerivations(id, stored.record, stored.version, wave)\n await coll.dispatchMaterializedViews(id, stored.record, wave)\n } catch (err) {\n // #638 Task 5 review mandate: one touched record's recompute must not abort the\n // whole wave (starving co-batched healthy targets) or the pull/push it's nested\n // inside. `PeriodClosedError` never reaches here — `putDerivedOutput` already\n // intercepts it at every output-write call site and turns it into a skip+event.\n // Anything else (a genuine decrypt failure, a derive()/executor bug, a schema\n // violation on the output, ...) is surfaced — not silently swallowed — via the\n // SAME console.warn channel `dispatchDerivations`/the MV executor already use for\n // their own non-strict-mode output failures, then isolated to just this one id.\n // #644 item 3: ADDITIVELY (never in place of the warn) emit a structured event too,\n // so a listener doesn't have to scrape console output to react to a wave failure.\n console.warn(`[via-dispatch] wave recompute failed for ${collectionName}/${id}:`, err)\n vault._emit('derivation:wave-error', { collection: collectionName, id, error: err })\n }\n }\n // #640 — delete-kind touches: the deleted child's rollup-parent intents, resolved (sync,\n // pre-invalidation) at collect time by `Collection._rollupDeleteIntents`. Same per-id\n // isolation as the puts loop above. #658: the wave now ALSO heals MV rows and array-shape\n // derivation output rows for the deleted child — parity with the local-delete boundary\n // (`Collection._doDelete`'s `!internal` block, which already calls all three). Still never\n // routed through `dispatchDerivations` (the mutation-choke-point.test.ts:85-99 pin — sync-\n // applied deletes never RE-DERIVE); `dispatchMaterializedViewsOnDelete`/\n // `dispatchArrayDerivationsOnDelete` only need `id` (MV refresh recomputes+diffs; array-\n // derivation reads its per-source sidecar) and never call `derive()`, so the pin holds.\n for (const [id, intents] of touch.deletes) {\n try {\n await coll._recomputeDeletedRollups(intents, wave)\n // #658: record-shape same-id outputs are left untouched (eraseRecordShapeToo defaults\n // false), matching local delete — the user deletes those directly if wanted.\n // #658: TODO dedup MV refresh per wave — `dispatchMaterializedViewsOnDelete` doesn't\n // accept a `WaveContext` (unlike the put-path `dispatchMaterializedViews`), so N deleted\n // children of one eager MV in a batch each trigger a full refresh pass. Threading `wave`\n // through would touch collection.ts's zero-slack kernel-surface ceiling for a perf-only\n // win; correctness doesn't depend on it (idempotent per source-id) — left as a follow-up.\n await coll.dispatchMaterializedViewsOnDelete(id)\n await coll.dispatchArrayDerivationsOnDelete(id)\n } catch (err) {\n console.warn(`[via-dispatch] wave delete-recompute failed for ${collectionName}/${id}:`, err)\n vault._emit('derivation:wave-error', { collection: collectionName, id, error: err })\n }\n }\n }\n}\n\n/** A record's post-freeze source mutation, for the `'derivation:skipped-frozen'` event\n * and the optional audit-trail entry. See {@link putDerivedOutput}. */\nexport interface DerivationSkippedFrozen {\n readonly source: { readonly collection: string; readonly id: string }\n readonly target: { readonly collection: string; readonly id: string }\n readonly period: string\n readonly endDate: string\n}\n\n/** The minimal put-capable shape `putDerivedOutput` needs. Any `Collection<T>` structurally\n * satisfies this — its real `options` type is a superset of what's declared here. */\nexport interface CollectionLike {\n put(id: string, value: unknown, options?: { readonly source?: string }): Promise<void>\n}\n\nexport interface PutDerivedOutputCtx {\n readonly emit: (ev: string, p: unknown) => void\n readonly source: { readonly collection: string; readonly id: string }\n readonly audit?: ((e: DerivationSkippedFrozen) => Promise<void>) | undefined\n}\n\n/**\n * Attempt a dispatch-driven output write. On `PeriodClosedError` (the closed-period\n * `beforePut` gate — `freezePeriod`/`archivePeriod` add no separate gate, per seam map\n * Part 7): SKIP (no `_ts` stamped — the gate throws before any write happens), emit\n * `'derivation:skipped-frozen'` on the event bus (ALWAYS), and append an audit-trail entry\n * when the with-history ledger is active. Returns `'written' | 'skipped-frozen'`. Any OTHER\n * error propagates unchanged — this helper narrows exactly one error class. The SOURCE\n * write is never wrapped through this helper — only derived-output writes are (§7).\n */\nexport async function putDerivedOutput(\n outColl: CollectionLike, id: string, value: unknown,\n ctx: PutDerivedOutputCtx,\n options?: { readonly source?: string },\n): Promise<'written' | 'skipped-frozen'> {\n try {\n await outColl.put(id, value, options)\n return 'written'\n } catch (err) {\n if (!(err instanceof PeriodClosedError)) throw err\n // Reach-around for the target collection's private `name` — the SAME pattern\n // `with-formula/materialized-views/executor.ts`'s `listOutputIds` already uses to\n // read a `Collection`'s private `adapter`/`vault`/`name` fields from outside the class.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const targetCollection = (outColl as any).name as string\n const event: DerivationSkippedFrozen = {\n source: ctx.source,\n target: { collection: targetCollection, id },\n period: err.periodName,\n endDate: err.endDate,\n }\n ctx.emit('derivation:skipped-frozen', event)\n if (ctx.audit) await ctx.audit(event)\n return 'skipped-frozen'\n }\n}\n\n/** Structural (no static import — kernel spine may not statically reach a with-* service,\n * the S4 gate recipe `check-architecture.mjs`'s port-layering check enforces) shape of the\n * with-history `LedgerStore.append` seam this helper needs. */\ninterface AuditLedgerLike {\n append(input: {\n readonly op: 'lifecycle'\n readonly collection: string\n readonly id: string\n readonly version: number\n readonly actor: string\n readonly payloadHash: string\n readonly reason?: string\n }): Promise<unknown>\n}\n\n/** @internal — the optional with-history ledger audit hook for `putDerivedOutput`, present\n * only when the ledger is active (mirrors every other kernel event's `if (this.ledger)`\n * gate). Encoded as a `'lifecycle'` entry — the existing \"non-data audit event\" op (the\n * same convention `forget`'s JSON-summary-in-`reason` entry uses; `ledger/entry.ts:88-104`). */\nexport function ledgerAuditHook(\n ledger: AuditLedgerLike | undefined, actor: string,\n): ((e: DerivationSkippedFrozen) => Promise<void>) | undefined {\n if (!ledger) return undefined\n return async (e) => {\n await ledger.append({\n op: 'lifecycle', collection: e.target.collection, id: e.target.id, version: 0, actor, payloadHash: '',\n reason: JSON.stringify({ event: 'derivation-skipped-frozen', ...e }),\n })\n }\n}\n\n/** `recomputeRollup`/`dispatchRollupsOnDelete`'s per-target write outcome (#638 Task 6):\n * `'written'`/`'skipped-frozen'` mirror {@link putDerivedOutput}'s result; `'noop'` covers\n * no-parent/no-change/deduped-by-wave — nothing to report either way. */\nexport type RollupOutcome = 'written' | 'skipped-frozen' | 'noop'\n\n/** Mutable accumulator `forgetDerivedFanout` writes into, one per `Vault.forget()` call — keeps\n * the per-ref loop's call site to a single line under vault.ts's tight kernel-surface ceiling.\n * Maps 1:1 onto `ForgetResult`'s additive fields (`with-audit/forget/strategy.ts`). */\nexport interface ForgetFanoutStats {\n recordsErased: number\n aggregatesRecomputed: number\n readonly residueFrozen: string[]\n /** #650 Task 5 (#648) — referencing records tombstoned via a `'ref'` edge's `cascade` policy. */\n lookupReferencesCascaded: number\n /** #650 Task 5 (#648) — referencing fields cleared via a `'ref'` edge's `nullify` policy. */\n lookupReferencesNullified: number\n /** #650 Task 5 review (Important fix) — `'ref'` edges whose compare-key could NOT be resolved,\n * even from the LIVE pre-shred row (the backing row itself is unreadable) — propagation was\n * skipped for these, reported here so the skip is never silent. `backing:key:collection.field`\n * entries, one per un-propagated edge. */\n readonly lookupReferencesResidue: string[]\n /** #776/#782/#785 — `outputCollection:id` MV-output rows that survived erasure invalidation\n * (eager tombstone leg AND lazy/manual `invalidateMVAtRest`) despite belonging to the\n * forgotten subject, because the ownership stamp could not be decoded (undecodable under\n * the default DEK — e.g. elevated above tier 0 on a tiered output collection). Ownership\n * UNCONFIRMED. Never erased, but surfaced here rather than silently skipped. */\n readonly derivedResidueUndecodable: string[]\n /** #782/#785 — `outputCollection:id` MV-output rows that decoded and stamp-matched but whose\n * `_internalDelete` declined (the #718 tier-elevation gate). Ownership CONFIRMED, erasure\n * declined — a real silent survival, surfaced here rather than silently skipped. */\n readonly derivedResidueDeclined: string[]\n}\n\n/**\n * #622 — after `_writeTombstone(ref.id, actor)` erases the forgotten subject's own record, fan\n * out to its derived residue via the graph (spec §5): record-grain artifacts (MV rows,\n * array-shape derivation rows, same-id record-shape derivation copies) are ERASED through the\n * SAME `!internal` housekeeping-bypass machinery the ordinary delete path uses (no user\n * `onDelete` re-fires — the shred-is-not-a-domain-delete property `_writeTombstone` protects);\n * aggregate-grain rollups are RECOMPUTED without the forgotten contribution in open periods, or\n * skip+audit (via `putDerivedOutput`, already wired into the rollup/MV output paths) in frozen\n * ones. Mutates `stats` in place. `envelope` is `ref`'s PRE-tombstone envelope, decoded only if\n * a rollup edge is actually present — the #553 zero-cost-skip discipline: no decrypt for the\n * common case of a forgotten record with no aggregate-grain consumer, and no work at all when\n * `ref.collection` has no graph out-edges. `lookupCompareKeys` is the `'ref'` edges' compare-key\n * map, resolved from the LIVE row BEFORE any shred (`VaultLinks.checkLookupRefsRestrict`'s return\n * value — `Vault.forget()`'s pre-shred restrict check doubles as the live-resolve pass) — see\n * {@link applyLookupRefsFanout}.\n */\nexport async function forgetDerivedFanout(\n vault: VaultLike,\n ref: { readonly collection: string; readonly id: string },\n envelope: EncryptedEnvelope | null,\n stats: ForgetFanoutStats,\n lookupCompareKeys: ReadonlyMap<string, string | undefined>,\n): Promise<void> {\n const coll = vault._getCollection(ref.collection)\n\n // #761 item 4 — drive the MV arm off `dispatchMaterializedViewsOnDelete` UNCONDITIONALLY,\n // ABOVE the `edges` check below: `registry.edges()` drops the same-collection\n // partition-disjoint MV edge (registry.ts's `sources.length === 0 → continue`), so a\n // same-collection MV's source collection never appears in `vault.graph`'s derived-artifact\n // edges even though the MV IS registered — forget() would otherwise never reach it.\n // `dispatchMaterializedViewsOnDelete` self-guards O(1) via `mvsForSource` (a no-op when\n // this collection isn't an MV source), so this is safe to call unconditionally. Safe to\n // route through the eager executor's tombstone leg ONLY because that leg is now\n // stamp-scoped (#762) — before that fix this would have opened a NEW forget-time\n // data-loss path into the unscoped tombstone diff.\n if (coll) {\n const mv = await coll.dispatchMaterializedViewsOnDelete(ref.id)\n stats.recordsErased += mv.deleted\n stats.derivedResidueUndecodable.push(...mv.residueUndecodable)\n stats.derivedResidueDeclined.push(...mv.residueDeclined)\n }\n\n const edges = vault.graph.derivedArtifactsOf(ref.collection)\n if (edges.length === 0 || !coll) return\n\n // #650 Task 5 (#648) — 'ref' cascade/nullify propagate ADDITIVELY, here, AFTER the shred\n // (restrict already refused BEFORE any shred — the caller's pre-tombstone check, spec §4).\n // The I/O shell (loop shape, collection accessor) is duplicated, not imported, from\n // `VaultLinks.applyLookupRefsPropagation`/`checkLookupRefsRestrict` (with-shape/links/\n // vault-facade.ts) — the kernel spine may not statically import a with-* service\n // (port-layering, the #638 Task 5 via/dispatch.ts precedent); `vault._getCollection` is\n // cached-only while `VaultLinks`' accessor constructs. The pure match predicate itself is\n // shared through the port seam (#651 Task 3 — `matchesReferencingValue`, `port/with/\n // lookup-strategy.ts`), so only the shell, not the coercion logic, stays duplicated. A\n // referencing edge whose dimension uses a non-default `key` (matrix tier only) needs the\n // backing row's OWN value at that field, not its PUT-id — the row is ALREADY tombstoned by\n // now, so it's read from `lookupCompareKeys`, resolved by the caller from the LIVE row\n // BEFORE the shred (#650 Task 5 review, Important fix — eliminates the post-shred\n // envelope-decode dependency this used to have, which silently skipped propagation whenever\n // that decode failed).\n if (edges.some((e) => e.kind === 'ref')) {\n const { cascaded, nullified, residue } = await applyLookupRefsFanout(vault, ref.collection, ref.id, lookupCompareKeys)\n stats.lookupReferencesCascaded += cascaded\n stats.lookupReferencesNullified += nullified\n stats.lookupReferencesResidue.push(...residue)\n }\n\n if (edges.some((e) => e.kind === 'derivation')) {\n // #622 review Finding 1: count REAL erasures (dispatchArrayDerivationsOnDelete's own\n // `_internalDelete`-backed tally), not the derivation EDGE count — an edge exists whenever\n // this collection is ANY trigger (source/sources[]/triggerBy), but the same-id record-shape\n // guard only erases for `spec.source === this.name`, and `derive()` may never have produced\n // an output row (optional-skip) in the first place. Both cases must contribute 0, not +1.\n stats.recordsErased += await coll.dispatchArrayDerivationsOnDelete(ref.id, true)\n }\n\n if (envelope && edges.some((e) => e.kind === 'rollup')) {\n const priorRecord = await coll._decodeEnvelope(envelope, ref.id)\n if (priorRecord) {\n for (const r of await coll.dispatchRollupsOnDelete(ref.id, priorRecord)) {\n if (r.outcome === 'written') stats.aggregatesRecomputed += 1\n else if (r.outcome === 'skipped-frozen') stats.residueFrozen.push(`${r.into}:${r.parentId}`)\n }\n }\n }\n}\n\n/**\n * Apply `cascade`/`nullify` propagation for `backing`'s non-restrict `'ref'` edges — the\n * forget-path counterpart of `VaultLinks.applyLookupRefsPropagation` (I/O shell duplicated, not\n * imported, match predicate shared via the port — see {@link forgetDerivedFanout}'s call site\n * comment). `restrict` edges are skipped here: the\n * forget loop's `checkLookupRefsRestrict`-equivalent call already refused (or the reference no\n * longer existed) BEFORE `_writeTombstone` ran, so by the time this runs only cascade/nullify\n * remain to propagate. `compareKeys` is the non-`'id'`-`keyField` compare-value map, resolved by\n * the caller from the LIVE row BEFORE the shred (#650 Task 5 review, Important fix) — the live row\n * is already shredded by the time THIS function runs, so it can no longer resolve one itself. A\n * `keyField` absent from (or `undefined` in) the map means that live resolve failed too — the edge\n * is reported as residue instead of silently skipped (never a bare `continue` with no trace).\n */\nasync function applyLookupRefsFanout(\n vault: VaultLike,\n backing: string,\n key: string,\n compareKeys: ReadonlyMap<string, string | undefined>,\n): Promise<{ cascaded: number; nullified: number; residue: string[] }> {\n let cascaded = 0\n let nullified = 0\n const residue: string[] = []\n for (const { referencing, onDelete, keyField } of vault.graph.referencingEdgesOf(backing)) {\n if (onDelete === 'restrict') continue\n const compareKey = keyField === 'id' ? key : compareKeys.get(keyField)\n if (compareKey === undefined) {\n residue.push(`${backing}:${key}:${referencing.collection}.${referencing.field}`)\n continue\n }\n const coll = vault._getCollection(referencing.collection)\n if (!coll) continue\n const matches = (await coll.list()).filter((rec) => matchesReferencingValue(rec, referencing.field, compareKey))\n for (const rec of matches) {\n const id = rec['id'] as string | undefined\n if (id === undefined) continue\n if (onDelete === 'cascade') {\n await coll.delete(id)\n cascaded++\n } else if (onDelete === 'nullify') {\n await coll.put(id, { ...rec, [referencing.field]: null })\n nullified++\n }\n }\n }\n return { cascaded, nullified, residue }\n}\n\n/**\n * Value-equality for a single self-write reverse-denorm field. Scalars\n * compare by identity; objects by canonical JSON (denorm values should be\n * deterministically shaped). Used as the cycle guard — when every denorm\n * field already matches, no write is issued and the self-write recursion ends.\n */\nexport function selfWriteFieldEqual(a: unknown, b: unknown): boolean {\n if (a === b) return true\n if (a === null || b === null || typeof a !== 'object' || typeof b !== 'object') return false\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch {\n return false\n }\n}\n"],"mappings":"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","names":[]}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  SCHEMAS_COLLECTION
3
- } from "./chunk-I5LSKXT6.js";
3
+ } from "./chunk-SGZAIJCV.js";
4
4
  import {
5
5
  assemblePodContainer,
6
6
  buildExtractedPartitionWrapper
7
- } from "./chunk-RCONOOVF.js";
7
+ } from "./chunk-BVN6KXL2.js";
8
8
  import {
9
9
  BLOB_CHUNKS_COLLECTION,
10
10
  BLOB_COLLECTION,
@@ -12,7 +12,7 @@ import {
12
12
  BLOB_INTENT_COLLECTION,
13
13
  BLOB_SLOTS_PREFIX,
14
14
  BLOB_VERSIONS_PREFIX
15
- } from "./chunk-HS3LEVT4.js";
15
+ } from "./chunk-HIWCKBEY.js";
16
16
  import {
17
17
  generateULID
18
18
  } from "./chunk-4AOERLTV.js";
@@ -23,16 +23,16 @@ import {
23
23
  canonicalJson,
24
24
  envelopePayloadHash,
25
25
  hashEntry
26
- } from "./chunk-JRWLUWDM.js";
26
+ } from "./chunk-QPQUVOZ2.js";
27
27
  import {
28
28
  buildRecordAad,
29
29
  openEnvelopeJson,
30
30
  recordAadFor,
31
31
  writeEnvelopeBody
32
- } from "./chunk-DOPZWTMJ.js";
32
+ } from "./chunk-4ZS56W5S.js";
33
33
  import {
34
34
  buildRecordEnvelope
35
- } from "./chunk-4RUFYGWG.js";
35
+ } from "./chunk-SZJ3DLZA.js";
36
36
  import {
37
37
  bufferToBase64,
38
38
  decrypt,
@@ -42,13 +42,13 @@ import {
42
42
  generateDEK,
43
43
  unwrapCek,
44
44
  wrapCek
45
- } from "./chunk-USKHHOIV.js";
45
+ } from "./chunk-HPVZCW43.js";
46
46
  import {
47
47
  NOYDB_BACKUP_VERSION
48
- } from "./chunk-N4CHCXDL.js";
48
+ } from "./chunk-7MG7SJT7.js";
49
49
  import {
50
50
  PartitionExtractionError
51
- } from "./chunk-SW4TOSJL.js";
51
+ } from "./chunk-7O3Y4PPD.js";
52
52
 
53
53
  // src/with-cargo/walk-closure.ts
54
54
  async function walkClosure(vault, opts) {
@@ -494,4 +494,4 @@ export {
494
494
  extractPartition,
495
495
  extractPartitionCore
496
496
  };
497
- //# sourceMappingURL=chunk-7XT7KZTN.js.map
497
+ //# sourceMappingURL=chunk-3PGS7TYR.js.map
@@ -5,18 +5,18 @@ import {
5
5
  readDirectoryConfig,
6
6
  readUserVisibility,
7
7
  saveUserEnvelope
8
- } from "./chunk-MV2OEK3K.js";
8
+ } from "./chunk-XKWGNJ26.js";
9
9
  import {
10
10
  parseDekKey
11
- } from "./chunk-IZTU6RKH.js";
11
+ } from "./chunk-JMGDHKQF.js";
12
12
  import {
13
13
  envelopeOpensUnderAny,
14
14
  rekeyBlobSet,
15
15
  rekeyEnvelopeIfNeeded
16
- } from "./chunk-DOPZWTMJ.js";
16
+ } from "./chunk-4ZS56W5S.js";
17
17
  import {
18
18
  buildRecordEnvelope
19
- } from "./chunk-4RUFYGWG.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-USKHHOIV.js";
34
+ } from "./chunk-HPVZCW43.js";
35
35
  import {
36
36
  NOYDB_KEYRING_VERSION
37
- } from "./chunk-N4CHCXDL.js";
37
+ } from "./chunk-7MG7SJT7.js";
38
38
  import {
39
39
  BLOB_ADDRESS_KEY_ID,
40
40
  DirectoryDisabledError,
@@ -51,9 +51,18 @@ import {
51
51
  USER_ENVELOPE_COLLECTION,
52
52
  ValidationError,
53
53
  WrongPromptError
54
- } from "./chunk-SW4TOSJL.js";
54
+ } from "./chunk-7O3Y4PPD.js";
55
55
 
56
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
+ }
57
66
  function nextRosterEpoch(current) {
58
67
  return Number.isFinite(current) ? current + 1 : 1;
59
68
  }
@@ -1384,6 +1393,7 @@ async function writeKeyringFile(store, vault, userId, keyringFile) {
1384
1393
  }
1385
1394
 
1386
1395
  export {
1396
+ assertRosterEpochCurrent,
1387
1397
  nextRosterEpoch,
1388
1398
  mintRosterTag,
1389
1399
  assertRosterAuthenticated,
@@ -1430,4 +1440,4 @@ export {
1430
1440
  hasImportCapability,
1431
1441
  evaluateImportCapability
1432
1442
  };
1433
- //# sourceMappingURL=chunk-OHGCRKWA.js.map
1443
+ //# sourceMappingURL=chunk-3V4KWFX7.js.map