@delali/narsil 0.2.2 → 0.2.3-next.32
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/README.md +12 -9
- package/dist/adapters/filesystem.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/{adapters-CVqI5NBt.d.ts → adapters-79OIa4xm.d.ts} +1 -1
- package/dist/brute-force-DbHYCTc3.d.ts +8 -0
- package/dist/chunk-BFIH7OV5.mjs +185 -0
- package/dist/chunk-C6VVLMRX.mjs +63 -0
- package/dist/{chunk-UNJZ7ZDB.mjs → chunk-EMI63EXP.mjs} +33 -2
- package/dist/chunk-MFFAJ2NR.mjs +135 -0
- package/dist/chunk-OBXS7OZM.mjs +376 -0
- package/dist/{chunk-ASI6AOW2.mjs → chunk-RO4EFWE6.mjs} +7833 -3524
- package/dist/{chunk-WLR5BFL3.mjs → chunk-TEAJO7CU.mjs} +3067 -2087
- package/dist/{chunk-S7RJJMHI.mjs → chunk-WDL632CN.mjs} +699 -222
- package/dist/{chunk-BKAI2WXI.mjs → chunk-WTONLDU3.mjs} +5 -0
- package/dist/client-DQHB_swQ.d.ts +793 -0
- package/dist/client.d.ts +6 -0
- package/dist/client.mjs +843 -0
- package/dist/{config-DXypXAfN.d.ts → config-ChZ7lfqc.d.ts} +3 -3
- package/dist/direct-executor-YARCDMJF.mjs +8 -0
- package/dist/distribution/coordinator/etcd.d.ts +3 -3
- package/dist/distribution/coordinator/etcd.mjs +471 -2
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/coordinator/in-memory.mjs +286 -1
- package/dist/distribution/transport/grpc.d.ts +45 -0
- package/dist/distribution/transport/grpc.mjs +586 -0
- package/dist/distribution/transport/in-memory.d.ts +118 -0
- package/dist/distribution/transport/in-memory.mjs +214 -0
- package/dist/distribution/transport/tcp.d.ts +27 -0
- package/dist/distribution/transport/tcp.mjs +595 -0
- package/dist/distribution.d.ts +241 -192
- package/dist/distribution.mjs +6620 -4795
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +1 -1
- package/dist/{engine-CO9Wnfie.d.ts → engine-DScGlT2Z.d.ts} +30 -3
- package/dist/index.browser.mjs +10035 -3914
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +8 -5
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +3 -1
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/options-BORJg5XB.d.ts +234 -0
- package/dist/persistence/durability/checkpoint-worker.d.ts +4 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +8 -5
- package/dist/react.d.ts +340 -0
- package/dist/react.mjs +687 -0
- package/dist/{schema-CE6S_aAr.d.ts → schema-emTQfEiX.d.ts} +21 -7
- package/dist/{search-DLBtiPdQ.d.ts → search-CQ-9bKxo.d.ts} +226 -14
- package/dist/server.d.ts +42 -356
- package/dist/server.mjs +493 -106
- package/dist/tasks-CnMLpfk-.d.ts +274 -0
- package/dist/types-BQDlIvfS.d.ts +34 -0
- package/dist/{types-BV3nAKTL.d.ts → types-Bfhhnh3G.d.ts} +23 -1
- package/dist/types-D5OwhtsQ.d.ts +97 -0
- package/dist/vector/hnsw-build-worker.d.ts +2 -7
- package/dist/vector/hnsw-build-worker.mjs +2 -1
- package/dist/vector/search-worker.d.ts +373 -0
- package/dist/vector/search-worker.mjs +279 -0
- package/dist/workers/entry.mjs +43 -25
- package/package.json +42 -2
- package/dist/chunk-FKK76OR7.mjs +0 -456
- package/dist/chunk-RQLXC2YS.mjs +0 -269
- package/dist/direct-executor-3W4QRA4E.mjs +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EmbeddingAdapter } from './adapters-
|
|
2
|
-
import { I as IndexInfo,
|
|
3
|
-
import { I as IndexConfig, A as AnyDocument, a as InsertOptions, P as PartitionConfig } from './schema-
|
|
1
|
+
import { E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
+
import { I as IndexInfo, f as IndexStats, P as PartitionStatsResult, B as BatchResult, L as ListParams, g as ListResult, Q as QueryParams, e as QueryResult, h as PreflightResult, i as SuggestParams, j as SuggestResult, M as MemoryStats, V as VectorMaintenanceResult } from './search-CQ-9bKxo.js';
|
|
3
|
+
import { I as IndexConfig, A as AnyDocument, a as InsertOptions, P as PartitionConfig } from './schema-emTQfEiX.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Every event the engine emits, with the payload each one carries.
|
|
@@ -251,6 +251,33 @@ interface Narsil {
|
|
|
251
251
|
* @returns The document count across every partition.
|
|
252
252
|
*/
|
|
253
253
|
countDocuments(indexName: string): Promise<number>;
|
|
254
|
+
/**
|
|
255
|
+
* Reads one page of stored documents in document-id order, without
|
|
256
|
+
* searching, which is how you page through a whole index.
|
|
257
|
+
*
|
|
258
|
+
* Leave `cursor` out for the first page, pass the returned cursor back for
|
|
259
|
+
* each page after it, and stop when the cursor comes back null. A document
|
|
260
|
+
* that stays in the index for the whole listing comes back exactly once. The
|
|
261
|
+
* engine skips a document you remove part-way through. It returns one you
|
|
262
|
+
* insert part-way through once that document's id sorts above the cursor.
|
|
263
|
+
* The cursor holds no engine state, so it stays valid after a restart, a
|
|
264
|
+
* snapshot restore, and a rebalance.
|
|
265
|
+
*
|
|
266
|
+
* The engine compares document ids by their UTF-16 code units, so `"10"`
|
|
267
|
+
* sorts ahead of `"9"`.
|
|
268
|
+
*
|
|
269
|
+
* Set `document` to drop a vector field, because the engine otherwise reads
|
|
270
|
+
* every listed document's vector back out of the index.
|
|
271
|
+
*
|
|
272
|
+
* @typeParam T - Shape of the stored documents, which flows through to each
|
|
273
|
+
* entry's `document`.
|
|
274
|
+
* @param indexName - The index to walk.
|
|
275
|
+
* @param params - These set the cursor, the page size, the filter, and how
|
|
276
|
+
* much of each document comes back.
|
|
277
|
+
* @returns The page, the cursor for the next page, how many documents the
|
|
278
|
+
* listing walks in total, and the time the page took.
|
|
279
|
+
*/
|
|
280
|
+
listDocuments<T = AnyDocument>(indexName: string, params?: ListParams): Promise<ListResult<T>>;
|
|
254
281
|
/**
|
|
255
282
|
* Runs a search against an index and returns the ranked hits.
|
|
256
283
|
*
|