@delali/narsil 0.3.1-next.91 → 0.3.1-next.94

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 (86) hide show
  1. package/dist/adapters/filesystem.mjs +1 -1
  2. package/dist/adapters/indexeddb.mjs +1 -1
  3. package/dist/browser/{chunk-B6XE7KXY.mjs → chunk-4JTBL63P.mjs} +4 -4
  4. package/dist/browser/{chunk-3ZRMZIH4.mjs → chunk-5S74HQRT.mjs} +208 -78
  5. package/dist/browser/{chunk-FHFFWLEK.mjs → chunk-HARBSUWP.mjs} +3 -4
  6. package/dist/browser/{chunk-NOUZ6RH3.mjs → chunk-HC6DMR4T.mjs} +238 -114
  7. package/dist/browser/{chunk-66KYAOIK.mjs → chunk-PP6N5CCS.mjs} +2 -2
  8. package/dist/browser/{chunk-NQW2YXEX.mjs → chunk-WKPJ4E73.mjs} +1 -1
  9. package/dist/browser/{durability-wiring-F4OGQUSU.mjs → durability-wiring-7DKYHKT5.mjs} +498 -71
  10. package/dist/browser/{module-E25UDADM.mjs → module-O5WH32EL.mjs} +102 -54
  11. package/dist/browser/release-76MXRPGV.mjs +33 -0
  12. package/dist/browser/replace-RURXTGVG.mjs +57 -0
  13. package/dist/browser/restore-queue-Z7FZZNKH.mjs +35 -0
  14. package/dist/browser/{snapshot-5EJ7I7QY.mjs → snapshot-PPTZ565G.mjs} +362 -103
  15. package/dist/browser/{write-K5V4XQ72.mjs → write-2ZAA7UDH.mjs} +4 -4
  16. package/dist/{capabilities-CvExBThq.d.ts → capabilities-xsJfdFoQ.d.ts} +2 -2
  17. package/dist/{chunk-NVL4ZR3K.mjs → chunk-2GZGBOQI.mjs} +2 -2
  18. package/dist/{chunk-CVQWQVFX.mjs → chunk-4ZJWRETC.mjs} +2 -2
  19. package/dist/{chunk-ZIJ63TBT.mjs → chunk-7KC56574.mjs} +1 -1
  20. package/dist/{chunk-MXS5HWIH.mjs → chunk-7VALMHZF.mjs} +89 -17
  21. package/dist/{chunk-UKSUENHK.mjs → chunk-AF2CIKYC.mjs} +40 -26
  22. package/dist/{chunk-BVOJIYRV.mjs → chunk-BB7MASRQ.mjs} +1 -1
  23. package/dist/{chunk-A4G7JSYO.mjs → chunk-C45FUYPI.mjs} +98 -49
  24. package/dist/{chunk-6VZ3Q73N.mjs → chunk-CHOGQSHK.mjs} +44 -25
  25. package/dist/{chunk-QZN3MIJ3.mjs → chunk-ES33L3HO.mjs} +2 -2
  26. package/dist/{chunk-67Z2V6TC.mjs → chunk-EWBXO45L.mjs} +3 -3
  27. package/dist/{chunk-3TTYK5A7.mjs → chunk-EX62BQT6.mjs} +9 -9
  28. package/dist/{chunk-3RDS4UHC.mjs → chunk-EZD4MWOU.mjs} +4 -4
  29. package/dist/{chunk-YCJLVNWR.mjs → chunk-F52QGNZ2.mjs} +1 -1
  30. package/dist/{chunk-43ORORN6.mjs → chunk-GJZHU4FC.mjs} +3 -3
  31. package/dist/{chunk-7OQHSDK6.mjs → chunk-J53IHLG7.mjs} +7 -7
  32. package/dist/{chunk-R7OSDAFK.mjs → chunk-K6A4FCVR.mjs} +1 -1
  33. package/dist/chunk-KOKM4PQN.mjs +52 -0
  34. package/dist/{chunk-T6CNO72J.mjs → chunk-QM3VPX4Z.mjs} +2 -2
  35. package/dist/{chunk-T4DB5YFB.mjs → chunk-QWWCLRXX.mjs} +6 -6
  36. package/dist/chunk-QY7GC2MW.mjs +33 -0
  37. package/dist/{chunk-BJ2YKRNX.mjs → chunk-R36MIGBU.mjs} +86 -54
  38. package/dist/{chunk-RVM7AODE.mjs → chunk-RDJKYKMQ.mjs} +2 -2
  39. package/dist/{chunk-UXQE2ROB.mjs → chunk-RUIXODYU.mjs} +3 -2
  40. package/dist/{chunk-5ER245FI.mjs → chunk-SBCEHIPL.mjs} +3 -3
  41. package/dist/{chunk-TPJU7NDJ.mjs → chunk-SYWGORQB.mjs} +1 -0
  42. package/dist/{chunk-XLJ2S2BH.mjs → chunk-UAUZGXJP.mjs} +40 -21
  43. package/dist/{chunk-EONIHG3V.mjs → chunk-WBS3EYC4.mjs} +7 -7
  44. package/dist/{chunk-CO4MRKST.mjs → chunk-WLOF6HSP.mjs} +2 -2
  45. package/dist/{chunk-ULRPNYAG.mjs → chunk-Z3MOCHG5.mjs} +120 -62
  46. package/dist/{chunk-MKWUXWQH.mjs → chunk-ZHS44YKF.mjs} +1 -1
  47. package/dist/{client-Cc42b42j.d.ts → client-CgayPw2R.d.ts} +2 -2
  48. package/dist/client.d.ts +6 -6
  49. package/dist/client.mjs +1 -0
  50. package/dist/{config-DyRowvVP.d.ts → config-3kBsQ0Pi.d.ts} +1 -1
  51. package/dist/{config-BYne-yCI.d.ts → config-B-RnO6dr.d.ts} +1 -1
  52. package/dist/direct-executor-IJTRU3YN.mjs +22 -0
  53. package/dist/distribution/coordinator/etcd.mjs +1 -1
  54. package/dist/distribution/transport/grpc.mjs +1 -1
  55. package/dist/distribution.d.ts +5 -5
  56. package/dist/distribution.mjs +26 -26
  57. package/dist/{durability-wiring-6AN4QTT3.mjs → durability-wiring-Y55SCPFC.mjs} +518 -91
  58. package/dist/embeddings/openai.mjs +1 -1
  59. package/dist/{engine-96_kLtSY.d.ts → engine-DSUfY2F0.d.ts} +11 -11
  60. package/dist/index.browser.mjs +2 -2
  61. package/dist/index.d.ts +5 -5
  62. package/dist/index.mjs +18 -18
  63. package/dist/{memory-dd3GESdc.d.ts → memory-wuXcYOD1.d.ts} +96 -76
  64. package/dist/{module-WIDYIJLY.mjs → module-VITS4ZR5.mjs} +72 -38
  65. package/dist/partial-words.mjs +5 -5
  66. package/dist/pattern.mjs +3 -3
  67. package/dist/persistence/durability/checkpoint-worker.mjs +21 -21
  68. package/dist/react.d.ts +6 -6
  69. package/dist/react.mjs +1 -0
  70. package/dist/release-BH3DKW3T.mjs +33 -0
  71. package/dist/replace-CEO5KJJ3.mjs +57 -0
  72. package/dist/restore-queue-4SG45BLF.mjs +35 -0
  73. package/dist/server.d.ts +8 -8
  74. package/dist/server.mjs +10 -10
  75. package/dist/snapshot-XBKE7PUG.mjs +738 -0
  76. package/dist/synonyms.mjs +3 -3
  77. package/dist/{tasks-DA1Ff0G4.d.ts → tasks-Bj9WBlFG.d.ts} +1 -1
  78. package/dist/{thread-VTDLLYXC.mjs → thread-U7XYJWGG.mjs} +15 -12
  79. package/dist/vector/search-worker.mjs +6 -6
  80. package/dist/workers/entry.mjs +5 -5
  81. package/dist/{write-OJR3H4BI.mjs → write-BMNV7P2H.mjs} +20 -20
  82. package/package.json +7 -7
  83. package/dist/chunk-Y2F66IQJ.mjs +0 -74
  84. package/dist/chunk-ZJ4CSAB2.mjs +0 -13
  85. package/dist/direct-executor-CHXVCBN7.mjs +0 -22
  86. package/dist/snapshot-JFZVOGZV.mjs +0 -479
