@delali/narsil 0.2.4-next.59 → 0.3.1-next.101

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 (165) hide show
  1. package/README.md +9 -8
  2. package/dist/adapters/filesystem.d.ts +1 -1
  3. package/dist/adapters/filesystem.mjs +1 -1
  4. package/dist/adapters/indexeddb.d.ts +1 -1
  5. package/dist/adapters/indexeddb.mjs +1 -1
  6. package/dist/adapters/memory.d.ts +1 -1
  7. package/dist/{adapters-79OIa4xm.d.ts → adapters-BQFQ4PRz.d.ts} +27 -1
  8. package/dist/browser/chunk-BDOSMEEP.mjs +493 -0
  9. package/dist/browser/chunk-EJDUFWSO.mjs +602 -0
  10. package/dist/browser/chunk-HOZW3PKP.mjs +9 -0
  11. package/dist/browser/chunk-JOVZ6HMT.mjs +4358 -0
  12. package/dist/browser/chunk-JPTQZWJQ.mjs +10 -0
  13. package/dist/browser/chunk-KPJMDPHG.mjs +24558 -0
  14. package/dist/browser/chunk-PGIM3HIM.mjs +2743 -0
  15. package/dist/browser/chunk-RHG4O77A.mjs +206 -0
  16. package/dist/browser/chunk-RIJSLY2I.mjs +360 -0
  17. package/dist/browser/durability-wiring-SRUYT3VV.mjs +3875 -0
  18. package/dist/browser/module-CBB2ETYP.mjs +3111 -0
  19. package/dist/browser/release-76MXRPGV.mjs +33 -0
  20. package/dist/browser/replace-RURXTGVG.mjs +57 -0
  21. package/dist/browser/restore-queue-EEZQO6RF.mjs +35 -0
  22. package/dist/browser/runtime-7ZAHCHWR.mjs +557 -0
  23. package/dist/browser/snapshot-OAAA5UJ7.mjs +1210 -0
  24. package/dist/browser/write-7D6VIK6O.mjs +208 -0
  25. package/dist/{capabilities-DSsOGz6F.d.ts → capabilities-DiGlB6Sr.d.ts} +68 -7
  26. package/dist/chunk-2RIRGOUL.mjs +113 -0
  27. package/dist/chunk-37CD3OKS.mjs +87 -0
  28. package/dist/chunk-44W3CBNG.mjs +7 -0
  29. package/dist/chunk-46D6JQIG.mjs +426 -0
  30. package/dist/{chunk-VMRR3DQU.mjs → chunk-5JNA5SKS.mjs} +546 -35
  31. package/dist/chunk-747OHOUA.mjs +11 -0
  32. package/dist/chunk-75XIEF6H.mjs +126 -0
  33. package/dist/chunk-7X5JST5L.mjs +114 -0
  34. package/dist/chunk-BOFBLJFZ.mjs +209 -0
  35. package/dist/{chunk-USKFU7J5.mjs → chunk-BWJVNZPR.mjs} +8 -1
  36. package/dist/chunk-C7SLA6CM.mjs +19 -0
  37. package/dist/{chunk-POWOTUKJ.mjs → chunk-CQUMNIIG.mjs} +3 -6
  38. package/dist/chunk-CVXLLEQ3.mjs +1011 -0
  39. package/dist/chunk-DJHHF2L5.mjs +17 -0
  40. package/dist/chunk-E74YLAIG.mjs +24 -0
  41. package/dist/{chunk-UXNWQZST.mjs → chunk-EMRMGYRE.mjs} +236 -18
  42. package/dist/chunk-EWZLIYHV.mjs +57 -0
  43. package/dist/chunk-GBEEG5AN.mjs +35 -0
  44. package/dist/chunk-GES7U2PM.mjs +68 -0
  45. package/dist/chunk-HJSN7UYG.mjs +10 -0
  46. package/dist/chunk-HLPRHOSO.mjs +17 -0
  47. package/dist/chunk-HMFNFVP7.mjs +14 -0
  48. package/dist/chunk-J5QP52HA.mjs +1751 -0
  49. package/dist/{chunk-YNVIUGF5.mjs → chunk-JZVARCRZ.mjs} +3 -28
  50. package/dist/chunk-KOKM4PQN.mjs +52 -0
  51. package/dist/{chunk-B2TFROFX.mjs → chunk-KWTW6VTG.mjs} +465 -250
  52. package/dist/chunk-KZ3NX2P7.mjs +21 -0
  53. package/dist/chunk-L5ORED7V.mjs +25 -0
  54. package/dist/{chunk-THYRHHO2.mjs → chunk-LGAMKHA2.mjs} +2009 -2351
  55. package/dist/chunk-LKOB5COA.mjs +117 -0
  56. package/dist/chunk-LPQOEU5M.mjs +96 -0
  57. package/dist/{chunk-3LHGNRYE.mjs → chunk-LXWDQLTW.mjs} +7 -2
  58. package/dist/{chunk-L6TNPLAR.mjs → chunk-OEYI3KRB.mjs} +270 -108
  59. package/dist/chunk-OM362BRO.mjs +948 -0
  60. package/dist/chunk-OZDFA4WC.mjs +67 -0
  61. package/dist/chunk-P36MUFEJ.mjs +10 -0
  62. package/dist/chunk-PC2G76VW.mjs +2540 -0
  63. package/dist/{chunk-GCM3JFVA.mjs → chunk-PNEYIHA4.mjs} +11 -2
  64. package/dist/chunk-PNFKUCG3.mjs +1130 -0
  65. package/dist/chunk-Q6XWVUZX.mjs +44 -0
  66. package/dist/chunk-R27EMH5M.mjs +617 -0
  67. package/dist/{chunk-YMZCMH5M.mjs → chunk-R6A773WK.mjs} +19 -24
  68. package/dist/chunk-RF7PLG43.mjs +106 -0
  69. package/dist/chunk-RFBLQLLZ.mjs +16 -0
  70. package/dist/{chunk-Y3L5MDRV.mjs → chunk-RFVUDM5E.mjs} +17 -2
  71. package/dist/chunk-S7FL6UAH.mjs +521 -0
  72. package/dist/chunk-S7GNDRPS.mjs +651 -0
  73. package/dist/chunk-SP3NM3ZG.mjs +3537 -0
  74. package/dist/chunk-U476IXKQ.mjs +10 -0
  75. package/dist/chunk-UA3AUGNV.mjs +462 -0
  76. package/dist/chunk-UTG5YNXV.mjs +507 -0
  77. package/dist/chunk-VI4R6W25.mjs +8484 -0
  78. package/dist/chunk-WQBCBKY3.mjs +8 -0
  79. package/dist/{chunk-24RXHMEL.mjs → chunk-WVCOCKBU.mjs} +3794 -7570
  80. package/dist/chunk-X5CV2E2B.mjs +1 -0
  81. package/dist/chunk-XADZPPZI.mjs +614 -0
  82. package/dist/chunk-YEEQHT4V.mjs +212 -0
  83. package/dist/chunk-YTJCGKM4.mjs +56 -0
  84. package/dist/chunk-YYQIODMF.mjs +275 -0
  85. package/dist/chunk-ZI34TVOA.mjs +144 -0
  86. package/dist/{chunk-OOSIDHA3.mjs → chunk-ZKWYWW4Y.mjs} +1 -1
  87. package/dist/chunk-ZM7KU4YW.mjs +35 -0
  88. package/dist/{client-BQK6Tf6A.d.ts → client-BOStAkc5.d.ts} +160 -37
  89. package/dist/client.d.ts +11 -10
  90. package/dist/client.mjs +209 -45
  91. package/dist/{config-DmXULPa-.d.ts → config-Cjvzbs_j.d.ts} +51 -3
  92. package/dist/config-DffQlmRq.d.ts +421 -0
  93. package/dist/direct-executor-ZD64PPEZ.mjs +24 -0
  94. package/dist/distribution/coordinator/etcd.d.ts +79 -18
  95. package/dist/distribution/coordinator/etcd.mjs +553 -109
  96. package/dist/distribution/coordinator/in-memory.d.ts +4 -3
  97. package/dist/distribution/coordinator/in-memory.mjs +22 -3
  98. package/dist/distribution/transport/grpc.d.ts +2 -2
  99. package/dist/distribution/transport/grpc.mjs +79 -14
  100. package/dist/distribution/transport/in-memory.d.ts +2 -2
  101. package/dist/distribution/transport/in-memory.mjs +12 -7
  102. package/dist/distribution/transport/tcp.d.ts +2 -2
  103. package/dist/distribution/transport/tcp.mjs +50 -28
  104. package/dist/distribution.d.ts +144 -23
  105. package/dist/distribution.mjs +14479 -8173
  106. package/dist/durability-wiring-FEUBR5BT.mjs +3330 -0
  107. package/dist/embeddings/openai.d.ts +2 -2
  108. package/dist/embeddings/openai.mjs +22 -133
  109. package/dist/{engine-CIOyFozK.d.ts → engine-rC0vjjY-.d.ts} +165 -141
  110. package/dist/{memory-yFaVn2xZ.d.ts → events-DqOIg5xa.d.ts} +645 -136
  111. package/dist/{types-DAK7mnUZ.d.ts → index-Bkdt8nDw.d.ts} +182 -45
  112. package/dist/index.browser.mjs +4 -32180
  113. package/dist/index.d.ts +91 -20
  114. package/dist/index.mjs +33 -16
  115. package/dist/invalidation/broadcast-channel.d.ts +1 -1
  116. package/dist/invalidation/filesystem.d.ts +1 -1
  117. package/dist/invalidation/filesystem.mjs +2 -1
  118. package/dist/invalidation/noop.d.ts +1 -1
  119. package/dist/module-3S65MVCM.mjs +2151 -0
  120. package/dist/partial-words-DTIHO8G4.d.ts +19 -0
  121. package/dist/partial-words.d.ts +22 -0
  122. package/dist/partial-words.mjs +17 -0
  123. package/dist/pattern-Cledccbl.d.ts +18 -0
  124. package/dist/pattern.d.ts +22 -0
  125. package/dist/pattern.mjs +12 -0
  126. package/dist/persistence/durability/checkpoint-worker.d.ts +119 -72
  127. package/dist/persistence/durability/checkpoint-worker.mjs +51 -18
  128. package/dist/react.d.ts +279 -183
  129. package/dist/react.mjs +201 -48
  130. package/dist/release-BH3DKW3T.mjs +33 -0
  131. package/dist/replace-CEO5KJJ3.mjs +57 -0
  132. package/dist/rerank-K7C4WZFG.mjs +60 -0
  133. package/dist/rerankers/http.d.ts +50 -0
  134. package/dist/rerankers/http.mjs +104 -0
  135. package/dist/restore-queue-KQHA7ZV2.mjs +35 -0
  136. package/dist/runtime-6Y4ZYXOG.mjs +177 -0
  137. package/dist/{schema-d5Afu03A.d.ts → schema-4W_7tk1f.d.ts} +81 -11
  138. package/dist/server.d.ts +13 -12
  139. package/dist/server.mjs +611 -80
  140. package/dist/snapshot-QGZPODM5.mjs +799 -0
  141. package/dist/synonyms-CpOAHPa-.d.ts +52 -0
  142. package/dist/synonyms.d.ts +22 -0
  143. package/dist/synonyms.mjs +12 -0
  144. package/dist/{tasks-CH2Dod8w.d.ts → tasks-CwPTz-tP.d.ts} +10 -3
  145. package/dist/thread-N3IUGUS3.mjs +697 -0
  146. package/dist/{types-BQDlIvfS.d.ts → types-2qoitTXg.d.ts} +1 -1
  147. package/dist/{types-D5OwhtsQ.d.ts → types-Cz5okLml.d.ts} +2 -2
  148. package/dist/vector/search-worker.d.ts +46 -4
  149. package/dist/vector/search-worker.mjs +21 -11
  150. package/dist/workers/entry.mjs +9 -6
  151. package/dist/write-U5RI7MAX.mjs +241 -0
  152. package/package.json +55 -9
  153. package/dist/chunk-3L4U6EJQ.mjs +0 -49
  154. package/dist/chunk-IFBKLBGB.mjs +0 -7
  155. package/dist/chunk-ORBLD3EL.mjs +0 -6
  156. package/dist/chunk-U7KYW4BA.mjs +0 -135
  157. package/dist/chunk-ZJ4CSAB2.mjs +0 -13
  158. package/dist/chunk-ZNZBXMP5.mjs +0 -2117
  159. package/dist/chunk-ZZT3EAUC.mjs +0 -11168
  160. package/dist/config-BhldZgaK.d.ts +0 -194
  161. package/dist/direct-executor-ALAVE7FC.mjs +0 -12
  162. package/dist/serialization/crc32-worker.d.ts +0 -20
  163. package/dist/serialization/crc32-worker.mjs +0 -62
  164. package/dist/simd-DW5AtJ6B.d.ts +0 -41
  165. package/dist/thread-DYHEQRVY.mjs +0 -402
