@noy-db/hub 0.4.0-pre.4 → 0.4.0-pre.6

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 (470) hide show
  1. package/README.md +2 -2
  2. package/dist/api-5QVQX4HG.js +20 -0
  3. package/dist/attestation/index.js +18 -18
  4. package/dist/{backup-JL2GOTYQ.js → backup-USYSNCYM.js} +11 -11
  5. package/dist/blobs/index.js +15 -12
  6. package/dist/blobs/index.js.map +1 -1
  7. package/dist/broker/index.js +12 -12
  8. package/dist/cargo/index.js +34 -36
  9. package/dist/{chunk-JLHKBAFY.js → chunk-2BVW754E.js} +3 -3
  10. package/dist/{chunk-T7S4V52L.js → chunk-2PDBYF2O.js} +4 -4
  11. package/dist/{chunk-YGBIBOCR.js → chunk-2ZSC454H.js} +7 -7
  12. package/dist/{chunk-IGAIOGCN.js → chunk-32467U5J.js} +4 -4
  13. package/dist/{chunk-JA5O7UEZ.js → chunk-3GXDB3NQ.js} +6 -6
  14. package/dist/chunk-3GXDB3NQ.js.map +1 -0
  15. package/dist/{chunk-U73LHVPF.js → chunk-3S2YNMUS.js} +54 -6
  16. package/dist/chunk-3S2YNMUS.js.map +1 -0
  17. package/dist/{chunk-JW3XCZA2.js → chunk-3TZUC4WS.js} +11 -11
  18. package/dist/{chunk-JA5B3SLH.js → chunk-44Y3P5U6.js} +2 -2
  19. package/dist/{chunk-25G7U6RD.js → chunk-4B3DL75F.js} +2 -2
  20. package/dist/{chunk-L4OA7G5T.js → chunk-522MBPE5.js} +2 -2
  21. package/dist/chunk-5ABOFAHN.js +81 -0
  22. package/dist/chunk-5ABOFAHN.js.map +1 -0
  23. package/dist/chunk-5D2ALSM5.js +19 -0
  24. package/dist/chunk-5D2ALSM5.js.map +1 -0
  25. package/dist/{chunk-M25ZIEB2.js → chunk-5HSSTOOG.js} +2 -2
  26. package/dist/{chunk-LLVW4V7R.js → chunk-5WLDZZ6S.js} +3 -3
  27. package/dist/{chunk-BCOKZC4B.js → chunk-6SSWOUUS.js} +19 -19
  28. package/dist/chunk-6SSWOUUS.js.map +1 -0
  29. package/dist/{chunk-IGM563N5.js → chunk-6SYOHUHM.js} +6 -6
  30. package/dist/chunk-6SYOHUHM.js.map +1 -0
  31. package/dist/{chunk-7B4GPCX7.js → chunk-7IQWHYL2.js} +5 -5
  32. package/dist/{chunk-J3VW4J4E.js → chunk-7LP7FFJ2.js} +2 -2
  33. package/dist/chunk-7LP7FFJ2.js.map +1 -0
  34. package/dist/{chunk-5P5AAXYA.js → chunk-7U6AB7DZ.js} +7 -7
  35. package/dist/chunk-7U6AB7DZ.js.map +1 -0
  36. package/dist/chunk-AFHQATY4.js +47 -0
  37. package/dist/chunk-AFHQATY4.js.map +1 -0
  38. package/dist/{chunk-OWE4BNTM.js → chunk-AZXEOEQK.js} +4 -4
  39. package/dist/{chunk-GBEXTC6Z.js → chunk-BAAUFCJK.js} +3 -3
  40. package/dist/chunk-BAAUFCJK.js.map +1 -0
  41. package/dist/{chunk-BZEPJJOK.js → chunk-C2V7AJO2.js} +4 -4
  42. package/dist/chunk-CADUYBQD.js +151 -0
  43. package/dist/chunk-CADUYBQD.js.map +1 -0
  44. package/dist/{chunk-2JZ763FV.js → chunk-D4LAJ737.js} +2 -2
  45. package/dist/{chunk-5BHNQNBI.js → chunk-DOZFU7OZ.js} +1 -1
  46. package/dist/chunk-DOZFU7OZ.js.map +1 -0
  47. package/dist/{chunk-MEKAMERX.js → chunk-E7FSBI6I.js} +29 -29
  48. package/dist/chunk-E7FSBI6I.js.map +1 -0
  49. package/dist/{chunk-N4FZ6ITM.js → chunk-EGU4PWQW.js} +2 -2
  50. package/dist/chunk-EP5L47XV.js +22 -0
  51. package/dist/chunk-EP5L47XV.js.map +1 -0
  52. package/dist/{chunk-EW4HFWGJ.js → chunk-EPME33Y4.js} +6 -6
  53. package/dist/{chunk-W7TCXZWU.js → chunk-EWPS35AR.js} +794 -1045
  54. package/dist/chunk-EWPS35AR.js.map +1 -0
  55. package/dist/{chunk-JKWNG3TM.js → chunk-FHHYCBBP.js} +2 -2
  56. package/dist/{chunk-5BB3N4KU.js → chunk-G4MFQXYX.js} +2 -2
  57. package/dist/{chunk-KVHWEPT2.js → chunk-GHEMAVTN.js} +2 -2
  58. package/dist/{chunk-CGPO3ZYB.js → chunk-GQT6J4FJ.js} +15 -2
  59. package/dist/chunk-GQT6J4FJ.js.map +1 -0
  60. package/dist/{chunk-XW7NWO4A.js → chunk-GTNRMJYH.js} +2 -2
  61. package/dist/{chunk-YG2EG6CB.js → chunk-H5GMROCB.js} +4 -4
  62. package/dist/{chunk-JIMEB4C6.js → chunk-HA7P3BTB.js} +26 -177
  63. package/dist/chunk-HA7P3BTB.js.map +1 -0
  64. package/dist/{chunk-5KI3REO3.js → chunk-HDF5R2K6.js} +7 -7
  65. package/dist/{chunk-V3YB7RGR.js → chunk-HVPW6PCX.js} +3 -3
  66. package/dist/{chunk-2VUISNGP.js → chunk-HXVRRJBD.js} +5 -5
  67. package/dist/{chunk-ZJGZDOQO.js → chunk-ICYC5YNI.js} +6 -6
  68. package/dist/{chunk-KR5EGWI4.js → chunk-IUATR5UE.js} +27 -5
  69. package/dist/chunk-IUATR5UE.js.map +1 -0
  70. package/dist/{chunk-AFBJHD55.js → chunk-JGOKAZNB.js} +5 -5
  71. package/dist/{chunk-XGVDLQJE.js → chunk-JOCMXSR2.js} +3 -3
  72. package/dist/{chunk-XGVDLQJE.js.map → chunk-JOCMXSR2.js.map} +1 -1
  73. package/dist/{chunk-HGVFJL63.js → chunk-JTIPVW4J.js} +15 -5
  74. package/dist/{chunk-HGVFJL63.js.map → chunk-JTIPVW4J.js.map} +1 -1
  75. package/dist/{chunk-QXPOEAKR.js → chunk-KCZAFDP5.js} +2 -2
  76. package/dist/{chunk-MSO2C3KG.js → chunk-LC7DSMHR.js} +2 -2
  77. package/dist/{chunk-OVFCAS7U.js → chunk-LG2GUYRX.js} +9 -9
  78. package/dist/{chunk-2KL6NDD4.js → chunk-LN3MQFUE.js} +56 -4
  79. package/dist/chunk-LN3MQFUE.js.map +1 -0
  80. package/dist/{chunk-QUIG6BZT.js → chunk-M4GO4ZJK.js} +226 -36
  81. package/dist/chunk-M4GO4ZJK.js.map +1 -0
  82. package/dist/{chunk-QDNVHA2F.js → chunk-M7W2KYTL.js} +2 -2
  83. package/dist/{chunk-XULHFSHO.js → chunk-MLCTPWSO.js} +5 -5
  84. package/dist/chunk-MLCTPWSO.js.map +1 -0
  85. package/dist/{chunk-PEY6ZTCF.js → chunk-MMVQ3SUO.js} +9 -9
  86. package/dist/{chunk-PEY6ZTCF.js.map → chunk-MMVQ3SUO.js.map} +1 -1
  87. package/dist/{chunk-4X6DJZHY.js → chunk-MPPWL64H.js} +26 -43
  88. package/dist/chunk-MPPWL64H.js.map +1 -0
  89. package/dist/{chunk-QYJIOWKN.js → chunk-MQBFT2OT.js} +11 -9
  90. package/dist/chunk-MQBFT2OT.js.map +1 -0
  91. package/dist/{chunk-IUIVDVXM.js → chunk-MUPZ6IZX.js} +2 -2
  92. package/dist/{chunk-GZ2GKOF6.js → chunk-NA374QG7.js} +3 -3
  93. package/dist/chunk-NIKO2BBZ.js +23 -0
  94. package/dist/chunk-NIKO2BBZ.js.map +1 -0
  95. package/dist/{chunk-2U7Y7BNJ.js → chunk-ONB627HU.js} +2 -2
  96. package/dist/{chunk-GYB2QK5H.js → chunk-OWLZONGX.js} +2 -2
  97. package/dist/{chunk-YHPUDB7Q.js → chunk-OWOT7CFC.js} +2 -2
  98. package/dist/{chunk-VEX6G3YL.js → chunk-P4NUJVWL.js} +2 -2
  99. package/dist/chunk-PEOZ34EM.js +13 -0
  100. package/dist/chunk-PEOZ34EM.js.map +1 -0
  101. package/dist/{chunk-NM4LVUXH.js → chunk-PTT2NB46.js} +2 -2
  102. package/dist/chunk-PVEWA2DU.js +23 -0
  103. package/dist/chunk-PVEWA2DU.js.map +1 -0
  104. package/dist/{chunk-2ITLQZV5.js → chunk-PWWWMRT7.js} +2 -2
  105. package/dist/{chunk-FLHOTGOO.js → chunk-QVGEVZ5F.js} +3 -3
  106. package/dist/{chunk-HKR25MGX.js → chunk-QVIZDLAR.js} +10 -10
  107. package/dist/chunk-QVIZDLAR.js.map +1 -0
  108. package/dist/{chunk-OOTTXUNV.js → chunk-RM5EXCFF.js} +2 -2
  109. package/dist/{chunk-OOTTXUNV.js.map → chunk-RM5EXCFF.js.map} +1 -1
  110. package/dist/{chunk-OGFPMCSP.js → chunk-SBOHNJUD.js} +2 -2
  111. package/dist/{chunk-EDC6MLXV.js → chunk-SEU6QHH4.js} +2 -2
  112. package/dist/chunk-SMY5X46Z.js +14 -0
  113. package/dist/chunk-SMY5X46Z.js.map +1 -0
  114. package/dist/{chunk-F4COUZLL.js → chunk-TMR64XPL.js} +2 -2
  115. package/dist/{chunk-5OZCCLNC.js → chunk-TSNRZSRC.js} +2 -2
  116. package/dist/{chunk-2RMDVWGB.js → chunk-UNREYBZO.js} +2 -2
  117. package/dist/{chunk-BLB7P7LS.js → chunk-V2R2VWER.js} +176 -17
  118. package/dist/chunk-V2R2VWER.js.map +1 -0
  119. package/dist/{chunk-3XVOLB75.js → chunk-VDTWFN2P.js} +7 -5
  120. package/dist/chunk-VDTWFN2P.js.map +1 -0
  121. package/dist/chunk-VKQCVU2Z.js +21 -0
  122. package/dist/chunk-VKQCVU2Z.js.map +1 -0
  123. package/dist/{chunk-QCUH2G77.js → chunk-VNJMLOQS.js} +6 -6
  124. package/dist/{chunk-UEO5CHOP.js → chunk-WCJJQV2D.js} +13 -13
  125. package/dist/chunk-WCJJQV2D.js.map +1 -0
  126. package/dist/{chunk-25ZDB25Z.js → chunk-WWBC4KLB.js} +3 -3
  127. package/dist/chunk-WWBC4KLB.js.map +1 -0
  128. package/dist/{chunk-V7RGFJ3Z.js → chunk-XG7OZDOS.js} +6 -6
  129. package/dist/{chunk-GS3Q2KOZ.js → chunk-XONZGK6J.js} +2 -2
  130. package/dist/{chunk-5SZ24DL5.js → chunk-XSOGLHGY.js} +6 -6
  131. package/dist/{chunk-CCT4WZI6.js → chunk-XY6MNSAF.js} +5 -5
  132. package/dist/chunk-XY6MNSAF.js.map +1 -0
  133. package/dist/chunk-XZHEOSQ2.js +16 -0
  134. package/dist/chunk-XZHEOSQ2.js.map +1 -0
  135. package/dist/{chunk-NOT7XA7Q.js → chunk-YGMREQAK.js} +5 -5
  136. package/dist/{chunk-H4SMS4O2.js → chunk-YJ3TREAC.js} +2 -2
  137. package/dist/chunk-YMUFFJCO.js +23 -0
  138. package/dist/chunk-YMUFFJCO.js.map +1 -0
  139. package/dist/{chunk-E2R5NRZD.js → chunk-Z4D3YGAB.js} +2 -2
  140. package/dist/{chunk-WJDYZP3U.js → chunk-ZDFU34XY.js} +42 -39
  141. package/dist/chunk-ZDFU34XY.js.map +1 -0
  142. package/dist/{chunk-BZK6JEX4.js → chunk-ZF572E2M.js} +5 -5
  143. package/dist/{chunk-DEQ2JTBR.js → chunk-ZGEFBDPR.js} +4 -4
  144. package/dist/chunk-ZGEFBDPR.js.map +1 -0
  145. package/dist/{chunk-QAFWRGVD.js → chunk-ZHMUFYZF.js} +7 -7
  146. package/dist/{chunk-BVZGNMVM.js → chunk-ZHZ4PET5.js} +3 -3
  147. package/dist/{chunk-IZX3WZBF.js → chunk-ZM72UO3Y.js} +4 -4
  148. package/dist/{chunk-STR7WBOB.js → chunk-ZUDAK436.js} +2 -2
  149. package/dist/{chunk-ITI3SJRB.js → chunk-ZX5FNWH7.js} +2 -2
  150. package/dist/classified/index.js +5 -5
  151. package/dist/{classified-marker-7S5IEP6Q.js → classified-marker-SVDRXLD3.js} +3 -3
  152. package/dist/collection-facade-S5PPKZD5.js +44 -0
  153. package/dist/{computed-WZNKRLCY.js → computed-33DRJDOC.js} +3 -3
  154. package/dist/consent/index.js +13 -9
  155. package/dist/consent/index.js.map +1 -1
  156. package/dist/{cover-B5MY43CK.js → cover-ADBCTIKN.js} +4 -4
  157. package/dist/crdt/index.js +4 -0
  158. package/dist/crdt/index.js.map +1 -1
  159. package/dist/{dead-filter-KRRD57MR.js → dead-filter-HKDMTMVY.js} +2 -2
  160. package/dist/delegation-EV7LKJPH.js +25 -0
  161. package/dist/derivations/index.js +12 -12
  162. package/dist/derive-5LDJW76F.js +21 -0
  163. package/dist/dispatch-SPMYNXNW.js +194 -0
  164. package/dist/dispatch-SPMYNXNW.js.map +1 -0
  165. package/dist/dispatch-V5MSMQYX.js +72 -0
  166. package/dist/dispatch-V5MSMQYX.js.map +1 -0
  167. package/dist/{enclave-YFKA3GJT.js → enclave-ZA7C3H2L.js} +11 -11
  168. package/dist/executor-FCJEH3FU.js +9 -0
  169. package/dist/executor-OHET7TF7.js +9 -0
  170. package/dist/executor-SVHAJZ4A.js +28 -0
  171. package/dist/export-accessible-S35YKIBL.js +23 -0
  172. package/dist/extract-partition-UVHAM5WZ.js +38 -0
  173. package/dist/{fanout-sidecar-HJV3A7PM.js → fanout-sidecar-HRMHC34B.js} +9 -9
  174. package/dist/find-LEBUXVL7.js +11 -0
  175. package/dist/forget/index.js +9 -9
  176. package/dist/guards/index.js +3 -3
  177. package/dist/history/index.js +16 -12
  178. package/dist/history/index.js.map +1 -1
  179. package/dist/i18n/index.js +16 -14
  180. package/dist/i18n/index.js.map +1 -1
  181. package/dist/index.d.ts +17 -16
  182. package/dist/index.js +155 -211
  183. package/dist/index.js.map +1 -1
  184. package/dist/indexing/index.js +4 -2
  185. package/dist/indexing/index.js.map +1 -1
  186. package/dist/issue-5X3SMCF4.js +19 -0
  187. package/dist/kernel/collection.d.ts +0 -1
  188. package/dist/kernel/enclave/crypto.d.ts +8 -8
  189. package/dist/kernel/enclave/index.d.ts +2 -2
  190. package/dist/kernel/errors.d.ts +20 -20
  191. package/dist/kernel/lazy.d.ts +30 -0
  192. package/dist/kernel/noydb.d.ts +53 -101
  193. package/dist/kernel/query/builder.d.ts +10 -10
  194. package/dist/kernel/query/index.d.ts +0 -6
  195. package/dist/kernel/query/scan-builder.d.ts +4 -4
  196. package/dist/kernel/types.d.ts +87 -46
  197. package/dist/kernel/validation.d.ts +33 -33
  198. package/dist/kernel/vault.d.ts +12 -149
  199. package/dist/kernel/via/dispatch.d.ts +7 -0
  200. package/dist/{ledger-SW6QQOAV.js → ledger-K6JBFL3Z.js} +11 -11
  201. package/dist/liberate-NHTCKBU4.js +24 -0
  202. package/dist/{link-set-GNGGCFI4.js → link-set-XVZY2ODC.js} +11 -11
  203. package/dist/materialized-views/index.js +22 -19
  204. package/dist/noydb-TI3RFU6M.js +78 -0
  205. package/dist/overlay-views/index.js +4 -4
  206. package/dist/periods/index.js +15 -13
  207. package/dist/pod/index.js +11 -12
  208. package/dist/{policy-EAXSJNOT.js → policy-QWGJB7P7.js} +5 -5
  209. package/dist/port/with/collection-options.d.ts +171 -0
  210. package/dist/port/with/collection-registries.d.ts +62 -0
  211. package/dist/port/with/strategies.d.ts +2 -2
  212. package/dist/port/with/team-strategy.d.ts +3 -2
  213. package/dist/portability/index.js +8 -8
  214. package/dist/{post-register-A7HCFBP5.js → post-register-5VHHVFJY.js} +6 -6
  215. package/dist/query/index.js +6 -46
  216. package/dist/{aggregate → reduce}/index.js +24 -17
  217. package/dist/reduce/index.js.map +1 -0
  218. package/dist/register-CEX7R7NE.js +23 -0
  219. package/dist/registry-7CZWF3EQ.js +9 -0
  220. package/dist/registry-DIKMRXUC.js +19 -0
  221. package/dist/registry-EWIB5NTI.js +18 -0
  222. package/dist/request-withdrawal-AAG57QO4.js +31 -0
  223. package/dist/{reveal-PB3YG544.js → reveal-7OOT5XPD.js} +6 -6
  224. package/dist/revoke-U5LCIJMF.js +24 -0
  225. package/dist/satellites/index.js +1 -1
  226. package/dist/sealed-record/index.js +12 -12
  227. package/dist/{seed-EKF4DIBB.js → seed-GVOI6QP6.js} +12 -12
  228. package/dist/seed-GVOI6QP6.js.map +1 -0
  229. package/dist/session/index.js +13 -9
  230. package/dist/session/index.js.map +1 -1
  231. package/dist/shadow/index.js +6 -2
  232. package/dist/shadow/index.js.map +1 -1
  233. package/dist/signer-NAA2OX7H.js +25 -0
  234. package/dist/snapshots/index.js +14 -10
  235. package/dist/snapshots/index.js.map +1 -1
  236. package/dist/{stale-4UNPHWOU.js → stale-BJO2WIN7.js} +11 -10
  237. package/dist/storage-FL7XXZTN.js +23 -0
  238. package/dist/{store-coordination-provider-3AELCZ4Y.js → store-coordination-provider-DX5HECK3.js} +3 -3
  239. package/dist/sync/index.js +14 -10
  240. package/dist/sync/index.js.map +1 -1
  241. package/dist/team/index.js +26 -28
  242. package/dist/tiers/index.js +10 -10
  243. package/dist/to/index.js +1 -1
  244. package/dist/tx/index.js +7 -3
  245. package/dist/tx/index.js.map +1 -1
  246. package/dist/util/index.js +1 -1
  247. package/dist/{verify-MXN66IIH.js → verify-5X37OXRY.js} +5 -5
  248. package/dist/via/blob/index.d.ts +2 -0
  249. package/dist/via/i18n/core.d.ts +1 -1
  250. package/dist/via/i18n/index.d.ts +2 -0
  251. package/dist/via/money/money-reducer.d.ts +2 -2
  252. package/dist/{walk-H4YE52S2.js → walk-JXMWKKQW.js} +11 -11
  253. package/dist/with-audit/consent/index.d.ts +2 -0
  254. package/dist/with-audit/periods/index.d.ts +2 -0
  255. package/dist/with-audit/portability/export-accessible.d.ts +4 -4
  256. package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
  257. package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
  258. package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
  259. package/dist/with-cargo/adopt-partition.d.ts +7 -7
  260. package/dist/with-cargo/floor.d.ts +3 -3
  261. package/dist/with-cargo/index.d.ts +1 -1
  262. package/dist/with-commit/crdt/index.d.ts +2 -0
  263. package/dist/with-commit/history/index.d.ts +2 -0
  264. package/dist/with-commit/history/time-machine.d.ts +2 -2
  265. package/dist/with-fork/shadow/index.d.ts +2 -0
  266. package/dist/with-fork/snapshots/index.d.ts +2 -0
  267. package/dist/with-formula/derivations/dispatch.d.ts +98 -0
  268. package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
  269. package/dist/with-formula/materialized-views/types.d.ts +7 -7
  270. package/dist/with-lookup/indexing/index.d.ts +2 -0
  271. package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
  272. package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
  273. package/dist/with-lookup/reduce/index.d.ts +34 -0
  274. package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +10 -10
  275. package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
  276. package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
  277. package/dist/with-party/custody/liberate.d.ts +3 -3
  278. package/dist/with-party/session/dev-unlock.d.ts +2 -2
  279. package/dist/with-party/session/index.d.ts +2 -0
  280. package/dist/with-party/session/session.d.ts +2 -2
  281. package/dist/with-party/sync/index.d.ts +2 -0
  282. package/dist/with-party/team/deed.d.ts +8 -8
  283. package/dist/with-party/team/index.d.ts +2 -2
  284. package/dist/with-party/team/keyring.d.ts +39 -20
  285. package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
  286. package/dist/with-party/team/noydb-facade.d.ts +43 -42
  287. package/dist/with-party/team/peer-recover.d.ts +13 -13
  288. package/dist/with-party/team/recovery.d.ts +5 -5
  289. package/dist/with-party/team/rotate-recover.d.ts +30 -30
  290. package/dist/with-pod/bundle.d.ts +30 -30
  291. package/dist/with-pod/format.d.ts +2 -2
  292. package/dist/withdraw-accessible-GO6KQJVM.js +28 -0
  293. package/package.json +6 -34
  294. package/dist/aggregate/index.js.map +0 -1
  295. package/dist/api-UPAT2O3M.js +0 -20
  296. package/dist/as/index.js +0 -30
  297. package/dist/at/index.js +0 -1
  298. package/dist/by/index.js +0 -11
  299. package/dist/chunk-25ZDB25Z.js.map +0 -1
  300. package/dist/chunk-2KL6NDD4.js.map +0 -1
  301. package/dist/chunk-2YELV6TV.js +0 -1
  302. package/dist/chunk-3O62PVDW.js +0 -205
  303. package/dist/chunk-3O62PVDW.js.map +0 -1
  304. package/dist/chunk-3XVOLB75.js.map +0 -1
  305. package/dist/chunk-4X6DJZHY.js.map +0 -1
  306. package/dist/chunk-5BHNQNBI.js.map +0 -1
  307. package/dist/chunk-5P5AAXYA.js.map +0 -1
  308. package/dist/chunk-BCOKZC4B.js.map +0 -1
  309. package/dist/chunk-BLB7P7LS.js.map +0 -1
  310. package/dist/chunk-CCT4WZI6.js.map +0 -1
  311. package/dist/chunk-CGPO3ZYB.js.map +0 -1
  312. package/dist/chunk-DEQ2JTBR.js.map +0 -1
  313. package/dist/chunk-GBEXTC6Z.js.map +0 -1
  314. package/dist/chunk-HKR25MGX.js.map +0 -1
  315. package/dist/chunk-IGM563N5.js.map +0 -1
  316. package/dist/chunk-J3VW4J4E.js.map +0 -1
  317. package/dist/chunk-JA5O7UEZ.js.map +0 -1
  318. package/dist/chunk-JIMEB4C6.js.map +0 -1
  319. package/dist/chunk-KMONEHDJ.js +0 -54
  320. package/dist/chunk-KMONEHDJ.js.map +0 -1
  321. package/dist/chunk-KR5EGWI4.js.map +0 -1
  322. package/dist/chunk-LB7FD65R.js +0 -163
  323. package/dist/chunk-LB7FD65R.js.map +0 -1
  324. package/dist/chunk-MEKAMERX.js.map +0 -1
  325. package/dist/chunk-QUIG6BZT.js.map +0 -1
  326. package/dist/chunk-QYJIOWKN.js.map +0 -1
  327. package/dist/chunk-U73LHVPF.js.map +0 -1
  328. package/dist/chunk-UEO5CHOP.js.map +0 -1
  329. package/dist/chunk-W7TCXZWU.js.map +0 -1
  330. package/dist/chunk-WEC3JGBA.js +0 -255
  331. package/dist/chunk-WEC3JGBA.js.map +0 -1
  332. package/dist/chunk-WJDYZP3U.js.map +0 -1
  333. package/dist/chunk-XULHFSHO.js.map +0 -1
  334. package/dist/collection-facade-CMZGQ6IS.js +0 -44
  335. package/dist/delegation-UT76AQIG.js +0 -25
  336. package/dist/derive-SGRCCKVP.js +0 -21
  337. package/dist/executor-TEZYRDN3.js +0 -9
  338. package/dist/executor-WQQRU6DO.js +0 -9
  339. package/dist/executor-YORMIBWV.js +0 -26
  340. package/dist/export-accessible-HXMKW5LJ.js +0 -23
  341. package/dist/extract-partition-QGQ2R42J.js +0 -38
  342. package/dist/find-VV6PBIHK.js +0 -11
  343. package/dist/in/index.js +0 -1
  344. package/dist/issue-7JJ4Z7E2.js +0 -19
  345. package/dist/liberate-FK7JI2QX.js +0 -24
  346. package/dist/noydb-N5IW6OFZ.js +0 -70
  347. package/dist/on/index.js +0 -17
  348. package/dist/port/as/index.d.ts +0 -26
  349. package/dist/port/at/index.d.ts +0 -18
  350. package/dist/port/in/index.d.ts +0 -21
  351. package/dist/port/on/index.d.ts +0 -27
  352. package/dist/port/ui/index.d.ts +0 -21
  353. package/dist/port/with/index.d.ts +0 -18
  354. package/dist/register-YBMRLZLO.js +0 -23
  355. package/dist/registry-3LXKNXWI.js +0 -9
  356. package/dist/registry-4V4YQCXJ.js +0 -19
  357. package/dist/registry-ZULMLCJK.js +0 -18
  358. package/dist/request-withdrawal-SEVUEUDG.js +0 -31
  359. package/dist/request-withdrawal-SEVUEUDG.js.map +0 -1
  360. package/dist/revoke-5QULL5GT.js +0 -24
  361. package/dist/revoke-5QULL5GT.js.map +0 -1
  362. package/dist/seed-EKF4DIBB.js.map +0 -1
  363. package/dist/signer-ZMH35FT4.js +0 -25
  364. package/dist/signer-ZMH35FT4.js.map +0 -1
  365. package/dist/stale-4UNPHWOU.js.map +0 -1
  366. package/dist/storage-QOZKQMID.js +0 -23
  367. package/dist/storage-QOZKQMID.js.map +0 -1
  368. package/dist/ui/index.js +0 -1
  369. package/dist/ui/index.js.map +0 -1
  370. package/dist/with/index.js +0 -31
  371. package/dist/with/index.js.map +0 -1
  372. package/dist/with-lookup/aggregate/index.d.ts +0 -23
  373. package/dist/withdraw-accessible-HPOVNG2G.js +0 -28
  374. package/dist/withdraw-accessible-HPOVNG2G.js.map +0 -1
  375. /package/dist/{api-UPAT2O3M.js.map → api-5QVQX4HG.js.map} +0 -0
  376. /package/dist/{backup-JL2GOTYQ.js.map → backup-USYSNCYM.js.map} +0 -0
  377. /package/dist/{chunk-JLHKBAFY.js.map → chunk-2BVW754E.js.map} +0 -0
  378. /package/dist/{chunk-T7S4V52L.js.map → chunk-2PDBYF2O.js.map} +0 -0
  379. /package/dist/{chunk-YGBIBOCR.js.map → chunk-2ZSC454H.js.map} +0 -0
  380. /package/dist/{chunk-IGAIOGCN.js.map → chunk-32467U5J.js.map} +0 -0
  381. /package/dist/{chunk-JW3XCZA2.js.map → chunk-3TZUC4WS.js.map} +0 -0
  382. /package/dist/{chunk-JA5B3SLH.js.map → chunk-44Y3P5U6.js.map} +0 -0
  383. /package/dist/{chunk-25G7U6RD.js.map → chunk-4B3DL75F.js.map} +0 -0
  384. /package/dist/{chunk-L4OA7G5T.js.map → chunk-522MBPE5.js.map} +0 -0
  385. /package/dist/{chunk-M25ZIEB2.js.map → chunk-5HSSTOOG.js.map} +0 -0
  386. /package/dist/{chunk-LLVW4V7R.js.map → chunk-5WLDZZ6S.js.map} +0 -0
  387. /package/dist/{chunk-7B4GPCX7.js.map → chunk-7IQWHYL2.js.map} +0 -0
  388. /package/dist/{chunk-OWE4BNTM.js.map → chunk-AZXEOEQK.js.map} +0 -0
  389. /package/dist/{chunk-BZEPJJOK.js.map → chunk-C2V7AJO2.js.map} +0 -0
  390. /package/dist/{chunk-2JZ763FV.js.map → chunk-D4LAJ737.js.map} +0 -0
  391. /package/dist/{chunk-N4FZ6ITM.js.map → chunk-EGU4PWQW.js.map} +0 -0
  392. /package/dist/{chunk-EW4HFWGJ.js.map → chunk-EPME33Y4.js.map} +0 -0
  393. /package/dist/{chunk-JKWNG3TM.js.map → chunk-FHHYCBBP.js.map} +0 -0
  394. /package/dist/{chunk-5BB3N4KU.js.map → chunk-G4MFQXYX.js.map} +0 -0
  395. /package/dist/{chunk-KVHWEPT2.js.map → chunk-GHEMAVTN.js.map} +0 -0
  396. /package/dist/{chunk-XW7NWO4A.js.map → chunk-GTNRMJYH.js.map} +0 -0
  397. /package/dist/{chunk-YG2EG6CB.js.map → chunk-H5GMROCB.js.map} +0 -0
  398. /package/dist/{chunk-5KI3REO3.js.map → chunk-HDF5R2K6.js.map} +0 -0
  399. /package/dist/{chunk-V3YB7RGR.js.map → chunk-HVPW6PCX.js.map} +0 -0
  400. /package/dist/{chunk-2VUISNGP.js.map → chunk-HXVRRJBD.js.map} +0 -0
  401. /package/dist/{chunk-ZJGZDOQO.js.map → chunk-ICYC5YNI.js.map} +0 -0
  402. /package/dist/{chunk-AFBJHD55.js.map → chunk-JGOKAZNB.js.map} +0 -0
  403. /package/dist/{chunk-QXPOEAKR.js.map → chunk-KCZAFDP5.js.map} +0 -0
  404. /package/dist/{chunk-MSO2C3KG.js.map → chunk-LC7DSMHR.js.map} +0 -0
  405. /package/dist/{chunk-OVFCAS7U.js.map → chunk-LG2GUYRX.js.map} +0 -0
  406. /package/dist/{chunk-QDNVHA2F.js.map → chunk-M7W2KYTL.js.map} +0 -0
  407. /package/dist/{chunk-IUIVDVXM.js.map → chunk-MUPZ6IZX.js.map} +0 -0
  408. /package/dist/{chunk-GZ2GKOF6.js.map → chunk-NA374QG7.js.map} +0 -0
  409. /package/dist/{chunk-2U7Y7BNJ.js.map → chunk-ONB627HU.js.map} +0 -0
  410. /package/dist/{chunk-GYB2QK5H.js.map → chunk-OWLZONGX.js.map} +0 -0
  411. /package/dist/{chunk-YHPUDB7Q.js.map → chunk-OWOT7CFC.js.map} +0 -0
  412. /package/dist/{chunk-VEX6G3YL.js.map → chunk-P4NUJVWL.js.map} +0 -0
  413. /package/dist/{chunk-NM4LVUXH.js.map → chunk-PTT2NB46.js.map} +0 -0
  414. /package/dist/{chunk-2ITLQZV5.js.map → chunk-PWWWMRT7.js.map} +0 -0
  415. /package/dist/{chunk-FLHOTGOO.js.map → chunk-QVGEVZ5F.js.map} +0 -0
  416. /package/dist/{chunk-OGFPMCSP.js.map → chunk-SBOHNJUD.js.map} +0 -0
  417. /package/dist/{chunk-EDC6MLXV.js.map → chunk-SEU6QHH4.js.map} +0 -0
  418. /package/dist/{chunk-F4COUZLL.js.map → chunk-TMR64XPL.js.map} +0 -0
  419. /package/dist/{chunk-5OZCCLNC.js.map → chunk-TSNRZSRC.js.map} +0 -0
  420. /package/dist/{chunk-2RMDVWGB.js.map → chunk-UNREYBZO.js.map} +0 -0
  421. /package/dist/{chunk-QCUH2G77.js.map → chunk-VNJMLOQS.js.map} +0 -0
  422. /package/dist/{chunk-V7RGFJ3Z.js.map → chunk-XG7OZDOS.js.map} +0 -0
  423. /package/dist/{chunk-GS3Q2KOZ.js.map → chunk-XONZGK6J.js.map} +0 -0
  424. /package/dist/{chunk-5SZ24DL5.js.map → chunk-XSOGLHGY.js.map} +0 -0
  425. /package/dist/{chunk-NOT7XA7Q.js.map → chunk-YGMREQAK.js.map} +0 -0
  426. /package/dist/{chunk-H4SMS4O2.js.map → chunk-YJ3TREAC.js.map} +0 -0
  427. /package/dist/{chunk-E2R5NRZD.js.map → chunk-Z4D3YGAB.js.map} +0 -0
  428. /package/dist/{chunk-BZK6JEX4.js.map → chunk-ZF572E2M.js.map} +0 -0
  429. /package/dist/{chunk-QAFWRGVD.js.map → chunk-ZHMUFYZF.js.map} +0 -0
  430. /package/dist/{chunk-BVZGNMVM.js.map → chunk-ZHZ4PET5.js.map} +0 -0
  431. /package/dist/{chunk-IZX3WZBF.js.map → chunk-ZM72UO3Y.js.map} +0 -0
  432. /package/dist/{chunk-STR7WBOB.js.map → chunk-ZUDAK436.js.map} +0 -0
  433. /package/dist/{chunk-ITI3SJRB.js.map → chunk-ZX5FNWH7.js.map} +0 -0
  434. /package/dist/{classified-marker-7S5IEP6Q.js.map → classified-marker-SVDRXLD3.js.map} +0 -0
  435. /package/dist/{as/index.js.map → collection-facade-S5PPKZD5.js.map} +0 -0
  436. /package/dist/{at/index.js.map → computed-33DRJDOC.js.map} +0 -0
  437. /package/dist/{by/index.js.map → cover-ADBCTIKN.js.map} +0 -0
  438. /package/dist/{dead-filter-KRRD57MR.js.map → dead-filter-HKDMTMVY.js.map} +0 -0
  439. /package/dist/{chunk-2YELV6TV.js.map → delegation-EV7LKJPH.js.map} +0 -0
  440. /package/dist/{collection-facade-CMZGQ6IS.js.map → derive-5LDJW76F.js.map} +0 -0
  441. /package/dist/{computed-WZNKRLCY.js.map → enclave-ZA7C3H2L.js.map} +0 -0
  442. /package/dist/{cover-B5MY43CK.js.map → executor-FCJEH3FU.js.map} +0 -0
  443. /package/dist/{delegation-UT76AQIG.js.map → executor-OHET7TF7.js.map} +0 -0
  444. /package/dist/{derive-SGRCCKVP.js.map → executor-SVHAJZ4A.js.map} +0 -0
  445. /package/dist/{enclave-YFKA3GJT.js.map → export-accessible-S35YKIBL.js.map} +0 -0
  446. /package/dist/{executor-TEZYRDN3.js.map → extract-partition-UVHAM5WZ.js.map} +0 -0
  447. /package/dist/{fanout-sidecar-HJV3A7PM.js.map → fanout-sidecar-HRMHC34B.js.map} +0 -0
  448. /package/dist/{executor-WQQRU6DO.js.map → find-LEBUXVL7.js.map} +0 -0
  449. /package/dist/{executor-YORMIBWV.js.map → issue-5X3SMCF4.js.map} +0 -0
  450. /package/dist/{export-accessible-HXMKW5LJ.js.map → ledger-K6JBFL3Z.js.map} +0 -0
  451. /package/dist/{extract-partition-QGQ2R42J.js.map → liberate-NHTCKBU4.js.map} +0 -0
  452. /package/dist/{find-VV6PBIHK.js.map → link-set-XVZY2ODC.js.map} +0 -0
  453. /package/dist/{in/index.js.map → noydb-TI3RFU6M.js.map} +0 -0
  454. /package/dist/{issue-7JJ4Z7E2.js.map → policy-QWGJB7P7.js.map} +0 -0
  455. /package/dist/{post-register-A7HCFBP5.js.map → post-register-5VHHVFJY.js.map} +0 -0
  456. /package/dist/{ledger-SW6QQOAV.js.map → register-CEX7R7NE.js.map} +0 -0
  457. /package/dist/{liberate-FK7JI2QX.js.map → registry-7CZWF3EQ.js.map} +0 -0
  458. /package/dist/{link-set-GNGGCFI4.js.map → registry-DIKMRXUC.js.map} +0 -0
  459. /package/dist/{noydb-N5IW6OFZ.js.map → registry-EWIB5NTI.js.map} +0 -0
  460. /package/dist/{on/index.js.map → request-withdrawal-AAG57QO4.js.map} +0 -0
  461. /package/dist/{reveal-PB3YG544.js.map → reveal-7OOT5XPD.js.map} +0 -0
  462. /package/dist/{policy-EAXSJNOT.js.map → revoke-U5LCIJMF.js.map} +0 -0
  463. /package/dist/{register-YBMRLZLO.js.map → signer-NAA2OX7H.js.map} +0 -0
  464. /package/dist/{registry-3LXKNXWI.js.map → stale-BJO2WIN7.js.map} +0 -0
  465. /package/dist/{registry-4V4YQCXJ.js.map → storage-FL7XXZTN.js.map} +0 -0
  466. /package/dist/{store-coordination-provider-3AELCZ4Y.js.map → store-coordination-provider-DX5HECK3.js.map} +0 -0
  467. /package/dist/{verify-MXN66IIH.js.map → verify-5X37OXRY.js.map} +0 -0
  468. /package/dist/{walk-H4YE52S2.js.map → walk-JXMWKKQW.js.map} +0 -0
  469. /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
  470. /package/dist/{registry-ZULMLCJK.js.map → withdraw-accessible-GO6KQJVM.js.map} +0 -0
