@delali/narsil 0.3.1-next.130 → 0.3.1-next.131

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.d.ts CHANGED
@@ -1,13 +1,16 @@
1
- import { N as NarsilError, L as ListParams, g as ListResult, I as IndexInfo, k as IndexStats, Q as QueryParams, P as PreflightResult, e as QueryResult, h as SuggestParams, j as SuggestResult } from './events-DErop1LM.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 './events-DErop1LM.js';
3
- import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-BfF-VRhm.js';
4
- export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-BfF-VRhm.js';
1
+ import { N as NarsilError, L as ListParams, f as ListResult, I as IndexInfo, k as IndexStats, Q as QueryParams, j as PreflightResult, m as QueryResult, g as SuggestParams, h as SuggestResult } from './config-D1cDv3sE.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 './config-D1cDv3sE.js';
3
+ import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-Co8HfRD7.js';
4
+ export { E as ErrorDetail, I as ImportError, f as TaskStatus, g as TaskType } from './tasks-Co8HfRD7.js';
5
5
  import { ReactNode, ReactElement } from 'react';
6
- import { N as Narsil } from './engine-B_W9sdZK.js';
7
- import { N as NarsilClient, I as ImportSource } from './client-Cx-TiqPE.js';
8
- import { A as AnyDocument } from './schema-CS-clLun.js';
9
- import './synonyms-CpOAHPa-.js';
6
+ import { N as Narsil } from './engine-m_Ddr1bz.js';
7
+ import { N as NarsilClient, I as ImportSource } from './client-gNAfaHcE.js';
8
+ import { A as AnyDocument } from './schema-BTXbHCqA.js';
10
9
  import './adapters-BQFQ4PRz.js';
10
+ import './synonyms-CpOAHPa-.js';
11
+ import './index-HYnqS1SE.js';
12
+ import './config-CmYJO34X.js';
13
+ import './types-DvncmvuQ.js';
11
14
 
12
15
  /**
13
16
  * These settings apply to {@link NarsilProvider} whether it holds a client or
@@ -186,8 +186,11 @@ interface VectorIndexConfig {
186
186
  filterThreshold?: number;
187
187
  /** These settings shape the graph: neighbours per node, build-time exploration, and the metric that ranks results. */
188
188
  hnswConfig?: {
189
+ /** The graph keeps this many neighbours per node. */
189
190
  m?: number;
191
+ /** The engine explores this many candidates as it builds the graph. */
190
192
  efConstruction?: number;
193
+ /** This metric ranks the results. */
191
194
  metric?: 'cosine' | 'dotProduct' | 'euclidean';
192
195
  };
193
196
  /** The engine codes the promoted vectors in this mode. When this is unset, it picks the mode by the field's dimension. Set `none` to rank by the vectors alone. */
@@ -382,4 +385,4 @@ interface InsertOptions extends WriteOptions {
382
385
  skipClone?: boolean;
383
386
  }
384
387
 