@@ -29,9 +29,9 @@ interface TransportConfig {
29
29
  connectTimeout: number;
30
30
  /** An ordinary request and its reply may take this long. */
31
31
  requestTimeout: number;
32
- /** A replication entry may take this long to reach a replica and come back acknowledged. */
32
+ /** A replication entry, or a batch of them, may take this long to reach a replica and come back acknowledged. */
33
33
  replicationTimeout: number;
34
- /** A whole snapshot transfer, which moves a partition between nodes, may take this long. */
34
+ /** A node waits this long for each next chunk of a snapshot transfer, which moves a partition or an index between nodes, so that the node can receive a transfer of any size while the sender keeps sending. */
35
35
  snapshotTimeout: number;
36
36
  }
37
37
  /**
@@ -1,6 +1,6 @@
1
- import { d as VectorQuantizationMode } from '../schema-d5Afu03A.js';
2
- import { A as ArenaSimd } from '../simd-DW5AtJ6B.js';
3
- import '../adapters-79OIa4xm.js';
1
+ import { e as VectorQuantizationMode } from '../schema-4W_7tk1f.js';
2
+ import '../adapters-BQFQ4PRz.js';
3
+ import '../synonyms-CpOAHPa-.js';
4
4
 
5
5
  /**
6
6
  * Similarity metric a vector search ranks by.
@@ -42,6 +42,34 @@ interface OrdinalFilter {
42
42
  */
