@noy-db/hub 0.4.0-pre.5 → 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 (330) hide show
  1. package/dist/{api-22ES33N3.js → api-5QVQX4HG.js} +6 -6
  2. package/dist/attestation/index.js +14 -14
  3. package/dist/{backup-YCHAC575.js → backup-USYSNCYM.js} +6 -6
  4. package/dist/blobs/index.js +8 -5
  5. package/dist/blobs/index.js.map +1 -1
  6. package/dist/broker/index.js +6 -6
  7. package/dist/cargo/index.js +26 -28
  8. package/dist/{chunk-RWW3I3PO.js → chunk-2BVW754E.js} +2 -2
  9. package/dist/{chunk-VEGQYPCP.js → chunk-2ZSC454H.js} +3 -3
  10. package/dist/{chunk-S4YERMGJ.js → chunk-32467U5J.js} +3 -3
  11. package/dist/{chunk-UVBHM7AK.js → chunk-3GXDB3NQ.js} +4 -4
  12. package/dist/{chunk-L2CAWCQL.js → chunk-3S2YNMUS.js} +53 -5
  13. package/dist/chunk-3S2YNMUS.js.map +1 -0
  14. package/dist/{chunk-HAPY7WFP.js → chunk-3TZUC4WS.js} +9 -9
  15. package/dist/{chunk-M6QA2KK2.js → chunk-44Y3P5U6.js} +2 -2
  16. package/dist/{chunk-WQN5SM7P.js → chunk-4B3DL75F.js} +2 -2
  17. package/dist/{chunk-XUFAFHQM.js → chunk-5ABOFAHN.js} +7 -4
  18. package/dist/chunk-5ABOFAHN.js.map +1 -0
  19. package/dist/chunk-5D2ALSM5.js +19 -0
  20. package/dist/chunk-5D2ALSM5.js.map +1 -0
  21. package/dist/{chunk-OHV6T5JB.js → chunk-6SSWOUUS.js} +2 -2
  22. package/dist/{chunk-6RPWILRH.js → chunk-7IQWHYL2.js} +3 -3
  23. package/dist/chunk-AFHQATY4.js +47 -0
  24. package/dist/chunk-AFHQATY4.js.map +1 -0
  25. package/dist/{chunk-I2XEBEEF.js → chunk-AZXEOEQK.js} +3 -3
  26. package/dist/{chunk-K7BADAOS.js → chunk-C2V7AJO2.js} +3 -3
  27. package/dist/chunk-CADUYBQD.js +151 -0
  28. package/dist/chunk-CADUYBQD.js.map +1 -0
  29. package/dist/{chunk-YTW6ZIPD.js → chunk-DOZFU7OZ.js} +1 -1
  30. package/dist/chunk-DOZFU7OZ.js.map +1 -0
  31. package/dist/{chunk-YCAJDK4O.js → chunk-E7FSBI6I.js} +3 -3
  32. package/dist/chunk-EP5L47XV.js +22 -0
  33. package/dist/chunk-EP5L47XV.js.map +1 -0
  34. package/dist/{chunk-YWZEDG7F.js → chunk-EPME33Y4.js} +4 -4
  35. package/dist/{chunk-EEZCB74X.js → chunk-EWPS35AR.js} +465 -393
  36. package/dist/chunk-EWPS35AR.js.map +1 -0
  37. package/dist/{chunk-BY5YBSXA.js → chunk-GQT6J4FJ.js} +14 -1
  38. package/dist/chunk-GQT6J4FJ.js.map +1 -0
  39. package/dist/{chunk-YXZNGHID.js → chunk-H5GMROCB.js} +2 -2
  40. package/dist/{chunk-QMMOMBH6.js → chunk-HA7P3BTB.js} +24 -175
  41. package/dist/chunk-HA7P3BTB.js.map +1 -0
  42. package/dist/{chunk-FTCGEUOY.js → chunk-HDF5R2K6.js} +4 -4
  43. package/dist/{chunk-R2N37AA6.js → chunk-HVPW6PCX.js} +2 -2
  44. package/dist/{chunk-YXIVUWDU.js → chunk-HXVRRJBD.js} +3 -3
  45. package/dist/{chunk-5ATANZSW.js → chunk-ICYC5YNI.js} +4 -4
  46. package/dist/{chunk-7ICV4ASA.js → chunk-IUATR5UE.js} +25 -3
  47. package/dist/chunk-IUATR5UE.js.map +1 -0
  48. package/dist/{chunk-QZJEYZ4I.js → chunk-JGOKAZNB.js} +3 -3
  49. package/dist/{chunk-JN3SGXJE.js → chunk-JOCMXSR2.js} +1 -1
  50. package/dist/{chunk-JN3SGXJE.js.map → chunk-JOCMXSR2.js.map} +1 -1
  51. package/dist/{chunk-7BIJS6II.js → chunk-JTIPVW4J.js} +3 -3
  52. package/dist/{chunk-SC4JLMZI.js → chunk-KCZAFDP5.js} +2 -2
  53. package/dist/{chunk-GP54LU5N.js → chunk-LG2GUYRX.js} +7 -7
  54. package/dist/{chunk-J5TEU77Q.js → chunk-LN3MQFUE.js} +54 -2
  55. package/dist/chunk-LN3MQFUE.js.map +1 -0
  56. package/dist/{chunk-FIP7KI2P.js → chunk-M4GO4ZJK.js} +205 -15
  57. package/dist/chunk-M4GO4ZJK.js.map +1 -0
  58. package/dist/{chunk-QMZ5A6FQ.js → chunk-M7W2KYTL.js} +2 -2
  59. package/dist/{chunk-K4BWPNJO.js → chunk-MLCTPWSO.js} +3 -3
  60. package/dist/{chunk-GEEJPID6.js → chunk-MMVQ3SUO.js} +3 -3
  61. package/dist/{chunk-HQKRZIX6.js → chunk-MPPWL64H.js} +24 -41
  62. package/dist/chunk-MPPWL64H.js.map +1 -0
  63. package/dist/{chunk-YZN6NRTR.js → chunk-MQBFT2OT.js} +11 -9
  64. package/dist/chunk-MQBFT2OT.js.map +1 -0
  65. package/dist/{chunk-TNJVDG2B.js → chunk-NA374QG7.js} +2 -2
  66. package/dist/chunk-NIKO2BBZ.js +23 -0
  67. package/dist/chunk-NIKO2BBZ.js.map +1 -0
  68. package/dist/chunk-PEOZ34EM.js +13 -0
  69. package/dist/chunk-PEOZ34EM.js.map +1 -0
  70. package/dist/chunk-PVEWA2DU.js +23 -0
  71. package/dist/chunk-PVEWA2DU.js.map +1 -0
  72. package/dist/{chunk-V5JUAW4M.js → chunk-QVIZDLAR.js} +5 -5
  73. package/dist/{chunk-DYZ5CCVM.js → chunk-RM5EXCFF.js} +1 -1
  74. package/dist/{chunk-DYZ5CCVM.js.map → chunk-RM5EXCFF.js.map} +1 -1
  75. package/dist/chunk-SMY5X46Z.js +14 -0
  76. package/dist/chunk-SMY5X46Z.js.map +1 -0
  77. package/dist/{chunk-2CRZOVDI.js → chunk-UNREYBZO.js} +2 -2
  78. package/dist/{chunk-KJTIAECI.js → chunk-V2R2VWER.js} +168 -9
  79. package/dist/chunk-V2R2VWER.js.map +1 -0
  80. package/dist/{chunk-CKUYQO2P.js → chunk-VDTWFN2P.js} +7 -5
  81. package/dist/chunk-VDTWFN2P.js.map +1 -0
  82. package/dist/chunk-VKQCVU2Z.js +21 -0
  83. package/dist/chunk-VKQCVU2Z.js.map +1 -0
  84. package/dist/{chunk-UTEATWHO.js → chunk-VNJMLOQS.js} +4 -4
  85. package/dist/{chunk-JAMDDLIM.js → chunk-WCJJQV2D.js} +2 -2
  86. package/dist/{chunk-OMSKGLYA.js → chunk-WWBC4KLB.js} +2 -2
  87. package/dist/{chunk-JIHH26WQ.js → chunk-XG7OZDOS.js} +3 -3
  88. package/dist/{chunk-QBOQI6PG.js → chunk-XONZGK6J.js} +2 -2
  89. package/dist/{chunk-YQQPNXNO.js → chunk-XSOGLHGY.js} +2 -2
  90. package/dist/{chunk-3OWYOECI.js → chunk-XY6MNSAF.js} +4 -4
  91. package/dist/chunk-XZHEOSQ2.js +16 -0
  92. package/dist/chunk-XZHEOSQ2.js.map +1 -0
  93. package/dist/{chunk-X3MWEFPT.js → chunk-YGMREQAK.js} +3 -3
  94. package/dist/chunk-YMUFFJCO.js +23 -0
  95. package/dist/chunk-YMUFFJCO.js.map +1 -0
  96. package/dist/{chunk-3LJYHE7S.js → chunk-ZDFU34XY.js} +9 -6
  97. package/dist/{chunk-3LJYHE7S.js.map → chunk-ZDFU34XY.js.map} +1 -1
  98. package/dist/{chunk-ILM6X6CP.js → chunk-ZF572E2M.js} +2 -2
  99. package/dist/{chunk-TNATF3HB.js → chunk-ZGEFBDPR.js} +2 -2
  100. package/dist/chunk-ZGEFBDPR.js.map +1 -0
  101. package/dist/{chunk-OGVE4IJW.js → chunk-ZHMUFYZF.js} +4 -4
  102. package/dist/{chunk-YFFEF6HR.js → chunk-ZHZ4PET5.js} +2 -2
  103. package/dist/{chunk-YZNKFYDC.js → chunk-ZM72UO3Y.js} +2 -2
  104. package/dist/classified/index.js +3 -3
  105. package/dist/{classified-marker-52P3D72W.js → classified-marker-SVDRXLD3.js} +3 -3
  106. package/dist/{collection-facade-XKCFHSLR.js → collection-facade-S5PPKZD5.js} +9 -9
  107. package/dist/consent/index.js +8 -4
  108. package/dist/consent/index.js.map +1 -1
  109. package/dist/{cover-5BSNJREH.js → cover-ADBCTIKN.js} +3 -3
  110. package/dist/crdt/index.js +4 -0
  111. package/dist/crdt/index.js.map +1 -1
  112. package/dist/{dead-filter-JXVCKS6W.js → dead-filter-HKDMTMVY.js} +2 -2
  113. package/dist/{delegation-WWZPEDK2.js → delegation-EV7LKJPH.js} +5 -5
  114. package/dist/derivations/index.js +3 -3
  115. package/dist/{derive-CWWFEQ4N.js → derive-5LDJW76F.js} +4 -4
  116. package/dist/{dispatch-PKQQFDBT.js → dispatch-SPMYNXNW.js} +12 -11
  117. package/dist/{dispatch-PKQQFDBT.js.map → dispatch-SPMYNXNW.js.map} +1 -1
  118. package/dist/{dispatch-SMXUO7W5.js → dispatch-V5MSMQYX.js} +5 -5
  119. package/dist/{enclave-I5H3GINP.js → enclave-ZA7C3H2L.js} +4 -4
  120. package/dist/executor-SVHAJZ4A.js +28 -0
  121. package/dist/{export-accessible-FBL6TDSK.js → export-accessible-S35YKIBL.js} +7 -7
  122. package/dist/{extract-partition-ZYIRYMTI.js → extract-partition-UVHAM5WZ.js} +10 -10
  123. package/dist/{fanout-sidecar-WWXVHHUH.js → fanout-sidecar-HRMHC34B.js} +4 -4
  124. package/dist/forget/index.js +4 -4
  125. package/dist/history/index.js +10 -6
  126. package/dist/history/index.js.map +1 -1
  127. package/dist/i18n/index.js +10 -8
  128. package/dist/i18n/index.js.map +1 -1
  129. package/dist/index.d.ts +4 -7
  130. package/dist/index.js +94 -151
  131. package/dist/index.js.map +1 -1
  132. package/dist/indexing/index.js +3 -1
  133. package/dist/indexing/index.js.map +1 -1
  134. package/dist/{issue-F76PAGIR.js → issue-5X3SMCF4.js} +6 -6
  135. package/dist/kernel/lazy.d.ts +30 -0
  136. package/dist/kernel/noydb.d.ts +21 -10
  137. package/dist/kernel/query/builder.d.ts +10 -10
  138. package/dist/kernel/query/index.d.ts +0 -6
  139. package/dist/kernel/query/scan-builder.d.ts +4 -4
  140. package/dist/kernel/types.d.ts +5 -5
  141. package/dist/{ledger-M2BKCNVS.js → ledger-K6JBFL3Z.js} +6 -6
  142. package/dist/liberate-NHTCKBU4.js +24 -0
  143. package/dist/{link-set-ZU4E5J5S.js → link-set-XVZY2ODC.js} +5 -5
  144. package/dist/materialized-views/index.js +15 -12
  145. package/dist/noydb-TI3RFU6M.js +78 -0
  146. package/dist/periods/index.js +9 -7
  147. package/dist/pod/index.js +5 -6
  148. package/dist/{policy-IY2YEA3A.js → policy-QWGJB7P7.js} +4 -4
  149. package/dist/port/with/collection-registries.d.ts +62 -0
  150. package/dist/port/with/strategies.d.ts +2 -2
  151. package/dist/port/with/team-strategy.d.ts +2 -1
  152. package/dist/portability/index.js +6 -6
  153. package/dist/{post-register-XIAHB6KF.js → post-register-5VHHVFJY.js} +4 -4
  154. package/dist/query/index.js +4 -44
  155. package/dist/{aggregate → reduce}/index.js +22 -15
  156. package/dist/reduce/index.js.map +1 -0
  157. package/dist/{register-HB4TQZSV.js → register-CEX7R7NE.js} +6 -6
  158. package/dist/{registry-6BMBFEXT.js → registry-DIKMRXUC.js} +5 -5
  159. package/dist/{registry-JOFO7RAH.js → registry-EWIB5NTI.js} +4 -4
  160. package/dist/{request-withdrawal-UN3TRHWI.js → request-withdrawal-AAG57QO4.js} +9 -9
  161. package/dist/{reveal-VWXRV2XU.js → reveal-7OOT5XPD.js} +3 -3
  162. package/dist/{revoke-OLO2OVR7.js → revoke-U5LCIJMF.js} +6 -6
  163. package/dist/sealed-record/index.js +6 -6
  164. package/dist/{seed-CDBFOTIK.js → seed-GVOI6QP6.js} +6 -6
  165. package/dist/session/index.js +7 -3
  166. package/dist/session/index.js.map +1 -1
  167. package/dist/shadow/index.js +4 -0
  168. package/dist/shadow/index.js.map +1 -1
  169. package/dist/{signer-MGGKPYAN.js → signer-NAA2OX7H.js} +5 -5
  170. package/dist/snapshots/index.js +9 -5
  171. package/dist/snapshots/index.js.map +1 -1
  172. package/dist/{stale-NBROTA66.js → stale-BJO2WIN7.js} +6 -5
  173. package/dist/{storage-3R37QZLA.js → storage-FL7XXZTN.js} +5 -5
  174. package/dist/{store-coordination-provider-P3IU5JHD.js → store-coordination-provider-DX5HECK3.js} +3 -3
  175. package/dist/sync/index.js +8 -4
  176. package/dist/sync/index.js.map +1 -1
  177. package/dist/team/index.js +15 -17
  178. package/dist/tiers/index.js +4 -4
  179. package/dist/tx/index.js +5 -1
  180. package/dist/tx/index.js.map +1 -1
  181. package/dist/via/blob/index.d.ts +2 -0
  182. package/dist/via/i18n/core.d.ts +1 -1
  183. package/dist/via/i18n/index.d.ts +2 -0
  184. package/dist/via/money/money-reducer.d.ts +2 -2
  185. package/dist/{walk-E3OVLBFR.js → walk-JXMWKKQW.js} +5 -5
  186. package/dist/with-audit/consent/index.d.ts +2 -0
  187. package/dist/with-audit/periods/index.d.ts +2 -0
  188. package/dist/with-cargo/floor.d.ts +3 -3
  189. package/dist/with-commit/crdt/index.d.ts +2 -0
  190. package/dist/with-commit/history/index.d.ts +2 -0
  191. package/dist/with-fork/shadow/index.d.ts +2 -0
  192. package/dist/with-fork/snapshots/index.d.ts +2 -0
  193. package/dist/with-formula/materialized-views/types.d.ts +7 -7
  194. package/dist/with-lookup/indexing/index.d.ts +2 -0
  195. package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
  196. package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
  197. package/dist/with-lookup/reduce/index.d.ts +34 -0
  198. package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +10 -10
  199. package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
  200. package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
  201. package/dist/with-party/session/index.d.ts +2 -0
  202. package/dist/with-party/sync/index.d.ts +2 -0
  203. package/dist/with-party/team/keyring.d.ts +20 -1
  204. package/dist/with-party/team/noydb-facade.d.ts +2 -1
  205. package/dist/{withdraw-accessible-Q2EMATCU.js → withdraw-accessible-GO6KQJVM.js} +8 -8
  206. package/package.json +6 -34
  207. package/dist/aggregate/index.js.map +0 -1
  208. package/dist/as/index.js +0 -30
  209. package/dist/at/index.js +0 -1
  210. package/dist/by/index.js +0 -11
  211. package/dist/chunk-2YELV6TV.js +0 -1
  212. package/dist/chunk-7ICV4ASA.js.map +0 -1
  213. package/dist/chunk-AFAPBZAA.js +0 -54
  214. package/dist/chunk-AFAPBZAA.js.map +0 -1
  215. package/dist/chunk-BY5YBSXA.js.map +0 -1
  216. package/dist/chunk-CJVEAVYH.js +0 -205
  217. package/dist/chunk-CJVEAVYH.js.map +0 -1
  218. package/dist/chunk-CKUYQO2P.js.map +0 -1
  219. package/dist/chunk-EEZCB74X.js.map +0 -1
  220. package/dist/chunk-FIP7KI2P.js.map +0 -1
  221. package/dist/chunk-HQKRZIX6.js.map +0 -1
  222. package/dist/chunk-IGLU4ME7.js +0 -255
  223. package/dist/chunk-IGLU4ME7.js.map +0 -1
  224. package/dist/chunk-J5TEU77Q.js.map +0 -1
  225. package/dist/chunk-KJTIAECI.js.map +0 -1
  226. package/dist/chunk-L2CAWCQL.js.map +0 -1
  227. package/dist/chunk-LB7FD65R.js +0 -163
  228. package/dist/chunk-LB7FD65R.js.map +0 -1
  229. package/dist/chunk-QMMOMBH6.js.map +0 -1
  230. package/dist/chunk-TNATF3HB.js.map +0 -1
  231. package/dist/chunk-XUFAFHQM.js.map +0 -1
  232. package/dist/chunk-YTW6ZIPD.js.map +0 -1
  233. package/dist/chunk-YZN6NRTR.js.map +0 -1
  234. package/dist/executor-SHYLIBOM.js +0 -26
  235. package/dist/in/index.js +0 -1
  236. package/dist/liberate-ZP7UB57K.js +0 -24
  237. package/dist/noydb-BNDGEK5X.js +0 -71
  238. package/dist/on/index.js +0 -17
  239. package/dist/port/as/index.d.ts +0 -26
  240. package/dist/port/at/index.d.ts +0 -18
  241. package/dist/port/in/index.d.ts +0 -21
  242. package/dist/port/on/index.d.ts +0 -27
  243. package/dist/port/ui/index.d.ts +0 -21
  244. package/dist/port/with/index.d.ts +0 -18
  245. package/dist/request-withdrawal-UN3TRHWI.js.map +0 -1
  246. package/dist/revoke-OLO2OVR7.js.map +0 -1
  247. package/dist/signer-MGGKPYAN.js.map +0 -1
  248. package/dist/stale-NBROTA66.js.map +0 -1
  249. package/dist/storage-3R37QZLA.js.map +0 -1
  250. package/dist/ui/index.js +0 -1
  251. package/dist/ui/index.js.map +0 -1
  252. package/dist/with/index.js +0 -31
  253. package/dist/with/index.js.map +0 -1
  254. package/dist/with-lookup/aggregate/index.d.ts +0 -23
  255. package/dist/withdraw-accessible-Q2EMATCU.js.map +0 -1
  256. /package/dist/{api-22ES33N3.js.map → api-5QVQX4HG.js.map} +0 -0
  257. /package/dist/{backup-YCHAC575.js.map → backup-USYSNCYM.js.map} +0 -0
  258. /package/dist/{chunk-RWW3I3PO.js.map → chunk-2BVW754E.js.map} +0 -0
  259. /package/dist/{chunk-VEGQYPCP.js.map → chunk-2ZSC454H.js.map} +0 -0
  260. /package/dist/{chunk-S4YERMGJ.js.map → chunk-32467U5J.js.map} +0 -0
  261. /package/dist/{chunk-UVBHM7AK.js.map → chunk-3GXDB3NQ.js.map} +0 -0
  262. /package/dist/{chunk-HAPY7WFP.js.map → chunk-3TZUC4WS.js.map} +0 -0
  263. /package/dist/{chunk-M6QA2KK2.js.map → chunk-44Y3P5U6.js.map} +0 -0
  264. /package/dist/{chunk-WQN5SM7P.js.map → chunk-4B3DL75F.js.map} +0 -0
  265. /package/dist/{chunk-OHV6T5JB.js.map → chunk-6SSWOUUS.js.map} +0 -0
  266. /package/dist/{chunk-6RPWILRH.js.map → chunk-7IQWHYL2.js.map} +0 -0
  267. /package/dist/{chunk-I2XEBEEF.js.map → chunk-AZXEOEQK.js.map} +0 -0
  268. /package/dist/{chunk-K7BADAOS.js.map → chunk-C2V7AJO2.js.map} +0 -0
  269. /package/dist/{chunk-YCAJDK4O.js.map → chunk-E7FSBI6I.js.map} +0 -0
  270. /package/dist/{chunk-YWZEDG7F.js.map → chunk-EPME33Y4.js.map} +0 -0
  271. /package/dist/{chunk-YXZNGHID.js.map → chunk-H5GMROCB.js.map} +0 -0
  272. /package/dist/{chunk-FTCGEUOY.js.map → chunk-HDF5R2K6.js.map} +0 -0
  273. /package/dist/{chunk-R2N37AA6.js.map → chunk-HVPW6PCX.js.map} +0 -0
  274. /package/dist/{chunk-YXIVUWDU.js.map → chunk-HXVRRJBD.js.map} +0 -0
  275. /package/dist/{chunk-5ATANZSW.js.map → chunk-ICYC5YNI.js.map} +0 -0
  276. /package/dist/{chunk-QZJEYZ4I.js.map → chunk-JGOKAZNB.js.map} +0 -0
  277. /package/dist/{chunk-7BIJS6II.js.map → chunk-JTIPVW4J.js.map} +0 -0
  278. /package/dist/{chunk-SC4JLMZI.js.map → chunk-KCZAFDP5.js.map} +0 -0
  279. /package/dist/{chunk-GP54LU5N.js.map → chunk-LG2GUYRX.js.map} +0 -0
  280. /package/dist/{chunk-QMZ5A6FQ.js.map → chunk-M7W2KYTL.js.map} +0 -0
  281. /package/dist/{chunk-K4BWPNJO.js.map → chunk-MLCTPWSO.js.map} +0 -0
  282. /package/dist/{chunk-GEEJPID6.js.map → chunk-MMVQ3SUO.js.map} +0 -0
  283. /package/dist/{chunk-TNJVDG2B.js.map → chunk-NA374QG7.js.map} +0 -0
  284. /package/dist/{chunk-V5JUAW4M.js.map → chunk-QVIZDLAR.js.map} +0 -0
  285. /package/dist/{chunk-2CRZOVDI.js.map → chunk-UNREYBZO.js.map} +0 -0
  286. /package/dist/{chunk-UTEATWHO.js.map → chunk-VNJMLOQS.js.map} +0 -0
  287. /package/dist/{chunk-JAMDDLIM.js.map → chunk-WCJJQV2D.js.map} +0 -0
  288. /package/dist/{chunk-OMSKGLYA.js.map → chunk-WWBC4KLB.js.map} +0 -0
  289. /package/dist/{chunk-JIHH26WQ.js.map → chunk-XG7OZDOS.js.map} +0 -0
  290. /package/dist/{chunk-QBOQI6PG.js.map → chunk-XONZGK6J.js.map} +0 -0
  291. /package/dist/{chunk-YQQPNXNO.js.map → chunk-XSOGLHGY.js.map} +0 -0
  292. /package/dist/{chunk-3OWYOECI.js.map → chunk-XY6MNSAF.js.map} +0 -0
  293. /package/dist/{chunk-X3MWEFPT.js.map → chunk-YGMREQAK.js.map} +0 -0
  294. /package/dist/{chunk-ILM6X6CP.js.map → chunk-ZF572E2M.js.map} +0 -0
  295. /package/dist/{chunk-OGVE4IJW.js.map → chunk-ZHMUFYZF.js.map} +0 -0
  296. /package/dist/{chunk-YFFEF6HR.js.map → chunk-ZHZ4PET5.js.map} +0 -0
  297. /package/dist/{chunk-YZNKFYDC.js.map → chunk-ZM72UO3Y.js.map} +0 -0
  298. /package/dist/{classified-marker-52P3D72W.js.map → classified-marker-SVDRXLD3.js.map} +0 -0
  299. /package/dist/{as/index.js.map → collection-facade-S5PPKZD5.js.map} +0 -0
  300. /package/dist/{at/index.js.map → cover-ADBCTIKN.js.map} +0 -0
  301. /package/dist/{dead-filter-JXVCKS6W.js.map → dead-filter-HKDMTMVY.js.map} +0 -0
  302. /package/dist/{by/index.js.map → delegation-EV7LKJPH.js.map} +0 -0
  303. /package/dist/{chunk-2YELV6TV.js.map → derive-5LDJW76F.js.map} +0 -0
  304. /package/dist/{dispatch-SMXUO7W5.js.map → dispatch-V5MSMQYX.js.map} +0 -0
  305. /package/dist/{collection-facade-XKCFHSLR.js.map → enclave-ZA7C3H2L.js.map} +0 -0
  306. /package/dist/{cover-5BSNJREH.js.map → executor-SVHAJZ4A.js.map} +0 -0
  307. /package/dist/{delegation-WWZPEDK2.js.map → export-accessible-S35YKIBL.js.map} +0 -0
  308. /package/dist/{derive-CWWFEQ4N.js.map → extract-partition-UVHAM5WZ.js.map} +0 -0
  309. /package/dist/{fanout-sidecar-WWXVHHUH.js.map → fanout-sidecar-HRMHC34B.js.map} +0 -0
  310. /package/dist/{enclave-I5H3GINP.js.map → issue-5X3SMCF4.js.map} +0 -0
  311. /package/dist/{executor-SHYLIBOM.js.map → ledger-K6JBFL3Z.js.map} +0 -0
  312. /package/dist/{export-accessible-FBL6TDSK.js.map → liberate-NHTCKBU4.js.map} +0 -0
  313. /package/dist/{extract-partition-ZYIRYMTI.js.map → link-set-XVZY2ODC.js.map} +0 -0
  314. /package/dist/{in/index.js.map → noydb-TI3RFU6M.js.map} +0 -0
  315. /package/dist/{issue-F76PAGIR.js.map → policy-QWGJB7P7.js.map} +0 -0
  316. /package/dist/{post-register-XIAHB6KF.js.map → post-register-5VHHVFJY.js.map} +0 -0
  317. /package/dist/{ledger-M2BKCNVS.js.map → register-CEX7R7NE.js.map} +0 -0
  318. /package/dist/{liberate-ZP7UB57K.js.map → registry-DIKMRXUC.js.map} +0 -0
  319. /package/dist/{link-set-ZU4E5J5S.js.map → registry-EWIB5NTI.js.map} +0 -0
  320. /package/dist/{noydb-BNDGEK5X.js.map → request-withdrawal-AAG57QO4.js.map} +0 -0
  321. /package/dist/{reveal-VWXRV2XU.js.map → reveal-7OOT5XPD.js.map} +0 -0
  322. /package/dist/{on/index.js.map → revoke-U5LCIJMF.js.map} +0 -0
  323. /package/dist/{seed-CDBFOTIK.js.map → seed-GVOI6QP6.js.map} +0 -0
  324. /package/dist/{policy-IY2YEA3A.js.map → signer-NAA2OX7H.js.map} +0 -0
  325. /package/dist/{register-HB4TQZSV.js.map → stale-BJO2WIN7.js.map} +0 -0
  326. /package/dist/{registry-6BMBFEXT.js.map → storage-FL7XXZTN.js.map} +0 -0
  327. /package/dist/{store-coordination-provider-P3IU5JHD.js.map → store-coordination-provider-DX5HECK3.js.map} +0 -0
  328. /package/dist/{walk-E3OVLBFR.js.map → walk-JXMWKKQW.js.map} +0 -0
  329. /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
  330. /package/dist/{registry-JOFO7RAH.js.map → withdraw-accessible-GO6KQJVM.js.map} +0 -0
