@noy-db/hub 0.7.1-pre.0 → 0.8.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 +147 -14
- package/LICENSE +202 -21
- package/NOTICE +1 -0
- package/README.md +5 -5
- package/codemods/0.8.0-pre.json +61 -0
- package/dist/api-OS747DS4.js +18 -0
- package/dist/as/index.js +11 -12
- package/dist/as/index.js.map +1 -1
- package/dist/at/index.js +9 -10
- package/dist/attestation/index.js +37 -26
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-XKCXVKV3.js → backup-YE2VQ26S.js} +15 -16
- package/dist/backup-YE2VQ26S.js.map +1 -0
- package/dist/blobs/index.js +13 -14
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -13
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/capsule/contract.d.ts +159 -0
- package/dist/capsule/contract.js +95 -0
- package/dist/capsule/enclave-aes/bound.d.ts +52 -0
- package/dist/capsule/enclave-aes/capabilities.d.ts +2 -0
- package/dist/capsule/enclave-aes/classify/compare.d.ts +20 -0
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/find.d.ts +1 -1
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/reveal.d.ts +1 -1
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/verify.d.ts +2 -2
- package/dist/{kernel/enclave → capsule/enclave-aes}/classify/write.d.ts +1 -1
- package/dist/{kernel/enclave → capsule/enclave-aes}/crypto.d.ts +33 -129
- package/dist/capsule/enclave-aes/index.d.ts +113 -0
- package/dist/capsule/enclave-aes/index.js +335 -0
- package/dist/capsule/enclave-aes/index.js.map +1 -0
- package/dist/capsule/enclave-aes/primitives.d.ts +29 -0
- package/dist/capsule/index.d.ts +27 -0
- package/dist/capsule/plumbing/ct-equal.d.ts +11 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/deterministic.d.ts +8 -21
- package/dist/capsule/plumbing/digest.d.ts +122 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/envelope-body.d.ts +44 -48
- package/dist/capsule/plumbing/index.d.ts +100 -0
- package/dist/capsule/plumbing/lifecycle.d.ts +50 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/record-codec.d.ts +80 -20
- package/dist/{kernel/enclave → capsule/plumbing}/record-envelope.d.ts +1 -1
- package/dist/capsule/plumbing/rekey-blob.d.ts +33 -0
- package/dist/capsule/plumbing/rekey.d.ts +44 -0
- package/dist/capsule/plumbing/sealed-slot.d.ts +22 -0
- package/dist/capsule/plumbing/sealed-slots.d.ts +37 -0
- package/dist/capsule/plumbing/sealing.d.ts +29 -0
- package/dist/capsule/plumbing/sign.d.ts +9 -0
- package/dist/{kernel/enclave/record-keys → capsule/plumbing}/tombstone.d.ts +2 -2
- package/dist/capsule-VOLX3QRQ.js +209 -0
- package/dist/cargo/index.js +39 -36
- package/dist/{chunk-Q2MPFCQ7.js → chunk-23D6M6VM.js} +5 -5
- package/dist/chunk-23D6M6VM.js.map +1 -0
- package/dist/{chunk-R7BX2NB3.js → chunk-244QBK7Z.js} +4 -4
- package/dist/chunk-244QBK7Z.js.map +1 -0
- package/dist/chunk-2AFX33YA.js +936 -0
- package/dist/chunk-2AFX33YA.js.map +1 -0
- package/dist/{chunk-MVMXZYXT.js → chunk-2GHDLTPE.js} +2 -2
- package/dist/{chunk-GYGLAVCX.js → chunk-2MG3SW7Q.js} +6 -2
- package/dist/chunk-2MG3SW7Q.js.map +1 -0
- package/dist/{chunk-XLMEZIAJ.js → chunk-2ODVB6LZ.js} +2 -2
- package/dist/{chunk-HJUWN7JN.js → chunk-2PVXF5CS.js} +33 -8
- package/dist/chunk-2PVXF5CS.js.map +1 -0
- package/dist/{chunk-YJRT5UQM.js → chunk-2RH777HH.js} +21 -20
- package/dist/{chunk-YJRT5UQM.js.map → chunk-2RH777HH.js.map} +1 -1
- package/dist/{chunk-7O3Y4PPD.js → chunk-37EPTBBR.js} +153 -16
- package/dist/chunk-37EPTBBR.js.map +1 -0
- package/dist/{chunk-2ENE6445.js → chunk-3A5DUZ56.js} +102 -16
- package/dist/chunk-3A5DUZ56.js.map +1 -0
- package/dist/chunk-3EWS67C7.js +461 -0
- package/dist/chunk-3EWS67C7.js.map +1 -0
- package/dist/{chunk-SGZAIJCV.js → chunk-3L2NBKDR.js} +4 -8
- package/dist/chunk-3L2NBKDR.js.map +1 -0
- package/dist/{chunk-YMUFFJCO.js → chunk-3TDUWVWB.js} +5 -2
- package/dist/chunk-3TDUWVWB.js.map +1 -0
- package/dist/{chunk-4GVM6QZA.js → chunk-3XJQBBZD.js} +26 -28
- package/dist/chunk-3XJQBBZD.js.map +1 -0
- package/dist/{chunk-4ZS56W5S.js → chunk-42ALPZ2B.js} +672 -664
- package/dist/chunk-42ALPZ2B.js.map +1 -0
- package/dist/chunk-4CIQDWRB.js +524 -0
- package/dist/chunk-4CIQDWRB.js.map +1 -0
- package/dist/{chunk-RMS3NEA3.js → chunk-4JPMZTJY.js} +2 -2
- package/dist/{chunk-P3MG6QCN.js → chunk-4T3SE27M.js} +5 -9
- package/dist/chunk-4T3SE27M.js.map +1 -0
- package/dist/chunk-4V3Q35WG.js +204 -0
- package/dist/chunk-4V3Q35WG.js.map +1 -0
- package/dist/{chunk-NQKIUNW5.js → chunk-52MGURXO.js} +2 -2
- package/dist/{chunk-EQEYOJBM.js → chunk-5A4345TG.js} +4 -4
- package/dist/chunk-5A4345TG.js.map +1 -0
- package/dist/{chunk-334WSVOW.js → chunk-5FE75J4S.js} +6 -6
- package/dist/chunk-5FE75J4S.js.map +1 -0
- package/dist/chunk-5KC7QYEC.js +565 -0
- package/dist/chunk-5KC7QYEC.js.map +1 -0
- package/dist/{chunk-RSGLUIO6.js → chunk-5UMK7GRI.js} +13 -12
- package/dist/chunk-5UMK7GRI.js.map +1 -0
- package/dist/chunk-5WWDGFOS.js +275 -0
- package/dist/chunk-5WWDGFOS.js.map +1 -0
- package/dist/{chunk-QPQUVOZ2.js → chunk-6QVKPHBF.js} +3 -5
- package/dist/chunk-6QVKPHBF.js.map +1 -0
- package/dist/{chunk-ACAQ2DSG.js → chunk-747G6CT3.js} +2 -2
- package/dist/chunk-747G6CT3.js.map +1 -0
- package/dist/{chunk-QTQUH4DS.js → chunk-7R2Q7CPL.js} +16 -16
- package/dist/chunk-7R2Q7CPL.js.map +1 -0
- package/dist/{chunk-UGTBXF5U.js → chunk-7XMHMVTS.js} +3 -3
- package/dist/{chunk-YJX7EOJD.js → chunk-A4XMIZT3.js} +6 -6
- package/dist/{chunk-YJX7EOJD.js.map → chunk-A4XMIZT3.js.map} +1 -1
- package/dist/{chunk-A66I4JOA.js → chunk-AEQGFRU4.js} +4 -4
- package/dist/chunk-AEQGFRU4.js.map +1 -0
- package/dist/chunk-AL6ML4LA.js +1558 -0
- package/dist/chunk-AL6ML4LA.js.map +1 -0
- package/dist/{chunk-BZ3534YM.js → chunk-AUKKUPVB.js} +2 -2
- package/dist/{chunk-CUZLNGD5.js → chunk-B2YY6WDD.js} +1 -1
- package/dist/chunk-B2YY6WDD.js.map +1 -0
- package/dist/chunk-BKT776R5.js +1 -0
- package/dist/chunk-BNWA3WG5.js +22 -0
- package/dist/chunk-BNWA3WG5.js.map +1 -0
- package/dist/{chunk-VXANTWBJ.js → chunk-BPWYQ25R.js} +92 -6
- package/dist/{chunk-VXANTWBJ.js.map → chunk-BPWYQ25R.js.map} +1 -1
- package/dist/{chunk-6LKOJBV6.js → chunk-BVCUTXE3.js} +2 -2
- package/dist/chunk-CY2CYVWZ.js +41 -0
- package/dist/chunk-CY2CYVWZ.js.map +1 -0
- package/dist/{chunk-M4YPHYEH.js → chunk-DHHGL42E.js} +70 -25
- package/dist/chunk-DHHGL42E.js.map +1 -0
- package/dist/{chunk-VTFVLCUH.js → chunk-DIZLQVAA.js} +2 -2
- package/dist/{chunk-G73UVHCA.js → chunk-DLD5LGDS.js} +11 -12
- package/dist/chunk-DLD5LGDS.js.map +1 -0
- package/dist/{chunk-WQBG4SZS.js → chunk-DQESF6RP.js} +60 -49
- package/dist/chunk-DQESF6RP.js.map +1 -0
- package/dist/{chunk-LWBCUYZW.js → chunk-E2N2T5ZO.js} +2 -2
- package/dist/{chunk-3PGS7TYR.js → chunk-EGVJ7TM4.js} +29 -32
- package/dist/chunk-EGVJ7TM4.js.map +1 -0
- package/dist/{chunk-JVIBCBC7.js → chunk-EJLV62NI.js} +2 -2
- package/dist/{chunk-KKEESNPE.js → chunk-EYG2CY2X.js} +126 -19
- package/dist/chunk-EYG2CY2X.js.map +1 -0
- package/dist/{enclave-55PAM4YO.js → chunk-EZGV6F47.js} +83 -56
- package/dist/chunk-EZGV6F47.js.map +1 -0
- package/dist/{chunk-CHQCZZWC.js → chunk-EZOAKKTB.js} +36 -27
- package/dist/chunk-EZOAKKTB.js.map +1 -0
- package/dist/chunk-F6NCB7KT.js +13 -0
- package/dist/chunk-F6NCB7KT.js.map +1 -0
- package/dist/chunk-FFJFE4T7.js +100 -0
- package/dist/chunk-FFJFE4T7.js.map +1 -0
- package/dist/{chunk-JMGDHKQF.js → chunk-FLPCETP6.js} +2 -2
- package/dist/chunk-FOEDQATO.js +53 -0
- package/dist/chunk-FOEDQATO.js.map +1 -0
- package/dist/{chunk-DGOZ4UZD.js → chunk-FVH5QYY2.js} +2 -2
- package/dist/{chunk-HIWCKBEY.js → chunk-G2MVBDFP.js} +54 -28
- package/dist/chunk-G2MVBDFP.js.map +1 -0
- package/dist/chunk-GMKGGY7V.js +234 -0
- package/dist/chunk-GMKGGY7V.js.map +1 -0
- package/dist/{chunk-EIPVYUEP.js → chunk-GQ4MF3CM.js} +3 -3
- package/dist/chunk-GQ4MF3CM.js.map +1 -0
- package/dist/{chunk-PEOZ34EM.js → chunk-GSAK56VF.js} +1 -1
- package/dist/chunk-GSAK56VF.js.map +1 -0
- package/dist/{chunk-5VCRVKOZ.js → chunk-GUZET4SG.js} +12 -4
- package/dist/chunk-GUZET4SG.js.map +1 -0
- package/dist/{chunk-JBDFMYKQ.js → chunk-GZT3NQRA.js} +2 -2
- package/dist/{chunk-K23VKTN4.js → chunk-H23XHRTT.js} +19 -34
- package/dist/chunk-H23XHRTT.js.map +1 -0
- package/dist/{chunk-TFR7DSOV.js → chunk-H427H63K.js} +2 -2
- package/dist/{chunk-DFMWUOU5.js → chunk-H7JBY4P7.js} +23 -32
- package/dist/chunk-H7JBY4P7.js.map +1 -0
- package/dist/{chunk-SKGMN35F.js → chunk-HS554XAF.js} +3 -3
- package/dist/chunk-HS554XAF.js.map +1 -0
- package/dist/{chunk-HK67PX4J.js → chunk-HW7CMKUG.js} +1 -1
- package/dist/chunk-HW7CMKUG.js.map +1 -0
- package/dist/{chunk-3BVH633C.js → chunk-IMQKWR46.js} +5 -7
- package/dist/chunk-IMQKWR46.js.map +1 -0
- package/dist/{chunk-R42NSZI6.js → chunk-IUBMZPHM.js} +7 -7
- package/dist/chunk-IUBMZPHM.js.map +1 -0
- package/dist/{chunk-CUQPWYRX.js → chunk-IUT3GWP3.js} +75 -386
- package/dist/chunk-IUT3GWP3.js.map +1 -0
- package/dist/{chunk-RF6D3Y5E.js → chunk-JDEYF3PJ.js} +4 -8
- package/dist/{chunk-RF6D3Y5E.js.map → chunk-JDEYF3PJ.js.map} +1 -1
- package/dist/{chunk-PPTHY5QO.js → chunk-JIBUPZHA.js} +99 -8
- package/dist/chunk-JIBUPZHA.js.map +1 -0
- package/dist/{chunk-SMH6SRX7.js → chunk-JOSPH3E5.js} +2 -2
- package/dist/chunk-JQYKPKG6.js +193 -0
- package/dist/chunk-JQYKPKG6.js.map +1 -0
- package/dist/{chunk-7APJ6CO6.js → chunk-JSMTXZR3.js} +45 -13
- package/dist/chunk-JSMTXZR3.js.map +1 -0
- package/dist/chunk-JWWYRR4Q.js +12 -0
- package/dist/chunk-JWWYRR4Q.js.map +1 -0
- package/dist/{chunk-BVN6KXL2.js → chunk-KZXDLBY6.js} +14 -9
- package/dist/chunk-KZXDLBY6.js.map +1 -0
- package/dist/chunk-LGNDFRYC.js +23 -0
- package/dist/chunk-LGNDFRYC.js.map +1 -0
- package/dist/{chunk-XKWGNJ26.js → chunk-LIOVX5TJ.js} +7 -11
- package/dist/chunk-LIOVX5TJ.js.map +1 -0
- package/dist/{chunk-AYX7AINO.js → chunk-LNSVGRHO.js} +5 -7
- package/dist/chunk-LNSVGRHO.js.map +1 -0
- package/dist/chunk-M5B2W6YY.js +293 -0
- package/dist/chunk-M5B2W6YY.js.map +1 -0
- package/dist/chunk-MBMTND6D.js +456 -0
- package/dist/chunk-MBMTND6D.js.map +1 -0
- package/dist/{chunk-3BZZJJMQ.js → chunk-MILI22XQ.js} +3 -3
- package/dist/{chunk-A2HKRLPV.js → chunk-MXKI4ABF.js} +18 -59
- package/dist/chunk-MXKI4ABF.js.map +1 -0
- package/dist/{chunk-ZYIYHJ5R.js → chunk-MXOQ5JCG.js} +869 -238
- package/dist/chunk-MXOQ5JCG.js.map +1 -0
- package/dist/{chunk-V7ZRRCRJ.js → chunk-N7EVQD5S.js} +9 -13
- package/dist/chunk-N7EVQD5S.js.map +1 -0
- package/dist/chunk-N7UDP5VU.js +757 -0
- package/dist/chunk-N7UDP5VU.js.map +1 -0
- package/dist/chunk-NBQ3KK6X.js +270 -0
- package/dist/chunk-NBQ3KK6X.js.map +1 -0
- package/dist/{chunk-ZORTV6NH.js → chunk-NCO25JZO.js} +88 -4
- package/dist/chunk-NCO25JZO.js.map +1 -0
- package/dist/chunk-NH2UOV3B.js +18 -0
- package/dist/chunk-NH2UOV3B.js.map +1 -0
- package/dist/chunk-NYMLINRP.js +28 -0
- package/dist/chunk-NYMLINRP.js.map +1 -0
- package/dist/{chunk-YYP7WSEB.js → chunk-O2IMQSNA.js} +2 -2
- package/dist/chunk-O46CHQT7.js +215 -0
- package/dist/chunk-O46CHQT7.js.map +1 -0
- package/dist/chunk-OIEO4WDL.js +27 -0
- package/dist/chunk-OIEO4WDL.js.map +1 -0
- package/dist/{chunk-TRGTKX5E.js → chunk-OKSTSITU.js} +27 -4
- package/dist/chunk-OKSTSITU.js.map +1 -0
- package/dist/chunk-OYW3I5M4.js +31 -0
- package/dist/chunk-OYW3I5M4.js.map +1 -0
- package/dist/{chunk-Q7HZX3IF.js → chunk-PD64727P.js} +2 -2
- package/dist/chunk-PD64727P.js.map +1 -0
- package/dist/{chunk-FET5XCAT.js → chunk-PP3K67AJ.js} +34 -6
- package/dist/chunk-PP3K67AJ.js.map +1 -0
- package/dist/chunk-Q2XRFWOI.js +40 -0
- package/dist/chunk-Q2XRFWOI.js.map +1 -0
- package/dist/{chunk-QIZPZMUI.js → chunk-Q4UHJ5SN.js} +2 -2
- package/dist/{chunk-FAHMLERK.js → chunk-QBLT6POL.js} +2 -2
- package/dist/chunk-QMWY2FDS.js +157 -0
- package/dist/chunk-QMWY2FDS.js.map +1 -0
- package/dist/{chunk-LH5A3ZPG.js → chunk-RB4DOPGZ.js} +150 -22
- package/dist/chunk-RB4DOPGZ.js.map +1 -0
- package/dist/chunk-RHVMZSUU.js +7 -0
- package/dist/chunk-RHVMZSUU.js.map +1 -0
- package/dist/{chunk-BUE2D7PX.js → chunk-SMV2HRDU.js} +2 -2
- package/dist/chunk-SUZKW6UR.js +25 -0
- package/dist/chunk-SUZKW6UR.js.map +1 -0
- package/dist/{chunk-7MG7SJT7.js → chunk-SV2PM2OY.js} +1 -1
- package/dist/chunk-SV2PM2OY.js.map +1 -0
- package/dist/{chunk-UXVWEX5L.js → chunk-SYNY3VB5.js} +6 -2
- package/dist/chunk-SYNY3VB5.js.map +1 -0
- package/dist/{chunk-4GFX6MPA.js → chunk-TEHHROZL.js} +6 -8
- package/dist/chunk-TEHHROZL.js.map +1 -0
- package/dist/chunk-TKVUE4JF.js +1289 -0
- package/dist/chunk-TKVUE4JF.js.map +1 -0
- package/dist/{chunk-SFAWCTEM.js → chunk-TZZBXPZK.js} +2 -2
- package/dist/{chunk-F3W6YMDC.js → chunk-U2FZNEWJ.js} +4 -4
- package/dist/chunk-U2FZNEWJ.js.map +1 -0
- package/dist/{chunk-BLN54W3L.js → chunk-UA372JHH.js} +56 -3
- package/dist/chunk-UA372JHH.js.map +1 -0
- package/dist/{chunk-6YXCPL4T.js → chunk-UEFOQH74.js} +2 -2
- package/dist/chunk-UEFOQH74.js.map +1 -0
- package/dist/{chunk-2N5ML6HT.js → chunk-UIYESRD6.js} +9 -11
- package/dist/chunk-UIYESRD6.js.map +1 -0
- package/dist/{chunk-UHHPLO3I.js → chunk-V3RWOOSO.js} +4 -4
- package/dist/{chunk-KTFRCC5C.js → chunk-V7ADQF5O.js} +82 -8
- package/dist/chunk-V7ADQF5O.js.map +1 -0
- package/dist/{chunk-453F654R.js → chunk-VAORSCSU.js} +3 -3
- package/dist/chunk-VAORSCSU.js.map +1 -0
- package/dist/{chunk-GPNTB4Y7.js → chunk-VFHCKG5M.js} +6 -10
- package/dist/chunk-VFHCKG5M.js.map +1 -0
- package/dist/{chunk-2577DKXB.js → chunk-VHBKYN2J.js} +3 -3
- package/dist/chunk-VHBKYN2J.js.map +1 -0
- package/dist/chunk-VHM7HCKB.js +220 -0
- package/dist/chunk-VHM7HCKB.js.map +1 -0
- package/dist/{chunk-ZHKOPKE3.js → chunk-VKI2EB3N.js} +3 -3
- package/dist/chunk-VKI2EB3N.js.map +1 -0
- package/dist/{chunk-UDHWDSRL.js → chunk-VMV5SBE4.js} +16 -17
- package/dist/chunk-VMV5SBE4.js.map +1 -0
- package/dist/{chunk-SPYWXKJN.js → chunk-VQDZYB2B.js} +3 -3
- package/dist/chunk-VQDZYB2B.js.map +1 -0
- package/dist/{chunk-Q2PU57HC.js → chunk-VVOLDVIR.js} +2 -2
- package/dist/{chunk-3VF3WQ4F.js → chunk-WPOYWFSE.js} +7 -7
- package/dist/{chunk-3VF3WQ4F.js.map → chunk-WPOYWFSE.js.map} +1 -1
- package/dist/{chunk-OTQZ7ZWU.js → chunk-WXE4W2U6.js} +7 -11
- package/dist/chunk-WXE4W2U6.js.map +1 -0
- package/dist/chunk-XBKH4FOC.js +195 -0
- package/dist/chunk-XBKH4FOC.js.map +1 -0
- package/dist/{chunk-TUFM4UZP.js → chunk-XQRFSKYM.js} +2 -2
- package/dist/{chunk-3V4KWFX7.js → chunk-XSPFDUDG.js} +58 -53
- package/dist/chunk-XSPFDUDG.js.map +1 -0
- package/dist/{chunk-GY4WYNNG.js → chunk-Y2RKVFKR.js} +2 -2
- package/dist/{chunk-UP4BECPY.js → chunk-Y3LPTBG7.js} +89 -27
- package/dist/chunk-Y3LPTBG7.js.map +1 -0
- package/dist/{chunk-4OZNXTO4.js → chunk-YRXFFWG4.js} +2 -2
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-BWOFVYAC.js → classified-marker-SIYKUU5L.js} +3 -3
- package/dist/classified-marker-SIYKUU5L.js.map +1 -0
- package/dist/collection-facade-CS7CA2XO.js +47 -0
- package/dist/{computed-VPOKQK4N.js → computed-FAD7SED4.js} +3 -3
- package/dist/consent/index.js +10 -11
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +10 -11
- package/dist/coverage/index.js +306 -0
- package/dist/coverage/index.js.map +1 -0
- package/dist/custody/index.js +12 -13
- package/dist/{dead-filter-PKQDLOT4.js → dead-filter-4F3LWYKH.js} +11 -3
- package/dist/dead-filter-4F3LWYKH.js.map +1 -0
- package/dist/debug/index.js +11 -2
- package/dist/debug/index.js.map +1 -1
- package/dist/{delegation-DS5NRILW.js → delegation-NANZDG4N.js} +13 -16
- package/dist/delegation-NANZDG4N.js.map +1 -0
- package/dist/derivations/index.js +25 -23
- package/dist/derive-XLOJVXPU.js +20 -0
- package/dist/directory/index.js +10 -11
- package/dist/{dispatch-IEPAVQUM.js → dispatch-H4HV32AM.js} +5 -5
- package/dist/{dispatch-Q6MWLOJY.js → dispatch-JDZNGEB3.js} +20 -21
- package/dist/dispatch-JDZNGEB3.js.map +1 -0
- package/dist/executor-FMPVN6DT.js +35 -0
- package/dist/executor-LBBBRTN5.js +8 -0
- package/dist/executor-OSRZST2U.js +8 -0
- package/dist/export-accessible-RAOJAAU5.js +22 -0
- package/dist/extract-partition-JD5CUSTG.js +37 -0
- package/dist/{fanout-sidecar-S3QL53YX.js → fanout-sidecar-L7NHPIOC.js} +13 -15
- package/dist/fanout-sidecar-L7NHPIOC.js.map +1 -0
- package/dist/find-JRN4RNQ5.js +10 -0
- package/dist/forget/index.js +9 -10
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +13 -14
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +36 -14
- package/dist/index.js +970 -163
- 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 -12
- package/dist/issue-YIVBZUTH.js +19 -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/attestation-types.d.ts +62 -0
- package/dist/kernel/collection-config.d.ts +5 -68
- package/dist/kernel/collection.d.ts +30 -9
- package/dist/kernel/cutover-transform.d.ts +1 -1
- package/dist/kernel/errors.d.ts +257 -38
- package/dist/kernel/generation-map.d.ts +48 -0
- package/dist/kernel/merge-authority.d.ts +1 -1
- package/dist/kernel/noydb.d.ts +6 -1
- package/dist/kernel/paths.d.ts +29 -5
- package/dist/kernel/prepared-write.d.ts +1 -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/secret-mode.d.ts +1 -1
- package/dist/kernel/tx-write-gate.d.ts +77 -0
- package/dist/kernel/types.d.ts +113 -8
- package/dist/kernel/validation.d.ts +27 -10
- package/dist/kernel/vault.d.ts +11 -6
- 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/kernel/write-queue.d.ts +17 -0
- package/dist/{ledger-EDXFFZQL.js → ledger-5ZMGE44K.js} +11 -12
- package/dist/liberate-WZSZM2W6.js +24 -0
- package/dist/link-set-MFXC24VK.js +29 -0
- package/dist/{managed-secret-NCWEMPUQ.js → managed-secret-MFTFT22X.js} +10 -11
- package/dist/materialized-views/index.js +30 -24
- package/dist/{migrate-cek-5ENH64AA.js → migrate-cek-DZRFFOHW.js} +2 -2
- package/dist/money/index.js +5 -5
- package/dist/noydb-ITIGNKUF.js +96 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -13
- package/dist/pod/index.js +74 -67
- package/dist/{pod-handle-ECVCDIXW.js → pod-handle-A3LET7NO.js} +10 -11
- package/dist/pod-handle-A3LET7NO.js.map +1 -0
- package/dist/policy/index.js +10 -11
- package/dist/port/on/index.d.ts +1 -1
- package/dist/port/to/index.d.ts +1 -1
- package/dist/port/with/blob-strategy.d.ts +10 -1
- package/dist/port/with/classified-strategy.d.ts +1 -1
- package/dist/port/with/collection-options.d.ts +6 -1
- package/dist/port/with/collection-registries.d.ts +1 -1
- package/dist/port/with/coverage-strategy.d.ts +83 -0
- package/dist/port/with/lookup-strategy.d.ts +2 -2
- 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-3IPCSG6Q.js → post-register-7ND27CF2.js} +6 -6
- package/dist/post-register-7ND27CF2.js.map +1 -0
- 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-DT5HZ2LZ.js +30 -0
- package/dist/registry-BHRZGZHF.js +8 -0
- package/dist/registry-ET6ZFFWA.js +34 -0
- package/dist/registry-HXFGLGTG.js +8 -0
- package/dist/registry-THCPDEOD.js +23 -0
- package/dist/request-withdrawal-AV2MJJKY.js +30 -0
- package/dist/{reveal-QZDHSGD4.js → reveal-B2TLP4JQ.js} +10 -9
- package/dist/reveal-B2TLP4JQ.js.map +1 -0
- package/dist/revoke-6DWIEOCV.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +16 -18
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +11 -5
- package/dist/{seed-X5CC22CQ.js → seed-XNSE4U3S.js} +15 -18
- package/dist/seed-XNSE4U3S.js.map +1 -0
- package/dist/sequence/index.js +9 -10
- package/dist/session/index.js +9 -10
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +2 -2
- package/dist/signer-MHGW3OIL.js +23 -0
- package/dist/snapshots/index.js +11 -11
- package/dist/stale-6GCFMOOR.js +28 -0
- package/dist/storage-BYN5LO6Z.js +21 -0
- package/dist/storage-BYN5LO6Z.js.map +1 -0
- package/dist/store/index.js +1 -1
- package/dist/{store-coordination-provider-4WZAIRHC.js → store-coordination-provider-C4BPT5XF.js} +11 -12
- package/dist/store-coordination-provider-C4BPT5XF.js.map +1 -0
- package/dist/sync/index.js +10 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +17 -16
- package/dist/tiers/index.js +13 -12
- 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 +11 -14
- package/dist/vault-head/index.js.map +1 -1
- package/dist/{verify-6MDTIUEV.js → verify-UKALW7C2.js} +14 -12
- package/dist/verify-UKALW7C2.js.map +1 -0
- package/dist/via/blob/index.d.ts +1 -0
- package/dist/via/classified/binding.d.ts +2 -2
- package/dist/via/classified/config-drift.d.ts +2 -2
- package/dist/via/classified/errors.d.ts +1 -1
- 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/handle.d.ts +4 -4
- package/dist/via/lookup/registry.d.ts +1 -1
- package/dist/via/lookup/snapshot.d.ts +3 -3
- package/dist/walk-4VPK7AS4.js +20 -0
- package/dist/walk-4VPK7AS4.js.map +1 -0
- package/dist/with-audit/attestation/index.d.ts +2 -1
- package/dist/with-audit/attestation/issue.d.ts +2 -2
- package/dist/with-audit/attestation/revoke.d.ts +2 -2
- package/dist/with-audit/attestation/scheme.d.ts +7 -0
- package/dist/with-audit/attestation/signer.d.ts +1 -1
- package/dist/with-audit/attestation/strategy.d.ts +2 -2
- package/dist/with-audit/attestation/types.d.ts +10 -0
- package/dist/with-audit/attestation/vault-facade.d.ts +2 -2
- package/dist/with-audit/attestation/verifier.d.ts +6 -0
- package/dist/with-audit/consent/consent.d.ts +1 -1
- package/dist/with-audit/consent/strategy.d.ts +1 -1
- 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/forget/subject-index.d.ts +1 -1
- 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 +18 -1
- package/dist/with-audit/sealed-record/index.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-audit/tiers/index.d.ts +53 -2
- package/dist/with-audit/tiers/strategy.d.ts +8 -0
- package/dist/with-cargo/adopt-partition.d.ts +1 -1
- package/dist/with-cargo/extract-partition.d.ts +1 -1
- package/dist/with-cargo/floor.d.ts +3 -3
- package/dist/with-commit/history/history.d.ts +2 -2
- package/dist/with-commit/history/index.d.ts +1 -1
- package/dist/with-commit/history/ledger/store.d.ts +1 -1
- package/dist/with-commit/history/strategy.d.ts +1 -1
- package/dist/with-commit/history/time-machine.d.ts +1 -1
- package/dist/with-commit/numbering/index.d.ts +1 -1
- package/dist/with-commit/sequence/index.d.ts +1 -1
- package/dist/with-commit/tx/invariants.d.ts +1 -1
- package/dist/with-commit/tx/transaction.d.ts +13 -3
- package/dist/with-commit/vault-head/head.d.ts +1 -1
- package/dist/with-commit/vault-head/index.d.ts +1 -1
- package/dist/with-commit/vault-head/strategy.d.ts +1 -1
- package/dist/with-commit/vault-head/verify.d.ts +1 -1
- package/dist/with-formula/derivations/dispatch.d.ts +1 -1
- package/dist/with-formula/derivations/fanout-sidecar.d.ts +1 -1
- 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 +86 -3
- 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 +45 -9
- 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/broker/index.d.ts +3 -3
- 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/directory/user-envelope/storage.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/delegation.d.ts +1 -1
- package/dist/with-party/team/echo-secret.d.ts +2 -2
- package/dist/with-party/team/index.d.ts +4 -3
- package/dist/with-party/team/keyring.d.ts +2 -2
- package/dist/with-party/team/magic-link-grant.d.ts +1 -1
- 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/recovery.d.ts +1 -1
- package/dist/with-party/team/roster-tag.d.ts +1 -1
- package/dist/with-party/team/rotate-recover.d.ts +1 -1
- package/dist/with-party/team/wrapped-deks.d.ts +1 -1
- package/dist/with-pod/format.d.ts +1 -1
- package/dist/with-pod/index.d.ts +1 -1
- package/dist/with-pod/pod.d.ts +1 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +17 -1
- package/dist/with-shape/blobs/blob-intent.d.ts +1 -1
- package/dist/with-shape/blobs/blob-set.d.ts +23 -4
- package/dist/with-shape/blobs/legacy-sweep.d.ts +35 -0
- package/dist/with-shape/introspection/describe.d.ts +7 -1
- 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/introspection/walk.d.ts +1 -1
- package/dist/with-shape/links/lazy-handle.d.ts +1 -1
- package/dist/with-shape/links/link-set.d.ts +1 -1
- package/dist/with-shape/links/vault-facade.d.ts +1 -1
- package/dist/with-shape/manifest/derive.d.ts +1 -1
- package/dist/with-shape/manifest/storage.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/register.d.ts +1 -1
- package/dist/with-shape/persisted-schemas/storage.d.ts +1 -1
- package/dist/with-shape/satellites/dead-filter.d.ts +1 -1
- package/dist/with-shape/satellites/declare.d.ts +1 -1
- package/dist/with-shape/satellites/marker.d.ts +1 -1
- package/dist/with-shape/satellites/post-register.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/with-sync/presence.d.ts +5 -10
- package/dist/withdraw-accessible-HL7GACUE.js +27 -0
- package/dist/withdraw-accessible-HL7GACUE.js.map +1 -0
- package/package.json +48 -12
- package/dist/api-WYW4YEQG.js +0 -19
- package/dist/backup-XKCXVKV3.js.map +0 -1
- package/dist/chunk-2577DKXB.js.map +0 -1
- package/dist/chunk-2ENE6445.js.map +0 -1
- package/dist/chunk-2N5ML6HT.js.map +0 -1
- package/dist/chunk-334WSVOW.js.map +0 -1
- package/dist/chunk-3BVH633C.js.map +0 -1
- package/dist/chunk-3PGS7TYR.js.map +0 -1
- package/dist/chunk-3V4KWFX7.js.map +0 -1
- package/dist/chunk-453F654R.js.map +0 -1
- package/dist/chunk-4GFX6MPA.js.map +0 -1
- package/dist/chunk-4GVM6QZA.js.map +0 -1
- package/dist/chunk-4ZS56W5S.js.map +0 -1
- package/dist/chunk-5VCRVKOZ.js.map +0 -1
- package/dist/chunk-6YXCPL4T.js.map +0 -1
- package/dist/chunk-7APJ6CO6.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-A2HKRLPV.js.map +0 -1
- package/dist/chunk-A66I4JOA.js.map +0 -1
- package/dist/chunk-ACAQ2DSG.js.map +0 -1
- package/dist/chunk-ATL3ZVXT.js +0 -151
- package/dist/chunk-ATL3ZVXT.js.map +0 -1
- package/dist/chunk-AYX7AINO.js.map +0 -1
- package/dist/chunk-BLN54W3L.js.map +0 -1
- package/dist/chunk-BRLKZUBT.js +0 -95
- package/dist/chunk-BRLKZUBT.js.map +0 -1
- package/dist/chunk-BTDR2PXY.js +0 -29
- package/dist/chunk-BTDR2PXY.js.map +0 -1
- package/dist/chunk-BVN6KXL2.js.map +0 -1
- package/dist/chunk-CHQCZZWC.js.map +0 -1
- package/dist/chunk-CUQPWYRX.js.map +0 -1
- package/dist/chunk-CUZLNGD5.js.map +0 -1
- package/dist/chunk-DFMWUOU5.js.map +0 -1
- package/dist/chunk-EIPVYUEP.js.map +0 -1
- package/dist/chunk-EQEYOJBM.js.map +0 -1
- package/dist/chunk-F3W6YMDC.js.map +0 -1
- package/dist/chunk-FET5XCAT.js.map +0 -1
- package/dist/chunk-G73UVHCA.js.map +0 -1
- package/dist/chunk-GPNTB4Y7.js.map +0 -1
- package/dist/chunk-GYGLAVCX.js.map +0 -1
- package/dist/chunk-HIWCKBEY.js.map +0 -1
- package/dist/chunk-HJUWN7JN.js.map +0 -1
- package/dist/chunk-HK67PX4J.js.map +0 -1
- package/dist/chunk-HPVZCW43.js +0 -479
- package/dist/chunk-HPVZCW43.js.map +0 -1
- package/dist/chunk-I3ISCYT7.js +0 -159
- package/dist/chunk-I3ISCYT7.js.map +0 -1
- package/dist/chunk-K23VKTN4.js.map +0 -1
- package/dist/chunk-KKEESNPE.js.map +0 -1
- package/dist/chunk-KTFRCC5C.js.map +0 -1
- package/dist/chunk-LH5A3ZPG.js.map +0 -1
- package/dist/chunk-LP7BEXCT.js +0 -32
- package/dist/chunk-LP7BEXCT.js.map +0 -1
- package/dist/chunk-M4YPHYEH.js.map +0 -1
- package/dist/chunk-NSITFOCJ.js +0 -99
- package/dist/chunk-NSITFOCJ.js.map +0 -1
- package/dist/chunk-OTQZ7ZWU.js.map +0 -1
- package/dist/chunk-P3MG6QCN.js.map +0 -1
- package/dist/chunk-PEOZ34EM.js.map +0 -1
- package/dist/chunk-PPTHY5QO.js.map +0 -1
- package/dist/chunk-Q2MPFCQ7.js.map +0 -1
- package/dist/chunk-Q7HZX3IF.js.map +0 -1
- package/dist/chunk-QPQUVOZ2.js.map +0 -1
- package/dist/chunk-QTQUH4DS.js.map +0 -1
- package/dist/chunk-R42NSZI6.js.map +0 -1
- package/dist/chunk-R7BX2NB3.js.map +0 -1
- package/dist/chunk-RSGLUIO6.js.map +0 -1
- package/dist/chunk-RTBJ5IOO.js +0 -87
- package/dist/chunk-RTBJ5IOO.js.map +0 -1
- package/dist/chunk-SGZAIJCV.js.map +0 -1
- package/dist/chunk-SKGMN35F.js.map +0 -1
- package/dist/chunk-SPYWXKJN.js.map +0 -1
- package/dist/chunk-SZJ3DLZA.js +0 -66
- package/dist/chunk-SZJ3DLZA.js.map +0 -1
- package/dist/chunk-TRGTKX5E.js.map +0 -1
- package/dist/chunk-UDHWDSRL.js.map +0 -1
- package/dist/chunk-UP4BECPY.js.map +0 -1
- package/dist/chunk-UXVWEX5L.js.map +0 -1
- package/dist/chunk-V7ZRRCRJ.js.map +0 -1
- package/dist/chunk-WQBG4SZS.js.map +0 -1
- package/dist/chunk-XKWGNJ26.js.map +0 -1
- package/dist/chunk-YMUFFJCO.js.map +0 -1
- package/dist/chunk-ZHKOPKE3.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/chunk-ZYIYHJ5R.js.map +0 -1
- package/dist/classified-marker-BWOFVYAC.js.map +0 -1
- package/dist/collection-facade-JSJYIKS4.js +0 -45
- package/dist/dead-filter-PKQDLOT4.js.map +0 -1
- package/dist/delegation-DS5NRILW.js.map +0 -1
- package/dist/derive-E642AOUB.js +0 -21
- package/dist/dispatch-Q6MWLOJY.js.map +0 -1
- package/dist/executor-5NIMLSKZ.js +0 -8
- package/dist/executor-7UQ3BZ4F.js +0 -29
- package/dist/executor-AQVXV5GZ.js +0 -8
- package/dist/export-accessible-ORMKLA3E.js +0 -22
- package/dist/extract-partition-NKYO3WNG.js +0 -37
- package/dist/fanout-sidecar-S3QL53YX.js.map +0 -1
- package/dist/find-NOGJ25VX.js +0 -10
- package/dist/issue-3DTQ7VJJ.js +0 -18
- package/dist/json-schema-V3M5MUCM.js.map +0 -1
- package/dist/kernel/enclave/classify/compare.d.ts +0 -10
- package/dist/kernel/enclave/index.d.ts +0 -87
- package/dist/kernel/enclave/record-keys/lifecycle.d.ts +0 -124
- package/dist/kernel/enclave/record-keys/rekey-blob.d.ts +0 -88
- package/dist/kernel/enclave/record-keys/rekey.d.ts +0 -91
- package/dist/kernel/enclave/record-keys/sealed-slot.d.ts +0 -14
- package/dist/kernel/enclave/record-keys/sealed-slots.d.ts +0 -123
- package/dist/kernel/enclave/record-keys/sealing.d.ts +0 -70
- package/dist/kernel/query/join.d.ts +0 -232
- package/dist/liberate-V35QUHJP.js +0 -24
- package/dist/link-set-2TTM3IZC.js +0 -30
- package/dist/noydb-62MX4QUG.js +0 -90
- package/dist/pod-handle-ECVCDIXW.js.map +0 -1
- package/dist/post-register-3IPCSG6Q.js.map +0 -1
- package/dist/register-HHLXEQDN.js +0 -31
- package/dist/registry-23WF3TGH.js +0 -8
- package/dist/registry-4AYVUNXK.js +0 -8
- package/dist/registry-JS3YFQQM.js +0 -18
- package/dist/registry-XX2Z7B46.js +0 -32
- package/dist/request-withdrawal-CHPATE4G.js +0 -30
- package/dist/reveal-QZDHSGD4.js.map +0 -1
- package/dist/revoke-7M2VW4ON.js +0 -23
- package/dist/seed-X5CC22CQ.js.map +0 -1
- package/dist/signer-SJQJVSM6.js +0 -24
- package/dist/stale-BZS6H2RY.js +0 -29
- package/dist/storage-RW4QBS23.js +0 -22
- package/dist/store-coordination-provider-4WZAIRHC.js.map +0 -1
- package/dist/verify-6MDTIUEV.js.map +0 -1
- package/dist/walk-ZURCH6RZ.js +0 -21
- package/dist/withdraw-accessible-PXR4IXDX.js +0 -27
- /package/dist/{api-WYW4YEQG.js.map → api-OS747DS4.js.map} +0 -0
- /package/dist/{computed-VPOKQK4N.js.map → capsule/contract.js.map} +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/broker/proof.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/bidx.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/digest.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/enclave-aes}/classify/vdig.d.ts +0 -0
- /package/dist/{kernel/enclave/classify → capsule/plumbing}/kofn.d.ts +0 -0
- /package/dist/{kernel/enclave/classify → capsule/plumbing}/normalize.d.ts +0 -0
- /package/dist/{kernel/enclave → capsule/plumbing}/record-aad.d.ts +0 -0
- /package/dist/{collection-facade-JSJYIKS4.js.map → capsule-VOLX3QRQ.js.map} +0 -0
- /package/dist/{chunk-MVMXZYXT.js.map → chunk-2GHDLTPE.js.map} +0 -0
- /package/dist/{chunk-XLMEZIAJ.js.map → chunk-2ODVB6LZ.js.map} +0 -0
- /package/dist/{chunk-RMS3NEA3.js.map → chunk-4JPMZTJY.js.map} +0 -0
- /package/dist/{chunk-NQKIUNW5.js.map → chunk-52MGURXO.js.map} +0 -0
- /package/dist/{chunk-UGTBXF5U.js.map → chunk-7XMHMVTS.js.map} +0 -0
- /package/dist/{chunk-BZ3534YM.js.map → chunk-AUKKUPVB.js.map} +0 -0
- /package/dist/{derive-E642AOUB.js.map → chunk-BKT776R5.js.map} +0 -0
- /package/dist/{chunk-6LKOJBV6.js.map → chunk-BVCUTXE3.js.map} +0 -0
- /package/dist/{chunk-VTFVLCUH.js.map → chunk-DIZLQVAA.js.map} +0 -0
- /package/dist/{chunk-LWBCUYZW.js.map → chunk-E2N2T5ZO.js.map} +0 -0
- /package/dist/{chunk-JVIBCBC7.js.map → chunk-EJLV62NI.js.map} +0 -0
- /package/dist/{chunk-JMGDHKQF.js.map → chunk-FLPCETP6.js.map} +0 -0
- /package/dist/{chunk-DGOZ4UZD.js.map → chunk-FVH5QYY2.js.map} +0 -0
- /package/dist/{chunk-JBDFMYKQ.js.map → chunk-GZT3NQRA.js.map} +0 -0
- /package/dist/{chunk-TFR7DSOV.js.map → chunk-H427H63K.js.map} +0 -0
- /package/dist/{chunk-SMH6SRX7.js.map → chunk-JOSPH3E5.js.map} +0 -0
- /package/dist/{chunk-3BZZJJMQ.js.map → chunk-MILI22XQ.js.map} +0 -0
- /package/dist/{chunk-YYP7WSEB.js.map → chunk-O2IMQSNA.js.map} +0 -0
- /package/dist/{chunk-QIZPZMUI.js.map → chunk-Q4UHJ5SN.js.map} +0 -0
- /package/dist/{chunk-FAHMLERK.js.map → chunk-QBLT6POL.js.map} +0 -0
- /package/dist/{chunk-BUE2D7PX.js.map → chunk-SMV2HRDU.js.map} +0 -0
- /package/dist/{chunk-SFAWCTEM.js.map → chunk-TZZBXPZK.js.map} +0 -0
- /package/dist/{chunk-UHHPLO3I.js.map → chunk-V3RWOOSO.js.map} +0 -0
- /package/dist/{chunk-Q2PU57HC.js.map → chunk-VVOLDVIR.js.map} +0 -0
- /package/dist/{chunk-TUFM4UZP.js.map → chunk-XQRFSKYM.js.map} +0 -0
- /package/dist/{chunk-GY4WYNNG.js.map → chunk-Y2RKVFKR.js.map} +0 -0
- /package/dist/{chunk-4OZNXTO4.js.map → chunk-YRXFFWG4.js.map} +0 -0
- /package/dist/{enclave-55PAM4YO.js.map → collection-facade-CS7CA2XO.js.map} +0 -0
- /package/dist/{executor-5NIMLSKZ.js.map → computed-FAD7SED4.js.map} +0 -0
- /package/dist/{executor-7UQ3BZ4F.js.map → derive-XLOJVXPU.js.map} +0 -0
- /package/dist/{dispatch-IEPAVQUM.js.map → dispatch-H4HV32AM.js.map} +0 -0
- /package/dist/{executor-AQVXV5GZ.js.map → executor-FMPVN6DT.js.map} +0 -0
- /package/dist/{export-accessible-ORMKLA3E.js.map → executor-LBBBRTN5.js.map} +0 -0
- /package/dist/{extract-partition-NKYO3WNG.js.map → executor-OSRZST2U.js.map} +0 -0
- /package/dist/{find-NOGJ25VX.js.map → export-accessible-RAOJAAU5.js.map} +0 -0
- /package/dist/{issue-3DTQ7VJJ.js.map → extract-partition-JD5CUSTG.js.map} +0 -0
- /package/dist/{ledger-EDXFFZQL.js.map → find-JRN4RNQ5.js.map} +0 -0
- /package/dist/{liberate-V35QUHJP.js.map → issue-YIVBZUTH.js.map} +0 -0
- /package/dist/{link-set-2TTM3IZC.js.map → ledger-5ZMGE44K.js.map} +0 -0
- /package/dist/{managed-secret-NCWEMPUQ.js.map → liberate-WZSZM2W6.js.map} +0 -0
- /package/dist/{noydb-62MX4QUG.js.map → link-set-MFXC24VK.js.map} +0 -0
- /package/dist/{register-HHLXEQDN.js.map → managed-secret-MFTFT22X.js.map} +0 -0
- /package/dist/{migrate-cek-5ENH64AA.js.map → migrate-cek-DZRFFOHW.js.map} +0 -0
- /package/dist/{registry-23WF3TGH.js.map → noydb-ITIGNKUF.js.map} +0 -0
- /package/dist/{registry-4AYVUNXK.js.map → query/all/index.js.map} +0 -0
- /package/dist/{registry-JS3YFQQM.js.map → register-DT5HZ2LZ.js.map} +0 -0
- /package/dist/{registry-XX2Z7B46.js.map → registry-BHRZGZHF.js.map} +0 -0
- /package/dist/{request-withdrawal-CHPATE4G.js.map → registry-ET6ZFFWA.js.map} +0 -0
- /package/dist/{revoke-7M2VW4ON.js.map → registry-HXFGLGTG.js.map} +0 -0
- /package/dist/{signer-SJQJVSM6.js.map → registry-THCPDEOD.js.map} +0 -0
- /package/dist/{stale-BZS6H2RY.js.map → request-withdrawal-AV2MJJKY.js.map} +0 -0
- /package/dist/{storage-RW4QBS23.js.map → revoke-6DWIEOCV.js.map} +0 -0
- /package/dist/{walk-ZURCH6RZ.js.map → signer-MHGW3OIL.js.map} +0 -0
- /package/dist/{withdraw-accessible-PXR4IXDX.js.map → stale-6GCFMOOR.js.map} +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { StoredVector, VectorHit } from './vector-set.js';
|
|
2
|
+
import type { VectorIndex, VectorIndexSearchOptions } from './vector-index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Default partition count for a corpus of `n` points.
|
|
5
|
+
*
|
|
6
|
+
* Build cost is `nlist` brute-force-query-equivalents and query cost is
|
|
7
|
+
* roughly `(nlist + nprobe·n/nlist)/n` of one, so `nlist` trades build against
|
|
8
|
+
* query *linearly in opposite directions*.
|
|
9
|
+
*
|
|
10
|
+
* MEASURED (768d, 100,000 vectors, `nprobe: 8`; full table in
|
|
11
|
+
* `test-harnesses/benchmarks/src/vector-ann-index.bench.ts`):
|
|
12
|
+
*
|
|
13
|
+
* | nlist | scan | speedup | recall@10 | build |
|
|
14
|
+
* |-------------|-------|---------|-----------|---------------|
|
|
15
|
+
* | 79 = √n/4 | 10.3% | 9.7x | 0.895 | 56 queries |
|
|
16
|
+
* | 316 = √n | 3.0% | 33.8x | 0.813 | 288 queries |
|
|
17
|
+
*
|
|
18
|
+
* √n is the better index and the worse DEFAULT. This index is per-session —
|
|
19
|
+
* it is rebuilt from the decrypted sidecars every time the process starts and
|
|
20
|
+
* is never persisted — so a build has only this session's queries to amortise
|
|
21
|
+
* against, and 288 query-equivalents is a bad opening bid for a consumer who
|
|
22
|
+
* runs a dozen searches. `√n/4` costs ~56 and still cuts the scan by 10x.
|
|
23
|
+
* A long-lived query-heavy session should override it; that is what the knob
|
|
24
|
+
* is for. The CAP (256) matters as much as the formula: it bounds the build at
|
|
25
|
+
* the top end, where an uncapped √n grows without limit.
|
|
26
|
+
*/
|
|
27
|
+
export declare function defaultNlist(n: number): number;
|
|
28
|
+
interface IvfParams {
|
|
29
|
+
readonly nlist: number | undefined;
|
|
30
|
+
readonly nprobe: number;
|
|
31
|
+
readonly sampleSize: number;
|
|
32
|
+
readonly iterations: number;
|
|
33
|
+
readonly seed: number;
|
|
34
|
+
}
|
|
35
|
+
export declare class IvfFlatIndex implements VectorIndex {
|
|
36
|
+
private readonly params;
|
|
37
|
+
/** Unit-length partition representatives, `nlist` of them. */
|
|
38
|
+
private centroids;
|
|
39
|
+
/** `lists[c]` = point slots assigned to centroid `c`. */
|
|
40
|
+
private lists;
|
|
41
|
+
private pVec;
|
|
42
|
+
private pInv;
|
|
43
|
+
private pRecord;
|
|
44
|
+
private pChunk;
|
|
45
|
+
/** Owning list, or -1 for a free slot. */
|
|
46
|
+
private pList;
|
|
47
|
+
private recordIds;
|
|
48
|
+
private slotOfRecord;
|
|
49
|
+
private pointsOfRecord;
|
|
50
|
+
private freeSlots;
|
|
51
|
+
private live;
|
|
52
|
+
private builtAt;
|
|
53
|
+
/**
|
|
54
|
+
* Points actually scored by the last {@link search} — the deterministic
|
|
55
|
+
* measure of what the index bought.
|
|
56
|
+
*
|
|
57
|
+
* Wall-clock speedup is not reproducible on a loaded machine (measured: the
|
|
58
|
+
* same cell varied 100x across reps while other work ran), but the fraction
|
|
59
|
+
* of the corpus a query touches is exact arithmetic and identical on every
|
|
60
|
+
* machine. The benchmark reports both and treats this as the primary number;
|
|
61
|
+
* latency follows from it and the brute-force table's µs-per-vector.
|
|
62
|
+
*/
|
|
63
|
+
lastProbedPoints: number;
|
|
64
|
+
constructor(params?: Partial<IvfParams>);
|
|
65
|
+
get size(): number;
|
|
66
|
+
get nlist(): number;
|
|
67
|
+
/**
|
|
68
|
+
* Rebuild when the corpus has doubled or halved since the fit. Incremental
|
|
69
|
+
* upserts assign to EXISTING centroids, so a set that grew 10x around new
|
|
70
|
+
* topics is partitioned by a map of the old ones — recall decays silently,
|
|
71
|
+
* which is the failure mode this flag exists to stop.
|
|
72
|
+
*/
|
|
73
|
+
get stale(): boolean;
|
|
74
|
+
build(vectors: readonly StoredVector[]): void;
|
|
75
|
+
upsert(vector: StoredVector): void;
|
|
76
|
+
remove(recordId: string): void;
|
|
77
|
+
search(query: Float32Array, k: number, opts?: VectorIndexSearchOptions): VectorHit[];
|
|
78
|
+
/**
|
|
79
|
+
* A deterministic fixed-stride sample of the corpus, unit-normalised — the
|
|
80
|
+
* only place the index materialises normalised copies, and it is bounded by
|
|
81
|
+
* `sampleSize` rather than by `n`. A stride (not a random draw) so the fit
|
|
82
|
+
* is reproducible without spending the PRNG, which is saved for k-means++
|
|
83
|
+
* seeding where it actually buys recall.
|
|
84
|
+
*/
|
|
85
|
+
private sampleUnitVectors;
|
|
86
|
+
private firstDim;
|
|
87
|
+
private topCentroids;
|
|
88
|
+
private assign;
|
|
89
|
+
private recordSlot;
|
|
90
|
+
/** Materialise one record's points into free slots. `list` -1 = unassigned. */
|
|
91
|
+
private addPoints;
|
|
92
|
+
}
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The approximate-index seam (#1360 part 2).
|
|
3
|
+
*
|
|
4
|
+
* This module holds **types only** — no algorithm. That is load-bearing for
|
|
5
|
+
* tree-shaking: `VectorSet` and the search facade reference an ANN index
|
|
6
|
+
* exclusively through {@link VectorIndex} (erased at build time) and through
|
|
7
|
+
* {@link VectorIndexConfig.create}, which the opt-in factory
|
|
8
|
+
* (`withVectorIndex()`) fills with a `await import('./ivf-flat.js')`. A
|
|
9
|
+
* consumer who never calls `withVectorIndex()` never links `ivf-flat.js` —
|
|
10
|
+
* not statically, not into a chunk it loads. `bundle-check`'s `search`
|
|
11
|
+
* scenario asserts exactly that, across every emitted chunk and not just the
|
|
12
|
+
* entry.
|
|
13
|
+
*
|
|
14
|
+
* ⛔ Do not add a value export here, and do not import `ivf-flat.js` from
|
|
15
|
+
* anywhere on the always-reachable path. Both would silently turn an opt-in
|
|
16
|
+
* into a tax on every consumer of `@noy-db/hub/search`.
|
|
17
|
+
*/
|
|
18
|
+
import type { StoredVector, VectorHit } from './vector-set.js';
|
|
19
|
+
/** Per-query knobs. `nprobe` is the recall dial — see {@link VectorIndexConfig}. */
|
|
20
|
+
export interface VectorIndexSearchOptions {
|
|
21
|
+
readonly minScore?: number;
|
|
22
|
+
/** Override the configured `nprobe` for this query only. Higher = better recall, slower. */
|
|
23
|
+
readonly nprobe?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An in-hub approximate nearest-neighbour index over a collection's decrypted
|
|
27
|
+
* vectors. Lives entirely above the trust boundary: it is built from plaintext
|
|
28
|
+
* vectors already in memory and is never serialised to the store, so no
|
|
29
|
+
* backend ever holds a vector.
|
|
30
|
+
*/
|
|
31
|
+
export interface VectorIndex {
|
|
32
|
+
/** (Re)build from scratch over the whole vector set. */
|
|
33
|
+
build(vectors: readonly StoredVector[]): void;
|
|
34
|
+
/** Insert or replace one record's vectors (whole-record or chunked). */
|
|
35
|
+
upsert(vector: StoredVector): void;
|
|
36
|
+
/** Drop every point belonging to `recordId`. No-op if absent. */
|
|
37
|
+
remove(recordId: string): void;
|
|
38
|
+
/** Approximate top-k, one hit per RECORD (best chunk), highest score first. */
|
|
39
|
+
search(query: Float32Array, k: number, opts?: VectorIndexSearchOptions): VectorHit[];
|
|
40
|
+
/** Live point count (vectors, not records — a chunked record contributes one point per chunk). */
|
|
41
|
+
readonly size: number;
|
|
42
|
+
/**
|
|
43
|
+
* True when incremental churn has drifted the partitioning far enough from
|
|
44
|
+
* the corpus it was fitted to that a rebuild is cheaper than the recall loss.
|
|
45
|
+
*/
|
|
46
|
+
readonly stale: boolean;
|
|
47
|
+
/** Introspection for the benchmark and for tests — never a behavioural input. */
|
|
48
|
+
readonly nlist: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* What `withVectorIndex()` returns and what a collection's
|
|
52
|
+
* `embeddings.index` holds. Everything is a number except `create`, which is
|
|
53
|
+
* the dynamic-import seam.
|
|
54
|
+
*/
|
|
55
|
+
export interface VectorIndexConfig {
|
|
56
|
+
/**
|
|
57
|
+
* Below this many VECTORS the index is not built and search stays exact.
|
|
58
|
+
* Chunking multiplies vectors per record, so this counts points, not records.
|
|
59
|
+
*/
|
|
60
|
+
readonly minVectors: number;
|
|
61
|
+
/** Default lists probed per query — the recall dial. */
|
|
62
|
+
readonly nprobe: number;
|
|
63
|
+
/** Number of partitions; `undefined` = derive from the corpus size. */
|
|
64
|
+
readonly nlist: number | undefined;
|
|
65
|
+
/** Points sampled to fit the centroids (the full corpus is only assigned, never clustered). */
|
|
66
|
+
readonly sampleSize: number;
|
|
67
|
+
/** Lloyd iterations over the sample. */
|
|
68
|
+
readonly iterations: number;
|
|
69
|
+
/** Seed for the deterministic k-means++ init — same corpus, same index, every run. */
|
|
70
|
+
readonly seed: number;
|
|
71
|
+
/** Lazily link and construct the implementation. */
|
|
72
|
+
create(): Promise<VectorIndex>;
|
|
73
|
+
}
|
|
@@ -1,19 +1,112 @@
|
|
|
1
|
+
import type { EmbeddingChunk, StoredChunk } from './chunks.js';
|
|
2
|
+
import type { VectorIndexConfig } from './vector-index.js';
|
|
3
|
+
/**
|
|
4
|
+
* One record's vectors. Exactly one of `vec` (whole-record, the pre-#1360
|
|
5
|
+
* shape) and `chunks` (sub-document, #1360) is populated by the loader; a row
|
|
6
|
+
* with neither is inert and scores nothing.
|
|
7
|
+
*/
|
|
1
8
|
export interface StoredVector {
|
|
2
9
|
readonly id: string;
|
|
3
|
-
readonly vec: Float32Array;
|
|
4
10
|
readonly model: string;
|
|
11
|
+
readonly vec?: Float32Array;
|
|
12
|
+
/** #1360 — sub-document chunks. When present, the record is scored by its BEST chunk. */
|
|
13
|
+
readonly chunks?: readonly StoredChunk[];
|
|
5
14
|
}
|
|
6
15
|
export interface VectorHit {
|
|
7
16
|
readonly id: string;
|
|
8
17
|
readonly score: number;
|
|
18
|
+
/** #1360 — the winning chunk's span, when the record was scored via chunks. */
|
|
19
|
+
readonly chunk?: EmbeddingChunk;
|
|
20
|
+
}
|
|
21
|
+
/** Options accepted by {@link VectorSet.topK}. */
|
|
22
|
+
export interface VectorTopKOptions {
|
|
23
|
+
readonly minScore?: number;
|
|
24
|
+
readonly expectModel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Force the exact brute-force scan for this query, whatever the corpus size
|
|
27
|
+
* and whatever `index` the descriptor declares. Exactness stays REACHABLE:
|
|
28
|
+
* an approximate default that cannot be turned off is a correctness change
|
|
29
|
+
* dressed as a performance one.
|
|
30
|
+
*/
|
|
31
|
+
readonly exact?: boolean;
|
|
32
|
+
/** Per-query recall dial; overrides the configured `nprobe`. Ignored on the exact path. */
|
|
33
|
+
readonly nprobe?: number;
|
|
9
34
|
}
|
|
10
35
|
export declare class VectorSet {
|
|
36
|
+
private readonly indexConfig?;
|
|
11
37
|
private vectors;
|
|
38
|
+
/** id → position in `vectors`, so an incremental write is O(1), not O(n). */
|
|
39
|
+
private posById;
|
|
40
|
+
/** model → live record count, so the model guard is O(1) per query on the indexed path. */
|
|
41
|
+
private modelCounts;
|
|
42
|
+
private points;
|
|
43
|
+
private index;
|
|
44
|
+
private indexing;
|
|
45
|
+
/**
|
|
46
|
+
* Set when a build produced NO partitions — a corpus of nothing but
|
|
47
|
+
* zero-norm or mismatched-dimension vectors. An empty index answers every
|
|
48
|
+
* query with `[]`, which is a WRONG answer rather than a slow one (the exact
|
|
49
|
+
* path scores those vectors 0 and returns them), so the set falls back to
|
|
50
|
+
* brute force and does not retry the build on every query.
|
|
51
|
+
*/
|
|
52
|
+
private indexUnusable;
|
|
53
|
+
/**
|
|
54
|
+
* `indexConfig` is `withVectorIndex()`'s return value, taken from the
|
|
55
|
+
* collection's `embeddings.index`. Absent — the overwhelmingly common case —
|
|
56
|
+
* and this class behaves exactly as it did before #1360 part 2.
|
|
57
|
+
*/
|
|
58
|
+
constructor(indexConfig?: VectorIndexConfig | undefined);
|
|
12
59
|
get loaded(): boolean;
|
|
60
|
+
/** Live VECTOR count (chunks included) — what `minVectors` is compared against. */
|
|
61
|
+
get pointCount(): number;
|
|
62
|
+
/** Test/benchmark introspection: whether an approximate index is currently serving queries. */
|
|
63
|
+
get indexed(): boolean;
|
|
13
64
|
ensureLoaded(load: () => Promise<StoredVector[]>): Promise<void>;
|
|
14
65
|
markDirty(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Incrementally insert or replace one record's vectors.
|
|
68
|
+
*
|
|
69
|
+
* This is what makes an approximate index viable at all here. `markDirty()`
|
|
70
|
+
* drops the whole set, so before #1360 part 2 every `put()` cost a full
|
|
71
|
+
* re-load on the next query — survivable for a brute-force scan that has no
|
|
72
|
+
* build step, fatal for an index whose build is tens of query-equivalents.
|
|
73
|
+
* `embedOnWrite` already holds the vectors it just encoded, so it can hand
|
|
74
|
+
* them over instead of throwing the set away.
|
|
75
|
+
*
|
|
76
|
+
* No-op when the set is not loaded: an unloaded set is already "dirty", and
|
|
77
|
+
* the next query loads everything from the sidecars anyway.
|
|
78
|
+
*/
|
|
79
|
+
upsert(vector: StoredVector): void;
|
|
80
|
+
/**
|
|
81
|
+
* Incrementally drop one record's vectors. Removal is a SWAP with the last
|
|
82
|
+
* element, not a splice: `vectors` order is whatever `adapter.list()`
|
|
83
|
+
* returned and has never been part of any contract, so preserving it would
|
|
84
|
+
* buy nothing and cost an O(n) index rebuild on every `forget()`.
|
|
85
|
+
*/
|
|
86
|
+
removeRecord(id: string): void;
|
|
87
|
+
private decModel;
|
|
88
|
+
/**
|
|
89
|
+
* Brute-force cosine kNN, one hit per RECORD. **Always exact.**
|
|
90
|
+
*
|
|
91
|
+
* #1360 best-chunk folding: a chunked record contributes its single BEST
|
|
92
|
+
* chunk score, never one hit per chunk and never a sum. Summing would make a
|
|
93
|
+
* long document outrank a short exact match purely for having more chunks —
|
|
94
|
+
* the folding is what keeps the score comparable across record lengths, and
|
|
95
|
+
* what keeps `k` a count of records rather than of fragments.
|
|
96
|
+
*/
|
|
15
97
|
cosineTopK(query: Float32Array, k: number, opts?: {
|
|
16
98
|
minScore?: number;
|
|
17
99
|
expectModel?: string;
|
|
18
100
|
}): VectorHit[];
|
|
101
|
+
/**
|
|
102
|
+
* kNN under the collection's policy: approximate when an index is opted in
|
|
103
|
+
* AND the corpus is at or above `minVectors`, exact otherwise.
|
|
104
|
+
*
|
|
105
|
+
* ⭐ The default below the threshold is EXACT, deliberately: an index that
|
|
106
|
+
* builds on a 300-vector collection pays a build the queries can never
|
|
107
|
+
* amortise, and buys a recall cliff for a scan that was already sub-millisecond.
|
|
108
|
+
*/
|
|
109
|
+
topK(query: Float32Array, k: number, opts?: VectorTopKOptions): Promise<VectorHit[]>;
|
|
110
|
+
/** Build (or rebuild, once churn has made it stale) the index. Concurrency-safe. */
|
|
111
|
+
private ensureIndex;
|
|
19
112
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `withVectorIndex()` — the opt-in for the approximate vector index (#1360).
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { withVectorIndex } from '@noy-db/hub/search'
|
|
6
|
+
*
|
|
7
|
+
* const col = vault.collection('docs', {
|
|
8
|
+
* embeddings: { source: 'body', encode, dim: 768, model: 'e5-base',
|
|
9
|
+
* index: withVectorIndex({ nprobe: 12 }) },
|
|
10
|
+
* })
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Three properties, each load-bearing:
|
|
14
|
+
*
|
|
15
|
+
* 1. **Opt-in.** No `index` on the descriptor and every search is exact brute
|
|
16
|
+
* force, byte for byte the pre-#1360 path. Nothing about this file runs.
|
|
17
|
+
* 2. **Tree-shaken.** The algorithm arrives through `await import()` inside
|
|
18
|
+
* {@link create}, so a consumer of `@noy-db/hub/search` who never calls
|
|
19
|
+
* this function never links `ivf-flat.js` into any chunk.
|
|
20
|
+
* 3. **Still gated by scale even once opted in.** {@link
|
|
21
|
+
* VectorIndexConfig.minVectors} defaults to the measured crossover, so a
|
|
22
|
+
* small corpus pays no build cost and gets exact answers — opting in
|
|
23
|
+
* declares a willingness to index, not an instruction to index now.
|
|
24
|
+
*/
|
|
25
|
+
import type { VectorIndexConfig } from './vector-index.js';
|
|
26
|
+
export interface VectorIndexOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Stay exact below this many VECTORS. Default 20,000.
|
|
29
|
+
*
|
|
30
|
+
* Chosen from `vector-brute-force.bench.ts`: below ~20k points the
|
|
31
|
+
* brute-force scan is inside a 100 ms interactive budget at every dimension
|
|
32
|
+
* measured (the tightest row, 1536d, crosses at ~18-48k depending on the
|
|
33
|
+
* machine), and IVF's build — tens of brute-force-query-equivalents — has no
|
|
34
|
+
* query volume to amortise against down there. Counts POINTS, not records — #1360
|
|
35
|
+
* chunking puts one point per chunk, so 2,500 documents at 8 chunks each
|
|
36
|
+
* already crosses this.
|
|
37
|
+
*/
|
|
38
|
+
readonly minVectors?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Lists probed per query — **the recall dial**. Default 8.
|
|
41
|
+
*
|
|
42
|
+
* Recall rises monotonically with `nprobe`, and `nprobe = nlist` is
|
|
43
|
+
* exhaustive — the same answer as brute force, by construction.
|
|
44
|
+
*
|
|
45
|
+
* MEASURED recall@10 at this default, against exact brute force on a
|
|
46
|
+
* clustered corpus: **0.895** (768d, 100k vectors), **0.942** (384d, 100k),
|
|
47
|
+
* **0.918** (1536d, 50k), **0.928** (64d, 20k — the CI assertion in
|
|
48
|
+
* `__tests__/embeddings-ivf-recall.test.ts`). Raising it to 16 buys ~0.95
|
|
49
|
+
* for roughly double the scan.
|
|
50
|
+
*
|
|
51
|
+
* Raise it when a miss costs more than a millisecond — and prefer
|
|
52
|
+
* `{ exact: true }` on the query over `nprobe: nlist` when the answer must
|
|
53
|
+
* be exact, because that says what you mean and survives an `nlist` change.
|
|
54
|
+
*/
|
|
55
|
+
readonly nprobe?: number;
|
|
56
|
+
/** Partitions. Default: derived from the corpus size — see `defaultNlist`. */
|
|
57
|
+
readonly nlist?: number;
|
|
58
|
+
/** Points sampled to fit the centroids. Default 4096. */
|
|
59
|
+
readonly sampleSize?: number;
|
|
60
|
+
/** Lloyd iterations over the sample. Default 6. */
|
|
61
|
+
readonly iterations?: number;
|
|
62
|
+
/** k-means++ seed. Default fixed, so the same corpus yields the same index. */
|
|
63
|
+
readonly seed?: number;
|
|
64
|
+
}
|
|
65
|
+
/** Vectors below which an opted-in collection still answers exactly. */
|
|
66
|
+
export declare const DEFAULT_INDEX_MIN_VECTORS = 20000;
|
|
67
|
+
export declare function withVectorIndex(opts?: VectorIndexOptions): VectorIndexConfig;
|
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
* Internal service — not exported as a `@noy-db/hub/*` subpath.
|
|
22
22
|
*/
|
|
23
23
|
import type { NoydbStore, EncryptedEnvelope } from '../../kernel/types.js';
|
|
24
|
-
import type { RecordCodec } from '../../
|
|
24
|
+
import type { RecordCodec } from '../../capsule/index.js';
|
|
25
25
|
import type { NoydbEventEmitter } from '../../kernel/events.js';
|
|
26
|
-
import type
|
|
26
|
+
import { type CollectionIndexes, type IndexDef } from './eager-indexes.js';
|
|
27
27
|
import type { UniqueConstraintSet } from './unique-constraints.js';
|
|
28
28
|
import { type PersistedCollectionIndex } from './persisted-indexes.js';
|
|
29
|
+
import { PersistedFieldIndexes, type FieldIndexCallbacks } from './persisted-field-indexes.js';
|
|
30
|
+
export type { PersistedFieldIndexes } from './persisted-field-indexes.js';
|
|
29
31
|
/** Everything the moving index-maintenance methods touched on `this.*`. */
|
|
30
32
|
export interface IndexingContext<T> {
|
|
31
33
|
/** Collection name — the canonical record namespace + error context. */
|
|
@@ -51,6 +53,8 @@ export interface IndexingContext<T> {
|
|
|
51
53
|
readonly uniqueConstraints: UniqueConstraintSet | null;
|
|
52
54
|
/** The lazy-mode persisted-index mirror, or null (SHARED reference). */
|
|
53
55
|
readonly persistedIndexes: PersistedCollectionIndex | null;
|
|
56
|
+
/** The eager-mode persisted field-index sidecars (#1359), or null (SHARED reference). */
|
|
57
|
+
readonly fieldIndexes: PersistedFieldIndexes | null;
|
|
54
58
|
/** Hydrate the eager cache before rebuilding from it. */
|
|
55
59
|
ensureHydrated(): Promise<void>;
|
|
56
60
|
/** Bulk-load the persisted-index mirror from side-cars (lazy mode). */
|
|
@@ -63,7 +67,64 @@ export interface IndexingContext<T> {
|
|
|
63
67
|
* Called after any bulk hydration; incremental put/delete updates go through
|
|
64
68
|
* `indexes.upsert()`/`.remove()` directly, so this only fires for full reloads.
|
|
65
69
|
*/
|
|
66
|
-
export declare function rebuildEagerIndexesFromCache<T>(ctx: IndexingContext<T>): void;
|
|
70
|
+
export declare function rebuildEagerIndexesFromCache<T>(ctx: IndexingContext<T>, skip?: ReadonlySet<string>): void;
|
|
71
|
+
/**
|
|
72
|
+
* Bridge the crypto-free {@link PersistedFieldIndexes} to this collection's
|
|
73
|
+
* codec + adapter — the exact division `buildPersistedIndexCallbacks` uses for
|
|
74
|
+
* the search index: crypto lives here, the store does not know it exists.
|
|
75
|
+
*
|
|
76
|
+
* One record per `(collection, index)`, at `_fieldidx / <collection>/<key>`.
|
|
77
|
+
* The freshness stamp rides INSIDE the encrypted body (`{fp, idx}`) rather
|
|
78
|
+
* than on the envelope, so the `EncryptedEnvelope` shape is never extended and
|
|
79
|
+
* the stamp is not readable at rest.
|
|
80
|
+
*
|
|
81
|
+
* Takes a context THUNK for the same reason the search bridge does: it is
|
|
82
|
+
* built from the `Collection` constructor, before `this.codec` is assigned.
|
|
83
|
+
*/
|
|
84
|
+
export declare function buildFieldIndexCallbacks<T>(provideCtx: () => IndexingContext<T>, debounceMs?: number): FieldIndexCallbacks;
|
|
85
|
+
/**
|
|
86
|
+
* Build this collection's sidecar coordinator, or `null` when no index asked
|
|
87
|
+
* to be persisted — so every other collection pays nothing. Kept here rather
|
|
88
|
+
* than in `Collection` so the kernel spine never names a `with-*` class
|
|
89
|
+
* (port-layering); the collection holds it only as a type.
|
|
90
|
+
*/
|
|
91
|
+
export declare function createPersistedFieldIndexes<T>(provideCtx: () => IndexingContext<T>, indexes: CollectionIndexes | null): PersistedFieldIndexes | null;
|
|
92
|
+
/**
|
|
93
|
+
* The bulk-hydration index build, with the #1359 persisted-sidecar fast path
|
|
94
|
+
* in front of it: adopt every sidecar whose freshness stamp still matches the
|
|
95
|
+
* cache, then rebuild only what was not adopted, then owe a write-back for
|
|
96
|
+
* whatever had to be rebuilt (a fully restored open rewrites nothing).
|
|
97
|
+
*
|
|
98
|
+
* A sidecar that is absent, stale, unreadable or internally inconsistent
|
|
99
|
+
* simply does not appear in `restored`, so the outcome is the pre-#1359
|
|
100
|
+
* rebuild — the failure mode is always cost, never a wrong answer. The
|
|
101
|
+
* liveness predicate is the record cache itself.
|
|
102
|
+
*
|
|
103
|
+
* Collapses to exactly the old synchronous call when no index opted in.
|
|
104
|
+
*/
|
|
105
|
+
export declare function hydrateEagerIndexes<T>(ctx: IndexingContext<T>): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* The unique-constraint pre-flight every ordinary `put()` runs before its
|
|
108
|
+
* store write (#1358). One entry point, three outcomes, and NONE of them is a
|
|
109
|
+
* silent pass:
|
|
110
|
+
*
|
|
111
|
+
* - **CRDT** (`enforcement === 'detect'`) — returns without checking, on
|
|
112
|
+
* purpose. A replica cannot refuse a value another offline replica may
|
|
113
|
+
* already hold, so it does not pretend to; the collision is reported from
|
|
114
|
+
* `UniqueConstraintSet.upsert`/`build` on `unique:violation` instead. See
|
|
115
|
+
* that class's module doc.
|
|
116
|
+
* - **Lazy** (`prefetch: false`) — a point lookup through the persisted
|
|
117
|
+
* `_idx/` mirror, which lazy mode already maintains on every write. The
|
|
118
|
+
* mirror is bulk-loaded first (the same hydration a lazy query forces), so
|
|
119
|
+
* a record written in a PRIOR session is seen.
|
|
120
|
+
* - **Eager** — the in-memory map, unchanged.
|
|
121
|
+
*
|
|
122
|
+
* The TIER dimension is orthogonal and is checked separately, by
|
|
123
|
+
* `checkUniqueAcrossTiers` in `with-audit/tiers/index.ts` — it needs the
|
|
124
|
+
* keyring to decrypt above-tier records, which this context deliberately
|
|
125
|
+
* does not carry.
|
|
126
|
+
*/
|
|
127
|
+
export declare function checkUniqueOnPut<T>(ctx: IndexingContext<T>, id: string, record: unknown): Promise<void>;
|
|
67
128
|
/**
|
|
68
129
|
* Rebuild unique-constraint maps from the current in-memory cache.
|
|
69
130
|
* Called after any bulk hydration alongside `rebuildEagerIndexesFromCache`.
|
|
@@ -155,3 +216,25 @@ export declare function purgePersistedIndexes<T>(ctx: IndexingContext<T>, id: st
|
|
|
155
216
|
* No-ops fast when the collection has neither index kind declared.
|
|
156
217
|
*/
|
|
157
218
|
export declare function syncTierIndexes<T>(ctx: IndexingContext<T>, id: string, record: T | null, version: number, priorEnvelope?: EncryptedEnvelope): Promise<void>;
|
|
219
|
+
/**
|
|
220
|
+
* #1421 — `indexes:` declared while the indexing service is not opted in.
|
|
221
|
+
*
|
|
222
|
+
* `indexes:` is accepted and recorded whatever the strategy is; with
|
|
223
|
+
* `NO_INDEXING` nothing builds them, so every lookup scans. Results stay
|
|
224
|
+
* correct and performance is quietly wrong, which is how the reporting
|
|
225
|
+
* consumer's production lookups had been scans without anything saying so.
|
|
226
|
+
*
|
|
227
|
+
* ⚠️ **Warn, never throw.** Declaring `indexes:` without opting in is
|
|
228
|
+
* legitimate — one collection definition can be shared between a full app and
|
|
229
|
+
* a lightweight script that deliberately skips the index engine. Refusing
|
|
230
|
+
* would break that. But silence is the wrong default when a declaration the
|
|
231
|
+
* caller wrote has no effect.
|
|
232
|
+
*
|
|
233
|
+
* Normalizes the declared defs and, on the way past, warns. Called once from the
|
|
234
|
+
* `Collection` constructor, so the warning is once per collection
|
|
235
|
+
* (`vault.collection()` caches the handle) and never per query.
|
|
236
|
+
*/
|
|
237
|
+
export declare function resolveDeclaredIndexes(defs: readonly IndexDef[], collectionName: string, indexingEnabled: boolean): ReadonlyArray<{
|
|
238
|
+
readonly fields: readonly string[];
|
|
239
|
+
readonly unique?: boolean;
|
|
240
|
+
}>;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compound (multi-field) sorted indexes — the tuple-keyed sibling of
|
|
3
|
+
* `sorted-indexes.ts` (#1345).
|
|
4
|
+
*
|
|
5
|
+
* A compound index is an array of `{ keys, seq, id }` entries kept in
|
|
6
|
+
* ascending `(keys[0], keys[1], …, seq)` order, where each `keys[i]` is
|
|
7
|
+
* the SAME `SortKey` the single-field sorted index builds — so the tuple
|
|
8
|
+
* encoding is order-preserving per component BY CONSTRUCTION rather than
|
|
9
|
+
* by a second, hand-rolled serialization. Nothing is flattened into a
|
|
10
|
+
* delimited string: a string component can therefore contain any byte
|
|
11
|
+
* without colliding with a separator, and a money field canonicalized to
|
|
12
|
+
* a scaled-integer string (`ViaPipeline.canonicalizeIndexKey`) or a date
|
|
13
|
+
* stored as ISO text sorts inside its own component exactly as it does in
|
|
14
|
+
* the single-field index.
|
|
15
|
+
*
|
|
16
|
+
* The two load-bearing properties of #1344 hold PER COMPONENT:
|
|
17
|
+
*
|
|
18
|
+
* - **Kind-partitioned.** `compareKeys` ranks by runtime kind first, so
|
|
19
|
+
* within any equality-prefix run a `string` probe on the next
|
|
20
|
+
* component cannot reach `number` entries — mirroring `predicate.ts`'s
|
|
21
|
+
* `isComparable`, exactly as the linear scan behaves.
|
|
22
|
+
* - **Ties keep insertion order** in both directions. `orderedIds()`
|
|
23
|
+
* walks equal-key runs forward even when emitting descending, because
|
|
24
|
+
* `sortRecords()` negates its comparator over a STABLE sort.
|
|
25
|
+
*
|
|
26
|
+
* **A record is indexed only when EVERY component has an order-defined
|
|
27
|
+
* value.** One nullish or non-orderable component and the record is
|
|
28
|
+
* absent — which is why the query builder compares {@link
|
|
29
|
+
* CompoundIndex.size} against the snapshot size before dispatching, and
|
|
30
|
+
* falls back to the scan when the index does not cover the collection.
|
|
31
|
+
*
|
|
32
|
+
* PERSISTENCE (#1359) is OPT-IN, same as its single-field sibling. The wire
|
|
33
|
+
* form keeps the tuple as an ARRAY of per-component keys — see
|
|
34
|
+
* `index-snapshot.ts`: flattening it to a delimited string would destroy
|
|
35
|
+
* exactly the per-component ordering and kind partition this class is built
|
|
36
|
+
* to preserve.
|
|
37
|
+
*/
|
|
38
|
+
import { type RangeOperator, type SortKey } from './sorted-indexes.js';
|
|
39
|
+
import { type CompoundIndexSnapshot, type FieldIndexSnapshot } from './index-snapshot.js';
|
|
40
|
+
/** A range constraint on the component just past the equality prefix. */
|
|
41
|
+
export interface CompoundRangeProbe {
|
|
42
|
+
readonly op: RangeOperator;
|
|
43
|
+
readonly value: unknown;
|
|
44
|
+
}
|
|
45
|
+
/** One collection's index over an ordered field tuple. */
|
|
46
|
+
export declare class CompoundIndex {
|
|
47
|
+
readonly fields: readonly string[];
|
|
48
|
+
private readonly entries;
|
|
49
|
+
private nextSeq;
|
|
50
|
+
constructor(fields: readonly string[]);
|
|
51
|
+
get size(): number;
|
|
52
|
+
clear(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Insert one record. No-op unless every component has an ordered key.
|
|
55
|
+
*
|
|
56
|
+
* `seq` REINSTATES a rank a previous entry for this id held — see
|
|
57
|
+
* {@link remove}'s return value and `CollectionIndexes.upsert`. Omit it
|
|
58
|
+
* for a fresh insert, which appends after every existing tie.
|
|
59
|
+
*/
|
|
60
|
+
add(id: string, keys: readonly SortKey[] | undefined, seq?: number): void;
|
|
61
|
+
/**
|
|
62
|
+
* Remove one record, addressed by the tuple it was indexed under.
|
|
63
|
+
* Returns the rank it held, so an UPDATE can reinstate it: `sortRecords()`
|
|
64
|
+
* sorts a snapshot whose order does not change when a record is written in
|
|
65
|
+
* place, so a tie-breaking rank that drifted to the back on every `put`
|
|
66
|
+
* would make an index-served page disagree with the scan it must match.
|
|
67
|
+
*/
|
|
68
|
+
remove(id: string, keys: readonly SortKey[] | undefined): number | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Ids matching an equality prefix, optionally narrowed by a range on
|
|
71
|
+
* the next component. An empty set is authoritative: the index covers
|
|
72
|
+
* these fields and nothing matches.
|
|
73
|
+
*/
|
|
74
|
+
lookup(prefix: readonly SortKey[], range?: CompoundRangeProbe): Set<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Ids matching an equality prefix, in the order of the remaining
|
|
77
|
+
* components. Ties keep INSERTION order in both directions — a plain
|
|
78
|
+
* `.reverse()` would disagree with `sortRecords()` on equal keys.
|
|
79
|
+
*/
|
|
80
|
+
orderedIds(prefix: readonly SortKey[], direction: 'asc' | 'desc'): string[];
|
|
81
|
+
private slice;
|
|
82
|
+
/** [start, end) of the entries whose first `upto` components equal `probe`. */
|
|
83
|
+
private run;
|
|
84
|
+
/** [start, end) of the entries in [from,to) whose component `k` has this kind. */
|
|
85
|
+
private kindRun;
|
|
86
|
+
private kindBoundary;
|
|
87
|
+
/** First index in [from,to) whose first `upto` components are >= `probe`. */
|
|
88
|
+
private lowerBound;
|
|
89
|
+
/** First index in [from,to) whose first `upto` components are > `probe`. */
|
|
90
|
+
private upperBound;
|
|
91
|
+
/**
|
|
92
|
+
* The persistable form of this index (#1359). Each entry's tuple stays an
|
|
93
|
+
* ARRAY of `[kind, key]` pairs: nothing is joined into a string, so a
|
|
94
|
+
* string component may hold any byte and the per-component kind partition
|
|
95
|
+
* survives the round trip intact.
|
|
96
|
+
*/
|
|
97
|
+
toSnapshot(): CompoundIndexSnapshot;
|
|
98
|
+
/**
|
|
99
|
+
* Adopt a validated snapshot, or refuse it. Same contract as
|
|
100
|
+
* `SortedIndex.loadSnapshot`: all-or-nothing, and an entry naming a record
|
|
101
|
+
* the cache does not hold rejects the whole blob so crash residue becomes a
|
|
102
|
+
* rebuild rather than a wrong answer. A snapshot whose field tuple is not
|
|
103
|
+
* exactly this index's is refused — the declaration changed under it.
|
|
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
|
+
private compare;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The tuple key for one record, or `undefined` when any component is
|
|
116
|
+
* nullish or has no order-defined runtime type. Canonicalizes through the
|
|
117
|
+
* same per-field closure the hash and sorted indexes use, so a Via-covered
|
|
118
|
+
* component lives in one key space across all three.
|
|
119
|
+
*/
|
|
120
|
+
export declare function tupleKeyOf<T>(fields: readonly string[], record: T, canonicalize?: (field: string, value: unknown) => string | undefined): SortKey[] | undefined;
|
|
121
|
+
/** Probe keys for an equality prefix, or `undefined` if any operand is unorderable. */
|
|
122
|
+
export declare function probeKeysOf(values: readonly unknown[]): SortKey[] | undefined;
|
|
123
|
+
/** Build the whole index from a snapshot. Entry seqs follow snapshot order. */
|
|
124
|
+
export declare function buildCompoundIndex<T>(idx: CompoundIndex, records: ReadonlyArray<{
|
|
125
|
+
id: string;
|
|
126
|
+
record: T;
|
|
127
|
+
}>, canonicalize?: (field: string, value: unknown) => string | undefined): void;
|
|
128
|
+
/** Stable map key for a field tuple. `\0` cannot appear in a field path. */
|
|
129
|
+
export declare function compoundKey(fields: readonly string[]): string;
|