43
43
  type GrowableBuffer = SharedArrayBuffer | ArrayBuffer;
44
44
 
45
+ /**
46
+ * The distance kernels bound to one memory, which read their operands at byte
47
+ * offsets inside that memory so that a caller measures against a vector where
48
+ * it already lies.
49
+ *
50
+ * @internal
51
+ */
52
+ interface ArenaSimd {
53
+ /** The kernels read every operand out of this memory. */
54
+ memory: WebAssembly.Memory;
55
+ /** Returns the dot product of two float32 vectors at the given byte offsets. */
56
+ dot_product: (ptrA: number, ptrB: number, len: number) => number;
57
+ /** Returns the length of the float32 vector at the given byte offset. */
58
+ magnitude: (ptr: number, len: number) => number;
59
+ /** Returns the squared euclidean distance between two float32 vectors at the given byte offsets. */
60
+ squared_euclidean_distance: (ptrA: number, ptrB: number, len: number) => number;
61
+ /** Returns the integer dot product of two byte code vectors at the given byte offsets. */
62
+ dot_u8: (ptrA: number, ptrB: number, len: number) => number;
63
+ /** Returns the integer squared distance between two byte code vectors at the given byte offsets. */
64
+ sqdist_u8: (ptrA: number, ptrB: number, len: number) => number;
65
+ /** Returns the sum of level products of two 4-bit codes at the given byte offsets, each holding two levels per byte. */
66
+ osq_dot_nibbles_4x4: (ptrA: number, ptrB: number, bytes: number) => number;
67
+ /** Returns the sum of level products of a 1-bit or 2-bit code and a query staged as four bit planes. Each plane spans `planeBytes`, with one bit for each of the code's lowest level bits. */
68
+ osq_dot_bits: (ptrDoc: number, ptrPlanes: number, planeBytes: number, docBits: number) => number;
69
+ /** Returns the sum of level products of two 1-bit codes or two 2-bit codes at the given byte offsets. */
70
+ osq_dot_bits_pair: (ptrA: number, ptrB: number, bytes: number, bits: number) => number;
71
+ }
72
+
45
73
  /**
46
74
  * This geometry gives the byte offset of every region inside one block. A
47
75
  * block begins with one query scratch for each thread slot, and the slots
@@ -156,6 +184,12 @@ interface SharedVectorStoreHandles {
156
184
  magnitudes: GrowableBuffer;
157
185
  /** This holds one byte per ordinal, which reads 1 where the ordinal holds a live vector. */
158
186
  present: GrowableBuffer;
187
+ /** This holds one byte per ordinal, which reads 1 where the graph has yet to place the ordinal's vector. */
188
+ unplaced: GrowableBuffer;
189
+ /** This holds one 32-bit count for each fixed run of ordinals, which counts the unplaced flags that the run holds, so that a reader can skip every run whose count reads 0. */
190
+ unplacedChunks: GrowableBuffer;
191
+ /** This holds one byte per ordinal, which reads 1 where the field has removed the ordinal's document while it keeps the vector. */
192
+ removed: GrowableBuffer;
159
193
  /** This holds each ordinal's partition, or a negative marker where the store knows none. */
160
194
  partitions: GrowableBuffer;
161
195
  /** This holds every document id, UTF-8 encoded end to end in ordinal order. */
@@ -189,6 +223,8 @@ interface VectorStoreSnapshot {
189
223
  magnitudes: Float64Array;
190
224
  /** This names the document at each ordinal, and it reads `null` where the ordinal holds none. */
191
225
  docIds: Array<string | null>;
226
+ /** This lists the ordinals of vectors that an update replaced, and the store keeps each of those vectors so that a search can pass through it until compaction. */
227
+ replacedOrdinals: number[];
192
228
  }
193
229
 
194
230
  /**
@@ -215,6 +251,8 @@ interface SharedGraphHandles {
215
251
  locks: GrowableBuffer;
216
252
  /** This holds one byte per ordinal, which reads 1 once a caller removes the document. */
217
253
  tombstones: GrowableBuffer;
254
+ /** This holds one word per ordinal, the number of base-layer lists that hold that ordinal. */
255
+ incoming: GrowableBuffer;
218
256
  /** This records the node lock and the graph lock each thread slot holds right now. */
219
257
  heldLocks: Int32Array;
220
258
  }