385
- export type { AnyDocument as A, BM25Params as B, CustomTokenizer as C, EmbeddingFieldConfig as E, FieldOptionChain as F, IndexConfig as I, PartitionConfig as P, SchemaDefinition as S, TextFieldOption as T, VectorIndexConfig as V, WriteOptions as W, InsertOptions as a, StopWordOverride as b, BM25FieldParams as c, FieldType as d, ScoringMode as e, VectorQuantizationMode as f, VectorStorageMode as g };
388
+ export type { AnyDocument as A, BM25Params as B, CustomTokenizer as C, EmbeddingFieldConfig as E, FieldType as F, InsertOptions as I, PartitionConfig as P, SchemaDefinition as S, TextFieldOption as T, VectorIndexConfig as V, WriteOptions as W, IndexConfig as a, StopWordOverride as b, BM25FieldParams as c, FieldOptionChain as d, ScoringMode as e, VectorQuantizationMode as f, VectorStorageMode as g };
package/dist/server.d.ts CHANGED
@@ -1,17 +1,204 @@
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 './events-DErop1LM.js';
2
- import { c as ServerOptions, N as NarsilServer } from './capabilities-Bl8G9taj.js';
3
- export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_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, d as RequestContext, e as RequestDenial, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, f as ServerLimits, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-Bl8G9taj.js';
4
- import { N as Narsil } from './engine-B_W9sdZK.js';
5
- import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-BfF-VRhm.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-BfF-VRhm.js';
7
- import './schema-CS-clLun.js';
1
+ import { G as GroupResult, Q as QueryParams, n as GroupConfig, m as QueryResult, L as ListParams, g as SuggestParams, k as IndexStats, f as ListResult, j as PreflightResult, h as SuggestResult } from './config-D1cDv3sE.js';
2
+ 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 './config-D1cDv3sE.js';
3
+ import { E as ErrorEnvelope, c as ServerOptions, N as NarsilServer } from './capabilities-B6WxrWxt.js';
4
+ export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, C as CorsOptions, D as DOCUMENT_EXPORT_CAPABILITY, I as INDEX_LIFECYCLE_CAPABILITY, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, d as RequestContext, e as RequestDenial, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, f as ServerLimits, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-B6WxrWxt.js';
5
+ import { N as Narsil } from './engine-m_Ddr1bz.js';
6
+ import { i as CreateIndexRequest, H as HttpIndexConfig, B as BatchBody, D as DocumentBody, j as InsertBody, k as MultiGetBody, R as RebalanceBody, l as ReplicationFactorBody, c as TaskListQuery, V as VectorFieldBody, S as SynonymSetBody, m as BatchResponse, C as CapabilitiesResponse, n as ClusterAllocationResponse, o as ClusterTopologyResponse, p as DocumentCountResponse, q as DocumentExistsResponse, r as DocumentIdResponse, s as DocumentPutResponse, t as DocumentRemovedResponse, u as DocumentResponse, b as ImportResult, v as IndexClearedResponse, w as IndexCreatedResponse, x as IndexDroppedResponse, y as IndexListResponse, z as IndexPartitionsResponse, A as IndexStateResponse, L as LivenessResponse, M as MemoryStatsResponse, F as MultiGetResponse, O as OkResponse, G as ReadinessResponse, J as ReplicationFactorResponse, T as TaskListPage, e as TaskRecord, K as VectorMaintenanceResponse, N as VersionResponse, d as TaskProgress, h as TaskStore } from './tasks-Co8HfRD7.js';
7
+ export { P as BatchFailure, Q as ClusterMemberReport, U as ClusterNodeReport, a as CreateIndexEmbedding, E as ErrorDetail, I as ImportError, W as PartitionAllocationReport, f as TaskStatus, g as TaskType } from './tasks-Co8HfRD7.js';
8
+ import { e as ClusterHealth } from './config-CmYJO34X.js';
9
+ import { S as SchemaDefinition, P as PartitionConfig, V as VectorIndexConfig, B as BM25Params, F as FieldType } from './schema-BTXbHCqA.js';
8
10
  import './adapters-BQFQ4PRz.js';
9
11
  import './synonyms-CpOAHPa-.js';
10
- import './config-CzB9YvF_.js';
11
- import './config-hOWGBeC6.js';
12
- import './index-CKI1fDEl.js';
12
+ import './index-HYnqS1SE.js';
13
13
  import './types-DvncmvuQ.js';
14
14
 
