@noy-db/hub 0.7.0 → 0.8.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -14
- package/LICENSE +202 -21
- package/NOTICE +1 -0
- package/README.md +27 -10
- package/codemods/0.8.0-pre.json +61 -0
- package/dist/api-GVYEKSJE.js +19 -0
- package/dist/as/index.js +11 -11
- package/dist/at/index.js +9 -9
- package/dist/attestation/index.js +20 -20
- package/dist/{backup-IJTB4S4M.js → backup-7TFRVFLH.js} +21 -15
- package/dist/backup-7TFRVFLH.js.map +1 -0
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.js +39 -36
- package/dist/{chunk-7O3Y4PPD.js → chunk-244VXYPG.js} +140 -16
- package/dist/chunk-244VXYPG.js.map +1 -0
- package/dist/{chunk-BUE2D7PX.js → chunk-32YV3TJT.js} +2 -2
- package/dist/{chunk-3RCJJBNR.js → chunk-3ELRMVJK.js} +12 -12
- package/dist/{chunk-6GMZ7HEE.js → chunk-3F7GLNAE.js} +6 -6
- package/dist/{chunk-2Y4IMKA6.js → chunk-3H5KLDZN.js} +4 -4
- package/dist/{chunk-VTFVLCUH.js → chunk-3JWHAR6E.js} +2 -2
- package/dist/{chunk-YMUFFJCO.js → chunk-3TDUWVWB.js} +5 -2
- package/dist/chunk-3TDUWVWB.js.map +1 -0
- package/dist/{chunk-JBDFMYKQ.js → chunk-4AF3TUMP.js} +2 -2
- package/dist/{chunk-ZORTV6NH.js → chunk-4I522ERM.js} +88 -4
- package/dist/chunk-4I522ERM.js.map +1 -0
- package/dist/{chunk-MUM7IANK.js → chunk-4MXI3ODD.js} +4 -4
- package/dist/chunk-4MXI3ODD.js.map +1 -0
- package/dist/{chunk-BLN54W3L.js → chunk-5FDLC6G7.js} +56 -3
- package/dist/chunk-5FDLC6G7.js.map +1 -0
- package/dist/chunk-5O7D6ZTW.js +53 -0
- package/dist/chunk-5O7D6ZTW.js.map +1 -0
- package/dist/{chunk-J6FXAEUG.js → chunk-6B3VNR4P.js} +12 -12
- package/dist/{chunk-TUFM4UZP.js → chunk-6K7DPM7D.js} +2 -2
- package/dist/{chunk-K6LHRFBL.js → chunk-6LMQ5R26.js} +7 -7
- package/dist/{chunk-SPXXX5E4.js → chunk-6LNL42F5.js} +94 -32
- package/dist/chunk-6LNL42F5.js.map +1 -0
- package/dist/{chunk-XLMEZIAJ.js → chunk-6OWXYZK2.js} +2 -2
- package/dist/{chunk-BOWNCWZT.js → chunk-6QSQQLSE.js} +3 -3
- package/dist/chunk-7JE7BDYJ.js +1558 -0
- package/dist/chunk-7JE7BDYJ.js.map +1 -0
- package/dist/{chunk-KG7TZKZG.js → chunk-7VCXZDA4.js} +5 -5
- package/dist/chunk-7VCXZDA4.js.map +1 -0
- package/dist/{chunk-NQKIUNW5.js → chunk-A6IJU4TK.js} +2 -2
- package/dist/{chunk-BM5TWITZ.js → chunk-ANWPSTZU.js} +38 -9
- package/dist/chunk-ANWPSTZU.js.map +1 -0
- package/dist/{chunk-QIZPZMUI.js → chunk-AOWGXU6D.js} +2 -2
- package/dist/{chunk-CUZLNGD5.js → chunk-B2YY6WDD.js} +1 -1
- package/dist/chunk-B2YY6WDD.js.map +1 -0
- package/dist/{chunk-SFAWCTEM.js → chunk-B57AFBY2.js} +2 -2
- package/dist/{chunk-GPEQUXHL.js → chunk-B6SJIBQK.js} +4 -4
- package/dist/chunk-BJ2IXQ5Q.js +100 -0
- package/dist/chunk-BJ2IXQ5Q.js.map +1 -0
- package/dist/{chunk-Q2PU57HC.js → chunk-BK2HHQGN.js} +2 -2
- package/dist/chunk-BKT776R5.js +1 -0
- package/dist/{chunk-KUX3OB6D.js → chunk-BP6DARYA.js} +33 -5
- package/dist/chunk-BP6DARYA.js.map +1 -0
- package/dist/{chunk-FXBIP2WD.js → chunk-BUDAGWL5.js} +6 -6
- package/dist/chunk-CF5UU4S7.js +757 -0
- package/dist/chunk-CF5UU4S7.js.map +1 -0
- package/dist/{chunk-BOET4NA4.js → chunk-CKNGS5MH.js} +3 -3
- package/dist/chunk-CY2CYVWZ.js +41 -0
- package/dist/chunk-CY2CYVWZ.js.map +1 -0
- package/dist/{chunk-2577DKXB.js → chunk-DC5QVPV7.js} +2 -2
- package/dist/chunk-DC5QVPV7.js.map +1 -0
- package/dist/{chunk-YSRUYAVU.js → chunk-DE4DH2RZ.js} +2 -2
- package/dist/{chunk-6I2RQCET.js → chunk-DF73H4UN.js} +4 -4
- package/dist/{chunk-4GVM6QZA.js → chunk-ENAG3IY7.js} +2 -2
- package/dist/chunk-ENAG3IY7.js.map +1 -0
- package/dist/{chunk-K7NTTA6P.js → chunk-EOVMT6TB.js} +2 -2
- package/dist/chunk-F24ZZTHQ.js +193 -0
- package/dist/chunk-F24ZZTHQ.js.map +1 -0
- package/dist/chunk-F2TDU7MQ.js +456 -0
- package/dist/chunk-F2TDU7MQ.js.map +1 -0
- package/dist/chunk-F6NCB7KT.js +13 -0
- package/dist/chunk-F6NCB7KT.js.map +1 -0
- package/dist/{chunk-SPYWXKJN.js → chunk-F7XGHL5O.js} +3 -3
- package/dist/chunk-F7XGHL5O.js.map +1 -0
- package/dist/{chunk-XTXOCYOJ.js → chunk-FCKWQE2H.js} +5 -5
- package/dist/{chunk-U4FOQDY4.js → chunk-FH2L2E34.js} +4 -4
- package/dist/chunk-FH2L2E34.js.map +1 -0
- package/dist/{chunk-4OZNXTO4.js → chunk-FN5EBVTQ.js} +2 -2
- package/dist/chunk-FQ54DWUQ.js +270 -0
- package/dist/chunk-FQ54DWUQ.js.map +1 -0
- package/dist/{chunk-NKHRDYOR.js → chunk-FQ5VRHIB.js} +4 -4
- package/dist/{chunk-FAHMLERK.js → chunk-FW22ZCXT.js} +2 -2
- package/dist/chunk-FXQBGFOX.js +524 -0
- package/dist/chunk-FXQBGFOX.js.map +1 -0
- package/dist/{chunk-AO42KJO6.js → chunk-GF5BZ7D4.js} +45 -9
- package/dist/chunk-GF5BZ7D4.js.map +1 -0
- package/dist/{chunk-TRGTKX5E.js → chunk-GHLTDZRS.js} +5 -3
- package/dist/{chunk-TRGTKX5E.js.map → chunk-GHLTDZRS.js.map} +1 -1
- package/dist/{chunk-5WDXHNSW.js → chunk-HBPPGWUM.js} +5 -5
- package/dist/chunk-HBPPGWUM.js.map +1 -0
- package/dist/{chunk-KTFRCC5C.js → chunk-HBRLNOHL.js} +82 -8
- package/dist/chunk-HBRLNOHL.js.map +1 -0
- package/dist/chunk-HLEK5VAN.js +275 -0
- package/dist/chunk-HLEK5VAN.js.map +1 -0
- package/dist/{chunk-RMS3NEA3.js → chunk-HT2AHGQI.js} +2 -2
- package/dist/{chunk-CHJBLCOG.js → chunk-HVSCEIYL.js} +7 -7
- package/dist/{chunk-UXWB3FPF.js → chunk-I3JDRCMW.js} +150 -22
- package/dist/chunk-I3JDRCMW.js.map +1 -0
- package/dist/{chunk-GY4WYNNG.js → chunk-ID6Z6E66.js} +2 -2
- package/dist/{chunk-EYBQEIUY.js → chunk-IEX7NK2K.js} +3 -3
- package/dist/{chunk-KUJDV5QH.js → chunk-ISZQJBML.js} +5 -5
- package/dist/{chunk-LWBCUYZW.js → chunk-IT22PWKV.js} +2 -2
- package/dist/{chunk-EQEYOJBM.js → chunk-IUWCVHQ7.js} +3 -3
- package/dist/chunk-IUWCVHQ7.js.map +1 -0
- package/dist/{chunk-7V4TP3AF.js → chunk-J6UOHJY5.js} +4 -4
- package/dist/{chunk-JMGDHKQF.js → chunk-JCN44NCY.js} +2 -2
- package/dist/{chunk-CARABLSQ.js → chunk-K6W7BVZ6.js} +3 -3
- package/dist/{chunk-77K4PG6P.js → chunk-KJFW62P4.js} +29 -11
- package/dist/chunk-KJFW62P4.js.map +1 -0
- package/dist/{chunk-453F654R.js → chunk-L7DOS3TE.js} +2 -2
- package/dist/chunk-LGNDFRYC.js +23 -0
- package/dist/chunk-LGNDFRYC.js.map +1 -0
- package/dist/{chunk-WEQEYLCS.js → chunk-LGRLME4M.js} +7 -7
- package/dist/{chunk-RMF67KCG.js → chunk-LQ4ZHOKP.js} +2 -2
- package/dist/{chunk-ZVO4QVPD.js → chunk-M522UYZ2.js} +5 -5
- package/dist/{chunk-G56KBWFY.js → chunk-M7NI3IWE.js} +45 -12
- package/dist/chunk-M7NI3IWE.js.map +1 -0
- package/dist/chunk-MDWKM2XC.js +293 -0
- package/dist/chunk-MDWKM2XC.js.map +1 -0
- package/dist/chunk-MKXXMNJH.js +204 -0
- package/dist/chunk-MKXXMNJH.js.map +1 -0
- package/dist/{chunk-SKGMN35F.js → chunk-MLPHLJIQ.js} +3 -3
- package/dist/chunk-MLPHLJIQ.js.map +1 -0
- package/dist/{chunk-2N4GY74U.js → chunk-MTL7MXGR.js} +6 -6
- package/dist/{chunk-TFR7DSOV.js → chunk-MVZ2TPVP.js} +2 -2
- package/dist/{chunk-CPWQB3N5.js → chunk-N5DNADLQ.js} +7 -7
- package/dist/{chunk-ELNXJMGB.js → chunk-NNARWO72.js} +6 -6
- package/dist/{chunk-PT43Y56J.js → chunk-NRT6QZQB.js} +102 -16
- package/dist/chunk-NRT6QZQB.js.map +1 -0
- package/dist/{chunk-QIBVIOXO.js → chunk-NWHBJQAL.js} +99 -8
- package/dist/chunk-NWHBJQAL.js.map +1 -0
- package/dist/chunk-NYMLINRP.js +28 -0
- package/dist/chunk-NYMLINRP.js.map +1 -0
- package/dist/{chunk-7MG7SJT7.js → chunk-ODVPTDPK.js} +1 -1
- package/dist/chunk-ODVPTDPK.js.map +1 -0
- package/dist/chunk-ORDURZBU.js +461 -0
- package/dist/chunk-ORDURZBU.js.map +1 -0
- package/dist/{chunk-6YXCPL4T.js → chunk-PDCG6PR5.js} +2 -2
- package/dist/{chunk-REDOOY2Q.js → chunk-PSIV7CJV.js} +2 -2
- package/dist/{chunk-NA2NIJZI.js → chunk-QBBUZ3I3.js} +126 -19
- package/dist/chunk-QBBUZ3I3.js.map +1 -0
- package/dist/{chunk-5VCRVKOZ.js → chunk-QOOUUR4A.js} +6 -4
- package/dist/{chunk-5VCRVKOZ.js.map → chunk-QOOUUR4A.js.map} +1 -1
- package/dist/{chunk-ANATMFIO.js → chunk-QWFHIOD2.js} +5 -5
- package/dist/{chunk-X2DLENDQ.js → chunk-QWGU66MP.js} +3 -3
- package/dist/chunk-RHVMZSUU.js +7 -0
- package/dist/chunk-RHVMZSUU.js.map +1 -0
- package/dist/{chunk-BSFNRLK2.js → chunk-S57HTZ6X.js} +5 -5
- package/dist/{chunk-SZJ3DLZA.js → chunk-SEE332EV.js} +2 -2
- package/dist/{chunk-YYP7WSEB.js → chunk-SI3V7D4G.js} +2 -2
- package/dist/{chunk-UGTBXF5U.js → chunk-SOIQ4MM4.js} +3 -3
- package/dist/chunk-SUZKW6UR.js +25 -0
- package/dist/chunk-SUZKW6UR.js.map +1 -0
- package/dist/{chunk-VXGSWL6L.js → chunk-SYVZW77S.js} +6 -6
- package/dist/{chunk-6GOE5PGN.js → chunk-T2LBQ5DV.js} +883 -227
- package/dist/chunk-T2LBQ5DV.js.map +1 -0
- package/dist/chunk-T52GX4SA.js +215 -0
- package/dist/chunk-T52GX4SA.js.map +1 -0
- package/dist/{chunk-MVMXZYXT.js → chunk-TKUOEU2F.js} +2 -2
- package/dist/chunk-TOPYQ6GA.js +31 -0
- package/dist/chunk-TOPYQ6GA.js.map +1 -0
- package/dist/{chunk-SMH6SRX7.js → chunk-TROR3ALR.js} +2 -2
- package/dist/{chunk-2C3AQB46.js → chunk-UD5EVGZ7.js} +42 -389
- package/dist/chunk-UD5EVGZ7.js.map +1 -0
- package/dist/{chunk-KJIMGIWO.js → chunk-UPD5NWI5.js} +65 -17
- package/dist/chunk-UPD5NWI5.js.map +1 -0
- package/dist/{chunk-SL3JAAKN.js → chunk-UYB234ZR.js} +30 -2
- package/dist/chunk-UYB234ZR.js.map +1 -0
- package/dist/chunk-VHM7HCKB.js +220 -0
- package/dist/chunk-VHM7HCKB.js.map +1 -0
- package/dist/{chunk-DGOZ4UZD.js → chunk-VNNRUGMM.js} +2 -2
- package/dist/{chunk-HDOU6I2Y.js → chunk-VNPEWFPD.js} +4 -4
- package/dist/{chunk-L7CIOOBW.js → chunk-WNJ4AVGE.js} +2 -2
- package/dist/{chunk-FMZY5Q6L.js → chunk-WX5ADGTZ.js} +3 -3
- package/dist/{chunk-VXANTWBJ.js → chunk-WY2XXTET.js} +92 -6
- package/dist/{chunk-VXANTWBJ.js.map → chunk-WY2XXTET.js.map} +1 -1
- package/dist/{chunk-6X6SEMEE.js → chunk-X25NWUZB.js} +33 -8
- package/dist/chunk-X25NWUZB.js.map +1 -0
- package/dist/{chunk-Q7HZX3IF.js → chunk-X4773RBR.js} +2 -2
- package/dist/chunk-XBKH4FOC.js +195 -0
- package/dist/chunk-XBKH4FOC.js.map +1 -0
- package/dist/{chunk-ANSIZYEG.js → chunk-YNIUIERI.js} +3 -3
- package/dist/chunk-YSK2CU2Q.js +936 -0
- package/dist/chunk-YSK2CU2Q.js.map +1 -0
- package/dist/{chunk-UXVWEX5L.js → chunk-Z5HTYMMQ.js} +6 -2
- package/dist/chunk-Z5HTYMMQ.js.map +1 -0
- package/dist/{chunk-RRNRNANG.js → chunk-ZE4CHIED.js} +66 -75
- package/dist/chunk-ZE4CHIED.js.map +1 -0
- package/dist/chunk-ZSX4S5XB.js +1289 -0
- package/dist/chunk-ZSX4S5XB.js.map +1 -0
- package/dist/{chunk-BZ3534YM.js → chunk-ZUVBC32X.js} +2 -2
- package/dist/{chunk-L742JPKZ.js → chunk-ZXABPVM6.js} +6 -6
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-LI2SF2E4.js → classified-marker-W3USLL5M.js} +3 -3
- package/dist/collection-facade-QU6IJBN3.js +48 -0
- package/dist/{computed-VPOKQK4N.js → computed-TPFBX7U4.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover/index.js +10 -10
- package/dist/coverage/index.js +306 -0
- package/dist/coverage/index.js.map +1 -0
- package/dist/custody/index.js +12 -12
- package/dist/{dead-filter-TSWZQRR5.js → dead-filter-U2UYKSZL.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-OVIFFPG4.js → delegation-S3AEPW2T.js} +11 -11
- package/dist/derivations/index.js +25 -22
- package/dist/derive-OX7F6TGG.js +21 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-WC6X2M6C.js → dispatch-3CQDJV5Q.js} +5 -5
- package/dist/{dispatch-S73TK3IY.js → dispatch-RH4LHKBH.js} +21 -21
- package/dist/{enclave-KJOTOH7X.js → enclave-27SMF6GF.js} +15 -9
- package/dist/executor-B6SRO2QS.js +36 -0
- package/dist/executor-BI5CHWRY.js +8 -0
- package/dist/executor-RBKM5W5K.js +8 -0
- package/dist/export-accessible-VMA3YM5V.js +22 -0
- package/dist/extract-partition-NF7PXGPP.js +37 -0
- package/dist/{fanout-sidecar-WUFXNYP4.js → fanout-sidecar-OT6RYLOL.js} +9 -9
- package/dist/find-LZMP26KF.js +10 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +13 -13
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +29 -6
- package/dist/index.js +999 -191
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +13 -5
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +11 -11
- package/dist/issue-IHARXWW5.js +18 -0
- package/dist/ivf-flat-UZ6DQDLS.js +314 -0
- package/dist/ivf-flat-UZ6DQDLS.js.map +1 -0
- package/dist/{json-schema-V3M5MUCM.js → json-schema-3SHX72CC.js} +2 -1
- package/dist/json-schema-3SHX72CC.js.map +1 -0
- package/dist/kernel/collection-config.d.ts +4 -20
- package/dist/kernel/collection.d.ts +29 -8
- package/dist/kernel/enclave/crypto.d.ts +16 -0
- package/dist/kernel/enclave/index.d.ts +1 -1
- package/dist/kernel/enclave/record-keys/record-codec.d.ts +25 -0
- package/dist/kernel/errors.d.ts +227 -36
- package/dist/kernel/generation-map.d.ts +48 -0
- package/dist/kernel/memory-store.d.ts +35 -7
- package/dist/kernel/noydb.d.ts +6 -1
- package/dist/kernel/present-cache.d.ts +58 -0
- package/dist/kernel/query/all.d.ts +7 -0
- package/dist/kernel/query/builder.d.ts +601 -270
- package/dist/kernel/query/civil-date.d.ts +64 -0
- package/dist/kernel/query/cursor.d.ts +40 -0
- package/dist/kernel/query/distinct-key.d.ts +98 -0
- package/dist/kernel/query/hydration.d.ts +76 -0
- package/dist/kernel/query/index.d.ts +31 -15
- package/dist/kernel/query/internal/core.d.ts +30 -0
- package/dist/kernel/query/internal/hooks.d.ts +22 -0
- package/dist/kernel/query/internal/maintenance.d.ts +43 -0
- package/dist/kernel/query/live/incremental.d.ts +314 -0
- package/dist/kernel/query/live/index.d.ts +22 -0
- package/dist/kernel/query/live/install.d.ts +2 -0
- package/dist/kernel/query/{live.d.ts → live/live.d.ts} +39 -9
- package/dist/kernel/query/live/methods.d.ts +107 -0
- package/dist/kernel/query/predicate.d.ts +119 -1
- package/dist/kernel/query/reduce/date-trunc.d.ts +75 -0
- package/dist/kernel/query/reduce/index.d.ts +36 -0
- package/dist/kernel/query/reduce/install.d.ts +2 -0
- package/dist/kernel/query/reduce/methods.d.ts +259 -0
- package/dist/kernel/query/reduce/scan-methods.d.ts +121 -0
- package/dist/kernel/query/relate/explain.d.ts +199 -0
- package/dist/kernel/query/relate/index.d.ts +48 -0
- package/dist/kernel/query/relate/install.d.ts +2 -0
- package/dist/kernel/query/relate/join-on.d.ts +126 -0
- package/dist/kernel/query/relate/join-reduce.d.ts +16 -0
- package/dist/kernel/query/relate/join.d.ts +452 -0
- package/dist/kernel/query/relate/methods.d.ts +426 -0
- package/dist/kernel/query/relate/partition.d.ts +87 -0
- package/dist/kernel/query/relate/scan-methods.d.ts +163 -0
- package/dist/kernel/query/relate/traverse.d.ts +109 -0
- package/dist/kernel/query/scan-builder.d.ts +79 -176
- package/dist/kernel/query/sort-key.d.ts +52 -0
- package/dist/kernel/tx-write-gate.d.ts +77 -0
- package/dist/kernel/types.d.ts +71 -3
- package/dist/kernel/validation.d.ts +27 -10
- package/dist/kernel/vault.d.ts +9 -4
- package/dist/kernel/via/compose.d.ts +3 -0
- package/dist/kernel/via/index.d.ts +56 -0
- package/dist/kernel/via/pipeline.d.ts +48 -0
- package/dist/{ledger-F33ZVMTK.js → ledger-KZPCMVZY.js} +11 -11
- package/dist/liberate-GRLCZMW4.js +24 -0
- package/dist/link-set-JCMJ7ULP.js +30 -0
- package/dist/{managed-secret-PQYKSR6T.js → managed-secret-S3MQ6SH6.js} +10 -10
- package/dist/materialized-views/index.js +30 -23
- package/dist/{migrate-cek-5ENH64AA.js → migrate-cek-V7GKJZ7O.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-SWQJ3MZS.js +97 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +75 -68
- package/dist/{pod-handle-Q736KYON.js → pod-handle-WGDFB4C2.js} +9 -9
- package/dist/policy/index.js +10 -10
- package/dist/port/with/blob-strategy.d.ts +9 -0
- package/dist/port/with/collection-options.d.ts +5 -0
- package/dist/port/with/coverage-strategy.d.ts +83 -0
- package/dist/port/with/service-bus.d.ts +46 -0
- package/dist/port/with/strategies.d.ts +2 -0
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-LNE2FE2A.js → post-register-SLSXIPBV.js} +6 -6
- package/dist/query/all/index.js +31 -0
- package/dist/query/index.js +20 -32
- package/dist/query/live/index.js +21 -0
- package/dist/query/live/index.js.map +1 -0
- package/dist/query/reduce/index.js +33 -0
- package/dist/query/reduce/index.js.map +1 -0
- package/dist/query/relate/index.js +56 -0
- package/dist/query/relate/index.js.map +1 -0
- package/dist/reduce/index.js +72 -18
- package/dist/reduce/index.js.map +1 -1
- package/dist/register-F3OYE7MJ.js +31 -0
- package/dist/registry-CILQFXFK.js +8 -0
- package/dist/registry-XNNYQVKV.js +8 -0
- package/dist/registry-YCDZV3VW.js +35 -0
- package/dist/registry-ZGYS33TE.js +24 -0
- package/dist/request-withdrawal-Z5NC6TXT.js +30 -0
- package/dist/{reveal-67RDQRIN.js → reveal-4BCKPEC2.js} +6 -6
- package/dist/revoke-ZL62WC2D.js +23 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +11 -5
- package/dist/{seed-G42JYN56.js → seed-4JS2RJ4A.js} +12 -12
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MBZZMXTC.js +24 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-DDL7WQEZ.js → stale-TJ3DYZMQ.js} +10 -10
- package/dist/storage-SVMKRGCW.js +22 -0
- package/dist/{store-coordination-provider-MEQ2MJQG.js → store-coordination-provider-2O2VUHKW.js} +10 -10
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +17 -15
- package/dist/tiers/index.js +13 -11
- package/dist/to/index.js +2 -2
- package/dist/transactions/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/vault-head/index.js +8 -8
- package/dist/{verify-KOV2G5D6.js → verify-RVT67IMH.js} +5 -5
- package/dist/via/blob/index.d.ts +1 -0
- package/dist/via/geo/binding.d.ts +31 -0
- package/dist/via/geo/descriptor.d.ts +54 -0
- package/dist/via/geo/geohash.d.ts +95 -0
- package/dist/via/geo/index.d.ts +13 -0
- package/dist/via/geo/where.d.ts +50 -0
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/lookup/registry.d.ts +1 -1
- package/dist/via/lookup/snapshot.d.ts +3 -3
- package/dist/walk-HJ42EISE.js +21 -0
- package/dist/walk-HJ42EISE.js.map +1 -0
- package/dist/with-audit/coverage/accounting.d.ts +112 -0
- package/dist/with-audit/coverage/active.d.ts +29 -0
- package/dist/with-audit/coverage/index.d.ts +61 -0
- package/dist/with-audit/coverage/sketch.d.ts +75 -0
- package/dist/with-audit/periods/periods.d.ts +55 -7
- package/dist/with-audit/periods/reserved-collections.d.ts +3 -0
- package/dist/with-audit/periods/vault-facade.d.ts +17 -0
- package/dist/with-audit/tiers/index.d.ts +51 -0
- package/dist/with-audit/tiers/strategy.d.ts +8 -0
- package/dist/with-cargo/floor.d.ts +2 -2
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/transaction.d.ts +13 -3
- package/dist/with-formula/materialized-views/dependency-analyzer.d.ts +4 -3
- package/dist/with-formula/materialized-views/emit-memo.d.ts +40 -0
- package/dist/with-formula/materialized-views/executor.d.ts +8 -0
- package/dist/with-formula/materialized-views/index.d.ts +1 -1
- package/dist/with-formula/materialized-views/registry.d.ts +15 -0
- package/dist/with-formula/materialized-views/types.d.ts +106 -14
- package/dist/with-formula/materialized-views/window-stage.d.ts +11 -0
- package/dist/with-formula/overlay-views/types.d.ts +1 -1
- package/dist/with-formula/overlay-views/virtual-collection.d.ts +13 -4
- package/dist/with-lookup/embeddings/chunks.d.ts +79 -0
- package/dist/with-lookup/embeddings/descriptor.d.ts +21 -0
- package/dist/with-lookup/embeddings/index.d.ts +3 -0
- package/dist/with-lookup/embeddings/ivf-flat.d.ts +93 -0
- package/dist/with-lookup/embeddings/vector-index.d.ts +73 -0
- package/dist/with-lookup/embeddings/vector-set.d.ts +94 -1
- package/dist/with-lookup/embeddings/with-vector-index.d.ts +67 -0
- package/dist/with-lookup/indexing/collection-facade.d.ts +85 -2
- package/dist/with-lookup/indexing/compound-indexes.d.ts +129 -0
- package/dist/with-lookup/indexing/eager-indexes.d.ts +170 -1
- package/dist/with-lookup/indexing/index-snapshot.d.ts +62 -0
- package/dist/with-lookup/indexing/lazy-builder.d.ts +33 -0
- package/dist/with-lookup/indexing/persisted-field-indexes.d.ts +104 -0
- package/dist/with-lookup/indexing/persisted-indexes.d.ts +12 -0
- package/dist/with-lookup/indexing/sorted-indexes.d.ts +117 -0
- package/dist/with-lookup/indexing/unique-constraints.d.ts +106 -23
- package/dist/with-lookup/reduce/active.d.ts +2 -24
- package/dist/with-lookup/reduce/group-core.d.ts +43 -0
- package/dist/with-lookup/reduce/groupby.d.ts +195 -36
- package/dist/with-lookup/reduce/incremental-group.d.ts +153 -0
- package/dist/with-lookup/reduce/index.d.ts +26 -5
- package/dist/with-lookup/reduce/reducers.d.ts +255 -1
- package/dist/with-lookup/reduce/reduction.d.ts +44 -13
- package/dist/with-lookup/reduce/strategy.d.ts +43 -3
- package/dist/with-lookup/reduce/window.d.ts +262 -0
- package/dist/with-lookup/search/collection-facade.d.ts +44 -8
- package/dist/with-lookup/search/index-store.d.ts +5 -3
- package/dist/with-lookup/search/index.d.ts +4 -2
- package/dist/with-lookup/search/inverted-index.d.ts +38 -2
- package/dist/with-lookup/search/persisted-index-store.d.ts +5 -2
- package/dist/with-lookup/search/phrase.d.ts +28 -0
- package/dist/with-lookup/search/retrieve-types.d.ts +57 -1
- package/dist/with-lookup/search/serialize.d.ts +29 -3
- package/dist/with-lookup/search/strategy.d.ts +2 -6
- package/dist/with-party/directory/cover/index.d.ts +1 -1
- package/dist/with-party/directory/cover/storage.d.ts +1 -1
- package/dist/with-party/directory/cover/types.d.ts +1 -1
- package/dist/with-party/directory/index.d.ts +1 -1
- package/dist/with-party/directory/types.d.ts +1 -1
- package/dist/with-party/directory/user-envelope/api.d.ts +1 -1
- package/dist/with-party/policy/engine.d.ts +1 -1
- package/dist/with-party/policy/index.d.ts +1 -1
- package/dist/with-party/policy/presets.d.ts +1 -1
- package/dist/with-party/team/authenticators.d.ts +91 -1
- package/dist/with-party/team/index.d.ts +3 -2
- package/dist/with-party/team/keyring.d.ts +13 -6
- package/dist/with-party/team/managed-secret.d.ts +1 -1
- package/dist/with-party/team/noydb-facade.d.ts +12 -3
- package/dist/with-party/team/wrapped-deks.d.ts +4 -4
- package/dist/with-pod/format.d.ts +1 -1
- package/dist/with-pod/pod.d.ts +5 -5
- package/dist/with-shape/blobs/blob-compaction.d.ts +16 -0
- package/dist/with-shape/blobs/blob-set.d.ts +21 -2
- package/dist/with-shape/blobs/legacy-sweep.d.ts +35 -0
- package/dist/with-shape/introspection/describe.d.ts +6 -0
- package/dist/with-shape/introspection/field-meta.d.ts +18 -0
- package/dist/with-shape/introspection/types.d.ts +57 -1
- package/dist/with-shape/links/vault-facade.d.ts +1 -1
- package/dist/with-store/partitioned/index.d.ts +337 -0
- package/dist/with-sync/change-broadcast.d.ts +153 -0
- package/dist/withdraw-accessible-5NZUPAVA.js +27 -0
- package/dist/withdraw-accessible-5NZUPAVA.js.map +1 -0
- package/package.json +37 -10
- package/dist/api-TXFOVOXX.js +0 -19
- package/dist/backup-IJTB4S4M.js.map +0 -1
- package/dist/chunk-2577DKXB.js.map +0 -1
- package/dist/chunk-2C3AQB46.js.map +0 -1
- package/dist/chunk-4GVM6QZA.js.map +0 -1
- package/dist/chunk-5WDXHNSW.js.map +0 -1
- package/dist/chunk-6GOE5PGN.js.map +0 -1
- package/dist/chunk-6X6SEMEE.js.map +0 -1
- package/dist/chunk-77K4PG6P.js.map +0 -1
- package/dist/chunk-7MG2LHO5.js +0 -1616
- package/dist/chunk-7MG2LHO5.js.map +0 -1
- package/dist/chunk-7MG7SJT7.js.map +0 -1
- package/dist/chunk-7O3Y4PPD.js.map +0 -1
- package/dist/chunk-AO42KJO6.js.map +0 -1
- package/dist/chunk-ATL3ZVXT.js +0 -151
- package/dist/chunk-ATL3ZVXT.js.map +0 -1
- package/dist/chunk-BLN54W3L.js.map +0 -1
- package/dist/chunk-BM5TWITZ.js.map +0 -1
- package/dist/chunk-CUZLNGD5.js.map +0 -1
- package/dist/chunk-EQEYOJBM.js.map +0 -1
- package/dist/chunk-G56KBWFY.js.map +0 -1
- package/dist/chunk-I3ISCYT7.js +0 -159
- package/dist/chunk-I3ISCYT7.js.map +0 -1
- package/dist/chunk-KG7TZKZG.js.map +0 -1
- package/dist/chunk-KJIMGIWO.js.map +0 -1
- package/dist/chunk-KTFRCC5C.js.map +0 -1
- package/dist/chunk-KUX3OB6D.js.map +0 -1
- package/dist/chunk-MUM7IANK.js.map +0 -1
- package/dist/chunk-NA2NIJZI.js.map +0 -1
- package/dist/chunk-NSITFOCJ.js +0 -99
- package/dist/chunk-NSITFOCJ.js.map +0 -1
- package/dist/chunk-PT43Y56J.js.map +0 -1
- package/dist/chunk-QIBVIOXO.js.map +0 -1
- package/dist/chunk-RRNRNANG.js.map +0 -1
- package/dist/chunk-RTBJ5IOO.js +0 -87
- package/dist/chunk-RTBJ5IOO.js.map +0 -1
- package/dist/chunk-SKGMN35F.js.map +0 -1
- package/dist/chunk-SL3JAAKN.js.map +0 -1
- package/dist/chunk-SPXXX5E4.js.map +0 -1
- package/dist/chunk-SPYWXKJN.js.map +0 -1
- package/dist/chunk-U4FOQDY4.js.map +0 -1
- package/dist/chunk-UXVWEX5L.js.map +0 -1
- package/dist/chunk-UXWB3FPF.js.map +0 -1
- package/dist/chunk-YMUFFJCO.js.map +0 -1
- package/dist/chunk-ZN4FD4PE.js +0 -364
- package/dist/chunk-ZN4FD4PE.js.map +0 -1
- package/dist/chunk-ZORTV6NH.js.map +0 -1
- package/dist/collection-facade-4GRREZ6C.js +0 -45
- package/dist/derive-6O5SWQKN.js +0 -21
- package/dist/executor-5NIMLSKZ.js +0 -8
- package/dist/executor-AQVXV5GZ.js +0 -8
- package/dist/executor-PUAO6AKJ.js +0 -29
- package/dist/export-accessible-72EQNBMR.js +0 -22
- package/dist/extract-partition-PUYNU3UF.js +0 -37
- package/dist/find-2ABFCZX4.js +0 -10
- package/dist/issue-SIDORTSZ.js +0 -18
- package/dist/json-schema-V3M5MUCM.js.map +0 -1
- package/dist/kernel/query/join.d.ts +0 -232
- package/dist/liberate-LCDPNAG2.js +0 -24
- package/dist/link-set-FKNWAYKS.js +0 -30
- package/dist/noydb-DUXZPKSN.js +0 -90
- package/dist/register-I2DZXGAR.js +0 -31
- package/dist/registry-23WF3TGH.js +0 -8
- package/dist/registry-4AYVUNXK.js +0 -8
- package/dist/registry-VSSQPIGF.js +0 -18
- package/dist/registry-YLEWMGAC.js +0 -32
- package/dist/request-withdrawal-KFQHEZ25.js +0 -30
- package/dist/revoke-DQDZAZZM.js +0 -23
- package/dist/signer-WAMDZHEN.js +0 -24
- package/dist/storage-FLR73HHF.js +0 -22
- package/dist/walk-3UQBRMDV.js +0 -21
- package/dist/withdraw-accessible-EL5GXZBS.js +0 -27
- /package/dist/{api-TXFOVOXX.js.map → api-GVYEKSJE.js.map} +0 -0
- /package/dist/{chunk-BUE2D7PX.js.map → chunk-32YV3TJT.js.map} +0 -0
- /package/dist/{chunk-3RCJJBNR.js.map → chunk-3ELRMVJK.js.map} +0 -0
- /package/dist/{chunk-6GMZ7HEE.js.map → chunk-3F7GLNAE.js.map} +0 -0
- /package/dist/{chunk-2Y4IMKA6.js.map → chunk-3H5KLDZN.js.map} +0 -0
- /package/dist/{chunk-VTFVLCUH.js.map → chunk-3JWHAR6E.js.map} +0 -0
- /package/dist/{chunk-JBDFMYKQ.js.map → chunk-4AF3TUMP.js.map} +0 -0
- /package/dist/{chunk-J6FXAEUG.js.map → chunk-6B3VNR4P.js.map} +0 -0
- /package/dist/{chunk-TUFM4UZP.js.map → chunk-6K7DPM7D.js.map} +0 -0
- /package/dist/{chunk-K6LHRFBL.js.map → chunk-6LMQ5R26.js.map} +0 -0
- /package/dist/{chunk-XLMEZIAJ.js.map → chunk-6OWXYZK2.js.map} +0 -0
- /package/dist/{chunk-BOWNCWZT.js.map → chunk-6QSQQLSE.js.map} +0 -0
- /package/dist/{chunk-NQKIUNW5.js.map → chunk-A6IJU4TK.js.map} +0 -0
- /package/dist/{chunk-QIZPZMUI.js.map → chunk-AOWGXU6D.js.map} +0 -0
- /package/dist/{chunk-SFAWCTEM.js.map → chunk-B57AFBY2.js.map} +0 -0
- /package/dist/{chunk-GPEQUXHL.js.map → chunk-B6SJIBQK.js.map} +0 -0
- /package/dist/{chunk-Q2PU57HC.js.map → chunk-BK2HHQGN.js.map} +0 -0
- /package/dist/{collection-facade-4GRREZ6C.js.map → chunk-BKT776R5.js.map} +0 -0
- /package/dist/{chunk-FXBIP2WD.js.map → chunk-BUDAGWL5.js.map} +0 -0
- /package/dist/{chunk-BOET4NA4.js.map → chunk-CKNGS5MH.js.map} +0 -0
- /package/dist/{chunk-YSRUYAVU.js.map → chunk-DE4DH2RZ.js.map} +0 -0
- /package/dist/{chunk-6I2RQCET.js.map → chunk-DF73H4UN.js.map} +0 -0
- /package/dist/{chunk-K7NTTA6P.js.map → chunk-EOVMT6TB.js.map} +0 -0
- /package/dist/{chunk-XTXOCYOJ.js.map → chunk-FCKWQE2H.js.map} +0 -0
- /package/dist/{chunk-4OZNXTO4.js.map → chunk-FN5EBVTQ.js.map} +0 -0
- /package/dist/{chunk-NKHRDYOR.js.map → chunk-FQ5VRHIB.js.map} +0 -0
- /package/dist/{chunk-FAHMLERK.js.map → chunk-FW22ZCXT.js.map} +0 -0
- /package/dist/{chunk-RMS3NEA3.js.map → chunk-HT2AHGQI.js.map} +0 -0
- /package/dist/{chunk-CHJBLCOG.js.map → chunk-HVSCEIYL.js.map} +0 -0
- /package/dist/{chunk-GY4WYNNG.js.map → chunk-ID6Z6E66.js.map} +0 -0
- /package/dist/{chunk-EYBQEIUY.js.map → chunk-IEX7NK2K.js.map} +0 -0
- /package/dist/{chunk-KUJDV5QH.js.map → chunk-ISZQJBML.js.map} +0 -0
- /package/dist/{chunk-LWBCUYZW.js.map → chunk-IT22PWKV.js.map} +0 -0
- /package/dist/{chunk-7V4TP3AF.js.map → chunk-J6UOHJY5.js.map} +0 -0
- /package/dist/{chunk-JMGDHKQF.js.map → chunk-JCN44NCY.js.map} +0 -0
- /package/dist/{chunk-CARABLSQ.js.map → chunk-K6W7BVZ6.js.map} +0 -0
- /package/dist/{chunk-453F654R.js.map → chunk-L7DOS3TE.js.map} +0 -0
- /package/dist/{chunk-WEQEYLCS.js.map → chunk-LGRLME4M.js.map} +0 -0
- /package/dist/{chunk-RMF67KCG.js.map → chunk-LQ4ZHOKP.js.map} +0 -0
- /package/dist/{chunk-ZVO4QVPD.js.map → chunk-M522UYZ2.js.map} +0 -0
- /package/dist/{chunk-2N4GY74U.js.map → chunk-MTL7MXGR.js.map} +0 -0
- /package/dist/{chunk-TFR7DSOV.js.map → chunk-MVZ2TPVP.js.map} +0 -0
- /package/dist/{chunk-CPWQB3N5.js.map → chunk-N5DNADLQ.js.map} +0 -0
- /package/dist/{chunk-ELNXJMGB.js.map → chunk-NNARWO72.js.map} +0 -0
- /package/dist/{chunk-6YXCPL4T.js.map → chunk-PDCG6PR5.js.map} +0 -0
- /package/dist/{chunk-REDOOY2Q.js.map → chunk-PSIV7CJV.js.map} +0 -0
- /package/dist/{chunk-ANATMFIO.js.map → chunk-QWFHIOD2.js.map} +0 -0
- /package/dist/{chunk-X2DLENDQ.js.map → chunk-QWGU66MP.js.map} +0 -0
- /package/dist/{chunk-BSFNRLK2.js.map → chunk-S57HTZ6X.js.map} +0 -0
- /package/dist/{chunk-SZJ3DLZA.js.map → chunk-SEE332EV.js.map} +0 -0
- /package/dist/{chunk-YYP7WSEB.js.map → chunk-SI3V7D4G.js.map} +0 -0
- /package/dist/{chunk-UGTBXF5U.js.map → chunk-SOIQ4MM4.js.map} +0 -0
- /package/dist/{chunk-VXGSWL6L.js.map → chunk-SYVZW77S.js.map} +0 -0
- /package/dist/{chunk-MVMXZYXT.js.map → chunk-TKUOEU2F.js.map} +0 -0
- /package/dist/{chunk-SMH6SRX7.js.map → chunk-TROR3ALR.js.map} +0 -0
- /package/dist/{chunk-DGOZ4UZD.js.map → chunk-VNNRUGMM.js.map} +0 -0
- /package/dist/{chunk-HDOU6I2Y.js.map → chunk-VNPEWFPD.js.map} +0 -0
- /package/dist/{chunk-L7CIOOBW.js.map → chunk-WNJ4AVGE.js.map} +0 -0
- /package/dist/{chunk-FMZY5Q6L.js.map → chunk-WX5ADGTZ.js.map} +0 -0
- /package/dist/{chunk-Q7HZX3IF.js.map → chunk-X4773RBR.js.map} +0 -0
- /package/dist/{chunk-ANSIZYEG.js.map → chunk-YNIUIERI.js.map} +0 -0
- /package/dist/{chunk-BZ3534YM.js.map → chunk-ZUVBC32X.js.map} +0 -0
- /package/dist/{chunk-L742JPKZ.js.map → chunk-ZXABPVM6.js.map} +0 -0
- /package/dist/{classified-marker-LI2SF2E4.js.map → classified-marker-W3USLL5M.js.map} +0 -0
- /package/dist/{computed-VPOKQK4N.js.map → collection-facade-QU6IJBN3.js.map} +0 -0
- /package/dist/{derive-6O5SWQKN.js.map → computed-TPFBX7U4.js.map} +0 -0
- /package/dist/{dead-filter-TSWZQRR5.js.map → dead-filter-U2UYKSZL.js.map} +0 -0
- /package/dist/{delegation-OVIFFPG4.js.map → delegation-S3AEPW2T.js.map} +0 -0
- /package/dist/{enclave-KJOTOH7X.js.map → derive-OX7F6TGG.js.map} +0 -0
- /package/dist/{dispatch-WC6X2M6C.js.map → dispatch-3CQDJV5Q.js.map} +0 -0
- /package/dist/{dispatch-S73TK3IY.js.map → dispatch-RH4LHKBH.js.map} +0 -0
- /package/dist/{executor-5NIMLSKZ.js.map → enclave-27SMF6GF.js.map} +0 -0
- /package/dist/{executor-AQVXV5GZ.js.map → executor-B6SRO2QS.js.map} +0 -0
- /package/dist/{executor-PUAO6AKJ.js.map → executor-BI5CHWRY.js.map} +0 -0
- /package/dist/{export-accessible-72EQNBMR.js.map → executor-RBKM5W5K.js.map} +0 -0
- /package/dist/{extract-partition-PUYNU3UF.js.map → export-accessible-VMA3YM5V.js.map} +0 -0
- /package/dist/{find-2ABFCZX4.js.map → extract-partition-NF7PXGPP.js.map} +0 -0
- /package/dist/{fanout-sidecar-WUFXNYP4.js.map → fanout-sidecar-OT6RYLOL.js.map} +0 -0
- /package/dist/{issue-SIDORTSZ.js.map → find-LZMP26KF.js.map} +0 -0
- /package/dist/{ledger-F33ZVMTK.js.map → issue-IHARXWW5.js.map} +0 -0
- /package/dist/{liberate-LCDPNAG2.js.map → ledger-KZPCMVZY.js.map} +0 -0
- /package/dist/{link-set-FKNWAYKS.js.map → liberate-GRLCZMW4.js.map} +0 -0
- /package/dist/{managed-secret-PQYKSR6T.js.map → link-set-JCMJ7ULP.js.map} +0 -0
- /package/dist/{noydb-DUXZPKSN.js.map → managed-secret-S3MQ6SH6.js.map} +0 -0
- /package/dist/{migrate-cek-5ENH64AA.js.map → migrate-cek-V7GKJZ7O.js.map} +0 -0
- /package/dist/{register-I2DZXGAR.js.map → noydb-SWQJ3MZS.js.map} +0 -0
- /package/dist/{pod-handle-Q736KYON.js.map → pod-handle-WGDFB4C2.js.map} +0 -0
- /package/dist/{post-register-LNE2FE2A.js.map → post-register-SLSXIPBV.js.map} +0 -0
- /package/dist/{registry-23WF3TGH.js.map → query/all/index.js.map} +0 -0
- /package/dist/{registry-4AYVUNXK.js.map → register-F3OYE7MJ.js.map} +0 -0
- /package/dist/{registry-VSSQPIGF.js.map → registry-CILQFXFK.js.map} +0 -0
- /package/dist/{registry-YLEWMGAC.js.map → registry-XNNYQVKV.js.map} +0 -0
- /package/dist/{request-withdrawal-KFQHEZ25.js.map → registry-YCDZV3VW.js.map} +0 -0
- /package/dist/{revoke-DQDZAZZM.js.map → registry-ZGYS33TE.js.map} +0 -0
- /package/dist/{signer-WAMDZHEN.js.map → request-withdrawal-Z5NC6TXT.js.map} +0 -0
- /package/dist/{reveal-67RDQRIN.js.map → reveal-4BCKPEC2.js.map} +0 -0
- /package/dist/{stale-DDL7WQEZ.js.map → revoke-ZL62WC2D.js.map} +0 -0
- /package/dist/{seed-G42JYN56.js.map → seed-4JS2RJ4A.js.map} +0 -0
- /package/dist/{storage-FLR73HHF.js.map → signer-MBZZMXTC.js.map} +0 -0
- /package/dist/{walk-3UQBRMDV.js.map → stale-TJ3DYZMQ.js.map} +0 -0
- /package/dist/{withdraw-accessible-EL5GXZBS.js.map → storage-SVMKRGCW.js.map} +0 -0
- /package/dist/{store-coordination-provider-MEQ2MJQG.js.map → store-coordination-provider-2O2VUHKW.js.map} +0 -0
- /package/dist/{verify-KOV2G5D6.js.map → verify-RVT67IMH.js.map} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query DSL `.traverse()` — bounded breadth-first walk over ONE declared,
|
|
3
|
+
* self-referencing `ref()` field (#1352).
|
|
4
|
+
*
|
|
5
|
+
* Org charts, bills of materials, account hierarchies, parent/child clients:
|
|
6
|
+
* every one of them is a collection whose records point at other records in
|
|
7
|
+
* the SAME collection, and every one of them otherwise needs the consumer to
|
|
8
|
+
* hand-roll recursion in userland.
|
|
9
|
+
*
|
|
10
|
+
* Scope — and the scope is the design, not a limitation to be lifted later:
|
|
11
|
+
*
|
|
12
|
+
* - **Declared refs only.** The field must carry a `ref()` whose target is
|
|
13
|
+
* the collection being queried. This is not a general graph engine; an
|
|
14
|
+
* undeclared field, or a ref pointing at a different collection, is
|
|
15
|
+
* refused at plan time with an actionable error.
|
|
16
|
+
* - **`direction: 'up'`** follows the FK — one `lookupById` per hop, O(1).
|
|
17
|
+
* **`direction: 'down'`** answers "who points at me", which no forward
|
|
18
|
+
* index can serve, so it builds the reverse-FK index #1289 introduced
|
|
19
|
+
* (`bucketByRefKey` in `join.ts`) ONCE per call and probes it per node.
|
|
20
|
+
* - **`maxDepth` is required.** Not defaulted. An unbounded walk over a
|
|
21
|
+
* large collection is a denial of service against the consumer's own UI,
|
|
22
|
+
* and a silent default would truncate a result set without saying so —
|
|
23
|
+
* the caller must state the bound they can afford.
|
|
24
|
+
* - **A node is emitted once**, at the shallowest depth it is reached at.
|
|
25
|
+
* That settles the diamond (two seeds converging on one ancestor → one
|
|
26
|
+
* row) and it is the same set that makes cycles terminate.
|
|
27
|
+
*
|
|
28
|
+
* **Cost.** Nothing here decrypts. `collection.query()` is eager-mode only
|
|
29
|
+
* and reads the vault's already-decrypted in-memory cache, so the AES-GCM
|
|
30
|
+
* cost was paid once at `openVault()` prefetch: a depth-5 traversal is
|
|
31
|
+
* `depth × frontier` Map lookups and zero `crypto.subtle` calls. The one
|
|
32
|
+
* non-constant cost is `down`'s single O(n) pass to build the reverse index.
|
|
33
|
+
* The architectural invariant is untouched — no filter, sort or hop is
|
|
34
|
+
* pushed to the store, which holds ciphertext and never runs a query.
|
|
35
|
+
*/
|
|
36
|
+
/** Which way a traversal walks the declared self-ref. */
|
|
37
|
+
export type TraverseDirection = 'up' | 'down';
|
|
38
|
+
/**
|
|
39
|
+
* What a traversal does when it reaches a node already on the current path.
|
|
40
|
+
*
|
|
41
|
+
* `'stop'` (the default) prunes that branch and finishes the walk — a
|
|
42
|
+
* circular parent chain produces a finite result instead of hanging.
|
|
43
|
+
* `'throw'` raises {@link TraversalCycleError}, for hierarchies that are
|
|
44
|
+
* supposed to be acyclic and where a cycle is a finding, not a shape.
|
|
45
|
+
*/
|
|
46
|
+
export type CyclePolicy = 'stop' | 'throw';
|
|
47
|
+
/** Options for {@link runTraversal}. `maxDepth` is deliberately required. */
|
|
48
|
+
export interface TraverseOptions {
|
|
49
|
+
readonly direction: TraverseDirection;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of hops from a seed. `0` returns the seeds alone. Must be
|
|
52
|
+
* a non-negative integer — there is no default, on purpose.
|
|
53
|
+
*/
|
|
54
|
+
readonly maxDepth: number;
|
|
55
|
+
/** Cycle behaviour. Defaults to `'stop'`. */
|
|
56
|
+
readonly onCycle?: CyclePolicy;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* One row of a traversal result.
|
|
60
|
+
*
|
|
61
|
+
* Deliberately NOT flattened into the record. Stamping `depth` / `path` onto
|
|
62
|
+
* the record would collide with a real field on exactly the collections this
|
|
63
|
+
* feature exists for — an org chart with its own `depth` column is not a
|
|
64
|
+
* hypothetical — and the loser of that collision would be silent.
|
|
65
|
+
*
|
|
66
|
+
* `path` is the ids from the seed to this node, BOTH INCLUSIVE, so
|
|
67
|
+
* `path.length === depth + 1` and `path.at(-1) === id` always. A seed has
|
|
68
|
+
* `depth: 0` and `path: [id]`.
|
|
69
|
+
*/
|
|
70
|
+
export interface TraversalRow<T> {
|
|
71
|
+
/** This node's record id. */
|
|
72
|
+
readonly id: string;
|
|
73
|
+
/** The record itself, decoded exactly as `toArray()` would decode it. */
|
|
74
|
+
readonly record: T;
|
|
75
|
+
/** Hops from the seed. `0` for a seed. */
|
|
76
|
+
readonly depth: number;
|
|
77
|
+
/** Seed-to-node ids, inclusive at both ends. */
|
|
78
|
+
readonly path: readonly string[];
|
|
79
|
+
}
|
|
80
|
+
/** The slice of a query source a traversal needs. */
|
|
81
|
+
export interface TraverseSource {
|
|
82
|
+
snapshot(): readonly unknown[];
|
|
83
|
+
lookupById?(id: string): unknown;
|
|
84
|
+
snapshotEntries?(): readonly {
|
|
85
|
+
readonly id: string;
|
|
86
|
+
readonly record: unknown;
|
|
87
|
+
}[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Bounded BFS from `seeds`.
|
|
91
|
+
*
|
|
92
|
+
* `seeds` are ids, not records — a seed that names no existing record is
|
|
93
|
+
* skipped, not thrown on, for the same reason a dangling ref terminates a
|
|
94
|
+
* branch quietly: a traversal reports the graph it found, and a missing node
|
|
95
|
+
* is an absence, not a failure of the walk.
|
|
96
|
+
*
|
|
97
|
+
* The two guards are separate on purpose:
|
|
98
|
+
*
|
|
99
|
+
* - `path.includes(next)` is a CYCLE — the walk would re-enter a node it is
|
|
100
|
+
* standing on. Checked first, so `onCycle: 'throw'` reports a genuine
|
|
101
|
+
* ring rather than the next case.
|
|
102
|
+
* - `emitted.has(next)` is a DIAMOND — the node was already reached by
|
|
103
|
+
* another branch, at a depth no greater than this one (BFS), so re-
|
|
104
|
+
* emitting it would duplicate the row and re-walk its whole subtree.
|
|
105
|
+
*
|
|
106
|
+
* Collapsing them into one visited-set would make a diamond indistinguishable
|
|
107
|
+
* from a cycle, which is precisely the distinction `onCycle` sells.
|
|
108
|
+
*/
|
|
109
|
+
export declare function runTraversal(source: TraverseSource, field: string, seeds: readonly string[], opts: TraverseOptions): TraversalRow<unknown>[];
|
|
@@ -43,26 +43,33 @@
|
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
45
|
* Note that each aggregation pays a full scan — there's no shared
|
|
46
|
-
* iteration across the two.
|
|
47
|
-
*
|
|
48
|
-
*
|
|
46
|
+
* iteration across the two. When the specs are known together, pass
|
|
47
|
+
* them as an ARRAY (#1340): `.aggregate([specA, specB])` steps every
|
|
48
|
+
* spec's state from the same yielded record, so N specs cost one
|
|
49
|
+
* pass, not N.
|
|
49
50
|
*
|
|
50
51
|
* **Out of scope for (tracked separately):**
|
|
51
52
|
* - `scan().aggregate().live()` — unbounded scan + change-stream
|
|
52
|
-
* reconciliation is a design problem, not just a code one
|
|
53
|
-
*
|
|
54
|
-
* huge collections would re-introduce the O(groups) memory
|
|
55
|
-
* problem that aggregate fixes
|
|
53
|
+
* reconciliation is a design problem, not just a code one, and
|
|
54
|
+
* #1340 deliberately left it out
|
|
56
55
|
* - Parallel scan across pages — race-safe page cursor contracts
|
|
57
56
|
* are not in the adapter API yet
|
|
58
57
|
* - `scan().join(...)` — tracked under (streaming join)
|
|
59
58
|
*/
|
|
60
59
|
import type { QueryField } from '../types.js';
|
|
61
|
-
import type { ReducerBuilder } from '../../with-lookup/reduce/reducers.js';
|
|
62
60
|
import type { Clause, Operator } from './predicate.js';
|
|
63
61
|
import type { ReduceSpec, ReduceResult } from '../../with-lookup/reduce/reduction.js';
|
|
64
|
-
import type { JoinContext, JoinLeg } from './join.js';
|
|
62
|
+
import type { JoinContext, JoinLeg } from './relate/join.js';
|
|
63
|
+
import type { ScanJoinResolver } from './relate/scan-methods.js';
|
|
65
64
|
import type { ViaPipeline } from '../via/pipeline.js';
|
|
65
|
+
/**
|
|
66
|
+
* Result of the multi-spec `.aggregate([specA, specB, …])` form (#1340) — a
|
|
67
|
+
* tuple positionally matching the specs, each element the shape that spec's
|
|
68
|
+
* own single-spec `.aggregate()` would have returned.
|
|
69
|
+
*/
|
|
70
|
+
export type MultiReduceResult<Specs extends readonly ReduceSpec[]> = {
|
|
71
|
+
-readonly [K in keyof Specs]: ReduceResult<Specs[K]>;
|
|
72
|
+
};
|
|
66
73
|
/**
|
|
67
74
|
* Page provider — the Collection-shaped hook the builder calls to
|
|
68
75
|
* walk cursors forward. Kept as a structural interface so tests can
|
|
@@ -122,6 +129,8 @@ export declare class ScanBuilder<T, S extends keyof T = never, M extends keyof T
|
|
|
122
129
|
* the scan stream carries no locale context, mirroring `Query.toArray()`.
|
|
123
130
|
*/
|
|
124
131
|
private readonly via;
|
|
132
|
+
protected buildJoinResolvers: () => ScanJoinResolver[];
|
|
133
|
+
protected applyOneJoinStreaming: (record: unknown, resolver: ScanJoinResolver) => unknown;
|
|
125
134
|
constructor(pageProvider: ScanPageProvider<T>, pageSize?: number, clauses?: readonly Clause[], joins?: readonly JoinLeg[], joinContext?: JoinContext, via?: ViaPipeline);
|
|
126
135
|
/**
|
|
127
136
|
* Decode this scan's Via-covered fields on a record (e.g. money: stored
|
|
@@ -155,174 +164,7 @@ export declare class ScanBuilder<T, S extends keyof T = never, M extends keyof T
|
|
|
155
164
|
* possible.
|
|
156
165
|
*/
|
|
157
166
|
filter(fn: (record: T) => boolean): ScanBuilder<T, S, M>;
|
|
158
|
-
/**
|
|
159
|
-
* Resolve a `ref()`-declared foreign key per record as the scan
|
|
160
|
-
* stream flows, attaching the right-side record (or null) under
|
|
161
|
-
* `opts.as`. — streaming joins over `scan()`.
|
|
162
|
-
*
|
|
163
|
-
* ```ts
|
|
164
|
-
* for await (const inv of invoices.scan().join('clientId', { as: 'client' })) {
|
|
165
|
-
* await processInvoice(inv) // inv.client is attached
|
|
166
|
-
* }
|
|
167
|
-
*
|
|
168
|
-
* // Or terminate with .aggregate() for streaming joined aggregation
|
|
169
|
-
* const { total } = await invoices.scan()
|
|
170
|
-
* .where('status', '==', 'open')
|
|
171
|
-
* .join('clientId', { as: 'client' })
|
|
172
|
-
* .aggregate({ total: sum('amount') })
|
|
173
|
-
* ```
|
|
174
|
-
*
|
|
175
|
-
* **The key difference from eager `.join()`:** the LEFT
|
|
176
|
-
* side streams page-by-page from the adapter and is never
|
|
177
|
-
* materialized. Memory ceiling on the left is O(pageSize), not
|
|
178
|
-
* O(rowCount). This is what makes streaming joins suitable for
|
|
179
|
-
* collections that exceed the eager join's 50_000-row ceiling.
|
|
180
|
-
*
|
|
181
|
-
* **Right-side strategy** is auto-selected per leg:
|
|
182
|
-
* - **Indexed** — right source exposes `lookupById`, so each
|
|
183
|
-
* left row costs O(1). This is the common path for
|
|
184
|
-
* Collection right sides, which back `lookupById` with a Map
|
|
185
|
-
* lookup over the in-memory cache. The right collection must
|
|
186
|
-
* be in eager mode (the same constraint as eager join's
|
|
187
|
-
* `querySourceForJoin` from ).
|
|
188
|
-
* - **Hash** — right source has only `snapshot()`. Build a
|
|
189
|
-
* `Map<id, record>` once at iteration start, probe per left
|
|
190
|
-
* row. Same correctness, same per-row cost as the indexed
|
|
191
|
-
* path; the difference is the upfront cost of materializing
|
|
192
|
-
* the right side once.
|
|
193
|
-
*
|
|
194
|
-
* Both strategies hold the right side in memory for the duration
|
|
195
|
-
* of the iteration. The "streaming" property applies to the LEFT
|
|
196
|
-
* side only — true left-and-right streaming joins (where neither
|
|
197
|
-
* side fits in memory) require a sort-merge join planner that's
|
|
198
|
-
* out of scope for.
|
|
199
|
-
*
|
|
200
|
-
* **Ref-mode semantics** match eager `.join()` exactly:
|
|
201
|
-
* - `strict` → throws `DanglingReferenceError` mid-stream
|
|
202
|
-
* when a left record points at a non-existent right id.
|
|
203
|
-
* The throw aborts the async iterator — consumers should
|
|
204
|
-
* wrap the `for await` in try/catch if they want to recover.
|
|
205
|
-
* - `warn` → attaches `null` and emits a one-shot warning
|
|
206
|
-
* per unique dangling pair (deduped via the same warn
|
|
207
|
-
* channel as eager join).
|
|
208
|
-
* - `cascade` → attaches `null` silently. A delete-time mode;
|
|
209
|
-
* dangling refs at read time are mid-flight or pre-existing
|
|
210
|
-
* orphans, not a DSL error.
|
|
211
|
-
*
|
|
212
|
-
* Left records with null/undefined FK values attach `null`
|
|
213
|
-
* regardless of mode — same "no reference at all" policy as
|
|
214
|
-
* eager join and write-time `enforceRefsOnPut`.
|
|
215
|
-
*
|
|
216
|
-
* **Multi-FK chaining** is supported via repeated `.join()`
|
|
217
|
-
* calls: each leg resolves an independent ref. Each leg
|
|
218
|
-
* independently picks its right-side strategy and applies its
|
|
219
|
-
* own ref mode.
|
|
220
|
-
*
|
|
221
|
-
* **Joins are NOT applied** to a `.aggregate()` terminal that
|
|
222
|
-
* doesn't reference joined fields — wait, that's not quite
|
|
223
|
-
* right. The streaming path actually DOES apply joins before
|
|
224
|
-
* `.aggregate()` because the join attaches a field that the
|
|
225
|
-
* spec might reference. Unlike `Query.aggregate()` (which skips
|
|
226
|
-
* joins entirely as a projection-only short-circuit), the
|
|
227
|
-
* streaming aggregation can't know whether the spec touches a
|
|
228
|
-
* joined field, so it always applies joins. Consumers who want
|
|
229
|
-
* unjoined streaming aggregation should leave `.join()` off the
|
|
230
|
-
* chain — the chain is composable for a reason.
|
|
231
|
-
*
|
|
232
|
-
* constraint #1 — every JoinLeg carries `partitionScope:
|
|
233
|
-
* 'all'` plumbed through but never read by. Same seam as
|
|
234
|
-
* eager join.
|
|
235
|
-
*/
|
|
236
|
-
join<As extends string, R = unknown>(field: QueryField<T, S>, opts: {
|
|
237
|
-
as: As;
|
|
238
|
-
}): ScanBuilder<T & Record<As, R | null>, S, M>;
|
|
239
|
-
/**
|
|
240
|
-
* Iterate the scan as an async iterable. Walks the page
|
|
241
|
-
* provider's cursors forward until exhaustion, applying every
|
|
242
|
-
* clause per record — only matching records are yielded.
|
|
243
|
-
*
|
|
244
|
-
* Backward-compatible with the previous async-generator `scan()`
|
|
245
|
-
* return type for `for await … of` consumers.
|
|
246
|
-
*/
|
|
247
167
|
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
248
|
-
/**
|
|
249
|
-
* Per-leg right-side resolution state. Built once at iteration
|
|
250
|
-
* start and reused for every left record. Two strategies:
|
|
251
|
-
*
|
|
252
|
-
* - `lookupById`: present when the right source exposes the
|
|
253
|
-
* hook directly (typical Collection right side). Per-row
|
|
254
|
-
* cost is O(1).
|
|
255
|
-
* - `hashByPrimaryKey`: built from `snapshot()` when no
|
|
256
|
-
* lookupById. Per-row cost is O(1) after the upfront O(N)
|
|
257
|
-
* materialization. Same as eager join's hash strategy.
|
|
258
|
-
*
|
|
259
|
-
* `warnedKeys` is the per-leg dedup set for ref-mode 'warn'. We
|
|
260
|
-
* key on `field→target:refId` so the same dangling pair only
|
|
261
|
-
* warns once per iteration. The dedup is per-iteration, not
|
|
262
|
-
* per-process — a long-running scan that re-iterates would warn
|
|
263
|
-
* again, which is the desired behavior (the data may have
|
|
264
|
-
* changed between iterations).
|
|
265
|
-
*/
|
|
266
|
-
private buildJoinResolvers;
|
|
267
|
-
/**
|
|
268
|
-
* Resolve a single join leg for one left record and return the
|
|
269
|
-
* left record with the joined field attached under
|
|
270
|
-
* `leg.as`. Pure function over `(left, resolver)`; never
|
|
271
|
-
* mutates the input.
|
|
272
|
-
*
|
|
273
|
-
* Ref-mode dispatch matches eager `applyJoins` from :
|
|
274
|
-
* - null/undefined FK → attach null silently (always allowed)
|
|
275
|
-
* - dangling FK + strict → throw `DanglingReferenceError`
|
|
276
|
-
* - dangling FK + warn → attach null, warn-once per pair
|
|
277
|
-
* - dangling FK + cascade → attach null silently
|
|
278
|
-
*/
|
|
279
|
-
private applyOneJoinStreaming;
|
|
280
|
-
/**
|
|
281
|
-
* Reduce the scan stream through a named set of reducers and
|
|
282
|
-
* return the final aggregated shape.
|
|
283
|
-
*
|
|
284
|
-
* Memory is O(reducers): one mutable state slot per spec key.
|
|
285
|
-
* Records flow through the pipeline one at a time via
|
|
286
|
-
* `for await` and are discarded after their `step()` is applied
|
|
287
|
-
* — never collected into an array. This is the distinguishing
|
|
288
|
-
* property from `Query.aggregate()`, which materializes the full
|
|
289
|
-
* match set first.
|
|
290
|
-
*
|
|
291
|
-
* Reuses the same reducer protocol as `Query.aggregate()`,
|
|
292
|
-
* so `count()`, `sum(field)`, `avg(field)`, `min(field)`,
|
|
293
|
-
* `max(field)` all work unchanged. The `{ seed }` parameter
|
|
294
|
-
* plumbing from constraint #2 is honored transparently — the
|
|
295
|
-
* factories ignore it in and the scan executor never
|
|
296
|
-
* touches the per-reducer state construction.
|
|
297
|
-
*
|
|
298
|
-
* **Returns a Promise**, unlike `Query.aggregate().run()` which
|
|
299
|
-
* is synchronous. The scan is inherently async because it walks
|
|
300
|
-
* adapter pages, so the terminal has to be too. Consumers
|
|
301
|
-
* destructure with await:
|
|
302
|
-
*
|
|
303
|
-
* ```ts
|
|
304
|
-
* const { total, n } = await invoices.scan()
|
|
305
|
-
* .where('year', '==', 2025)
|
|
306
|
-
* .aggregate({ total: sum('amount'), n: count() })
|
|
307
|
-
* ```
|
|
308
|
-
*
|
|
309
|
-
* **No `.live()` in.** `scan().aggregate().live()` would
|
|
310
|
-
* require reconciling an unbounded streaming iteration with a
|
|
311
|
-
* change-stream subscription — a design problem, not just a code
|
|
312
|
-
* one. Consumers with huge collections and live needs should
|
|
313
|
-
* narrow with `.where()` enough to fit in the 50k `query()`
|
|
314
|
-
* limit and use `query().aggregate().live()` instead.
|
|
315
|
-
*
|
|
316
|
-
* Consults the Via pipeline's posture before reducing (#629 Task 8 review
|
|
317
|
-
* fix wave 1): a reducer over a field whose posture is `queryable: 'none'`
|
|
318
|
-
* throws `FieldNotQueryableError` here, metadata-only — via
|
|
319
|
-
* `ViaPipeline.refuseUnqueryableReducers`, NOT the full `wrapReducers`
|
|
320
|
-
* (which would also activate money's exact-reducer rewrite, a path this
|
|
321
|
-
* method has never run and must not start running as a side effect of
|
|
322
|
-
* this gate).
|
|
323
|
-
*/
|
|
324
|
-
aggregate<Spec extends ReduceSpec>(spec: Spec): Promise<ReduceResult<Spec>>;
|
|
325
|
-
aggregate<Spec extends ReduceSpec>(build: (b: ReducerBuilder<T, S, M>) => Spec): Promise<ReduceResult<Spec>>;
|
|
326
168
|
/**
|
|
327
169
|
* Evaluate the clause list against a single record. Linear in
|
|
328
170
|
* the clause count; short-circuits on first false. Clauses on a
|
|
@@ -332,3 +174,64 @@ export declare class ScanBuilder<T, S extends keyof T = never, M extends keyof T
|
|
|
332
174
|
*/
|
|
333
175
|
private recordMatches;
|
|
334
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* ── Grouped streaming reduction over a `scan()` — `#1340` ──────────────────
|
|
179
|
+
*
|
|
180
|
+
* `scan().groupBy(key, { maxGroups }).aggregate(spec)` folds an unbounded,
|
|
181
|
+
* page-by-page scan into one row per group. The distinguishing property
|
|
182
|
+
* against the eager `Query.groupBy()` path is WHAT IS HELD:
|
|
183
|
+
*
|
|
184
|
+
* - eager (`groupAndReduce` in `with-lookup/reduce/groupby.ts`) partitions
|
|
185
|
+
* the matched records into `Map<key, records[]>` and reduces each bucket
|
|
186
|
+
* afterwards — O(matched records) memory;
|
|
187
|
+
* - this one holds **one reducer state per group and no records at all** —
|
|
188
|
+
* O(groups × state), with the left side still streaming at O(pageSize).
|
|
189
|
+
*
|
|
190
|
+
* So the two cannot share an implementation, and this deliberately does
|
|
191
|
+
* NOT use `groupAndReduce`: reusing it would mean collecting the stream,
|
|
192
|
+
* which is the exact thing `scan()` exists to avoid. What IS shared is every
|
|
193
|
+
* piece that decides SEMANTICS — the group-key canonicalisation (so `null`
|
|
194
|
+
* and `undefined` bucket apart here exactly as they do there), the reducer
|
|
195
|
+
* protocol, `ViaPipeline.wrapReducers` (money stays BigInt-exact),
|
|
196
|
+
* `bindDistinctReducers` (`countDistinct` dedups on the canonical index key),
|
|
197
|
+
* and `projectDateTruncKeys` (a derived calendar key is stamped onto a
|
|
198
|
+
* shallow copy of the row before bucketing, same as `Query.groupBy()`).
|
|
199
|
+
*
|
|
200
|
+
* ## The memory budget IS the feature
|
|
201
|
+
*
|
|
202
|
+
* `maxGroups` defaults to `GROUPBY_MAX_CARDINALITY` (100_000) — the same
|
|
203
|
+
* ceiling the eager path enforces — and is refused the moment the group that
|
|
204
|
+
* would exceed it is first seen, mid-stream, before its state is allocated.
|
|
205
|
+
* ⛔ It never truncates: a truncated rollup is a WRONG ANSWER that looks like
|
|
206
|
+
* a right one, and the whole point of declaring a budget is to learn that the
|
|
207
|
+
* grouping does not fit. The refusal names the option and the observed count.
|
|
208
|
+
*
|
|
209
|
+
* ⚠️ **Per-group state is NOT constant.** `count`/`sum`/`avg`/`min`/`max` are
|
|
210
|
+
* O(1) per group, but `median`/`percentile` (exact) hold every sampled value
|
|
211
|
+
* — O(n) per group — `mode` holds one entry per distinct value, and
|
|
212
|
+
* `countDistinct` one per distinct value. A grouped scan with an exact
|
|
213
|
+
* `median` is therefore O(matched records) overall no matter what `maxGroups`
|
|
214
|
+
* says, since the values live in the group states. Pair it with
|
|
215
|
+
* `{ approx: true }` (the t-digest, bounded per group) when the scan is
|
|
216
|
+
* genuinely unbounded — that is what makes `maxGroups` a real ceiling rather
|
|
217
|
+
* than an accounting fiction.
|
|
218
|
+
*
|
|
219
|
+
* ## Post-group `having` / `orderBy` / `limit` (#1336) are NOT on this path
|
|
220
|
+
*
|
|
221
|
+
* Those live on `GroupedReduction`, which is built around a SYNCHRONOUS
|
|
222
|
+
* `executeRecords()` closure and the eager pipeline; a scan has neither.
|
|
223
|
+
* Rather than grow a second, subtly different implementation of the same
|
|
224
|
+
* three operations, this terminal returns the row array — bounded by
|
|
225
|
+
* `maxGroups` and already in memory — and the caller filters, sorts and
|
|
226
|
+
* slices it. See the report on #1340; if a consumer wants the chainable
|
|
227
|
+
* shape, the honest fix is to lift the post-group stage out of
|
|
228
|
+
* `GroupedReduction` and share it, not to copy it here.
|
|
229
|
+
*
|
|
230
|
+
* ⚠️ Lives in THIS file rather than its own `scan-groupby.ts` for one
|
|
231
|
+
* mechanical reason: `check-architecture`'s `port-layering` ratchet
|
|
232
|
+
* grandfathers `scan-builder.ts`'s two `with-lookup/reduce/*` imports per
|
|
233
|
+
* specifier, and a NEW kernel file may not statically import a `with-*`
|
|
234
|
+
* service at all. Splitting it out means either a dynamic import on the
|
|
235
|
+
* reducer protocol or a new grandfather entry; neither is worth it for a
|
|
236
|
+
* class that only exists to terminate `ScanBuilder.groupBy()`.
|
|
237
|
+
*/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ORDERED KEY — one encoding of "what does it mean for two stored values
|
|
3
|
+
* to be comparable, and in what order".
|
|
4
|
+
*
|
|
5
|
+
* ⭐ This lives in the kernel, not in `with-lookup/indexing/`, because it is
|
|
6
|
+
* the machine-readable half of a KERNEL rule: `predicate.ts`'s `isComparable`
|
|
7
|
+
* refuses to order two values of different runtime types, and every structure
|
|
8
|
+
* that claims to answer a range or an equality faster than the linear scan
|
|
9
|
+
* must reproduce that refusal exactly or it will serve rows the scan would
|
|
10
|
+
* not. #1344's `SortedIndex`, #1345's `CompoundIndex` and #1339's declared
|
|
11
|
+
* joins all key on this, so there is ONE definition to disagree with rather
|
|
12
|
+
* than three.
|
|
13
|
+
*
|
|
14
|
+
* `with-lookup/indexing/sorted-indexes.ts` re-exports the whole of this
|
|
15
|
+
* module, so its existing importers are unchanged; the direction of the
|
|
16
|
+
* dependency is the point — an opt-in service may reach into the kernel
|
|
17
|
+
* spine, and `check-architecture.mjs`'s `port-layering` ratchet is what stops
|
|
18
|
+
* the reverse.
|
|
19
|
+
*
|
|
20
|
+
* Two properties are load-bearing and belong to the scan, not to any index:
|
|
21
|
+
*
|
|
22
|
+
* - **Kind-partitioned.** The numeric `kind` IS the sort rank, so a `string`
|
|
23
|
+
* probe can never reach `number` entries.
|
|
24
|
+
* - **No order-defined type, no key.** Booleans, objects, arrays, `NaN` and
|
|
25
|
+
* nullish values produce `undefined` and are absent from every structure
|
|
26
|
+
* built on this — which is why a caller that removed clauses from a plan
|
|
27
|
+
* must compare an index's size against the snapshot size before trusting
|
|
28
|
+
* it to cover the collection.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Order-defined key kinds. The numeric value IS the sort rank, so entries
|
|
32
|
+
* of different kinds never interleave and a probe only ever compares
|
|
33
|
+
* against its own kind.
|
|
34
|
+
*/
|
|
35
|
+
export type KeyKind = 0 | 1 | 2;
|
|
36
|
+
export declare const KIND_NUMBER: KeyKind;
|
|
37
|
+
export declare const KIND_STRING: KeyKind;
|
|
38
|
+
export declare const KIND_DATE: KeyKind;
|
|
39
|
+
export interface SortKey {
|
|
40
|
+
readonly kind: KeyKind;
|
|
41
|
+
/** `number` for {@link KIND_NUMBER} and {@link KIND_DATE}, `string` otherwise. */
|
|
42
|
+
readonly key: number | string;
|
|
43
|
+
}
|
|
44
|
+
/** Total order over {@link SortKey}: by kind first, then within the kind. */
|
|
45
|
+
export declare function compareKeys(a: SortKey, b: SortKey): number;
|
|
46
|
+
/**
|
|
47
|
+
* Map a raw (or canonicalized) value onto its ordered key, or `undefined`
|
|
48
|
+
* when the value has no order-defined runtime type — mirroring
|
|
49
|
+
* `predicate.ts`'s `isComparable`, which refuses to order booleans,
|
|
50
|
+
* objects and arrays.
|
|
51
|
+
*/
|
|
52
|
+
export declare function toSortKey(value: unknown, canonicalKey: string | undefined): SortKey | undefined;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1420 — the in-flight-write gate.
|
|
3
|
+
*
|
|
4
|
+
* ## The defect this closes
|
|
5
|
+
*
|
|
6
|
+
* `runTransaction`'s commit opens with a **pre-flight**: it re-reads every
|
|
7
|
+
* touched envelope and enforces the caller's `expectedVersion`. That check is
|
|
8
|
+
* only as honest as the read, and the read could not see a plain
|
|
9
|
+
* `Collection.put()` that had *started* but not yet reached the store. Such a
|
|
10
|
+
* put is invisible to the pre-flight, so:
|
|
11
|
+
*
|
|
12
|
+
* - it lands after the pre-flight and the transaction overwrites it from a
|
|
13
|
+
* stale snapshot (both writers report success, one write vanishes); or
|
|
14
|
+
* - it lands after the transaction's own write and clobbers it from a stale
|
|
15
|
+
* base (two writes, one version bump).
|
|
16
|
+
*
|
|
17
|
+
* Neither raised an error on either side, and the loss was **store-capability
|
|
18
|
+
* dependent** — `to-memory` declares `txAtomic` and takes the atomic commit
|
|
19
|
+
* path, `to-browser-idb` does not and takes the per-op replay — so an app
|
|
20
|
+
* tested on a memory store could ship lossy on IndexedDB.
|
|
21
|
+
*
|
|
22
|
+
* ## The remedy: make the pre-flight's read honest
|
|
23
|
+
*
|
|
24
|
+
* Every logical `Collection.put()` / `.delete()` registers itself here for the
|
|
25
|
+
* span of its read-modify-write, keyed by `(vault, collection, id)`. A commit
|
|
26
|
+
* **drains** the writes already in flight on the keys it is about to touch,
|
|
27
|
+
* BEFORE its pre-flight reads. The in-flight case then behaves exactly like
|
|
28
|
+
* the fully-awaited one the pre-flight already handled correctly: the read
|
|
29
|
+
* sees the new version and a mismatched `expectedVersion` refuses with
|
|
30
|
+
* `ConflictError`. No silent loss, and no new refusal for writes that were
|
|
31
|
+
* never in conflict.
|
|
32
|
+
*
|
|
33
|
+
* ## Why this is deadlock-free
|
|
34
|
+
*
|
|
35
|
+
* The wait is strictly one-directional and one-deep. A registered write never
|
|
36
|
+
* waits on anything from this module — only a commit does, and only on writes
|
|
37
|
+
* registered *before* it started draining ({@link drainKeyedWrites} takes a
|
|
38
|
+
* snapshot and does not loop to a fixed point). So there is no cycle to close,
|
|
39
|
+
* and the drain terminates as soon as the pre-existing writes settle,
|
|
40
|
+
* whichever way they settle. A commit's own Phase-2 writes register *after*
|
|
41
|
+
* the drain has returned, so a commit never waits on itself.
|
|
42
|
+
*
|
|
43
|
+
* ## Scope, deliberately
|
|
44
|
+
*
|
|
45
|
+
* Keyed on the STORE object, not the `Noydb` instance — two hub instances over
|
|
46
|
+
* one store are the same race, and this keeps the always-on kernel files
|
|
47
|
+
* (`noydb.ts`) untouched. Same-process only: it is a JS-object registry, and
|
|
48
|
+
* makes no claim about a second tab or a second process. That is the same
|
|
49
|
+
* boundary the reported defect has.
|
|
50
|
+
*
|
|
51
|
+
* ⛔ This does NOT serialize transaction against transaction. Two concurrent
|
|
52
|
+
* commits touching one key can still interleave — a distinct case from the
|
|
53
|
+
* reported one, and one whose fix (a commit barrier) has to solve reentrancy
|
|
54
|
+
* for the commit's own replay writes first. Do not extend this module into
|
|
55
|
+
* that without measuring the reentrancy path.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
/** The shared `(vault, collection, id)` key shape. @internal */
|
|
60
|
+
export declare function writeGateKey(vault: string, collection: string, id: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Run one logical write registered against `(vault, collection, id)` so a
|
|
63
|
+
* concurrent commit can drain it. Returns / throws exactly what `fn` does —
|
|
64
|
+
* registration is invisible to the caller.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export declare function trackKeyedWrite<R>(store: object, vault: string, collection: string, id: string, fn: () => Promise<R>): Promise<R>;
|
|
69
|
+
/**
|
|
70
|
+
* Wait for every write already in flight on `keys` to settle. Snapshot-based
|
|
71
|
+
* and single-pass — see the deadlock note in the module doc. A no-op (and no
|
|
72
|
+
* microtask) when nothing is in flight, which is the overwhelmingly common
|
|
73
|
+
* case for a commit.
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare function drainKeyedWrites(store: object, keys: Iterable<string>): Promise<void>;
|
package/dist/kernel/types.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ import type { ArchiveStrategy } from '../with-fork/archive/index.js';
|
|
|
30
30
|
import type { IndexingStrategy } from '../with-lookup/indexing/strategy.js';
|
|
31
31
|
import type { ReduceStrategy } from '../with-lookup/reduce/strategy.js';
|
|
32
32
|
import type { ConsentStrategy } from '../with-audit/consent/strategy.js';
|
|
33
|
+
import type { CoverageEvent, CoverageStrategy } from '../port/with/coverage-strategy.js';
|
|
33
34
|
import type { PeriodsStrategy } from '../with-audit/periods/strategy.js';
|
|
34
35
|
import type { ShadowStrategy } from '../with-fork/shadow/strategy.js';
|
|
35
36
|
import type { TransactionsStrategy } from '../with-commit/tx/strategy.js';
|
|
@@ -404,6 +405,7 @@ export type IndexFieldName<T, S extends keyof T = never, Q extends keyof T & str
|
|
|
404
405
|
export type IndexDefFor<F extends string> = F | {
|
|
405
406
|
readonly fields: readonly F[];
|
|
406
407
|
readonly unique?: boolean;
|
|
408
|
+
readonly kind?: 'hash' | 'sorted';
|
|
407
409
|
} | readonly F[];
|
|
408
410
|
/**
|
|
409
411
|
* The type of the `sensitive` collection option, conditional on whether the
|
|
@@ -849,7 +851,7 @@ export type RecoveryEnrollment = {
|
|
|
849
851
|
* (LUKS pattern). Adding or removing a slot is a constant-time keyring
|
|
850
852
|
* write — no DEK re-keying required.
|
|
851
853
|
*
|
|
852
|
-
* @see https://github.com/
|
|
854
|
+
* @see https://github.com/noy-db/docs/blob/main/content/docs/services/session-tiers.md → Tier 2 — Authenticate (multi-slot)
|
|
853
855
|
*/
|
|
854
856
|
/**
|
|
855
857
|
* Shared fields across all authenticator slot variants. The variant
|
|
@@ -1528,6 +1530,14 @@ export interface ChangeEvent {
|
|
|
1528
1530
|
readonly collection: string;
|
|
1529
1531
|
readonly id: string;
|
|
1530
1532
|
readonly action: 'put' | 'delete';
|
|
1533
|
+
/**
|
|
1534
|
+
* True when this change was produced by APPLYING another tab's or process's
|
|
1535
|
+
* signal rather than by a write here (#1362). Two consumers read it:
|
|
1536
|
+
* `ChangeBroadcast` never re-posts one (echo suppression), and the query
|
|
1537
|
+
* source hands the live query NO delta for one — a remote address is not a
|
|
1538
|
+
* trustworthy delta, so the live query re-runs instead of patching.
|
|
1539
|
+
*/
|
|
1540
|
+
readonly remote?: boolean;
|
|
1531
1541
|
}
|
|
1532
1542
|
export interface NoydbEventMap {
|
|
1533
1543
|
'change': ChangeEvent;
|
|
@@ -1585,6 +1595,16 @@ export interface NoydbEventMap {
|
|
|
1585
1595
|
* index mirror may have drifted. Operators reconcile via
|
|
1586
1596
|
* `collection.reconcileIndex(field)`.
|
|
1587
1597
|
*/
|
|
1598
|
+
/**
|
|
1599
|
+
* A principal's estimated COVERAGE of a `bulk: 'sensitive'` collection
|
|
1600
|
+
* crossed a declared threshold (`withCoverage()`, #1363). Fires at most once
|
|
1601
|
+
* per threshold per `(principal, vault, collection)`.
|
|
1602
|
+
*
|
|
1603
|
+
* ⛔ A SIGNAL, never a refusal — the read it reports has already been
|
|
1604
|
+
* served, and no refusal path exists by design (#1251 §3: a refusal at a
|
|
1605
|
+
* boundary is a threshold the reader can binary-search).
|
|
1606
|
+
*/
|
|
1607
|
+
'coverage:threshold': CoverageEvent;
|
|
1588
1608
|
'index:write-partial': {
|
|
1589
1609
|
vault: string;
|
|
1590
1610
|
collection: string;
|
|
@@ -1592,6 +1612,37 @@ export interface NoydbEventMap {
|
|
|
1592
1612
|
action: 'put' | 'delete';
|
|
1593
1613
|
error: Error;
|
|
1594
1614
|
};
|
|
1615
|
+
/**
|
|
1616
|
+
* #1358 — a `unique` index collision that was DETECTED rather than
|
|
1617
|
+
* prevented. Emitted only by a CRDT collection, which is the one mode where
|
|
1618
|
+
* prevention is not available: two replicas that are offline from each
|
|
1619
|
+
* other can both accept the same value, and no local check can see the
|
|
1620
|
+
* other's write. So the write is never refused, BOTH records are kept (as
|
|
1621
|
+
* CRDT convergence requires), and the collision is reported here — when it
|
|
1622
|
+
* is created, and again when a later session first sees the two records
|
|
1623
|
+
* together (the merge point).
|
|
1624
|
+
*
|
|
1625
|
+
* The guarantee a consumer may rely on is therefore: uniqueness within what
|
|
1626
|
+
* this writer could see at write time, plus detection when the replicas
|
|
1627
|
+
* meet. Nothing stronger.
|
|
1628
|
+
*
|
|
1629
|
+
* `error` is a `UniqueConstraintError` (`kernel/errors.ts`) carrying the
|
|
1630
|
+
* same `collection` / `recordId` / `fields` / `conflictingId` as the
|
|
1631
|
+
* duplicate `put()` would have thrown on a non-CRDT collection — so a
|
|
1632
|
+
* handler can treat it with the code it already has for that error.
|
|
1633
|
+
* Eager, lazy and tiered collections PREVENT instead and never emit this.
|
|
1634
|
+
*/
|
|
1635
|
+
'unique:violation': {
|
|
1636
|
+
vault: string;
|
|
1637
|
+
collection: string;
|
|
1638
|
+
/** The record that arrived second (locally — replicas need not agree on order). */
|
|
1639
|
+
id: string;
|
|
1640
|
+
/** The constrained field tuple; more than one field means a compound unique. */
|
|
1641
|
+
fields: readonly string[];
|
|
1642
|
+
/** The record already holding the value. Both are still readable. */
|
|
1643
|
+
conflictingId: string;
|
|
1644
|
+
error: Error;
|
|
1645
|
+
};
|
|
1595
1646
|
/**
|
|
1596
1647
|
* emitted by `Collection.ensurePersistedIndexesLoaded()`
|
|
1597
1648
|
* once per field on first lazy-mode query when
|
|
@@ -2493,6 +2544,23 @@ export interface NoydbOptions {
|
|
|
2493
2544
|
* @internal
|
|
2494
2545
|
*/
|
|
2495
2546
|
readonly consentStrategy?: ConsentStrategy;
|
|
2547
|
+
/**
|
|
2548
|
+
* tree-shake seam — optional read-coverage SENSOR. Pass `withCoverage()`
|
|
2549
|
+
* from `@noy-db/hub/coverage` to account how much of a `bulk: 'sensitive'`
|
|
2550
|
+
* collection each principal has ever decrypted, and to emit
|
|
2551
|
+
* `'coverage:threshold'` when a declared coverage threshold is crossed.
|
|
2552
|
+
*
|
|
2553
|
+
* ⛔⛔ TELEMETRY, NOT A CONTROL. Against an insider holding the device and
|
|
2554
|
+
* local keys it prevents nothing — they hold the DEK. It makes bulk
|
|
2555
|
+
* extraction visible early, attributable and loud. The remediation is key
|
|
2556
|
+
* custody (tiers, per-collection DEKs). It never refuses a read.
|
|
2557
|
+
*
|
|
2558
|
+
* When omitted, `NO_COVERAGE` resolves no observer at all: the decrypt path
|
|
2559
|
+
* holds `undefined` and the sensor's code never reaches the bundle.
|
|
2560
|
+
*
|
|
2561
|
+
* @internal
|
|
2562
|
+
*/
|
|
2563
|
+
readonly coverageStrategy?: CoverageStrategy;
|
|
2496
2564
|
/**
|
|
2497
2565
|
* tree-shake seam — optional periods strategy. Pass
|
|
2498
2566
|
* `withPeriods()` from `@noy-db/hub/periods` to enable
|
|
@@ -2839,7 +2907,7 @@ export interface NoydbOptions {
|
|
|
2839
2907
|
* takes an {@link EchoSecretParts} struct instead of a plain
|
|
2840
2908
|
* string (spec design-history/2026-08-02-echo-secret-design.md, #940).
|
|
2841
2909
|
*
|
|
2842
|
-
* @see https://github.com/
|
|
2910
|
+
* @see https://github.com/noy-db/docs/blob/main/content/docs/services/session-tiers.md → Managed-secret mode
|
|
2843
2911
|
*/
|
|
2844
2912
|
readonly secretMode?: 'standard' | 'echo' | 'managed';
|
|
2845
2913
|
/**
|
|
@@ -2984,7 +3052,7 @@ export interface NoydbOptions {
|
|
|
2984
3052
|
*/
|
|
2985
3053
|
readonly onInvalidKey?: 'error' | 'reset';
|
|
2986
3054
|
/**
|
|
2987
|
-
* Enable the cover service (`https://github.com/
|
|
3055
|
+
* Enable the cover service (`https://github.com/noy-db/docs/blob/main/content/docs/services/public-envelope.md`).
|
|
2988
3056
|
* Pass `true` for the default schema (every standard field, 256 KB
|
|
2989
3057
|
* icon cap, 200-char text cap), or a `CoverSchema` to narrow what
|
|
2990
3058
|
* the owner can set. Off by default — vaults written by hubs
|