@@ -423,6 +461,8 @@ interface VectorSearchRequest {
423
461
  efSearch?: number;
424
462
  /** The worker re-scores this many times the requested count against full precision, or its own default when absent. */
425
463
  oversample?: number;
464
+ /** When present, the worker re-scores only this many times the oversample of the nearest candidates against full precision and keeps the estimated score of the rest, or returns the re-scored candidates alone under a similarity floor. */
465
+ rescoreWindow?: number;
426
466
  }
427
467
  /**
428
468
  * Asks the search worker to answer one nearest-neighbour query from a shared
@@ -451,6 +491,8 @@ interface VectorOrdinalSearchRequest {
451
491
  efSearch?: number;
452
492
  /** The worker re-scores this many times the requested count against full precision, or its own default when absent. */
453
493
  oversample?: number;
494
+ /** When present, the worker re-scores only this many times the oversample of the nearest candidates against full precision and keeps the estimated score of the rest, or returns the re-scored candidates alone under a similarity floor. */
495
+ rescoreWindow?: number;
454
496
  }
455
497
  /**
456
498
  * Every message the engine posts to the search worker.
@@ -534,4 +576,4 @@ interface VectorWorkerError {
534
576
  */
535
577
  type VectorWorkerMessage = VectorAckResponse | VectorInsertResponse | VectorSearchResponse | VectorOrdinalSearchResponse | VectorWorkerError;
536
578
 
537
- export { ArenaSimd, type BlockGeometry, type GraphInsertOutcome, type GrowableBuffer, type HNSWSnapshot, type OrdinalFilter, type OsqBits, type SharedFieldLoadRequest, type SharedGraphHandles, type SharedVectorFieldHandles, type SharedVectorStoreHandles, type VectorAckResponse, type VectorBlockHandle, type VectorBlockLayout, type VectorBlockStorage, type VectorCodeBlockLayout, type VectorDropRequest, type VectorInsertRequest, type VectorInsertResponse, type VectorLoadRequest, type VectorMetric, type VectorOrdinalSearchRequest, type VectorOrdinalSearchResponse, type VectorSearchRequest, type VectorSearchResponse, type VectorStoreSnapshot, type VectorWorkerError, type VectorWorkerMessage, type VectorWorkerRequest, type WorkerCopyCodes, type WorkerCopySnapshot };
579
+ export type { ArenaSimd, BlockGeometry, GraphInsertOutcome, GrowableBuffer, HNSWSnapshot, OrdinalFilter, OsqBits, SharedFieldLoadRequest, SharedGraphHandles, SharedVectorFieldHandles, SharedVectorStoreHandles, VectorAckResponse, VectorBlockHandle, VectorBlockLayout, VectorBlockStorage, VectorCodeBlockLayout, VectorDropRequest, VectorInsertRequest, VectorInsertResponse, VectorLoadRequest, VectorMetric, VectorOrdinalSearchRequest, VectorOrdinalSearchResponse, VectorSearchRequest, VectorSearchResponse, VectorStoreSnapshot, VectorWorkerError, VectorWorkerMessage, VectorWorkerRequest, WorkerCopyCodes, WorkerCopySnapshot };
@@ -1,8 +1,15 @@
1
- import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-THYRHHO2.mjs';
2
- import '../chunk-ZJ4CSAB2.mjs';
3
- import '../chunk-YNVIUGF5.mjs';
4
- import '../chunk-YMZCMH5M.mjs';
5
- import '../chunk-USKFU7J5.mjs';
1
+ import { openSharedVectorField, createVectorStore } from '../chunk-CVXLLEQ3.mjs';
2
+ import { osqBitsOf, createHNSWIndex, createOsqQuantizer } from '../chunk-LGAMKHA2.mjs';
3
+ import '../chunk-DJHHF2L5.mjs';
4
+ import { osqRecordBytes } from '../chunk-37CD3OKS.mjs';
5
+ import '../chunk-KOKM4PQN.mjs';
6
+ import { MAX_WORKER_COPIES } from '../chunk-GBEEG5AN.mjs';
7
+ import '../chunk-JZVARCRZ.mjs';
8
+ import '../chunk-HMFNFVP7.mjs';
9
+ import '../chunk-R6A773WK.mjs';
10
+ import '../chunk-YTJCGKM4.mjs';
11
+ import '../chunk-RFBLQLLZ.mjs';
12
+ import '../chunk-BWJVNZPR.mjs';
6
13
 
7
14
  // src/vector/worker-copy.ts
