@delali/narsil 0.3.1-next.80 → 0.3.1-next.82

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 (52) hide show
  1. package/dist/adapters/filesystem.mjs +1 -1
  2. package/dist/adapters/indexeddb.mjs +1 -1
  3. package/dist/{capabilities-CcTDWh_P.d.ts → capabilities-CAdkp2P-.d.ts} +2 -2
  4. package/dist/{chunk-HJASKX4F.mjs → chunk-2453RJYK.mjs} +2 -2
  5. package/dist/{chunk-K4FZ55Q2.mjs → chunk-4CWHWOBI.mjs} +10 -10
  6. package/dist/{chunk-4QDQEJDV.mjs → chunk-4D6OH4EF.mjs} +6 -6
  7. package/dist/{chunk-P2PYEZZE.mjs → chunk-4VBG6PEH.mjs} +3 -3
  8. package/dist/{chunk-Y3L5MDRV.mjs → chunk-5XNIRLFC.mjs} +2 -2
  9. package/dist/{chunk-2E35UM3G.mjs → chunk-B3UOQJD3.mjs} +1 -1
  10. package/dist/{chunk-MEOOYKWL.mjs → chunk-GNYXCLJS.mjs} +4 -4
  11. package/dist/{chunk-NSXQCE4K.mjs → chunk-IH3GKNDQ.mjs} +190 -40
  12. package/dist/{chunk-23HJ5QXQ.mjs → chunk-IN5CH4P2.mjs} +2 -2
  13. package/dist/{chunk-OSF3SGJV.mjs → chunk-KJ7LB3TR.mjs} +2 -2
  14. package/dist/{chunk-DQABW5UQ.mjs → chunk-LS5IRM23.mjs} +1 -1
  15. package/dist/{chunk-4MQ5F4IL.mjs → chunk-OLXM65YH.mjs} +1 -1
  16. package/dist/{chunk-R2XCJIO7.mjs → chunk-SREPGC6O.mjs} +2 -2
  17. package/dist/{chunk-I64LXKO3.mjs → chunk-TPJU7NDJ.mjs} +1 -0
  18. package/dist/{chunk-YGLSR7BC.mjs → chunk-XYDP7CCJ.mjs} +5 -5
  19. package/dist/{chunk-QPYV22XH.mjs → chunk-XZF4LZ3X.mjs} +4 -3
  20. package/dist/{chunk-GG2FBGVZ.mjs → chunk-ZCKPRCYI.mjs} +1 -1
  21. package/dist/{client-CsybN673.d.ts → client-CKUtkLz3.d.ts} +2 -2
  22. package/dist/client.d.ts +7 -7
  23. package/dist/client.mjs +1 -0
  24. package/dist/{config-CFonR_gY.d.ts → config-BuIkeM5C.d.ts} +39 -3
  25. package/dist/{config-BCNQtszf.d.ts → config-CSDEPraV.d.ts} +1 -1
  26. package/dist/direct-executor-JVXDR5Y5.mjs +19 -0
  27. package/dist/distribution/coordinator/etcd.d.ts +1 -1
  28. package/dist/distribution/coordinator/etcd.mjs +1 -1
  29. package/dist/distribution/coordinator/in-memory.d.ts +1 -1
  30. package/dist/distribution/transport/grpc.mjs +1 -1
  31. package/dist/distribution.d.ts +7 -7
  32. package/dist/distribution.mjs +756 -64
  33. package/dist/embeddings/openai.mjs +1 -1
  34. package/dist/{engine-B0oIF1_r.d.ts → engine-DMNZJAUq.d.ts} +1 -1
  35. package/dist/{types-ChrVy4lH.d.ts → index-DzONZUKE.d.ts} +79 -37
  36. package/dist/index.browser.mjs +25 -23
  37. package/dist/index.d.ts +5 -5
  38. package/dist/index.mjs +14 -14
  39. package/dist/{memory-B6SBOKlS.d.ts → memory-BPKNx9Tl.d.ts} +1 -0
  40. package/dist/partial-words.mjs +4 -4
  41. package/dist/pattern.mjs +3 -3
  42. package/dist/persistence/durability/checkpoint-worker.mjs +14 -14
  43. package/dist/react.d.ts +6 -6
  44. package/dist/react.mjs +1 -0
  45. package/dist/server.d.ts +9 -9
  46. package/dist/server.mjs +18 -13
  47. package/dist/{tasks-CYAQe6qd.d.ts → tasks-DGyz586z.d.ts} +1 -1
  48. package/dist/{thread-P6QJ2Q5O.mjs → thread-33M5AOEI.mjs} +10 -10
  49. package/dist/vector/search-worker.mjs +3 -3
  50. package/dist/workers/entry.mjs +5 -5
  51. package/package.json +11 -7
  52. package/dist/direct-executor-VNMQ6NIH.mjs +0 -19
@@ -1,4 +1,4 @@
1
- import { NarsilError, ErrorCodes } from '../chunk-I64LXKO3.mjs';
1
+ import { NarsilError, ErrorCodes } from '../chunk-TPJU7NDJ.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-B6SBOKlS.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-BPKNx9Tl.js';
3
3
  import { A as AnyDocument, a as InsertOptions, W as WriteOptions, I as IndexConfig, P as PartitionConfig } from './schema-DgyDijhf.js';
4
4
 