@@ -2,17 +2,20 @@ import {
2
2
  CONSENT_AUDIT_COLLECTION,
3
3
  loadConsentEntries,
4
4
  writeConsentEntry
5
- } from "../chunk-V3YB7RGR.js";
5
+ } from "../chunk-HVPW6PCX.js";
6
+ import {
7
+ NO_CONSENT
8
+ } from "../chunk-PEOZ34EM.js";
6
9
  import "../chunk-ZJADGNYF.js";
7
- import "../chunk-PEY6ZTCF.js";
8
- import "../chunk-QXPOEAKR.js";
9
- import "../chunk-LLVW4V7R.js";
10
- import "../chunk-M25ZIEB2.js";
11
- import "../chunk-5BB3N4KU.js";
10
+ import "../chunk-MMVQ3SUO.js";
11
+ import "../chunk-KCZAFDP5.js";
12
+ import "../chunk-5WLDZZ6S.js";
13
+ import "../chunk-5HSSTOOG.js";
14
+ import "../chunk-G4MFQXYX.js";
12
15
  import "../chunk-LP7BEXCT.js";
13
- import "../chunk-5P5AAXYA.js";
14
- import "../chunk-5BHNQNBI.js";
15
- import "../chunk-IGM563N5.js";
16
+ import "../chunk-7U6AB7DZ.js";
17
+ import "../chunk-DOZFU7OZ.js";
18
+ import "../chunk-6SYOHUHM.js";
16
19
  import "../chunk-PZ5AY32C.js";