@@ -58,7 +58,7 @@
58
58
  * groupBy doesn't need its own seam for the moment, because it
59
59
  * delegates to the reducer protocol for all per-bucket state.
60
60
  */
61
- import type { AggregateSpec, AggregateResult, AggregationUpstream, LiveAggregation } from './aggregation.js';
61
+ import type { ReduceSpec, ReduceResult, ReductionUpstream, LiveReduction } from './reduction.js';
62
62
  import type { ReducerBuilder } from './reducers.js';
63
63
  import type { MoneyDescriptor } from '../../via/money/descriptor.js';
64
64
  import type { ViaPipeline } from '../../kernel/via/pipeline.js';
@@ -78,7 +78,7 @@ export declare const GROUPBY_MAX_CARDINALITY = 100000;
78
78
  */
79
79
  export declare function resetGroupByWarnings(): void;
80
80
  /**
81
- * Result row shape for a grouped aggregation. Each row carries the
81
+ * Result row shape for a grouped reduction. Each row carries the
82
82
  * group key value under the grouping field name plus every reducer
83
83
  * output from the spec.
84
84
  *
@@ -116,7 +116,7 @@ export type GroupedRowN<F extends readonly string[], R> = {
116
116
  */
117
117
  declare abstract class GroupedQueryBase {
118
118
  protected readonly executeRecords: () => readonly unknown[];
119
- protected readonly upstreams: readonly AggregationUpstream[];
119
+ protected readonly upstreams: readonly ReductionUpstream[];
120
120
  /**
121
121
  * Optional dict label resolver attached by the query builder when
122
122
  * the grouping field is a dictKey. Variadic groupings always pass
@@ -137,7 +137,7 @@ declare abstract class GroupedQueryBase {
137
137
  * `[field]`.
138
138
  */
139
139
  protected readonly fields: readonly string[];
140
- constructor(executeRecords: () => readonly unknown[], fieldOrFields: string | readonly string[], upstreams: readonly AggregationUpstream[],
140
+ constructor(executeRecords: () => readonly unknown[], fieldOrFields: string | readonly string[], upstreams: readonly ReductionUpstream[],
141
141
  /**
142
142
  * Optional dict label resolver attached by the query builder when
143
143
  * the grouping field is a dictKey. Variadic groupings always pass
@@ -152,21 +152,21 @@ declare abstract class GroupedQueryBase {
152
152
  */
153
153
  via?: ViaPipeline | undefined);
154
154
  /** Apply Via-aware reducer rewriting (e.g. money) when the source declares one. */
155
- protected wrapSpec<Spec extends AggregateSpec>(spec: Spec): Spec;
155
+ protected wrapSpec<Spec extends ReduceSpec>(spec: Spec): Spec;
156
156
  }
157
157
  /**
158
158
  * Chainable wrapper returned by `Query.groupBy(field)`. Terminates
159
- * with `.aggregate(spec)` which returns a `GroupedAggregation`.
159
+ * with `.aggregate(spec)` which returns a `GroupedReduction`.
160
160
  *
161
161
  * Kept minimal — the only operation on a grouped query is
162
- * aggregation. Ordering, limiting, and further filtering belong on
162
+ * reduction. Ordering, limiting, and further filtering belong on
163
163
  * the underlying `Query` before `.groupBy()` is called; applying
164
164
  * them post-group would be a different operation (`having` /
165
165
  * `groupOrderBy`), out of scope for.
166
166
  */
167
167
  export declare class GroupedQuery<T, F extends string, S extends keyof T = never, M extends keyof T & string = never> extends GroupedQueryBase {
168
168
  /**
169
- * Build a grouped aggregation. Returns a `GroupedAggregation`
169
+ * Build a grouped reduction. Returns a `GroupedReduction`
170
170
  * with `.run()`, `.runAsync()`, and `.live()` terminals — same shape
171
171
  * as the non-grouped `.aggregate()` wrapper, just with an array
172
172
  * result (one row per bucket) instead of a single reduced object.
@@ -178,8 +178,8 @@ export declare class GroupedQuery<T, F extends string, S extends keyof T = never
178
178
  * declared `moneyFields` (`M`) member return a `MoneyString`. The
179
179
  * bare-spec overload is preserved for backward compatibility.
180
180
  */
181
- aggregate<Spec extends AggregateSpec>(spec: Spec): GroupedAggregation<GroupedRow<F, AggregateResult<Spec>>>;
182
- aggregate<Spec extends AggregateSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): GroupedAggregation<GroupedRow<F, AggregateResult<Spec>>>;
181
+ aggregate<Spec extends ReduceSpec>(spec: Spec): GroupedReduction<GroupedRow<F, ReduceResult<Spec>>>;
182
+ aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): GroupedReduction<GroupedRow<F, ReduceResult<Spec>>>;
183
183
  }
