@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
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* scale of 1K–50K records, building the index during hydrate is free,
|
|
15
15
|
* so persistence buys nothing measurable.
|
|
16
16
|
*/
|
|
17
|
+
import { type RangeOperator } from './sorted-indexes.js';
|
|
18
|
+
import { type CompoundRangeProbe } from './compound-indexes.js';
|
|
19
|
+
import { type FieldIndexSnapshot } from './index-snapshot.js';
|
|
17
20
|
/**
|
|
18
21
|
* Index declaration accepted by `Collection`'s constructor.
|
|
19
22
|
*
|
|
@@ -30,8 +33,55 @@
|
|
|
30
33
|
*/
|
|
31
34
|
export type IndexDef = string | {
|
|
32
35
|
readonly fields: readonly string[];
|
|
36
|
+
/**
|
|
37
|
+
* Enforce that no two records share this field tuple. A MULTI-field
|
|
38
|
+
* tuple is a COMPOUND unique — uniqueness over the tuple, never over
|
|
39
|
+
* each component on its own (`['workerId','employerId']` allows one
|
|
40
|
+
* worker at many employers). Null-distinct: a record with `null` or
|
|
41
|
+
* `undefined` in any constrained field is exempt.
|
|
42
|
+
*
|
|
43
|
+
* ⚠️ **What "unique" means depends on the collection's mode (#1358),
|
|
44
|
+
* and one of the four cannot promise prevention at all:**
|
|
45
|
+
*
|
|
46
|
+
* - eager (default) — prevented, from the in-memory map.
|
|
47
|
+
* - lazy (`prefetch: false`) — prevented, by a point lookup through the
|
|
48
|
+
* persisted `_idx/` mirror. Requires `withIndexing()`.
|
|
49
|
+
* - tiered (`tiers: [...]`) — prevented across every tier whose DEK the
|
|
50
|
+
* writer holds. **A tier the writer cannot read is outside the
|
|
51
|
+
* guarantee** — those records are unreadable, so no local check can
|
|
52
|
+
* see them, and a duplicate against one is accepted.
|
|
53
|
+
* - CRDT (`crdt: '...'`) — **NOT prevented.** Uniqueness cannot be
|
|
54
|
+
* enforced across concurrent replicas: two replicas that are offline
|
|
55
|
+
* from each other can both accept the same value, and no local check
|
|
56
|
+
* can prevent that. The write always succeeds and both records are
|
|
57
|
+
* kept; the collision is reported on the `unique:violation` event as
|
|
58
|
+
* a `UniqueConstraintError`, both when it happens and when a later
|
|
59
|
+
* session first sees the two records together. What you get is
|
|
60
|
+
* uniqueness within what this writer could see at write time, plus
|
|
61
|
+
* detection when the replicas meet.
|
|
62
|
+
*/
|
|
33
63
|
readonly unique?: boolean;
|
|
64
|
+
readonly kind?: IndexKind;
|
|
65
|
+
/**
|
|
66
|
+
* Persist this index as an encrypted sidecar so a restart reuses it
|
|
67
|
+
* instead of rebuilding (#1359). Only meaningful with `kind: 'sorted'`
|
|
68
|
+
* — the hash index is not persisted. OPT-IN until measured: at the
|
|
69
|
+
* 1K–50K target scale rebuild-on-open is free, and a sidecar is a
|
|
70
|
+
* write on every debounce window plus a blob at rest.
|
|
71
|
+
*/
|
|
72
|
+
readonly persist?: boolean;
|
|
34
73
|
} | readonly string[];
|
|
74
|
+
/**
|
|
75
|
+
* The access structure an index declaration asks for (#1344).
|
|
76
|
+
*
|
|
77
|
+
* `'hash'` (the default, and what every pre-#1344 declaration means) is
|
|
78
|
+
* the equality/`in` bucket map. `'sorted'` additionally maintains an
|
|
79
|
+
* ordered array over the same canonicalized keys, which lights up
|
|
80
|
+
* index-driven `<`, `<=`, `>`, `>=`, `between`, `startsWith` and
|
|
81
|
+
* `orderBy(field).limit(n)`. A `'sorted'` declaration keeps the hash
|
|
82
|
+
* index too — `==`/`in` stay O(1).
|
|
83
|
+
*/
|
|
84
|
+
export type IndexKind = 'hash' | 'sorted';
|
|
35
85
|
/**
|
|
36
86
|
* Normalize a declared `IndexDef[]` into a uniform `{ fields, unique? }`
|
|
37
87
|
* shape: `string` → `{fields:[s]}`, `string[]` → `{fields}`, object →
|
|
@@ -66,6 +116,27 @@ export interface HashIndex {
|
|
|
66
116
|
*/
|
|
67
117
|
export declare class CollectionIndexes {
|
|
68
118
|
private readonly indexes;
|
|
119
|
+
/**
|
|
120
|
+
* Sorted (range) indexes, keyed by field — the #1344 half. Parallel to
|
|
121
|
+
* `indexes` above and maintained at the SAME mutation sites, through the
|
|
122
|
+
* SAME `canonicalize` closure, so the two can never disagree about which
|
|
123
|
+
* key space a field lives in.
|
|
124
|
+
*/
|
|
125
|
+
private readonly sorted;
|
|
126
|
+
/**
|
|
127
|
+
* Compound (tuple-keyed) sorted indexes, keyed by the joined field
|
|
128
|
+
* tuple — the #1345 half. Third parallel map, maintained at the SAME
|
|
129
|
+
* mutation sites through the SAME `canonicalize` closure as the other
|
|
130
|
+
* two, so no field can end up in disagreeing key spaces.
|
|
131
|
+
*/
|
|
132
|
+
private readonly compound;
|
|
133
|
+
/**
|
|
134
|
+
* The indexes declared `persist: true` (#1359), keyed by their SIDECAR key
|
|
135
|
+
* (`s:<field>` / `c:<f1>,<f2>`). A separate map rather than a flag on the
|
|
136
|
+
* index classes: persistence is a property of the DECLARATION, and the
|
|
137
|
+
* index classes stay unaware of storage.
|
|
138
|
+
*/
|
|
139
|
+
private readonly persistable;
|
|
69
140
|
/**
|
|
70
141
|
* Per-field bucket-key canonicalizer (#672 review C1), registered ONCE
|
|
71
142
|
* via {@link setCanonicalizer} when the collection wires indexing up
|
|
@@ -87,6 +158,65 @@ export declare class CollectionIndexes {
|
|
|
87
158
|
* Calling this twice for the same field is a no-op (idempotent).
|
|
88
159
|
*/
|
|
89
160
|
declare(field: string): void;
|
|
161
|
+
/**
|
|
162
|
+
* Declare a sorted (range) index on a field. Independent of
|
|
163
|
+
* {@link declare} — callers that want both `==` speed and range speed
|
|
164
|
+
* declare both (which is what `withIndexing()` does for a
|
|
165
|
+
* `kind: 'sorted'` declaration). Idempotent.
|
|
166
|
+
*/
|
|
167
|
+
declareSorted(field: string, opts?: {
|
|
168
|
+
readonly persist?: boolean;
|
|
169
|
+
}): void;
|
|
170
|
+
/** True if the given field has a declared SORTED index. */
|
|
171
|
+
hasSorted(field: string): boolean;
|
|
172
|
+
/** All sorted-index field names, in declaration order. */
|
|
173
|
+
sortedFields(): string[];
|
|
174
|
+
/** Number of entries in a field's sorted index (0 when undeclared). */
|
|
175
|
+
sortedSize(field: string): number;
|
|
176
|
+
/**
|
|
177
|
+
* Range lookup: ids whose `field` satisfies the operator. Returns
|
|
178
|
+
* `null` when no SORTED index covers the field — the caller falls back
|
|
179
|
+
* to a linear scan. An empty set means "the index covers this field and
|
|
180
|
+
* nothing matches", which is authoritative.
|
|
181
|
+
*/
|
|
182
|
+
lookupRange(field: string, op: RangeOperator, value: unknown): ReadonlySet<string> | null;
|
|
183
|
+
/**
|
|
184
|
+
* Ids of every indexed record in `field` order. `null` when no sorted
|
|
185
|
+
* index covers the field. Records whose value is nullish or has no
|
|
186
|
+
* order-defined type are absent — compare against {@link sortedSize}
|
|
187
|
+
* before treating the result as the full collection.
|
|
188
|
+
*/
|
|
189
|
+
orderedIds(field: string, direction: 'asc' | 'desc'): readonly string[] | null;
|
|
190
|
+
/**
|
|
191
|
+
* Declare a compound (multi-field) sorted index over an ordered field
|
|
192
|
+
* tuple. A tuple shorter than two fields is a single-field sorted index
|
|
193
|
+
* and is ignored here. Idempotent.
|
|
194
|
+
*/
|
|
195
|
+
declareCompound(fields: readonly string[], opts?: {
|
|
196
|
+
readonly persist?: boolean;
|
|
197
|
+
}): void;
|
|
198
|
+
/** Every declared field tuple, in declaration order. */
|
|
199
|
+
compoundTuples(): ReadonlyArray<readonly string[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Number of records the tuple's index holds (0 when undeclared). A
|
|
202
|
+
* record with a nullish or non-orderable component is absent, so a
|
|
203
|
+
* caller that removes clauses from the plan MUST compare this against
|
|
204
|
+
* the snapshot size before trusting the result.
|
|
205
|
+
*/
|
|
206
|
+
compoundSize(fields: readonly string[]): number;
|
|
207
|
+
/**
|
|
208
|
+
* Compound lookup: ids whose leading components equal `prefixValues`,
|
|
209
|
+
* optionally narrowed by a range on the component just past them.
|
|
210
|
+
* `null` when no compound index covers the tuple, or when an operand
|
|
211
|
+
* has no order-defined type — the caller falls back to a linear scan.
|
|
212
|
+
*/
|
|
213
|
+
lookupCompound(fields: readonly string[], prefixValues: readonly unknown[], range?: CompoundRangeProbe): ReadonlySet<string> | null;
|
|
214
|
+
/**
|
|
215
|
+
* Ids matching an equality prefix, ordered by the remaining components.
|
|
216
|
+
* `null` when no compound index covers the tuple or an operand has no
|
|
217
|
+
* order-defined type. See {@link compoundSize} for the coverage caveat.
|
|
218
|
+
*/
|
|
219
|
+
compoundOrderedIds(fields: readonly string[], prefixValues: readonly unknown[], direction: 'asc' | 'desc'): readonly string[] | null;
|
|
90
220
|
/** True if the given field has a declared index. */
|
|
91
221
|
has(field: string): boolean;
|
|
92
222
|
/** All declared field names, in declaration order. */
|
|
@@ -99,7 +229,17 @@ export declare class CollectionIndexes {
|
|
|
99
229
|
build<T>(records: ReadonlyArray<{
|
|
100
230
|
id: string;
|
|
101
231
|
record: T;
|
|
102
|
-
}>): void;
|
|
232
|
+
}>, skip?: ReadonlySet<string>): void;
|
|
233
|
+
/** Sidecar keys of every index declared `persist: true`, in declaration order. */
|
|
234
|
+
persistableKeys(): readonly string[];
|
|
235
|
+
/** The persistable snapshot behind one sidecar key, or `undefined` if it is not declared. */
|
|
236
|
+
snapshotIndex(key: string): FieldIndexSnapshot | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Adopt a validated snapshot into the index behind `key`. `false` means the
|
|
239
|
+
* caller must rebuild that index from the cache — the index is left
|
|
240
|
+
* untouched, never half-loaded.
|
|
241
|
+
*/
|
|
242
|
+
restoreIndex(key: string, snap: FieldIndexSnapshot, isLive: (id: string) => boolean): boolean;
|
|
103
243
|
/**
|
|
104
244
|
* Insert or update a single record across all indexes.
|
|
105
245
|
* Called by `Collection.put()` after the encrypted write succeeds.
|
|
@@ -120,6 +260,12 @@ export declare class CollectionIndexes {
|
|
|
120
260
|
* the given value. Returns `null` if no index covers the field — the
|
|
121
261
|
* caller should fall back to a linear scan.
|
|
122
262
|
*
|
|
263
|
+
* ⛔ ALSO `null` when the OPERAND has no bucket ADDRESS (#1402) — a
|
|
264
|
+
* nullish operand, or an object one, which every object-valued record in
|
|
265
|
+
* the collection shares. Answering those from the buckets returns rows
|
|
266
|
+
* the scan does not, silently, and only on the collections that happen to
|
|
267
|
+
* have an index. See `isProbeableBucketKey` for the two measurements.
|
|
268
|
+
*
|
|
123
269
|
* The returned Set is a reference to the index's internal storage —
|
|
124
270
|
* callers must NOT mutate it.
|
|
125
271
|
*/
|
|
@@ -127,6 +273,29 @@ export declare class CollectionIndexes {
|
|
|
127
273
|
/**
|
|
128
274
|
* Set lookup: return the union of record ids whose `field` matches any
|
|
129
275
|
* of the given values. Returns `null` if no index covers the field.
|
|
276
|
+
*
|
|
277
|
+
* ⛔ ALSO `null` when ANY member of `values` has no bucket address
|
|
278
|
+
* (#1402) — one unaddressable member poisons the whole union, since the
|
|
279
|
+
* result is a union and there is no partial answer to hand back. Same
|
|
280
|
+
* measurement as {@link lookupEqual}.
|
|
130
281
|
*/
|
|
131
282
|
lookupIn(field: string, values: readonly unknown[]): ReadonlySet<string> | null;
|
|
283
|
+
/**
|
|
284
|
+
* One record id per NON-EMPTY bucket of `field`'s hash index, in bucket
|
|
285
|
+
* order — the index-backed spine of `Query.distinct()` (#1347). `null` when
|
|
286
|
+
* no hash index covers the field, so the caller scans instead.
|
|
287
|
+
*
|
|
288
|
+
* The bucket set IS the distinct key set, so this costs O(buckets) rather
|
|
289
|
+
* than O(records). It returns REPRESENTATIVE IDS rather than the keys
|
|
290
|
+
* themselves on purpose: a bucket key is a canonical string (money's
|
|
291
|
+
* BigInt-normalized scaled int, say), and `distinct()` owes its caller the
|
|
292
|
+
* field's real value, which only the record carries.
|
|
293
|
+
*
|
|
294
|
+
* Bucket insertion order is first-seen record order — `build()` walks the
|
|
295
|
+
* snapshot in order and `upsert()` appends — which is why an index-backed
|
|
296
|
+
* `distinct()` and a scanned one agree on ORDER too, not merely on the set.
|
|
297
|
+
* Empty buckets are skipped defensively; `removeFromIndex` already deletes
|
|
298
|
+
* them, so this is belt-and-braces against a future partial removal path.
|
|
299
|
+
*/
|
|
300
|
+
bucketRepresentatives(field: string): readonly string[] | null;
|
|
132
301
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The on-disk shape of a persisted field index (#1359) — the format both
|
|
3
|
+
* `SortedIndex` (#1344) and `CompoundIndex` (#1345) round-trip through, plus
|
|
4
|
+
* the structural validator every load must pass.
|
|
5
|
+
*
|
|
6
|
+
* ⭐ **Nothing is flattened into a delimited string.** A compound entry keeps
|
|
7
|
+
* its tuple as an ARRAY of per-component keys, each carrying its runtime KIND
|
|
8
|
+
* alongside its value — which is the whole point of #1345's in-memory shape
|
|
9
|
+
* and would be destroyed by a `join()`. Two properties depend on it:
|
|
10
|
+
*
|
|
11
|
+
* - **Kind survives.** Entries rank by runtime kind FIRST (mirroring
|
|
12
|
+
* `predicate.ts`'s `isComparable`), so a `string` probe must not reach
|
|
13
|
+
* `number` entries. An encoding that wrote only the value would collapse
|
|
14
|
+
* `1` and `'1'` into one key space on the way back in.
|
|
15
|
+
* - **Per-component ordering survives.** A string component may contain any
|
|
16
|
+
* byte, including whatever a separator would have been.
|
|
17
|
+
*
|
|
18
|
+
* The validator is deliberately paranoid and its failure mode is a REBUILD,
|
|
19
|
+
* never a partial load: a blob that is truncated, from a future format, or
|
|
20
|
+
* internally out of order is rejected whole. See
|
|
21
|
+
* {@link parseFieldIndexSnapshot}.
|
|
22
|
+
*/
|
|
23
|
+
/** Bump on ANY incompatible change to the shapes below. An older stamp is rejected, not migrated. */
|
|
24
|
+
export declare const FIELD_INDEX_SNAPSHOT_VERSION = 1;
|
|
25
|
+
/** One `SortKey`, wire form: `[kind, key]`. `kind` IS the sort rank. */
|
|
26
|
+
export type WireKey = readonly [kind: number, key: number | string];
|
|
27
|
+
/** One `SortedIndex` entry: `[kind, key, seq, id]`. */
|
|
28
|
+
export type WireSortedEntry = readonly [kind: number, key: number | string, seq: number, id: string];
|
|
29
|
+
/** One `CompoundIndex` entry: `[tupleKeys, seq, id]` — the tuple stays an ARRAY. */
|
|
30
|
+
export type WireCompoundEntry = readonly [keys: readonly WireKey[], seq: number, id: string];
|
|
31
|
+
export interface SortedIndexSnapshot {
|
|
32
|
+
readonly v: number;
|
|
33
|
+
readonly t: 'sorted';
|
|
34
|
+
readonly field: string;
|
|
35
|
+
readonly nextSeq: number;
|
|
36
|
+
readonly entries: readonly WireSortedEntry[];
|
|
37
|
+
}
|
|
38
|
+
export interface CompoundIndexSnapshot {
|
|
39
|
+
readonly v: number;
|
|
40
|
+
readonly t: 'compound';
|
|
41
|
+
readonly fields: readonly string[];
|
|
42
|
+
readonly nextSeq: number;
|
|
43
|
+
readonly entries: readonly WireCompoundEntry[];
|
|
44
|
+
}
|
|
45
|
+
export type FieldIndexSnapshot = SortedIndexSnapshot | CompoundIndexSnapshot;
|
|
46
|
+
/**
|
|
47
|
+
* Sidecar key for a single-field sorted index. Field paths are
|
|
48
|
+
* percent-encoded so no field name can collide with the `,` the compound
|
|
49
|
+
* form joins on, nor with the `s:` / `c:` discriminator.
|
|
50
|
+
*/
|
|
51
|
+
export declare function sortedIndexKey(field: string): string;
|
|
52
|
+
/** Sidecar key for a compound index over an ordered field tuple. */
|
|
53
|
+
export declare function compoundIndexKey(fields: readonly string[]): string;
|
|
54
|
+
/**
|
|
55
|
+
* Decode + validate a persisted snapshot. Returns `null` — meaning "rebuild"
|
|
56
|
+
* — for anything that is not exactly the current format: bad JSON (a torn
|
|
57
|
+
* write), a version stamp from another release, a shape mismatch, a
|
|
58
|
+
* malformed key, or entries out of the order the index's binary searches
|
|
59
|
+
* require. A caller must never repair a snapshot; the source of truth is the
|
|
60
|
+
* cache, and rebuilding from it is always available.
|
|
61
|
+
*/
|
|
62
|
+
export declare function parseFieldIndexSnapshot(json: string): FieldIndexSnapshot | null;
|
|
@@ -88,6 +88,12 @@ export declare class LazyQuery<T, S extends keyof T = never, Q extends keyof T &
|
|
|
88
88
|
orderBy(field: QueryField<T, S>, direction?: 'asc' | 'desc'): LazyQuery<T, S, Q>;
|
|
89
89
|
limit(n: number): LazyQuery<T, S, Q>;
|
|
90
90
|
offset(n: number): LazyQuery<T, S, Q>;
|
|
91
|
+
/**
|
|
92
|
+
* **ASYNC here, unlike `Query.toArray()` (#1413).** Same method name, a
|
|
93
|
+
* different contract, because the surface underneath differs: this one
|
|
94
|
+
* genuinely fetches through the persisted `_idx/` side-car, so it genuinely awaits. `Query`'s terminal reads an
|
|
95
|
+
* already-decrypted in-memory cache and returns `T[]` synchronously.
|
|
96
|
+
*/
|
|
91
97
|
toArray(): Promise<T[]>;
|
|
92
98
|
first(): Promise<T | null>;
|
|
93
99
|
count(): Promise<number>;
|
|
@@ -97,6 +103,33 @@ export declare class LazyQuery<T, S extends keyof T = never, Q extends keyof T &
|
|
|
97
103
|
* clause that can scope the scan. Callers interpret null as
|
|
98
104
|
* IndexRequiredError (see `toArray`).
|
|
99
105
|
*/
|
|
106
|
+
/**
|
|
107
|
+
* #1407 — refuse a NULLISH `==`/`in` operand in lazy mode instead of
|
|
108
|
+
* answering it with the empty bucket.
|
|
109
|
+
*
|
|
110
|
+
* `addToState` skips nullish values outright, so a record whose value IS
|
|
111
|
+
* nullish is absent from the persisted index. `lookupEqual` then returns the
|
|
112
|
+
* empty `\0NULL\0` bucket, and `[]` reads as "no rows match" when the truth
|
|
113
|
+
* is "the matching rows are not visible from here". Measured on an indexed
|
|
114
|
+
* field: `where('tag','==',null)` returned `[]` from lazy while the eager
|
|
115
|
+
* scan returned the row.
|
|
116
|
+
*
|
|
117
|
+
* ⛔ There is no superset to fall back to, which is what makes this
|
|
118
|
+
* different from every other unaddressable-operand case in this function.
|
|
119
|
+
* Enumerating the field's indexed ids returns a set that EXCLUDES every
|
|
120
|
+
* match — the opposite of a superset — so "enumerate and post-filter", the
|
|
121
|
+
* move the via-declined, via-`in`, via-RANGE and #1355 prefix branches all
|
|
122
|
+
* make, is unavailable here.
|
|
123
|
+
*
|
|
124
|
+
* ⭐ AN OBJECT OPERAND NEEDS NOTHING, and the first draft of this fix gave it
|
|
125
|
+
* something. `\0OBJECT\0` holds every object-valued record, only an object
|
|
126
|
+
* can `===` an object operand, and `toArray()`'s post-filter applies the
|
|
127
|
+
* exact predicate — so the bucket is already a sound superset, and a TIGHTER
|
|
128
|
+
* one than `orderedBy` would produce. Routing it through `orderedBy` was a
|
|
129
|
+
* silent perf regression dressed as a correctness fix. Verified by deleting
|
|
130
|
+
* the guard entirely: only the nullish cases fail.
|
|
131
|
+
*/
|
|
132
|
+
private refuseNullishProbe;
|
|
100
133
|
private resolveCandidateIds;
|
|
101
134
|
}
|
|
102
135
|
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persisted encrypted field indexes (#1359) — the debounce + freshness half.
|
|
3
|
+
*
|
|
4
|
+
* Shape deliberately mirrors the search index's `PersistedIndexStore`: this
|
|
5
|
+
* class is CRYPTO-FREE and storage-free. The collection injects
|
|
6
|
+
* load/save/remove callbacks that encrypt under the collection's DEK before
|
|
7
|
+
* they touch the adapter, so an index sidecar is ciphertext at rest like every
|
|
8
|
+
* other byte hub writes — the trust boundary does not move.
|
|
9
|
+
*
|
|
10
|
+
* One sidecar per `(collection, index)`, addressed by the index's sidecar key
|
|
11
|
+
* (`s:<field>` / `c:<f1>,<f2>`).
|
|
12
|
+
*
|
|
13
|
+
* ## Why crash residue can only ever be a rebuild
|
|
14
|
+
*
|
|
15
|
+
* A sidecar is a CACHE of something the record cache can always recompute, and
|
|
16
|
+
* it is used only when four independent checks pass:
|
|
17
|
+
*
|
|
18
|
+
* 1. it decrypts under the collection's DEK (a foreign or corrupt blob does not),
|
|
19
|
+
* 2. it parses as the CURRENT snapshot format, entries well-formed and in the
|
|
20
|
+
* order the binary searches assume (`parseFieldIndexSnapshot`),
|
|
21
|
+
* 3. its freshness stamp equals the live one — record count, max record
|
|
22
|
+
* version, and an order-independent digest over every `(id, version)` pair
|
|
23
|
+
* in the cache, so any write, delete or re-put since the sidecar was
|
|
24
|
+
* written changes it,
|
|
25
|
+
* 4. every id it names is still live in the cache.
|
|
26
|
+
*
|
|
27
|
+
* Any failure discards the whole blob and rebuilds from the cache. There is no
|
|
28
|
+
* repair path and no partial load, by construction: a half-adopted index would
|
|
29
|
+
* answer confidently and wrongly, which is the one outcome persistence may not
|
|
30
|
+
* introduce. A save that never lands, lands torn, or lands and is then
|
|
31
|
+
* overtaken by a crashed write leaves at most a blob that fails check 2, 3 or 4.
|
|
32
|
+
*
|
|
33
|
+
* The residual is a blob at rest holding indexed field VALUES after a
|
|
34
|
+
* `forget()` — closed by `purgePersistedIndexes`, which deletes these sidecars
|
|
35
|
+
* on erasure the same way it deletes the lazy-mode ones.
|
|
36
|
+
*/
|
|
37
|
+
import type { FieldIndexSnapshot } from './index-snapshot.js';
|
|
38
|
+
/**
|
|
39
|
+
* The freshness stamp. `count` + `maxVersion` is the search store's signal;
|
|
40
|
+
* `digest` is the strengthening this index needs — an ordered index is wrong
|
|
41
|
+
* in a way a search index is merely imprecise, so a stamp that two different
|
|
42
|
+
* cache states can share is not good enough. See {@link fieldIndexFingerprint}.
|
|
43
|
+
*/
|
|
44
|
+
export interface FieldIndexFingerprint {
|
|
45
|
+
readonly count: number;
|
|
46
|
+
readonly maxVersion: number;
|
|
47
|
+
readonly digest: string;
|
|
48
|
+
}
|
|
49
|
+
export interface FieldIndexCallbacks {
|
|
50
|
+
/** Sidecar keys to persist, and the snapshot/restore hooks over them. */
|
|
51
|
+
keys(): readonly string[];
|
|
52
|
+
snapshot(key: string): FieldIndexSnapshot | undefined;
|
|
53
|
+
restore(key: string, snap: FieldIndexSnapshot, isLive: (id: string) => boolean): boolean;
|
|
54
|
+
load(key: string): Promise<{
|
|
55
|
+
json: string;
|
|
56
|
+
fingerprint: FieldIndexFingerprint;
|
|
57
|
+
} | null>;
|
|
58
|
+
save(key: string, json: string, fp: FieldIndexFingerprint): Promise<void>;
|
|
59
|
+
remove(key: string): Promise<void>;
|
|
60
|
+
currentFingerprint(): FieldIndexFingerprint;
|
|
61
|
+
debounceMs?: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An order-independent stamp over the cache's `(id, version)` pairs.
|
|
65
|
+
*
|
|
66
|
+
* Order-independent because cache iteration order is the adapter's `list()`
|
|
67
|
+
* order and is not promised to be stable across opens; a stamp that changed
|
|
68
|
+
* with it would reject every fresh sidecar and quietly turn persistence off.
|
|
69
|
+
* Two 32-bit accumulators (sum and xor over FNV-1a) rather than one, so a
|
|
70
|
+
* collision needs both to agree. `_v` increments on every write, so a changed
|
|
71
|
+
* record body always changes this — a record's indexed values cannot move
|
|
72
|
+
* underneath a matching stamp.
|
|
73
|
+
*/
|
|
74
|
+
export declare function fieldIndexFingerprint(cache: ReadonlyMap<string, {
|
|
75
|
+
readonly version: number;
|
|
76
|
+
}>): FieldIndexFingerprint;
|
|
77
|
+
/** Coordinates the sidecars of one collection's opted-in field indexes. */
|
|
78
|
+
export declare class PersistedFieldIndexes {
|
|
79
|
+
private readonly cb;
|
|
80
|
+
private timer;
|
|
81
|
+
private readonly debounceMs;
|
|
82
|
+
constructor(cb: FieldIndexCallbacks);
|
|
83
|
+
/** True when at least one index on this collection asked to be persisted. */
|
|
84
|
+
get enabled(): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Restore whatever is fresh. Returns the sidecar keys that were adopted —
|
|
87
|
+
* the caller rebuilds every other declared index from the cache. Never
|
|
88
|
+
* throws for a bad blob: an unreadable sidecar is indistinguishable from an
|
|
89
|
+
* absent one, and both mean "rebuild".
|
|
90
|
+
*/
|
|
91
|
+
restore(isLive: (id: string) => boolean): Promise<ReadonlySet<string>>;
|
|
92
|
+
/** Schedule a debounced write of every opted-in sidecar. */
|
|
93
|
+
markDirty(): void;
|
|
94
|
+
/** Force an immediate write (cancels any pending debounce). */
|
|
95
|
+
flush(): Promise<void>;
|
|
96
|
+
/** Delete every sidecar — erasure, and any point the blobs must not survive. */
|
|
97
|
+
removeAll(): Promise<{
|
|
98
|
+
purged: number;
|
|
99
|
+
residue: string[];
|
|
100
|
+
}>;
|
|
101
|
+
/** Drop a pending debounce without writing (collection teardown). */
|
|
102
|
+
dispose(): void;
|
|
103
|
+
private persist;
|
|
104
|
+
}
|
|
@@ -183,6 +183,18 @@ export declare class PersistedCollectionIndex {
|
|
|
183
183
|
* double-canonicalizes.
|
|
184
184
|
*/
|
|
185
185
|
lookupEqual(field: string, value: unknown): ReadonlySet<string> | null;
|
|
186
|
+
/**
|
|
187
|
+
* Equality lookup that applies the registered canonicalizer to `value`
|
|
188
|
+
* FIRST — the write side (`ingest`/`upsert` → `addToState`) canonicalizes,
|
|
189
|
+
* so a probe that does not would miss a Via-covered (e.g. money) match.
|
|
190
|
+
*
|
|
191
|
+
* {@link lookupEqual} deliberately keeps the caller-canonicalizes contract
|
|
192
|
+
* because the query planner has already canonicalized by the time it gets
|
|
193
|
+
* here (#677). The unique-constraint pre-flight (#1358) has not, and has no
|
|
194
|
+
* access to the Via pipeline, so it probes through this instead. Returns
|
|
195
|
+
* `null` when the field is not declared.
|
|
196
|
+
*/
|
|
197
|
+
probeEqual(field: string, value: unknown): ReadonlySet<string> | null;
|
|
186
198
|
/**
|
|
187
199
|
* Set lookup — return the union of record ids whose `field` matches any
|
|
188
200
|
* of `values`. Returns `null` if the field is not declared. Returns a
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sorted (range) secondary indexes — the ordered sibling of the hash
|
|
3
|
+
* index in `eager-indexes.ts` (#1344).
|
|
4
|
+
*
|
|
5
|
+
* A sorted index is an array of `{ kind, key, seq, id }` entries kept in
|
|
6
|
+
* ascending `(kindRank, key, seq)` order. Binary search then answers
|
|
7
|
+
* `<`, `<=`, `>`, `>=`, `between` and `startsWith` as a contiguous slice,
|
|
8
|
+
* and `orderedIds()` walks the array for `orderBy(field).limit(n)`.
|
|
9
|
+
*
|
|
10
|
+
* Three properties are load-bearing, each mirroring the linear scan this
|
|
11
|
+
* replaces (`kernel/query/predicate.ts`):
|
|
12
|
+
*
|
|
13
|
+
* - **Kind-partitioned.** `evaluateFieldClause`'s `isComparable` refuses
|
|
14
|
+
* to order two values of different runtime types, so entries are ranked
|
|
15
|
+
* by kind FIRST. A `string` probe therefore cannot reach `number`
|
|
16
|
+
* entries, exactly as the scan cannot. Values with no order-defined
|
|
17
|
+
* type (booleans, objects, arrays) are not indexed at all.
|
|
18
|
+
* - **Nullish is not indexed**, same as the hash index.
|
|
19
|
+
* - **Ties keep insertion order** (`seq`), which after a `build()` is
|
|
20
|
+
* snapshot order — so an index-served `orderBy(...).limit(n)` returns
|
|
21
|
+
* the same rows the stable scan-and-sort would. An in-place UPDATE
|
|
22
|
+
* reinstates the rank it held rather than appending (#1369): the record
|
|
23
|
+
* cache does not move a re-`put` record, so neither may the index.
|
|
24
|
+
*
|
|
25
|
+
* Keys canonicalise through the SAME per-field closure the hash index
|
|
26
|
+
* uses (`ViaPipeline.canonicalizeIndexKey`), so a Via-covered field's
|
|
27
|
+
* entries live in one key space here too. Range DISPATCH for a
|
|
28
|
+
* Via-covered clause is nevertheless declined by the query builder (a
|
|
29
|
+
* money operand has no ordered stored-form probe) — see
|
|
30
|
+
* `kernel/query/builder.ts`'s `candidateRecords`.
|
|
31
|
+
*
|
|
32
|
+
* PERSISTENCE (#1359) is OPT-IN, via `{ persist: true }` on the declaration.
|
|
33
|
+
* {@link SortedIndex.toSnapshot} / {@link SortedIndex.loadSnapshot} are the
|
|
34
|
+
* whole of this class's part in it — the encrypted sidecar, the freshness
|
|
35
|
+
* stamp and the debounce live in `persisted-field-indexes.ts`. Without the
|
|
36
|
+
* opt-in the index is in memory only and rebuilt on hydrate, as before.
|
|
37
|
+
*/
|
|
38
|
+
import { type FieldIndexSnapshot, type SortedIndexSnapshot } from './index-snapshot.js';
|
|
39
|
+
/** Range operators a sorted index can answer. */
|
|
40
|
+
export type RangeOperator = '<' | '<=' | '>' | '>=' | 'between' | 'startsWith';
|
|
41
|
+
export { KIND_STRING, compareKeys, toSortKey, type KeyKind, type SortKey } from '../../kernel/query/sort-key.js';
|
|
42
|
+
/** A single field's sorted index. */
|
|
43
|
+
export declare class SortedIndex {
|
|
44
|
+
readonly field: string;
|
|
45
|
+
private readonly entries;
|
|
46
|
+
private nextSeq;
|
|
47
|
+
constructor(field: string);
|
|
48
|
+
get size(): number;
|
|
49
|
+
clear(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Insert one record. No-op when the value has no order-defined kind.
|
|
52
|
+
*
|
|
53
|
+
* `seq` REINSTATES a rank a previous entry for this id held — see
|
|
54
|
+
* {@link remove}'s return value and `CollectionIndexes.upsert`. Omit it
|
|
55
|
+
* for a fresh insert, which appends after every existing tie.
|
|
56
|
+
*/
|
|
57
|
+
add(id: string, value: unknown, canonicalKey: string | undefined, seq?: number): void;
|
|
58
|
+
/**
|
|
59
|
+
* Remove one record, addressed by the value it was indexed under.
|
|
60
|
+
* Returns the rank it held, so an UPDATE can reinstate it (#1369):
|
|
61
|
+
* `sortRecords()` sorts a snapshot whose order does not change when a
|
|
62
|
+
* record is written in place, so a tie-breaking rank that drifted to the
|
|
63
|
+
* back on every `put` would make an index-served page disagree with the
|
|
64
|
+
* scan it must match. Same contract as `CompoundIndex.remove`.
|
|
65
|
+
*/
|
|
66
|
+
remove(id: string, value: unknown, canonicalKey: string | undefined): number | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Ids in ascending (or descending) key order. Ties keep INSERTION order
|
|
69
|
+
* in both directions — `sortRecords()` negates its comparator over a
|
|
70
|
+
* stable sort, which reverses the key order but not the order of equal
|
|
71
|
+
* keys. A plain `.reverse()` here would disagree on ties.
|
|
72
|
+
*/
|
|
73
|
+
orderedIds(direction: 'asc' | 'desc'): string[];
|
|
74
|
+
/**
|
|
75
|
+
* Ids matching a range clause. Returns an empty set when the probe has
|
|
76
|
+
* no comparable kind — which is what the linear scan would produce too.
|
|
77
|
+
*/
|
|
78
|
+
lookup(op: RangeOperator, value: unknown): Set<string>;
|
|
79
|
+
private prefix;
|
|
80
|
+
private slice;
|
|
81
|
+
/** [start, end) of the run of entries with the given kind — binary, not linear. */
|
|
82
|
+
private kindBounds;
|
|
83
|
+
private kindBoundary;
|
|
84
|
+
/** First index whose key is >= `probe`. */
|
|
85
|
+
private lowerBound;
|
|
86
|
+
/** First index whose key is > `probe`. */
|
|
87
|
+
private upperBound;
|
|
88
|
+
/**
|
|
89
|
+
* The persistable form of this index (#1359). `kind` travels with every
|
|
90
|
+
* key: entries rank by runtime kind first, so an encoding that dropped it
|
|
91
|
+
* would let a `string` probe reach `number` entries on the way back in.
|
|
92
|
+
*/
|
|
93
|
+
toSnapshot(): SortedIndexSnapshot;
|
|
94
|
+
/**
|
|
95
|
+
* Adopt a validated snapshot, or refuse it. Refusal (`false`) means the
|
|
96
|
+
* caller rebuilds — it NEVER means a partial index: the entries are staged
|
|
97
|
+
* and only swapped in once every one of them is accepted.
|
|
98
|
+
*
|
|
99
|
+
* `isLive` is the caller's liveness predicate over the record cache. An
|
|
100
|
+
* entry naming a record the cache does not hold means the blob and the
|
|
101
|
+
* collection have diverged (a crash between the two writes, say), so the
|
|
102
|
+
* whole blob is discarded. Crash residue must be a rebuild, never a wrong
|
|
103
|
+
* answer.
|
|
104
|
+
*/
|
|
105
|
+
loadSnapshot(snap: FieldIndexSnapshot, isLive: (id: string) => boolean): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Insertion point that keeps ties in `seq` order. A fresh entry lands at
|
|
108
|
+
* the end of its tie run; a REINSTATED one (see {@link add}) lands back at
|
|
109
|
+
* its own rank inside it.
|
|
110
|
+
*/
|
|
111
|
+
private insertionPoint;
|
|
112
|
+
}
|
|
113
|
+
/** Build the whole index from a snapshot. Entry seqs follow snapshot order. */
|
|
114
|
+
export declare function buildSortedIndex<T>(idx: SortedIndex, records: ReadonlyArray<{
|
|
115
|
+
id: string;
|
|
116
|
+
record: T;
|
|
117
|
+
}>, canonicalize?: (field: string, value: unknown) => string | undefined): void;
|