@delali/narsil 0.3.1-next.154 → 0.3.1-next.156
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/NOTICE +45 -0
- package/README.md +1 -0
- package/dist/adapters/filesystem.mjs +2 -2
- package/dist/adapters/gcs.mjs +2 -2
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/s3.mjs +2 -2
- package/dist/{analysis-change-4GCRVRBW.mjs → analysis-change-5BQOQ4BF.mjs} +35 -28
- package/dist/{react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs → analysis-change-entry-TXX6JSMX.mjs} +1 -1
- package/dist/archive-history-E4R73RWD.mjs +29 -0
- package/dist/browser/{analysis-change-IXWPXXJJ.mjs → analysis-change-435CUEPZ.mjs} +32 -12
- package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-HZXKPPGV.mjs} +1 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
- package/dist/browser/{chunk-4PD752F6.mjs → chunk-23XRXIBW.mjs} +1 -1
- package/dist/browser/{chunk-J433A7P3.mjs → chunk-2CFI5VVV.mjs} +5 -5
- package/dist/{react-native/chunks/chunk-3XKMRNRE.mjs → browser/chunk-2TI4SSUP.mjs} +27 -10
- package/dist/browser/chunk-3SSRJMFN.mjs +100 -0
- package/dist/browser/{chunk-2SHAKW2Z.mjs → chunk-3V7DNNZL.mjs} +515 -733
- package/dist/browser/{chunk-C4KS2QNF.mjs → chunk-4NGKC4H4.mjs} +9 -9
- package/dist/browser/{chunk-XRV72TJD.mjs → chunk-6LWDPLTB.mjs} +2 -2
- package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
- package/dist/browser/{chunk-VCOYGVP7.mjs → chunk-7U3WVJUP.mjs} +3 -3
- package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
- package/dist/browser/chunk-BHFQATSC.mjs +432 -0
- package/dist/browser/chunk-CRE3G7F3.mjs +1007 -0
- package/dist/browser/{chunk-QXTPSX2H.mjs → chunk-EA63E3D2.mjs} +7 -7
- package/dist/{react-native/chunks/chunk-DCKMICOB.mjs → browser/chunk-EXQZGUQH.mjs} +1 -1
- package/dist/browser/{chunk-ML6HY7T7.mjs → chunk-G64Q6OJF.mjs} +1 -1
- package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
- package/dist/browser/{chunk-EUNBNLKM.mjs → chunk-IZXVW2ZJ.mjs} +5 -5
- package/dist/browser/{chunk-G7LUMBSG.mjs → chunk-K4Q6KX3R.mjs} +30 -20
- package/dist/browser/{chunk-H6QFBMVE.mjs → chunk-KZWSX6BH.mjs} +3 -3
- package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
- package/dist/browser/chunk-MGI4BCXC.mjs +63 -0
- package/dist/browser/chunk-MOG4OVDK.mjs +51 -0
- package/dist/browser/{chunk-W5X2UFWQ.mjs → chunk-NLWTBAGB.mjs} +12 -3
- package/dist/browser/{chunk-AYY6PIKL.mjs → chunk-NQAME3RK.mjs} +2 -2
- package/dist/browser/{chunk-7MEYN7V6.mjs → chunk-NXQG7DRA.mjs} +29 -14
- package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
- package/dist/{chunk-KUZKUONM.mjs → browser/chunk-SRMZXJSL.mjs} +1 -0
- package/dist/browser/chunk-SSTPBZZX.mjs +1106 -0
- package/dist/browser/{chunk-7TTWXUH6.mjs → chunk-STOWQFT3.mjs} +3 -2
- package/dist/browser/{chunk-26A5JFT2.mjs → chunk-TK63WFXK.mjs} +2 -1
- package/dist/browser/{chunk-SJB6VIZG.mjs → chunk-U3JOQGWX.mjs} +1 -1
- package/dist/browser/{chunk-AJ4HHOVT.mjs → chunk-U4YDIBUT.mjs} +4 -4
- package/dist/browser/{chunk-2FX6ROWR.mjs → chunk-VLJQW4J6.mjs} +2986 -2986
- package/dist/{react-native/chunks/chunk-3O57C2ZO.mjs → browser/chunk-WI4MR75E.mjs} +2 -2
- package/dist/browser/{chunk-3U3QR5YP.mjs → chunk-WN464PTL.mjs} +2 -2
- package/dist/browser/{chunk-U2E3HMYW.mjs → chunk-XAWNZ4G2.mjs} +11 -11
- package/dist/browser/{cold-module-VTUGDYNY.mjs → cold-module-2EHCIV4K.mjs} +20 -18
- package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
- package/dist/browser/{durability-wiring-GL4A7KDV.mjs → durability-wiring-A7BVG2DW.mjs} +50 -153
- package/dist/browser/engine-hooks-E4UD67JD.mjs +17 -0
- package/dist/browser/geo-index-HHWGMNIS.mjs +1386 -0
- package/dist/browser/import-DXYB6756.mjs +19 -0
- package/dist/browser/{methods-LMUTS7OI.mjs → methods-KTQCSIN4.mjs} +3 -3
- package/dist/browser/{module-M4JNBV6V.mjs → module-NIYMEA5R.mjs} +16 -14
- package/dist/browser/{module-EC3FYW7N.mjs → module-TCT66FWA.mjs} +10 -9
- package/dist/browser/operations-OJ3BXS55.mjs +5 -0
- package/dist/browser/{phrase-module-NPYUVX75.mjs → phrase-module-HAT3TLZN.mjs} +2 -2
- package/dist/browser/{pool-WCGDZHJP.mjs → pool-3JLET5RO.mjs} +1 -1
- package/dist/browser/restore-hooks-YPN4ZFCY.mjs +114 -0
- package/dist/browser/restore-queue-G3RQGL3Y.mjs +55 -0
- package/dist/browser/{retention-6QMRS5VK.mjs → retention-ZWVMNC3Q.mjs} +18 -15
- package/dist/browser/{runtime-3EW2AGB6.mjs → runtime-OTAGEFQW.mjs} +1 -1
- package/dist/browser/{snapshot-DN3CRVUQ.mjs → snapshot-VEQNIE6C.mjs} +71 -36
- package/dist/browser/start-BM442C6R.mjs +25 -0
- package/dist/browser/{write-WAWAFGKQ.mjs → write-2EVMZWDE.mjs} +16 -14
- package/dist/{capabilities-B3Brs1Rc.d.ts → capabilities-Da4ywVVl.d.ts} +35 -3
- package/dist/{chunk-K4B7OH65.mjs → chunk-25KDNIZZ.mjs} +2 -2
- package/dist/{chunk-O43Z4MS6.mjs → chunk-2NE7VCYE.mjs} +2 -2
- package/dist/chunk-2UV4QBHW.mjs +1092 -0
- package/dist/{chunk-3Y3J4V2R.mjs → chunk-3C7MTCCI.mjs} +1 -1
- package/dist/{chunk-TRISKD4Q.mjs → chunk-3HYC4JRF.mjs} +2 -2
- package/dist/{chunk-HVYICDY3.mjs → chunk-3OH67G7R.mjs} +1 -1
- package/dist/{chunk-PFKM7VNZ.mjs → chunk-46KY2PJD.mjs} +30 -11
- package/dist/{chunk-IJU7LL7D.mjs → chunk-4KKXNJM6.mjs} +5 -5
- package/dist/{chunk-IQ4R2I6N.mjs → chunk-5FLRXF73.mjs} +5 -1
- package/dist/{chunk-BPSKLCS7.mjs → chunk-5VV4R6P7.mjs} +3017 -3017
- package/dist/chunk-5YNRKI2C.mjs +81 -0
- package/dist/chunk-6HTGOXIK.mjs +875 -0
- package/dist/{chunk-7HCZWC7B.mjs → chunk-6I6AYAXS.mjs} +50 -8
- package/dist/{chunk-C6ASEFZI.mjs → chunk-6OEGXLBX.mjs} +1 -1
- package/dist/{chunk-DVWYODEB.mjs → chunk-6RC4K46J.mjs} +2 -2
- package/dist/chunk-7GFE3PEY.mjs +40 -0
- package/dist/{chunk-QKZHLADX.mjs → chunk-7LXHHCXZ.mjs} +28 -19
- package/dist/{chunk-JUKYYXSP.mjs → chunk-7V5IUP2T.mjs} +1 -31
- package/dist/{react-native/chunks/chunk-7GWPJDOA.mjs → chunk-A4L7YTKX.mjs} +53 -90
- package/dist/{chunk-Z3TNWCI5.mjs → chunk-BU4SAIC4.mjs} +3 -3
- package/dist/chunk-BWZ3P4MU.mjs +20 -0
- package/dist/{chunk-OKX2BBNW.mjs → chunk-CITFCZKF.mjs} +5 -4
- package/dist/{chunk-4HWZV5MK.mjs → chunk-CSLGFPFQ.mjs} +5 -5
- package/dist/chunk-DP5C7YFQ.mjs +543 -0
- package/dist/{chunk-RVKFI3A2.mjs → chunk-DWEPMFJE.mjs} +11 -8
- package/dist/{chunk-LSM2YTKM.mjs → chunk-EFBDHH5P.mjs} +87 -144
- package/dist/{chunk-NZMAXR2S.mjs → chunk-FAKFUDZZ.mjs} +121 -11
- package/dist/chunk-FB6463IN.mjs +1499 -0
- package/dist/{chunk-REL7LFLR.mjs → chunk-FCJ553HS.mjs} +3 -3
- package/dist/{chunk-MMEMEUOO.mjs → chunk-FJKKCV4D.mjs} +2 -2
- package/dist/{chunk-K7KLL263.mjs → chunk-FNGAM5B7.mjs} +14 -13
- package/dist/{chunk-DMQPFLGI.mjs → chunk-FRBFVQFN.mjs} +6 -5
- package/dist/{chunk-IBNLW3AV.mjs → chunk-FYOVBEMM.mjs} +20 -6
- package/dist/chunk-G6HRSGOU.mjs +74 -0
- package/dist/{chunk-USR7FQRZ.mjs → chunk-GH4WQ22V.mjs} +2 -2
- package/dist/chunk-GQPTDQCL.mjs +54 -0
- package/dist/{chunk-VREK3MYG.mjs → chunk-HFPMMRQT.mjs} +3 -3
- package/dist/{chunk-MLHNSAPK.mjs → chunk-HHBUCIUY.mjs} +3 -3
- package/dist/{chunk-YROWNOMH.mjs → chunk-HJJI72X7.mjs} +1 -1
- package/dist/{chunk-ECX4SGX6.mjs → chunk-I2KPOLOZ.mjs} +9 -9
- package/dist/{chunk-TV2L3BN7.mjs → chunk-I53G4JAU.mjs} +266 -265
- package/dist/{chunk-3A5KI24C.mjs → chunk-I54T6CQP.mjs} +1 -1
- package/dist/{chunk-NTZOXVUZ.mjs → chunk-I5B7RXU7.mjs} +93 -24
- package/dist/{chunk-YBJDOA2T.mjs → chunk-INJYO3BU.mjs} +1 -1
- package/dist/{react-native/chunks/chunk-KWRW5U65.mjs → chunk-J4IJTTEX.mjs} +1 -1
- package/dist/{chunk-X6NSJYQ3.mjs → chunk-JDJBQLRO.mjs} +13 -13
- package/dist/{chunk-MMBEANB2.mjs → chunk-JWRUUCWD.mjs} +3 -3
- package/dist/{chunk-AO2FAYIZ.mjs → chunk-K4ZIGL2O.mjs} +1 -1
- package/dist/{chunk-JFNKIBDT.mjs → chunk-K5QFDYST.mjs} +2 -2
- package/dist/{chunk-C73JLU4E.mjs → chunk-KF4EXSM4.mjs} +2 -2
- package/dist/{chunk-WCBA2LVZ.mjs → chunk-KHKIRS5D.mjs} +1 -1
- package/dist/{chunk-7QUGDVFC.mjs → chunk-KJ3RTZDJ.mjs} +1 -1
- package/dist/{chunk-HVKXNBFL.mjs → chunk-KKQC526K.mjs} +20 -12
- package/dist/chunk-KP7TYHWT.mjs +92 -0
- package/dist/{chunk-VMXSVVXG.mjs → chunk-L6V6BST3.mjs} +9 -22
- package/dist/{chunk-URPCYQVJ.mjs → chunk-LHKOSI2J.mjs} +1 -1
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/{react-native/chunks/chunk-CUNGPR5R.mjs → chunk-MP7ABPTD.mjs} +1 -0
- package/dist/{chunk-5KGYQT6W.mjs → chunk-MQOJIO5B.mjs} +26 -9
- package/dist/{chunk-Q3TCTQCC.mjs → chunk-NF4DT3IH.mjs} +1 -1
- package/dist/{chunk-3OFU3NJT.mjs → chunk-OIJ64LGT.mjs} +1 -1
- package/dist/chunk-ORN5BLL7.mjs +11 -0
- package/dist/{chunk-HWEDFLB7.mjs → chunk-P5ZI2P2W.mjs} +126 -1701
- package/dist/{chunk-466PYR4P.mjs → chunk-PWC4VB3Q.mjs} +2 -2
- package/dist/{chunk-B7S6YEBP.mjs → chunk-QJVOLKU6.mjs} +12 -3
- package/dist/{chunk-KCUIFVVW.mjs → chunk-QOW2JPUI.mjs} +9 -9
- package/dist/chunk-RDXO6JST.mjs +63 -0
- package/dist/chunk-RLOES5SX.mjs +31 -0
- package/dist/{chunk-YPUEV6ZC.mjs → chunk-RVGRFOGN.mjs} +1 -1
- package/dist/{chunk-JCLTESFN.mjs → chunk-RZWWB2XR.mjs} +1 -1
- package/dist/chunk-S5LN746F.mjs +10 -0
- package/dist/chunk-SA5LOGO3.mjs +470 -0
- package/dist/chunk-SQJWAIF4.mjs +12 -0
- package/dist/{chunk-YTJCGKM4.mjs → chunk-TBC3XUL2.mjs} +29 -6
- package/dist/chunk-TDIK6NTV.mjs +10 -0
- package/dist/chunk-TGS5UXBE.mjs +216 -0
- package/dist/{chunk-CP5RRPJR.mjs → chunk-TQXHPFWT.mjs} +1 -1
- package/dist/{chunk-7NTMUDC5.mjs → chunk-TZ3355VS.mjs} +5 -5
- package/dist/{chunk-Q7MS6P2J.mjs → chunk-TZTRKM33.mjs} +2 -2
- package/dist/{chunk-4UMZ7KQL.mjs → chunk-U55XJEIG.mjs} +2 -1
- package/dist/{chunk-S2N75OTN.mjs → chunk-UHICS3JI.mjs} +1 -1
- package/dist/{chunk-5FUOVJKG.mjs → chunk-VTTRFF2C.mjs} +32 -19
- package/dist/{chunk-62G63NMH.mjs → chunk-WX4LAO6M.mjs} +4 -4
- package/dist/{chunk-LTUGDMV4.mjs → chunk-WZ7YV54N.mjs} +1 -1
- package/dist/chunk-XAXKV65G.mjs +72 -0
- package/dist/chunk-XXHN7J46.mjs +101 -0
- package/dist/{chunk-PGVPE7GJ.mjs → chunk-YEKL4JBK.mjs} +1 -1
- package/dist/chunk-YTWZVGCB.mjs +382 -0
- package/dist/chunk-Z2KAFCRT.mjs +30 -0
- package/dist/{chunk-LKUE5GXS.mjs → chunk-ZKP7G7TV.mjs} +2 -2
- package/dist/{client-Df76GNKm.d.ts → client-DRv7UVeY.d.ts} +123 -11
- package/dist/client.d.ts +9 -8
- package/dist/client.mjs +65 -3
- package/dist/{cold-module-YLWMTTZG.mjs → cold-module-6MO2XJF2.mjs} +45 -39
- package/dist/{config-B8DP2VwR.d.ts → config-CoSig5Ox.d.ts} +22 -3
- package/dist/{config-05G_hy-1.d.ts → config-DMwffLKn.d.ts} +20 -5
- package/dist/direct-executor-FTMYY3TI.mjs +34 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +3 -3
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +2 -2
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +6799 -5939
- package/dist/durability-config-GE4U7MCZ.mjs +89 -0
- package/dist/{durability-wiring-RHLXDIVF.mjs → durability-wiring-VIF5MOSY.mjs} +82 -179
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{sync-uXR7MmM7.d.ts → engine-CFxPYqEk.d.ts} +702 -2
- package/dist/engine-hooks-EGUGNZYE.mjs +54 -0
- package/dist/geo-index-MRH5JMIR.mjs +1387 -0
- package/dist/import-XKDPJQDP.mjs +56 -0
- package/dist/{index-nRqDM6uS.d.ts → index-C4AmUnl1.d.ts} +1 -1
- package/dist/index.browser.mjs +9 -7
- package/dist/index.d.ts +134 -9
- package/dist/index.mjs +33 -26
- package/dist/index.react-native.mjs +20 -17
- package/dist/invalidation/filesystem.mjs +2 -2
- package/dist/{long-query-thread-EMYTGSJP.mjs → long-query-thread-YA4IAYSY.mjs} +34 -28
- package/dist/{methods-ABM5ELBR.mjs → methods-7IOINERF.mjs} +3 -3
- package/dist/{module-MG7JMV2U.mjs → module-FQ4JWNQJ.mjs} +41 -34
- package/dist/{module-3OMJZUFT.mjs → module-N55W4Q5C.mjs} +14 -14
- package/dist/operations-G5EP6JPX.mjs +5 -0
- package/dist/{paged-partition-archive-UOLHOEZJ.mjs → paged-partition-archive-PXW5XAYU.mjs} +48 -38
- package/dist/partial-words.mjs +11 -9
- package/dist/pattern.mjs +6 -5
- package/dist/persistence/durability/checkpoint-worker.d.ts +8 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +44 -35
- package/dist/{phrase-module-O3MDRQXP.mjs → phrase-module-XW5MKWP5.mjs} +4 -3
- package/dist/{pool-CQXYPFLG.mjs → pool-Y4A46T36.mjs} +1 -1
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +88 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +247 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +69 -0
- package/dist/react-native/chunks/{analysis-change-EAYO3Y6Q.mjs → analysis-change-LT5QBQ3H.mjs} +43 -22
- package/dist/{browser/analysis-change-entry-FCSHFQSS.mjs → react-native/chunks/analysis-change-entry-SCVWK6OU.mjs} +1 -1
- package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
- package/dist/{chunk-ZIFJXCKA.mjs → react-native/chunks/chunk-2PRHILX3.mjs} +54 -20
- package/dist/react-native/chunks/{chunk-VQSKZ3EZ.mjs → chunk-3JWDECAZ.mjs} +8 -8
- package/dist/{chunk-R6A773WK.mjs → react-native/chunks/chunk-3WI35N75.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-75VWIY35.mjs → chunk-4DII3ZSM.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-NKIZX26F.mjs → chunk-4J74WHQM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-UWDNZDWK.mjs → chunk-4JYO3JD2.mjs} +6 -6
- package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
- package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
- package/dist/react-native/chunks/{chunk-SJWDBRNP.mjs → chunk-6WA3C3DV.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-OQQVRWZ2.mjs → chunk-C5G6TJ7A.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-RVAEBN74.mjs → chunk-CKNRFDTZ.mjs} +1 -1
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
- package/dist/react-native/chunks/{chunk-O32RB3BL.mjs → chunk-DNXOMPAQ.mjs} +4 -4
- package/dist/react-native/chunks/{chunk-YBEW6YTR.mjs → chunk-DVDX4SDR.mjs} +2 -2
- package/dist/react-native/chunks/chunk-DXRSEWA2.mjs +12 -0
- package/dist/{browser/chunk-MYITLCHT.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +1 -0
- package/dist/react-native/chunks/{chunk-PPEPTUVV.mjs → chunk-EJ33LCHV.mjs} +29 -6
- package/dist/react-native/chunks/{chunk-RYMDHGL4.mjs → chunk-ENLMYKSX.mjs} +3045 -3075
- package/dist/react-native/chunks/chunk-FHPW7P2O.mjs +40 -0
- package/dist/react-native/chunks/{chunk-JV6VQY2S.mjs → chunk-FTZHMRD2.mjs} +2 -1
- package/dist/react-native/chunks/{chunk-YHKZSLOC.mjs → chunk-G43IPIDG.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-AUT7PMA4.mjs → chunk-GXX3DQXP.mjs} +8 -22
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/{chunk-DH3TVWWK.mjs → chunk-IYNT75CE.mjs} +12 -3
- package/dist/react-native/chunks/chunk-KV46CT4D.mjs +1007 -0
- package/dist/{browser/chunk-ZPTA75ZC.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-63YSZOXB.mjs → chunk-MIP4SOR6.mjs} +1480 -826
- package/dist/react-native/chunks/{chunk-ZBSWRSBG.mjs → chunk-MJDQU5MW.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GFYFQLJD.mjs → chunk-MUWD2H2S.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-IOY2SM2P.mjs → chunk-MVXELMJX.mjs} +1 -1
- package/dist/{browser/chunk-TTD27VXX.mjs → react-native/chunks/chunk-NB3LP33V.mjs} +27 -10
- package/dist/react-native/chunks/{chunk-I5PGWQJF.mjs → chunk-PDRWWPKV.mjs} +33 -24
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
- package/dist/react-native/chunks/{chunk-2CGSQM4O.mjs → chunk-POPDAGH6.mjs} +13 -13
- package/dist/react-native/chunks/{chunk-NP7DD4G5.mjs → chunk-QUKQNI3H.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-EH5CFV6Z.mjs → chunk-RDWG33MM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-JX2RIAXH.mjs → chunk-SK2PWYDH.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-ZYDKJXQJ.mjs → chunk-SUPXRTMD.mjs} +1 -1
- package/dist/react-native/chunks/chunk-TP6KCKER.mjs +63 -0
- package/dist/react-native/chunks/{chunk-JPAJWO6D.mjs → chunk-U4KSKA4Z.mjs} +1 -1
- package/dist/react-native/chunks/chunk-UQ4OAXKU.mjs +1106 -0
- package/dist/react-native/chunks/{chunk-VVFYOADG.mjs → chunk-VWUDIOT6.mjs} +6 -6
- package/dist/{browser/chunk-SIR3LMTV.mjs → react-native/chunks/chunk-WBYQRHDY.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-C2H2QQFW.mjs → chunk-YH7QY657.mjs} +3 -3
- package/dist/react-native/chunks/{chunk-NCJS3WIY.mjs → chunk-YZW4CHM6.mjs} +51 -12
- package/dist/react-native/chunks/chunk-ZLWVW734.mjs +100 -0
- package/dist/react-native/chunks/chunk-ZXZFN7FI.mjs +432 -0
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
- package/dist/react-native/chunks/{cold-module-TJL6AFAD.mjs → cold-module-KVZYUGRY.mjs} +31 -28
- package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
- package/dist/react-native/chunks/{durability-wiring-RRDYJLLM.mjs → durability-wiring-34OYO32E.mjs} +60 -162
- package/dist/react-native/chunks/engine-hooks-M7JV46NH.mjs +30 -0
- package/dist/react-native/chunks/geo-index-PX3BIHAH.mjs +1387 -0
- package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
- package/dist/react-native/chunks/import-H6AQREWI.mjs +32 -0
- package/dist/react-native/chunks/{methods-X6F36SJE.mjs → methods-6W5U4C3H.mjs} +3 -3
- package/dist/react-native/chunks/module-LBZPGOWH.mjs +36 -0
- package/dist/react-native/chunks/{module-S4DKSWMF.mjs → module-TTEVPRCW.mjs} +14 -13
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-JZ37TB7N.mjs → phrase-module-QK22HSQ2.mjs} +2 -2
- package/dist/react-native/chunks/{pool-RTGXJXPU.mjs → pool-JR3NJCAF.mjs} +1 -1
- package/dist/react-native/chunks/restore-hooks-IBGIY3DR.mjs +127 -0
- package/dist/react-native/chunks/restore-queue-ZZX54AH7.mjs +55 -0
- package/dist/react-native/chunks/{retention-PPCTP2VY.mjs → retention-EW4TTDFB.mjs} +29 -25
- package/dist/react-native/chunks/{runtime-KUATOLYB.mjs → runtime-R5E3TB3J.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-ZBIEOZTZ.mjs → snapshot-REYVIN3X.mjs} +80 -44
- package/dist/react-native/chunks/start-BQK6KN3R.mjs +38 -0
- package/dist/react-native/chunks/{write-2W4FTX7J.mjs → write-FQAYCZF5.mjs} +27 -24
- package/dist/react-native/partial-words.mjs +11 -9
- package/dist/react-native/pattern.mjs +4 -4
- package/dist/react-native/query-suggestions.mjs +260 -0
- package/dist/react-native/sync.mjs +78 -15
- package/dist/react-native/synonyms.mjs +95 -27
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +1 -0
- package/dist/{rerank-IZOB6NII.mjs → rerank-MQ37IYRV.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/restore-hooks-CDERDEF4.mjs +153 -0
- package/dist/restore-queue-7NNSTROA.mjs +55 -0
- package/dist/retention-QSVBBNRM.mjs +66 -0
- package/dist/{runtime-UZOC3NPY.mjs → runtime-COIUORCN.mjs} +5 -5
- package/dist/{schema-DDauvDOv.d.ts → schema-Jwt928nJ.d.ts} +1 -1
- package/dist/server.d.ts +108 -12
- package/dist/server.mjs +303 -50
- package/dist/{snapshot-NFX2EYN2.mjs → snapshot-RH4NSKIZ.mjs} +98 -61
- package/dist/start-MCKCOGIW.mjs +66 -0
- package/dist/sync/filesystem.d.ts +4 -4
- package/dist/sync/filesystem.mjs +6 -6
- package/dist/sync/indexeddb.d.ts +4 -4
- package/dist/sync/indexeddb.mjs +2 -2
- package/dist/sync.browser.mjs +74 -11
- package/dist/sync.d.ts +5 -5
- package/dist/sync.mjs +78 -16
- package/dist/synonyms.mjs +9 -8
- package/dist/{tasks-BShx8pdK.d.ts → tasks-qrJojgST.d.ts} +13 -5
- package/dist/thread-O4SBJJJS.mjs +50 -0
- package/dist/{types-SnO7_tAI.d.ts → types-BZCGjfLn.d.ts} +2 -3
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +8 -8
- package/dist/workers/entry.mjs +19 -8
- package/dist/{write-FGB62BHQ.mjs → write-3FK7NG3Y.mjs} +40 -33
- package/openapi.json +798 -7
- package/package.json +32 -8
- package/dist/browser/import-YI5GNB4H.mjs +0 -17
- package/dist/browser/operations-WVYLF72Q.mjs +0 -5
- package/dist/browser/restore-queue-TYIGDL5L.mjs +0 -41
- package/dist/chunk-37IVJLP6.mjs +0 -44
- package/dist/chunk-DJHHF2L5.mjs +0 -17
- package/dist/direct-executor-FI5GJHWX.mjs +0 -29
- package/dist/engine-DYu-e0oR.d.ts +0 -674
- package/dist/import-SRBNC6TE.mjs +0 -49
- package/dist/operations-PGOAY2KS.mjs +0 -5
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
- package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +0 -3
- package/dist/react-native/chunks/import-JYBMEJPQ.mjs +0 -29
- package/dist/react-native/chunks/module-QT5HZAY4.mjs +0 -33
- package/dist/react-native/chunks/operations-RYKTSZQA.mjs +0 -5
- package/dist/react-native/chunks/restore-queue-ZBVIKJWI.mjs +0 -41
- package/dist/restore-queue-COI2GSSK.mjs +0 -41
- package/dist/retention-55WA7GPU.mjs +0 -58
- package/dist/thread-P2G2FWM2.mjs +0 -44
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { DEFAULT_BLOCK_WRITES_ABOVE, DEFAULT_RESUME_WRITES_BELOW, validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, executeQuery, lazyQueryBinding, executePreflight, executeSuggest, executeListDocuments, ENGINE_MEMORY_FIGURES_MAX_AGE_MS, storedBM25Params, readEngineMemoryFigures, FULL_MEMORY_COLLECTION_INTERVAL_MS
|
|
1
|
+
import { DEFAULT_BLOCK_WRITES_ABOVE, DEFAULT_RESUME_WRITES_BELOW, validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, executeQuery, lazyQueryBinding, executePreflight, executeSuggest, executeListDocuments, validateBatchList, ENGINE_MEMORY_FIGURES_MAX_AGE_MS, validateDocId, storedBM25Params, readEngineMemoryFigures, FULL_MEMORY_COLLECTION_INTERVAL_MS } from './chunk-I53G4JAU.mjs';
|
|
2
2
|
import { DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-HJSN7UYG.mjs';
|
|
3
|
-
import { detectRuntime, resolveWorkerEntry, missingWorkerEntry, workerResourceLimits } from './chunk-
|
|
3
|
+
import { detectRuntime, resolveWorkerEntry, missingWorkerEntry, workerResourceLimits } from './chunk-LHKOSI2J.mjs';
|
|
4
4
|
import { collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal } from './chunk-XIHUI4KB.mjs';
|
|
5
|
-
import { splitWorkerBudget, resolveWorkerCount,
|
|
6
|
-
import { MAX_INDEX_CONFIGURATION_BYTES, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, HEAP_PRESSURE_WARNING_FRACTION, FOREIGN_STATS_TTL_MS, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION
|
|
7
|
-
import { resolvePartialWordAnalysis, resolvePartitionInsertOptions, isEmptySynonymSet, synonymModule, createDirectExecutor, generateId, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, createFrozenSegment } from './chunk-
|
|
8
|
-
import {
|
|
9
|
-
import { INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-
|
|
10
|
-
import { requireWithinFileLimit, HEADER_SIZE, payloadByteLength, checksumOfChunks, packEnvelopeWithEngineVersion } from './chunk-
|
|
5
|
+
import { splitWorkerBudget, resolveWorkerCount, resolveRequestThreadCount, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_BACKPRESSURE_LIMIT, SHUTDOWN_TIMEOUT_MS, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH } from './chunk-3MXV3VHR.mjs';
|
|
6
|
+
import { MAX_INDEX_CONFIGURATION_BYTES, BATCH_CHUNK_SIZE, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, HEAP_PRESSURE_WARNING_FRACTION, FOREIGN_STATS_TTL_MS, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION } from './chunk-EEBCDP36.mjs';
|
|
7
|
+
import { resolvePartialWordAnalysis, resolvePartitionInsertOptions, isEmptySynonymSet, synonymModule, createDirectExecutor, generateId, createPartitionRouter, loadSchemaCodeFor, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, createFrozenSegment } from './chunk-VTTRFF2C.mjs';
|
|
8
|
+
import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, createPartitionIndex, mergePartitionStats, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, encodeSegmentState } from './chunk-P5ZI2P2W.mjs';
|
|
9
|
+
import { INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-GH4WQ22V.mjs';
|
|
10
|
+
import { requireWithinFileLimit, HEADER_SIZE, payloadByteLength, checksumOfChunks, packEnvelopeWithEngineVersion } from './chunk-3OH67G7R.mjs';
|
|
11
11
|
import { readHeapStatistics } from './chunk-IPN7S4KX.mjs';
|
|
12
12
|
import { fnv1a } from './chunk-KAKQ74LS.mjs';
|
|
13
13
|
import { countEngineThread } from './chunk-Q2UL2TPC.mjs';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { DEFAULT_PATTERN_WORK_CAP, MATCHER_STATE_BUDGET_BYTES } from './chunk-CITFCZKF.mjs';
|
|
15
|
+
import { raiseEarlierReleaseGraphSetting, getNestedValue, messagePackUpperBoundBytes, validateVectorPromotion, validateVectorStorage, validateTextStorage, validateRequiredFields, requireDocumentWithinSizeLimit, validateDocument, validateDocumentStrict } from './chunk-L6V6BST3.mjs';
|
|
16
|
+
import { flattenSchema, validateSchema, requireCreatableSchema, schemaFieldsOf, extractVectorFieldsFromSchema } from './chunk-BU4SAIC4.mjs';
|
|
17
|
+
import { isSingleStringFieldType } from './chunk-I54T6CQP.mjs';
|
|
18
|
+
import { emitSyncChange, withOpenIndex, oneAtATime } from './chunk-Y4WPNHMC.mjs';
|
|
19
|
+
import { getLanguage } from './chunk-RZWWB2XR.mjs';
|
|
20
|
+
import { requireSearchBackendSettings } from './chunk-6HTGOXIK.mjs';
|
|
16
21
|
import { createRequestId, isValidWorkerResponse } from './chunk-QHPYS427.mjs';
|
|
17
22
|
import { collectAndReturnPages } from './chunk-QYRNLLLI.mjs';
|
|
18
|
-
import {
|
|
23
|
+
import { loadedVectorCode, loadVectorCode, requireLoadedVectorCode } from './chunk-TDIK6NTV.mjs';
|
|
24
|
+
import { ARRAY_POSITION_GAP, loadPhraseCodeFor, requireLoadedPhraseCode } from './chunk-FB6463IN.mjs';
|
|
19
25
|
import { HEAP_RESUME_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE, HEAP_BLOCK_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE } from './chunk-ZXNQEW43.mjs';
|
|
20
|
-
import {
|
|
21
|
-
import { countWrite, turnsAreBudgeted, turnIsSpent, yieldTurn, indexChangeOutsideExternalWaits, changeIndexOutsideExternalWaits } from './chunk-LQG5G2LY.mjs';
|
|
26
|
+
import { turnsAreBudgeted, turnIsSpent, yieldTurn, countWrite, indexChangeOutsideExternalWaits, changeIndexOutsideExternalWaits } from './chunk-LQG5G2LY.mjs';
|
|
22
27
|
import { noteThreadSlotLive, threadSlotOfWorker, noteThreadSlotGone } from './chunk-RFBLQLLZ.mjs';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { flattenSchema, validateSchema, requireCreatableSchema, schemaFieldsOf, extractVectorFieldsFromSchema } from './chunk-Z3TNWCI5.mjs';
|
|
26
|
-
import { isSingleStringFieldType } from './chunk-3A5KI24C.mjs';
|
|
27
|
-
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
28
|
-
import { ErrorCodes, NarsilError } from './chunk-KUZKUONM.mjs';
|
|
29
|
-
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
28
|
+
import { ErrorCodes, NarsilError } from './chunk-MP7ABPTD.mjs';
|
|
29
|
+
import { compareCodePoints } from './chunk-TBC3XUL2.mjs';
|
|
30
30
|
import { encode } from '@msgpack/msgpack';
|
|
31
31
|
|
|
32
32
|
// src/engine/memory/fractions.ts
|
|
@@ -276,7 +276,8 @@ var NARSIL_CONFIG_KEYS = {
|
|
|
276
276
|
lifecycle: true,
|
|
277
277
|
patternWorkCap: true,
|
|
278
278
|
events: true,
|
|
279
|
-
memory: true
|
|
279
|
+
memory: true,
|
|
280
|
+
querySuggestions: true
|
|
280
281
|
};
|
|
281
282
|
var EVENT_NAMES = {
|
|
282
283
|
write: true,
|
|
@@ -290,7 +291,9 @@ var EVENT_NAMES = {
|
|
|
290
291
|
layoutUpgrade: true,
|
|
291
292
|
checkpointHeld: true,
|
|
292
293
|
durabilityError: true,
|
|
293
|
-
invalidationError: true
|
|
294
|
+
invalidationError: true,
|
|
295
|
+
querySuggestionsBuild: true,
|
|
296
|
+
querySuggestionsWarning: true
|
|
294
297
|
};
|
|
295
298
|
var DURABILITY_CONFIG_KEYS = {
|
|
296
299
|
tier: true,
|
|
@@ -612,7 +615,7 @@ var TEXT_REBUILD_SWITCH_BACKLOG_DOCUMENTS = 1e3;
|
|
|
612
615
|
// src/partitioning/rewrite-spill-of.ts
|
|
613
616
|
async function rewriteSpillOf(storage, manager, target) {
|
|
614
617
|
if (storage === void 0 || (target?.config ?? manager.config).textStorage !== "disk") return null;
|
|
615
|
-
const { openRewriteSpill } = await import('./module-
|
|
618
|
+
const { openRewriteSpill } = await import('./module-FQ4JWNQJ.mjs');
|
|
616
619
|
return openRewriteSpill(storage, manager, target);
|
|
617
620
|
}
|
|
618
621
|
|
|
@@ -924,91 +927,6 @@ function createAnalysisRebuildCoordinator(config, deps) {
|
|
|
924
927
|
};
|
|
925
928
|
}
|
|
926
929
|
|
|
927
|
-
// src/engine/durability-config.ts
|
|
928
|
-
var WAL_ONLY_FIELDS = ["directory", "mode", "flushIntervalMs", "segmentMaxBytes", "compactionThreshold"];
|
|
929
|
-
function configError(message) {
|
|
930
|
-
return new NarsilError(ErrorCodes.CONFIG_INVALID, message);
|
|
931
|
-
}
|
|
932
|
-
function requireKnob(name, value, minimum) {
|
|
933
|
-
if (value === void 0) {
|
|
934
|
-
return;
|
|
935
|
-
}
|
|
936
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value < minimum) {
|
|
937
|
-
throw configError(`durability.${name} must be a finite number of at least ${minimum}, got ${String(value)}`);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
function requireValidDurabilityConfig(durability) {
|
|
941
|
-
if (durability.tier !== void 0 && durability.tier !== "wal" && durability.tier !== "snapshot") {
|
|
942
|
-
throw configError(`durability.tier must be "wal" or "snapshot", got "${String(durability.tier)}"`);
|
|
943
|
-
}
|
|
944
|
-
if (durability.mode !== void 0 && durability.mode !== "sync" && durability.mode !== "async") {
|
|
945
|
-
throw configError(`durability.mode must be "sync" or "async", got "${String(durability.mode)}"`);
|
|
946
|
-
}
|
|
947
|
-
requireKnob("checkpointIntervalMs", durability.checkpointIntervalMs, 0);
|
|
948
|
-
requireKnob("checkpointMutationThreshold", durability.checkpointMutationThreshold, 1);
|
|
949
|
-
requireKnob("flushIntervalMs", durability.flushIntervalMs, 0);
|
|
950
|
-
requireKnob("segmentMaxBytes", durability.segmentMaxBytes, 1);
|
|
951
|
-
if (durability.segmentMaxBytes !== void 0 && durability.segmentMaxBytes > MAX_FILE_BYTES) {
|
|
952
|
-
throw configError(
|
|
953
|
-
`durability.segmentMaxBytes must be at most ${MAX_FILE_BYTES}, the largest file that every implementation reads, got ${durability.segmentMaxBytes}`
|
|
954
|
-
);
|
|
955
|
-
}
|
|
956
|
-
requireKnob("compactionThreshold", durability.compactionThreshold, 1);
|
|
957
|
-
if (durability.tier === "snapshot") {
|
|
958
|
-
for (const field of WAL_ONLY_FIELDS) {
|
|
959
|
-
if (durability[field] !== void 0) {
|
|
960
|
-
throw configError(
|
|
961
|
-
`durability.${field} applies to the write-ahead log tier only and cannot combine with durability.tier "snapshot"`
|
|
962
|
-
);
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
function filesystemBackedDirectory(config) {
|
|
968
|
-
const adapterDirectory = config.persistence?.directory;
|
|
969
|
-
if (adapterDirectory !== void 0 && adapterDirectory.trim().length > 0) {
|
|
970
|
-
return adapterDirectory;
|
|
971
|
-
}
|
|
972
|
-
return null;
|
|
973
|
-
}
|
|
974
|
-
function resolveDurabilityTier(config) {
|
|
975
|
-
const filesystemDirectory = filesystemBackedDirectory(config);
|
|
976
|
-
if (config.durability) {
|
|
977
|
-
requireValidDurabilityConfig(config.durability);
|
|
978
|
-
}
|
|
979
|
-
if (config.durability?.tier === "snapshot") {
|
|
980
|
-
if (config.persistence === void 0) {
|
|
981
|
-
throw configError(
|
|
982
|
-
"Snapshot durability persists through a persistence adapter. Configure persistence, or remove durability.tier"
|
|
983
|
-
);
|
|
984
|
-
}
|
|
985
|
-
return { kind: "snapshot", config: { ...config.durability }, adapter: config.persistence };
|
|
986
|
-
}
|
|
987
|
-
if (config.durability) {
|
|
988
|
-
if (config.durability.directory !== void 0 && config.durability.directory.trim().length > 0) {
|
|
989
|
-
return { kind: "wal", config: { ...config.durability } };
|
|
990
|
-
}
|
|
991
|
-
if (filesystemDirectory !== null) {
|
|
992
|
-
return { kind: "wal", config: { ...config.durability, directory: filesystemDirectory } };
|
|
993
|
-
}
|
|
994
|
-
if (config.persistence !== void 0) {
|
|
995
|
-
throw configError(
|
|
996
|
-
"WAL durability requires a filesystem directory, but the configured persistence adapter is not filesystem-backed. Use a filesystem persistence adapter or set durability.directory"
|
|
997
|
-
);
|
|
998
|
-
}
|
|
999
|
-
throw configError(
|
|
1000
|
-
"Durability requires a directory. Set durability.directory explicitly, or configure a filesystem persistence adapter"
|
|
1001
|
-
);
|
|
1002
|
-
}
|
|
1003
|
-
if (config.persistence === void 0) {
|
|
1004
|
-
return null;
|
|
1005
|
-
}
|
|
1006
|
-
if (filesystemDirectory !== null) {
|
|
1007
|
-
return { kind: "wal", config: { directory: filesystemDirectory } };
|
|
1008
|
-
}
|
|
1009
|
-
return { kind: "snapshot", config: {}, adapter: config.persistence };
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
930
|
// src/engine/array-positions.ts
|
|
1013
931
|
function holdsStringArrayField(schema) {
|
|
1014
932
|
return schemaFieldsOf(schema).some((field) => field.base === "string[]");
|
|
@@ -1151,12 +1069,12 @@ function recoveryFailure(metadata, err) {
|
|
|
1151
1069
|
});
|
|
1152
1070
|
}
|
|
1153
1071
|
async function createIndexFromMetadata(deps, metadata, loadData) {
|
|
1154
|
-
const
|
|
1155
|
-
if (
|
|
1072
|
+
const loadingSchemaCode = loadData ? loadSchemaCodeFor(metadata.schema) : null;
|
|
1073
|
+
if (loadingSchemaCode !== null) await loadingSchemaCode;
|
|
1156
1074
|
const existing = deps.indexRegistry.get(metadata.indexName);
|
|
1157
1075
|
if (existing !== void 0) {
|
|
1158
1076
|
if ((metadata.analysisGeneration ?? 0) > existing.analysisGeneration) {
|
|
1159
|
-
const { adoptSavedAnalysis } = await import('./analysis-change-
|
|
1077
|
+
const { adoptSavedAnalysis } = await import('./analysis-change-5BQOQ4BF.mjs');
|
|
1160
1078
|
adoptSavedAnalysis(deps.executor.getManager(metadata.indexName), existing, metadata);
|
|
1161
1079
|
}
|
|
1162
1080
|
if (loadData && deps.executor.getManager(metadata.indexName) === void 0) {
|
|
@@ -1212,7 +1130,8 @@ async function createIndexFromMetadata(deps, metadata, loadData) {
|
|
|
1212
1130
|
analysisGeneration: metadata.analysisGeneration ?? 0,
|
|
1213
1131
|
pendingAnalysis: metadata.pendingAnalysis ?? null,
|
|
1214
1132
|
durableAnalysis: null,
|
|
1215
|
-
sync: metadata.sync?.enabled === true ? (await import('./sync-state-ZWHLAFLE.mjs')).syncStateOfMetadata(metadata) : null
|
|
1133
|
+
sync: metadata.sync?.enabled === true ? (await import('./sync-state-ZWHLAFLE.mjs')).syncStateOfMetadata(metadata) : null,
|
|
1134
|
+
querySuggestions: metadata.querySuggestions ?? null
|
|
1216
1135
|
});
|
|
1217
1136
|
if (loadData) await deps.indexState().registerOpen(metadata.indexName);
|
|
1218
1137
|
else deps.indexState().registerClosed(metadata.indexName);
|
|
@@ -3302,7 +3221,7 @@ async function startPool(state) {
|
|
|
3302
3221
|
);
|
|
3303
3222
|
}
|
|
3304
3223
|
eligibleIndexNames(state);
|
|
3305
|
-
const [factory, { createWorkerPool }] = await Promise.all([createWorkerFactory(), import('./pool-
|
|
3224
|
+
const [factory, { createWorkerPool }] = await Promise.all([createWorkerFactory(), import('./pool-Y4A46T36.mjs')]);
|
|
3306
3225
|
let started = null;
|
|
3307
3226
|
const pool = createWorkerPool({
|
|
3308
3227
|
count: state.keywordWorkerCount + state.longQueryWorkerCount,
|
|
@@ -3993,18 +3912,18 @@ async function emitWriteEventAfter(source, indexName, write) {
|
|
|
3993
3912
|
// src/engine/core.ts
|
|
3994
3913
|
async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
3995
3914
|
validateWorkerConfig(config?.workers, config?.lifecycle);
|
|
3996
|
-
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-
|
|
3915
|
+
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-COIUORCN.mjs')).resolveRerankSettings(config);
|
|
3997
3916
|
const eventHandlers = eventHandlersOf(config?.events);
|
|
3998
3917
|
const vectorWorkerCount = splitWorkerBudget(resolveWorkerCount(config?.workers?.count)).vector;
|
|
3999
3918
|
const vectorCopyPolicy = {
|
|
4000
3919
|
enabled: (config?.workers?.enabled ?? workersEnabledByDefault()) && vectorWorkerCount > 0,
|
|
4001
3920
|
count: vectorWorkerCount
|
|
4002
3921
|
};
|
|
4003
|
-
const durabilityTier = config !== void 0 ? resolveDurabilityTier(config) : null;
|
|
3922
|
+
const durabilityTier = config !== void 0 && (config.durability || config.persistence !== void 0) ? (await import('./durability-config-GE4U7MCZ.mjs')).resolveDurabilityTier(config) : null;
|
|
4004
3923
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
4005
3924
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
4006
3925
|
}
|
|
4007
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
3926
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-VIF5MOSY.mjs');
|
|
4008
3927
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
4009
3928
|
const executor = createDirectExecutor({
|
|
4010
3929
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -4190,7 +4109,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
4190
4109
|
requireManager,
|
|
4191
4110
|
resumeChange: async (indexName) => {
|
|
4192
4111
|
if ((indexRegistry.get(indexName)?.pendingAnalysis ?? null) === null) return;
|
|
4193
|
-
await (await import('./analysis-change-entry-
|
|
4112
|
+
await (await import('./analysis-change-entry-TXX6JSMX.mjs')).resumeChangeOf(engineCore, indexName);
|
|
4194
4113
|
},
|
|
4195
4114
|
onClose: hooks?.onIndexClose,
|
|
4196
4115
|
onOpen: (indexName) => {
|
|
@@ -4251,6 +4170,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
4251
4170
|
orchestrator,
|
|
4252
4171
|
rebalanceRouter,
|
|
4253
4172
|
rebalancingIndexes,
|
|
4173
|
+
restoresInFlight: /* @__PURE__ */ new Map(),
|
|
4254
4174
|
waqMap,
|
|
4255
4175
|
guardShutdown,
|
|
4256
4176
|
requireIndex,
|
|
@@ -4275,7 +4195,7 @@ async function startEngineCore(core, config) {
|
|
|
4275
4195
|
checkHeapAfterRecovery(core);
|
|
4276
4196
|
}
|
|
4277
4197
|
if (core.invalidation) await core.invalidation.start();
|
|
4278
|
-
if (core.durability) await (await import('./analysis-change-entry-
|
|
4198
|
+
if (core.durability) await (await import('./analysis-change-entry-TXX6JSMX.mjs')).resumeEveryChange(core);
|
|
4279
4199
|
if (config?.lifecycle === void 0) await core.analysisRebuild.reviewStaleIndexes();
|
|
4280
4200
|
} catch (err) {
|
|
4281
4201
|
await core.durability?.manager.shutdown().catch(() => void 0);
|
|
@@ -4285,6 +4205,7 @@ async function startEngineCore(core, config) {
|
|
|
4285
4205
|
}
|
|
4286
4206
|
async function shutdownEngine(core) {
|
|
4287
4207
|
const { executor, durability, indexRegistry, eventHandlers, orchestrator } = core;
|
|
4208
|
+
await core.querySuggestionHooks?.shutdown();
|
|
4288
4209
|
core.indexState.dispose();
|
|
4289
4210
|
if (durability) {
|
|
4290
4211
|
await durability.manager.shutdown();
|
|
@@ -4313,7 +4234,7 @@ async function shutdownEngine(core) {
|
|
|
4313
4234
|
}
|
|
4314
4235
|
}
|
|
4315
4236
|
if (core.rerankAdapters.size > 0) {
|
|
4316
|
-
await (await import('./runtime-
|
|
4237
|
+
await (await import('./runtime-COIUORCN.mjs')).shutdownRerankAdapters(core.rerankAdapters);
|
|
4317
4238
|
}
|
|
4318
4239
|
await orchestrator.shutdown();
|
|
4319
4240
|
await executor.shutdown();
|
|
@@ -4391,7 +4312,8 @@ function indexConfigurationOf(entry) {
|
|
|
4391
4312
|
synonyms,
|
|
4392
4313
|
entry.analysisGeneration
|
|
4393
4314
|
);
|
|
4394
|
-
|
|
4315
|
+
const withSuggestions = { ...payload, ...entry.querySuggestions };
|
|
4316
|
+
return entry.sync === null ? withSuggestions : { ...withSuggestions, syncEpoch: entry.sync.epoch };
|
|
4395
4317
|
}
|
|
4396
4318
|
function requireConfigurationWithinSizeLimit(config, language) {
|
|
4397
4319
|
const adapter = config.embedding?.adapter;
|
|
@@ -4478,8 +4400,8 @@ async function announceIndexDropped(core, name, config) {
|
|
|
4478
4400
|
}
|
|
4479
4401
|
async function createEngineIndex(core, config, name, requestedConfig, creation = {}) {
|
|
4480
4402
|
const { indexUuid, adapterBinding = "required", appliesCreationLimits = false } = creation;
|
|
4481
|
-
const
|
|
4482
|
-
if (
|
|
4403
|
+
const loadingSchemaCode = loadSchemaCodeFor(requestedConfig.schema);
|
|
4404
|
+
if (loadingSchemaCode !== null) await loadingSchemaCode;
|
|
4483
4405
|
core.guardShutdown();
|
|
4484
4406
|
validateIndexName(name);
|
|
4485
4407
|
if (core.indexRegistry.has(name)) {
|
|
@@ -4558,6 +4480,7 @@ async function createEngineIndex(core, config, name, requestedConfig, creation =
|
|
|
4558
4480
|
const language = getLanguage(indexConfig.language ?? "english");
|
|
4559
4481
|
if (appliesCreationLimits) requireConfigurationWithinSizeLimit(indexConfig, language);
|
|
4560
4482
|
const synonyms = prepareConfiguredSynonyms(configured, language, appliesCreationLimits);
|
|
4483
|
+
await core.querySuggestionHooks?.beforeCreate(name);
|
|
4561
4484
|
core.executor.createIndex(name, indexConfig, language, false, synonyms?.lookup ?? null);
|
|
4562
4485
|
core.indexRegistry.set(name, {
|
|
4563
4486
|
config: indexConfig,
|
|
@@ -4575,7 +4498,8 @@ async function createEngineIndex(core, config, name, requestedConfig, creation =
|
|
|
4575
4498
|
analysisGeneration: 0,
|
|
4576
4499
|
pendingAnalysis: null,
|
|
4577
4500
|
durableAnalysis: null,
|
|
4578
|
-
sync: null
|
|
4501
|
+
sync: null,
|
|
4502
|
+
querySuggestions: creation.querySuggestions ?? null
|
|
4579
4503
|
});
|
|
4580
4504
|
await core.indexState.registerOpen(name);
|
|
4581
4505
|
if (core.durability) {
|
|
@@ -4588,10 +4512,11 @@ async function dropEngineIndex(core, name) {
|
|
|
4588
4512
|
const entry = core.requireIndex(name);
|
|
4589
4513
|
const changeRecorded = () => entry.pendingAnalysis !== null || entry.durableAnalysis !== null;
|
|
4590
4514
|
const abandonChange = async () => {
|
|
4591
|
-
await (await import('./analysis-change-entry-
|
|
4515
|
+
await (await import('./analysis-change-entry-TXX6JSMX.mjs')).abandonChangeOf(core, name);
|
|
4592
4516
|
};
|
|
4593
4517
|
if (changeRecorded()) await abandonChange();
|
|
4594
4518
|
await core.indexState.drop(name, async () => {
|
|
4519
|
+
await core.querySuggestionHooks?.beforeDrop(name);
|
|
4595
4520
|
await core.analysisRebuild.abandon(name);
|
|
4596
4521
|
if (changeRecorded()) await abandonChange();
|
|
4597
4522
|
await core.orchestrator.closeIndex(name);
|
|
@@ -4609,6 +4534,7 @@ async function dropEngineIndex(core, name) {
|
|
|
4609
4534
|
core.analysisRebuild.clearStale(name);
|
|
4610
4535
|
if (entry.sync !== null) emitSyncChange(core.indexRegistry, { kind: "dropped", indexName: name });
|
|
4611
4536
|
});
|
|
4537
|
+
await core.querySuggestionHooks?.afterDrop(name);
|
|
4612
4538
|
await runLifecycleHook(core, "onIndexDrop", { indexName: name, config: entry.config });
|
|
4613
4539
|
}
|
|
4614
4540
|
function registerEngineEmbeddingAdapter(core, name, adapter) {
|
|
@@ -6347,7 +6273,7 @@ async function dropEngineIndex2(core, name) {
|
|
|
6347
6273
|
// src/engine/sync-epoch.ts
|
|
6348
6274
|
async function holdSyncEpochChange(core, indexName) {
|
|
6349
6275
|
if ((core.indexRegistry.get(indexName)?.sync ?? null) === null) return () => void 0;
|
|
6350
|
-
return (await import('./operations-
|
|
6276
|
+
return (await import('./operations-G5EP6JPX.mjs')).holdRenewedSyncEpoch(core, indexName);
|
|
6351
6277
|
}
|
|
6352
6278
|
async function withRenewedSyncEpoch(core, indexName, change) {
|
|
6353
6279
|
const release = await holdSyncEpochChange(core, indexName);
|
|
@@ -6476,7 +6402,23 @@ function portabilityOperations(core, config, engine) {
|
|
|
6476
6402
|
release();
|
|
6477
6403
|
}
|
|
6478
6404
|
}
|
|
6479
|
-
|
|
6405
|
+
function queueRestore(indexName, data) {
|
|
6406
|
+
const { restoresInFlight } = core;
|
|
6407
|
+
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
6408
|
+
const restored = previous.then(async () => {
|
|
6409
|
+
const { runRestore } = await import('./restore-queue-7NNSTROA.mjs');
|
|
6410
|
+
await runRestore(core, restoreHost, indexName, data, engine());
|
|
6411
|
+
});
|
|
6412
|
+
const settled2 = restored.then(
|
|
6413
|
+
() => void 0,
|
|
6414
|
+
() => void 0
|
|
6415
|
+
);
|
|
6416
|
+
restoresInFlight.set(indexName, settled2);
|
|
6417
|
+
void settled2.then(() => {
|
|
6418
|
+
if (restoresInFlight.get(indexName) === settled2) restoresInFlight.delete(indexName);
|
|
6419
|
+
});
|
|
6420
|
+
return restored;
|
|
6421
|
+
}
|
|
6480
6422
|
const restoreHost = {
|
|
6481
6423
|
getVectorFieldPaths,
|
|
6482
6424
|
announceIndexCreated: (name, restoredConfig) => announceIndexCreated(core, name, restoredConfig),
|
|
@@ -6493,26 +6435,23 @@ function portabilityOperations(core, config, engine) {
|
|
|
6493
6435
|
};
|
|
6494
6436
|
}
|
|
6495
6437
|
return {
|
|
6496
|
-
snapshot(indexName) {
|
|
6438
|
+
snapshot(indexName, options) {
|
|
6497
6439
|
return withOpenIndex2(indexName, async () => {
|
|
6498
|
-
const { createSnapshot } = await import('./snapshot-
|
|
6499
|
-
return createSnapshot(snapshotDepsOf(indexName));
|
|
6440
|
+
const { createSnapshot } = await import('./snapshot-RH4NSKIZ.mjs');
|
|
6441
|
+
return createSnapshot(snapshotDepsOf(indexName), options?.queryHistory === true ? core : null);
|
|
6500
6442
|
});
|
|
6501
6443
|
},
|
|
6502
6444
|
async restore(indexName, data) {
|
|
6503
6445
|
core.guardShutdown();
|
|
6504
6446
|
validateIndexName(indexName);
|
|
6505
|
-
|
|
6506
|
-
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
6507
|
-
);
|
|
6508
|
-
await emitWriteEventAfter(core, indexName, restored);
|
|
6447
|
+
await emitWriteEventAfter(core, indexName, queueRestore(indexName, data));
|
|
6509
6448
|
core.heapPressureNotifier.check(indexName);
|
|
6510
6449
|
},
|
|
6511
6450
|
exportDocuments(indexName) {
|
|
6512
6451
|
return withOpenIndex2(indexName, async () => {
|
|
6513
6452
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
6514
|
-
import('./snapshot-
|
|
6515
|
-
import('./write-
|
|
6453
|
+
import('./snapshot-RH4NSKIZ.mjs'),
|
|
6454
|
+
import('./write-3FK7NG3Y.mjs')
|
|
6516
6455
|
]);
|
|
6517
6456
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
6518
6457
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -6520,7 +6459,7 @@ function portabilityOperations(core, config, engine) {
|
|
|
6520
6459
|
},
|
|
6521
6460
|
importDocumentExport(indexName, data) {
|
|
6522
6461
|
core.guardShutdown();
|
|
6523
|
-
const imported = import('./import-
|
|
6462
|
+
const imported = import('./import-XKDPJQDP.mjs').then(
|
|
6524
6463
|
({ readDocumentExport }) => readDocumentExport(engine(), indexName, data)
|
|
6525
6464
|
);
|
|
6526
6465
|
return emitWriteEventAfter(core, indexName, imported);
|
|
@@ -6631,7 +6570,7 @@ async function runEngineQuery(core, indexName, params, options) {
|
|
|
6631
6570
|
const manager = core.requireManager(indexName);
|
|
6632
6571
|
const scoped = scopedParams(params, options);
|
|
6633
6572
|
await core.pluginRegistry.runHook("beforeSearch", { indexName, params: scoped });
|
|
6634
|
-
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-
|
|
6573
|
+
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-COIUORCN.mjs');
|
|
6635
6574
|
const resolvedParams = await resolveVectorText(
|
|
6636
6575
|
rerank === void 0 ? scoped : rerank.withRerankQueryText(scoped),
|
|
6637
6576
|
entry.embeddingAdapter,
|
|
@@ -6781,8 +6720,8 @@ async function runEngineListDocuments(core, indexName, params, partitionIds) {
|
|
|
6781
6720
|
// src/narsil/sync.ts
|
|
6782
6721
|
function syncOperations(core) {
|
|
6783
6722
|
return {
|
|
6784
|
-
updateSync: async (indexName, setting) => (await import('./methods-
|
|
6785
|
-
getSync: async (indexName) => (await import('./methods-
|
|
6723
|
+
updateSync: async (indexName, setting) => (await import('./methods-7IOINERF.mjs')).updateSyncOf(core, indexName, setting),
|
|
6724
|
+
getSync: async (indexName) => (await import('./methods-7IOINERF.mjs')).syncOf(core, indexName)
|
|
6786
6725
|
};
|
|
6787
6726
|
}
|
|
6788
6727
|
|
|
@@ -6964,7 +6903,7 @@ function createNarsilFromCore(core, config) {
|
|
|
6964
6903
|
const entry = requireIndex(indexName);
|
|
6965
6904
|
await withOpenIndexWrite(indexName, async () => {
|
|
6966
6905
|
if (entry.pendingAnalysis === null) return core.analysisRebuild.rebuild(indexName);
|
|
6967
|
-
return (await import('./analysis-change-
|
|
6906
|
+
return (await import('./analysis-change-5BQOQ4BF.mjs')).resumeAnalysisChange(core, indexName);
|
|
6968
6907
|
});
|
|
6969
6908
|
},
|
|
6970
6909
|
async changeAnalysis(indexName, change) {
|
|
@@ -6972,7 +6911,7 @@ function createNarsilFromCore(core, config) {
|
|
|
6972
6911
|
requireIndex(indexName);
|
|
6973
6912
|
const changed = withOpenIndex2(
|
|
6974
6913
|
indexName,
|
|
6975
|
-
async () => (await import('./analysis-change-
|
|
6914
|
+
async () => (await import('./analysis-change-5BQOQ4BF.mjs')).changeIndexAnalysis(core, indexName, change)
|
|
6976
6915
|
);
|
|
6977
6916
|
await emitWriteEventAfter(core, indexName, changed);
|
|
6978
6917
|
},
|
|
@@ -7007,7 +6946,7 @@ function createNarsilFromCore(core, config) {
|
|
|
7007
6946
|
const rebalanced = withOpenIndex2(
|
|
7008
6947
|
indexName,
|
|
7009
6948
|
() => withRenewedSyncEpoch(core, indexName, async () => {
|
|
7010
|
-
const { executeRebalance } = await import('./analysis-change-
|
|
6949
|
+
const { executeRebalance } = await import('./analysis-change-5BQOQ4BF.mjs');
|
|
7011
6950
|
const running = executeRebalance(requireManager(indexName), indexName, targetPartitionCount, rebalanceCtx);
|
|
7012
6951
|
releaseWrites();
|
|
7013
6952
|
await running;
|
|
@@ -7129,10 +7068,14 @@ async function createNarsil(config) {
|
|
|
7129
7068
|
const runnableConfig = await resolveRunnableConfig(config);
|
|
7130
7069
|
const core = await createEngineCore(runnableConfig);
|
|
7131
7070
|
await startEngineCore(core, runnableConfig);
|
|
7132
|
-
|
|
7071
|
+
const engine = createNarsilFromCore(core, runnableConfig);
|
|
7072
|
+
if (runnableConfig?.querySuggestions !== void 0 || core.durability !== null) {
|
|
7073
|
+
await (await import('./engine-hooks-EGUGNZYE.mjs')).startQuerySuggestions(core, engine, runnableConfig);
|
|
7074
|
+
}
|
|
7075
|
+
return engine;
|
|
7133
7076
|
}
|
|
7134
7077
|
|
|
7135
7078
|
// src/index.ts
|
|
7136
7079
|
var VERSION = "0.1.0";
|
|
7137
7080
|
|
|
7138
|
-
export { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, REBALANCE_CHUNK_SIZE, VERSION, applyStoredIndexBm25, arrayPositionsAreStale, bindRerankWindowSource, createEngineCore, createEngineIndex, createMemoryMonitor, createNarsil, createNarsilFromCore, deleteNestedValue, emitEngineEvent, emptySerializablePartition, encodeIndexConfiguration, engineCoreOf, engineVersionParts, extractVectorFromDoc, holdSyncEpochChange, insertDocumentVectors, memoryFractionsOf, packChecksummedEnvelope, packEnvelopeWithChecksum, prepareConfiguredSynonyms, prepareDocumentVectors, prepareStoredSynonyms, providedDocId, rebuildTextIndexes, reconstructSchemaFromMetadata, removeDocumentVectors, requireConfigurationWithinSizeLimit, requireKnownConfig, rerankWindowCapOf, resolveRunnableConfig, resolveVectorText, rewriteSpillOf, rulesOfStoredSynonyms, runEngineListDocuments, runEnginePreflight, runEngineQuery, runEngineQueryStats, runEngineSuggest, startEngineCore, storedArrayPositionGap, textRebuildTargetOf, toError2 as toError, validateEmbeddingConfig, validateMemoryFractions, validateRequiredFieldsInSchema, vectorsEqual, yieldToEventLoop };
|
|
7081
|
+
export { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, REBALANCE_CHUNK_SIZE, VERSION, applyStoredIndexBm25, arrayPositionsAreStale, bindRerankWindowSource, createEngineCore, createEngineIndex, createMemoryMonitor, createNarsil, createNarsilFromCore, deleteNestedValue, dropEngineIndex, emitEngineEvent, emitWriteEventAfter, emptySerializablePartition, encodeIndexConfiguration, engineCoreOf, engineVersionParts, extractVectorFromDoc, holdSyncEpochChange, insertDocumentVectors, memoryFractionsOf, packChecksummedEnvelope, packEnvelopeWithChecksum, prepareConfiguredSynonyms, prepareDocumentVectors, prepareStoredSynonyms, providedDocId, rebuildTextIndexes, reconstructSchemaFromMetadata, removeDocumentBatch2 as removeDocumentBatch, removeDocumentVectors, requireConfigurationWithinSizeLimit, requireKnownConfig, rerankWindowCapOf, resolveRunnableConfig, resolveVectorText, rewriteSpillOf, rulesOfStoredSynonyms, runEngineListDocuments, runEnginePreflight, runEngineQuery, runEngineQueryStats, runEngineSuggest, startEngineCore, storedArrayPositionGap, textRebuildTargetOf, toError2 as toError, validateEmbeddingConfig, validateMemoryFractions, validateRequiredFieldsInSchema, vectorsEqual, yieldToEventLoop };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { encodeJson, SYNC_CLOSE_SERVER_ERROR, SYNC_SUBPROTOCOL } from './chunk-KYYABCSW.mjs';
|
|
2
|
-
import { answerRefusalOf } from './chunk-
|
|
3
|
-
import { archiveRange } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-TV2L3BN7.mjs';
|
|
2
|
+
import { answerRefusalOf } from './chunk-25KDNIZZ.mjs';
|
|
3
|
+
import { archiveRange } from './chunk-TZTRKM33.mjs';
|
|
4
|
+
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-I53G4JAU.mjs';
|
|
6
5
|
import { DEFAULT_RERANK_WINDOW } from './chunk-HJSN7UYG.mjs';
|
|
7
6
|
import { collectGarbageBeforeRefusal, collectYoungGenerationBeforeRefusal, reportRefusalAfterCollection, reservedHeapBytes, admitHeapBytes } from './chunk-XIHUI4KB.mjs';
|
|
8
7
|
import { ANALYSIS_CHANGE_MEMBERS } from './chunk-EEBCDP36.mjs';
|
|
9
|
-
import {
|
|
10
|
-
import { loadNativeCore } from './chunk-HVKXNBFL.mjs';
|
|
11
|
-
import { MAX_FILTER_DEPTH } from './chunk-OKX2BBNW.mjs';
|
|
8
|
+
import { MAX_FILTER_DEPTH } from './chunk-CITFCZKF.mjs';
|
|
12
9
|
import { MAX_SORT_FIELDS } from './chunk-FQBFZAWG.mjs';
|
|
13
|
-
import {
|
|
10
|
+
import { HEAP_BLOCK_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE } from './chunk-ZXNQEW43.mjs';
|
|
11
|
+
import { nativeSearchCoreIsEnabled, loadNativeCore } from './chunk-KKQC526K.mjs';
|
|
12
|
+
import { NarsilError, ServerErrorCodes, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
14
13
|
import { randomUUID } from 'crypto';
|
|
15
14
|
import { mkdtemp, open, rm } from 'fs/promises';
|
|
16
15
|
import { tmpdir } from 'os';
|
|
@@ -235,6 +234,7 @@ var STATUS_BY_CODE = {
|
|
|
235
234
|
SYNC_NOT_READY: 503,
|
|
236
235
|
SYNC_NOT_ENABLED: 404,
|
|
237
236
|
SYNC_SNAPSHOT_PREPARING: 503,
|
|
237
|
+
QUERY_SUGGESTIONS_NOT_ENABLED: 404,
|
|
238
238
|
EMBEDDING_FAILED: 503,
|
|
239
239
|
RERANK_FAILED: 503,
|
|
240
240
|
QUERY_ROUTING_FAILED: 503,
|
|
@@ -990,7 +990,8 @@ var TASK_TYPE_SET = {
|
|
|
990
990
|
changeAnalysis: true,
|
|
991
991
|
backup: true,
|
|
992
992
|
backupRestore: true,
|
|
993
|
-
backupDelete: true
|
|
993
|
+
backupDelete: true,
|
|
994
|
+
querySuggestionsBuild: true
|
|
994
995
|
};
|
|
995
996
|
var TASK_TYPES = Object.keys(TASK_TYPE_SET);
|
|
996
997
|
var TASK_STATUSES = ["running", "succeeded", "failed", "cancelled"];
|
|
@@ -1595,7 +1596,7 @@ function createRouteRunner(deps) {
|
|
|
1595
1596
|
const requestHeaders = capturedHeaders(req, opts.headers);
|
|
1596
1597
|
const declaredBytes = needsBody ? declaredBodyBytes(req.getHeader("content-length")) : null;
|
|
1597
1598
|
let hookContext = null;
|
|
1598
|
-
if (useHook) {
|
|
1599
|
+
if (useHook || opts.capturesContext === true) {
|
|
1599
1600
|
const headers = {};
|
|
1600
1601
|
req.forEach((key, value) => {
|
|
1601
1602
|
headers[key] = value;
|
|
@@ -2217,6 +2218,7 @@ function maintenanceRoutes(shared) {
|
|
|
2217
2218
|
summary: "Stream a snapshot archive of an index",
|
|
2218
2219
|
tags: ["Maintenance"],
|
|
2219
2220
|
request: null,
|
|
2221
|
+
query: "SnapshotQuery",
|
|
2220
2222
|
responses: { 200: { contentType: SNAPSHOT_ARCHIVE_CONTENT_TYPE } }
|
|
2221
2223
|
},
|
|
2222
2224
|
{
|
|
@@ -2456,6 +2458,113 @@ function sharedRouteOptions(limits) {
|
|
|
2456
2458
|
};
|
|
2457
2459
|
}
|
|
2458
2460
|
|
|
2461
|
+
// src/server/routes/query-suggestions.ts
|
|
2462
|
+
function querySuggestionRoutes(shared) {
|
|
2463
|
+
const { named, namedBody } = shared;
|
|
2464
|
+
return [
|
|
2465
|
+
{
|
|
2466
|
+
method: "put",
|
|
2467
|
+
path: "/indexes/:name/query-suggestions",
|
|
2468
|
+
handler: "updateQuerySuggestions",
|
|
2469
|
+
options: namedBody,
|
|
2470
|
+
operationId: "updateQuerySuggestions",
|
|
2471
|
+
summary: "Replace the popular query suggestions setting of an index",
|
|
2472
|
+
tags: ["QuerySuggestions"],
|
|
2473
|
+
request: "QuerySuggestionsSetting",
|
|
2474
|
+
responses: { 200: "OkResponse" }
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
method: "get",
|
|
2478
|
+
path: "/indexes/:name/query-suggestions",
|
|
2479
|
+
handler: "querySuggestionsStatus",
|
|
2480
|
+
options: named,
|
|
2481
|
+
operationId: "querySuggestionsStatus",
|
|
2482
|
+
summary: "Report the setting, the last build, and the next build of popular query suggestions",
|
|
2483
|
+
tags: ["QuerySuggestions"],
|
|
2484
|
+
request: null,
|
|
2485
|
+
responses: { 200: "QuerySuggestionsStatus" }
|
|
2486
|
+
},
|
|
2487
|
+
{
|
|
2488
|
+
method: "post",
|
|
2489
|
+
path: "/indexes/:name/query-suggestions/record",
|
|
2490
|
+
handler: "recordQuery",
|
|
2491
|
+
options: { ...namedBody, capturesContext: true },
|
|
2492
|
+
operationId: "recordQuery",
|
|
2493
|
+
summary: "Count a search that a person followed with a click, for the person that the server identifies",
|
|
2494
|
+
tags: ["QuerySuggestions"],
|
|
2495
|
+
request: "RecordQueryBody",
|
|
2496
|
+
responses: { 200: "RecordQueryResult" }
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
method: "post",
|
|
2500
|
+
path: "/indexes/:name/query-suggestions/build",
|
|
2501
|
+
handler: "buildQuerySuggestions",
|
|
2502
|
+
options: named,
|
|
2503
|
+
operationId: "buildQuerySuggestions",
|
|
2504
|
+
summary: "Build the popular query suggestions of an index, as a task",
|
|
2505
|
+
tags: ["QuerySuggestions"],
|
|
2506
|
+
request: null,
|
|
2507
|
+
responses: { 202: "TaskRecord" }
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
method: "get",
|
|
2511
|
+
path: "/indexes/:name/query-suggestions/preview",
|
|
2512
|
+
handler: "previewQuerySuggestions",
|
|
2513
|
+
options: named,
|
|
2514
|
+
operationId: "previewQuerySuggestions",
|
|
2515
|
+
summary: "List the phrases that the next build would publish",
|
|
2516
|
+
tags: ["QuerySuggestions"],
|
|
2517
|
+
request: null,
|
|
2518
|
+
query: "QuerySuggestionsPreviewQuery",
|
|
2519
|
+
responses: { 200: "QuerySuggestionsPreview" }
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
method: "get",
|
|
2523
|
+
path: "/indexes/:name/query-suggestions/bans",
|
|
2524
|
+
handler: "readQueryBans",
|
|
2525
|
+
options: named,
|
|
2526
|
+
operationId: "readQueryBans",
|
|
2527
|
+
summary: "Read the ban list of popular query suggestions",
|
|
2528
|
+
tags: ["QuerySuggestions"],
|
|
2529
|
+
request: null,
|
|
2530
|
+
responses: { 200: "QueryBansBody" }
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
method: "put",
|
|
2534
|
+
path: "/indexes/:name/query-suggestions/bans",
|
|
2535
|
+
handler: "replaceQueryBans",
|
|
2536
|
+
options: namedBody,
|
|
2537
|
+
operationId: "replaceQueryBans",
|
|
2538
|
+
summary: "Replace the ban list, and remove each newly banned phrase from every suggestions index",
|
|
2539
|
+
tags: ["QuerySuggestions"],
|
|
2540
|
+
request: "QueryBansBody",
|
|
2541
|
+
responses: { 200: "QueryBansBody" }
|
|
2542
|
+
},
|
|
2543
|
+
{
|
|
2544
|
+
method: "post",
|
|
2545
|
+
path: "/indexes/:name/query-suggestions/remove",
|
|
2546
|
+
handler: "removeQuery",
|
|
2547
|
+
options: namedBody,
|
|
2548
|
+
operationId: "removeQuery",
|
|
2549
|
+
summary: "Ban a phrase and remove it from every suggestions index of an index",
|
|
2550
|
+
tags: ["QuerySuggestions"],
|
|
2551
|
+
request: "RemoveQueryBody",
|
|
2552
|
+
responses: { 200: "RemoveQueryResponse" }
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
method: "post",
|
|
2556
|
+
path: "/indexes/:name/query-suggestions/manual",
|
|
2557
|
+
handler: "addManualSuggestion",
|
|
2558
|
+
options: namedBody,
|
|
2559
|
+
operationId: "addManualSuggestion",
|
|
2560
|
+
summary: "Add a suggestion by hand, which a build leaves in place",
|
|
2561
|
+
tags: ["QuerySuggestions"],
|
|
2562
|
+
request: "ManualQuerySuggestion",
|
|
2563
|
+
responses: { 200: "ManualSuggestionResponse" }
|
|
2564
|
+
}
|
|
2565
|
+
];
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2459
2568
|
// src/server/sync/range.ts
|
|
2460
2569
|
var WHOLE = { kind: "whole" };
|
|
2461
2570
|
var UNSATISFIABLE = { kind: "unsatisfiable" };
|
|
@@ -2591,7 +2700,8 @@ function serverRoutes(limits) {
|
|
|
2591
2700
|
...searchRoutes(shared),
|
|
2592
2701
|
...maintenanceRoutes(shared),
|
|
2593
2702
|
...backupRoutes(shared),
|
|
2594
|
-
...syncRoutes(shared)
|
|
2703
|
+
...syncRoutes(shared),
|
|
2704
|
+
...querySuggestionRoutes(shared)
|
|
2595
2705
|
];
|
|
2596
2706
|
}
|
|
2597
2707
|
|