@@ -1,4 +1,4 @@
1
- import { NarsilError, ErrorCodes } from '../chunk-TPJU7NDJ.mjs';
1
+ import { NarsilError, ErrorCodes } from '../chunk-SYWGORQB.mjs';
2
2
 
3
3
  // src/embeddings/constants.ts
4
4
  var RETRYABLE_STATUS_CODES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
@@ -1,5 +1,5 @@
1
1
  import { E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
2
- import { B as BatchResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, L as ListParams, h as ListResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, m as NarsilEventMap } from './memory-dd3GESdc.js';
2
+ import { B as BatchResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, L as ListParams, h as ListResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, m as NarsilEventMap } from './memory-wuXcYOD1.js';
3
3
  import { A as AnyDocument, a as InsertOptions, W as WriteOptions, I as IndexConfig, P as PartitionConfig } from './schema-DttzM-ln.js';
4
4
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
5
5
 
@@ -371,24 +371,24 @@ interface Narsil extends IndexLifecycleOperations, DocumentWriteOperations, Syno
371
371
  * Creates an index from a snapshot under the name that you pass, replacing
372
372
  * any index of that name.
373
373
  *
374
- * The engine accepts the archive that {@link Narsil.snapshot} streams. It
375
- * also accepts the single `.nrsl` file that `snapshot` returned in release
376
- * 0.3, and it inserts that file's documents and vectors as new writes. The
377
- * engine reads an archive one file at a time. Before it replaces an existing
378
- * index, it checks each file against the archive's manifest and decodes
379
- * every document, so a failed check leaves the existing index unchanged.
374
+ * The engine accepts the archive that {@link Narsil.snapshot} streams and
375
+ * the `.nrsl` file of release 0.3. It checks each archive file against its
376
+ * manifest and loads the restored index beside the existing one, which
377
+ * answers requests until the swap. A failed restore leaves the existing index
378
+ * serving, and after a crash the engine reopens either the old or the new one.
380
379
  *
381
380
  * @param indexName - The name that the restored index takes.
382
- * @param data - The snapshot's bytes, as one array, a stream, or an async
383
- * iterable of chunks.
381
+ * @param data - The snapshot's bytes, as an array, a stream, or async chunks.
384
382
  * @throws A `NarsilError` with `PERSISTENCE_LOAD_FAILED` when the archive is
385
383
  * malformed or a file's length differs from the manifest. The engine raises
386
384
  * `PERSISTENCE_CRC_MISMATCH` when a file's checksum differs from its
387
385
  * contents, and `ENVELOPE_VERSION_MISMATCH` when a file has a format version
388
386
  * other than the ones that this release implements. It raises
389
- * `CONFIG_INVALID` when the archive's configuration is invalid, and
387
+ * `CONFIG_INVALID` when the archive's configuration is invalid,
390
388
  * `DOC_VALIDATION_FAILED` when the data is empty or the release 0.3 file is
391
- * invalid.
389
+ * invalid, `RESTORE_MEMORY_EXCEEDED` when the restored index and the one that
390
+ * it replaces need more memory than is free, and `WORKER_TIMEOUT` when a
391
+ * worker still holds the old index 30 seconds after the engine asks for it.
392
392
  */
393
393
  restore(indexName: string, data: ByteSource): Promise<void>;
394
394
  /**
@@ -1,2 +1,2 @@
1
- export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-NOUZ6RH3.mjs';
2
- export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError, isSimdAvailable } from './browser/chunk-FHFFWLEK.mjs';
1
+ export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-HC6DMR4T.mjs';
2
+ export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError, isSimdAvailable } from './browser/chunk-HARBSUWP.mjs';
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ 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
- export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, n as ComparisonFilter, D as DocumentImportResult, o as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, p as FacetResult, q as FieldFilter, r as FilterExpression, G as GeoFilter, s as GeoPolygonFilter, t as GeoRadiusFilter, u as GroupConfig, v as GroupReducer, w as GroupResult, H as HighlightConfig, x as HighlightMatch, y as Hit, z as HybridConfig, I as IndexInfo, g as IndexStats, L as ListParams, h as ListResult, J as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, f as NarsilEventHandlers, m as NarsilEventMap, P as PartitionStatsResult, j as PreflightResult, K as PresenceFilter, O as ProcessMemoryReport, R as QueryCoverage, Q as QueryParams, e as QueryResult, T as ScoreComponents, U as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, W as SortField, X as SortSpec, Y as StringFilter, k as SuggestParams, l as SuggestResult, Z as TermMatchPolicy, V as VectorMaintenanceResult, _ as VectorQueryConfig, $ as WorkerCopyReport, i as isNarsilError } from './memory-dd3GESdc.js';
10
- import { N as NarsilConfig } from './config-BYne-yCI.js';
11
- export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-BYne-yCI.js';
12
- import { N as Narsil } from './engine-96_kLtSY.js';
13
- export { B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-96_kLtSY.js';
9
+ export { A as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, n as ComparisonFilter, D as DocumentImportResult, o as DocumentProjection, E as ErrorCode, b as ErrorCodes, F as FacetConfig, p as FacetResult, q as FieldFilter, r as FilterExpression, G as GeoFilter, s as GeoPolygonFilter, t as GeoRadiusFilter, u as GroupConfig, v as GroupReducer, w as GroupResult, H as HighlightConfig, x as HighlightMatch, y as Hit, z as HybridConfig, I as IndexInfo, g as IndexStats, L as ListParams, h as ListResult, J as ListedDocument, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, f as NarsilEventHandlers, m as NarsilEventMap, P as PartitionStatsResult, j as PreflightResult, K as PresenceFilter, O as ProcessMemoryReport, R as QueryCoverage, Q as QueryParams, e as QueryResult, T as ScoreComponents, U as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, W as SortField, X as SortSpec, Y as StringFilter, k as SuggestParams, l as SuggestResult, Z as TermMatchPolicy, V as VectorMaintenanceResult, _ as VectorQueryConfig, $ as WorkerCopyReport, i as isNarsilError } from './memory-wuXcYOD1.js';
10
+ import { N as NarsilConfig } from './config-B-RnO6dr.js';
11
+ export { A as AnalysisConfig, D as DurabilityConfig, I as IndexContext, a as IndexLifecycleConfig, b as InsertContext, M as MainCopyQueries, c as NarsilPlugin, P as PartitionContext, R as RemoveContext, S as SearchContext, d as StaleAnalysis, U as UpdateContext, W as WorkerConfig, e as WorkerContext } from './config-B-RnO6dr.js';
12
+ import { N as Narsil } from './engine-DSUfY2F0.js';
13
+ export { B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-DSUfY2F0.js';
14
14
  export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter } from './adapters-79OIa4xm.js';
15
15
 
16
16
  /**
package/dist/index.mjs CHANGED
@@ -1,32 +1,32 @@
1
- export { VERSION, createNarsil } from './chunk-A4G7JSYO.mjs';
2
- import './chunk-RVM7AODE.mjs';
3
- export { registerSynonyms } from './chunk-XLJ2S2BH.mjs';
4
- import './chunk-BJ2YKRNX.mjs';
5
- export { registerPartialWordSearch, registerPatternSearch } from './chunk-6VZ3Q73N.mjs';
6
- import './chunk-CO4MRKST.mjs';
1
+ export { VERSION, createNarsil } from './chunk-C45FUYPI.mjs';
2
+ import './chunk-R36MIGBU.mjs';
3
+ import './chunk-RDJKYKMQ.mjs';
4
+ export { registerSynonyms } from './chunk-UAUZGXJP.mjs';
5
+ export { registerPartialWordSearch, registerPatternSearch } from './chunk-CHOGQSHK.mjs';
6
+ import './chunk-WLOF6HSP.mjs';
7
7
  import './chunk-AV4IJKD2.mjs';
8
- export { getLanguage, registerLanguage } from './chunk-MKWUXWQH.mjs';
9
8
  import './chunk-Q5DC6WAB.mjs';
9
+ export { getLanguage, registerLanguage } from './chunk-ZHS44YKF.mjs';
10
10
  import './chunk-TGP5M5R7.mjs';
11
11
  import './chunk-U2BKYEC7.mjs';
12
- export { isSimdAvailable } from './chunk-Y2F66IQJ.mjs';
13
- import './chunk-ZJ4CSAB2.mjs';
14
- import './chunk-QZN3MIJ3.mjs';
15
- import './chunk-T6CNO72J.mjs';
12
+ export { isSimdAvailable } from './chunk-KOKM4PQN.mjs';
13
+ import './chunk-QY7GC2MW.mjs';
14
+ import './chunk-ES33L3HO.mjs';
15
+ import './chunk-QM3VPX4Z.mjs';
16
16
  import './chunk-WQBCBKY3.mjs';
17
- import './chunk-5ER245FI.mjs';
18
- import './chunk-CVQWQVFX.mjs';
17
+ import './chunk-SBCEHIPL.mjs';
18
+ import './chunk-4ZJWRETC.mjs';
19
19
  import './chunk-FGMGUDHX.mjs';
20
20
  import './chunk-KEHK2O6P.mjs';
21
21
  import './chunk-GES7U2PM.mjs';
22
- import './chunk-BVOJIYRV.mjs';
23
- export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-NVL4ZR3K.mjs';
22
+ import './chunk-BB7MASRQ.mjs';
23
+ export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-2GZGBOQI.mjs';
24
24
  import './chunk-X5CV2E2B.mjs';
25
25
  import './chunk-7X5JST5L.mjs';
26
- export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-ZIJ63TBT.mjs';
26
+ export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-7KC56574.mjs';
27
27
  import './chunk-R6A773WK.mjs';
28
28
  import './chunk-YTJCGKM4.mjs';
29
29
  import './chunk-R6PR4WYZ.mjs';
30
- import './chunk-R7OSDAFK.mjs';
30
+ import './chunk-K6A4FCVR.mjs';
31
31
  import './chunk-L5ORED7V.mjs';
32
- export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-TPJU7NDJ.mjs';
32
+ export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-SYWGORQB.mjs';
@@ -46,6 +46,7 @@ declare const ErrorCodes: {
46
46
  readonly ENVELOPE_VERSION_MISMATCH: "ENVELOPE_VERSION_MISMATCH";
47
47
  readonly ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC";
48
48
  readonly PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED";
49
+ readonly RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED";
49
50
  readonly EMBEDDING_FAILED: "EMBEDDING_FAILED";
50
51
  readonly EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH";
51
52
  readonly EMBEDDING_NO_SOURCE: "EMBEDDING_NO_SOURCE";
@@ -889,6 +890,101 @@ type FilterExpression = {
889
890
  not?: FilterExpression;
890
891
  };
891
892
 
893
+ /**
894
+ * Vector-search inputs passed under `QueryParams.vector`.
895
+ *
896
+ * Supply either a raw `value` array or a `text` string for auto-embedding;
897
+ * passing both throws `EMBEDDING_CONFIG_INVALID`. Result count is governed
898
+ * by the outer query's `limit`, not by any field on this object.
899
+ *
900
+ * @public
901
+ */
902
+ interface VectorQueryConfig {
903
+ /**
904
+ * Name of the schema field that holds the vector to compare against.
905
+ * Must reference a field declared as `vector[N]` in the index schema.
906
+ */
907
+ field: string;
908
+ /**
909
+ * Raw query vector, given as a number array or a `Float32Array`. Length
910
+ * must match the indexed field's dimension or the search rejects the
911
+ * request with `VECTOR_DIMENSION_MISMATCH`.
912
+ */
913
+ value?: number[] | Float32Array;
914
+ /**
915
+ * Text to embed at query time using the index or instance embedding
916
+ * adapter. Mutually exclusive with `value`; requires a configured adapter.
917
+ */
918
+ text?: string;
919
+ /**
920
+ * Score floor applied during ranking. Hits scoring below this value
921
+ * are dropped before `limit` is enforced, so the returned hit count
922
+ * can be smaller than `limit` even when more documents exist. The
923
+ * floor is interpreted in score space for every metric; for
924
+ * `euclidean`, distance is mapped to a similarity score of
925
+ * `1 / (1 + distance)` first. Defaults to no floor.
926
+ */
927
+ similarity?: number;
928
+ /**
929
+ * Similarity metric used for ranking. Defaults to `cosine`. Choose
930
+ * `dotProduct` for raw inner-product scoring on already-normalised
931
+ * vectors and `euclidean` for distance-based ordering.
932
+ */
933
+ metric?: 'cosine' | 'dotProduct' | 'euclidean';
934
+ /**
935
+ * The engine keeps this many candidates as it walks the HNSW graph, so a
936
+ * higher value can find more of the true neighbours, although each query
937
+ * takes longer. The engine applies it only once the field holds a graph.
938
+ * The engine fetches k hits, where k is one more than the number of hits up
939
+ * to the end of the page, so k is `limit` plus 1 on a first page. When a
940
+ * query leaves `efSearch` unset, the engine keeps the larger of 50 and k
941
+ * plus a margin, where the margin is 50 below 768 dimensions, 75 from 768
942
+ * to 1,023 dimensions, and 0 at 1,024 dimensions and above. Under a
943
+ * filter, the engine counts only the candidates that pass the filter.
944
+ */
945
+ efSearch?: number;
946
+ /**
947
+ * The engine re-scores this many times k candidates in a quantized field
948
+ * against the full-precision vectors before it returns the best `limit`,
949
+ * where k is one more than the number of hits up to the end of the page, so
950
+ * k is `limit` plus 1 on a first page. For a value below 1, or for a value
951
+ * that is not a finite number, the engine throws a `NarsilError` with code
952
+ * `CONFIG_INVALID`. The engine ignores it on a field whose quantization is
953
+ * `none`. When a query leaves it unset, the engine sets the number of
954
+ * candidates that it re-scores from k and from the field's dimension. It
955
+ * rounds that number up, and it re-scores at least 3k candidates under
956
+ * `osq1` and `osq2`, and at least k under `osq4` and `osq8`. Below 768
957
+ * dimensions, it re-scores 3.23k + 55.9√k under `osq1` and 2.6k + 17√k under
958
+ * `osq2`. From 768 to 1,023 dimensions, it re-scores 2.2k + 27√k under
959
+ * `osq1` and k + 16√k under `osq2`. At 1,024 dimensions and above, it
960
+ * re-scores 3k under both. Under `osq4`, it re-scores 5k below 1,024
961
+ * dimensions and 2k from 1,024 dimensions, while under `osq8` it re-scores
962
+ * 2k at every dimension. Under a filter, the engine counts only the
963
+ * candidates that pass the filter. On vectors spread evenly across every
964
+ * dimension, a one-bit or two-bit code can find fewer than 95% of the true
965
+ * nearest neighbours at these defaults, so raise `oversample` on a query that
966
+ * needs more of them.
967
+ */
968
+ oversample?: number;
969
+ }
970
+ /**
971
+ * How a hybrid query merges its keyword ranking with its vector ranking.
972
+ *
973
+ * `rrf` combines the two by rank alone, which needs no tuning and handles
974
+ * scores that live on different scales. `linear` blends the scores directly,
975
+ * which gives you control once you know what each side's scores look like.
976
+ *
977
+ * @public
978
+ */
979
+ interface HybridConfig {
980
+ /** The engine merges the rankings this way, and by rank fusion by default. It throws `CONFIG_INVALID` for any other value. */
981
+ strategy?: 'rrf' | 'linear';
982
+ /** The engine uses this rank-fusion constant under `rrf` alone, where a larger value reduces the lead of the top ranks. Set a whole number of at least 1, or leave it out for 60. The engine throws `CONFIG_INVALID` for any other value. */
983
+ k?: number;
984
+ /** The engine uses this weight of the vector score, from 0 to 1, under `linear` alone, and 0.5 where you leave it out. It throws `CONFIG_INVALID` for a value outside that range. */
985
+ alpha?: number;
986
+ }
987
+
892
988
  /**
893
989
  * Everything {@link Narsil.suggest} accepts.
894
990
  *
@@ -1169,82 +1265,6 @@ type DocumentProjection = boolean | {
1169
1265
  /** Names the fields to drop, so every other field is kept. */
1170
1266
  exclude?: string[];
1171
1267
  };