15
+ /**
16
+ * Everything `POST /indexes/{name}/search` accepts, which is {@link QueryParams}
17
+ * with a `group` that holds no reducer, because a function cannot cross JSON.
18
+ *
19
+ * @public
20
+ */
21
+ type HttpQueryParams = Omit<QueryParams, 'group'> & {
22
+ /** These settings collapse the hits into groups by field value. */
23
+ group?: Omit<GroupConfig, 'reduce'>;
24
+ };
25
+ /**
26
+ * One group of hits as the server sends it, which is {@link GroupResult} with
27
+ * no reducer output, because the server refuses a query with a reducer.
28
+ *
29
+ * @public
30
+ */
31
+ type HttpGroupResult = Omit<GroupResult, 'reduced' | 'reducerError'>;
32
+ /**
33
+ * The body of `POST /indexes/{name}/search`.
34
+ *
35
+ * @public
36
+ */
37
+ type HttpQueryResult = Omit<QueryResult, 'groups'> & {
38
+ /** These groups arrive when the query asked for grouping. */
39
+ groups?: HttpGroupResult[];
40
+ };
41
+ /**
42
+ * The settings of a new index as `POST /indexes` reads them, which is
43
+ * {@link HttpIndexConfig} with each field type spelled out.
44
+ *
45
+ * @public
46
+ */
47
+ type HttpIndexBody = Omit<HttpIndexConfig, 'schema' | 'partitions' | 'vectorPromotion'> & {
48
+ /** This layout gives each value as either a field type or a nested schema. */
49
+ schema: SchemaDefinition;
50
+ /** These settings control how the index splits documents across partitions as it grows. */
51
+ partitions?: PartitionConfig;
52
+ /** These settings control when vector fields move to an HNSW graph, and how that graph is built. */
53
+ vectorPromotion?: VectorIndexConfig;
54
+ };
55
+ /**
56
+ * The body of `POST /indexes`, which is {@link CreateIndexRequest} with the
57
+ * settings of {@link HttpIndexBody}.
58
+ *
59
+ * @public
60
+ */
61
+ type HttpCreateIndexBody = Omit<CreateIndexRequest, 'config'> & {
62
+ /** This carries the schema and settings, in the subset JSON can express. */
63
+ config: HttpIndexBody;
64
+ };
65
+ /**
66
+ * The query string of `DELETE /indexes/{name}/documents/{id}`.
67
+ *
68
+ * @public
69
+ */
70
+ interface RemoveDocumentQuery {
71
+ /** Under `true`, the server answers only once every worker copy has applied the removal. */
72
+ wait?: 'true' | 'false';
73
+ }
74
+ /**
75
+ * The query string of `POST /indexes/{name}/documents/_import`.
76
+ *
77
+ * @public
78
+ */
79
+ interface ImportDocumentsQuery {
80
+ /** Under `true`, the server starts a task and answers 202 with its record. */
81
+ async?: 'true' | 'false';
82
+ }
83
+ /**
84
+ * Every named type that a route of the HTTP server sends or takes as JSON,
85
+ * under the name that the published OpenAPI file gives its schema.
86
+ *
87
+ * @public
88
+ */
89
+ interface HttpWireTypes {
90
+ /** The body of `POST /indexes/{name}/documents/_batch`, which gives the action to perform. */
91
+ BatchBody: BatchBody;
92
+ /** The body of `POST /indexes/{name}/bm25`. */
93
+ BM25Params: BM25Params;
94
+ /** The body of `POST /indexes`. */
95
+ HttpCreateIndexBody: HttpCreateIndexBody;
96
+ /** The body of a request that writes one document with a known id. */
97
+ DocumentBody: DocumentBody;
98
+ /** Every value that a field of an index schema accepts. */
99
+ FieldType: FieldType;
100
+ /** The query string of `POST /indexes/{name}/documents/_import`. */
101
+ ImportDocumentsQuery: ImportDocumentsQuery;
102
+ /** The body of `POST /indexes/{name}/documents`. */
103
+ InsertBody: InsertBody;
104
+ /** The body of `POST /indexes/{name}/documents/_list`. */
105
+ ListParams: ListParams;
106
+ /** The body of `POST /indexes/{name}/documents/_multi-get`. */
107
+ MultiGetBody: MultiGetBody;
108
+ /** The body of `POST /indexes/{name}/partition-config`. */
109
+ PartitionConfig: PartitionConfig;
110
+ /** The body of `POST /indexes/{name}/search` and of `POST /indexes/{name}/search/preflight`. */
111
+ HttpQueryParams: HttpQueryParams;
112
+ /** The body of `POST /indexes/{name}/_rebalance`. */
113
+ RebalanceBody: RebalanceBody;
114
+ /** The query string of `DELETE /indexes/{name}/documents/{id}`. */
115
+ RemoveDocumentQuery: RemoveDocumentQuery;
116
+ /** The body of `PUT /indexes/{name}/replication-factor`. */
117
+ ReplicationFactorBody: ReplicationFactorBody;
118
+ /** The body of `POST /indexes/{name}/suggest`. */
119
+ SuggestParams: SuggestParams;
120
+ /** The query string of `GET /tasks`. */
121
+ TaskListQuery: TaskListQuery;
122
+ /** The body of `POST /indexes/{name}/vectors/_compact` and of `POST /indexes/{name}/vectors/_optimize`. */
123
+ VectorFieldBody: VectorFieldBody;
124
+ /** The body of `GET` and of `POST /indexes/{name}/synonyms`. */
125
+ SynonymSetBody: SynonymSetBody;
126
+ /** The body of `POST /indexes/{name}/documents/_batch`. */
127
+ BatchResponse: BatchResponse;
128
+ /** The body of `GET /capabilities`. */
129
+ CapabilitiesResponse: CapabilitiesResponse;
130
+ /** The body of `GET /indexes/{name}/cluster`. */
131
+ ClusterAllocationResponse: ClusterAllocationResponse;
132
+ /** The body of `GET /cluster/health`. */
133
+ ClusterHealth: ClusterHealth;
134
+ /** The body of `GET /cluster`. */
135
+ ClusterTopologyResponse: ClusterTopologyResponse;
136
+ /** The body of `GET /indexes/{name}/count`. */
137
+ DocumentCountResponse: DocumentCountResponse;
138
+ /** The body of `GET /indexes/{name}/documents/{id}/_exists`. */
139
+ DocumentExistsResponse: DocumentExistsResponse;
140
+ /** The body of `POST /indexes/{name}/documents` and of `PATCH /indexes/{name}/documents/{id}`. */
141
+ DocumentIdResponse: DocumentIdResponse;
142
+ /** The body of `PUT /indexes/{name}/documents/{id}`. */
143
+ DocumentPutResponse: DocumentPutResponse;
144
+ /** The body of `DELETE /indexes/{name}/documents/{id}`. */
145
+ DocumentRemovedResponse: DocumentRemovedResponse;
146
+ /** The body of `GET /indexes/{name}/documents/{id}`. */
147
+ DocumentResponse: DocumentResponse;
148
+ /** The body of every failed response. */
149
+ ErrorEnvelope: ErrorEnvelope;
150
+ /** The body of `POST /indexes/{name}/search`. */
151
+ HttpQueryResult: HttpQueryResult;
152
+ /** The body of `POST /indexes/{name}/documents/_import` when the server finishes the import inside the request. */
153
+ ImportResult: ImportResult;
154
+ /** The body of `POST /indexes/{name}/_clear`. */
155
+ IndexClearedResponse: IndexClearedResponse;
156
+ /** The body of `POST /indexes`. */
157
+ IndexCreatedResponse: IndexCreatedResponse;
158
+ /** The body of `DELETE /indexes/{name}`. */
159
+ IndexDroppedResponse: IndexDroppedResponse;
160
+ /** The body of `GET /indexes`. */
161
+ IndexListResponse: IndexListResponse;
162
+ /** The body of `GET /indexes/{name}/partitions`. */
163
+ IndexPartitionsResponse: IndexPartitionsResponse;
164
+ /** The body of `POST /indexes/{name}/_open` and of `POST /indexes/{name}/_close`. */
165
+ IndexStateResponse: IndexStateResponse;
166
+ /** The body of `GET /indexes/{name}/stats`. */
167
+ IndexStats: IndexStats;
168
+ /** The body of `GET /livez`. */
169
+ LivenessResponse: LivenessResponse;
170
+ /** The body of `POST /indexes/{name}/documents/_list`. */
171
+ ListResult: ListResult;
172
+ /** The body of `GET /stats/memory`. */
173
+ MemoryStatsResponse: MemoryStatsResponse;
174
+ /** The body of `POST /indexes/{name}/documents/_multi-get`. */
175
+ MultiGetResponse: MultiGetResponse;
176
+ /** The body of a request that the server finishes with nothing further to report. */
177
+ OkResponse: OkResponse;
178
+ /** The body of `POST /indexes/{name}/search/preflight`. */
179
+ PreflightResult: PreflightResult;
180
+ /** The body of `GET /readyz` and of `GET /health`. */
181
+ ReadinessResponse: ReadinessResponse;
182
+ /** The body of `PUT /indexes/{name}/replication-factor`. */
183
+ ReplicationFactorResponse: ReplicationFactorResponse;
184
+ /** The body of `POST /indexes/{name}/suggest`. */
185
+ SuggestResult: SuggestResult;
186
+ /** The body of `GET /tasks`. */
187
+ TaskListPage: TaskListPage;
188
+ /** The body of every route that starts a task, and of `GET /tasks/{id}`. */
189
+ TaskRecord: TaskRecord;
190
+ /** The body of `GET /indexes/{name}/vector-maintenance`. */
191
+ VectorMaintenanceResponse: VectorMaintenanceResponse;
192
+ /** The body of `GET /version`. */
193
+ VersionResponse: VersionResponse;
194
+ }
195
+ /**
196
+ * The name of one schema in the published OpenAPI file.
197
+ *
198
+ * @public
199
+ */
200
+ type HttpWireTypeName = keyof HttpWireTypes;
201
+
15
202
  /**
16
203
  * What a running task reports back while it works, and how it learns that a
17
204
  * cancel arrived.
@@ -125,4 +312,4 @@ declare class InMemoryTaskStore implements TaskStore {
125
312
  private prune;
126
313
  }
127
314
 
128
- export { ImportResult, InMemoryTaskStore, NarsilServer, ServerOptions, type TaskContext, type TaskOperation, TaskProgress, TaskRecord, TaskStore, createServer, httpStatusForNarsilError };
315
+ export { BatchBody, BatchResponse, CapabilitiesResponse, ClusterAllocationResponse, ClusterTopologyResponse, CreateIndexRequest, DocumentBody, DocumentCountResponse, DocumentExistsResponse, DocumentIdResponse, DocumentPutResponse, DocumentRemovedResponse, DocumentResponse, ErrorEnvelope, type HttpCreateIndexBody, type HttpGroupResult, type HttpIndexBody, HttpIndexConfig, type HttpQueryParams, type HttpQueryResult, type HttpWireTypeName, type HttpWireTypes, type ImportDocumentsQuery, ImportResult, InMemoryTaskStore, IndexClearedResponse, IndexCreatedResponse, IndexDroppedResponse, IndexListResponse, IndexPartitionsResponse, IndexStateResponse, InsertBody, LivenessResponse, MemoryStatsResponse, MultiGetBody, MultiGetResponse, NarsilServer, OkResponse, ReadinessResponse, RebalanceBody, type RemoveDocumentQuery, ReplicationFactorBody, ReplicationFactorResponse, ServerOptions, SynonymSetBody, type TaskContext, TaskListPage, TaskListQuery, type TaskOperation, TaskProgress, TaskRecord, TaskStore, VectorFieldBody, VectorMaintenanceResponse, VersionResponse, createServer, httpStatusForNarsilError };
package/dist/server.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { answerRequest } from './chunk-YBWSV5DV.mjs';
2
- import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, 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, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, closeEveryThreadAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS, clearGateSlot, clearBodyBudgetSlot, createCloseAtExitWords, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, isRemoveOnlyBatch, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, respondAnswer, parseTaskListQuery, parseJsonOptional, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, SERVER_CAPABILITIES, toHttpError, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-XABMCBHA.mjs';
3
- export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-XABMCBHA.mjs';
1
+ import { answerRequest } from './chunk-5W7AEVTH.mjs';
2
+ import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, 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, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, PROMETHEUS_TEXT_CONTENT_TYPE, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, closeEveryThreadAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS, clearGateSlot, clearBodyBudgetSlot, createCloseAtExitWords, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, isRemoveOnlyBatch, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, respondAnswer, parseTaskListQuery, parseJsonOptional, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, SERVER_CAPABILITIES, toHttpError, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-RCMNL7RI.mjs';
3
+ export { ASYNC_IMPORT_CAPABILITY, BM25_TUNING_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-RCMNL7RI.mjs';
4
4
  import { rerankOnHost } from './chunk-PATMDIMN.mjs';
5
5
  import { writeBlockLookupOf, indexReadsOf, isRecord, validateIndexName } from './chunk-T4OFG4IQ.mjs';
6
6
  import { readMemoryFigures } from './chunk-4GDLFDPZ.mjs';
@@ -317,7 +317,12 @@ function createClusterHandlers(deps) {
317
317
  }
318
318
  const table = await cluster.getAllocation(indexName);
319
319
  if (table === null) {
320
- respondJson(ctx, { indexName, allocated: false, version: null, partitions: [] });
320
+ respondJson(ctx, {
321
+ indexName,
322
+ allocated: false,
323
+ version: null,
324
+ partitions: []
325
+ });
321
326
  return;
322
327
  }
323
328
  const partitions = [];
@@ -335,7 +340,12 @@ function createClusterHandlers(deps) {
335
340
  });
336
341
  }
337
342
  partitions.sort((left, right) => left.partitionId - right.partitionId);
338
- respondJson(ctx, { indexName, allocated: partitions.length > 0, version: table.version, partitions });
343
+ respondJson(ctx, {
344
+ indexName,
345
+ allocated: partitions.length > 0,
346
+ version: table.version,
347
+ partitions
348
+ });
339
349
  } catch (err) {
340
350
  respondError(ctx, err);
341
351
  }
@@ -837,7 +847,9 @@ function createIndexHandlers(deps) {
837
847
  }
838
848
  async function partitions(ctx) {
839
849
  try {
840
- respondJson(ctx, { partitions: await indexReadsOf(engine).getPartitionStats(ctx.params[0]) });
850
+ respondJson(ctx, {
851
+ partitions: await indexReadsOf(engine).getPartitionStats(ctx.params[0])
852
+ });
841
853
  } catch (err) {
842
854
  respondError(ctx, err);
843
855
  }
@@ -870,7 +882,6 @@ function createIndexHandlers(deps) {
870
882
  }
871
883
 
872
884
  // src/server/handlers/metrics.ts
873
- var PROMETHEUS_TEXT_CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
874
885
  function labelValue(value) {
875
886
  return value.replaceAll("\\", "\\\\").replaceAll('"', '\\"').replaceAll("\n", "\\n");
876
887
  }