8
15
  function restoreQuantizer(snapshot, store) {
@@ -12,10 +19,11 @@ function restoreQuantizer(snapshot, store) {
12
19
  quantizer.restoreCentroid(snapshot.codes.centroid);
13
20
  const recordBytes = osqRecordBytes(snapshot.dimension, bits);
14
21
  for (let ordinal = 0; ordinal < snapshot.codes.present.length; ordinal++) {
15
- if (snapshot.codes.present[ordinal] !== 1) continue;
16
- const docId = store.docIdForOrdinal(ordinal);
17
- if (docId === void 0) continue;
18
- quantizer.restoreRecord(docId, snapshot.codes.records.subarray(ordinal * recordBytes, (ordinal + 1) * recordBytes));
22
+ if (snapshot.codes.present[ordinal] !== 1 || ordinal >= store.slots) continue;
23
+ quantizer.restoreRecordAtOrdinal(
24
+ ordinal,
25
+ snapshot.codes.records.subarray(ordinal * recordBytes, (ordinal + 1) * recordBytes)
26
+ );
19
27
  }
20
28
  return quantizer;
21
29
  }
@@ -94,7 +102,8 @@ function handleSearch(request) {
94
102
  const hits = entry.copy.graph.search(request.query, request.k, request.metric, request.minSimilarity, {
95
103
  filter: request.filter,
96
104
  efSearch: request.efSearch,
97
- oversample: request.oversample
105
+ oversample: request.oversample,
106
+ rescoreWindow: request.rescoreWindow
98
107
  });
99
108
  const docIds = [];
100
109
  const scores = new Float64Array(hits.length);
@@ -115,7 +124,8 @@ function handleSearchOrdinals(request) {
115
124
  const hits = entry.view.searchOrdinals(request.query, request.k, request.metric, request.minSimilarity, {
116
125
  filter: request.filter,
117
126
  efSearch: request.efSearch,
118
- oversample: request.oversample
127
+ oversample: request.oversample,
128
+ rescoreWindow: request.rescoreWindow
119
129
  });
120
130
  const ordinals = new Uint32Array(hits.length);
121
131
  const scores = new Float64Array(hits.length);
@@ -1,6 +1,9 @@
1
- import { startIdleHeapCleanup } from '../chunk-Y3L5MDRV.mjs';
2
- import { threadSlotOfWorker, isValidWorkerAction } from '../chunk-POWOTUKJ.mjs';
3
- import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-USKFU7J5.mjs';
1
+ import { startIdleHeapCleanup } from '../chunk-RFVUDM5E.mjs';
2
+ import { isValidWorkerAction } from '../chunk-CQUMNIIG.mjs';
3
+ import { loadVectorCode } from '../chunk-Q6XWVUZX.mjs';
4
+ import { threadSlotOfWorker } from '../chunk-RFBLQLLZ.mjs';
5
+ import '../chunk-L5ORED7V.mjs';
6
+ import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-BWJVNZPR.mjs';
4
7
 
5
8
  // src/workers/action-handler.ts
6
9
  function buildErrorResponse(requestId, code, message, details) {
@@ -18,7 +21,7 @@ async function importBootstrapModule(moduleUrl) {
18
21
  await import(moduleUrl);
19
22
  }
20
23
  async function stopServingRequests() {
21
- const { closeRequestThread } = await import('../thread-DYHEQRVY.mjs');
24
+ const { closeRequestThread } = await import('../thread-N3IUGUS3.mjs');
22
25
  closeRequestThread();
23
26
  }
24
27
  function holdsCopies(executor) {
@@ -49,7 +52,7 @@ function createActionHandler(executor) {
49
52
  if (!holdsCopies(executor)) {
50
53
  throw new NarsilError(ErrorCodes.CONFIG_INVALID, "This executor holds no copies to answer requests from");
51
54
  }
52
- const starting = import('../thread-DYHEQRVY.mjs').then(
55
+ const starting = import('../thread-N3IUGUS3.mjs').then(
53
56
  ({ serveRequests }) => serveRequests(executor, action.settings)
54
57
  );
55
58
  serving.start = starting.then(
@@ -102,7 +105,7 @@ async function setup() {
102
105
  } catch {
103
106
  parentPort = null;
104
107
  }
105
- const { createDirectExecutor } = await import('../direct-executor-ALAVE7FC.mjs');
108
+ const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-ZD64PPEZ.mjs'), loadVectorCode()]);
106
109
  const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
107
110
  if (parentPort) {
108
111
  const port = parentPort;
@@ -0,0 +1,241 @@
1
+ import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-YYQIODMF.mjs';
2
+ import './chunk-37CD3OKS.mjs';
3
+ import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-XADZPPZI.mjs';
4
+ import { openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-WVCOCKBU.mjs';
5
+ import './chunk-KWTW6VTG.mjs';
6
+ import './chunk-EMRMGYRE.mjs';
7
+ import './chunk-OZDFA4WC.mjs';
8
+ import './chunk-AV4IJKD2.mjs';
9
+ import { decodeStoredDocument } from './chunk-SP3NM3ZG.mjs';
10
+ import './chunk-VI4R6W25.mjs';
11
+ import './chunk-ZM7KU4YW.mjs';
12
+ import './chunk-LPQOEU5M.mjs';
13
+ import './chunk-HJSN7UYG.mjs';
14
+ import { EXPORT_CHUNK_BYTES } from './chunk-LXWDQLTW.mjs';
15
+ import './chunk-TGP5M5R7.mjs';
16
+ import './chunk-U2BKYEC7.mjs';
17
+ import './chunk-KOKM4PQN.mjs';
18
+ import './chunk-GBEEG5AN.mjs';
19
+ import './chunk-JZVARCRZ.mjs';
20
+ import './chunk-PC2G76VW.mjs';
21
+ import './chunk-WQBCBKY3.mjs';
22
+ import './chunk-OM362BRO.mjs';
23
+ import './chunk-OEYI3KRB.mjs';
24
+ import './chunk-U476IXKQ.mjs';
25
+ import './chunk-E74YLAIG.mjs';
26
+ import './chunk-HMFNFVP7.mjs';
27
+ import './chunk-GES7U2PM.mjs';
28
+ import './chunk-LKOB5COA.mjs';
29
+ import './chunk-46D6JQIG.mjs';
30
+ import './chunk-X5CV2E2B.mjs';
31
+ import './chunk-7X5JST5L.mjs';
32
+ import './chunk-UTG5YNXV.mjs';
33
+ import './chunk-R6A773WK.mjs';
34
+ import './chunk-YTJCGKM4.mjs';
35
+ import './chunk-CQUMNIIG.mjs';
36
+ import './chunk-Q6XWVUZX.mjs';
37
+ import './chunk-RFBLQLLZ.mjs';
38
+ import './chunk-L5ORED7V.mjs';
39
+ import { NarsilError, ErrorCodes } from './chunk-BWJVNZPR.mjs';
40
+ import { decode } from '@msgpack/msgpack';
41
+
42
+ // src/engine/export/json-line.ts
43
+ function refuse(path, kind, docId) {
44
+ throw new NarsilError(
45
+ ErrorCodes.DOC_VALIDATION_FAILED,
46
+ `Document "${docId}" holds ${kind} at "${path || "(document)"}", which a document export cannot carry as JSON`,
47
+ { docId, field: path }
48
+ );
49
+ }
50
+ function encodeNumber(value, path, target) {
51
+ if (Number.isFinite(value)) return Object.is(value, -0) ? "-0" : JSON.stringify(value);
52
+ if (!target.tagged) refuse(path, String(value), target.docId);
53
+ return `{"${NUMBER_TAG}":"${String(value)}"}`;
54
+ }
55
+ function encodeDate(value, path, target) {
56
+ const milliseconds = value.getTime();
57
+ if (!target.tagged || Number.isNaN(milliseconds)) refuse(path, "a date", target.docId);
58
+ const seconds = Math.floor(milliseconds / MILLISECONDS_PER_SECOND);
59
+ const nanoseconds = (milliseconds - seconds * MILLISECONDS_PER_SECOND) * NANOSECONDS_PER_MILLISECOND;
60
+ return `{"${DATE_TAG}":[${seconds},${nanoseconds}]}`;
61
+ }
62
+ function encodeBytes(value, path, target) {
63
+ if (!target.tagged) refuse(path, "bytes", target.docId);
64
+ return `{"${BYTES_TAG}":"${encodeBase64(value)}"}`;
65
+ }
66
+ function encodeList(value, path, target) {
67
+ target.parts.push("[");
68
+ for (let at = 0; at < value.length; at++) {
69
+ if (at > 0) target.parts.push(",");
70
+ encodeValue(value[at], `${path}[${at}]`, target);
71
+ }
72
+ target.parts.push("]");
73
+ }
74
+ function encodeMap(value, path, target) {
75
+ const proto = Object.getPrototypeOf(value);
76
+ if (proto !== Object.prototype && proto !== null) refuse(path, "a value other than a plain object", target.docId);
77
+ const entries = Object.entries(value).filter(([, entry]) => entry !== void 0);
78
+ const wrapped = target.tagged && entries.length === 1 && startsWithTagPrefix(entries[0][0]);
79
+ target.parts.push(wrapped ? `{"${OBJECT_TAG}":{` : "{");
80
+ for (let at = 0; at < entries.length; at++) {
81
+ const [key, entry] = entries[at];
82
+ if (at > 0) target.parts.push(",");
83
+ target.parts.push(JSON.stringify(key), ":");
84
+ encodeValue(entry, path === "" ? key : `${path}.${key}`, target);
85
+ }
86
+ target.parts.push(wrapped ? "}}" : "}");
87
+ }
88
+ function encodeValue(value, path, target) {
89
+ if (value === null) {
90
+ target.parts.push("null");
91
+ return;
92
+ }
93
+ switch (typeof value) {
94
+ case "string":
95
+ target.parts.push(JSON.stringify(value));
96
+ return;
97
+ case "boolean":
98
+ target.parts.push(value ? "true" : "false");
99
+ return;
100
+ case "number":
101
+ target.parts.push(encodeNumber(value, path, target));
102
+ return;
103
+ case "object":
104
+ break;
105
+ default:
106
+ refuse(path, `a ${typeof value}`, target.docId);
107
+ }
108
+ if (Array.isArray(value)) encodeList(value, path, target);
109
+ else if (value instanceof Date) target.parts.push(encodeDate(value, path, target));
110
+ else if (value instanceof Uint8Array) target.parts.push(encodeBytes(value, path, target));
111
+ else encodeMap(value, path, target);
112
+ }
113
+ function encodeExactJson(value, docId) {
114
+ const target = { docId, tagged: false, parts: [] };
115
+ encodeValue(value, "", target);
116
+ return target.parts.join("");
117
+ }
118
+ function encodeDocumentJson(document, docId) {
119
+ const target = { docId, tagged: true, parts: [] };
120
+ encodeValue(document, "", target);
121
+ return target.parts.join("");
122
+ }
123
+
124
+ // src/engine/export/write.ts
125
+ var VECTOR_FILE_ENVELOPE_VERSION = 2;
126
+ var FLOAT32_BYTES = 4;
127
+ async function locateVectors(checkpoint) {
128
+ const located = /* @__PURE__ */ new Map();
129
+ for (const field of checkpoint.manifest.vectors) {
130
+ const byDocId = /* @__PURE__ */ new Map();
131
+ for (const ref of field.files) {
132
+ const { payload } = await openChecksummedEnvelope(await checkpoint.readFile(ref), {
133
+ envelopeFormatVersion: VECTOR_FILE_ENVELOPE_VERSION,
134
+ what: `vector file "${ref.key}"`,
135
+ allowsCompression: false
136
+ });
137
+ const decoded = decodeVectorFilePayload(decode(payload));
138
+ for (let position = 0; position < decoded.docIds.length; position++) {
139
+ if (isDead(ref.dead, position)) continue;
140
+ byDocId.set(decoded.docIds[position], { ref, position, dimension: decoded.dimension });
141
+ }
142
+ }
143
+ located.set(field.fieldPath, byDocId);
144
+ }
145
+ return located;
146
+ }
147
+ async function readVector(checkpoint, location) {
148
+ const width = location.dimension * FLOAT32_BYTES;
149
+ const offset = location.ref.bytes - (location.ref.count - location.position) * width;
150
+ return Array.from(bytesToVectors((await checkpoint.readRange(location.ref, offset, width)).slice()));
151
+ }
152
+ async function readSegment(checkpoint, ref) {
153
+ const { payload } = await openChecksummedEnvelope(await checkpoint.readFile(ref), {
154
+ envelopeFormatVersion: KEYWORD_SEGMENT_ENVELOPE_VERSION,
155
+ what: `segment "${ref.key}"`,
156
+ allowsCompression: true
157
+ });
158
+ return decodeKeywordSegment(payload, false);
159
+ }
160
+ var decoder = new TextDecoder();
161
+ function idAt(contents, ordinal) {
162
+ const ids = contents.arrays.idTable;
163
+ return decoder.decode(ids.blob.subarray(ids.offsets[ordinal], ids.offsets[ordinal + 1]));
164
+ }
165
+ async function winnersOf(checkpoint, partition) {
166
+ const winners = /* @__PURE__ */ new Map();
167
+ for (let at = 0; at < partition.segments.length; at++) {
168
+ const contents = await readSegment(checkpoint, partition.segments[at]);
169
+ for (const docId of contents.tombstones) winners.delete(docId);
170
+ for (let ordinal = 0; ordinal < contents.arrays.documentCount; ordinal++) winners.set(idAt(contents, ordinal), at);
171
+ }
172
+ return winners;
173
+ }
174
+ async function* documentLines(checkpoint) {
175
+ const vectors = await locateVectors(checkpoint);
176
+ for (const partition of checkpoint.manifest.partitions) {
177
+ const winners = await winnersOf(checkpoint, partition);
178
+ for (let at = 0; at < partition.segments.length; at++) {
179
+ const contents = await readSegment(checkpoint, partition.segments[at]);
180
+ const table = contents.arrays.documentTable;
181
+ for (let ordinal = 0; ordinal < contents.arrays.documentCount; ordinal++) {
182
+ const docId = idAt(contents, ordinal);
183
+ if (winners.get(docId) !== at) continue;
184
+ const stored = decodeStoredDocument(
185
+ table.blob.subarray(table.offsets[ordinal], table.offsets[ordinal + 1]),
186
+ table.discardedFields
187
+ );
188
+ const document = { id: docId, ...stored };
189
+ document.id = docId;
190
+ for (const [fieldPath, located] of vectors) {
191
+ const location = located.get(docId);
192
+ if (location !== void 0) setNestedValue(document, fieldPath, await readVector(checkpoint, location));
193
+ }
194
+ yield `${encodeDocumentJson(document, docId)}
195
+ `;
196
+ }
197
+ }
198
+ }
199
+ }
200
+ async function* exportLines(header, checkpoint) {
201
+ yield `${encodeExactJson({ format: DOCUMENT_EXPORT_FORMAT, version: DOCUMENT_EXPORT_VERSION, index: header }, "")}
202
+ `;
203
+ yield* documentLines(checkpoint);
204
+ }
205
+ function documentExportStream(header, checkpoint) {
206
+ const lines = exportLines(header, checkpoint);
207
+ const encoder = new TextEncoder();
208
+ let released = false;
209
+ const release = () => {
210
+ if (released) return;
211
+ released = true;
212
+ checkpoint.release();
213
+ };
214
+ return new ReadableStream({
215
+ async pull(controller) {
216
+ try {
217
+ let text = "";
218
+ while (text.length < EXPORT_CHUNK_BYTES) {
219
+ const step = await lines.next();
220
+ if (step.done) {
221
+ if (text.length > 0) controller.enqueue(encoder.encode(text));
222
+ release();
223
+ controller.close();
224
+ return;
225
+ }
226
+ text += step.value;
227
+ }
228
+ controller.enqueue(encoder.encode(text));
229
+ } catch (error) {
230
+ release();
231
+ controller.error(error);
232
+ }
233
+ },
234
+ async cancel() {
235
+ release();
236
+ await lines.return(void 0);
237
+ }
238
+ });
239
+ }
240
+
241
+ export { documentExportStream };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delali/narsil",
3
- "version": "0.2.4-next.59",
3
+ "version": "0.3.1-next.101",
4
4
  "type": "module",
5
5
  "description": "Distributed search engine with full-text, vector, hybrid, and geosearch. One engine, embedded or on a server, with a cross-language .nrsl format.",
6
6
  "author": "Delali (https://sondelali.com)",
@@ -27,6 +27,10 @@
27
27
  "browser": "./src/persistence/durability/node-fs.browser.ts",
28
28
  "default": "./src/persistence/durability/node-fs.ts"
29
29
  },
30
+ "#platform/lock-holder": {
31
+ "browser": "./src/persistence/durability/lock-holder.browser.ts",
32
+ "default": "./src/persistence/durability/lock-holder.ts"
33
+ },
30
34
  "#platform/node-worker": {
31
35
  "browser": "./src/workers/node-worker.browser.ts",
32
36
  "default": "./src/workers/node-worker.ts"
@@ -35,6 +39,10 @@
35
39
  "browser": "./src/runtime/heap-statistics.browser.ts",
36
40
  "default": "./src/runtime/heap-statistics.ts"
37
41
  },
42
+ "#platform/process-limit": {
43
+ "browser": "./src/runtime/process-limit.browser.ts",
44
+ "default": "./src/runtime/process-limit.ts"
45
+ },
38
46
  "#platform/idle-heap-cleanup": {
39
47
  "browser": "./src/runtime/idle-heap-cleanup.browser.ts",
40
48
  "default": "./src/runtime/idle-heap-cleanup.ts"
@@ -47,9 +55,25 @@
47
55
  "browser": "./src/vector/native/loader.browser.ts",
48
56
  "default": "./src/vector/native/loader.ts"
49
57
  },
58
+ "#platform/search-backend-settings": {
59
+ "browser": "./src/engine/search-backend-settings.browser.ts",
60
+ "default": "./src/engine/search-backend-settings.ts"
61
+ },
50
62
  "#platform/native-crc32": {
51
63
  "browser": "./src/serialization/native-crc32.browser.ts",
52
64
  "default": "./src/serialization/native-crc32.ts"
65
+ },
66
+ "#platform/pattern-search": {
67
+ "browser": "./src/core/pattern-index/platform.browser.ts",
68
+ "default": "./src/core/pattern-index/platform.ts"
69
+ },
70
+ "#platform/partial-word-search": {
71
+ "browser": "./src/core/partition/partial-words/platform.browser.ts",
72
+ "default": "./src/core/partition/partial-words/platform.ts"
73
+ },
74
+ "#platform/synonym-search": {
75
+ "browser": "./src/core/synonyms/platform.browser.ts",
76
+ "default": "./src/core/synonyms/platform.ts"
53
77
  }
54
78
  },
55
79
  "sideEffects": false,
@@ -67,8 +91,11 @@
67
91
  },
68
92
  "scripts": {
69
93
  "build": "rm -rf dist && tsup && node scripts/check-browser-bundle.mjs && tsx scripts/api-surface.ts",
70
- "test": "vitest run --exclude='**/vector/recall.test.ts'",
94
+ "test": "vitest run --exclude='**/vector/recall.test.ts' --exclude='**/e2e/cluster-memory/**' --exclude='**/e2e/cluster-faults/**' --exclude='**/frozen-removal-memory/container-removes.test.ts'",
95
+ "test:cluster": "vitest run src/__tests__/e2e/cluster-memory --no-file-parallelism",
96
+ "test:faults": "vitest run src/__tests__/e2e/cluster-faults --no-file-parallelism",
71
97
  "test:etcd": "vitest run src/__tests__/distribution/coordinator/etcd-integration/*.test.ts",
98
+ "test:container-memory": "vitest run src/__tests__/e2e/frozen-removal-memory/container-removes.test.ts",
72
99
  "test:watch": "vitest",
73
100
  "test:coverage": "vitest run --coverage",
74
101
  "test:recall": "vitest run src/__tests__/vector/recall.test.ts",
@@ -80,6 +107,7 @@
80
107
  "revisions:record": "tsx scripts/analysis-revisions.ts --record",
81
108
  "api": "tsx scripts/api-surface.ts",
82
109
  "api:write": "tsx scripts/api-surface.ts --write",
110
+ "bundle-size:write": "rm -rf dist && tsup && node scripts/check-browser-bundle.mjs --update-baseline",
83
111
  "lookalikes": "tsx scripts/lookalike-counts.ts",
84
112
  "lookalikes:collect": "tsx scripts/lookalike-counts.ts --collect",
85
113
  "fold-table": "tsx scripts/fold-table.ts",
@@ -131,6 +159,22 @@
131
159
  "import": "./dist/embeddings/openai.mjs",
132
160
  "types": "./dist/embeddings/openai.d.ts"
133
161
  },
162
+ "./rerankers/http": {
163
+ "import": "./dist/rerankers/http.mjs",
164
+ "types": "./dist/rerankers/http.d.ts"
165
+ },
166
+ "./pattern": {
167
+ "import": "./dist/pattern.mjs",
168
+ "types": "./dist/pattern.d.ts"
169
+ },
170
+ "./partial-words": {
171
+ "import": "./dist/partial-words.mjs",
172
+ "types": "./dist/partial-words.d.ts"
173
+ },
174
+ "./synonyms": {
175
+ "import": "./dist/synonyms.mjs",
176
+ "types": "./dist/synonyms.d.ts"
177
+ },
134
178
  "./languages/*": {
135
179
  "import": "./dist/languages/*.mjs",
136
180
  "types": "./dist/languages/*.d.ts"
@@ -189,16 +233,18 @@
189
233
  "@types/react": "19.2.14",
190
234
  "@types/react-dom": "19.2.3",
191
235
  "@vitest/coverage-v8": "4.0.18",
236
+ "esbuild": "0.28.2",
192
237
  "etcd3": "1.1.2",
193
238
  "fflate": "0.8.3",
194
239
  "jsdom": "28.1.0",
240
+ "re2-wasm": "1.0.2",
195
241
  "react": "19.2.4",
196
242
  "react-dom": "19.2.4",
197
243
  "selfsigned": "5.5.0",
198
244
  "tsup": "8.5.1",
199
245
  "tsx": "4.21.0",
200
246
  "typescript": "5.9.3",
201
- "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.58.0",
247
+ "uWebSockets.js": "github:uNetworking/uWebSockets.js#ba110e817908b56c61d625b02f367b4ec9cfc8ab",
202
248
  "vitest": "4.0.18",
203
249
  "wabt": "1.0.39"
204
250
  },
@@ -223,11 +269,11 @@
223
269
  }
224
270
  },
225
271
  "optionalDependencies": {
226
- "@delali/narsil-native-darwin-arm64": "0.2.4-next.59",
227
- "@delali/narsil-native-darwin-x64": "0.2.4-next.59",
228
- "@delali/narsil-native-linux-arm64": "0.2.4-next.59",
229
- "@delali/narsil-native-linux-x64": "0.2.4-next.59",
230
- "@delali/narsil-native-win32-arm64": "0.2.4-next.59",
231
- "@delali/narsil-native-win32-x64": "0.2.4-next.59"
272
+ "@delali/narsil-native-darwin-arm64": "0.3.1-next.101",
273
+ "@delali/narsil-native-darwin-x64": "0.3.1-next.101",
274
+ "@delali/narsil-native-linux-arm64": "0.3.1-next.101",
275
+ "@delali/narsil-native-linux-x64": "0.3.1-next.101",
276
+ "@delali/narsil-native-win32-arm64": "0.3.1-next.101",
277
+ "@delali/narsil-native-win32-x64": "0.3.1-next.101"
232
278
  }
233
279
  }
@@ -1,49 +0,0 @@
1
- import { NATIVE_CRC32_MIN_BYTES } from './chunk-IFBKLBGB.mjs';
2
- import * as zlib from 'zlib';
3
-
4
- var candidate = zlib.crc32;
5
- var nativeCrc32 = typeof candidate === "function" ? candidate : null;
6
-
7
- // src/serialization/crc32.ts
8
- var IEEE_POLYNOMIAL = 3988292384;
9
- var ALL_BITS = 4294967295;
10
- var cachedTable = null;
11
- function buildTable() {
12
- const table = new Uint32Array(256);
13
- for (let i = 0; i < 256; i++) {
14
- let crc = i;
15
- for (let bit = 0; bit < 8; bit++) {
16
- crc = crc & 1 ? crc >>> 1 ^ IEEE_POLYNOMIAL : crc >>> 1;
17
- }
18
- table[i] = crc;
19
- }
20
- return table;
21
- }
22
- function getTable() {
23
- if (cachedTable === null) {
24
- cachedTable = buildTable();
25
- }
26
- return cachedTable;
27
- }
28
- function crc322(data) {
29
- return crc32Final(crc32Update(crc32Init(), data));
30
- }
31
- function crc32Init() {
32
- return ALL_BITS;
33
- }
34
- function crc32Update(state, data) {
35
- if (nativeCrc32 !== null && data.length >= NATIVE_CRC32_MIN_BYTES) {
36
- return nativeCrc32(data, (state ^ ALL_BITS) >>> 0) ^ ALL_BITS;
37
- }
38
- const table = getTable();
39
- let crc = state;
40
- for (let i = 0; i < data.length; i++) {
41
- crc = crc >>> 8 ^ table[(crc ^ data[i]) & 255];
42
- }
43
- return crc;
44
- }
45
- function crc32Final(state) {
46
- return (state ^ ALL_BITS) >>> 0;
47
- }
48
-
49
- export { crc322 as crc32, crc32Final, crc32Init, crc32Update, nativeCrc32 };
@@ -1,7 +0,0 @@
1
- // src/serialization/constants.ts
2
- var CHECKSUM_TIMEOUT_MS = 12e4;
3
- var CHECKSUM_YIELD_CHUNK_BYTES = 4 * 1024 * 1024;
4
- var NATIVE_CRC32_MIN_BYTES = 16;
5
- var VALID_HNSW_METRICS = /* @__PURE__ */ new Set(["cosine", "dotProduct", "euclidean"]);
6
-
7
- export { CHECKSUM_TIMEOUT_MS, CHECKSUM_YIELD_CHUNK_BYTES, NATIVE_CRC32_MIN_BYTES, VALID_HNSW_METRICS };
@@ -1,6 +0,0 @@
1
- // src/distribution/coordinator/constants.ts
2
- var MAX_NODE_ID_LENGTH = 255;
3
- var MAX_WATCHERS = 64;
4
- var NODE_HEARTBEAT_TTL_MS = 3e4;
5
-
6
- export { MAX_NODE_ID_LENGTH, MAX_WATCHERS, NODE_HEARTBEAT_TTL_MS };