5
5
  /**
@@ -10,29 +10,6 @@ import { S as SchemaDefinition } from './schema-DgyDijhf.js';
10
10
  * @public
11
11
  */
12
12
  type NodeRole = 'data' | 'coordinator' | 'controller';
13
- /**
14
- * Where one partition stands in its move between nodes.
15
- *
16
- * `ACTIVE` is the steady state. `INITIALISING` means a node is still filling
17
- * it, `MIGRATING` means it is moving, `DECOMMISSIONING` means it is being
18
- * drained, and `UNASSIGNED` means no node holds it.
19
- *
20
- * @public
21
- */
22
- type PartitionState = 'UNASSIGNED' | 'INITIALISING' | 'ACTIVE' | 'MIGRATING' | 'DECOMMISSIONING';
23
- /**
24
- * Why a partition stays `UNASSIGNED` after the controller has asked its last holders for a copy.
25
- *
26
- * `HOLDER_OFFLINE` means a last holder has yet to register again, so the controller is still waiting for it.
27
- * `HOLDER_UNREACHABLE` means a registered holder left the request unanswered or answered with a payload the
28
- * controller could not read. `HOLDER_IDENTITY_MISMATCH` means a holder answered under a different index identity,
29
- * so its copy holds the documents of an earlier index of the same name, or it keeps no copy of that name at all.
30
- * `HOLDER_WITHOUT_DATA` means every holder answered under the coordinator's identity with a list that left the
31
- * partition out.
32
- *
33
- * @public
34
- */
35
- type UnassignedReason = 'HOLDER_OFFLINE' | 'HOLDER_UNREACHABLE' | 'HOLDER_IDENTITY_MISMATCH' | 'HOLDER_WITHOUT_DATA';
36
13
  /**
37
14
  * What one node has to offer, which the allocator weighs when it places
38
15
  * partitions.
@@ -47,6 +24,40 @@ interface NodeCapacity {
47
24
  /** The node can give this much disk to durability, and reports `null` when it keeps nothing on disk. */
48
25
  diskBytes: number | null;
49
26
  }
27
+ /**
28
+ * How much memory one node uses against its limits, which the node publishes with every heartbeat so that the cluster
29
+ * stops taking writes before the node runs out of memory.
30
+ *
31
+ * @public
32
+ */
33
+ interface NodeMemoryReport {
34
+ /** The whole process holds this many bytes of resident memory, including vectors and segments kept outside the heap. */
35
+ processBytes: number;
36
+ /** The process may hold this many bytes, which is the container's memory limit or else the host's total memory. */
37
+ processLimitBytes: number;
38
+ /** The main thread's heap uses this many bytes. */
39
+ heapBytes: number;
40
+ /** The main thread's heap may grow to this many bytes. */
41
+ heapLimitBytes: number;
42
+ /**
43
+ * This is true while the node refuses writes, which starts once either figure passes the block fraction of its limit
44
+ * and ends once both fall below the resume fraction. Every index with a copy on the node refuses inserts and updates
45
+ * with `CLUSTER_WRITE_BLOCKED` while it holds.
46
+ */
47
+ full: boolean;
48
+ }
49
+ /**
50
+ * The estimated size of each partition copy that one node holds of one index, which the controller weighs when it
51
+ * places further copies.
52
+ *
53
+ * @public
54
+ */
55
+ interface IndexPartitionBytes {
56
+ /** The partitions belong to this index. */
57
+ indexName: string;
58
+ /** Each entry pairs a partition id with the estimated bytes that the node's copy of it holds. */
59
+ partitions: Array<[partitionId: number, bytes: number]>;
60
+ }
50
61
  /**
51
62
  * What a node publishes about itself when it joins a cluster.
52
63
  *
@@ -67,7 +78,51 @@ interface NodeRegistration {
67
78
  version: string;
68
79
  /** These free-form labels are where a zone or rack goes for zone-aware allocation. */
69
80
  metadata?: Record<string, string>;
81
+ /** The node uses this much memory, and the field is absent where the node's runtime cannot measure it. */
82
+ memory?: NodeMemoryReport;
83
+ /**
84
+ * The node's copies hold these estimated sizes. The controller counts a partition that no node reports as 50 MB
85
+ * when it places copies.
86
+ */
87
+ partitionBytes?: IndexPartitionBytes[];
88
+ }
89
+ /**
90
+ * Tells watchers that a node joined or left.
91
+ *
92
+ * @public
93
+ */
94
+ interface NodeEvent {
95
+ /** This says which change it is. */
96
+ type: 'node_joined' | 'node_left';
97
+ /** This node joined or left. */
98
+ nodeId: string;
99
+ /** The node published this on joining, and it is `null` when the node left. */
100
+ registration: NodeRegistration | null;
70
101
  }