17
20
 
18
21
  // src/with-audit/consent/active.ts
@@ -24,6 +27,7 @@ function withConsent() {
24
27
  }
25
28
  export {
26
29
  CONSENT_AUDIT_COLLECTION,
30
+ NO_CONSENT,
27
31
  loadConsentEntries,
28
32
  withConsent,
29
33
  writeConsentEntry
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-audit/consent/active.ts"],"sourcesContent":["/**\n * Active consent strategy. Calling `withConsent()` returns a\n * `ConsentStrategy` that delegates to the real\n * `writeConsentEntry` / `loadConsentEntries` functions. Only\n * reachable through the `@noy-db/hub/consent` subpath.\n */\n\nimport { writeConsentEntry, loadConsentEntries } from './consent.js'\nimport type { ConsentStrategy } from './strategy.js'\n\n/**\n * Build the default consent strategy. Pass into\n * `createNoydb({ consentStrategy: withConsent() })` to enable\n * per-operation audit writes into the reserved `_consent_audit`\n * collection.\n */\nexport function withConsent(): ConsentStrategy {\n return {\n write: writeConsentEntry,\n read: loadConsentEntries,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-audit/consent/active.ts"],"sourcesContent":["/**\n * Active consent strategy. Calling `withConsent()` returns a\n * `ConsentStrategy` that delegates to the real\n * `writeConsentEntry` / `loadConsentEntries` functions. Only\n * reachable through the `@noy-db/hub/consent` subpath.\n */\n\nimport { writeConsentEntry, loadConsentEntries } from './consent.js'\nimport type { ConsentStrategy } from './strategy.js'\n\n/**\n * Build the default consent strategy. Pass into\n * `createNoydb({ consentStrategy: withConsent() })` to enable\n * per-operation audit writes into the reserved `_consent_audit`\n * collection.\n */\nexport function withConsent(): ConsentStrategy {\n return {\n write: writeConsentEntry,\n read: loadConsentEntries,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;","names":[]}
@@ -14,9 +14,9 @@ import {
14
14
  saveCover,
15
15
  validateCoverInput,
16
16
  validateCoverSize
17
- } from "./chunk-BVZGNMVM.js";
18
- import "./chunk-5BHNQNBI.js";
19
- import "./chunk-IGM563N5.js";
17
+ } from "./chunk-ZHZ4PET5.js";
18
+ import "./chunk-DOZFU7OZ.js";
19
+ import "./chunk-6SYOHUHM.js";
20
20
  import "./chunk-PZ5AY32C.js";
21
21
  export {
22
22
  COVER_FIELDS,
@@ -33,4 +33,4 @@ export {
33
33
  validateCoverInput,
34
34
  validateCoverSize
35
35
  };
36
- //# sourceMappingURL=cover-B5MY43CK.js.map
36
+ //# sourceMappingURL=cover-ADBCTIKN.js.map
@@ -4,6 +4,9 @@ import {
4
4
  mergeCrdtStates,
5
5
  resolveCrdtSnapshot
6
6
  } from "../chunk-4GPE63GU.js";
7
+ import {
8
+ NO_CRDT
9
+ } from "../chunk-PVEWA2DU.js";
7
10
  import "../chunk-PZ5AY32C.js";
8
11
 
9
12
  // src/with-commit/crdt/active.ts
@@ -16,6 +19,7 @@ function withCrdt() {
16
19
  };
17
20
  }
18
21
  export {
22
+ NO_CRDT,
19
23
  buildLwwMapState,
20
24
  buildRgaState,
21
25
  mergeCrdtStates,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/with-commit/crdt/active.ts"],"sourcesContent":["/**\n * Active CRDT strategy factory. Calling `withCrdt()` returns a\n * `CrdtStrategy` whose methods delegate to the real LWW-Map / RGA /\n * merge / snapshot helpers in `./crdt.ts`. Only reachable through\n * the `@noy-db/hub/crdt` subpath.\n */\n\nimport {\n buildLwwMapState,\n buildRgaState,\n mergeCrdtStates,\n resolveCrdtSnapshot,\n} from './crdt.js'\nimport type { CrdtStrategy } from './strategy.js'\n\n/**\n * Build the default CRDT strategy. Pass into\n * `createNoydb({ crdtStrategy: withCrdt() })` to enable collections\n * declared with `crdt: 'lww-map' | 'rga' | 'yjs'`.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withCrdt } from '@noy-db/hub/crdt'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * crdtStrategy: withCrdt(),\n * })\n * const notes = vault.collection('notes', { crdt: 'lww-map' })\n * ```\n */\nexport function withCrdt(): CrdtStrategy {\n return {\n buildLwwMapState,\n buildRgaState,\n mergeCrdtStates,\n resolveCrdtSnapshot,\n }\n}\n"],"mappings":";;;;;;;;;AAgCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/with-commit/crdt/active.ts"],"sourcesContent":["/**\n * Active CRDT strategy factory. Calling `withCrdt()` returns a\n * `CrdtStrategy` whose methods delegate to the real LWW-Map / RGA /\n * merge / snapshot helpers in `./crdt.ts`. Only reachable through\n * the `@noy-db/hub/crdt` subpath.\n */\n\nimport {\n buildLwwMapState,\n buildRgaState,\n mergeCrdtStates,\n resolveCrdtSnapshot,\n} from './crdt.js'\nimport type { CrdtStrategy } from './strategy.js'\n\n/**\n * Build the default CRDT strategy. Pass into\n * `createNoydb({ crdtStrategy: withCrdt() })` to enable collections\n * declared with `crdt: 'lww-map' | 'rga' | 'yjs'`.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withCrdt } from '@noy-db/hub/crdt'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * crdtStrategy: withCrdt(),\n * })\n * const notes = vault.collection('notes', { crdt: 'lww-map' })\n * ```\n */\nexport function withCrdt(): CrdtStrategy {\n return {\n buildLwwMapState,\n buildRgaState,\n mergeCrdtStates,\n resolveCrdtSnapshot,\n }\n}\n"],"mappings":";;;;;;;;;;;;AAgCO,SAAS,WAAyB;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -5,7 +5,7 @@ import "./chunk-PZ5AY32C.js";
5
5
 
6
6
  // src/with-shape/satellites/dead-filter.ts
7
7
  async function liveBaseIdSetsForBundle(store, vaultName, collectionNames, getDEK) {
8
- const { loadPersistedSchema } = await import("./storage-QOZKQMID.js");
8
+ const { loadPersistedSchema } = await import("./storage-FL7XXZTN.js");
9
9
  const out = /* @__PURE__ */ new Map();
10
10
  for (const name of collectionNames) {
11
11
  if (name.startsWith("_")) continue;
@@ -25,4 +25,4 @@ async function liveBaseIdSetsForBundle(store, vaultName, collectionNames, getDEK
25
25
  export {
26
26
  liveBaseIdSetsForBundle
27
27
  };
28
- //# sourceMappingURL=dead-filter-KRRD57MR.js.map
28
+ //# sourceMappingURL=dead-filter-HKDMTMVY.js.map
@@ -0,0 +1,25 @@
1
+ import {
2
+ DELEGATIONS_COLLECTION,
3
+ issueDelegation,
4
+ loadActiveDelegations,
5
+ revokeDelegation
6
+ } from "./chunk-ZF572E2M.js";
7
+ import "./chunk-LC7DSMHR.js";
8
+ import "./chunk-ZJADGNYF.js";
9
+ import "./chunk-MMVQ3SUO.js";
10
+ import "./chunk-KCZAFDP5.js";
11
+ import "./chunk-5WLDZZ6S.js";
12
+ import "./chunk-5HSSTOOG.js";
13
+ import "./chunk-G4MFQXYX.js";
14
+ import "./chunk-LP7BEXCT.js";
15
+ import "./chunk-7U6AB7DZ.js";
16
+ import "./chunk-DOZFU7OZ.js";
17
+ import "./chunk-6SYOHUHM.js";
18
+ import "./chunk-PZ5AY32C.js";
19
+ export {
20
+ DELEGATIONS_COLLECTION,
21
+ issueDelegation,
22
+ loadActiveDelegations,
23
+ revokeDelegation
24
+ };
25
+ //# sourceMappingURL=delegation-EV7LKJPH.js.map
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  withDerivation,
3
3
  withRollup
4
- } from "../chunk-KVHWEPT2.js";
4
+ } from "../chunk-GHEMAVTN.js";
5
5
  import {
6
6
  DerivationRegistry
7
- } from "../chunk-T7S4V52L.js";
8
- import "../chunk-E2R5NRZD.js";
7
+ } from "../chunk-2PDBYF2O.js";
8
+ import "../chunk-Z4D3YGAB.js";
9
9
  import {
10
10
  DerivationExecutor
11
- } from "../chunk-H4SMS4O2.js";
12
- import "../chunk-PEY6ZTCF.js";
13
- import "../chunk-QXPOEAKR.js";
14
- import "../chunk-LLVW4V7R.js";
15
- import "../chunk-M25ZIEB2.js";
16
- import "../chunk-5BB3N4KU.js";
11
+ } from "../chunk-YJ3TREAC.js";
12
+ import "../chunk-MMVQ3SUO.js";
13
+ import "../chunk-KCZAFDP5.js";
14
+ import "../chunk-5WLDZZ6S.js";
15
+ import "../chunk-5HSSTOOG.js";
16
+ import "../chunk-G4MFQXYX.js";
17
17
  import "../chunk-LP7BEXCT.js";
18
- import "../chunk-5P5AAXYA.js";
19
- import "../chunk-5BHNQNBI.js";
18
+ import "../chunk-7U6AB7DZ.js";
19
+ import "../chunk-DOZFU7OZ.js";
20
20
  import {
21
21
  DerivationCapExceededError,
22
22
  DerivationCycleError,
23
23
  DerivationDepthError,
24
24
  DerivationOutputShapeError,
25
25
  DerivationOutputUnknownError
26
- } from "../chunk-IGM563N5.js";
26
+ } from "../chunk-6SYOHUHM.js";
27
27
  import "../chunk-PZ5AY32C.js";
28
28
  export {
29
29
  DerivationCapExceededError,
@@ -0,0 +1,21 @@
1
+ import {
2
+ derivePersistedSchema,
3
+ isZod4Schema,
4
+ isZodSchema
5
+ } from "./chunk-SEU6QHH4.js";
6
+ import "./chunk-MMVQ3SUO.js";
7
+ import "./chunk-KCZAFDP5.js";
8
+ import "./chunk-5WLDZZ6S.js";
9
+ import "./chunk-5HSSTOOG.js";
10
+ import "./chunk-G4MFQXYX.js";
11
+ import "./chunk-LP7BEXCT.js";
12
+ import "./chunk-7U6AB7DZ.js";
13
+ import "./chunk-DOZFU7OZ.js";
14
+ import "./chunk-6SYOHUHM.js";
15
+ import "./chunk-PZ5AY32C.js";
16
+ export {
17
+ derivePersistedSchema,
18
+ isZod4Schema,
19
+ isZodSchema
20
+ };
21
+ //# sourceMappingURL=derive-5LDJW76F.js.map
@@ -0,0 +1,194 @@
1
+ import {
2
+ markStale
3
+ } from "./chunk-5ABOFAHN.js";
4
+ import {
5
+ putDerivedOutput,
6
+ selfWriteFieldEqual
7
+ } from "./chunk-JTIPVW4J.js";
8
+ import "./chunk-5D2ALSM5.js";
9
+ import "./chunk-C2V7AJO2.js";
10
+ import "./chunk-JOCMXSR2.js";
11
+ import "./chunk-ZUDAK436.js";
12
+ import "./chunk-2BVW754E.js";
13
+ import "./chunk-MMVQ3SUO.js";
14
+ import "./chunk-KCZAFDP5.js";
15
+ import "./chunk-5WLDZZ6S.js";
16
+ import "./chunk-5HSSTOOG.js";
17
+ import "./chunk-G4MFQXYX.js";
18
+ import "./chunk-LP7BEXCT.js";
19
+ import "./chunk-7U6AB7DZ.js";
20
+ import "./chunk-DOZFU7OZ.js";
21
+ import {
22
+ DerivationCapExceededError
23
+ } from "./chunk-6SYOHUHM.js";
24
+ import "./chunk-PZ5AY32C.js";
25
+
26
+ // src/with-formula/derivations/dispatch.ts
27
+ async function dispatchArrayDerivationsOnDelete(ctx, id, eraseRecordShapeToo = false) {
28
+ const { derivationSource, collectionName, adapter, vault, getDEK, storeCiphertext } = ctx;
29
+ const strategies = derivationSource.registry().strategiesForSource(collectionName);
30
+ if (strategies.length === 0) return 0;
31
+ const { loadFanoutSidecar, deleteFanoutSidecar } = await import("./fanout-sidecar-HRMHC34B.js");
32
+ const txCtx = derivationSource.getActiveTxContext();
33
+ let erased = 0;
34
+ for (const { spec } of strategies) {
35
+ for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {
36
+ if (outSpec.shape === "record") {
37
+ if (eraseRecordShapeToo && spec.source === collectionName && outSpec.collection !== collectionName) {
38
+ if (await derivationSource.getCollection(outSpec.collection)._internalDelete(id, txCtx)) erased += 1;
39
+ }
40
+ continue;
41
+ }
42
+ const sidecar = await loadFanoutSidecar(adapter, vault, spec.source, id, outputKey, getDEK, storeCiphertext);
43
+ if (!sidecar) continue;
44
+ const outputCollection = derivationSource.getCollection(outSpec.collection);
45
+ for (const derivedId of sidecar.keys) {
46
+ if (await outputCollection._internalDelete(derivedId, txCtx)) erased += 1;
47
+ }
48
+ await deleteFanoutSidecar(adapter, vault, spec.source, id, outputKey);
49
+ }
50
+ }
51
+ return erased;
52
+ }
53
+ async function dispatchDerivations(ctx, id, record, version, wave) {
54
+ const {
55
+ derivationSource,
56
+ collectionName,
57
+ adapter,
58
+ vault,
59
+ getDEK,
60
+ storeCiphertext,
61
+ via,
62
+ recomputeRollup,
63
+ dispatchCtx,
64
+ trackPut
65
+ } = ctx;
66
+ const incoming = via ? via.canonicalizeStored(record) : record;
67
+ if (incoming && typeof incoming === "object" && "_derivedFrom" in incoming) return;
68
+ const registry = derivationSource.registry();
69
+ const strategies = registry.strategiesForSource(collectionName);
70
+ if (strategies.length === 0) return;
71
+ let executorClass = null;
72
+ for (const { spec, strategyHash } of strategies) {
73
+ const mode = typeof spec.lifecycle === "string" ? spec.lifecycle : spec.lifecycle.mode;
74
+ if (spec.rollup) {
75
+ if (mode !== "eager") continue;
76
+ let parentId;
77
+ if (collectionName === spec.rollup.from) {
78
+ const kv = incoming[spec.rollup.key];
79
+ parentId = typeof kv === "string" || typeof kv === "number" ? String(kv) : null;
80
+ } else {
81
+ parentId = id;
82
+ }
83
+ if (parentId !== null) await recomputeRollup(spec, parentId, { collection: collectionName, id }, wave);
84
+ continue;
85
+ }
86
+ const isSource = spec.source === collectionName;
87
+ const isSibling = !isSource && (spec.sources?.includes(collectionName) ?? false);
88
+ const trigger = !isSource && !isSibling ? spec.triggerBy?.find((t) => t.collection === collectionName) : void 0;
89
+ const runs = [];
90
+ if (isSource) {
91
+ runs.push({ input: { ...incoming, id }, base: incoming, runId: id, version });
92
+ } else if (isSibling) {
93
+ const p = await derivationSource.getCollection(spec.source).get(id);
94
+ if (p !== null && p !== void 0) {
95
+ const raw = await derivationSource.getCollection(spec.source)._getStoredRecord(id);
96
+ runs.push({ input: { ...p, id }, base: raw ?? p, runId: id, version: 0 });
97
+ }
98
+ } else if (trigger) {
99
+ const srcColl = derivationSource.getCollection(spec.source);
100
+ const ids = await srcColl._findMatchingIds(trigger.on, id);
101
+ if (trigger.maxFanout !== void 0 && ids.length > trigger.maxFanout) {
102
+ throw new DerivationCapExceededError(`triggerBy ${collectionName}\u2192${spec.source}`, ids.length, trigger.maxFanout);
103
+ }
104
+ for (const sid of ids) {
105
+ const raw = await srcColl._getStoredRecord(sid);
106
+ if (raw === null) continue;
107
+ runs.push({ input: { ...raw, id: sid }, base: raw, runId: sid, version: 0 });
108
+ }
109
+ }
110
+ if (runs.length === 0) continue;
111
+ if (mode !== "eager") {
112
+ for (const run of runs) await markStale(registry, spec, run.runId);
113
+ continue;
114
+ }
115
+ if (executorClass === null) {
116
+ ;
117
+ ({ DerivationExecutor: executorClass } = await import("./executor-FCJEH3FU.js"));
118
+ }
119
+ for (const run of runs) {
120
+ const ctx2 = { vault: derivationSource.getReadOnlyFacade() };
121
+ const outCtx = dispatchCtx({ collection: spec.source, id: run.runId });
122
+ const result = await executorClass.run(spec, run.input, run.version, strategyHash, ctx2);
123
+ for (const key of Object.keys(spec.outputs)) {
124
+ const out = result.outputs[key];
125
+ if (!out) continue;
126
+ if (out.kind === "failed") {
127
+ const err = out.error;
128
+ if (spec.strict) throw err;
129
+ console.warn(`[derivation] output "${key}" for source "${spec.source}" id="${run.runId}" failed:`, err);
130
+ continue;
131
+ }
132
+ const outSpec = spec.outputs[key];
133
+ if (!outSpec) continue;
134
+ const outputCollection = derivationSource.getCollection(outSpec.collection);
135
+ const txCtx = derivationSource.getActiveTxContext();
136
+ if (out.kind === "array") {
137
+ const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-HRMHC34B.js");
138
+ const prior = await loadFanoutSidecar(adapter, vault, spec.source, run.runId, key, getDEK, storeCiphertext);
139
+ const prevKeys = new Set(prior?.keys ?? []);
140
+ const newKeysList = out.entries.map((e) => e.key);
141
+ const newKeysSet = new Set(newKeysList);
142
+ for (const k of prevKeys) {
143
+ if (newKeysSet.has(k)) continue;
144
+ await outputCollection._internalDelete(k, txCtx);
145
+ }
146
+ for (const entry of out.entries) {
147
+ if (txCtx !== null) {
148
+ trackPut(txCtx, outSpec.collection, entry.key, await adapter.get(vault, outSpec.collection, entry.key));
149
+ }
150
+ await putDerivedOutput(outputCollection, entry.key, entry.value, outCtx, { source: "derived" });
151
+ }
152
+ await saveFanoutSidecar(adapter, vault, {
153
+ source: spec.source,
154
+ sourceId: run.runId,
155
+ outputKey: key,
156
+ outputCollection: outSpec.collection,
157
+ keys: newKeysList
158
+ }, getDEK, storeCiphertext);
159
+ continue;
160
+ }
161
+ if (out.skipped === true) {
162
+ await outputCollection._internalDelete(run.runId, txCtx);
163
+ continue;
164
+ }
165
+ if (outSpec.shape === "record" && outSpec.denorm !== void 0 && outSpec.collection === spec.source) {
166
+ const value = out.value;
167
+ const patched = { ...run.base };
168
+ let changed = false;
169
+ for (const f of outSpec.denorm) {
170
+ if (!selfWriteFieldEqual(run.base[f], value[f])) {
171
+ patched[f] = value[f];
172
+ changed = true;
173
+ }
174
+ }
175
+ if (!changed) continue;
176
+ if (txCtx !== null) {
177
+ trackPut(txCtx, outSpec.collection, run.runId, await adapter.get(vault, outSpec.collection, run.runId));
178
+ }
179
+ await putDerivedOutput(outputCollection, run.runId, patched, outCtx, { source: "derived" });
180
+ continue;
181
+ }
182
+ if (txCtx !== null) {
183
+ trackPut(txCtx, outSpec.collection, run.runId, await adapter.get(vault, outSpec.collection, run.runId));
184
+ }
185
+ await putDerivedOutput(outputCollection, run.runId, out.value, outCtx, { source: "derived" });
186
+ }
187
+ }
188
+ }
189
+ }
190
+ export {
191
+ dispatchArrayDerivationsOnDelete,
192
+ dispatchDerivations
193
+ };
194
+ //# sourceMappingURL=dispatch-SPMYNXNW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-formula/derivations/dispatch.ts"],"sourcesContent":["/**\n * Derivation dispatch, lifted out of the kernel spine (#842 part b).\n *\n * `Collection` carried ~380 lines of dispatch logic that belongs to the\n * derivation service, not to the always-on kernel. These are free functions\n * taking an explicit context so the spine keeps only a thin delegator.\n *\n * ## How the spine reaches this module\n *\n * By dynamic `import()`, never a static one. `check-architecture.mjs`'s\n * `port-layering` check forbids the spine from statically importing a\n * `with-*` service; `collection.ts` is grandfathered for ten\n * `with-formula/*` specifiers, but that list is frozen per file and a new\n * one is a violation. A dynamic import is the sanctioned S4 gate recipe, and\n * it keeps this chunk out of the floor bundle for consumers who never fire a\n * derivation.\n *\n * The `Collection` type reference below points back at the spine. That is\n * inward (service → kernel) and so allowed, and it is TYPE-ONLY — erased at\n * build, so no runtime cycle exists.\n *\n * @internal\n */\n\nimport type { NoydbStore } from '../../kernel/types.js'\nimport type { TxContext } from '../../with-commit/tx/transaction.js'\nimport type { DerivationRegistry } from './registry.js'\nimport type { ReadOnlyVaultFacade } from '../../with-audit/guards/types.js'\nimport type { Collection } from '../../kernel/collection.js'\nimport type { EnclaveKey } from '../../kernel/enclave/index.js'\nimport type { EncryptedEnvelope } from '../../kernel/types.js'\nimport type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js'\nimport { putDerivedOutput, selfWriteFieldEqual } from '../../kernel/via/dispatch.js'\nimport { DerivationCapExceededError } from '../../kernel/errors.js'\nimport { markStale } from './stale.js'\nimport type { DerivationExecutor } from './executor.js'\n\n/** The per-write dispatch context threaded into `putDerivedOutput`. */\ninterface DispatchCtx {\n emit: (e: string, p: unknown) => void\n source: { readonly collection: string; readonly id: string }\n audit: ReturnType<typeof ledgerAuditHook>\n}\n\n/**\n * What the dispatchers need from the collection that owns them. Passing this\n * explicitly is what lets the logic live outside the class.\n */\nexport interface DerivationDeleteCtx {\n readonly derivationSource: {\n registry(): DerivationRegistry\n getCollection(name: string): Collection<Record<string, unknown>>\n getActiveTxContext(): TxContext | null\n getReadOnlyFacade(): ReadOnlyVaultFacade\n }\n /** The collection the delete happened in. */\n readonly collectionName: string\n readonly adapter: NoydbStore\n readonly vault: string\n readonly getDEK: (collectionName: string) => Promise<EnclaveKey>\n readonly storeCiphertext: boolean\n}\n\n/**\n * Erase the derived rows a deleted source record fanned out to, and drop the\n * fan-out sidecars that recorded them.\n *\n * @param eraseRecordShapeToo also erase same-id `shape: 'record'` outputs.\n * Restricted to a source-triggered strategy writing into a DIFFERENT\n * collection — the self-denorm case would re-delete the record just\n * tombstoned, and triggerBy/sibling strategies derive under a different id.\n * @returns rows ACTUALLY deleted, not edges visited (#622).\n */\nexport async function dispatchArrayDerivationsOnDelete(\n ctx: DerivationDeleteCtx,\n id: string,\n eraseRecordShapeToo = false,\n): Promise<number> {\n const { derivationSource, collectionName, adapter, vault, getDEK, storeCiphertext } = ctx\n\n const strategies = derivationSource.registry().strategiesForSource(collectionName)\n if (strategies.length === 0) return 0\n\n const { loadFanoutSidecar, deleteFanoutSidecar } = await import('./fanout-sidecar.js')\n const txCtx = derivationSource.getActiveTxContext()\n let erased = 0\n\n for (const { spec } of strategies) {\n for (const [outputKey, outSpec] of Object.entries(spec.outputs)) {\n if (outSpec.shape === 'record') {\n if (eraseRecordShapeToo && spec.source === collectionName && outSpec.collection !== collectionName) {\n if (await derivationSource.getCollection(outSpec.collection)._internalDelete(id, txCtx)) erased += 1\n }\n continue\n }\n\n const sidecar = await loadFanoutSidecar(adapter, vault, spec.source, id, outputKey, getDEK, storeCiphertext)\n if (!sidecar) continue\n\n const outputCollection = derivationSource.getCollection(outSpec.collection)\n for (const derivedId of sidecar.keys) {\n if (await outputCollection._internalDelete(derivedId, txCtx)) erased += 1\n }\n await deleteFanoutSidecar(adapter, vault, spec.source, id, outputKey)\n }\n }\n\n return erased\n}\n\n/** Adds what the on-write derivation dispatch needs beyond the delete path. */\nexport interface DerivationDispatchCtx extends DerivationDeleteCtx {\n /** Via pipeline, for decoding the stored form back to canonical money shape. */\n readonly via: { canonicalizeStored(r: Record<string, unknown>): Record<string, unknown> } | undefined\n /** Recompute a rollup aggregate onto a parent. Stays on the spine — it walks collections. */\n readonly recomputeRollup: (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n spec: any,\n parentId: string,\n source: { readonly collection: string; readonly id: string },\n wave?: WaveContext,\n ) => Promise<unknown>\n /** Builds the per-write dispatch context threaded into `putDerivedOutput`. */\n readonly dispatchCtx: (source: { readonly collection: string; readonly id: string }) => DispatchCtx\n /** Registers a write on the active transaction for rollback. */\n readonly trackPut: (txCtx: TxContext, collectionName: string, id: string, priorEnvelope: EncryptedEnvelope | null) => void\n}\n\n/**\n * Fire registered derivation strategies for this source collection.\n *\n * Eager mode runs `derive` inline and writes each output; lazy mode records a\n * stale mark for cold-session recompute. Rollups are handled here rather than\n * by the executor — a write to the child recomputes the parent aggregate, and\n * a write to the parent recomputes its own.\n */\nexport async function dispatchDerivations(\n ctx: DerivationDispatchCtx,\n id: string,\n record: Record<string, unknown>,\n version: number,\n wave?: WaveContext,\n): Promise<void> {\n const {\n derivationSource, collectionName, adapter, vault, getDEK, storeCiphertext,\n via, recomputeRollup, dispatchCtx, trackPut,\n } = ctx\n\n // `record` is the stored form here (post-quantize) — decode so\n // derive(source, ctx) sees the canonical money shape.\n const incoming = (via ? via.canonicalizeStored(record) : record)\n if (incoming && typeof incoming === 'object' && '_derivedFrom' in incoming) return\n const registry = derivationSource.registry()\n const strategies = registry.strategiesForSource(collectionName)\n if (strategies.length === 0) return\n // Dynamic-import the executor only on the first eager-mode\n // dispatch. Lazy-mode dispatches use `markStale` (a pure helper)\n // which doesn't reach into the executor at all. Keeps the\n // derivation executor chunk out of the floor bundle for any\n // consumer that doesn't fire an eager derivation.\n let executorClass: typeof DerivationExecutor | null = null\n for (const { spec, strategyHash } of strategies) {\n const mode = typeof spec.lifecycle === 'string' ? spec.lifecycle : spec.lifecycle.mode\n\n // Rollup: a write to the child `from` recomputes the\n // parent at id child[key]; a write to the parent (source = into)\n // recomputes its own aggregate. Handled here (the executor is not run).\n if (spec.rollup) {\n if (mode !== 'eager') continue\n let parentId: string | null\n if (collectionName === spec.rollup.from) {\n const kv = incoming[spec.rollup.key]\n parentId = (typeof kv === 'string' || typeof kv === 'number') ? String(kv) : null\n } else {\n parentId = id // a write to the parent recomputes its own aggregate\n }\n if (parentId !== null) await recomputeRollup(spec, parentId, { collection: collectionName, id }, wave)\n continue\n }\n\n // Determine how `collectionName` triggers this strategy, and build the list\n // of source records to (re-)derive:\n // • source — re-derive the written record itself (same-id).\n // • sources[] — re-derive the PRIMARY source at the same id.\n // • triggerBy — FK fan-out: re-derive every source record\n // whose `on` field equals the written parent's id.\n // `input` is passed to derive(); `base` is the raw stored source record\n // used as the patch base for a self-write reverse-denorm output.\n const isSource = spec.source === collectionName\n const isSibling = !isSource && (spec.sources?.includes(collectionName) ?? false)\n const trigger = !isSource && !isSibling\n ? spec.triggerBy?.find(t => t.collection === collectionName)\n : undefined\n\n const runs: Array<{\n input: Record<string, unknown> & { id: string }\n base: Record<string, unknown>\n runId: string\n version: number\n }> = []\n\n if (isSource) {\n runs.push({ input: { ...incoming, id }, base: incoming, runId: id, version })\n } else if (isSibling) {\n const p = await derivationSource.getCollection(spec.source).get(id)\n if (p !== null && p !== undefined) {\n // Raw base for a (rare) sibling self-write; falls back to the\n // resolved primary if the raw read misses.\n const raw = await derivationSource.getCollection(spec.source)._getStoredRecord(id)\n runs.push({ input: { ...p, id }, base: raw ?? p, runId: id, version: 0 })\n }\n } else if (trigger) {\n const srcColl = derivationSource.getCollection(spec.source)\n const ids = await srcColl._findMatchingIds(trigger.on, id)\n if (trigger.maxFanout !== undefined && ids.length > trigger.maxFanout) {\n throw new DerivationCapExceededError(`triggerBy ${collectionName}→${spec.source}`, ids.length, trigger.maxFanout)\n }\n for (const sid of ids) {\n const raw = await srcColl._getStoredRecord(sid)\n if (raw === null) continue\n runs.push({ input: { ...raw, id: sid }, base: raw, runId: sid, version: 0 })\n }\n }\n\n if (runs.length === 0) continue\n\n if (mode !== 'eager') {\n for (const run of runs) await markStale(registry, spec, run.runId)\n continue\n }\n\n if (executorClass === null) {\n ;({ DerivationExecutor: executorClass } = await import('./executor.js'))\n }\n\n for (const run of runs) {\n const ctx = { vault: derivationSource.getReadOnlyFacade() }\n const outCtx = dispatchCtx({ collection: spec.source, id: run.runId })\n const result = await executorClass.run(spec, run.input, run.version, strategyHash, ctx)\n for (const key of Object.keys(spec.outputs)) {\n const out = result.outputs[key]\n if (!out) continue\n if (out.kind === 'failed') {\n const err = out.error\n if (spec.strict) throw err\n console.warn(`[derivation] output \"${key}\" for source \"${spec.source}\" id=\"${run.runId}\" failed:`, err)\n continue\n }\n const outSpec = spec.outputs[key]\n if (!outSpec) continue\n const outputCollection = derivationSource.getCollection(outSpec.collection)\n // If we're inside a multi-record transaction, register\n // derived writes as side-effect ops on the active ctx\n // BEFORE they fire. `revertExecuted` walks `_executed` in\n // reverse on rollback, so capturing the pre-write envelope\n // here lets a later mid-batch failure restore this output's\n // prior state alongside the source op. Outside a transaction\n // the context is null and tracking is skipped.\n const txCtx = derivationSource.getActiveTxContext()\n\n // ── Array-shape branch ─────────────────────────────────\n if (out.kind === 'array') {\n // Load the prior key set from the fanout sidecar.\n const { loadFanoutSidecar, saveFanoutSidecar } = await import('./fanout-sidecar.js')\n const prior = await loadFanoutSidecar(adapter, vault, spec.source, run.runId, key, getDEK, storeCiphertext)\n const prevKeys = new Set<string>(prior?.keys ?? [])\n const newKeysList = out.entries.map(e => e.key)\n const newKeysSet = new Set<string>(newKeysList)\n\n // Diff — delete keys that were in prev but not in new.\n for (const k of prevKeys) {\n if (newKeysSet.has(k)) continue\n await outputCollection._internalDelete(k, txCtx)\n }\n\n // Upsert every entry in the new set. (Slice 1: no\n // identity-skip optimisation; write every row, idempotent\n // at the (collection, id) level.)\n for (const entry of out.entries) {\n if (txCtx !== null) {\n trackPut(txCtx, outSpec.collection, entry.key, await adapter.get(vault, outSpec.collection, entry.key))\n }\n await putDerivedOutput(outputCollection, entry.key, entry.value, outCtx, { source: 'derived' })\n }\n\n // Persist the new key set last, for failure-mode symmetry.\n await saveFanoutSidecar(adapter, vault, {\n source: spec.source,\n sourceId: run.runId,\n outputKey: key,\n outputCollection: outSpec.collection,\n keys: newKeysList,\n }, getDEK, storeCiphertext)\n continue\n }\n\n // ── Record-shape branch ────────────────────────────────\n if (out.skipped === true) {\n // Optional output returned null. Delete the\n // previously-emitted output at this id, if any. Routed\n // through `_internalDelete` so a user-registered\n // `onDelete` on the output collection does NOT\n // fire — this is a system-internal tombstone, not a\n // user-initiated delete. The txCtx hookup captures the\n // prior envelope inside `_internalDelete` for rollback\n // symmetry; delete-of-absent is a silent no-op.\n await outputCollection._internalDelete(run.runId, txCtx)\n continue\n }\n\n // ── Self-write reverse-denorm ───────────────────────────\n // An output back to its own source: patch ONLY the declared\n // `denorm` fields onto the raw stored record, never the whole\n // value (which would clobber user fields / i18n maps and carries\n // the executor's `_derivedFrom` tag). If the patch changes\n // nothing, skip the write — that value-equality is the cycle\n // guard: the self-write re-fires the source-path derivation,\n // which recomputes identical fields and terminates here.\n if (outSpec.shape === 'record' && outSpec.denorm !== undefined && outSpec.collection === spec.source) {\n const value = out.value\n const patched: Record<string, unknown> = { ...run.base }\n let changed = false\n for (const f of outSpec.denorm) {\n if (!selfWriteFieldEqual(run.base[f], value[f])) {\n patched[f] = value[f]\n changed = true\n }\n }\n if (!changed) continue // cycle guard — nothing to write\n if (txCtx !== null) {\n trackPut(txCtx, outSpec.collection, run.runId, await adapter.get(vault, outSpec.collection, run.runId))\n }\n await putDerivedOutput(outputCollection, run.runId, patched, outCtx, { source: 'derived' })\n continue\n }\n\n // ── Normal record output (separate output collection) ──\n if (txCtx !== null) {\n trackPut(txCtx, outSpec.collection, run.runId, await adapter.get(vault, outSpec.collection, run.runId))\n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C1B,MAAM;AAAA,UACR,GAAG,QAAQ,eAAe;AAC1B;AAAA,QACF;AAGA,YAAI,IAAI,YAAY,MAAM;AASxB,gBAAM,iBAAiB,gBAAgB,IAAI,OAAO,KAAK;AACvD;AAAA,QACF;AAUA,YAAI,QAAQ,UAAU,YAAY,QAAQ,WAAW,UAAa,QAAQ,eAAe,KAAK,QAAQ;AACpG,gBAAM,QAAQ,IAAI;AAClB,gBAAM,UAAmC,EAAE,GAAG,IAAI,KAAK;AACvD,cAAI,UAAU;AACd,qBAAW,KAAK,QAAQ,QAAQ;AAC9B,gBAAI,CAAC,oBAAoB,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG;AAC/C,sBAAQ,CAAC,IAAI,MAAM,CAAC;AACpB,wBAAU;AAAA,YACZ;AAAA,UACF;AACA,cAAI,CAAC,QAAS;AACd,cAAI,UAAU,MAAM;AAClB,qBAAS,OAAO,QAAQ,YAAY,IAAI,OAAO,MAAM,QAAQ,IAAI,OAAO,QAAQ,YAAY,IAAI,KAAK,CAAC;AAAA,UACxG;AACA,gBAAM,iBAAiB,kBAAkB,IAAI,OAAO,SAAS,QAAQ,EAAE,QAAQ,UAAU,CAAC;AAC1F;AAAA,QACF;AAGA,YAAI,UAAU,MAAM;AAClB,mBAAS,OAAO,QAAQ,YAAY,IAAI,OAAO,MAAM,QAAQ,IAAI,OAAO,QAAQ,YAAY,IAAI,KAAK,CAAC;AAAA,QACxG;AACA,cAAM,iBAAiB,kBAAkB,IAAI,OAAO,IAAI,OAAO,QAAQ,EAAE,QAAQ,UAAU,CAAC;AAAA,MAC9F;AAAA,IACF;AAAA,EACF;AACF;","names":["ctx"]}
@@ -0,0 +1,72 @@
1
+ import "./chunk-PZ5AY32C.js";
2
+
3
+ // src/with-formula/materialized-views/dispatch.ts
4
+ async function dispatchMaterializedViews(ctx, id, record, wave) {
5
+ const { materializedViewSource: source, collectionName, dispatchCtx } = ctx;
6
+ if (record && typeof record === "object" && "_materializedFrom" in record) return;
7
+ const registry = source.registry();
8
+ const mvs = registry.mvsForSource(collectionName);
9
+ if (mvs.length === 0) return;
10
+ let executor = null;
11
+ let staleHelpers = null;
12
+ for (const reg of mvs) {
13
+ const mode = reg.spec.refresh;
14
+ if (mode === "eager") {
15
+ if (wave?.seen(`mv\0${reg.spec.name}`)) continue;
16
+ if (executor === null) {
17
+ ;
18
+ ({ MaterializedViewExecutor: executor } = await import("./executor-SVHAJZ4A.js"));
19
+ }
20
+ await executor.refresh(reg, {
21
+ getCollection: (name) => source.getCollection(name),
22
+ getActiveTxContext: () => source.getActiveTxContext(),
23
+ getQueryContext: () => source.getQueryContext(),
24
+ dispatchCtx: dispatchCtx({ collection: collectionName, id })
25
+ });
26
+ } else if (mode === "lazy") {
27
+ if (staleHelpers === null) staleHelpers = await import("./stale-BJO2WIN7.js");
28
+ staleHelpers.markMVStale(registry, reg.spec.name);
29
+ }
30
+ }
31
+ }
32
+ async function dispatchMaterializedViewsOnDelete(ctx, id) {
33
+ const { materializedViewSource: source, collectionName, dispatchCtx } = ctx;
34
+ const mvs = source.registry().mvsForSource(collectionName);
35
+ const empty = { deleted: 0, residueUndecodable: [], residueDeclined: [] };
36
+ if (mvs.length === 0) return empty;
37
+ let executor = null;
38
+ let staleHelpers = null;
39
+ let deleted = 0;
40
+ const residueUndecodable = [];
41
+ const residueDeclined = [];
42
+ for (const reg of mvs) {
43
+ const mode = reg.spec.refresh;
44
+ if (mode === "eager") {
45
+ if (executor === null) {
46
+ ;
47
+ ({ MaterializedViewExecutor: executor } = await import("./executor-SVHAJZ4A.js"));
48
+ }
49
+ const rr = await executor.refresh(reg, {
50
+ getCollection: (name) => source.getCollection(name),
51
+ getActiveTxContext: () => source.getActiveTxContext(),
52
+ getQueryContext: () => source.getQueryContext(),
53
+ dispatchCtx: dispatchCtx({ collection: collectionName, id })
54
+ });
55
+ deleted += rr.deleted;
56
+ residueUndecodable.push(...rr.residueUndecodable);
57
+ residueDeclined.push(...rr.residueDeclined);
58
+ continue;
59
+ }
60
+ if (staleHelpers === null) staleHelpers = await import("./stale-BJO2WIN7.js");
61
+ const inv = await staleHelpers.invalidateMVAtRest(source, reg, mode);
62
+ deleted += inv.deleted;
63
+ residueUndecodable.push(...inv.residueUndecodable.map((rid) => `${reg.outputCollection}:${rid}`));
64
+ residueDeclined.push(...inv.residueDeclined.map((rid) => `${reg.outputCollection}:${rid}`));
65
+ }
66
+ return { deleted, residueUndecodable, residueDeclined };
67
+ }
68
+ export {
69
+ dispatchMaterializedViews,
70
+ dispatchMaterializedViewsOnDelete
71
+ };
72
+ //# sourceMappingURL=dispatch-V5MSMQYX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/with-formula/materialized-views/dispatch.ts"],"sourcesContent":["/**\n * Materialized-view dispatch, lifted out of the kernel spine (#842 part b).\n *\n * Reached from `Collection` by dynamic `import()` only — `port-layering`\n * forbids a static spine→`with-*` import, and rejects a type-only one too\n * (it scans import statements, not their erasure). See\n * `with-formula/derivations/dispatch.ts` for the same note.\n *\n * The `Collection` reference below is TYPE-ONLY and points inward\n * (service → kernel), so it is both allowed and erased at build.\n *\n * @internal\n */\n\nimport type { TxContext } from '../../with-commit/tx/transaction.js'\nimport type { Collection } from '../../kernel/collection.js'\nimport type { ledgerAuditHook, WaveContext } from '../../kernel/via/dispatch.js'\nimport type { MaterializedViewExecutor } from './executor.js'\nimport type * as MVStale from './stale.js'\nimport type { MaterializedViewRegistry } from './registry.js'\nimport type { MVQueryContext } from './types.js'\n\n/** The per-write dispatch context the MV executor threads through. */\ninterface DispatchCtx {\n emit: (e: string, p: unknown) => void\n source: { readonly collection: string; readonly id: string }\n audit: ReturnType<typeof ledgerAuditHook>\n}\n\n/** What the MV dispatchers need from the collection that owns them. */\nexport interface MvDispatchCtx {\n readonly materializedViewSource: {\n registry(): MaterializedViewRegistry\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getCollection(name: string): Collection<any>\n getActiveTxContext(): TxContext | null\n getQueryContext(): MVQueryContext\n }\n /** The collection the delete happened in. */\n readonly collectionName: string\n /** Builds the per-write dispatch context the executor threads through. */\n readonly dispatchCtx: (source: { readonly collection: string; readonly id: string }) => DispatchCtx\n}\n\n/**\n * Fire every MV whose dependency set includes this collection, on write.\n *\n * Skips entirely when the record being written is itself an MV-emitted row\n * (it carries `_materializedFrom`) — a defensive guard against missed cycle\n * detection.\n *\n * @param wave #638 Task 4 — the sync/cutover/restore dispatch wave. An eager\n * MV already refreshed in this wave is skipped, deduped per target on the\n * spec name.\n */\nexport async function dispatchMaterializedViews(\n ctx: MvDispatchCtx,\n id: string,\n record: Record<string, unknown>,\n wave?: WaveContext,\n): Promise<void> {\n const { materializedViewSource: source, collectionName, dispatchCtx } = ctx\n\n if (record && typeof record === 'object' && '_materializedFrom' in record) return\n\n const registry = source.registry()\n const mvs = registry.mvsForSource(collectionName)\n if (mvs.length === 0) return\n\n let executor: typeof MaterializedViewExecutor | null = null\n let staleHelpers: typeof MVStale | null = null\n\n for (const reg of mvs) {\n const mode = reg.spec.refresh\n\n if (mode === 'eager') {\n if (wave?.seen(`mv\\0${reg.spec.name}`)) continue\n if (executor === null) {\n ;({ MaterializedViewExecutor: executor } = await import('./executor.js'))\n }\n await executor.refresh(reg, {\n getCollection: (name) => source.getCollection(name),\n getActiveTxContext: () => source.getActiveTxContext(),\n getQueryContext: () => source.getQueryContext(),\n dispatchCtx: dispatchCtx({ collection: collectionName, id }),\n })\n } else if (mode === 'lazy') {\n if (staleHelpers === null) staleHelpers = await import('./stale.js')\n staleHelpers.markMVStale(registry, reg.spec.name)\n }\n // manual: no-op on source-write. `vault.refreshView(name)` is the only\n // path that materializes a manual MV.\n }\n}\n\n/**\n * Mirror of {@link dispatchMaterializedViews} for the delete/forget path. There is\n * no `_materializedFrom` skip — the record is gone — and the `internal` gate\n * at `_doDelete` is the recursion guard.\n *\n * @returns rows TOMBSTONED across every MV sourced here (#638 T6). Eager and\n * lazy/manual `invalidateMVAtRest` purges both contribute (#761 item 1,\n * previously eager-only): lazy persists a stale mark for cold-session\n * recompute, manual serves empty until `refreshView()`.\n * `residueUndecodable` / `residueDeclined` (#776/#785) carry\n * `outputCollection:id` entries whose ownership stamp `invalidateMVAtRest`\n * could not decode, respectively decoded and stamp-matched but declined to\n * erase — surfaced, not erased.\n */\nexport async function dispatchMaterializedViewsOnDelete(\n ctx: MvDispatchCtx,\n id: string,\n): Promise<{ deleted: number; residueUndecodable: string[]; residueDeclined: string[] }> {\n const { materializedViewSource: source, collectionName, dispatchCtx } = ctx\n\n const mvs = source.registry().mvsForSource(collectionName)\n const empty = { deleted: 0, residueUndecodable: [], residueDeclined: [] }\n if (mvs.length === 0) return empty\n\n let executor: typeof MaterializedViewExecutor | null = null\n let staleHelpers: typeof MVStale | null = null\n\n let deleted = 0\n const residueUndecodable: string[] = []\n const residueDeclined: string[] = []\n\n for (const reg of mvs) {\n const mode = reg.spec.refresh\n\n if (mode === 'eager') {\n if (executor === null) {\n ;({ MaterializedViewExecutor: executor } = await import('./executor.js'))\n }\n const rr = await executor.refresh(reg, {\n getCollection: (name) => source.getCollection(name),\n getActiveTxContext: () => source.getActiveTxContext(),\n getQueryContext: () => source.getQueryContext(),\n dispatchCtx: dispatchCtx({ collection: collectionName, id }),\n })\n // #782/#785 — the eager leg reports both residue channels.\n deleted += rr.deleted\n residueUndecodable.push(...rr.residueUndecodable)\n residueDeclined.push(...rr.residueDeclined)\n continue\n }\n\n if (staleHelpers === null) staleHelpers = await import('./stale.js')\n const inv = await staleHelpers.invalidateMVAtRest(source, reg, mode)\n deleted += inv.deleted\n residueUndecodable.push(...inv.residueUndecodable.map((rid) => `${reg.outputCollection}:${rid}`))\n residueDeclined.push(...inv.residueDeclined.map((rid) => `${reg.outputCollection}:${rid}`))\n }\n\n return { deleted, residueUndecodable, residueDeclined }\n}\n"],"mappings":";;;AAuDA,eAAsB,0BACpB,KACA,IACA,QACA,MACe;AACf,QAAM,EAAE,wBAAwB,QAAQ,gBAAgB,YAAY,IAAI;AAExE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K;AAEtB,QAAI,SAAS,SAAS;AACpB,UAAI,aAAa,MAAM;AACrB;AAAC,SAAC,EAAE,0BAA0B,SAAS,IAAI,MAAM,OAAO,wBAAe;AAAA,MACzE;AACA,YAAM,KAAK,MAAM,SAAS,QAAQ,KAAK;AAAA,QACrC,eAAe,CAAC,SAAS,OAAO,cAAc,IAAI;AAAA,QAClD,oBAAoB,MAAM,OAAO,mBAAmB;AAAA,QACpD,iBAAiB,MAAM,OAAO,gBAAgB;AAAA,QAC9C,aAAa,YAAY,EAAE,YAAY,gBAAgB,GAAG,CAAC;AAAA,MAC7D,CAAC;AAED,iBAAW,GAAG;AACd,yBAAmB,KAAK,GAAG,GAAG,kBAAkB;AAChD,sBAAgB,KAAK,GAAG,GAAG,eAAe;AAC1C;AAAA,IACF;AAEA,QAAI,iBAAiB,KAAM,gBAAe,MAAM,OAAO,qBAAY;AACnE,UAAM,MAAM,MAAM,aAAa,mBAAmB,QAAQ,KAAK,IAAI;AACnE,eAAW,IAAI;AACf,uBAAmB,KAAK,GAAG,IAAI,mBAAmB,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,IAAI,GAAG,EAAE,CAAC;AAChG,oBAAgB,KAAK,GAAG,IAAI,gBAAgB,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,IAAI,GAAG,EAAE,CAAC;AAAA,EAC5F;AAEA,SAAO,EAAE,SAAS,oBAAoB,gBAAgB;AACxD;","names":[]}
@@ -22,26 +22,26 @@ import {
22
22
  sealRecordToHost,
23
23
  verifyBrokerProof,
24
24
  writeEnvelopeBody
25
- } from "./chunk-PEY6ZTCF.js";
25
+ } from "./chunk-MMVQ3SUO.js";
26
26
  import {
27
27
  buildDeleteMarker,
28
28
  buildTombstone,
29
29
  isDeleteMarker,
30
30
  isTombstone,
31
31
  isTombstoneShape
32
- } from "./chunk-QXPOEAKR.js";
32
+ } from "./chunk-KCZAFDP5.js";
33
33
  import {
34
34
  ctEqualTags,
35
35
  deriveVdigSlotKey,
36
36
  evaluateKofN
37
- } from "./chunk-LLVW4V7R.js";
38
- import "./chunk-M25ZIEB2.js";
37
+ } from "./chunk-5WLDZZ6S.js";
38
+ import "./chunk-5HSSTOOG.js";
39
39
  import {
40
40
  computeBidxTarget,
41
41
  deriveClassifyIndexKey,
42
42
  deriveClassifyIndexSalt,
43
43
  mintBidxTag
44
- } from "./chunk-5BB3N4KU.js";
44
+ } from "./chunk-G4MFQXYX.js";
45
45
  import {
46
46
  pbkdf2VerifyDigest
47
47
  } from "./chunk-LP7BEXCT.js";