184
184
  /**
185
185
  * Variadic-keyed sibling of `GroupedQuery<T, F>`. Constructed by the
@@ -187,12 +187,12 @@ export declare class GroupedQuery<T, F extends string, S extends keyof T = never
187
187
  * identical — only the type-level result-row narrowing differs.
188
188
  */
189
189
  export declare class GroupedQueryN<T, F extends readonly string[], S extends keyof T = never, M extends keyof T & string = never> extends GroupedQueryBase {
190
- aggregate<Spec extends AggregateSpec>(spec: Spec): GroupedAggregation<GroupedRowN<F, AggregateResult<Spec>>>;
191
- aggregate<Spec extends AggregateSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): GroupedAggregation<GroupedRowN<F, AggregateResult<Spec>>>;
190
+ aggregate<Spec extends ReduceSpec>(spec: Spec): GroupedReduction<GroupedRowN<F, ReduceResult<Spec>>>;
191
+ aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): GroupedReduction<GroupedRowN<F, ReduceResult<Spec>>>;
192
192
  }
193
193
  /**
194
194
  * Execute the group-and-reduce pipeline. Pure function over a
195
- * record array and a spec — shared by `GroupedAggregation.run()`
195
+ * record array and a spec — shared by `GroupedReduction.run()`
196
196
  * and the live-mode refresh path. Exported for tests and for any
197
197
  * future `scan().groupBy().aggregate()` reuse.
198
198
  *
@@ -201,10 +201,10 @@ export declare class GroupedQueryN<T, F extends readonly string[], S extends key
201
201
  * bucket would be created — the consumer doesn't have to wait for
202
202
  * the full partition to materialize before the error fires.
203
203
  */