1172
- /**
1173
- * Vector-search inputs passed under `QueryParams.vector`.
1174
- *
1175
- * Supply either a raw `value` array or a `text` string for auto-embedding;
1176
- * passing both throws `EMBEDDING_CONFIG_INVALID`. Result count is governed
1177
- * by the outer query's `limit`, not by any field on this object.
1178
- *
1179
- * @public
1180
- */
1181
- interface VectorQueryConfig {
1182
- /**
1183
- * Name of the schema field that holds the vector to compare against.
1184
- * Must reference a field declared as `vector[N]` in the index schema.
1185
- */
1186
- field: string;
1187
- /**
1188
- * Raw query vector, given as a number array or a `Float32Array`. Length
1189
- * must match the indexed field's dimension or the search rejects the
1190
- * request with `VECTOR_DIMENSION_MISMATCH`.
1191
- */
1192
- value?: number[] | Float32Array;
1193
- /**
1194
- * Text to embed at query time using the index or instance embedding
1195
- * adapter. Mutually exclusive with `value`; requires a configured adapter.
1196
- */
1197
- text?: string;
1198
- /**
1199
- * Score floor applied during ranking. Hits scoring below this value
1200
- * are dropped before `limit` is enforced, so the returned hit count
1201
- * can be smaller than `limit` even when more documents exist. The
1202
- * floor is interpreted in score space for every metric; for
1203
- * `euclidean`, distance is mapped to a similarity score of
1204
- * `1 / (1 + distance)` first. Defaults to no floor.
1205
- */
1206
- similarity?: number;
1207
- /**
1208
- * Similarity metric used for ranking. Defaults to `cosine`. Choose
1209
- * `dotProduct` for raw inner-product scoring on already-normalised
1210
- * vectors and `euclidean` for distance-based ordering.
1211
- */
1212
- metric?: 'cosine' | 'dotProduct' | 'euclidean';
1213
- /**
1214
- * HNSW exploration factor for approximate search. Higher values raise
1215
- * recall at the cost of latency. Ignored while the field is still
1216
- * served by the brute-force backend. Defaults to the engine's built-in
1217
- * value when omitted.
1218
- */
1219
- efSearch?: number;
1220
- /**
1221
- * How many times `limit` a quantized field re-scores against its
1222
- * full-precision vectors before it returns the best `limit`. A value below
1223
- * 1 or one that is not a finite number fails with `CONFIG_INVALID`. The
1224
- * engine ignores this on a field whose quantization is `none`. When a query
1225
- * omits it, the engine takes 3 for `osq1` and `osq2`, 2 for `osq8`, and 2
1226
- * for `osq4` at 1,024 dimensions and above, but 5 for `osq4` below 1,024,
1227
- * where a four-bit code ranks the true neighbours less reliably.
1228
- */
1229
- oversample?: number;
1230
- }
1231
- /**
1232
- * How a hybrid query merges its keyword ranking with its vector ranking.
1233
- *
1234
- * `rrf` combines the two by rank alone, which needs no tuning and handles
1235
- * scores that live on different scales. `linear` blends the scores directly,
1236
- * which gives you control once you know what each side's scores look like.
1237
- *
1238
- * @public
1239
- */
1240
- interface HybridConfig {
1241
- /** The engine merges the rankings this way, and by rank fusion by default. It throws `CONFIG_INVALID` for any other value. */
1242
- strategy?: 'rrf' | 'linear';
1243
- /** The engine uses this rank-fusion constant under `rrf` alone, where a larger value reduces the lead of the top ranks. Set a whole number of at least 1, or leave it out for 60. The engine throws `CONFIG_INVALID` for any other value. */
1244
- k?: number;
1245
- /** The engine uses this weight of the vector score, from 0 to 1, under `linear` alone, and 0.5 where you leave it out. It throws `CONFIG_INVALID` for a value outside that range. */
1246
- alpha?: number;
1247
- }
1248
1268
  /**
1249
1269
  * Fields a query counts values for, keyed by field name.
1250
1270
  *
@@ -1,23 +1,23 @@
1
- import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, threadsHoldCurrentLayout, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, WORKER_COPY_MIN_VECTORS, allLiveDocIds, recalibrateFromStore, signatureOf, adoptGraph, calibrateQuantizer, fieldHandlesOf, BUILD_CHUNK_SIZE, yieldToEventLoop, DISK_ADOPTION_YIELD_INTERVAL } from './chunk-MXS5HWIH.mjs';
2
- import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-YCJLVNWR.mjs';
3
- import { createVectorStore } from './chunk-UKSUENHK.mjs';
4
- export { openSharedVectorField } from './chunk-UKSUENHK.mjs';
5
- import { osqBitsOf, createOsqQuantizer, ordinalFilterValues, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, magnitude, nativeStoreScratchBytes, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, releaseLocksHeldBy } from './chunk-ULRPNYAG.mjs';
6
- export { releaseLocksHeldBy } from './chunk-ULRPNYAG.mjs';
1
+ import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, threadsHoldCurrentLayout, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, WORKER_COPY_MIN_VECTORS, allLiveDocIds, recalibrateFromStore, signatureOf, adoptGraph, calibrateQuantizer, fieldHandlesOf, BUILD_CHUNK_SIZE, yieldToEventLoop, DISK_ADOPTION_YIELD_INTERVAL } from './chunk-7VALMHZF.mjs';
2
+ import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-F52QGNZ2.mjs';
3
+ import { createVectorStore } from './chunk-AF2CIKYC.mjs';
4
+ export { openSharedVectorField } from './chunk-AF2CIKYC.mjs';
5
+ import { osqBitsOf, createOsqQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, ordinalFilterValues, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, magnitude, nativeStoreScratchBytes, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, releaseLocksHeldBy } from './chunk-Z3MOCHG5.mjs';
6
+ export { releaseLocksHeldBy } from './chunk-Z3MOCHG5.mjs';
7
7
  import './chunk-37CD3OKS.mjs';
8
8
  import { noteFallback } from './chunk-DJHHF2L5.mjs';
9
9
  import { spawnNodeWorker } from './chunk-C7SLA6CM.mjs';
10
- import { resolveWorkerCount, resolveWorkerEntry, workerResourceLimits } from './chunk-RVM7AODE.mjs';
10
+ import { resolveWorkerCount, resolveWorkerEntry, workerResourceLimits } from './chunk-RDJKYKMQ.mjs';
11
11
  import { detectRuntime } from './chunk-AV4IJKD2.mjs';
12
12
  import './chunk-Q5DC6WAB.mjs';
13
- import { DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_INSERT_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS } from './chunk-Y2F66IQJ.mjs';
14
- import './chunk-ZJ4CSAB2.mjs';
15
- import './chunk-QZN3MIJ3.mjs';
13
+ import './chunk-KOKM4PQN.mjs';
14
+ import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_INSERT_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS } from './chunk-QY7GC2MW.mjs';
15
+ import './chunk-ES33L3HO.mjs';
16
16
  import './chunk-FGMGUDHX.mjs';
17
17
  import './chunk-KEHK2O6P.mjs';
18
18
  import './chunk-R6A773WK.mjs';
19
19
  import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
20
- import { NarsilError, ErrorCodes } from './chunk-TPJU7NDJ.mjs';
20
+ import { NarsilError, ErrorCodes } from './chunk-SYWGORQB.mjs';
21
21
 
22
22
  // src/core/heap.ts
23
23
  function createMaxHeap(compare) {
@@ -220,14 +220,21 @@ function scoreCandidates(store, candidates, query, k, metric, minSimilarity) {
220
220
  function createSharedVectorSearcher(options) {
221
221
  const { fieldName, view, holdsDocument } = options;
222
222
  const flags = readStoreFlags(view.store);
223
- function filterForDocIds(allowed) {
224
- const filter = createOrdinalFilter(view.store.slots);
225
- for (const docId of allowed) {
226
- const ordinal = view.ordinalOf(docId);
227
- if (ordinal === void 0 || flags.isRemoved(ordinal)) continue;
228
- addToOrdinalFilter(filter, ordinal);
229
- }
230
- return filter;
223
+ function ordinalLayoutGeneration() {
224
+ return Atomics.load(view.store.handles.header, STORE_ORDINAL_LAYOUT_GENERATION);
225
+ }
226
+ function ordinalSpace() {
227
+ const store = view.store;
228
+ const layoutGeneration = ordinalLayoutGeneration();
229
+ return {
230
+ fieldName,
231
+ layoutGeneration,
232
+ slots: store.slots,
233
+ header: store.handles.header,
234
+ ordinalOf: (docId) => view.ordinalOf(docId),
235
+ holdsCurrentOrdinal: (ordinal) => store.holdsOrdinal(ordinal) && store.partitionAt(ordinal) !== void 0,
236
+ isRemoved: (ordinal) => flags.isRemoved(ordinal)
237
+ };
231
238
  }
232
239
  function filterForPartitions(allowed) {
233
240
  const slots = view.store.slots;
@@ -241,7 +248,9 @@ function createSharedVectorSearcher(options) {
241
248
  return filter;
242
249
  }
243
250
  function filterFor(searchOptions) {
244
- if (searchOptions.filterDocIds !== void 0) return filterForDocIds(searchOptions.filterDocIds);
251
+ if (searchOptions.filterSubsets !== void 0) {
252
+ return ordinalFilterForSubsets(searchOptions.filterSubsets, ordinalSpace());
253
+ }
245
254
  if (searchOptions.filterPartitions !== void 0) return filterForPartitions(searchOptions.filterPartitions);
246
255
  return void 0;
247
256
  }
@@ -257,6 +266,11 @@ function createSharedVectorSearcher(options) {
257
266
  }
258
267
  return candidates;
259
268
  }
269
+ function answerOf(outcome) {
270
+ const results = outcome.results.filter((result) => holdsDocument(result.docId));
271
+ const holdsEveryHit = outcome.resolvedEveryHit && results.length === outcome.results.length;
272
+ return { results, matched: outcome.matched, matchedExact: outcome.matchedExact && holdsEveryHit };
273
+ }
260
274
  function scanned(scan) {
261
275
  return { results: scan.results, matched: scan.matched, matchedExact: true, resolvedEveryHit: true };
262
276
  }
@@ -315,21 +329,25 @@ function createSharedVectorSearcher(options) {
315
329
  { expected: view.handles.dimension, received: query.length }
316
330
  );
317
331
  }
318
- const outcome = search2(query, k, searchOptions, filterFor(searchOptions));
319
- if (view.graphRetired) {
320
- throw new NarsilError(
321
- ErrorCodes.INDEX_NOT_FOUND,
322
- `The main thread replaced the graph of vector field "${fieldName}" while this thread searched it`,
323
- { fieldName }
324
- );
332
+ for (let attempt = 1; ; attempt++) {
333
+ const layoutGeneration = ordinalLayoutGeneration();
334
+ const outcome = search2(query, k, searchOptions, filterFor(searchOptions));
335
+ if (view.graphRetired) {
336
+ throw new NarsilError(
337
+ ErrorCodes.WORKER_BUSY,
338
+ `The main thread replaced the graph of vector field "${fieldName}" while this thread searched it`,
339
+ { fieldName }
340
+ );
341
+ }
342
+ if (ordinalLayoutGeneration() === layoutGeneration) return Promise.resolve(answerOf(outcome));
343
+ if (attempt >= MAX_RENUMBERED_SEARCH_ATTEMPTS) {
344
+ throw new NarsilError(
345
+ ErrorCodes.WORKER_BUSY,
346
+ `The main thread renumbered the vectors of field "${fieldName}" during each of ${attempt} searches on this thread`,
347
+ { fieldName, attempts: attempt }
348
+ );
349
+ }
325
350
  }
326
- const results = outcome.results.filter((result) => holdsDocument(result.docId));
327
- const holdsEveryHit = outcome.resolvedEveryHit && results.length === outcome.results.length;
328
- return Promise.resolve({
329
- results,
330
- matched: outcome.matched,
331
- matchedExact: outcome.matchedExact && holdsEveryHit
332
- });
333
351
  }
334
352
  };
335
353
  }
@@ -659,6 +677,11 @@ async function withdrawWorkerCopies(state) {
659
677
  await Promise.all([...handles].map((handle) => dropHandle(state, handle)));
660
678
  if (state.workerCopies.host === void 0 && state.sharedHandles.size === 0) state.workerCopyPool = null;
661
679
  }
680
+ async function holdWorkerCopies(state) {
681
+ state.workerCopiesHeld = true;
682
+ await state.sharing;
683
+ await withdrawWorkerCopies(state);
684
+ }
662
685
  function noteWrite(state) {
663
686
  state.revision += 1;
664
687
  if (state.workerCopyMode === "clone") invalidateWorkerCopies(state);
@@ -757,7 +780,7 @@ async function loadOnPool(state, graph, searchable) {
757
780
  }
758
781
  function shareGraph(state, graph, searchable) {
759
782
  const run = state.sharing.then(async () => {
760
- if (!state.workerCopies.enabled || state.disposed) return null;
783
+ if (!state.workerCopies.enabled || state.disposed || state.workerCopiesHeld) return null;
761
784
  const existing = state.sharedHandles.get(graph);
762
785
  const layoutUnchanged = threadsHoldCurrentLayout(state);
763
786
  if (existing !== void 0 && layoutUnchanged && (existing.searchable || !searchable)) return existing.handle;
@@ -772,7 +795,7 @@ function shareGraph(state, graph, searchable) {
772
795
  }
773
796
  function resendSharedHandles(state) {
774
797
  const run = state.sharing.then(async () => {
775
- if (!state.workerCopies.enabled || state.disposed) return;
798
+ if (!state.workerCopies.enabled || state.disposed || state.workerCopiesHeld) return;
776
799
  const host = state.workerCopies.host;
777
800
  for (const [graph, shared] of [...state.sharedHandles]) {
778
801
  if (host !== void 0) await loadOnHost(state, host, graph, shared.searchable);
@@ -786,7 +809,7 @@ function resendSharedHandles(state) {
786
809
  return run;
787
810
  }
788
811
  function scheduleWorkerCopyLoad(state) {
789
- if (!state.workerCopies.enabled) return;
812
+ if (!state.workerCopies.enabled || state.workerCopiesHeld) return;
790
813
  if (state.disposed || state.workerCopyLoading || state.building) return;
791
814
  const graph = state.hnsw;
792
815
  const host = state.workerCopies.host;
@@ -1634,6 +1657,7 @@ function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_W
1634
1657
  workerCopyRevision: -1,
1635
1658
  workerCopyMode: null,
1636
1659
  workerCopyLoading: false,
1660
+ workerCopiesHeld: false,
1637
1661
  sharedHandles: /* @__PURE__ */ new Map(),