102
+
103
+ /**
104
+ * Where one partition stands in its move between nodes.
105
+ *
106
+ * `ACTIVE` is the steady state. `INITIALISING` means a node is still filling
107
+ * it, `MIGRATING` means it is moving, `DECOMMISSIONING` means it is being
108
+ * drained, and `UNASSIGNED` means no node holds it.
109
+ *
110
+ * @public
111
+ */
112
+ type PartitionState = 'UNASSIGNED' | 'INITIALISING' | 'ACTIVE' | 'MIGRATING' | 'DECOMMISSIONING';
113
+ /**
114
+ * Why a partition stays `UNASSIGNED` after the controller has asked its last holders for a copy.
115
+ *
116
+ * `HOLDER_OFFLINE` means a last holder has yet to register again, so the controller is still waiting for it.
117
+ * `HOLDER_UNREACHABLE` means a registered holder left the request unanswered or answered with a payload the
118
+ * controller could not read. `HOLDER_IDENTITY_MISMATCH` means a holder answered under a different index identity,
119
+ * so its copy holds the documents of an earlier index of the same name, or it keeps no copy of that name at all.
120
+ * `HOLDER_WITHOUT_DATA` means every holder answered under the coordinator's identity with a list that left the
121
+ * partition out.
122
+ *
123
+ * @public
124
+ */
125
+ type UnassignedReason = 'HOLDER_OFFLINE' | 'HOLDER_UNREACHABLE' | 'HOLDER_IDENTITY_MISMATCH' | 'HOLDER_WITHOUT_DATA';
71
126
  /**
72
127
  * Which nodes hold one partition, and where that partition stands.
73
128
  *
@@ -106,19 +161,6 @@ interface AllocationTable {
106
161
  /** These assignments are keyed by partition id. */
107
162
  assignments: Map<number, PartitionAssignment>;
108
163
  }
109
- /**
110
- * Tells watchers that a node joined or left.
111
- *
112
- * @public
113
- */
114
- interface NodeEvent {
115
- /** This says which change it is. */
116
- type: 'node_joined' | 'node_left';
117
- /** This node joined or left. */
118
- nodeId: string;
119
- /** The node published this on joining, and it is `null` when the node left. */
120
- registration: NodeRegistration | null;
121
- }
122
164
  /**
123
165
  * Tells watchers that an index's allocation changed.
124
166
  *
@@ -340,4 +382,4 @@ interface ClusterCoordinator {
340
382
  shutdown(): Promise<void>;
341
383
  }
342
384
 
343
- export type { AllocationTable as A, ClusterCoordinator as C, NodeRole as N, PartitionAssignment as P, SchemaEvent as S, UnassignedReason as U, NodeRegistration as a, NodeCapacity as b, AllocationConstraints as c, AllocationEvent as d, NodeEvent as e, PartitionState as f };
385
+ export type { AllocationTable as A, ClusterCoordinator as C, IndexPartitionBytes as I, NodeRole as N, PartitionAssignment as P, SchemaEvent as S, UnassignedReason as U, NodeRegistration as a, NodeCapacity as b, AllocationConstraints as c, AllocationEvent as d, NodeEvent as e, NodeMemoryReport as f, PartitionState as g };
@@ -49,6 +49,7 @@ var ErrorCodes = {
49
49
  QUERY_NODE_TIMEOUT: "QUERY_NODE_TIMEOUT",
50
50
  QUERY_NO_ACTIVE_REPLICA: "QUERY_NO_ACTIVE_REPLICA",
51
51
  CLUSTER_OPERATION_UNSUPPORTED: "CLUSTER_OPERATION_UNSUPPORTED",
52
+ CLUSTER_WRITE_BLOCKED: "CLUSTER_WRITE_BLOCKED",
52
53
  ALLOCATION_NO_DATA_NODES: "ALLOCATION_NO_DATA_NODES",
53
54
  ALLOCATION_INVALID_CONFIG: "ALLOCATION_INVALID_CONFIG",
54
55
  ALLOCATION_FAILED: "ALLOCATION_FAILED",
@@ -21088,7 +21089,6 @@ var DEFAULT_ASYNC_FLUSH_INTERVAL_MS = 1e3;
21088
21089
  var DIRECTORY_IDENTITY_CHECK_INTERVAL_MS = 1e3;
21089
21090
  var DIRECTORY_LOCK_ATTEMPTS = 3;
21090
21091
  var DIRECTORY_LOCK_SETTLE_MS = 50;
21091
- var DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS = 1e3;
21092
21092
  var DEFAULT_SEGMENT_MAX_BYTES = 67108864;
21093
21093
  var DEFAULT_COMPACTION_THRESHOLD = 12;
21094
21094
  var COMPACTION_LARGEST_MERGED_DOCUMENT_COUNT = 2e5;
@@ -21116,6 +21116,16 @@ async function getPath() {
21116
21116
  return filesystemUnavailable2();
21117
21117
  }
21118
21118
 
21119
+ // src/persistence/durability/lock-holder.browser.ts
21120
+ async function holderIsLive(_holder, _self, _lockPath) {
21121
+ return true;
21122
+ }
21123
+ function holdDirectoryOpen(_directory) {
21124
+ return () => void 0;
21125
+ }
21126
+ async function removeStaleLock(_lockPath, _asidePath, _isStale) {
21127
+ }
21128
+
21119
21129
  // src/persistence/durability/directory-lock.ts
21120
21130
  var LOCK_FILE_NAME = ".narsil.lock";
21121
21131
  var HARD_LINK_UNSUPPORTED_CODES = /* @__PURE__ */ new Set(["EPERM", "ENOTSUP", "EOPNOTSUPP", "ENOSYS"]);
@@ -21123,14 +21133,6 @@ var lockedDirectories = /* @__PURE__ */ new Set();
21123
21133
  function errnoOf(err) {
21124
21134
  return err?.code;
21125
21135
  }
