@delali/narsil 0.3.1-next.99 → 0.4.1-next.211
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 +30 -11
- package/dist/adapters/filesystem.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +101 -13
- package/dist/adapters/gcs.d.ts +49 -0
- package/dist/adapters/gcs.mjs +213 -0
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +2 -7
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.mjs +5 -0
- package/dist/adapters/s3.d.ts +53 -0
- package/dist/adapters/s3.mjs +263 -0
- package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
- package/dist/browser/chunk-4E5APHTM.mjs +1459 -0
- package/dist/browser/chunk-NDYADQ4Y.mjs +23426 -0
- package/dist/browser/chunk-QAOVAYAG.mjs +564 -0
- package/dist/browser/chunk-WC2DEXWU.mjs +29 -0
- package/dist/browser/chunk-YINZFPLT.mjs +1239 -0
- package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
- package/dist/browser/{chunk-Z7QH2XHB.mjs → core-leaf-HWAXCEWX.mjs} +3987 -2103
- package/dist/browser/custom-token-results-R5BIX7SL.mjs +59 -0
- package/dist/browser/digest-leaf-64IPRPZD.mjs +151 -0
- package/dist/browser/durability-config-75NSFCQN.mjs +97 -0
- package/dist/browser/embed-GG6PS3EA.mjs +264 -0
- package/dist/browser/geo-index-GNHY4PUB.mjs +1484 -0
- package/dist/browser/gzip-JF3S6PPT.mjs +31 -0
- package/dist/browser/module-ZZTNG5JZ.mjs +5762 -0
- package/dist/browser/msgpack-leaf-44XNWSSY.mjs +302 -0
- package/dist/browser/optional-reads-XMVPG6HG.mjs +3230 -0
- package/dist/browser/optional-writes-76DWMRQH.mjs +3603 -0
- package/dist/browser/phrase-module-6UGFVW5J.mjs +617 -0
- package/dist/browser/resolve-vector-text-XRR2OVHE.mjs +85 -0
- package/dist/browser/restore-queue-SG5O735W.mjs +196 -0
- package/dist/browser/{runtime-NYE5TB6O.mjs → runtime-OMKE7DF4.mjs} +83 -25
- package/dist/browser/segment-codec-leaf-A427QJUX.mjs +554 -0
- package/dist/browser/segment-merge-leaf-7BZ54JPI.mjs +1636 -0
- package/dist/browser/storage-leaf-5UTR5K7J.mjs +19829 -0
- package/dist/browser/store-leaf-3L33V35P.mjs +2070 -0
- package/dist/browser/suggestions-leaf-UBNDVKBD.mjs +1430 -0
- package/dist/browser/worker-copies-JXSGYR5X.mjs +2951 -0
- package/dist/{capabilities-BTTIs96E.d.ts → capabilities-DMte5K9_.d.ts} +162 -18
- package/dist/chunk-2AFZE7Y3.mjs +72 -0
- package/dist/chunk-2CKDCC65.mjs +47 -0
- package/dist/chunk-3ECIRFS5.mjs +61 -0
- package/dist/chunk-44W3CBNG.mjs +7 -0
- package/dist/chunk-4H4RG2FR.mjs +13 -0
- package/dist/chunk-4PY4JYMY.mjs +11 -0
- package/dist/chunk-4ZPVAHWF.mjs +1289 -0
- package/dist/chunk-5EI5CXO6.mjs +197 -0
- package/dist/chunk-5F5MXWS5.mjs +283 -0
- package/dist/{chunk-OHP7QR33.mjs → chunk-5FLRXF73.mjs} +25 -4
- package/dist/chunk-6FOENO4E.mjs +273 -0
- package/dist/chunk-6GHX35ZM.mjs +108 -0
- package/dist/chunk-6MSZ543Y.mjs +32 -0
- package/dist/chunk-6N6HHBCQ.mjs +4596 -0
- package/dist/{chunk-LXPIXDUJ.mjs → chunk-7P5YWDRQ.mjs} +403 -169
- package/dist/{chunk-TGP5M5R7.mjs → chunk-7T4LAYT4.mjs} +1 -1
- package/dist/{chunk-GGSH6KBQ.mjs → chunk-ASZLNVWW.mjs} +23 -3
- package/dist/chunk-AVBPB3MI.mjs +602 -0
- package/dist/{chunk-UCDF35PU.mjs → chunk-AVGUEEQ3.mjs} +494 -245
- package/dist/chunk-BUMREPLU.mjs +15 -0
- package/dist/chunk-BY6NALRK.mjs +31921 -0
- package/dist/chunk-C4ZMXXTL.mjs +92 -0
- package/dist/{chunk-2WYMG3OZ.mjs → chunk-C74KPRR7.mjs} +274 -19
- package/dist/{chunk-RSRVGAIQ.mjs → chunk-D456ZFPQ.mjs} +3 -2
- package/dist/chunk-DXZ6JDWG.mjs +797 -0
- package/dist/chunk-FJXJZUWF.mjs +209 -0
- package/dist/chunk-FS3HPPSC.mjs +212 -0
- package/dist/chunk-FT4KLZXW.mjs +1164 -0
- package/dist/chunk-GR5GMFJJ.mjs +104 -0
- package/dist/chunk-GXCDWLQI.mjs +193 -0
- package/dist/chunk-GXED6R3Q.mjs +271 -0
- package/dist/chunk-HLPRHOSO.mjs +17 -0
- package/dist/chunk-IL5DRCNU.mjs +3041 -0
- package/dist/{chunk-P36MUFEJ.mjs → chunk-JDDXV6UF.mjs} +2 -1
- package/dist/chunk-K5HSUPYS.mjs +11 -0
- package/dist/chunk-KYIRXTCA.mjs +100 -0
- package/dist/chunk-LFXS6OF7.mjs +289 -0
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/chunk-M2Z5WVWW.mjs +194 -0
- package/dist/{chunk-45AVKHMJ.mjs → chunk-M3B7SGJB.mjs} +63 -50
- package/dist/chunk-M3OW2XSP.mjs +40 -0
- package/dist/chunk-MFPSQZ6P.mjs +127 -0
- package/dist/chunk-MRCJBWJZ.mjs +1292 -0
- package/dist/chunk-MSIN4NM3.mjs +25 -0
- package/dist/chunk-MW3CJVGP.mjs +219 -0
- package/dist/chunk-MYM6CAVK.mjs +76 -0
- package/dist/chunk-NJJN4FMM.mjs +84 -0
- package/dist/chunk-NM7I3BM7.mjs +59 -0
- package/dist/chunk-OIJ64LGT.mjs +19 -0
- package/dist/{chunk-K7D4ZTSW.mjs → chunk-P4F4UWLC.mjs} +1 -1
- package/dist/chunk-Q2AP2FSN.mjs +15 -0
- package/dist/chunk-R2PJKSNL.mjs +54 -0
- package/dist/{chunk-HXJBSHXF.mjs → chunk-R724DJSG.mjs} +5056 -2619
- package/dist/chunk-S2POFTLN.mjs +10 -0
- package/dist/chunk-S5QMWECL.mjs +7 -0
- package/dist/chunk-SLAC5PAB.mjs +5008 -0
- package/dist/chunk-T4HMSZCX.mjs +5 -0
- package/dist/chunk-TACP6VK6.mjs +111 -0
- package/dist/chunk-TGPKS2UM.mjs +125 -0
- package/dist/chunk-TKKXPKEO.mjs +979 -0
- package/dist/chunk-V6EUBAIT.mjs +19 -0
- package/dist/chunk-XL56L4IR.mjs +228 -0
- package/dist/chunk-XQIAMDAG.mjs +3076 -0
- package/dist/chunk-YTUZ4R22.mjs +1063 -0
- package/dist/{chunk-KV3AZFT3.mjs → chunk-ZKOQR7EA.mjs} +45 -1
- package/dist/chunk-ZPJFGGGI.mjs +638 -0
- package/dist/chunk-ZXX5GZEX.mjs +17 -0
- package/dist/{client-i9eLJrw5.d.ts → client-BKqtl0_V.d.ts} +442 -22
- package/dist/client.d.ts +11 -10
- package/dist/client.mjs +8 -898
- package/dist/config-Bnl7L-0H.d.ts +608 -0
- package/dist/{config-P__Diiy4.d.ts → config-CJ-jfI0a.d.ts} +119 -9
- package/dist/core-leaf-6JVHEVFB.mjs +8 -0
- package/dist/custom-token-results-NXHBVY7U.mjs +59 -0
- package/dist/digest-leaf-KXBGKYHZ.mjs +1 -0
- package/dist/direct-executor-V3WOYU2Y.mjs +17 -0
- package/dist/distribution/coordinator/etcd.d.ts +63 -7
- package/dist/distribution/coordinator/etcd.mjs +725 -81
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/coordinator/in-memory.mjs +65 -10
- package/dist/distribution/transport/grpc.d.ts +2 -2
- package/dist/distribution/transport/grpc.mjs +39 -10
- package/dist/distribution/transport/in-memory.d.ts +2 -2
- package/dist/distribution/transport/in-memory.mjs +9 -6
- package/dist/distribution/transport/tcp.d.ts +2 -2
- package/dist/distribution/transport/tcp.mjs +20 -15
- package/dist/distribution.d.ts +267 -56
- package/dist/distribution.mjs +23156 -11362
- package/dist/durability-config-VWS2K24E.mjs +96 -0
- package/dist/embed-4PHHKGBK.mjs +263 -0
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{memory-CUEDwr-F.d.ts → engine-qjAxJSKk.d.ts} +2254 -1123
- package/dist/geo-index-2ZMMWWSK.mjs +1484 -0
- package/dist/gzip-2UCZW2MM.mjs +31 -0
- package/dist/{index-lcdGLyJH.d.ts → index-B_vmxpgW.d.ts} +260 -102
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +2133 -57
- package/dist/index.mjs +16 -32
- package/dist/index.react-native.mjs +12 -0
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +1 -2
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/languages/albanian.mjs +1 -1
- package/dist/languages/amharic.mjs +1 -1
- package/dist/languages/arabic.mjs +1 -1
- package/dist/languages/armenian.mjs +1 -1
- package/dist/languages/azerbaijani.mjs +1 -1
- package/dist/languages/bambara.mjs +1 -1
- package/dist/languages/basque.mjs +1 -1
- package/dist/languages/belarusian.mjs +1 -1
- package/dist/languages/bengali.mjs +1 -1
- package/dist/languages/bosnian.mjs +1 -1
- package/dist/languages/breton.mjs +1 -1
- package/dist/languages/bulgarian.mjs +1 -1
- package/dist/languages/burmese.mjs +1 -1
- package/dist/languages/catalan.mjs +1 -1
- package/dist/languages/chinese.mjs +1 -1
- package/dist/languages/croatian.mjs +1 -1
- package/dist/languages/czech.mjs +1 -1
- package/dist/languages/dagbani.mjs +1 -1
- package/dist/languages/danish.mjs +1 -1
- package/dist/languages/dutch.mjs +1 -1
- package/dist/languages/english.mjs +1 -1
- package/dist/languages/esperanto.mjs +1 -1
- package/dist/languages/estonian.mjs +1 -1
- package/dist/languages/ewe.mjs +1 -1
- package/dist/languages/faroese.mjs +1 -1
- package/dist/languages/fijian.mjs +1 -1
- package/dist/languages/finnish.mjs +1 -1
- package/dist/languages/french.mjs +1 -1
- package/dist/languages/ga.mjs +1 -1
- package/dist/languages/galician.mjs +1 -1
- package/dist/languages/georgian.mjs +1 -1
- package/dist/languages/german.mjs +1 -1
- package/dist/languages/greek.mjs +1 -1
- package/dist/languages/guarani.mjs +1 -1
- package/dist/languages/gujarati.mjs +1 -1
- package/dist/languages/haitian-creole.mjs +1 -1
- package/dist/languages/hausa.mjs +1 -1
- package/dist/languages/hawaiian.mjs +1 -1
- package/dist/languages/hebrew.mjs +1 -1
- package/dist/languages/hindi.mjs +1 -1
- package/dist/languages/hungarian.mjs +1 -1
- package/dist/languages/icelandic.mjs +1 -1
- package/dist/languages/igbo.mjs +1 -1
- package/dist/languages/indonesian.mjs +1 -1
- package/dist/languages/irish.mjs +1 -1
- package/dist/languages/italian.mjs +1 -1
- package/dist/languages/japanese.mjs +1 -1
- package/dist/languages/kannada.mjs +1 -1
- package/dist/languages/kazakh.mjs +1 -1
- package/dist/languages/khmer.mjs +1 -1
- package/dist/languages/kinyarwanda.mjs +1 -1
- package/dist/languages/kirundi.mjs +1 -1
- package/dist/languages/korean.mjs +1 -1
- package/dist/languages/kurmanji.mjs +1 -1
- package/dist/languages/kyrgyz.mjs +1 -1
- package/dist/languages/lao.mjs +1 -1
- package/dist/languages/latin.mjs +1 -1
- package/dist/languages/latvian.mjs +1 -1
- package/dist/languages/lingala.mjs +1 -1
- package/dist/languages/lithuanian.mjs +1 -1
- package/dist/languages/luxembourgish.mjs +1 -1
- package/dist/languages/macedonian.mjs +1 -1
- package/dist/languages/malagasy.mjs +1 -1
- package/dist/languages/malay.mjs +1 -1
- package/dist/languages/malayalam.mjs +1 -1
- package/dist/languages/maltese.mjs +1 -1
- package/dist/languages/maori.mjs +1 -1
- package/dist/languages/marathi.mjs +1 -1
- package/dist/languages/nepali.mjs +1 -1
- package/dist/languages/norwegian.mjs +1 -1
- package/dist/languages/oromo.mjs +1 -1
- package/dist/languages/persian.mjs +1 -1
- package/dist/languages/polish.mjs +1 -1
- package/dist/languages/portuguese.mjs +1 -1
- package/dist/languages/punjabi.mjs +1 -1
- package/dist/languages/romanian.mjs +1 -1
- package/dist/languages/russian.mjs +1 -1
- package/dist/languages/samoan.mjs +1 -1
- package/dist/languages/sanskrit.mjs +1 -1
- package/dist/languages/scottish-gaelic.mjs +1 -1
- package/dist/languages/serbian.mjs +1 -1
- package/dist/languages/shona.mjs +1 -1
- package/dist/languages/sinhala.mjs +1 -1
- package/dist/languages/slovak.mjs +1 -1
- package/dist/languages/slovenian.mjs +1 -1
- package/dist/languages/sorani.mjs +1 -1
- package/dist/languages/spanish.mjs +1 -1
- package/dist/languages/swahili.mjs +1 -1
- package/dist/languages/swedish.mjs +1 -1
- package/dist/languages/tagalog.mjs +1 -1
- package/dist/languages/tamil.mjs +1 -1
- package/dist/languages/tatar.mjs +1 -1
- package/dist/languages/telugu.mjs +1 -1
- package/dist/languages/thai.mjs +1 -1
- package/dist/languages/tibetan.mjs +1 -1
- package/dist/languages/tigrinya.mjs +1 -1
- package/dist/languages/tongan.mjs +1 -1
- package/dist/languages/turkish.mjs +1 -1
- package/dist/languages/twi.mjs +1 -1
- package/dist/languages/ukrainian.mjs +1 -1
- package/dist/languages/urdu.mjs +1 -1
- package/dist/languages/vietnamese.mjs +1 -1
- package/dist/languages/welsh.mjs +1 -1
- package/dist/languages/wolof.mjs +1 -1
- package/dist/languages/xhosa.mjs +1 -1
- package/dist/languages/yoruba.mjs +1 -1
- package/dist/languages/zulu.mjs +1 -1
- package/dist/long-query-thread-UCRK7MSI.mjs +154 -0
- package/dist/module-5ZSLUQII.mjs +3729 -0
- package/dist/msgpack-leaf-H5ZYW7S7.mjs +9 -0
- package/dist/optional-reads-5HFMF2QZ.mjs +3373 -0
- package/dist/optional-writes-4UOQKETU.mjs +247 -0
- package/dist/paged-partition-archive-BBRLZCIF.mjs +253 -0
- package/dist/partial-words.browser.mjs +1650 -0
- package/dist/partial-words.mjs +17 -11
- package/dist/{chunk-ASY5PHYI.mjs → pattern.browser.mjs} +253 -311
- package/dist/pattern.mjs +6 -7
- package/dist/persistence/durability/checkpoint-worker.d.ts +93 -25
- package/dist/persistence/durability/checkpoint-worker.mjs +51 -41
- package/dist/phrase-module-EFESWOCR.mjs +635 -0
- package/dist/query-actions-HMJUVWGT.mjs +119 -0
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +53 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +47 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +19 -0
- package/dist/react-native/chunks/chunk-3OEFSHVV.mjs +970 -0
- package/dist/{browser/chunk-RELZRJNR.mjs → react-native/chunks/chunk-43R4GCM7.mjs} +49 -50
- package/dist/react-native/chunks/chunk-AKRYHAVG.mjs +6729 -0
- package/dist/react-native/chunks/chunk-CW2ZFXSE.mjs +14 -0
- package/dist/react-native/chunks/chunk-G3WCDTOF.mjs +29640 -0
- package/dist/react-native/chunks/chunk-GXXHHA2T.mjs +212 -0
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/chunk-HQEVQEDJ.mjs +52 -0
- package/dist/react-native/chunks/chunk-HRDMIQ63.mjs +131 -0
- package/dist/react-native/chunks/chunk-HTBY4GON.mjs +565 -0
- package/dist/react-native/chunks/chunk-LX62Y4B5.mjs +61 -0
- package/dist/react-native/chunks/chunk-MRH36RN3.mjs +902 -0
- package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
- package/dist/react-native/chunks/chunk-UE4ANHSX.mjs +127 -0
- package/dist/react-native/chunks/chunk-UNZPWLVL.mjs +1063 -0
- package/dist/react-native/chunks/chunk-UO44MA5M.mjs +232 -0
- package/dist/react-native/chunks/chunk-UYKIV2KT.mjs +42 -0
- package/dist/react-native/chunks/chunk-VUJCSQG5.mjs +11 -0
- package/dist/react-native/chunks/chunk-WVHF4ZAK.mjs +802 -0
- package/dist/react-native/chunks/chunk-ZUJCUPVS.mjs +54 -0
- package/dist/react-native/chunks/core-leaf-S2KNBWDY.mjs +7 -0
- package/dist/react-native/chunks/custom-token-results-3OZEMRE7.mjs +59 -0
- package/dist/react-native/chunks/digest-leaf-X6OIFDIU.mjs +1 -0
- package/dist/react-native/chunks/durability-config-FCSD4MXY.mjs +96 -0
- package/dist/react-native/chunks/embed-HA2I7RCF.mjs +263 -0
- package/dist/react-native/chunks/geo-index-QEYKEVPH.mjs +1484 -0
- package/dist/react-native/chunks/gzip.react-native-CVM4NQG2.mjs +12 -0
- package/dist/react-native/chunks/module-FMBX75GP.mjs +5209 -0
- package/dist/react-native/chunks/msgpack-leaf-JMNGSTRW.mjs +7 -0
- package/dist/react-native/chunks/optional-reads-AFPO2FEB.mjs +3364 -0
- package/dist/react-native/chunks/optional-writes-XOH25XZI.mjs +296 -0
- package/dist/react-native/chunks/phrase-module-IGYBK7XH.mjs +636 -0
- package/dist/react-native/chunks/replace-IMZUVUOE.mjs +57 -0
- package/dist/react-native/chunks/resolve-vector-text-GE2CRJKI.mjs +84 -0
- package/dist/react-native/chunks/restore-queue-LLNMYB4Z.mjs +187 -0
- package/dist/react-native/chunks/runtime-UOHD2XUJ.mjs +615 -0
- package/dist/react-native/chunks/segment-codec-leaf-VR6O5GLC.mjs +13 -0
- package/dist/react-native/chunks/segment-merge-leaf-LLMWU4EW.mjs +14 -0
- package/dist/react-native/chunks/storage-leaf-JD7PIDO4.mjs +19633 -0
- package/dist/react-native/chunks/store-leaf-4UVCMYGN.mjs +15 -0
- package/dist/react-native/chunks/suggestions-leaf-J5VT5RHY.mjs +1321 -0
- package/dist/react-native/chunks/worker-copies-ZYHY7FKJ.mjs +2831 -0
- package/dist/react-native/partial-words.mjs +1658 -0
- package/dist/react-native/pattern.mjs +2570 -0
- package/dist/react-native/query-suggestions.mjs +55 -0
- package/dist/react-native/sync.mjs +2759 -0
- package/dist/react-native/synonyms.mjs +676 -0
- package/dist/react.d.ts +12 -8
- package/dist/react.mjs +45 -1
- package/dist/{rerank-NWTKK636.mjs → rerank-RI2PMNOD.mjs} +22 -12
- package/dist/rerankers/http.d.ts +1 -1
- package/dist/rerankers/http.mjs +2 -2
- package/dist/resolve-vector-text-OD4J3WHF.mjs +3 -0
- package/dist/restore-queue-PCKWDAKQ.mjs +192 -0
- package/dist/runtime-USQYKN3I.mjs +615 -0
- package/dist/{schema-4W_7tk1f.d.ts → schema-CzG9OUw5.d.ts} +70 -30
- package/dist/segment-codec-leaf-QJM7I6QG.mjs +18 -0
- package/dist/segment-merge-leaf-4BJGIJHY.mjs +18 -0
- package/dist/server.d.ts +348 -22
- package/dist/server.mjs +2211 -327
- package/dist/storage-leaf-GRRRI7UV.mjs +5962 -0
- package/dist/store-leaf-6VMMSVBE.mjs +20 -0
- package/dist/stored-values-BWIMpiT_.d.ts +25 -0
- package/dist/suggestions-leaf-4KPTMPTL.mjs +54 -0
- package/dist/sync/filesystem.d.ts +30 -0
- package/dist/sync/filesystem.mjs +288 -0
- package/dist/sync/indexeddb.browser.mjs +287 -0
- package/dist/sync/indexeddb.d.ts +30 -0
- package/dist/sync/indexeddb.mjs +242 -0
- package/dist/sync.browser.mjs +1271 -0
- package/dist/sync.d.ts +23 -0
- package/dist/sync.mjs +2712 -0
- package/dist/synonyms.browser.mjs +658 -0
- package/dist/synonyms.mjs +17 -7
- package/dist/tasks-65b6t6lk.d.ts +782 -0
- package/dist/thread-UJ3W5LVI.mjs +31 -0
- package/dist/{types-B3b68nfF.d.ts → types-Ck97nB3D.d.ts} +1 -1
- package/dist/types-CpCg-Gq-.d.ts +227 -0
- package/dist/{types-Cb9kiY5P.d.ts → types-DvncmvuQ.d.ts} +12 -1
- package/dist/vector/search-worker.d.ts +10 -2
- package/dist/vector/search-worker.mjs +11 -11
- package/dist/worker-copies-YSXZXIGC.mjs +2232 -0
- package/dist/workers/entry.mjs +75 -15
- package/openapi.json +6840 -0
- package/package.json +404 -19
- package/dist/browser/chunk-CN4I4FZU.mjs +0 -602
- package/dist/browser/chunk-HOZW3PKP.mjs +0 -9
- package/dist/browser/chunk-JPTQZWJQ.mjs +0 -10
- package/dist/browser/chunk-LD55ZGU3.mjs +0 -347
- package/dist/browser/chunk-NAFT3K6X.mjs +0 -24546
- package/dist/browser/chunk-NNG3EEB6.mjs +0 -2728
- package/dist/browser/chunk-QWES44AW.mjs +0 -473
- package/dist/browser/durability-wiring-PY3L7DES.mjs +0 -3679
- package/dist/browser/module-PDXYHT75.mjs +0 -2822
- package/dist/browser/release-76MXRPGV.mjs +0 -33
- package/dist/browser/restore-queue-DVIYJ7RU.mjs +0 -35
- package/dist/browser/snapshot-J57MZK6L.mjs +0 -1207
- package/dist/browser/write-L7FAQA47.mjs +0 -208
- package/dist/chunk-37CD3OKS.mjs +0 -87
- package/dist/chunk-5XNIRLFC.mjs +0 -96
- package/dist/chunk-7X5JST5L.mjs +0 -114
- package/dist/chunk-AV4IJKD2.mjs +0 -35
- package/dist/chunk-AY3AQ3UH.mjs +0 -73
- package/dist/chunk-BKB3XTMI.mjs +0 -707
- package/dist/chunk-C7SLA6CM.mjs +0 -19
- package/dist/chunk-COVCQ73F.mjs +0 -587
- package/dist/chunk-DJHHF2L5.mjs +0 -17
- package/dist/chunk-E74YLAIG.mjs +0 -24
- package/dist/chunk-FMWRCP2C.mjs +0 -57
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-HJSN7UYG.mjs +0 -10
- package/dist/chunk-JFRNNBOM.mjs +0 -35
- package/dist/chunk-K25LZA54.mjs +0 -8484
- package/dist/chunk-KEHK2O6P.mjs +0 -13
- package/dist/chunk-KOKM4PQN.mjs +0 -52
- package/dist/chunk-KZ3NX2P7.mjs +0 -21
- package/dist/chunk-L3L5YFXC.mjs +0 -614
- package/dist/chunk-L5ORED7V.mjs +0 -25
- package/dist/chunk-LH4NZNJJ.mjs +0 -1731
- package/dist/chunk-LU2CE5AE.mjs +0 -507
- package/dist/chunk-LXWDQLTW.mjs +0 -30
- package/dist/chunk-MHOSCQCQ.mjs +0 -948
- package/dist/chunk-NKRBEGJZ.mjs +0 -1705
- package/dist/chunk-NTRMFARG.mjs +0 -462
- package/dist/chunk-NW4XDSP2.mjs +0 -212
- package/dist/chunk-OOEXLUGR.mjs +0 -117
- package/dist/chunk-ORBLD3EL.mjs +0 -6
- package/dist/chunk-OWNZYMRE.mjs +0 -3591
- package/dist/chunk-PPY2GSIB.mjs +0 -44
- package/dist/chunk-QY7GC2MW.mjs +0 -33
- package/dist/chunk-R6A773WK.mjs +0 -226
- package/dist/chunk-R6PR4WYZ.mjs +0 -68
- package/dist/chunk-R7EEKAJE.mjs +0 -593
- package/dist/chunk-RONEOEON.mjs +0 -426
- package/dist/chunk-VWULPWRJ.mjs +0 -7469
- package/dist/chunk-WCJKUGHB.mjs +0 -262
- package/dist/chunk-WQBCBKY3.mjs +0 -8
- package/dist/chunk-X5CV2E2B.mjs +0 -1
- package/dist/chunk-YA7XLE2R.mjs +0 -1256
- package/dist/chunk-YTJCGKM4.mjs +0 -56
- package/dist/chunk-ZG477IPV.mjs +0 -526
- package/dist/chunk-ZYNAMIYX.mjs +0 -113
- package/dist/config-BGB_fDtq.d.ts +0 -237
- package/dist/direct-executor-CXZ66ACP.mjs +0 -22
- package/dist/durability-wiring-QTHOGFMZ.mjs +0 -3229
- package/dist/engine-BGCEm9E_.d.ts +0 -577
- package/dist/module-3NONKBZX.mjs +0 -1860
- package/dist/release-BH3DKW3T.mjs +0 -33
- package/dist/restore-queue-JPRBUYII.mjs +0 -35
- package/dist/runtime-ZKYZFJJC.mjs +0 -177
- package/dist/snapshot-HOGXNO5W.mjs +0 -793
- package/dist/tasks-HG3rlxx6.d.ts +0 -302
- package/dist/thread-B657LQXK.mjs +0 -692
- package/dist/write-XLIGTXBU.mjs +0 -238
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-
|
|
2
|
-
import { Q as QueryParams,
|
|
3
|
-
import { I as IndexConfig, A as AnyDocument } from './schema-
|
|
1
|
+
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
|
|
2
|
+
import { Q as QueryParams, t as QueryResult, u as NarsilEventHandlers } from './engine-qjAxJSKk.js';
|
|
3
|
+
import { I as IndexConfig, A as AnyDocument } from './schema-CzG9OUw5.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Hooks that the engine calls alongside its own work, so that an application
|
|
@@ -229,22 +229,93 @@ interface NarsilConfig {
|
|
|
229
229
|
*/
|
|
230
230
|
events?: NarsilEventHandlers;
|
|
231
231
|
/**
|
|
232
|
-
* This is the most work that the engine may do on the pattern tests
|
|
233
|
-
* search, counted over every partition that it searches.
|
|
234
|
-
*
|
|
232
|
+
* This is the most work that the engine may do on the pattern tests and
|
|
233
|
+
* phrases of one search, counted over every partition that it searches. For
|
|
234
|
+
* a phrase, the engine adds one unit for each posting of its starting word
|
|
235
|
+
* that it visits, and one for each position that it compares. For a pattern
|
|
236
|
+
* test, it adds one unit for each run of three code points that it looks up in a pattern
|
|
235
237
|
* index, one for each entry that it reads from a pattern index, and one for
|
|
236
238
|
* each step of its matcher. For a text whose case fold is shorter than three
|
|
237
239
|
* code points, it counts each document that it checks as an entry that it
|
|
238
240
|
* reads. It counts an `in` or `nin` test as one `eq` test for each distinct
|
|
239
241
|
* value in its list. For an `eq` test with a `tolerance`, it also adds one
|
|
240
242
|
* unit for each cell that it fills in the table of edit distances between
|
|
241
|
-
* the text and a value.
|
|
242
|
-
*
|
|
243
|
+
* the text and a value. It also counts the preparation of that test once for
|
|
244
|
+
* a search, however many worker copies prepare it. Once the count passes the
|
|
245
|
+
* cap, the engine throws `SEARCH_WORK_CAP_EXCEEDED`. The cap
|
|
243
246
|
* defaults to 25,000,000 units. For any value other than a whole number from
|
|
244
247
|
* 1 to `Number.MAX_SAFE_INTEGER`, {@link createNarsil} throws
|
|
245
248
|
* `CONFIG_INVALID`.
|
|
246
249
|
*/
|
|
247
250
|
patternWorkCap?: number;
|
|
251
|
+
/**
|
|
252
|
+
* These fractions set the memory levels at which the engine stops and resumes
|
|
253
|
+
* accepting inserts and updates, so that a write cannot take the process past
|
|
254
|
+
* its memory limit. Inside a cluster node, the node's own memory settings
|
|
255
|
+
* apply in place of these. For a fraction outside the range that
|
|
256
|
+
* {@link MemoryConfig} describes, {@link createNarsil} throws `CONFIG_INVALID`
|
|
257
|
+
* on Node.js and on a phone. A browser reports no memory limit, so the
|
|
258
|
+
* engine there ignores this setting and leaves it unchecked.
|
|
259
|
+
*/
|
|
260
|
+
memory?: MemoryConfig;
|
|
261
|
+
/**
|
|
262
|
+
* The secret key that popular query suggestions scramble each person's ID
|
|
263
|
+
* with. Give every node of a cluster the same key. Without it, the engine
|
|
264
|
+
* counts no search and builds no suggestion. Import
|
|
265
|
+
* `@delali/narsil/query-suggestions` to reach the feature.
|
|
266
|
+
*/
|
|
267
|
+
querySuggestions?: QuerySuggestionsConfig;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* The engine settings of popular query suggestions.
|
|
271
|
+
*
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
interface QuerySuggestionsConfig {
|
|
275
|
+
/**
|
|
276
|
+
* A secret of at least 32 bytes, as bytes or as text whose UTF-8 bytes the
|
|
277
|
+
* engine takes. No snapshot, backup, or payload holds it.
|
|
278
|
+
*/
|
|
279
|
+
key: string | Uint8Array;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* The memory levels at which an engine stops and resumes accepting inserts and
|
|
283
|
+
* updates.
|
|
284
|
+
*
|
|
285
|
+
* The engine measures its process memory and its heap before a write whenever
|
|
286
|
+
* its latest measurement is more than 10 milliseconds old. It counts as full once
|
|
287
|
+
* either figure passes `blockWritesAbove` of its limit, and as clear again once
|
|
288
|
+
* both fall below `resumeWritesBelow`, so that an engine near the threshold
|
|
289
|
+
* does not switch writes on and off. While the engine is full, it refuses every
|
|
290
|
+
* insert and update with `MEMORY_WRITE_BLOCKED` and the reason `memory_full`,
|
|
291
|
+
* and it accepts removes, searches, and document reads, so that you can free
|
|
292
|
+
* memory by removing documents. It also refuses a document whose indexing could
|
|
293
|
+
* take the memory in use past the block level, with the reason
|
|
294
|
+
* `write_would_fill_memory`. In a batch, it refuses that document and every
|
|
295
|
+
* later one, and it keeps the documents that it has already indexed. A runtime
|
|
296
|
+
* that reports no memory limit, such as a browser, leaves every write
|
|
297
|
+
* unchecked.
|
|
298
|
+
*
|
|
299
|
+
* @public
|
|
300
|
+
*/
|
|
301
|
+
interface MemoryConfig {
|
|
302
|
+
/**
|
|
303
|
+
* The engine counts as full once either memory figure passes this fraction
|
|
304
|
+
* of its limit. It must lie above `resumeWritesBelow` and at most 1, and it
|
|
305
|
+
* is 0.9 where you set none. On Node.js, the engine compares its heap with
|
|
306
|
+
* the smaller of this setting and 0.75, because V8 stops a process after four
|
|
307
|
+
* full collections in a row that each leave the old generation holding at
|
|
308
|
+
* least 0.8 of its limit.
|
|
309
|
+
*/
|
|
310
|
+
blockWritesAbove?: number;
|
|
311
|
+
/**
|
|
312
|
+
* A full engine accepts writes again once both memory figures fall below
|
|
313
|
+
* this fraction of their limits. It must lie above 0 and below
|
|
314
|
+
* `blockWritesAbove`, and it is 0.8 where you set none. On Node.js, the
|
|
315
|
+
* engine compares its heap with the smaller of this setting and 0.65, for the
|
|
316
|
+
* same reason that it caps the heap side of `blockWritesAbove` at 0.75.
|
|
317
|
+
*/
|
|
318
|
+
resumeWritesBelow?: number;
|
|
248
319
|
}
|
|
249
320
|
/**
|
|
250
321
|
* Limits on the indexes one engine keeps open in memory.
|
|
@@ -336,6 +407,16 @@ interface DurabilityConfig {
|
|
|
336
407
|
* number of segments.
|
|
337
408
|
*/
|
|
338
409
|
compactionThreshold?: number;
|
|
410
|
+
/**
|
|
411
|
+
* A checkpoint rewrites at most this many bytes of existing segment files to
|
|
412
|
+
* drop the copies of removed and replaced documents, 268,435,456 by default.
|
|
413
|
+
* Beyond that budget, each partition whose removed share exceeds 0.2 still
|
|
414
|
+
* rewrites one segment, so every such partition shrinks at every checkpoint.
|
|
415
|
+
* The value is a whole number of bytes of at least 1. The snapshot tier
|
|
416
|
+
* accepts it and writes each changed partition whole, so the budget applies
|
|
417
|
+
* to the write-ahead log tier.
|
|
418
|
+
*/
|
|
419
|
+
rewriteBytesPerCheckpoint?: number;
|
|
339
420
|
}
|
|
340
421
|
/**
|
|
341
422
|
* Which queries the main copy of an index answers once the index holds worker
|
|
@@ -406,6 +487,35 @@ interface WorkerConfig {
|
|
|
406
487
|
* value raises `CONFIG_INVALID`.
|
|
407
488
|
*/
|
|
408
489
|
bootstrapModule?: string;
|
|
490
|
+
/**
|
|
491
|
+
* The engine sends a worker a probe once the worker has given no answer for
|
|
492
|
+
* this many milliseconds, 10,000 by default. A worker answers a probe as
|
|
493
|
+
* soon as its thread is free, so a worker with a long queue keeps answering
|
|
494
|
+
* and stays in the pool. It must be less than `silenceBeforeRetirementMs`.
|
|
495
|
+
*/
|
|
496
|
+
silenceBeforeProbeMs?: number;
|
|
497
|
+
/**
|
|
498
|
+
* The engine retires a worker once the worker has answered neither a
|
|
499
|
+
* request nor a probe for this many milliseconds, 90,000 by default, and
|
|
500
|
+
* starts a replacement for it. When a retired worker stays silent after the
|
|
501
|
+
* engine asks it to leave, the engine stops its thread. The engine leaves a
|
|
502
|
+
* thread that still holds HTTP connections running in the background,
|
|
503
|
+
* because stopping that thread would end the whole process, and
|
|
504
|
+
* `maxThreadsLeftRunning` limits how many such threads exist at once.
|
|
505
|
+
*/
|
|
506
|
+
silenceBeforeRetirementMs?: number;
|
|
507
|
+
/**
|
|
508
|
+
* How many retired threads, each still holding HTTP connections, can run in
|
|
509
|
+
* the background while the engine keeps starting replacements, 1 by
|
|
510
|
+
* default. Each such thread keeps its copy of every index and its sockets,
|
|
511
|
+
* so the engine holds at most this many threads beyond those of a full
|
|
512
|
+
* worker pool. Once more threads than this run in the background, the
|
|
513
|
+
* engine replaces no retired thread and starts no new pool until one of
|
|
514
|
+
* them exits, and the main thread and the remaining request threads answer
|
|
515
|
+
* every request meanwhile. Set it to 0 so that a thread left running gains
|
|
516
|
+
* a replacement only once it exits.
|
|
517
|
+
*/
|
|
518
|
+
maxThreadsLeftRunning?: number;
|
|
409
519
|
}
|
|
410
520
|
|
|
411
|
-
export type { AnalysisConfig as A, DurabilityConfig as D, IndexContext as I, MainCopyQueries as M, NarsilConfig as N, PartitionContext as P, RemoveContext as R, SearchContext as S, UpdateContext as U, WorkerConfig as W, IndexLifecycleConfig as a, InsertContext as b,
|
|
521
|
+
export type { AnalysisConfig as A, DurabilityConfig as D, IndexContext as I, MainCopyQueries as M, NarsilConfig as N, PartitionContext as P, QuerySuggestionsConfig as Q, RemoveContext as R, SearchContext as S, UpdateContext as U, WorkerConfig as W, IndexLifecycleConfig as a, InsertContext as b, MemoryConfig as c, NarsilPlugin as d, StaleAnalysis as e, WorkerContext as f };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { BUILD_CHUNK_SIZE, BUILD_RETRY_FIRST_DELAY_MS, BUILD_RETRY_MAX_DELAY_MS, BUILD_STEPS_BETWEEN_CLOCK_CHECKS, DEFAULT_FILTER_THRESHOLD, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_VECTOR_METRIC, DISK_ADOPTION_YIELD_INTERVAL, DRIFT_CHECK_GROWTH_FACTOR, ESTIMATED_MS_PER_TOMBSTONE, ESTIMATED_MS_PER_VECTOR_REBUILD, GRAPH_RETIRED, IN_MEMORY, MIN_OVERSAMPLE, NOTHING_STAGED, NO_LIVE_VECTOR_AT_POSITION, QUERY_STAGED, RECALIBRATION_CHUNK_VECTORS, RECALIBRATION_DRIFT_RATIO, SEARCH_ATTEMPTS_BEFORE_HOLDING_WRITES, SEARCH_REFILL_RESERVE, SEARCH_SCAN_CHUNK_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, STORE_BLOCK_COUNT, STORE_CALIBRATED, STORE_CALIBRATION_GENERATION, STORE_CODE_BLOCK_COUNT, STORE_CODE_COUNT, STORE_DOC_ID_BYTES, STORE_LIVE_COUNT, STORE_ORDINAL_LAYOUT_GENERATION, STORE_RELEASED_VECTORS_TO_DISK, STORE_REMOVED_COUNT, STORE_SLOTS, STORE_UNPLACED_COUNT, STORE_WRITE_SEQUENCE_INT64, VECTOR_FILE_MAX_VECTORS, VECTOR_FILE_PAYLOAD_VERSION, VECTOR_MEMORY_LIMITS, VECTOR_WORKER_COPIES_ALLOWED, WORKER_COPY_MIN_VECTORS, addToOrdinalFilter, admissionAt, adoptBackgroundScheduler, adoptGraph, adoptLoadedCalibration, allLiveDocIds, arenaFloat32Distance, assembleGraphParts, assignStorePartitions, bindVectorCoreHost, blocksGrowthBytes, bytesToVectors, centroidOfCentroidSums, computeCodeBlockLayout, cosineSimilarityWithMagnitudes, countDead, countOfCentroidSums, coverOrdinal, createCentroidSums, createFixedBuffer, createHNSWIndex, createOrdinalFilter, createOsqQuantizer, createOsqScratch, createSharedVectorStoreHandles, createVectorBlock, createVectorFileReader, deadBytesFor, decodeVectorFilePayload, decodeVectorGraphPartPayload, decodeVectorGraphPayload, decodeVectorIndexParts, defaultEfSearch, defaultQuantizationFor, deserialize, detachNativeStore, dotProduct, emptyFieldBeforeRestore, ensureBlockSlots, euclideanDistance, fieldHandlesOf, filterForOptions, fixedView, graphNeedsRebuild, graphPartsOfEarlierPayload, growBufferTo, grownByteLength, handOverBuildTurns, holdAdmission, insertNode, isDead, liveOrdinals, liveSize, magnitude, mayFree, meanOfCentroidSums, nativeMetricCode, nativeScoresOf, nativeStoreFor, nativeStoreScratchBytes, nextSequence, noBuildHistory, nodeCountOf, oldestHeldPin, openGraphState, openSharedQuantizer, openVectorBlock, ordinalFilterForSubsets, ordinalFilterHas, ordinalFilterValues, osqBitsOf, osqDistance, osqEstimate, osqQuantize, osqRecordBytes, planCheckpoint, publishSequence, readTrailer, recalibrateFromStore, recordCheckpoint, releaseLocksHeldBy, releasePinsHeldBy, releaseReplacedVectors, requireBoundedUpperLists, requireBytesWithinLimit, requireUsableVectorOptions, requireWholeNeighbourLists, rescoreDepth, resetStoreHeader, retiredAtOf, scalarQueryProducts, searchOrdinals, sequenceWritesOf, sharedMemoryAvailable, sharedVectorStoreBytes, shuffleInPlace, shuffleStep, signatureOf, simdModuleLoaded, slotByteOffset, squaredLengthsOfCentroidSums, stageQueryLevels, stampBorn, stampRetired, storePinsOf, threadedNativeCore, threadsHoldCurrentLayout, toDistance, toScore, tombstoneCountOf, topLayerInParts, unplacedChunkCount, vectorsPerFile, vectorsToBytes, withNativeThreadSlot, withTransientAdmission, writeSequenceOf, writeSequenceWords, yieldBuildTurn } from './chunk-R724DJSG.mjs';
|
|
2
|
+
export { GRAPH_LOCK_WAIT_DEADLINE_MS, GRAPH_LOCK_WAIT_SLICE_MS, LOCK_SPIN_ITERATIONS, LOCK_WAIT_SLICE_MS, MAX_DOC_ID_TABLE_BYTES, MAX_VECTOR_ORDINALS, MAX_WASM_PAGES, NATIVE_ATTACH_RETRY_MS, NATIVE_THREAD_SEARCH_SLOTS, REFUSAL_COLLECTION_MIN_INTERVAL_MS, REFUSAL_COLLECTION_TIME_MULTIPLE, REFUSAL_YOUNG_COLLECTION_MIN_INTERVAL_MS, UI_THREAD_BACKGROUND_SLICE_DURING_WRITES_MS, UI_THREAD_HOP_BEFORE_TURN_WITHIN_MS, UI_THREAD_TURN_BUDGET_MS, UNPLACED_FLAG_CHUNK_ORDINALS, VECTOR_BLOCK_INITIAL_SLOTS, VECTOR_BLOCK_MAX_BYTES, VECTOR_SCRATCH_SLOTS, VECTOR_STORE_INITIAL_CAPACITY, WASM_PAGE_BYTES, backgroundTurnIsSpent, collectAndReturnPages, collectYoungGeneration, holdWritesAndBackgroundWork, threadSlotGone, turnsAreBudgeted, yieldBackgroundTurn } from './chunk-5EI5CXO6.mjs';
|
|
3
|
+
export { MAX_DOC_ID_LENGTH } from './chunk-3ECIRFS5.mjs';
|
|
4
|
+
export { NATIVE_OK, loadNativeCore, nativeSearchCoreIsEnabled, noteFallback } from './chunk-ASZLNVWW.mjs';
|
|
5
|
+
export { COMPACTION_ABSOLUTE_THRESHOLD, COMPACTION_TOMBSTONE_RATIO, CONNECT_RESTARTS_BEFORE_ONE_PASS, CONNECT_STEPS_BETWEEN_CLOCK_CHECKS, DEFAULT_EF_SEARCH, EARLIER_RELEASE_MIN_M, FARTHEST_REJECTED_LINKS_KEPT, INITIAL_LIST_CAPACITY, INITIAL_UPPER_SLOTS, MAX_LAYER_CAP, MAX_M, MIN_M, NEAREST_LINK_FALLBACK_HOSTS, PLACEMENT_ROOM_REQUESTS } from './chunk-ZXX5GZEX.mjs';
|
|
6
|
+
export { MAX_FILE_BYTES } from './chunk-4PY4JYMY.mjs';
|
|
7
|
+
export { ErrorCodes, NarsilError } from './chunk-ZKOQR7EA.mjs';
|
|
8
|
+
export { compareCodePoints } from './chunk-TGPKS2UM.mjs';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// src/analysis/constants.ts
|
|
2
|
+
var MAX_TOKEN_POSITION = 4294967295;
|
|
3
|
+
|
|
4
|
+
// src/analysis/custom-token-host.ts
|
|
5
|
+
var ErrorCodes;
|
|
6
|
+
var NarsilError;
|
|
7
|
+
var withUnpairedSurrogatesReplaced;
|
|
8
|
+
function bindCustomTokenHost(host) {
|
|
9
|
+
({ ErrorCodes, NarsilError, withUnpairedSurrogatesReplaced } = host);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/analysis/custom-token-results.ts
|
|
13
|
+
function refuseTokenizerResult(source, message, details) {
|
|
14
|
+
const code = source === "document" ? ErrorCodes.DOC_VALIDATION_FAILED : ErrorCodes.CONFIG_INVALID;
|
|
15
|
+
throw new NarsilError(code, `The custom tokenizer ${message}`, details);
|
|
16
|
+
}
|
|
17
|
+
function kindOf(value) {
|
|
18
|
+
if (value === null) return "null";
|
|
19
|
+
return Array.isArray(value) ? "array" : typeof value;
|
|
20
|
+
}
|
|
21
|
+
function checkedTokenizerEntry(entry, at, source) {
|
|
22
|
+
const { token, position } = entry !== null && typeof entry === "object" ? entry : {};
|
|
23
|
+
if (typeof token !== "string") {
|
|
24
|
+
refuseTokenizerResult(
|
|
25
|
+
source,
|
|
26
|
+
`returned a token of type ${kindOf(token)} at entry ${at}, where a token is a string`,
|
|
27
|
+
{ entry: at, tokenType: kindOf(token) }
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
if (typeof position !== "number" || !Number.isInteger(position) || position < 0 || position > MAX_TOKEN_POSITION) {
|
|
31
|
+
const shown = typeof position === "number" ? String(position) : kindOf(position);
|
|
32
|
+
refuseTokenizerResult(
|
|
33
|
+
source,
|
|
34
|
+
`returned the position ${shown} at entry ${at}, where a position is a whole number from 0 to ${MAX_TOKEN_POSITION}`,
|
|
35
|
+
{ entry: at, position: shown }
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return { token: withUnpairedSurrogatesReplaced(token), position };
|
|
39
|
+
}
|
|
40
|
+
function holdsPositionsOutOfOrder(entries) {
|
|
41
|
+
for (let index = 1; index < entries.length; index++) {
|
|
42
|
+
if (entries[index].position < entries[index - 1].position) return true;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
function customTokensOf(tokenizer, text, source) {
|
|
47
|
+
const entries = tokenizer.tokenize(text);
|
|
48
|
+
if (!Array.isArray(entries)) {
|
|
49
|
+
refuseTokenizerResult(source, `returned ${kindOf(entries)}, where it returns a list of tokens`, {
|
|
50
|
+
received: kindOf(entries)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const checked = new Array(entries.length);
|
|
54
|
+
for (let at = 0; at < checked.length; at++) checked[at] = checkedTokenizerEntry(entries[at], at, source);
|
|
55
|
+
if (!holdsPositionsOutOfOrder(checked)) return checked;
|
|
56
|
+
return checked.sort((first, second) => first.position - second.position);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { bindCustomTokenHost, customTokensOf };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SHA256_BLOCK_BYTES, SHA256_INITIAL_STATE, compressSha256Block, paddedSha256Message, sha256, sha256Digest } from './chunk-LNGE7SLY.mjs';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { createDirectExecutor } from './chunk-BY6NALRK.mjs';
|
|
2
|
+
import './chunk-2CKDCC65.mjs';
|
|
3
|
+
import './chunk-2AFZE7Y3.mjs';
|
|
4
|
+
import './chunk-GXCDWLQI.mjs';
|
|
5
|
+
import './chunk-BUMREPLU.mjs';
|
|
6
|
+
import './chunk-7T4LAYT4.mjs';
|
|
7
|
+
import './chunk-IL5DRCNU.mjs';
|
|
8
|
+
import './chunk-7P5YWDRQ.mjs';
|
|
9
|
+
import './chunk-U2BKYEC7.mjs';
|
|
10
|
+
import './chunk-FJXJZUWF.mjs';
|
|
11
|
+
import './chunk-5EI5CXO6.mjs';
|
|
12
|
+
import './chunk-3ECIRFS5.mjs';
|
|
13
|
+
import './chunk-ASZLNVWW.mjs';
|
|
14
|
+
import './chunk-ZXX5GZEX.mjs';
|
|
15
|
+
import './chunk-4PY4JYMY.mjs';
|
|
16
|
+
import './chunk-ZKOQR7EA.mjs';
|
|
17
|
+
import './chunk-TGPKS2UM.mjs';
|
|
@@ -1,8 +1,33 @@
|
|
|
1
|
-
import { C as ClusterCoordinator } from '../../index-
|
|
2
|
-
import '../../schema-
|
|
3
|
-
import '../../adapters-
|
|
1
|
+
import { C as ClusterCoordinator } from '../../index-B_vmxpgW.js';
|
|
2
|
+
import '../../schema-CzG9OUw5.js';
|
|
3
|
+
import '../../adapters-pljAqmrC.js';
|
|
4
4
|
import '../../synonyms-CpOAHPa-.js';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The certificates that {@link createEtcdCoordinator} uses to reach etcd over
|
|
8
|
+
* TLS.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
interface EtcdTlsConfig {
|
|
13
|
+
/** The coordinator trusts an etcd member only where its certificate chains to this authority, in PEM form. */
|
|
14
|
+
ca: Buffer | string;
|
|
15
|
+
/** The coordinator presents this client certificate, in PEM form, to an etcd that asks for one. Set it together with `key`. */
|
|
16
|
+
cert?: Buffer | string;
|
|
17
|
+
/** The private key that matches `cert`, in PEM form. */
|
|
18
|
+
key?: Buffer | string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The etcd user that {@link createEtcdCoordinator} signs in as.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
interface EtcdAuthConfig {
|
|
26
|
+
/** The coordinator signs in under this etcd user name. */
|
|
27
|
+
username: string;
|
|
28
|
+
/** The password of that etcd user. */
|
|
29
|
+
password: string;
|
|
30
|
+
}
|
|
6
31
|
/**
|
|
7
32
|
* Configures where {@link createEtcdCoordinator} connects, how long etcd keeps
|
|
8
33
|
* a node's registration, and how large a request the coordinator sends.
|
|
@@ -27,6 +52,26 @@ interface EtcdCoordinatorConfig {
|
|
|
27
52
|
* to that member for five seconds.
|
|
28
53
|
*/
|
|
29
54
|
maxRequestBytes: number;
|
|
55
|
+
/**
|
|
56
|
+
* Setting this makes the coordinator reach etcd over TLS, so every endpoint
|
|
57
|
+
* has to start with `https://`.
|
|
58
|
+
*/
|
|
59
|
+
tls?: EtcdTlsConfig;
|
|
60
|
+
/**
|
|
61
|
+
* Setting this makes the coordinator sign in to etcd as this user. The
|
|
62
|
+
* coordinator sends the password over TLS, or over plain HTTP to a loopback
|
|
63
|
+
* address alone, so that the password never crosses a network in clear text.
|
|
64
|
+
*/
|
|
65
|
+
auth?: EtcdAuthConfig;
|
|
66
|
+
/**
|
|
67
|
+
* The coordinator calls this with every error that a watch handler throws,
|
|
68
|
+
* including one raised by a value under a watched prefix that the
|
|
69
|
+
* coordinator cannot read. The coordinator then skips that change, reopens
|
|
70
|
+
* the watch, and lists the prefix again, so that the error never ends the
|
|
71
|
+
* process and every later change still arrives. The coordinator drops
|
|
72
|
+
* these errors when you leave this out.
|
|
73
|
+
*/
|
|
74
|
+
onWatchError?: (error: Error) => void;
|
|
30
75
|
}
|
|
31
76
|
|
|
32
77
|
/**
|
|
@@ -55,15 +100,26 @@ declare function validateNodeId(nodeId: string): void;
|
|
|
55
100
|
* package, because it is an optional peer dependency that this call loads on
|
|
56
101
|
* demand.
|
|
57
102
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
103
|
+
* The call reads from etcd once before it returns, so that a wrong
|
|
104
|
+
* certificate, a wrong password, or an etcd that nobody can reach fails the
|
|
105
|
+
* call itself.
|
|
106
|
+
*
|
|
107
|
+
* @param config - The endpoints, key prefix, heartbeat lifetime, request
|
|
108
|
+
* size, TLS certificates, and etcd user to override. Every setting that you
|
|
109
|
+
* leave out keeps its default.
|
|
60
110
|
* @returns A coordinator that you pass as a cluster node's `coordinator`.
|
|
61
111
|
* @throws A `NarsilError` with `COORDINATOR_DEPENDENCY_MISSING` when `etcd3`
|
|
62
112
|
* is not installed, or with `CONFIG_INVALID` when `maxRequestBytes` is not a
|
|
63
|
-
* whole number from 1,025 to 2,147,483,647
|
|
113
|
+
* whole number from 1,025 to 2,147,483,647, when `tls` sets one of `cert`
|
|
114
|
+
* and `key` without the other or comes with an endpoint outside `https://`,
|
|
115
|
+
* or when `auth` would send its password over plain HTTP to an address other
|
|
116
|
+
* than a loopback one. It throws with `COORDINATOR_AUTH_FAILED` when etcd
|
|
117
|
+
* refuses the user or the password, and with `COORDINATOR_UNAVAILABLE` when
|
|
118
|
+
* no endpoint answers within 10 seconds or every endpoint fails the TLS
|
|
119
|
+
* handshake.
|
|
64
120
|
*
|
|
65
121
|
* @public
|
|
66
122
|
*/
|
|
67
123
|
declare function createEtcdCoordinator(config?: Partial<EtcdCoordinatorConfig>): Promise<ClusterCoordinator>;
|
|
68
124
|
|
|
69
|
-
export { type EtcdCoordinatorConfig, createEtcdCoordinator, validateNodeId };
|
|
125
|
+
export { type EtcdAuthConfig, type EtcdCoordinatorConfig, type EtcdTlsConfig, createEtcdCoordinator, validateNodeId };
|