1638
1662
  sharedLayoutRevision: 0,
1639
1663
  sharing: Promise.resolve(),
@@ -1731,7 +1755,7 @@ function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_W
1731
1755
  releaseHeldMemory();
1732
1756
  }
1733
1757
  async function searchParallel(query, k, options) {
1734
- const confined = options.filterDocIds !== void 0 || options.filterPartitions !== void 0;
1758
+ const confined = options.filterSubsets !== void 0 || options.filterPartitions !== void 0;
1735
1759
  let filter = filterForOptions(state, options);
1736
1760
  if (filter !== void 0) {
1737
1761
  if (state.hnsw) {
@@ -1812,6 +1836,16 @@ function createVectorIndex(fieldName, dimension, config, workerCopies = VECTOR_W
1812
1836
  releaseVectorFiles: async () => {
1813
1837
  await withdrawWorkerCopies(state);
1814
1838
  state.store.closeFiles();
1839
+ },
1840
+ relocateVectorFiles: (rewrite) => {
1841
+ state.store.relocateVectorFiles(rewrite);
1842
+ for (const [docId, location] of state.pendingLocations) {
1843
+ state.pendingLocations.set(docId, { ...location, path: rewrite(location.path) });
1844
+ }
1845
+ },
1846
+ holdWorkerCopies: () => holdWorkerCopies(state),
1847
+ resumeWorkerCopies: () => {
1848
+ state.workerCopiesHeld = false;
1815
1849
  }
1816
1850
  };
1817
1851
  }
@@ -1,14 +1,14 @@
1
- import { partialWordSearchModule } from './chunk-5ER245FI.mjs';
2
- import './chunk-CVQWQVFX.mjs';
1
+ import { partialWordSearchModule } from './chunk-SBCEHIPL.mjs';
2
+ import './chunk-4ZJWRETC.mjs';
3
3
  import './chunk-FGMGUDHX.mjs';
4
4
  import './chunk-KEHK2O6P.mjs';
5
5
  import './chunk-GES7U2PM.mjs';
6
- import './chunk-BVOJIYRV.mjs';
7
- import './chunk-ZIJ63TBT.mjs';
6
+ import './chunk-BB7MASRQ.mjs';
7
+ import './chunk-7KC56574.mjs';
8
8
  import './chunk-R6A773WK.mjs';
9
9
  import './chunk-YTJCGKM4.mjs';
10
10
  import './chunk-L5ORED7V.mjs';
11
- import './chunk-TPJU7NDJ.mjs';
11
+ import './chunk-SYWGORQB.mjs';
12
12
 
13
13
  // src/partial-words/index.ts
14
14
  var partialWordSearch = partialWordSearchModule;
package/dist/pattern.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { patternSearchModule } from './chunk-T6CNO72J.mjs';
1
+ import { patternSearchModule } from './chunk-QM3VPX4Z.mjs';
2
2
  import './chunk-WQBCBKY3.mjs';
3
3
  import './chunk-GES7U2PM.mjs';
4
- import './chunk-BVOJIYRV.mjs';
4
+ import './chunk-BB7MASRQ.mjs';
5
5
  import './chunk-YTJCGKM4.mjs';
6
6
  import './chunk-L5ORED7V.mjs';
7
- import './chunk-TPJU7NDJ.mjs';
7
+ import './chunk-SYWGORQB.mjs';
8
8
 
9
9
  // src/pattern/index.ts
10
10
  var patternSearch = patternSearchModule;
@@ -1,41 +1,41 @@
1
- import { createDurableDirectory } from '../../chunk-67Z2V6TC.mjs';
1
+ import { createDurableDirectory } from '../../chunk-EWBXO45L.mjs';
2
2
  import '../../chunk-C7SLA6CM.mjs';
3
- import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-3TTYK5A7.mjs';
4
- import '../../chunk-3RDS4UHC.mjs';
3
+ import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-EX62BQT6.mjs';
4
+ import '../../chunk-EZD4MWOU.mjs';
5
5
  import '../../chunk-OHP7QR33.mjs';
6
6
  import '../../chunk-P36MUFEJ.mjs';
7
- import '../../chunk-A4G7JSYO.mjs';
8
- import '../../chunk-RVM7AODE.mjs';
9
- import '../../chunk-XLJ2S2BH.mjs';
10
- import '../../chunk-BJ2YKRNX.mjs';
11
- import '../../chunk-6VZ3Q73N.mjs';
12
- import '../../chunk-CO4MRKST.mjs';
7
+ import '../../chunk-C45FUYPI.mjs';
8
+ import '../../chunk-R36MIGBU.mjs';
9
+ import '../../chunk-RDJKYKMQ.mjs';
10
+ import '../../chunk-UAUZGXJP.mjs';
11
+ import '../../chunk-CHOGQSHK.mjs';
12
+ import '../../chunk-WLOF6HSP.mjs';
13
13
  import '../../chunk-AV4IJKD2.mjs';
14
- import '../../chunk-MKWUXWQH.mjs';
15
14
  import '../../chunk-Q5DC6WAB.mjs';
15
+ import '../../chunk-ZHS44YKF.mjs';
16
16
  import '../../chunk-TGP5M5R7.mjs';
17
17
  import '../../chunk-U2BKYEC7.mjs';
18
- import '../../chunk-Y2F66IQJ.mjs';
19
- import '../../chunk-ZJ4CSAB2.mjs';
20
- import '../../chunk-QZN3MIJ3.mjs';
21
- import '../../chunk-T6CNO72J.mjs';
18
+ import '../../chunk-KOKM4PQN.mjs';
19
+ import '../../chunk-QY7GC2MW.mjs';
20
+ import '../../chunk-ES33L3HO.mjs';
21
+ import '../../chunk-QM3VPX4Z.mjs';
22
22
  import '../../chunk-WQBCBKY3.mjs';
23
- import '../../chunk-5ER245FI.mjs';
24
- import '../../chunk-CVQWQVFX.mjs';
23
+ import '../../chunk-SBCEHIPL.mjs';
24
+ import '../../chunk-4ZJWRETC.mjs';
25
25
  import '../../chunk-FGMGUDHX.mjs';
26
26
  import '../../chunk-KEHK2O6P.mjs';
27
27
  import '../../chunk-GES7U2PM.mjs';
28
- import '../../chunk-BVOJIYRV.mjs';
29
- import '../../chunk-NVL4ZR3K.mjs';
28
+ import '../../chunk-BB7MASRQ.mjs';
29
+ import '../../chunk-2GZGBOQI.mjs';
30
30
  import '../../chunk-X5CV2E2B.mjs';
31
31
  import '../../chunk-7X5JST5L.mjs';
32
- import '../../chunk-ZIJ63TBT.mjs';
32
+ import '../../chunk-7KC56574.mjs';
33
33
  import '../../chunk-R6A773WK.mjs';
34
34
  import '../../chunk-YTJCGKM4.mjs';
35
35
  import '../../chunk-R6PR4WYZ.mjs';
36
- import '../../chunk-R7OSDAFK.mjs';
36
+ import '../../chunk-K6A4FCVR.mjs';
37
37
  import '../../chunk-L5ORED7V.mjs';
38
- import '../../chunk-TPJU7NDJ.mjs';
38
+ import '../../chunk-SYWGORQB.mjs';
39
39
 
40
40
  // src/persistence/durability/rebuild.ts
41
41
  async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = []) {