21126
- function processIsRunning(pid) {
21127
- try {
21128
- process.kill(pid, 0);
21129
- return true;
21130
- } catch (err) {
21131
- return errnoOf(err) === "EPERM";
21132
- }
21133
- }
21134
21136
  function integerOrNull(text) {
21135
21137
  const value = Number.parseInt(text ?? "", 10);
21136
21138
  return Number.isSafeInteger(value) ? value : null;
@@ -21168,11 +21170,6 @@ async function settledHolder(fs, lockPath) {
21168
21170
  await new Promise((resolve) => setTimeout(resolve, DIRECTORY_LOCK_SETTLE_MS));
21169
21171
  return readHolder(fs, lockPath);
21170
21172
  }
21171
- function holderIsLive(holder, self) {
21172
- if (holder.pid !== self.pid) return processIsRunning(holder.pid);
21173
- if (holder.processStartMs === null || self.processStartMs === null) return false;
21174
- return Math.abs(holder.processStartMs - self.processStartMs) <= DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS;
21175
- }
21176
21173
  function heldElsewhere(root, holder, lockPath) {
21177
21174
  return new NarsilError(
21178
21175
  ErrorCodes.CONFIG_INVALID,
@@ -21215,12 +21212,10 @@ async function acquire(fs, root, lockPath, self) {
21215
21212
  for (let attempt = 0; attempt < DIRECTORY_LOCK_ATTEMPTS; attempt++) {
21216
21213
  if (await createLockFile(fs, lockPath, draftPath, content)) return;
21217
21214
  const holder = await settledHolder(fs, lockPath);
21218
- if (typeof holder === "object" && holderIsLive(holder, self)) {
21215
+ if (typeof holder === "object" && await holderIsLive()) {
21219
21216
  throw heldElsewhere(root, holderLabel(holder, self), lockPath);
21220
21217
  }
21221
- await fs.unlink(lockPath).catch((err) => {
21222
- if (errnoOf(err) !== "ENOENT") throw err;
21223
- });
21218
+ await removeStaleLock();
21224
21219
  }
21225
21220
  throw heldElsewhere(root, "another process", lockPath);
21226
21221
  }
@@ -21238,7 +21233,15 @@ async function lockDirectory(root) {
21238
21233
  const resolvedRoot = pathMod.resolve(root);
21239
21234
  const lockPath = pathMod.join(resolvedRoot, LOCK_FILE_NAME);
21240
21235
  const self = await describeSelf();
21236
+ async function holds() {
21237
+ const holder = await readHolder(fs, lockPath);
21238
+ return typeof holder === "object" && holder.nonce === self.nonce;
21239
+ }
21240
+ async function removeOwnLockFile() {
21241
+ if (await holds().catch(() => false)) await fs.unlink(lockPath).catch(() => void 0);
21242
+ }
21241
21243
  let directoryKey = null;
21244
+ let closeDirectory = () => void 0;
21242
21245
  try {
21243
21246
  await fs.mkdir(resolvedRoot, { recursive: true });
21244
21247
  const stat = await fs.stat(resolvedRoot, { bigint: true });
@@ -21247,8 +21250,10 @@ async function lockDirectory(root) {
21247
21250
  lockedDirectories.add(key);
21248
21251
  directoryKey = key;
21249
21252
  await acquire(fs, root, lockPath, self);
21253
+ closeDirectory = holdDirectoryOpen(resolvedRoot);
21250
21254
  } catch (err) {
21251
21255
  if (directoryKey !== null) lockedDirectories.delete(directoryKey);
21256
+ await removeOwnLockFile();
21252
21257
  if (err instanceof NarsilError) throw err;
21253
21258
  throw new NarsilError(
21254
21259
  ErrorCodes.PERSISTENCE_SAVE_FAILED,
@@ -21258,17 +21263,14 @@ async function lockDirectory(root) {
21258
21263
  }
21259
21264
  const heldKey = directoryKey;
21260
21265
  let released = false;
21261
- async function holds() {
21262
- const holder = await readHolder(fs, lockPath);
21263
- return typeof holder === "object" && holder.nonce === self.nonce;
21264
- }
21265
21266
  return {
21266
21267
  holds,
21267
21268
  async release() {
21268
21269
  if (released) return;
21269
21270
  released = true;
21270
21271
  lockedDirectories.delete(heldKey);
21271
- if (await holds().catch(() => false)) await fs.unlink(lockPath).catch(() => void 0);
21272
+ await removeOwnLockFile();
21273
+ closeDirectory();
21272
21274
  }
21273
21275
  };
21274
21276
  }
package/dist/index.d.ts CHANGED
@@ -4,11 +4,11 @@ import { P as PartialWordSearch } from './partial-words-DTIHO8G4.js';
4
4
  import { P as PatternSearch } from './pattern-Cledccbl.js';
5
5
  import { L as LanguageModule } from './language-DB8KG1z5.js';
6
6
  export { T as TokenizerConfig } from './language-DB8KG1z5.js';
7
- 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-B6SBOKlS.js';
8
- import { N as NarsilConfig } from './config-BCNQtszf.js';
9
- 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-BCNQtszf.js';
10
- import { N as Narsil } from './engine-B0oIF1_r.js';
11
- export { B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations } from './engine-B0oIF1_r.js';
7
+ 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-BPKNx9Tl.js';
8
+ import { N as NarsilConfig } from './config-CSDEPraV.js';
9
+ 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-CSDEPraV.js';
10
+ import { N as Narsil } from './engine-DMNZJAUq.js';
11
+ export { B as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations } from './engine-DMNZJAUq.js';
12
12
  export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter } from './adapters-79OIa4xm.js';
13
13
  export { i as isSimdAvailable } from './simd-DW5AtJ6B.js';
14
14
 
package/dist/index.mjs CHANGED
@@ -1,24 +1,24 @@
1
- export { VERSION, createNarsil } from './chunk-NSXQCE4K.mjs';
2
- import './chunk-4QDQEJDV.mjs';
1
+ export { VERSION, createNarsil } from './chunk-IH3GKNDQ.mjs';
2
+ import './chunk-4D6OH4EF.mjs';
3
3
  import './chunk-GCM3JFVA.mjs';
4
- import './chunk-HJASKX4F.mjs';
5
- export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-K4FZ55Q2.mjs';
6
- export { registerPartialWordSearch, registerPatternSearch } from './chunk-YGLSR7BC.mjs';
7
- export { getLanguage, registerLanguage } from './chunk-4MQ5F4IL.mjs';
8
- import './chunk-GG2FBGVZ.mjs';
4
+ import './chunk-2453RJYK.mjs';
5
+ export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-4CWHWOBI.mjs';
6
+ export { registerPartialWordSearch, registerPatternSearch } from './chunk-XYDP7CCJ.mjs';
7
+ export { getLanguage, registerLanguage } from './chunk-OLXM65YH.mjs';
8
+ import './chunk-ZCKPRCYI.mjs';
9
9
  import './chunk-TGP5M5R7.mjs';
10
- export { isSimdAvailable } from './chunk-23HJ5QXQ.mjs';
10
+ export { isSimdAvailable } from './chunk-IN5CH4P2.mjs';
11
11
  import './chunk-ZJ4CSAB2.mjs';
12
- import './chunk-2E35UM3G.mjs';
13
- import './chunk-R2XCJIO7.mjs';
12
+ import './chunk-B3UOQJD3.mjs';
13
+ import './chunk-SREPGC6O.mjs';
14
14
  import './chunk-WQBCBKY3.mjs';
15
- export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-P2PYEZZE.mjs';
16
- import './chunk-OSF3SGJV.mjs';
15
+ export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-4VBG6PEH.mjs';
16
+ import './chunk-KJ7LB3TR.mjs';
17
17
  import './chunk-KEHK2O6P.mjs';
18
18
  import './chunk-GES7U2PM.mjs';
19
- import './chunk-DQABW5UQ.mjs';
19
+ import './chunk-LS5IRM23.mjs';
20
20
  import './chunk-U2BKYEC7.mjs';
21
21
  import './chunk-R6A773WK.mjs';
22
22
  import './chunk-YTJCGKM4.mjs';
23
23
  import './chunk-POWOTUKJ.mjs';
24
- export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-I64LXKO3.mjs';
24
+ export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-TPJU7NDJ.mjs';
@@ -57,6 +57,7 @@ declare const ErrorCodes: {
57
57
  readonly QUERY_NODE_TIMEOUT: "QUERY_NODE_TIMEOUT";
58
58
  readonly QUERY_NO_ACTIVE_REPLICA: "QUERY_NO_ACTIVE_REPLICA";
59
59
  readonly CLUSTER_OPERATION_UNSUPPORTED: "CLUSTER_OPERATION_UNSUPPORTED";
60
+ readonly CLUSTER_WRITE_BLOCKED: "CLUSTER_WRITE_BLOCKED";
60
61
  readonly ALLOCATION_NO_DATA_NODES: "ALLOCATION_NO_DATA_NODES";
61
62
  readonly ALLOCATION_INVALID_CONFIG: "ALLOCATION_INVALID_CONFIG";
62
63
  readonly ALLOCATION_FAILED: "ALLOCATION_FAILED";
@@ -1,11 +1,11 @@
1
- import { partialWordSearchModule } from './chunk-P2PYEZZE.mjs';
2
- import './chunk-OSF3SGJV.mjs';
1
+ import { partialWordSearchModule } from './chunk-4VBG6PEH.mjs';
2
+ import './chunk-KJ7LB3TR.mjs';
3
3
  import './chunk-KEHK2O6P.mjs';
4
4
  import './chunk-GES7U2PM.mjs';
5
- import './chunk-DQABW5UQ.mjs';
5
+ import './chunk-LS5IRM23.mjs';
6
6
  import './chunk-R6A773WK.mjs';
7
7
  import './chunk-YTJCGKM4.mjs';
8
- import './chunk-I64LXKO3.mjs';
8
+ import './chunk-TPJU7NDJ.mjs';
9
9
 
10
10
  // src/partial-words/index.ts
11
11
  var partialWordSearch = partialWordSearchModule;
package/dist/pattern.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { patternSearchModule } from './chunk-R2XCJIO7.mjs';
1
+ import { patternSearchModule } from './chunk-SREPGC6O.mjs';
2
2
  import './chunk-WQBCBKY3.mjs';
3
3
  import './chunk-GES7U2PM.mjs';
4
- import './chunk-DQABW5UQ.mjs';
4
+ import './chunk-LS5IRM23.mjs';
5
5
  import './chunk-YTJCGKM4.mjs';
6
- import './chunk-I64LXKO3.mjs';
6
+ import './chunk-TPJU7NDJ.mjs';
7
7
 
8
8
  // src/pattern/index.ts
9
9
  var patternSearch = patternSearchModule;
@@ -1,27 +1,27 @@
1
- import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-NSXQCE4K.mjs';
2
- import '../../chunk-4QDQEJDV.mjs';
1
+ import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-IH3GKNDQ.mjs';
2
+ import '../../chunk-4D6OH4EF.mjs';
3
3
  import '../../chunk-GCM3JFVA.mjs';
4
- import '../../chunk-HJASKX4F.mjs';
5
- import '../../chunk-K4FZ55Q2.mjs';
6
- import '../../chunk-YGLSR7BC.mjs';
7
- import '../../chunk-4MQ5F4IL.mjs';
8
- import '../../chunk-GG2FBGVZ.mjs';
4
+ import '../../chunk-2453RJYK.mjs';
5
+ import '../../chunk-4CWHWOBI.mjs';
6
+ import '../../chunk-XYDP7CCJ.mjs';
7
+ import '../../chunk-OLXM65YH.mjs';
8
+ import '../../chunk-ZCKPRCYI.mjs';
9
9
  import '../../chunk-TGP5M5R7.mjs';
10
- import '../../chunk-23HJ5QXQ.mjs';
10
+ import '../../chunk-IN5CH4P2.mjs';
11
11
  import '../../chunk-ZJ4CSAB2.mjs';
12
- import '../../chunk-2E35UM3G.mjs';
13
- import '../../chunk-R2XCJIO7.mjs';
12
+ import '../../chunk-B3UOQJD3.mjs';
13
+ import '../../chunk-SREPGC6O.mjs';
14
14
  import '../../chunk-WQBCBKY3.mjs';
15
- import '../../chunk-P2PYEZZE.mjs';
16
- import '../../chunk-OSF3SGJV.mjs';
15
+ import '../../chunk-4VBG6PEH.mjs';
16
+ import '../../chunk-KJ7LB3TR.mjs';
17
17
  import '../../chunk-KEHK2O6P.mjs';
18
18
  import '../../chunk-GES7U2PM.mjs';
19
- import '../../chunk-DQABW5UQ.mjs';
19
+ import '../../chunk-LS5IRM23.mjs';
20
20
  import '../../chunk-U2BKYEC7.mjs';
21
21
  import '../../chunk-R6A773WK.mjs';
22
22
  import '../../chunk-YTJCGKM4.mjs';
23
23
  import '../../chunk-POWOTUKJ.mjs';
24
- import '../../chunk-I64LXKO3.mjs';
24
+ import '../../chunk-TPJU7NDJ.mjs';
25
25
 
26
26
  // src/persistence/durability/rebuild.ts
27
27
  async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = []) {
package/dist/react.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { N as NarsilError, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, Q as QueryParams, j as PreflightResult, e as QueryResult, k as SuggestParams, l as SuggestResult } from './memory-B6SBOKlS.js';
2
- export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-B6SBOKlS.js';
3
- import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-CYAQe6qd.js';
4
- export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-CYAQe6qd.js';
1
+ import { N as NarsilError, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, Q as QueryParams, j as PreflightResult, e as QueryResult, k as SuggestParams, l as SuggestResult } from './memory-BPKNx9Tl.js';
2
+ export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-BPKNx9Tl.js';
3
+ import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-DGyz586z.js';
4
+ export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-DGyz586z.js';
5
5
  import { ReactNode, ReactElement } from 'react';
6
- import { N as Narsil } from './engine-B0oIF1_r.js';
7
- import { N as NarsilClient, I as ImportSource } from './client-CsybN673.js';
6
+ import { N as Narsil } from './engine-DMNZJAUq.js';
7
+ import { N as NarsilClient, I as ImportSource } from './client-CKUtkLz3.js';
8
8
  import { A as AnyDocument } from './schema-DgyDijhf.js';
9
9
  import './adapters-79OIa4xm.js';
10
10
 
package/dist/react.mjs CHANGED
@@ -49,6 +49,7 @@ var ErrorCodes = {
49
49
  QUERY_NODE_TIMEOUT: "QUERY_NODE_TIMEOUT",
50
50
  QUERY_NO_ACTIVE_REPLICA: "QUERY_NO_ACTIVE_REPLICA",
51
51
  CLUSTER_OPERATION_UNSUPPORTED: "CLUSTER_OPERATION_UNSUPPORTED",
52
+ CLUSTER_WRITE_BLOCKED: "CLUSTER_WRITE_BLOCKED",
52
53
  ALLOCATION_NO_DATA_NODES: "ALLOCATION_NO_DATA_NODES",
53
54
  ALLOCATION_INVALID_CONFIG: "ALLOCATION_INVALID_CONFIG",
54
55
  ALLOCATION_FAILED: "ALLOCATION_FAILED",
package/dist/server.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-B6SBOKlS.js';
2
- import { b as ServerOptions, N as NarsilServer } from './capabilities-CcTDWh_P.js';
3
- export { A as ASYNC_IMPORT_CAPABILITY, C as CorsOptions, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, c as RequestContext, d as RequestDenial, S as SERVER_CAPABILITIES, e as ServerLimits, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './capabilities-CcTDWh_P.js';
4
- import { N as Narsil } from './engine-B0oIF1_r.js';
5
- import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-CYAQe6qd.js';
6
- export { C as CapabilitiesResponse, a as CreateIndexEmbedding, i as CreateIndexRequest, H as HttpIndexConfig, I as ImportError, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, f as TaskStatus, g as TaskType } from './tasks-CYAQe6qd.js';
1
+ export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-BPKNx9Tl.js';
2
+ import { b as ServerOptions, N as NarsilServer } from './capabilities-CAdkp2P-.js';
3
+ export { A as ASYNC_IMPORT_CAPABILITY, C as CorsOptions, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, c as RequestContext, d as RequestDenial, S as SERVER_CAPABILITIES, e as ServerLimits, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './capabilities-CAdkp2P-.js';
4
+ import { N as Narsil } from './engine-DMNZJAUq.js';
5
+ import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-DGyz586z.js';
6
+ export { C as CapabilitiesResponse, a as CreateIndexEmbedding, i as CreateIndexRequest, H as HttpIndexConfig, I as ImportError, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, f as TaskStatus, g as TaskType } from './tasks-DGyz586z.js';
7
7
  import './schema-DgyDijhf.js';
8
8
  import './adapters-79OIa4xm.js';
9
- import './config-CFonR_gY.js';
10
- import './config-BCNQtszf.js';
11
- import './types-ChrVy4lH.js';
9
+ import './config-BuIkeM5C.js';
10
+ import './config-CSDEPraV.js';
11
+ import './index-DzONZUKE.js';
12
12
  import './types-Cb9kiY5P.js';
13
13
 
14
14
  /**
package/dist/server.mjs CHANGED
@@ -1,21 +1,21 @@
1
- import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createRouteRunner, corsHeaderReader, createSharedRequestGate, MAIN_THREAD_GATE_SLOT, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, createDocumentReadHandlers, sendError, respondError, respondJson, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, clearGateSlot, parseJson, validateCreateIndex, rejectInvalid, validateBatch, serializeBatchResult, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, parseTaskListQuery, parseJsonOptional, validateRebalance, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, IMPORT_FLUSHES_IN_FLIGHT, badRequest, SERVER_CAPABILITIES, toHttpError, RELAY_STREAM_CHUNKS_IN_FLIGHT, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-QPYV22XH.mjs';
2
- export { ASYNC_IMPORT_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-QPYV22XH.mjs';
3
- import { validateIndexName } from './chunk-MEOOYKWL.mjs';
4
- import { engineCoreOf, providedDocId, resolveVectorText } from './chunk-HJASKX4F.mjs';
5
- import { detectRuntime } from './chunk-4MQ5F4IL.mjs';
6
- import './chunk-GG2FBGVZ.mjs';
1
+ import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createRouteRunner, corsHeaderReader, createSharedRequestGate, MAIN_THREAD_GATE_SLOT, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, createDocumentReadHandlers, sendError, respondError, respondJson, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, clearGateSlot, parseJson, validateCreateIndex, rejectInvalid, validateBatch, serializeBatchResult, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, parseTaskListQuery, parseJsonOptional, validateRebalance, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, IMPORT_FLUSHES_IN_FLIGHT, badRequest, SERVER_CAPABILITIES, toHttpError, RELAY_STREAM_CHUNKS_IN_FLIGHT, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-XZF4LZ3X.mjs';
2
+ export { ASYNC_IMPORT_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-XZF4LZ3X.mjs';
3
+ import { validateIndexName } from './chunk-GNYXCLJS.mjs';
4
+ import { engineCoreOf, providedDocId, resolveVectorText } from './chunk-2453RJYK.mjs';
5
+ import { detectRuntime } from './chunk-OLXM65YH.mjs';
6
+ import './chunk-ZCKPRCYI.mjs';
7
7
  import './chunk-TGP5M5R7.mjs';
8
- import './chunk-2E35UM3G.mjs';
8
+ import './chunk-B3UOQJD3.mjs';
9
9
  import './chunk-WQBCBKY3.mjs';
10
- import './chunk-OSF3SGJV.mjs';
10
+ import './chunk-KJ7LB3TR.mjs';
11
11
  import './chunk-KEHK2O6P.mjs';
12
- import './chunk-DQABW5UQ.mjs';
12
+ import './chunk-LS5IRM23.mjs';
13
13
  import './chunk-U2BKYEC7.mjs';
14
14
  import './chunk-R6A773WK.mjs';
15
15
  import './chunk-YTJCGKM4.mjs';
16
- import { startIdleHeapCleanup } from './chunk-Y3L5MDRV.mjs';
17
- import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-I64LXKO3.mjs';
18
- export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-I64LXKO3.mjs';
16
+ import { startIdleHeapCleanup } from './chunk-5XNIRLFC.mjs';
17
+ import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-TPJU7NDJ.mjs';
18
+ export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-TPJU7NDJ.mjs';
19
19
  import { randomUUID } from 'crypto';
20
20
  import { createReadStream } from 'fs';
21
21
  import { rm } from 'fs/promises';
@@ -248,7 +248,12 @@ function createClusterHandlers(deps) {
248
248
  respondJson(ctx, {
249
249
  node: describeNode(cluster),
250
250
  controllerNodeId,
251
- nodes: nodes.map((node) => ({ nodeId: node.nodeId, address: node.address, roles: [...node.roles] }))
251
+ nodes: nodes.map((node) => ({
252
+ nodeId: node.nodeId,
253
+ address: node.address,
254
+ roles: [...node.roles],
255
+ memory: node.memory ?? null
256
+ }))
252
257
  });
253
258
  } catch (err) {
254
259
  respondError(ctx, err);
@@ -1,4 +1,4 @@
1
- import { M as MemoryStats } from './memory-B6SBOKlS.js';
1
+ import { M as MemoryStats } from './memory-BPKNx9Tl.js';
2
2
 
3
3
  /** Declarative index configuration accepted over HTTP. Function-valued engine
4
4
  * options (custom tokenizer, stopWords-as-function, group reducer, embedding
@@ -1,19 +1,19 @@
1
- import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery, refuseRegex } from './chunk-QPYV22XH.mjs';
2
- import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-4QDQEJDV.mjs';
3
- import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-YGLSR7BC.mjs';
4
- import './chunk-GG2FBGVZ.mjs';
1
+ import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery, refuseRegex } from './chunk-XZF4LZ3X.mjs';
2
+ import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-4D6OH4EF.mjs';
3
+ import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-XYDP7CCJ.mjs';
4
+ import './chunk-ZCKPRCYI.mjs';
5
5
  import './chunk-ZJ4CSAB2.mjs';
6
- import './chunk-2E35UM3G.mjs';
7
- import './chunk-R2XCJIO7.mjs';
6
+ import './chunk-B3UOQJD3.mjs';
7
+ import './chunk-SREPGC6O.mjs';
8
8
  import './chunk-WQBCBKY3.mjs';
9
- import './chunk-P2PYEZZE.mjs';
10
- import { extractVectorFieldsFromSchema } from './chunk-OSF3SGJV.mjs';
9
+ import './chunk-4VBG6PEH.mjs';
10
+ import { extractVectorFieldsFromSchema } from './chunk-KJ7LB3TR.mjs';
11
11
  import './chunk-KEHK2O6P.mjs';
12
12
  import './chunk-GES7U2PM.mjs';
13
- import './chunk-DQABW5UQ.mjs';
13
+ import './chunk-LS5IRM23.mjs';
14
14
  import './chunk-R6A773WK.mjs';
15
15
  import './chunk-YTJCGKM4.mjs';
16
- import { ServerErrorCodes, NarsilError, ErrorCodes } from './chunk-I64LXKO3.mjs';
16
+ import { ServerErrorCodes, NarsilError, ErrorCodes } from './chunk-TPJU7NDJ.mjs';
17
17
 
18
18
  // src/server/request-threads/held-vectors.ts
19
19
  function managerWithHeldVectors(manager, fieldPaths, vectorOf) {
@@ -1,10 +1,10 @@
1
- import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-23HJ5QXQ.mjs';
1
+ import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-IN5CH4P2.mjs';
2
2
  import '../chunk-ZJ4CSAB2.mjs';
3
- import '../chunk-2E35UM3G.mjs';
3
+ import '../chunk-B3UOQJD3.mjs';
4
4
  import '../chunk-KEHK2O6P.mjs';
5
5
  import '../chunk-R6A773WK.mjs';
6
6
  import '../chunk-YTJCGKM4.mjs';
7
- import '../chunk-I64LXKO3.mjs';
7
+ import '../chunk-TPJU7NDJ.mjs';
8
8
 
9
9
  // src/vector/worker-copy.ts
10
10
  function restoreQuantizer(snapshot, store) {
@@ -1,6 +1,6 @@
1
- import { startIdleHeapCleanup } from '../chunk-Y3L5MDRV.mjs';
1
+ import { startIdleHeapCleanup } from '../chunk-5XNIRLFC.mjs';
2
2
  import { threadSlotOfWorker, isValidWorkerAction } from '../chunk-POWOTUKJ.mjs';
3
- import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-I64LXKO3.mjs';
3
+ import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-TPJU7NDJ.mjs';
4
4
 
5
5
  // src/workers/action-handler.ts
6
6
  function buildErrorResponse(requestId, code, message, details) {
@@ -18,7 +18,7 @@ async function importBootstrapModule(moduleUrl) {
18
18
  await import(moduleUrl);
19
19
  }
20
20
  async function stopServingRequests() {
21
- const { closeRequestThread } = await import('../thread-P6QJ2Q5O.mjs');
21
+ const { closeRequestThread } = await import('../thread-33M5AOEI.mjs');
22
22
  closeRequestThread();
23
23
  }
24
24
  function holdsCopies(executor) {
@@ -49,7 +49,7 @@ function createActionHandler(executor) {
49
49
  if (!holdsCopies(executor)) {
50
50
  throw new NarsilError(ErrorCodes.CONFIG_INVALID, "This executor holds no copies to answer requests from");
51
51
  }
52
- const starting = import('../thread-P6QJ2Q5O.mjs').then(
52
+ const starting = import('../thread-33M5AOEI.mjs').then(
53
53
  ({ serveRequests }) => serveRequests(executor, action.settings)
54
54
  );
55
55
  serving.start = starting.then(
@@ -102,7 +102,7 @@ async function setup() {
102
102
  } catch {
103
103
  parentPort = null;
104
104
  }
105
- const { createDirectExecutor } = await import('../direct-executor-VNMQ6NIH.mjs');
105
+ const { createDirectExecutor } = await import('../direct-executor-JVXDR5Y5.mjs');
106
106
  const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
107
107
  if (parentPort) {
108
108
  const port = parentPort;