@delali/narsil 0.3.1-next.162 → 0.3.1-next.169

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.
Files changed (157) hide show
  1. package/README.md +24 -8
  2. package/dist/browser/{chunk-MZHQ65VI.mjs → chunk-2Q45HI5H.mjs} +14 -10
  3. package/dist/browser/{chunk-MMHIIL5B.mjs → chunk-4ZICWS4V.mjs} +1 -1
  4. package/dist/browser/{chunk-KQXKCMGQ.mjs → chunk-JHFBQKUF.mjs} +119 -90
  5. package/dist/browser/{core-leaf-SIWXFZLV.mjs → core-leaf-WYFANMKC.mjs} +61 -13
  6. package/dist/browser/custom-token-results-R5BIX7SL.mjs +59 -0
  7. package/dist/browser/{embed-RF2MPGAO.mjs → embed-24IPR4LP.mjs} +2 -2
  8. package/dist/browser/{module-PMQBRESM.mjs → module-XVLHJ7T7.mjs} +358 -62
  9. package/dist/browser/{optional-writes-WMZX4OEC.mjs → optional-writes-TB34FYUW.mjs} +118 -66
  10. package/dist/browser/{phrase-module-22TKMXWI.mjs → phrase-module-6UGFVW5J.mjs} +1 -0
  11. package/dist/browser/{resolve-vector-text-KI65IHMD.mjs → resolve-vector-text-EJ6DHFF5.mjs} +8 -0
  12. package/dist/browser/{storage-leaf-VGR2BWJJ.mjs → storage-leaf-QFXIWDFK.mjs} +208 -87
  13. package/dist/browser/{worker-copies-WQCPP3TS.mjs → worker-copies-ICHLYYXM.mjs} +1 -0
  14. package/dist/{capabilities-DkXAkb-X.d.ts → capabilities-BQIdsaWy.d.ts} +2 -2
  15. package/dist/{chunk-BKOMO7HT.mjs → chunk-26E5MO3Y.mjs} +5 -5
  16. package/dist/{chunk-EEYDJB4Z.mjs → chunk-2C3BXZGA.mjs} +213 -149
  17. package/dist/{chunk-NXMGUDZA.mjs → chunk-2KWTQ2P7.mjs} +2 -2
  18. package/dist/{chunk-TW543F33.mjs → chunk-34IOOYXA.mjs} +1 -1
  19. package/dist/{chunk-D5GNFN6X.mjs → chunk-7FC2ZILY.mjs} +98 -40
  20. package/dist/{chunk-XRBPHCCT.mjs → chunk-A4XYDUVN.mjs} +5 -5
  21. package/dist/{chunk-R4F7ZTVG.mjs → chunk-BIIROQ5Q.mjs} +2 -2
  22. package/dist/{chunk-Q2WQSAYH.mjs → chunk-CQX5B6L2.mjs} +54 -11
  23. package/dist/{chunk-XXWEUXE4.mjs → chunk-D6FYUTFN.mjs} +1 -1
  24. package/dist/{chunk-OUWZKNO3.mjs → chunk-DG6WIEB3.mjs} +1 -1
  25. package/dist/{chunk-GJKFXKMI.mjs → chunk-F3FDHXCJ.mjs} +12 -9
  26. package/dist/{chunk-3UGZBRDN.mjs → chunk-GO6TRSJ6.mjs} +1 -1
  27. package/dist/{react-native/chunks/chunk-OK3WUA6N.mjs → chunk-I2WJCRIH.mjs} +1 -1
  28. package/dist/{chunk-Q7CUUSJ2.mjs → chunk-ISJ35523.mjs} +2 -2
  29. package/dist/{chunk-GQLOEACG.mjs → chunk-JCWC75NH.mjs} +2 -2
  30. package/dist/{chunk-ZGYF37MG.mjs → chunk-JDIATDPY.mjs} +1 -1
  31. package/dist/{chunk-3B775F3C.mjs → chunk-JP77OWMI.mjs} +3 -1
  32. package/dist/{chunk-KSOZJEYU.mjs → chunk-KHJPMZE2.mjs} +1 -1
  33. package/dist/{chunk-ZQ6QY42L.mjs → chunk-KL6W73BZ.mjs} +8 -0
  34. package/dist/{chunk-ES5EOXT6.mjs → chunk-LOQHA6QK.mjs} +3 -3
  35. package/dist/{chunk-AB27FWZM.mjs → chunk-LPRRFCVU.mjs} +2 -2
  36. package/dist/{chunk-EIR3IQCL.mjs → chunk-QFJMRB7D.mjs} +2 -1
  37. package/dist/{chunk-S3BSDBF7.mjs → chunk-QJGDB3WR.mjs} +1 -1
  38. package/dist/{chunk-EI7U43MX.mjs → chunk-R7PLSVK3.mjs} +2 -2
  39. package/dist/{chunk-5DUTOEK5.mjs → chunk-TBOZHYCF.mjs} +2 -2
  40. package/dist/{chunk-VJOS6MHF.mjs → chunk-TNEU32EN.mjs} +64 -16
  41. package/dist/{chunk-RXMR2SIQ.mjs → chunk-UISV46WX.mjs} +4 -4
  42. package/dist/{chunk-4CAMH7FO.mjs → chunk-X4UMDSB4.mjs} +2 -1
  43. package/dist/{chunk-R4CE4IVU.mjs → chunk-X5NHWOXT.mjs} +15 -11
  44. package/dist/{react-native/chunks/chunk-HEELWLKL.mjs → chunk-XFOL77WH.mjs} +1 -1
  45. package/dist/{chunk-TOZENMM7.mjs → chunk-XITVDRRH.mjs} +5 -5
  46. package/dist/{chunk-FSLQHOKZ.mjs → chunk-XNFBYAXI.mjs} +1 -1
  47. package/dist/{chunk-V4YIEMAI.mjs → chunk-XQQKETAF.mjs} +4 -4
  48. package/dist/{chunk-DSXFN5BF.mjs → chunk-XTSFRWAS.mjs} +8 -8
  49. package/dist/{chunk-K4BMDPPX.mjs → chunk-Y27E2MGC.mjs} +2 -2
  50. package/dist/{chunk-JV74RKCY.mjs → chunk-YM2HI5N5.mjs} +1 -1
  51. package/dist/{chunk-7OE73OO4.mjs → chunk-YPV2L7M5.mjs} +56 -6
  52. package/dist/{chunk-STLNPJXU.mjs → chunk-YXZDTKQS.mjs} +2 -2
  53. package/dist/{chunk-5P72V66D.mjs → chunk-ZB5X5WAK.mjs} +24 -20
  54. package/dist/{client-VJmV_AjZ.d.ts → client-CeUxvIvd.d.ts} +4 -4
  55. package/dist/client.d.ts +8 -8
  56. package/dist/{config-ZZg4cwQz.d.ts → config-CIpLXXxm.d.ts} +2 -2
  57. package/dist/{config-Cb3FOlE_.d.ts → config-DehU-VGL.d.ts} +2 -2
  58. package/dist/{core-leaf-LOXCD7MY.mjs → core-leaf-VIMO377O.mjs} +3 -3
  59. package/dist/custom-token-results-NXHBVY7U.mjs +59 -0
  60. package/dist/{direct-executor-PF4UDSUW.mjs → direct-executor-2WQSGBN3.mjs} +7 -7
  61. package/dist/distribution/coordinator/etcd.d.ts +2 -2
  62. package/dist/distribution/coordinator/etcd.mjs +1 -1
  63. package/dist/distribution/coordinator/in-memory.d.ts +2 -2
  64. package/dist/distribution/transport/grpc.mjs +1 -1
  65. package/dist/distribution/transport/tcp.mjs +1 -1
  66. package/dist/distribution.d.ts +7 -7
  67. package/dist/distribution.mjs +39 -39
  68. package/dist/{embed-4H7RTBVL.mjs → embed-UNHDFGDU.mjs} +2 -2
  69. package/dist/{engine-DdOs682x.d.ts → engine-P-4xhUe4.d.ts} +6 -2
  70. package/dist/{index-Ck9w5WHz.d.ts → index-CBUl4z3E.d.ts} +1 -1
  71. package/dist/index.browser.mjs +3 -3
  72. package/dist/index.d.ts +6 -6
  73. package/dist/index.mjs +7 -7
  74. package/dist/index.react-native.mjs +6 -6
  75. package/dist/{long-query-thread-OTVLP2OI.mjs → long-query-thread-AAYTLYZK.mjs} +19 -19
  76. package/dist/{module-UIKSHY3G.mjs → module-5SXNUCD5.mjs} +315 -64
  77. package/dist/{msgpack-leaf-5WFRP6JM.mjs → msgpack-leaf-7KBYOVTF.mjs} +2 -2
  78. package/dist/{optional-reads-RSLNSGNG.mjs → optional-reads-ENKMVQ4Q.mjs} +1 -1
  79. package/dist/{optional-writes-4ITCV7YT.mjs → optional-writes-N2DFWWZ3.mjs} +39 -26
  80. package/dist/{paged-partition-archive-VMJ2AUA6.mjs → paged-partition-archive-X7L27E5Z.mjs} +19 -19
  81. package/dist/partial-words.browser.mjs +3 -3
  82. package/dist/partial-words.mjs +7 -7
  83. package/dist/pattern.browser.mjs +2 -2
  84. package/dist/pattern.mjs +2 -2
  85. package/dist/persistence/durability/checkpoint-worker.d.ts +1 -1
  86. package/dist/persistence/durability/checkpoint-worker.mjs +17 -17
  87. package/dist/{phrase-module-IWSG2DDZ.mjs → phrase-module-ZY3TLTQA.mjs} +2 -1
  88. package/dist/{query-actions-EW72OQXY.mjs → query-actions-2JOLPELC.mjs} +7 -7
  89. package/dist/query-suggestions/merge-worker.mjs +10 -10
  90. package/dist/query-suggestions.browser.mjs +3 -3
  91. package/dist/query-suggestions.d.ts +2 -2
  92. package/dist/query-suggestions.mjs +8 -8
  93. package/dist/{chunk-ZBVHS5KF.mjs → react-native/chunks/chunk-57R74JWC.mjs} +1 -1
  94. package/dist/react-native/chunks/{chunk-AUXXPSFB.mjs → chunk-F4MIGBBP.mjs} +214 -150
  95. package/dist/react-native/chunks/{chunk-3RUXKZJG.mjs → chunk-F6BJYCF2.mjs} +2 -2
  96. package/dist/react-native/chunks/{chunk-RVHCQJQM.mjs → chunk-GGBATERA.mjs} +3 -3
  97. package/dist/react-native/chunks/{chunk-I5W7A2JF.mjs → chunk-GVWLACAT.mjs} +2 -2
  98. package/dist/react-native/chunks/{chunk-XOCM3BFU.mjs → chunk-H344ZXRH.mjs} +2 -2
  99. package/dist/react-native/chunks/{chunk-VIPNDN4B.mjs → chunk-I7DTUOK2.mjs} +65 -15
  100. package/dist/react-native/chunks/{chunk-2JMAUU26.mjs → chunk-J2BQTJJE.mjs} +1 -1
  101. package/dist/{chunk-QBVTYY4J.mjs → react-native/chunks/chunk-OZ3XEM6D.mjs} +1 -1
  102. package/dist/react-native/chunks/{chunk-4EXKQ2IB.mjs → chunk-SK3DPAI4.mjs} +1 -1
  103. package/dist/react-native/chunks/{chunk-XBTFK3AZ.mjs → chunk-WFQ6YQZA.mjs} +1 -1
  104. package/dist/react-native/chunks/{chunk-FTQ7JNMU.mjs → chunk-ZDDJVR7X.mjs} +15 -11
  105. package/dist/react-native/chunks/{core-leaf-O3236QY3.mjs → core-leaf-UDUMVC3M.mjs} +2 -2
  106. package/dist/react-native/chunks/custom-token-results-3OZEMRE7.mjs +59 -0
  107. package/dist/react-native/chunks/{embed-3WQ2CCR5.mjs → embed-U7CIKEY4.mjs} +2 -2
  108. package/dist/react-native/chunks/{module-LRR7D5ZO.mjs → module-7BJ3VOWQ.mjs} +360 -66
  109. package/dist/react-native/chunks/{msgpack-leaf-TR66ZVAX.mjs → msgpack-leaf-GTKLF6GJ.mjs} +2 -2
  110. package/dist/react-native/chunks/{optional-reads-TOWGNEDH.mjs → optional-reads-74HYI4DO.mjs} +1 -1
  111. package/dist/react-native/chunks/{optional-writes-7AFBIZMN.mjs → optional-writes-TXTJ6HUZ.mjs} +37 -24
  112. package/dist/react-native/chunks/{phrase-module-3A4AKMKL.mjs → phrase-module-UC4YGEBB.mjs} +2 -1
  113. package/dist/react-native/chunks/{resolve-vector-text-LXRYXF7M.mjs → resolve-vector-text-FTPD5EY6.mjs} +8 -0
  114. package/dist/react-native/chunks/{restore-queue-7FSHTGJ5.mjs → restore-queue-SZLWIL3B.mjs} +9 -9
  115. package/dist/react-native/chunks/{segment-codec-leaf-4QV4HO4R.mjs → segment-codec-leaf-WMUZ5P4F.mjs} +7 -7
  116. package/dist/react-native/chunks/{segment-merge-leaf-5DUZZSXJ.mjs → segment-merge-leaf-Q2OEJIQ3.mjs} +8 -8
  117. package/dist/react-native/chunks/{storage-leaf-PNU6HWY7.mjs → storage-leaf-OXYV6O6P.mjs} +213 -100
  118. package/dist/react-native/chunks/{store-leaf-ESVUGYYO.mjs → store-leaf-ZMDXYK4E.mjs} +8 -8
  119. package/dist/react-native/chunks/{suggestions-leaf-MOVOPBGD.mjs → suggestions-leaf-FIMGQZ2T.mjs} +8 -8
  120. package/dist/react-native/chunks/{worker-copies-VQGF3WZX.mjs → worker-copies-72TGFYQB.mjs} +8 -7
  121. package/dist/react-native/partial-words.mjs +6 -6
  122. package/dist/react-native/pattern.mjs +3 -3
  123. package/dist/react-native/query-suggestions.mjs +6 -6
  124. package/dist/react-native/sync.mjs +6 -6
  125. package/dist/react-native/synonyms.mjs +6 -6
  126. package/dist/react.d.ts +9 -9
  127. package/dist/{rerank-QHJXPSAK.mjs → rerank-E2HFKKGJ.mjs} +7 -7
  128. package/dist/{resolve-vector-text-4PDRTPNQ.mjs → resolve-vector-text-6WPFFIX5.mjs} +1 -1
  129. package/dist/{restore-queue-5W5HX44H.mjs → restore-queue-PUVBN6L3.mjs} +10 -10
  130. package/dist/{schema-C_7yRJLt.d.ts → schema-CzG9OUw5.d.ts} +5 -1
  131. package/dist/{segment-codec-leaf-7VLVXKWO.mjs → segment-codec-leaf-24Z3MMQI.mjs} +8 -8
  132. package/dist/{segment-merge-leaf-22XR3IGA.mjs → segment-merge-leaf-FQQDU45E.mjs} +8 -8
  133. package/dist/server.d.ts +10 -10
  134. package/dist/server.mjs +26 -26
  135. package/dist/{storage-leaf-ZZ77C3DX.mjs → storage-leaf-KIA7XO6Y.mjs} +79 -81
  136. package/dist/{store-leaf-LJ6D2PMF.mjs → store-leaf-ESVLL4JO.mjs} +9 -9
  137. package/dist/{suggestions-leaf-KTQHO3PY.mjs → suggestions-leaf-FXF4AHAY.mjs} +11 -11
  138. package/dist/sync/filesystem.d.ts +3 -3
  139. package/dist/sync/filesystem.mjs +15 -15
  140. package/dist/sync/indexeddb.browser.mjs +1 -1
  141. package/dist/sync/indexeddb.d.ts +3 -3
  142. package/dist/sync/indexeddb.mjs +2 -2
  143. package/dist/sync.browser.mjs +3 -3
  144. package/dist/sync.d.ts +4 -4
  145. package/dist/sync.mjs +7 -7
  146. package/dist/synonyms.browser.mjs +3 -3
  147. package/dist/synonyms.mjs +7 -7
  148. package/dist/{tasks-CxA-J_Ty.d.ts → tasks-CXtQ3Zpp.d.ts} +4 -4
  149. package/dist/thread-OWXVP2ZA.mjs +30 -0
  150. package/dist/{types-BboB278g.d.ts → types-CDN70Y_C.d.ts} +2 -2
  151. package/dist/vector/search-worker.d.ts +1 -1
  152. package/dist/vector/search-worker.mjs +5 -5
  153. package/dist/{worker-copies-ODAAGQRC.mjs → worker-copies-XXX7PF4J.mjs} +10 -10
  154. package/dist/workers/entry.mjs +13 -13
  155. package/package.json +9 -8
  156. package/dist/thread-XWDK6TAR.mjs +0 -30
  157. /package/dist/{chunk-77AUVDQ5.mjs → chunk-CV3Q2EKO.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
2
- import { Q as QueryParams, j as QueryResult, k as NarsilEventHandlers } from './engine-DdOs682x.js';
3
- import { I as IndexConfig, A as AnyDocument } from './schema-C_7yRJLt.js';
2
+ import { Q as QueryParams, j as QueryResult, k as NarsilEventHandlers } from './engine-P-4xhUe4.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
@@ -1,6 +1,6 @@
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, 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-VJOS6MHF.mjs';
2
- export { GRAPH_LOCK_WAIT_DEADLINE_MS, GRAPH_LOCK_WAIT_SLICE_MS, LOCK_SPIN_ITERATIONS, LOCK_WAIT_SLICE_MS, MAX_DOC_ID_LENGTH, 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-3B775F3C.mjs';
3
- export { NATIVE_OK, loadNativeCore, nativeSearchCoreIsEnabled, noteFallback } from './chunk-XXWEUXE4.mjs';
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-TNEU32EN.mjs';
2
+ export { GRAPH_LOCK_WAIT_DEADLINE_MS, GRAPH_LOCK_WAIT_SLICE_MS, LOCK_SPIN_ITERATIONS, LOCK_WAIT_SLICE_MS, MAX_DOC_ID_LENGTH, 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-JP77OWMI.mjs';
3
+ export { NATIVE_OK, loadNativeCore, nativeSearchCoreIsEnabled, noteFallback } from './chunk-D6FYUTFN.mjs';
4
4
  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';
5
5
  export { MAX_FILE_BYTES } from './chunk-4PY4JYMY.mjs';
6
6
  export { ErrorCodes, NarsilError } from './chunk-Q3ZZH5Z7.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 };
@@ -1,15 +1,15 @@
1
- export { createDirectExecutor } from './chunk-EEYDJB4Z.mjs';
1
+ export { createDirectExecutor } from './chunk-2C3BXZGA.mjs';
2
2
  import './chunk-KLVMK3R5.mjs';
3
- import './chunk-AB27FWZM.mjs';
3
+ import './chunk-LPRRFCVU.mjs';
4
4
  import './chunk-GXCDWLQI.mjs';
5
5
  import './chunk-BUMREPLU.mjs';
6
6
  import './chunk-7T4LAYT4.mjs';
7
- import './chunk-JV74RKCY.mjs';
8
- import './chunk-R4CE4IVU.mjs';
7
+ import './chunk-YM2HI5N5.mjs';
8
+ import './chunk-X5NHWOXT.mjs';
9
9
  import './chunk-U2BKYEC7.mjs';
10
- import './chunk-OUWZKNO3.mjs';
11
- import './chunk-3B775F3C.mjs';
12
- import './chunk-XXWEUXE4.mjs';
10
+ import './chunk-DG6WIEB3.mjs';
11
+ import './chunk-JP77OWMI.mjs';
12
+ import './chunk-D6FYUTFN.mjs';
13
13
  import './chunk-ZXX5GZEX.mjs';
14
14
  import './chunk-4PY4JYMY.mjs';
15
15
  import './chunk-Q3ZZH5Z7.mjs';
@@ -1,5 +1,5 @@
1
- import { C as ClusterCoordinator } from '../../index-Ck9w5WHz.js';
2
- import '../../schema-C_7yRJLt.js';
1
+ import { C as ClusterCoordinator } from '../../index-CBUl4z3E.js';
2
+ import '../../schema-CzG9OUw5.js';
3
3
  import '../../adapters-pljAqmrC.js';
4
4
  import '../../synonyms-CpOAHPa-.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { INDEX_METADATA_KEY_PREFIX, indexNameOfMetadataSuffix } from '../../chunk-Q2AP2FSN.mjs';
2
2
  import { MAX_NODE_ID_LENGTH, CONTROLLER_LEASE_KEY, MAX_WATCHERS } from '../../chunk-44W3CBNG.mjs';
3
3
  import { decode } from '../../chunk-GXCDWLQI.mjs';
4
- import '../../chunk-R4CE4IVU.mjs';
4
+ import '../../chunk-X5NHWOXT.mjs';
5
5
  import '../../chunk-ZXX5GZEX.mjs';
6
6
  import '../../chunk-4PY4JYMY.mjs';
7
7
  import { NarsilError, ErrorCodes, describeError } from '../../chunk-Q3ZZH5Z7.mjs';
@@ -1,5 +1,5 @@
1
- import { C as ClusterCoordinator } from '../../index-Ck9w5WHz.js';
2
- import '../../schema-C_7yRJLt.js';
1
+ import { C as ClusterCoordinator } from '../../index-CBUl4z3E.js';
2
+ import '../../schema-CzG9OUw5.js';
3
3
  import '../../adapters-pljAqmrC.js';
4
4
  import '../../synonyms-CpOAHPa-.js';
5
5
 
@@ -3,7 +3,7 @@ import { timeoutsOf, replyDeadlineMs } from '../../chunk-OIJ64LGT.mjs';
3
3
  import { MAX_MESSAGE_SIZE_BYTES, GRPC_KEEPALIVE_TIMEOUT_MS, GRPC_KEEPALIVE_TIME_MS, GRPC_ENVELOPE_OVERHEAD_BYTES } from '../../chunk-UNEEFTEU.mjs';
4
4
  import { TransportError, TransportErrorCodes } from '../../chunk-5FLRXF73.mjs';
5
5
  import '../../chunk-GXCDWLQI.mjs';
6
- import '../../chunk-R4CE4IVU.mjs';
6
+ import '../../chunk-X5NHWOXT.mjs';
7
7
  import '../../chunk-ZXX5GZEX.mjs';
8
8
  import '../../chunk-4PY4JYMY.mjs';
9
9
  import { NarsilError, ErrorCodes } from '../../chunk-Q3ZZH5Z7.mjs';
@@ -3,7 +3,7 @@ import { timeoutsOf, replyDeadlineMs } from '../../chunk-OIJ64LGT.mjs';
3
3
  import { MAX_MESSAGE_SIZE_BYTES } from '../../chunk-UNEEFTEU.mjs';
4
4
  import { TransportError, TransportErrorCodes } from '../../chunk-5FLRXF73.mjs';
5
5
  import '../../chunk-GXCDWLQI.mjs';
6
- import '../../chunk-R4CE4IVU.mjs';
6
+ import '../../chunk-X5NHWOXT.mjs';
7
7
  import '../../chunk-ZXX5GZEX.mjs';
8
8
  import '../../chunk-4PY4JYMY.mjs';
9
9
  import '../../chunk-Q3ZZH5Z7.mjs';
@@ -1,13 +1,13 @@
1
- import { c as CreateIndexOptions, C as ClusterNamespace, d as ClusterNodeConfig } from './config-ZZg4cwQz.js';
2
- export { B as BackupListing, e as BackupOperationOptions, f as BackupProgress, a as BackupSummary, g as ClusterBackupConfig, h as ClusterControllerConfig, i as ClusterHealth, j as ClusterHealthStatus, k as ClusterMemoryConfig, l as ClusterMetrics, b as ClusterNodeInfo, m as ClusterQueryConfig, n as CommitPointFigure, o as CoordinatorRequestFigure, p as CreateBackupOptions, D as DamagedBackup, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, q as ReplicationConfig, r as RestoreBackupOptions, V as VectorRebuildWaitFigure } from './config-ZZg4cwQz.js';
1
+ import { c as CreateIndexOptions, C as ClusterNamespace, d as ClusterNodeConfig } from './config-CIpLXXxm.js';
2
+ export { B as BackupListing, e as BackupOperationOptions, f as BackupProgress, a as BackupSummary, g as ClusterBackupConfig, h as ClusterControllerConfig, i as ClusterHealth, j as ClusterHealthStatus, k as ClusterMemoryConfig, l as ClusterMetrics, b as ClusterNodeInfo, m as ClusterQueryConfig, n as CommitPointFigure, o as CoordinatorRequestFigure, p as CreateBackupOptions, D as DamagedBackup, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, q as ReplicationConfig, r as RestoreBackupOptions, V as VectorRebuildWaitFigure } from './config-CIpLXXxm.js';
3
3
  import { R as RerankAdapter } from './adapters-pljAqmrC.js';
4
- import { f as SyncSetting, g as SyncStatus, B as BatchResult, L as ListParams, l as ListResult, m as SuggestParams, n as SuggestResult, Q as QueryParams, o as PreflightResult, I as IndexInfo, A as AnalysisChange, p as IndexStats, P as PartitionStatsResult, M as MemoryStats, q as NarsilEventMap, j as QueryResult, h as Narsil } from './engine-DdOs682x.js';
5
- import { B as BM25Params, I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-C_7yRJLt.js';
6
- import { c as NodeCapacity, N as NodeRole } from './index-Ck9w5WHz.js';
7
- export { A as AllocationConstraints, e as AllocationEvent, a as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, f as IndexMetadataWatch, g as IndexPartitionBytes, h as NodeEvent, d as NodeMemoryReport, b as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-Ck9w5WHz.js';
4
+ import { f as SyncSetting, g as SyncStatus, B as BatchResult, L as ListParams, l as ListResult, m as SuggestParams, n as SuggestResult, Q as QueryParams, o as PreflightResult, I as IndexInfo, A as AnalysisChange, p as IndexStats, P as PartitionStatsResult, M as MemoryStats, q as NarsilEventMap, j as QueryResult, h as Narsil } from './engine-P-4xhUe4.js';
5
+ import { B as BM25Params, I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-CzG9OUw5.js';
6
+ import { c as NodeCapacity, N as NodeRole } from './index-CBUl4z3E.js';
7
+ export { A as AllocationConstraints, e as AllocationEvent, a as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, f as IndexMetadataWatch, g as IndexPartitionBytes, h as NodeEvent, d as NodeMemoryReport, b as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-CBUl4z3E.js';
8
8
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
9
9
  export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-DvncmvuQ.js';
10
- import './config-Cb3FOlE_.js';
10
+ import './config-DehU-VGL.js';
11
11
  import './query-suggestions-CBYkrQ5T.js';
12
12
 
13
13
  /**
@@ -1,50 +1,50 @@
1
- import { routableAllocation, resolvePartitionId, resolveNodeTargets, resolvePrimaryAssignment, requireAssignedPrimary, assertSufficientActiveReplicas, getInSyncReplicaTargets } from './chunk-R4F7ZTVG.mjs';
2
- import { applyStoredIndexBm25 } from './chunk-3UGZBRDN.mjs';
3
- import { keyBytesOf, querySuggestionsOf, createQuerySuggestionsRuntime, publicBuildOf, buildRecordToWire, buildRecordFromWire, SUGGESTIONS_SCHEMA } from './chunk-BKOMO7HT.mjs';
4
- import { stampAnalysisGeneration, holdsNamedSettings, dropHeldAnalysisChange, releaseHeldAnalysisChange, heldAnalysisIsBuilt, buildHeldAnalysisChange, archiveStream, buildArchiveFromMemory, indexMetadataOf, applyIndexEntry, applyDeleteEntry, resolveAnalysisTarget, requireConfigurationWithinSizeLimit, memoryCheckpointStore, createByteReader, writeArchiveFile, namedSettingsOf, createDetachedIndex, loadPartitionSegments, holdsSettings, configOfNamedSettings, closePartitionWriter, requireRestoreMemory, archiveFootprint, storedBytesOfSegments, validateReplicationEntry, readSegmentManifest, replaySyncedWal } from './chunk-D5GNFN6X.mjs';
5
- import { readVectorFile } from './chunk-7OE73OO4.mjs';
6
- import { emptySerializablePartition } from './chunk-EIR3IQCL.mjs';
7
- import { addBackgroundAdmission, workWaitingForMemory, resolveHybridFusion, fuseRankings } from './chunk-5DUTOEK5.mjs';
1
+ import { routableAllocation, resolvePartitionId, resolveNodeTargets, resolvePrimaryAssignment, requireAssignedPrimary, assertSufficientActiveReplicas, getInSyncReplicaTargets } from './chunk-BIIROQ5Q.mjs';
2
+ import { emptySerializablePartition } from './chunk-QFJMRB7D.mjs';
3
+ import { applyStoredIndexBm25 } from './chunk-GO6TRSJ6.mjs';
4
+ import { keyBytesOf, querySuggestionsOf, createQuerySuggestionsRuntime, publicBuildOf, buildRecordToWire, buildRecordFromWire, SUGGESTIONS_SCHEMA } from './chunk-26E5MO3Y.mjs';
5
+ import { stampAnalysisGeneration, holdsNamedSettings, dropHeldAnalysisChange, releaseHeldAnalysisChange, heldAnalysisIsBuilt, buildHeldAnalysisChange, archiveStream, buildArchiveFromMemory, indexMetadataOf, applyIndexEntry, applyDeleteEntry, resolveAnalysisTarget, requireConfigurationWithinSizeLimit, memoryCheckpointStore, createByteReader, writeArchiveFile, namedSettingsOf, createDetachedIndex, loadPartitionSegments, holdsSettings, configOfNamedSettings, closePartitionWriter, requireRestoreMemory, archiveFootprint, storedBytesOfSegments, validateReplicationEntry, readSegmentManifest, replaySyncedWal, nestedSchemaOf } from './chunk-7FC2ZILY.mjs';
6
+ import { readVectorFile } from './chunk-YPV2L7M5.mjs';
7
+ import { addBackgroundAdmission, workWaitingForMemory, resolveHybridFusion, fuseRankings } from './chunk-TBOZHYCF.mjs';
8
8
  import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
9
- import { bindEngineWriteBlock, bindIndexReads, syncServingSourceOf, bindSyncServing, validateBackupConfig, BACKUP_SWEEP_INTERVAL_MS, bindWriteBlockLookup, backupKeys, validateBackupName, storedFilesOf, BACKUP_MANIFEST_READS_AT_ONCE, decodeBackupManifest, BACKUP_JOBS_KEY, BACKUP_DELETES_AT_ONCE, BACKUP_PROGRESS_REPORT_INTERVAL_MS, BACKUP_PARTITION_RESULT_RETENTION_MS, BACKUP_JOB_POLL_INTERVAL_MS, SYNC_BACKUP_TAKER, BACKUP_FILES_AT_ONCE, isCount, storeWithoutSaveIfAbsent, CLUSTER_UUID_KEY, isSha256Hex, BACKUP_PUBLISH_RETRY_MS, readRestorePlacement, BACKUP_JOB_CAS_ATTEMPTS, BACKUP_JOB_CAS_RETRY_MS, MAX_CLUSTER_UUID_BYTES, MAX_FINISHED_BACKUP_JOBS, BACKUP_FILE_CHUNK_BYTES, encodeBackupManifest, SYNC_BACKUPS_KEPT, BACKUP_PARTITIONS_AT_ONCE, BACKUP_PARTITION_POLL_INTERVAL_MS, BACKUP_PRIMARY_WAIT_MS, readBackupPartition, readStoredFile } from './chunk-Q7CUUSJ2.mjs';
10
- import { DEFAULT_NODE_LIFECYCLE_CONFIG, DEFAULT_CONTROLLER_CONFIG, readIndexMetadataSnapshot, indexMetadataSnapshotOf, getIndexMetadata, getClusterIndexConfig, withPartitionCount, validateIndexName, suggestionStateOfSettings, indexConfigKey, metadataWithSync, indexConfigFromSettings, metadataWithBm25, readIndexState, storeSynonymSet, deleteSynonymSet, indexSettingsOf, putIndexMetadata, isValidInteger, isRecord, HIDDEN_GENERATION_PREFIX, isRecord2, decodeIndexSettings, metadataWithSynonymSet, RESHARD_RECORD_CAS_ATTEMPTS, indexUuidOfStoredMetadata, storedSynonymSetOf, RESHARD_FORWARD_BATCH_DOCUMENTS, RESHARD_RETRY_DELAY_MS, TEARDOWN_CAS_ATTEMPTS, RESHARD_RECORD_CHECK_INTERVAL_MS, RESHARD_POLL_INTERVAL_MS, ALLOCATION_RETRY_DELAY_MS, TEARDOWN_RETRY_ROUNDS, ANALYSIS_CHANGE_RETRY_MS, putIndexReplicationFactor, ALLOCATION_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, RESHARD_CONTROLLER_POLL_INTERVAL_MS, MAX_RESHARD_CUTOVER_ATTEMPTS, ANALYSIS_CHANGE_POLL_INTERVAL_MS, RECOVERY_CAS_ATTEMPTS, ESTIMATED_PARTITION_BYTES, REBALANCE_THRESHOLD, putGenerationMetadata, RESHARD_CUTOVER_LAG_ENTRIES, ANALYSIS_REBUILD_RESEND_MS, RESHARD_CUTOVER_TIMEOUT_MS, PARTITION_STORES_TIMEOUT_MS, SYNC_EPOCH_CAS_ATTEMPTS, LEADERSHIP_IMBALANCE_THRESHOLD, BOOTSTRAP_CAS_ATTEMPTS, metadataWithSuggestionState } from './chunk-V4YIEMAI.mjs';
11
- import { MAX_WAIT_FOR_ACTIVE_REPLICAS, MIN_CONTROLLER_LEASE_TTL_MS, MAX_NODE_LEFT_DELAY_MS, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_CAPACITY, CATCH_UP_TICK_MS, MEMORY_SAMPLE_INTERVAL_MS, createWritePressure, WRITE_MEMORY_SAMPLE_MAX_AGE_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, MAX_SETTINGS_REPLACEMENT_ATTEMPTS, SETTINGS_CONTENTION_REASON, MAX_DROP_ACKNOWLEDGE_WAIT_MS, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_CREATE_INDEX_WAIT_MS, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, SEARCH_CONTEXT_REAPER_INTERVAL_MS, DECOMMISSION_RECHECK_INTERVAL_MS, refuseEncodeWithoutRoom, answerRefusalOf, withAdmittedWrite, estimateForwardedBytes, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, MAX_SOURCE_ID_LENGTH, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, CATCH_UP_FEED_WINDOW_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, SYNCED_POSITION_REPORT_TIMEOUT_MS, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, ADMISSION_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, WRITE_APPLY_YIELD_INTERVAL_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, ROLLBACK_RETRY_DELAY_CAP_MS, FETCH_GROUP_DOCUMENT_IDS, COPY_FAILURE_RETRY_DELAY_MS, SEARCH_CONTEXT_ENTRY_HEAP_BYTES, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CLEAR_PAGE_SIZE, estimateDocumentsBytes, estimateDocumentBytes, PRIMARY_CHANGE_RETRY_WINDOW_MS, PRIMARY_CHANGE_POLL_INTERVAL_MS, PARTITION_WRITE_CONCURRENCY, FORWARD_RETRY_INITIAL_DELAY_MS, FORWARD_RETRY_DELAY_CAP_MS } from './chunk-K4BMDPPX.mjs';
12
- export { DEFAULT_CAPACITY, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR } from './chunk-K4BMDPPX.mjs';
13
- import { encodeIndexConfiguration, MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireSyncSetting, requireNoQuerySuggestions, decodeIndexConfiguration, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-ES5EOXT6.mjs';
14
- import { restoredConfigFields, restoredEmbedding } from './chunk-4CAMH7FO.mjs';
15
- import { estimatedArchiveBytes, readSnapshotArchive, archiveLayout, openManifestPayload, sourceIndexNameOf, listedKeysOf, decodeManifestPayload } from './chunk-RXMR2SIQ.mjs';
9
+ import { bindEngineWriteBlock, bindIndexReads, syncServingSourceOf, bindSyncServing, validateBackupConfig, BACKUP_SWEEP_INTERVAL_MS, bindWriteBlockLookup, backupKeys, validateBackupName, storedFilesOf, BACKUP_MANIFEST_READS_AT_ONCE, decodeBackupManifest, BACKUP_JOBS_KEY, BACKUP_DELETES_AT_ONCE, BACKUP_PROGRESS_REPORT_INTERVAL_MS, BACKUP_PARTITION_RESULT_RETENTION_MS, BACKUP_JOB_POLL_INTERVAL_MS, SYNC_BACKUP_TAKER, BACKUP_FILES_AT_ONCE, isCount, storeWithoutSaveIfAbsent, CLUSTER_UUID_KEY, isSha256Hex, BACKUP_PUBLISH_RETRY_MS, readRestorePlacement, BACKUP_JOB_CAS_ATTEMPTS, BACKUP_JOB_CAS_RETRY_MS, MAX_CLUSTER_UUID_BYTES, MAX_FINISHED_BACKUP_JOBS, BACKUP_FILE_CHUNK_BYTES, encodeBackupManifest, SYNC_BACKUPS_KEPT, BACKUP_PARTITIONS_AT_ONCE, BACKUP_PARTITION_POLL_INTERVAL_MS, BACKUP_PRIMARY_WAIT_MS, readBackupPartition, readStoredFile } from './chunk-ISJ35523.mjs';
10
+ import { DEFAULT_NODE_LIFECYCLE_CONFIG, DEFAULT_CONTROLLER_CONFIG, readIndexMetadataSnapshot, indexMetadataSnapshotOf, getIndexMetadata, getClusterIndexConfig, withPartitionCount, validateIndexName, suggestionStateOfSettings, indexConfigKey, metadataWithSync, indexConfigFromSettings, metadataWithBm25, readIndexState, storeSynonymSet, deleteSynonymSet, indexSettingsOf, putIndexMetadata, isValidInteger, isRecord, HIDDEN_GENERATION_PREFIX, isRecord2, decodeIndexSettings, metadataWithSynonymSet, RESHARD_RECORD_CAS_ATTEMPTS, indexUuidOfStoredMetadata, storedSynonymSetOf, RESHARD_FORWARD_BATCH_DOCUMENTS, RESHARD_RETRY_DELAY_MS, TEARDOWN_CAS_ATTEMPTS, RESHARD_RECORD_CHECK_INTERVAL_MS, RESHARD_POLL_INTERVAL_MS, ALLOCATION_RETRY_DELAY_MS, TEARDOWN_RETRY_ROUNDS, ANALYSIS_CHANGE_RETRY_MS, putIndexReplicationFactor, ALLOCATION_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, RESHARD_CONTROLLER_POLL_INTERVAL_MS, MAX_RESHARD_CUTOVER_ATTEMPTS, ANALYSIS_CHANGE_POLL_INTERVAL_MS, RECOVERY_CAS_ATTEMPTS, ESTIMATED_PARTITION_BYTES, REBALANCE_THRESHOLD, putGenerationMetadata, RESHARD_CUTOVER_LAG_ENTRIES, ANALYSIS_REBUILD_RESEND_MS, RESHARD_CUTOVER_TIMEOUT_MS, PARTITION_STORES_TIMEOUT_MS, SYNC_EPOCH_CAS_ATTEMPTS, LEADERSHIP_IMBALANCE_THRESHOLD, BOOTSTRAP_CAS_ATTEMPTS, metadataWithSuggestionState } from './chunk-XQQKETAF.mjs';
11
+ import { MAX_WAIT_FOR_ACTIVE_REPLICAS, MIN_CONTROLLER_LEASE_TTL_MS, MAX_NODE_LEFT_DELAY_MS, DEFAULT_MAX_PER_SOURCE_SNAPSHOTS, DEFAULT_MAX_STREAMS_PER_INDEX, DEFAULT_CAPACITY, CATCH_UP_TICK_MS, MEMORY_SAMPLE_INTERVAL_MS, createWritePressure, WRITE_MEMORY_SAMPLE_MAX_AGE_MS, DEFAULT_IN_FLIGHT_WRITE_FRACTION, MAX_SETTINGS_REPLACEMENT_ATTEMPTS, SETTINGS_CONTENTION_REASON, MAX_DROP_ACKNOWLEDGE_WAIT_MS, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, DEFAULT_CREATE_INDEX_WAIT_MS, DEFAULT_BOOTSTRAP_SYNC_DEADLINE_MS, DROP_ACKNOWLEDGE_POLL_INTERVAL_MS, COORDINATOR_REQUEST_BUCKET_BOUNDS_SECONDS, COPY_FAILURE_ATTEMPTS, SEARCH_CONTEXT_REAPER_INTERVAL_MS, DECOMMISSION_RECHECK_INTERVAL_MS, refuseEncodeWithoutRoom, answerRefusalOf, withAdmittedWrite, estimateForwardedBytes, PARTITION_BYTES_INDEX_OVERHEAD_BYTES, MAX_SOURCE_ID_LENGTH, PARTITION_BYTES_ENTRY_BYTES, PARTITION_BYTES_REPORT_BUDGET_BYTES, CATCH_UP_FEED_WINDOW_MS, MAX_CATCH_UP_IN_FLIGHT_BYTES, SYNCED_POSITION_REPORT_TIMEOUT_MS, SNAPSHOT_CHUNK_YIELD_INTERVAL_MS, ADMISSION_TIMEOUT_MS, REGISTRATION_LEASE_DRIFT_SHARE, REGISTRATION_LEASE_CONFIRM_TIMEOUT_MS, WRITE_APPLY_YIELD_INTERVAL_MS, ROLLBACK_RETRY_INITIAL_DELAY_MS, ROLLBACK_RETRY_DELAY_CAP_MS, FETCH_GROUP_DOCUMENT_IDS, COPY_FAILURE_RETRY_DELAY_MS, SEARCH_CONTEXT_ENTRY_HEAP_BYTES, ANSWER_DECODE_HEAP_BYTES_PER_PAYLOAD_BYTE, CLEAR_PAGE_SIZE, estimateDocumentsBytes, estimateDocumentBytes, PRIMARY_CHANGE_RETRY_WINDOW_MS, PRIMARY_CHANGE_POLL_INTERVAL_MS, PARTITION_WRITE_CONCURRENCY, FORWARD_RETRY_INITIAL_DELAY_MS, FORWARD_RETRY_DELAY_CAP_MS } from './chunk-Y27E2MGC.mjs';
12
+ export { DEFAULT_CAPACITY, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR } from './chunk-Y27E2MGC.mjs';
13
+ import { encodeIndexConfiguration, MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireSyncSetting, requireNoQuerySuggestions, decodeIndexConfiguration, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-LOQHA6QK.mjs';
14
+ import { restoredConfigFields, restoredEmbedding } from './chunk-X4UMDSB4.mjs';
15
+ import { estimatedArchiveBytes, readSnapshotArchive, archiveLayout, openManifestPayload, sourceIndexNameOf, listedKeysOf, decodeManifestPayload } from './chunk-UISV46WX.mjs';
16
16
  import { CONTROLLER_LEASE_KEY } from './chunk-44W3CBNG.mjs';
17
17
  import './chunk-T4HMSZCX.mjs';
18
- import { createForwardBatchResultMessage, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, optionalIndexUuid, computeEntryChecksum, createPrimaryResignMessage, validateInsyncConfirmPayload, buildEntry, createInsyncRemoveMessage, createEntryBatchMessage, createInsyncConfirmMessage, createEntryMessage, createInsyncAddMessage, validateAckPayload, checkpointLastSeqNo, checkpointPrimaryTerm, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage } from './chunk-GJKFXKMI.mjs';
19
- import { directoryCheckpointStore, readListedFile, encodeSegmentManifest } from './chunk-5P72V66D.mjs';
18
+ import { createForwardBatchResultMessage, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, optionalIndexUuid, computeEntryChecksum, createPrimaryResignMessage, validateInsyncConfirmPayload, buildEntry, createInsyncRemoveMessage, createEntryBatchMessage, createInsyncConfirmMessage, createEntryMessage, createInsyncAddMessage, validateAckPayload, checkpointLastSeqNo, checkpointPrimaryTerm, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage } from './chunk-F3FDHXCJ.mjs';
19
+ import { directoryCheckpointStore, readListedFile, encodeSegmentManifest } from './chunk-ZB5X5WAK.mjs';
20
20
  import { TransportErrorCodes, ClusterMessageTypes, ReplicationMessageTypes, SuggestionMessageTypes, SyncMessageTypes, QueryMessageTypes, TransportError, DEFAULT_TRANSPORT_CONFIG } from './chunk-5FLRXF73.mjs';
21
21
  import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-JDDXV6UF.mjs';
22
- import { manifestFileRefs, segmentKey, SEGMENT_MANIFEST_VERSION, vectorFileKey } from './chunk-KSOZJEYU.mjs';
22
+ import { manifestFileRefs, segmentKey, SEGMENT_MANIFEST_VERSION, vectorFileKey } from './chunk-KHJPMZE2.mjs';
23
23
  import { getPath, getFs } from './chunk-HLPRHOSO.mjs';
24
24
  import './chunk-QDZJM7NI.mjs';
25
- import './chunk-77AUVDQ5.mjs';
25
+ import './chunk-CV3Q2EKO.mjs';
26
26
  import './chunk-LNGE7SLY.mjs';
27
- import './chunk-QBVTYY4J.mjs';
28
- import './chunk-ZBVHS5KF.mjs';
29
- import { deserializePartition } from './chunk-EI7U43MX.mjs';
30
- import { decodeVectorFilePayload, bytesToVectors, isDead, MIN_EF_SEARCH, MAX_EF_SEARCH, MIN_OVERSAMPLE } from './chunk-VJOS6MHF.mjs';
31
- import './chunk-NXMGUDZA.mjs';
32
- import { RestoredHistory } from './chunk-STLNPJXU.mjs';
27
+ import './chunk-I2WJCRIH.mjs';
28
+ import './chunk-XFOL77WH.mjs';
29
+ import { deserializePartition } from './chunk-R7PLSVK3.mjs';
30
+ import { decodeVectorFilePayload, bytesToVectors, isDead, MIN_EF_SEARCH, MAX_EF_SEARCH, MIN_OVERSAMPLE } from './chunk-TNEU32EN.mjs';
31
+ import './chunk-2KWTQ2P7.mjs';
32
+ import { RestoredHistory } from './chunk-YXZDTKQS.mjs';
33
33
  import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
34
- import { historyFilesOf, removeHistoryFolder, QUERY_HISTORY_FOLDER, RESTORE_STAGING_INFIX, openChecksummedEnvelope, historyFolderOf, listHistoryFolder, historyFileOf, COUNTS_STREAM_CHUNK_BYTES, BUILD_WRITE_BATCH, restoreStagingPrefix, crc32Init, crc32Final, crc32Update, MAX_COUNTS_STREAM_KEY_BYTES, MAX_HISTORY_FILE_BYTES, packChecksummedEnvelope, storedStateOf } from './chunk-GQLOEACG.mjs';
34
+ import { historyFilesOf, removeHistoryFolder, QUERY_HISTORY_FOLDER, RESTORE_STAGING_INFIX, openChecksummedEnvelope, historyFolderOf, listHistoryFolder, historyFileOf, COUNTS_STREAM_CHUNK_BYTES, BUILD_WRITE_BATCH, restoreStagingPrefix, crc32Init, crc32Final, crc32Update, MAX_COUNTS_STREAM_KEY_BYTES, MAX_HISTORY_FILE_BYTES, packChecksummedEnvelope, storedStateOf } from './chunk-JCWC75NH.mjs';
35
35
  import { boundQuerySuggestionsOf, bindQuerySuggestions } from './chunk-S2POFTLN.mjs';
36
- import { oversampledShardSize, runtimeHost, bindRerankWindowSource, rerankWindowCapOf, validateMemoryFractions, requireKnownConfig, importOptionalReads, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, emitEngineEvent, synonymModule, createEngineIndex, generateId, getLanguage, resolveIndexAnalysis, memoryFractionsOf, createMemoryMonitor, readMemoryFigures, FULL_MEMORY_COLLECTION_INTERVAL_MS, validateBM25Params, storedBM25Params, requireSurfaceFormsForPartialFields, bm25SetsValue, prepareConfiguredSynonyms, storedArrayPositionGap, updateDocumentVectors, arrayPositionsAreStale, fnv1a, readRecentMemoryFigures, normalizeSort, sortModesOf, resolveProjection, requireLoadedOptionalReads, applyProjection, FILTER_EXPRESSION_KEYS, filterTestCount, setNestedValue, validateBM25Shape, CASE_FOLD_EXPANSION_FACTOR, PATTERN_RUN_HEAP_BYTES, ENUM_VALUE_HEAP_BYTES, DOCUMENT_VALUE_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, hasLanguage, FIELD_FILTER_OPERATORS, yieldToEventLoop, NORMALIZATION_EXPANSION_FACTOR, TERM_UNIT_HEAP_BYTES, visitTokens, clampRowCount, now, sortSignatureOf, listBindingOf, requireMatchingCursor, decodePageCursor, encodePageCursor, DISTINCT_TERM_HEAP_BYTES, PARTIAL_SPELLING_HEAP_BYTES, clampLimit, requireWithinResultWindow, providedDocId, holdsQuotedText, queryBindingOf, engineCoreOf, sortSignatureEntry, fnv1aUint32s, loadRerankRuntime, mergePartitionStats, mergeEntries, regionsOverlap, compareScores } from './chunk-EEYDJB4Z.mjs';
36
+ import { oversampledShardSize, runtimeHost, bindRerankWindowSource, rerankWindowCapOf, validateMemoryFractions, requireKnownConfig, importOptionalReads, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, emitEngineEvent, synonymModule, createEngineIndex, generateId, getLanguage, resolveIndexAnalysis, memoryFractionsOf, createMemoryMonitor, readMemoryFigures, FULL_MEMORY_COLLECTION_INTERVAL_MS, validateBM25Params, storedBM25Params, requireSurfaceFormsForPartialFields, bm25SetsValue, prepareConfiguredSynonyms, storedArrayPositionGap, updateDocumentVectors, arrayPositionsAreStale, fnv1a, readRecentMemoryFigures, normalizeSort, sortModesOf, resolveProjection, requireLoadedOptionalReads, applyProjection, FILTER_EXPRESSION_KEYS, filterTestCount, setNestedValue, validateBM25Shape, CASE_FOLD_EXPANSION_FACTOR, PATTERN_RUN_HEAP_BYTES, ENUM_VALUE_HEAP_BYTES, DOCUMENT_VALUE_HEAP_BYTES, DOCUMENT_HEAP_BYTES_PER_ESTIMATED_BYTE, DOCUMENT_PROPERTY_HEAP_BYTES, VECTOR_DOCUMENT_HEAP_BYTES, VECTOR_COMPONENT_HEAP_BYTES, hasLanguage, FIELD_FILTER_OPERATORS, yieldToEventLoop, NORMALIZATION_EXPANSION_FACTOR, TERM_UNIT_HEAP_BYTES, customTokensOf, visitTokens, clampRowCount, now, sortSignatureOf, listBindingOf, requireMatchingCursor, decodePageCursor, encodePageCursor, DISTINCT_TERM_HEAP_BYTES, PARTIAL_SPELLING_HEAP_BYTES, clampLimit, requireWithinResultWindow, providedDocId, holdsQuotedText, queryBindingOf, engineCoreOf, sortSignatureEntry, fnv1aUint32s, loadRerankRuntime, mergePartitionStats, mergeEntries, regionsOverlap, compareScores } from './chunk-2C3BXZGA.mjs';
37
37
  import { encodeDocument, encodeDocumentReply } from './chunk-KLVMK3R5.mjs';
38
- import { collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal, onRefusalAfterCollection, reservedHeapBytes, reserveHeapBytes } from './chunk-AB27FWZM.mjs';
38
+ import { collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal, onRefusalAfterCollection, reservedHeapBytes, reserveHeapBytes } from './chunk-LPRRFCVU.mjs';
39
39
  import { decode } from './chunk-GXCDWLQI.mjs';
40
40
  import { newSyncEpoch } from './chunk-BUMREPLU.mjs';
41
41
  import './chunk-7T4LAYT4.mjs';
42
- import { MAX_FILTER_DEPTH, MAX_FILTER_TESTS, isPatternTolerance, MAX_FILTER_ARRAY_SIZE, buildStoredValues } from './chunk-JV74RKCY.mjs';
43
- import { loadMessagePack, validateSchema, requireCreatableSchema, schemaFieldsOf, getNestedValue, MAX_NESTING_DEPTH, MAX_STORED_VECTOR_DIMENSION, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES } from './chunk-R4CE4IVU.mjs';
42
+ import { MAX_FILTER_DEPTH, MAX_FILTER_TESTS, isPatternTolerance, MAX_FILTER_ARRAY_SIZE, buildStoredValues } from './chunk-YM2HI5N5.mjs';
43
+ import { loadMessagePack, validateSchema, requireCreatableSchema, schemaFieldsOf, getNestedValue, MAX_NESTING_DEPTH, MAX_STORED_VECTOR_DIMENSION, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES } from './chunk-X5NHWOXT.mjs';
44
44
  import './chunk-U2BKYEC7.mjs';
45
- import './chunk-OUWZKNO3.mjs';
46
- import { collectAndReturnPages, BATCH_CHUNK_SIZE, MAX_SORT_FIELDS, MAX_DOC_ID_LENGTH, MAX_CURSOR_LENGTH, MAX_TOLERANCE, MAX_PREFIX_LENGTH, RESULT_WINDOW, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, DEFAULT_PAGE_SIZE, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, HYBRID_RESCORE_WINDOW, DEFAULT_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT } from './chunk-3B775F3C.mjs';
47
- import { nativeSearchCoreIsEnabled, loadNativeCore, noteFallback } from './chunk-XXWEUXE4.mjs';
45
+ import './chunk-DG6WIEB3.mjs';
46
+ import { collectAndReturnPages, BATCH_CHUNK_SIZE, MAX_SORT_FIELDS, MAX_DOC_ID_LENGTH, MAX_CURSOR_LENGTH, MAX_TOLERANCE, MAX_PREFIX_LENGTH, RESULT_WINDOW, MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, DEFAULT_PAGE_SIZE, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, HYBRID_RESCORE_WINDOW, DEFAULT_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT } from './chunk-JP77OWMI.mjs';
47
+ import { nativeSearchCoreIsEnabled, loadNativeCore, noteFallback } from './chunk-D6FYUTFN.mjs';
48
48
  import './chunk-ZXX5GZEX.mjs';
49
49
  import { joinChunks, readWhole } from './chunk-IE3Q62QD.mjs';
50
50
  import { MAX_DOCUMENT_ENCODING_DEPTH } from './chunk-4PY4JYMY.mjs';
@@ -4975,7 +4975,7 @@ function vectorBytesOf(document, fields) {
4975
4975
  function customTermBytes(text2, tokenizer, partial) {
4976
4976
  let bytes = 0;
4977
4977
  const termBytes = DISTINCT_TERM_HEAP_BYTES + (partial ? PARTIAL_SPELLING_HEAP_BYTES : 0);
4978
- for (const { token } of tokenizer.tokenize(text2)) {
4978
+ for (const { token } of customTokensOf(tokenizer, text2, "document")) {
4979
4979
  bytes += termBytes + token.length * TERM_UNIT_HEAP_BYTES;
4980
4980
  }
4981
4981
  return bytes;
@@ -4992,7 +4992,7 @@ function countedTermBytes(text2, analysis, partial) {
4992
4992
  visitTokens(
4993
4993
  text2,
4994
4994
  analysis.language,
4995
- { stem: false, removeStopWords: false, customTokenizer: analysis.customTokenizer },
4995
+ { stem: false, removeStopWords: false, customTokenizer: analysis.customTokenizer, textSource: "document" },
4996
4996
  (token) => {
4997
4997
  distinct.add(token);
4998
4998
  units += token.length;
@@ -6843,7 +6843,7 @@ async function decodeBackupIndexConfig(bytes, backupName) {
6843
6843
  const embedding = restoredEmbedding(envelope.embedding, reject);
6844
6844
  if (envelope.synonyms !== void 0 && !Array.isArray(envelope.synonyms)) reject("synonyms must be a list");
6845
6845
  const config = {
6846
- schema: validateSchema(envelope.schema),
6846
+ schema: validateSchema(nestedSchemaOf(envelope.schema)),
6847
6847
  language: envelope.language,
6848
6848
  ...fields,
6849
6849
  ...embedding === void 0 ? {} : { embedding },
@@ -14816,7 +14816,7 @@ async function openOnce(core, indexName, partitionId) {
14816
14816
  if (directory === void 0) throw durabilityRequired(indexName, partitionId);
14817
14817
  if ((checkpoint.manifest.analysisGeneration ?? 0) !== entry.analysisGeneration) return null;
14818
14818
  const config = await encodeIndexConfiguration(entry);
14819
- const { openPagedPartitionArchive } = await import('./paged-partition-archive-VMJ2AUA6.mjs');
14819
+ const { openPagedPartitionArchive } = await import('./paged-partition-archive-X7L27E5Z.mjs');
14820
14820
  const archive = await openPagedPartitionArchive(checkpoint, directory, indexName, partitionId, manager);
14821
14821
  handedOver = true;
14822
14822
  try {
@@ -15524,7 +15524,7 @@ async function archiveReplicationPartition(core, indexName, partitionId, lastSeq
15524
15524
  );
15525
15525
  }
15526
15526
  try {
15527
- const { openPagedPartitionArchive } = await import('./paged-partition-archive-VMJ2AUA6.mjs');
15527
+ const { openPagedPartitionArchive } = await import('./paged-partition-archive-X7L27E5Z.mjs');
15528
15528
  const archive = await openPagedPartitionArchive(checkpoint2, directory, indexName, partitionId, manager);
15529
15529
  return {
15530
15530
  stream: archiveStream({ ...archive, config, sourceIndexName: indexName }),
@@ -15739,7 +15739,7 @@ async function restoreReplicationPartition(core, engine, indexName, partitionId,
15739
15739
  if (directory !== null) {
15740
15740
  const durable = core.durability?.manager;
15741
15741
  await (durable?.checkpointFromMemory?.(indexName) ?? durable?.checkpoint(indexName));
15742
- const { removeReceivedFilesNothingReads } = await import('./paged-partition-archive-VMJ2AUA6.mjs');
15742
+ const { removeReceivedFilesNothingReads } = await import('./paged-partition-archive-X7L27E5Z.mjs');
15743
15743
  await removeReceivedFilesNothingReads(
15744
15744
  directory,
15745
15745
  core.requireManager(indexName),
@@ -19421,7 +19421,7 @@ async function queryCluster(deps, indexName, params, settingName) {
19421
19421
  (reader) => searchCluster(deps, indexName, settingName, params, allocation, reader, false)
19422
19422
  );
19423
19423
  }
19424
- const { rerankClusterQuery } = await import('./rerank-QHJXPSAK.mjs');
19424
+ const { rerankClusterQuery } = await import('./rerank-E2HFKKGJ.mjs');
19425
19425
  return withRankedReader(
19426
19426
  deps,
19427
19427
  indexName,
@@ -33,10 +33,10 @@ function validateVector(vector, targetField, expectedDimensions) {
33
33
  );
34
34
  }
35
35
  for (let i = 0; i < vector.length; i++) {
36
- if (Number.isNaN(vector[i])) {
36
+ if (!Number.isFinite(vector[i])) {
37
37
  throw new NarsilError(
38
38
  ErrorCodes.EMBEDDING_FAILED,
39
- `Adapter returned vector with NaN at index ${i} for field "${targetField}"`,
39
+ `Adapter returned vector with ${vector[i]} at index ${i} for field "${targetField}"`,
40
40
  { field: targetField, index: i }
41
41
  );
42
42
  }
@@ -1,5 +1,5 @@
1
1
  import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
2
- import { A as AnyDocument, B as BM25Params, d as ScoringMode, S as SchemaDefinition, a as InsertOptions, W as WriteOptions, I as IndexConfig, P as PartitionConfig } from './schema-C_7yRJLt.js';
2
+ import { A as AnyDocument, B as BM25Params, d as ScoringMode, S as SchemaDefinition, a as InsertOptions, W as WriteOptions, I as IndexConfig, P as PartitionConfig } from './schema-CzG9OUw5.js';
3
3
  import { h as QuerySuggestionsBuildEvent, j as QuerySuggestionsWarningEvent } from './query-suggestions-CBYkrQ5T.js';
4
4
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
5
5
 
@@ -2525,7 +2525,11 @@ interface Narsil extends IndexLifecycleOperations, DocumentWriteOperations, Syno
2525
2525
  * that arrive while the work runs, replaying them in order once it finishes.
2526
2526
  *
2527
2527
  * @param indexName - The index to rebalance.
2528
- * @param targetPartitionCount - Partitions the index ends up with.
2528
+ * @param targetPartitionCount - Partitions the index ends up with, at most
2529
+ * the index's `maxPartitions`, which defaults to 1. Raise that limit first
2530
+ * with {@link Narsil.updatePartitionConfig}.
2531
+ * @throws A `NarsilError` with `PARTITION_CAPACITY_EXCEEDED` when
2532
+ * `targetPartitionCount` is above `maxPartitions`.
2529
2533
  */
2530
2534
  rebalance(indexName: string, targetPartitionCount: number): Promise<void>;
2531
2535
  /**
@@ -1,4 +1,4 @@
1
- import { S as SchemaDefinition } from './schema-C_7yRJLt.js';
1
+ import { S as SchemaDefinition } from './schema-CzG9OUw5.js';
2
2
 
3
3
  /**
4
4
  * Tells watchers that the stored metadata of an index changed.
@@ -1,4 +1,4 @@
1
- export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-KQXKCMGQ.mjs';
2
- import './browser/chunk-MMHIIL5B.mjs';
1
+ export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-JHFBQKUF.mjs';
2
+ import './browser/chunk-4ZICWS4V.mjs';
3
3
  import './browser/chunk-YJHGOJAC.mjs';
4
- export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-MZHQ65VI.mjs';
4
+ export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-2Q45HI5H.mjs';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { e as StopWordOverride, C as CustomTokenizer } from './schema-C_7yRJLt.js';
2
- export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, f as FieldOptionChain, F as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, d as ScoringMode, T as TextFieldOption, V as VectorIndexConfig, b as VectorQuantizationMode, g as VectorStorageMode, W as WriteOptions } from './schema-C_7yRJLt.js';
1
+ import { e as StopWordOverride, C as CustomTokenizer } from './schema-CzG9OUw5.js';
2
+ export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, f as FieldOptionChain, F as FieldType, I as IndexConfig, a as InsertOptions, P as PartitionConfig, S as SchemaDefinition, d as ScoringMode, T as TextFieldOption, V as VectorIndexConfig, b as VectorQuantizationMode, g as VectorStorageMode, W as WriteOptions } from './schema-CzG9OUw5.js';
3
3
  import { P as PartialWordSearch } from './partial-words-DTIHO8G4.js';
4
4
  import { P as PatternSearch } from './pattern-Cledccbl.js';
5
5
  import { S as SynonymSearch } from './synonyms-CpOAHPa-.js';
6
6
  export { O as OneWaySynonymRule, a as SynonymRule, T as TwoWaySynonymRule } from './synonyms-CpOAHPa-.js';
7
7
  import { L as LanguageModule } from './language-DB8KG1z5.js';
8
8
  export { T as TokenizerConfig } from './language-DB8KG1z5.js';
9
- import { h as Narsil } from './engine-DdOs682x.js';
10
- export { s as AdapterRegistrationOperations, A as AnalysisChange, t as AnalysisOperations, u as ArrayFilter, v as BM25Operations, B as BatchResult, w as ByteSource, C as ClientErrorCode, a as ClientErrorCodes, x as ComparisonFilter, D as DocumentImportResult, y as DocumentProjection, z as DocumentWriteOperations, E as ErrorCode, b as ErrorCodes, F as FacetConfig, J as FacetResult, K as FieldFilter, O as FilterExpression, R as GeoFilter, T as GeoPolygonFilter, U as GeoRadiusFilter, r as GroupConfig, W as GroupReducer, G as GroupResult, X as HeldCheckpointReport, Y as HighlightConfig, Z as HighlightMatch, H as Hit, _ as HybridConfig, I as IndexInfo, $ as IndexLifecycleOperations, p as IndexStats, L as ListParams, l as ListResult, a0 as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, k as NarsilEventHandlers, q as NarsilEventMap, P as PartitionStatsResult, o as PreflightResult, a1 as PresenceFilter, a2 as ProcessMemoryReport, a3 as QueryCoverage, Q as QueryParams, j as QueryResult, a4 as RerankConfig, a5 as ScoreComponents, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, e as SnapshotOptions, a7 as SortField, a8 as SortSpec, a9 as StringFilter, m as SuggestParams, n as SuggestResult, aa as SyncOperations, f as SyncSetting, g as SyncStatus, ab as SynonymOperations, ac as TermMatchPolicy, ad as VectorMaintenanceOperations, V as VectorMaintenanceResult, ae as VectorQueryConfig, af as WorkerCopyReport, i as isNarsilError } from './engine-DdOs682x.js';
11
- import { N as NarsilConfig } from './config-Cb3FOlE_.js';
12
- export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as MemoryConfig, d as NarsilPlugin, P as PartitionContext, Q as QuerySuggestionsConfig, R as RemoveContext, S as SearchContext, e as StaleAnalysis, U as UpdateContext, W as WorkerConfig, f as WorkerContext } from './config-Cb3FOlE_.js';
9
+ import { h as Narsil } from './engine-P-4xhUe4.js';
10
+ export { s as AdapterRegistrationOperations, A as AnalysisChange, t as AnalysisOperations, u as ArrayFilter, v as BM25Operations, B as BatchResult, w as ByteSource, C as ClientErrorCode, a as ClientErrorCodes, x as ComparisonFilter, D as DocumentImportResult, y as DocumentProjection, z as DocumentWriteOperations, E as ErrorCode, b as ErrorCodes, F as FacetConfig, J as FacetResult, K as FieldFilter, O as FilterExpression, R as GeoFilter, T as GeoPolygonFilter, U as GeoRadiusFilter, r as GroupConfig, W as GroupReducer, G as GroupResult, X as HeldCheckpointReport, Y as HighlightConfig, Z as HighlightMatch, H as Hit, _ as HybridConfig, I as IndexInfo, $ as IndexLifecycleOperations, p as IndexStats, L as ListParams, l as ListResult, a0 as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, k as NarsilEventHandlers, q as NarsilEventMap, P as PartitionStatsResult, o as PreflightResult, a1 as PresenceFilter, a2 as ProcessMemoryReport, a3 as QueryCoverage, Q as QueryParams, j as QueryResult, a4 as RerankConfig, a5 as ScoreComponents, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, e as SnapshotOptions, a7 as SortField, a8 as SortSpec, a9 as StringFilter, m as SuggestParams, n as SuggestResult, aa as SyncOperations, f as SyncSetting, g as SyncStatus, ab as SynonymOperations, ac as TermMatchPolicy, ad as VectorMaintenanceOperations, V as VectorMaintenanceResult, ae as VectorQueryConfig, af as WorkerCopyReport, i as isNarsilError } from './engine-P-4xhUe4.js';
11
+ import { N as NarsilConfig } from './config-DehU-VGL.js';
12
+ export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as MemoryConfig, d as NarsilPlugin, P as PartitionContext, Q as QuerySuggestionsConfig, R as RemoveContext, S as SearchContext, e as StaleAnalysis, U as UpdateContext, W as WorkerConfig, f as WorkerContext } from './config-DehU-VGL.js';
13
13
  import { N as NativeStoredValues } from './stored-values-BWIMpiT_.js';
14
14
  export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
15
15
  export { h as QuerySuggestionsBuildEvent, j as QuerySuggestionsWarningEvent } from './query-suggestions-CBYkrQ5T.js';
package/dist/index.mjs CHANGED
@@ -1,15 +1,15 @@
1
- export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './chunk-EEYDJB4Z.mjs';
1
+ export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './chunk-2C3BXZGA.mjs';
2
2
  import './chunk-KLVMK3R5.mjs';
3
- import './chunk-AB27FWZM.mjs';
3
+ import './chunk-LPRRFCVU.mjs';
4
4
  import './chunk-GXCDWLQI.mjs';
5
5
  import './chunk-BUMREPLU.mjs';
6
6
  import './chunk-7T4LAYT4.mjs';
7
- import './chunk-JV74RKCY.mjs';
8
- import './chunk-R4CE4IVU.mjs';
7
+ import './chunk-YM2HI5N5.mjs';
8
+ import './chunk-X5NHWOXT.mjs';
9
9
  import './chunk-U2BKYEC7.mjs';
10
- import './chunk-OUWZKNO3.mjs';
11
- import './chunk-3B775F3C.mjs';
12
- import './chunk-XXWEUXE4.mjs';
10
+ import './chunk-DG6WIEB3.mjs';
11
+ import './chunk-JP77OWMI.mjs';
12
+ import './chunk-D6FYUTFN.mjs';
13
13
  import './chunk-ZXX5GZEX.mjs';
14
14
  import './chunk-4PY4JYMY.mjs';
15
15
  export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-Q3ZZH5Z7.mjs';
@@ -1,11 +1,11 @@
1
- export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './react-native/chunks/chunk-AUXXPSFB.mjs';
2
- import './react-native/chunks/chunk-2JMAUU26.mjs';
3
- import './react-native/chunks/chunk-VIPNDN4B.mjs';
4
- import './react-native/chunks/chunk-4EXKQ2IB.mjs';
5
- import './react-native/chunks/chunk-XBTFK3AZ.mjs';
1
+ export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, isSimdAvailable, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './react-native/chunks/chunk-F4MIGBBP.mjs';
2
+ import './react-native/chunks/chunk-J2BQTJJE.mjs';
3
+ import './react-native/chunks/chunk-I7DTUOK2.mjs';
4
+ import './react-native/chunks/chunk-SK3DPAI4.mjs';
5
+ import './react-native/chunks/chunk-WFQ6YQZA.mjs';
6
6
  import './react-native/chunks/chunk-PVMEHBQO.mjs';
7
7
  import './react-native/chunks/chunk-YOTP2FPE.mjs';
8
- import './react-native/chunks/chunk-FTQ7JNMU.mjs';
8
+ import './react-native/chunks/chunk-ZDDJVR7X.mjs';
9
9
  import './react-native/chunks/chunk-HRDMIQ63.mjs';
10
10
  import './react-native/chunks/chunk-VUJCSQG5.mjs';
11
11
  export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './react-native/chunks/chunk-TQ26BKBH.mjs';
@@ -1,30 +1,30 @@
1
- import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-XRBPHCCT.mjs';
2
- import { answerRequest } from './chunk-FSLQHOKZ.mjs';
3
- import './chunk-DSXFN5BF.mjs';
1
+ import { createRelayClient, createThreadReadEngine, searchHandler, isLongQueryPortNote } from './chunk-A4XYDUVN.mjs';
2
+ import { answerRequest } from './chunk-XNFBYAXI.mjs';
3
+ import './chunk-XTSFRWAS.mjs';
4
4
  import './chunk-FETZYCH7.mjs';
5
- import './chunk-K4BMDPPX.mjs';
6
- import './chunk-RXMR2SIQ.mjs';
7
- import './chunk-KSOZJEYU.mjs';
8
- import './chunk-77AUVDQ5.mjs';
5
+ import './chunk-Y27E2MGC.mjs';
6
+ import './chunk-UISV46WX.mjs';
7
+ import './chunk-KHJPMZE2.mjs';
8
+ import './chunk-CV3Q2EKO.mjs';
9
9
  import './chunk-LNGE7SLY.mjs';
10
- import './chunk-QBVTYY4J.mjs';
11
- import './chunk-ZBVHS5KF.mjs';
12
- import './chunk-EI7U43MX.mjs';
13
- import './chunk-VJOS6MHF.mjs';
10
+ import './chunk-I2WJCRIH.mjs';
11
+ import './chunk-XFOL77WH.mjs';
12
+ import './chunk-R7PLSVK3.mjs';
13
+ import './chunk-TNEU32EN.mjs';
14
14
  import './chunk-V6EUBAIT.mjs';
15
- import './chunk-GQLOEACG.mjs';
16
- import './chunk-EEYDJB4Z.mjs';
15
+ import './chunk-JCWC75NH.mjs';
16
+ import './chunk-2C3BXZGA.mjs';
17
17
  import './chunk-KLVMK3R5.mjs';
18
- import './chunk-AB27FWZM.mjs';
18
+ import './chunk-LPRRFCVU.mjs';
19
19
  import './chunk-GXCDWLQI.mjs';
20
20
  import './chunk-BUMREPLU.mjs';
21
21
  import './chunk-7T4LAYT4.mjs';
22
- import './chunk-JV74RKCY.mjs';
23
- import './chunk-R4CE4IVU.mjs';
22
+ import './chunk-YM2HI5N5.mjs';
23
+ import './chunk-X5NHWOXT.mjs';
24
24
  import './chunk-U2BKYEC7.mjs';
25
- import './chunk-OUWZKNO3.mjs';
26
- import './chunk-3B775F3C.mjs';
27
- import './chunk-XXWEUXE4.mjs';
25
+ import './chunk-DG6WIEB3.mjs';
26
+ import './chunk-JP77OWMI.mjs';
27
+ import './chunk-D6FYUTFN.mjs';
28
28
  import './chunk-ZXX5GZEX.mjs';
29
29
  import './chunk-4PY4JYMY.mjs';
30
30
  import './chunk-Q3ZZH5Z7.mjs';