@@ -54,10 +54,10 @@ import {
54
54
  decryptDeterministic,
55
55
  deriveDeterministicKey,
56
56
  deriveKey,
57
- derivePassphraseKey,
58
57
  derivePresenceKey,
59
58
  deriveSealedFieldKey,
60
59
  deriveSealedFieldKeyFromCek,
60
+ deriveSecretKey,
61
61
  encrypt,
62
62
  encryptBytes,
63
63
  encryptBytesWithAAD,
@@ -72,9 +72,9 @@ import {
72
72
  unwrapKey,
73
73
  wrapCek,
74
74
  wrapKey
75
- } from "./chunk-5P5AAXYA.js";
76
- import "./chunk-5BHNQNBI.js";
77
- import "./chunk-IGM563N5.js";
75
+ } from "./chunk-7U6AB7DZ.js";
76
+ import "./chunk-DOZFU7OZ.js";
77
+ import "./chunk-6SYOHUHM.js";
78
78
  import "./chunk-PZ5AY32C.js";
79
79
  export {
80
80
  RecordCodec,
@@ -97,10 +97,10 @@ export {
97
97
  deriveClassifyIndexSalt,
98
98
  deriveDeterministicKey,
99
99
  deriveKey,
100
- derivePassphraseKey,
101
100
  derivePresenceKey,
102
101
  deriveSealedFieldKey,
103
102
  deriveSealedFieldKeyFromCek,
103
+ deriveSecretKey,
104
104
  deriveVdigSlotKey,
105
105
  encrypt,
106
106
  encryptBytes,
@@ -140,4 +140,4 @@ export {
140
140
  wrapKey,
141
141
  writeEnvelopeBody
142
142
  };
143
- //# sourceMappingURL=enclave-YFKA3GJT.js.map
143
+ //# sourceMappingURL=enclave-ZA7C3H2L.js.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ DerivationExecutor
3
+ } from "./chunk-YJ3TREAC.js";
4
+ import "./chunk-6SYOHUHM.js";
5
+ import "./chunk-PZ5AY32C.js";
6
+ export {
7
+ DerivationExecutor
8
+ };
9
+ //# sourceMappingURL=executor-FCJEH3FU.js.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ GuardExecutor
3
+ } from "./chunk-EGU4PWQW.js";
4
+ import "./chunk-6SYOHUHM.js";
5
+ import "./chunk-PZ5AY32C.js";
6
+ export {
7
+ GuardExecutor
8
+ };
9
+ //# sourceMappingURL=executor-OHET7TF7.js.map