204
- export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec: AggregateSpec, moneyFields?: Record<string, MoneyDescriptor>): R[];
204
+ export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFields: string | readonly string[], spec: ReduceSpec, moneyFields?: Record<string, MoneyDescriptor>): R[];
205
205
  /**
206
- * Grouped aggregation wrapper — the `.groupBy(field).aggregate(spec)`
207
- * terminal. Shape mirrors `Aggregation<R>` from aggregate.ts: two
206
+ * Grouped reduction wrapper — the `.groupBy(field).aggregate(spec)`
207
+ * terminal. Shape mirrors `Reduction<R>` from aggregate.ts: two
208
208
  * terminals (`.run()` and `.live()`), spec bound at construction
209
209
  * time, upstreams collected for live mode.
210
210
  *
@@ -212,7 +212,7 @@ export declare function groupAndReduce<R>(records: readonly unknown[], fieldOrFi
212
212
  * grouped row), and the terminals return `R[]` — one row per
213
213
  * bucket.
214
214
  */
215
- export declare class GroupedAggregation<R> {
215
+ export declare class GroupedReduction<R> {
216
216
  private readonly executeRecords;
217
217
  private readonly spec;
218
218
  private readonly upstreams;
@@ -222,7 +222,7 @@ export declare class GroupedAggregation<R> {
222
222
  */
223
223
  private readonly dictLabelResolver?;
224
224
  private readonly fields;
225
- constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec: AggregateSpec, upstreams: readonly AggregationUpstream[],
225
+ constructor(executeRecords: () => readonly unknown[], fields: string | readonly string[], spec: ReduceSpec, upstreams: readonly ReductionUpstream[],
226
226
  /**
227
227
  * Optional dict label resolver for `<field>Label` projection
228
228
  *. Present when the grouping field is a dictKey.
@@ -260,10 +260,10 @@ export declare class GroupedAggregation<R> {
260
260
  fallback?: string | readonly string[];
261
261
  }): Promise<R[]>;
262
262
  /**
263
- * Build a reactive `LiveAggregation<R[]>` that re-runs the full
263
+ * Build a reactive `LiveReduction<R[]>` that re-runs the full
264
264
  * group-and-reduce pipeline whenever any upstream source notifies
265
265
  * of a change. Same error-isolation and idempotent-stop contract
266
- * as `Aggregation.live()` — the implementation delegates to the
266
+ * as `Reduction.live()` — the implementation delegates to the
267
267
  * same `LiveAggregationImpl` class by threading a fresh
268
268
  * recompute closure through the existing constructor.
269
269
  *
@@ -275,6 +275,6 @@ export declare class GroupedAggregation<R> {
275
275
  *
276
276
  * Always call `live.stop()` when finished.
277
277
  */
278
- live(): LiveAggregation<R[]>;
278
+ live(): LiveReduction<R[]>;
279
279
  }
280
280
  export {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @noy-db/hub/reduce — opt-in reduction + groupBy service.
3
+ *
4
+ * @category capability
5
+ *
6
+ * Groups every file whose reason-for-existing is record reduction:
7
+ * - `reduction` (`Reduction<R>`, `reduceRecords`, `buildLiveReduction`)
8
+ * - `groupby` (`GroupedQuery`, `GroupedReduction`, cardinality guards)
9
+ * - `reducers` (`count`, `sum`, `avg`, `min`, `max` factories)
10
+ *
11
+ * The root barrel (`@noy-db/hub`) and the `@noy-db/hub/query` subpath
12
+ * continue to re-export the same symbols for backward compatibility
13
+ * with consumers written before the relocation. New code should
14
+ * prefer this subpath.
15
+ */
16
+ export { withReduce } from './active.js';
17
+ export type { ReduceStrategy } from './strategy.js';
18
+ export { Reduction, reduceRecords, buildLiveReduction } from './reduction.js';
19
+ export type { ReduceSpec, ReduceResult, ReductionUpstream, LiveReduction, } from './reduction.js';
20
+ export { GroupedQuery, GroupedQueryN, GroupedReduction, groupAndReduce, resetGroupByWarnings, GROUPBY_WARN_CARDINALITY, GROUPBY_MAX_CARDINALITY, } from './groupby.js';
21
+ export type { GroupedRow, GroupedRowN } from './groupby.js';
22
+ export { count, sum, avg, min, max, moneySum, moneyMin, moneyMax, reducerBuilder } from './reducers.js';
23
+ export type { Reducer, ReducerOptions, ReducerBuilder } from './reducers.js';
24
+ /** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
25
+ export { NO_REDUCE } from './strategy.js';
26
+ /**
27
+ * Types named by this entry's own signatures (#843a). `min`/`max` return a
28
+ * `MinMaxState`, and the money reducers speak `MoneyString`; both must be
29
+ * nameable from the entry that exports the functions, or a caller can invoke
30
+ * them and cannot annotate the result.
31
+ */
32
+ export type { MinMaxState } from './reducers.js';
33
+ export type { MoneyString } from '../../via/money/branded.js';
34
+ export type { MoneyDescriptor } from '../../via/money/descriptor.js';
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Aggregation reducers for the query DSL.
2
+ * Reduction reducers for the query DSL.
3
3
  *
4
4
  * the reducer protocol plus five built-in factories
5
5
  * (`count`, `sum`, `avg`, `min`, `max`) consumed by `Query.aggregate()`
6
6
  * and, in the future, `Scan.aggregate()`. Every factory accepts
7
7
  * an optional `{ seed }` parameter that is plumbed through the
8
8
  * protocol but unused by the executor — that's the load-bearing
9
- * half of constraint #2. When partition-aware aggregation
9
+ * half of constraint #2. When partition-aware reduction
10
10
  * lands, the seed carries the previous partition's running total into
11
11
  * the next partition without requiring a protocol change.
12
12
  *
@@ -19,7 +19,7 @@
19
19
  * Reducers are pure data — `init` / `step` / `finalize` / optional
20
20
  * `remove` are stateless functions that receive and return `S`. This
21
21
  * is the shape that admits O(1) incremental maintenance in a future
22
- * optimization (delta-aware `LiveAggregation` applies `step` or
22
+ * optimization (delta-aware `LiveReduction` applies `step` or
23
23
  * `remove` per delta), without blocking the simpler "full re-run on
24
24
  * source change" that ships.
25
25
  */
@@ -30,19 +30,19 @@ import type { QueryField } from '../../kernel/types.js';
30
30
  * `.aggregate()` spec.
31
31
  *
32
32
  * Type parameters:
33
- * - `R` — user-visible result type (what the aggregation returns
33
+ * - `R` — user-visible result type (what the reduction returns
34
34
  * for this slot, e.g. `number` for `sum()`)
35
35
  * - `S` — internal state type, defaults to `R` for simple reducers
36
36
  * that don't need compound bookkeeping
37
37
  *
38
38
  * A reducer is stateless: every method is pure over `S`. `init()` is
39
- * called once per aggregation run to build the initial state; `step()`
39
+ * called once per reduction run to build the initial state; `step()`
40
40
  * folds a record into the state; `remove()` (optional) un-folds a
41
41
  * record, enabling incremental live maintenance; `finalize()` reads
42
42
  * the final answer out of the state at the end of the run.
43
43
  */
44
44
  export interface Reducer<R, S = R> {
45
- /** Build the initial state for a fresh aggregation run. */
45
+ /** Build the initial state for a fresh reduction run. */
46
46
  init(): S;
47
47
  /** Fold a record into the state. Returns the new state. */
48
48
  step(state: S, record: unknown): S;
@@ -63,7 +63,7 @@ export interface Reducer<R, S = R> {
63
63
  * Combine two independent partial states into one (then `finalize` once).
64
64
  * Optional. MUST be associative + commutative with `init()` as identity.
65
65
  * Never merge finalized results — only states. Enables parallel /
66
- * hierarchical aggregation (e.g. cross-shard or advisor→firm rollup).
66
+ * hierarchical reduction (e.g. cross-shard or advisor→firm rollup).
67
67
  */
68
68
  merge?(a: S, b: S): S;
69
69
  /**
@@ -94,10 +94,10 @@ export interface Reducer<R, S = R> {
94
94
  *
95
95
  * `seed` — optional initial value for the internal state. **Unused by
96
96
  * the executor**, plumbed through the protocol for constraint
97
- * #2 (partition-aware aggregation seam). In, partitioned
98
- * aggregations will pass the previous partition's carry as `seed` so
97
+ * #2 (partition-aware reduction seam). In, partitioned
98
+ * reductions will pass the previous partition's carry as `seed` so
99
99
  * a long time series can be rolled forward one partition at a time
100
- * without re-aggregating closed partitions.
100
+ * without re-reducing closed partitions.
101
101
  *
102
102
  * always uses `init()` with the factory's zero value, regardless
103
103
  * of whether `seed` was passed. Do not remove the parameter — that's
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Aggregate execution — the runtime behind `Query.aggregate()`.
3
3
  *
4
- * takes an `AggregateSpec` (a record of named reducers
4
+ * takes an `ReduceSpec` (a record of named reducers
5
5
  * built from `reducers.ts`) and runs every reducer over the records
6
6
  * produced by the underlying query. Two terminal surfaces:
7
7
  *
8
8
  * - `.run(): R` — synchronous one-shot reduction. Matches the
9
9
  * existing `Query.toArray()` / `.first()` / `.count()` style.
10
- * - `.live(): LiveAggregation<R>` — reactive primitive that
10
+ * - `.live(): LiveReduction<R>` — reactive primitive that
11
11
  * re-runs the reduction whenever the query's source notifies of
12
12
  * a change. uses naive full re-run; incremental delta
13
13
  * maintenance is admitted by the reducer protocol (`remove()`)
@@ -15,7 +15,7 @@
15
15
  * can switch from full re-run to delta-based without breaking
16
16
  * the public API. Consumers get correct, reactive values today.
17
17
  *
18
- * The `Aggregation<R>` wrapper is deliberately tiny — it exists so
18
+ * The `Reduction<R>` wrapper is deliberately tiny — it exists so
19
19
  * `.aggregate(spec)` can be chained with either `.run()` or `.live()`
20
20
  * without the builder needing two separate terminal methods. It
21
21
  * holds the closure over the query execution (produces the current
@@ -39,9 +39,9 @@ import type { Reducer } from './reducers.js';
39
39
  * }
40
40
  * ```
41
41
  */
42
- export type AggregateSpec = Readonly<Record<string, Reducer<unknown, unknown>>>;
42
+ export type ReduceSpec = Readonly<Record<string, Reducer<unknown, unknown>>>;
43
43
  /**
44
- * Map an `AggregateSpec` to its reduced result shape — each key
44
+ * Map an `ReduceSpec` to its reduced result shape — each key
45
45
  * carries the finalized result type from its reducer. A spec built
46
46
  * from `{ total: sum('amount'), n: count() }` yields a result of
47
47
  * `{ total: number, n: number }`.
@@ -50,26 +50,26 @@ export type AggregateSpec = Readonly<Record<string, Reducer<unknown, unknown>>>;
50
50
  * each `Reducer<R, _>`. The `infer` captures the user-visible result
51
51
  * type, discarding the internal state type `S`.
52
52
  */
53
- export type AggregateResult<Spec extends AggregateSpec> = {
53
+ export type ReduceResult<Spec extends ReduceSpec> = {
54
54
  [K in keyof Spec]: Spec[K] extends Reducer<infer R, unknown> ? R : never;
55
55
  };
56
56
  /**
57
57
  * Pure reduction over a record array. Runs every reducer's
58
58
  * `init → step* → finalize` pipeline exactly once over the records.
59
59
  *
60
- * Called by `Aggregation.run()` and by the live-mode refresh path.
60
+ * Called by `Reduction.run()` and by the live-mode refresh path.
61
61
  * Exported for tests and for future `scan().aggregate()` reuse
62
62
  * — the streaming path will call the same reducer protocol with a
63
63
  * per-page loop instead of a single array.
64
64
  */
65
- export declare function reduceRecords<Spec extends AggregateSpec>(records: readonly unknown[], spec: Spec): AggregateResult<Spec>;
65
+ export declare function reduceRecords<Spec extends ReduceSpec>(records: readonly unknown[], spec: Spec): ReduceResult<Spec>;
66
66
  /**
67
- * A minimal reactive primitive for aggregation results.
67
+ * A minimal reactive primitive for reduction results.
68
68
  *
69
69
  * Same spirit as the `LiveQuery` in : frame-agnostic, a plain
70
70
  * object with `value` / `error` fields and a `subscribe(cb)`
71
71
  * notification channel that Vue / React / Solid adapters wrap in
72
- * their own primitive. Intentionally NOT a Promise — aggregations
72
+ * their own primitive. Intentionally NOT a Promise — reductions
73
73
  * have a well-defined "current value" at every instant, and the
74
74
  * reactive consumer wants to read that value synchronously.
75
75
  *
@@ -86,7 +86,7 @@ export declare function reduceRecords<Spec extends AggregateSpec>(records: reado
86
86
  * Always call `stop()` when done; Vue's `onUnmounted` is the
87
87
  * canonical place. Raw consumers must do it themselves.
88
88
  */
89
- export interface LiveAggregation<R> {
89
+ export interface LiveReduction<R> {
90
90
  /** Current reduced value. Undefined only if the first compute threw. */
91
91
  readonly value: R | undefined;
92
92
  /** Last execution error, if any. Cleared on the next successful run. */
@@ -97,14 +97,14 @@ export interface LiveAggregation<R> {
97
97
  stop(): void;
98
98
  }
99
99
  /**
100
- * Upstream change-notification hook for live aggregation.
100
+ * Upstream change-notification hook for live reduction.
101
101
  *
102
102
  * Matches the shape that `QuerySource.subscribe` already uses — a
103
103
  * single method that accepts a callback and returns an unsubscribe
104
- * function. The `Aggregation` wrapper collects upstreams from the
104
+ * function. The `Reduction` wrapper collects upstreams from the
105
105
  * query's source and wires them into a single re-run trigger.
106
106
  */
107
- export interface AggregationUpstream {
107
+ export interface ReductionUpstream {
108
108
  subscribe(cb: () => void): () => void;
109
109
  }
110
110
  /**
@@ -120,14 +120,14 @@ export interface AggregationUpstream {
120
120
  * `.aggregate(spec).live()`. Wrapping lets the spec be named once
121
121
  * and reused for either terminal, and keeps the `Query` class
122
122
  * from growing a pair of near-duplicate method overloads
123
- * (`aggregateRun` / `aggregateLive`) that would be harder to
123
+ * (`reduceRun` / `reduceLive`) that would be harder to
124
124
  * discover.
125
125
  */
126
- export declare class Aggregation<R> {
126
+ export declare class Reduction<R> {
127
127
  private readonly executeRecords;
128
128
  private readonly spec;
129
129
  private readonly upstreams;
130
- constructor(executeRecords: () => readonly unknown[], spec: AggregateSpec, upstreams: readonly AggregationUpstream[]);
130
+ constructor(executeRecords: () => readonly unknown[], spec: ReduceSpec, upstreams: readonly ReductionUpstream[]);
131
131
  /**
132
132
  * Execute the query and reduce the results synchronously.
133
133
  * Returns the reduced shape matching the spec — e.g. a spec of
@@ -136,7 +136,7 @@ export declare class Aggregation<R> {
136
136
  */
137
137
  run(): R;
138
138
  /**
139
- * Build a reactive `LiveAggregation<R>` that re-runs the reduction
139
+ * Build a reactive `LiveReduction<R>` that re-runs the reduction
140
140
  * whenever any upstream source notifies of a change. The initial
141
141
  * value is computed eagerly in the constructor, so consumers can
142
142
  * read `live.value` immediately after calling `.live()`.
@@ -153,14 +153,14 @@ export declare class Aggregation<R> {
153
153
  * correct, reactive values today; future PRs can switch to
154
154
  * delta-based maintenance without changing this API.
155
155
  */
156
- live(): LiveAggregation<R>;
156
+ live(): LiveReduction<R>;
157
157
  }
158
158
  /**
159
- * Build a `LiveAggregation<V>` from a recompute closure and a list
159
+ * Build a `LiveReduction<V>` from a recompute closure and a list
160
160
  * of upstreams. Exposed so sibling files in the query DSL
161
161
  * (currently `groupby.ts`) can reuse the reactive primitive
162
162
  * without reaching into `LiveAggregationImpl` directly. This keeps
163
163
  * the implementation class private while still allowing planned
164
164
  * composition with `.groupBy().aggregate().live()`.
165
165
  */
166
- export declare function buildLiveAggregation<V>(recompute: () => V, upstreams: readonly AggregationUpstream[]): LiveAggregation<V>;
166
+ export declare function buildLiveReduction<V>(recompute: () => V, upstreams: readonly ReductionUpstream[]): LiveReduction<V>;
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Strategy seam between the core Query / ScanBuilder chain and the
3
3
  * optional aggregate / groupBy service. Core imports
4
- * `AggregateStrategy` as a TYPE-ONLY symbol and `NO_AGGREGATE` as a
4
+ * `ReduceStrategy` as a TYPE-ONLY symbol and `NO_REDUCE` as a
5
5
  * tiny runtime stub.
6
6
  *
7
- * The heavy machinery — `Aggregation`, `GroupedQuery`, the
8
- * reducer-step logic — is only reachable from `withAggregate()` in
7
+ * The heavy machinery — `Reduction`, `GroupedQuery`, the
8
+ * reducer-step logic — is only reachable from `withReduce()` in
9
9
  * `./active.ts`, which is only exported through the
10
- * `@noy-db/hub/aggregate` subpath. Consumers that don't import the
10
+ * `@noy-db/hub/reduce` subpath. Consumers that don't import the
11
11
  * subpath ship none of the ~886 LOC.
12
12
  *
13
13
  * @internal
14
14
  */
15
- import type { Aggregation, AggregateSpec, AggregateResult, AggregationUpstream } from './aggregation.js';
15
+ import type { Reduction, ReduceSpec, ReduceResult, ReductionUpstream } from './reduction.js';
16
16
  import type { GroupedQuery, GroupedQueryN } from './groupby.js';
17
17
  import type { ViaPipeline } from '../../kernel/via/pipeline.js';
18
18
  /**
@@ -21,39 +21,39 @@ import type { ViaPipeline } from '../../kernel/via/pipeline.js';
21
21
  *
22
22
  * @internal
23
23
  */
24
- export interface AggregateStrategy {
24
+ export interface ReduceStrategy {
25
25
  /**
26
- * Build an `Aggregation<R>` for `Query.aggregate(spec)`. `executeRecords`
26
+ * Build an `Reduction<R>` for `Query.aggregate(spec)`. `executeRecords`
27
27
  * is a closure that produces the matching record set when the
28
- * aggregation runs. NO_AGGREGATE throws; the active strategy
29
- * constructs a real `Aggregation`.
28
+ * reduction runs. NO_REDUCE throws; the active strategy
29
+ * constructs a real `Reduction`.
30
30
  */
31
- aggregate<Spec extends AggregateSpec>(executeRecords: () => readonly unknown[], spec: Spec, upstreams: readonly AggregationUpstream[]): Aggregation<AggregateResult<Spec>>;
31
+ aggregate<Spec extends ReduceSpec>(executeRecords: () => readonly unknown[], spec: Spec, upstreams: readonly ReductionUpstream[]): Reduction<ReduceResult<Spec>>;
32
32
  /**
33
33
  * Build a `GroupedQuery<T, F, S>` for `Query.groupBy(field)`. Same
34
34
  * closure / upstream inputs as `aggregate` plus the group key field.
35
35
  */
36
- groupBy<T, F extends string, S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], field: F, upstreams: readonly AggregationUpstream[], dictLabelResolver?: (key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>, via?: ViaPipeline): GroupedQuery<T, F, S, M>;
36
+ groupBy<T, F extends string, S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], field: F, upstreams: readonly ReductionUpstream[], dictLabelResolver?: (key: string, locale: string, fallback?: string | readonly string[]) => Promise<string | undefined>, via?: ViaPipeline): GroupedQuery<T, F, S, M>;
37
37
  /**
38
38
  * Variadic-keyed sibling — builds a `GroupedQueryN<T, F, S>` for
39
39
  * `Query.groupBy(...fields)`. No dictLabelResolver — `<field>Label`
40
40
  * projection only applies to single-field groupings, which dispatch
41
41
  * through `groupBy` above.
42
42
  */
43
- groupByN<T, F extends readonly string[], S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], fields: F, upstreams: readonly AggregationUpstream[], via?: ViaPipeline): GroupedQueryN<T, F, S, M>;
43
+ groupByN<T, F extends readonly string[], S extends keyof T = never, M extends keyof T & string = never>(executeRecords: () => readonly unknown[], fields: F, upstreams: readonly ReductionUpstream[], via?: ViaPipeline): GroupedQueryN<T, F, S, M>;
44
44
  /**
45
45
  * Terminal streaming aggregator for `ScanBuilder.aggregate(spec)`.
46
46
  * Takes an async iterable of decrypted records + the spec and
47
47
  * returns the reduced result.
48
48
  */
49
- scanAggregate<Spec extends AggregateSpec>(iter: AsyncIterable<unknown>, spec: Spec): Promise<AggregateResult<Spec>>;
49
+ scanAggregate<Spec extends ReduceSpec>(iter: AsyncIterable<unknown>, spec: Spec): Promise<ReduceResult<Spec>>;
50
50
  }
51
51
  /**
52
52
  * No-aggregate stub. Every `.aggregate()` / `.groupBy()` / streaming
53
53
  * `scan().aggregate()` call throws with a pointer at the subpath. The
54
- * real `Aggregation` / `GroupedQuery` classes are never referenced at
54
+ * real `Reduction` / `GroupedQuery` classes are never referenced at
55
55
  * runtime, so the bundler drops the ~886 LOC.
56
56
  *
57
57
  * @internal
58
58
  */
59
- export declare const NO_AGGREGATE: AggregateStrategy;
59
+ export declare const NO_REDUCE: ReduceStrategy;
@@ -21,3 +21,5 @@ export type { DevUnlockOptions } from './dev-unlock.js';
21
21
  export { withSession } from './active.js';
22
22
  export type { SessionStrategy } from './strategy.js';
23
23
  export { SessionExpiredError, SessionNotFoundError, SessionPolicyError, } from '../../kernel/errors.js';
24
+ /** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
25
+ export { NO_SESSION } from './strategy.js';
@@ -29,3 +29,5 @@
29
29
  */
30
30
  export { withSync } from '../team/sync-active.js';
31
31
  export type { SyncStrategy } from '../team/sync-strategy.js';
32
+ /** The un-opted-in stub for this service — exported so callers can compare against it (#844). */
33
+ export { NO_SYNC } from '../team/sync-strategy.js';
@@ -132,7 +132,26 @@ export declare function updateKeyringIdentity(adapter: NoydbStore, vault: string
132
132
  * 2. Re-encrypt all records in affected collections
133
133
  * 3. Re-wrap new DEKs for all remaining users
134
134
  */
135
- export declare function rotateKeys(adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]): Promise<void>;
135
+ /**
136
+ * What a DEK rotation leaves behind (#854).
137
+ *
138
+ * A member's DEKs are wrapped under that member's KEK, and a KEK derives only
139
+ * from that member's secret — so the caller cannot re-wrap a fresh DEK for
140
+ * anyone else. That is the zero-knowledge property working as designed, but it
141
+ * means rotation necessarily DROPS the rotated collections from every other
142
+ * member's keyring rather than re-keying them.
143
+ *
144
+ * `needsRegrant` names exactly who lost what, so the caller can re-run
145
+ * `grant()` instead of discovering the access loss later.
146
+ */
147
+ export interface RotateResult {
148
+ /** (member, collection) pairs whose access was dropped by the rotation. */
149
+ readonly needsRegrant: ReadonlyArray<{
150
+ readonly userId: string;
151
+ readonly collection: string;
152
+ }>;
153
+ }
154
+ export declare function rotateKeys(adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]): Promise<RotateResult>;
136
155
  /**
137
156
  * Change the user's secret. Re-wraps every DEK under the new KEK.
138
157
  *
@@ -19,6 +19,7 @@
19
19
  * Internal service — reached through `noydb.team.rotateSecret(...)` etc.
20
20
  */
21
21
  import type { NoydbOptions, NoydbStore, KeyringAuthenticator } from '../../kernel/types.js';
22
+ import type { RotateResult } from './keyring.js';
22
23
  import { type RotateSecretInput, type RecoverSecretInput, type RecoverSecretResult, type RotateRecoveryOptions, type RotateRecoveryResult, type EnrollRecoveryResult, type RecoveryEnrollmentInput, type RecoveryProof } from './rotate-recover.js';
23
24
  import { type RecoverUserOptions } from './peer-recover.js';
24
25
  import { type PaperRecoveryEntry, type ShamirRecoveryEntry } from './recovery.js';
@@ -72,7 +73,7 @@ export declare class TeamFacade {
72
73
  /** Gate + run a `revoke` engine. See `Noydb.revoke` for the public contract. */
73
74
  runRevoke(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<void>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
74
75
  /** Gate + run a `rotateKeys` engine. See `Noydb.rotate` for the public contract. */
75
- runRotate(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]) => Promise<void>, vault: string, collections: string[]): Promise<void>;
76
+ runRotate(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]) => Promise<RotateResult>, vault: string, collections: string[]): Promise<RotateResult>;
76
77
  /**
77
78
  * Add a tier-2 authenticator slot to the calling user's keyring.
78
79
  * Each slot independently wraps the SAME KEK under a method-specific
@@ -4,18 +4,18 @@ import {
4
4
  freezeSnapshotOnly,
5
5
  randomId,
6
6
  withdrawAccessibleData
7
- } from "./chunk-K4BWPNJO.js";
8
- import "./chunk-OMSKGLYA.js";
9
- import "./chunk-YCAJDK4O.js";
10
- import "./chunk-YFFEF6HR.js";
11
- import "./chunk-GEEJPID6.js";
12
- import "./chunk-SC4JLMZI.js";
7
+ } from "./chunk-MLCTPWSO.js";
8
+ import "./chunk-WWBC4KLB.js";
9
+ import "./chunk-E7FSBI6I.js";
10
+ import "./chunk-ZHZ4PET5.js";
11
+ import "./chunk-MMVQ3SUO.js";
12
+ import "./chunk-KCZAFDP5.js";
13
13
  import "./chunk-5WLDZZ6S.js";
14
14
  import "./chunk-5HSSTOOG.js";
15
15
  import "./chunk-G4MFQXYX.js";
16
16
  import "./chunk-LP7BEXCT.js";
17
17
  import "./chunk-7U6AB7DZ.js";
18
- import "./chunk-YTW6ZIPD.js";
18
+ import "./chunk-DOZFU7OZ.js";
19
19
  import "./chunk-6SYOHUHM.js";
20
20
  import "./chunk-PZ5AY32C.js";
21
21
  export {
@@ -25,4 +25,4 @@ export {
25
25
  randomId,
26
26
  withdrawAccessibleData
27
27
  };
28
- //# sourceMappingURL=withdraw-accessible-Q2EMATCU.js.map
28
+ //# sourceMappingURL=withdraw-accessible-GO6KQJVM.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noy-db/hub",
3
- "version": "0.4.0-pre.5",
3
+ "version": "0.4.0-pre.6",
4
4
  "description": "Zero-knowledge, offline-first, encrypted document store — core library with AES-256-GCM, PBKDF2, multi-user keyring, and sync engine",
5
5
  "license": "MIT",
6
6
  "author": "vLannaAi <vicio@lanna.ai>",
@@ -64,10 +64,6 @@
64
64
  "types": "./dist/with-store/lazy/index.d.ts",
65
65
  "default": "./dist/lazy/index.js"
66
66
  },
67
- "./aggregate": {
68
- "types": "./dist/with-lookup/aggregate/index.d.ts",
69
- "default": "./dist/aggregate/index.js"
70
- },
71
67
  "./crdt": {
72
68
  "types": "./dist/with-commit/crdt/index.d.ts",
73
69
  "default": "./dist/crdt/index.js"
@@ -152,33 +148,9 @@
152
148
  "types": "./dist/port/to/index.d.ts",
153
149
  "default": "./dist/to/index.js"
154
150
  },
155
- "./with": {
156
- "types": "./dist/port/with/index.d.ts",
157
- "default": "./dist/with/index.js"
158
- },
159
- "./ui": {
160
- "types": "./dist/port/ui/index.d.ts",
161
- "default": "./dist/ui/index.js"
162
- },
163
- "./by": {
164
- "types": "./dist/port/by/index.d.ts",
165
- "default": "./dist/by/index.js"
166
- },
167
- "./on": {
168
- "types": "./dist/port/on/index.d.ts",
169
- "default": "./dist/on/index.js"
170
- },
171
- "./at": {
172
- "types": "./dist/port/at/index.d.ts",
173
- "default": "./dist/at/index.js"
174
- },
175
- "./in": {
176
- "types": "./dist/port/in/index.d.ts",
177
- "default": "./dist/in/index.js"
178
- },
179
- "./as": {
180
- "types": "./dist/port/as/index.d.ts",
181
- "default": "./dist/as/index.js"
151
+ "./reduce": {
152
+ "types": "./dist/with-lookup/reduce/index.d.ts",
153
+ "default": "./dist/reduce/index.js"
182
154
  }
183
155
  },
184
156
  "module": "./dist/index.js",
@@ -192,14 +164,14 @@
192
164
  "node": ">=22.0.0"
193
165
  },
194
166
  "dependencies": {
195
- "@noy-db/attestation": "0.4.0-pre.5"
167
+ "@noy-db/attestation": "0.4.0-pre.6"
196
168
  },
197
169
  "devDependencies": {
198
170
  "@types/node": "^22.0.0",
199
171
  "esbuild": "^0.25.0",
200
172
  "zod": "^4.0.0",
201
173
  "zod-to-json-schema": "^3.25.2",
202
- "@noy-db/on-shamir": "0.4.0-pre.5"
174
+ "@noy-db/on-shamir": "0.4.0-pre.6"
203
175
  },
204
176
  "peerDependencies": {
205
177
  "zod-to-json-schema": "^3.25.0"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/with-lookup/aggregate/active.ts"],"sourcesContent":["/**\n * Active aggregate strategy factory. Calling `withAggregate()` returns\n * an `AggregateStrategy` whose methods construct real `Aggregation` /\n * `GroupedQuery` instances and run the streaming reducer protocol.\n *\n * This module is only reachable through the `@noy-db/hub/aggregate`\n * subpath — a consumer that never imports the subpath ships none of\n * this (ESM tree-shaking + hub's `\"sideEffects\": false`).\n */\n\nimport { Aggregation, reduceRecords } from './aggregation.js'\nimport type { AggregateSpec, AggregateResult } from './aggregation.js'\nimport { GroupedQuery, GroupedQueryN } from './groupby.js'\nimport type { AggregateStrategy } from './strategy.js'\n\n/**\n * Build the default aggregate strategy. Pass into\n * `createNoydb({ aggregateStrategy: withAggregate() })` to light up\n * `.aggregate()` and `.groupBy()` on `Query` and `ScanBuilder`.\n *\n * @example\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withAggregate, sum, count } from '@noy-db/hub/aggregate'\n *\n * const db = await createNoydb({\n * store, user, secret,\n * aggregateStrategy: withAggregate(),\n * })\n *\n * const totals = invoices.query()\n * .where('status', '==', 'paid')\n * .groupBy('clientId')\n * .aggregate({ amount: sum('amount'), n: count() })\n * .run()\n * ```\n */\nexport function withAggregate(): AggregateStrategy {\n return {\n aggregate(executeRecords, spec, upstreams) {\n return new Aggregation(executeRecords, spec as unknown as AggregateSpec, upstreams) as unknown as Aggregation<AggregateResult<typeof spec>>\n },\n groupBy(executeRecords, field, upstreams, dictLabelResolver, via) {\n return new GroupedQuery(executeRecords, field, upstreams, dictLabelResolver, via)\n },\n groupByN(executeRecords, fields, upstreams, via) {\n return new GroupedQueryN(executeRecords, fields, upstreams, undefined, via)\n },\n async scanAggregate(iter, spec) {\n const collected: unknown[] = []\n for await (const record of iter) collected.push(record)\n return reduceRecords(collected, spec as unknown as AggregateSpec) as unknown as AggregateResult<typeof spec>\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,gBAAmC;AACjD,SAAO;AAAA,IACL,UAAU,gBAAgB,MAAM,WAAW;AACzC,aAAO,IAAI,YAAY,gBAAgB,MAAkC,SAAS;AAAA,IACpF;AAAA,IACA,QAAQ,gBAAgB,OAAO,WAAW,mBAAmB,KAAK;AAChE,aAAO,IAAI,aAAa,gBAAgB,OAAO,WAAW,mBAAmB,GAAG;AAAA,IAClF;AAAA,IACA,SAAS,gBAAgB,QAAQ,WAAW,KAAK;AAC/C,aAAO,IAAI,cAAc,gBAAgB,QAAQ,WAAW,QAAW,GAAG;AAAA,IAC5E;AAAA,IACA,MAAM,cAAc,MAAM,MAAM;AAC9B,YAAM,YAAuB,CAAC;AAC9B,uBAAiB,UAAU,KAAM,WAAU,KAAK,MAAM;AACtD,aAAO,cAAc,WAAW,IAAgC;AAAA,IAClE;AAAA,EACF;AACF;","names":[]}