@delali/narsil 0.2.2 → 0.2.3-next.33

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 (66) hide show
  1. package/README.md +12 -9
  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-CVqI5NBt.d.ts → adapters-79OIa4xm.d.ts} +1 -1
  8. package/dist/brute-force-DbHYCTc3.d.ts +8 -0
  9. package/dist/chunk-BFIH7OV5.mjs +185 -0
  10. package/dist/chunk-C6VVLMRX.mjs +63 -0
  11. package/dist/{chunk-UNJZ7ZDB.mjs → chunk-EMI63EXP.mjs} +33 -2
  12. package/dist/chunk-MFFAJ2NR.mjs +135 -0
  13. package/dist/chunk-OBXS7OZM.mjs +376 -0
  14. package/dist/{chunk-ASI6AOW2.mjs → chunk-RO4EFWE6.mjs} +7833 -3524
  15. package/dist/{chunk-WLR5BFL3.mjs → chunk-TEAJO7CU.mjs} +3067 -2087
  16. package/dist/{chunk-S7RJJMHI.mjs → chunk-WDL632CN.mjs} +699 -222
  17. package/dist/{chunk-BKAI2WXI.mjs → chunk-WTONLDU3.mjs} +5 -0
  18. package/dist/client-DQHB_swQ.d.ts +793 -0
  19. package/dist/client.d.ts +6 -0
  20. package/dist/client.mjs +843 -0
  21. package/dist/{config-DXypXAfN.d.ts → config-ChZ7lfqc.d.ts} +3 -3
  22. package/dist/direct-executor-YARCDMJF.mjs +8 -0
  23. package/dist/distribution/coordinator/etcd.d.ts +3 -3
  24. package/dist/distribution/coordinator/etcd.mjs +471 -2
  25. package/dist/distribution/coordinator/in-memory.d.ts +3 -3
  26. package/dist/distribution/coordinator/in-memory.mjs +286 -1
  27. package/dist/distribution/transport/grpc.d.ts +45 -0
  28. package/dist/distribution/transport/grpc.mjs +586 -0
  29. package/dist/distribution/transport/in-memory.d.ts +118 -0
  30. package/dist/distribution/transport/in-memory.mjs +214 -0
  31. package/dist/distribution/transport/tcp.d.ts +27 -0
  32. package/dist/distribution/transport/tcp.mjs +595 -0
  33. package/dist/distribution.d.ts +241 -192
  34. package/dist/distribution.mjs +6620 -4795
  35. package/dist/embeddings/openai.d.ts +1 -1
  36. package/dist/embeddings/openai.mjs +1 -1
  37. package/dist/{engine-CO9Wnfie.d.ts → engine-DScGlT2Z.d.ts} +30 -3
  38. package/dist/index.browser.mjs +10035 -3914
  39. package/dist/index.d.ts +8 -8
  40. package/dist/index.mjs +8 -5
  41. package/dist/invalidation/broadcast-channel.d.ts +1 -1
  42. package/dist/invalidation/filesystem.d.ts +1 -1
  43. package/dist/invalidation/filesystem.mjs +3 -1
  44. package/dist/invalidation/noop.d.ts +1 -1
  45. package/dist/options-BORJg5XB.d.ts +234 -0
  46. package/dist/persistence/durability/checkpoint-worker.d.ts +4 -2
  47. package/dist/persistence/durability/checkpoint-worker.mjs +8 -5
  48. package/dist/react.d.ts +340 -0
  49. package/dist/react.mjs +687 -0
  50. package/dist/{schema-CE6S_aAr.d.ts → schema-emTQfEiX.d.ts} +21 -7
  51. package/dist/{search-DLBtiPdQ.d.ts → search-CQ-9bKxo.d.ts} +226 -14
  52. package/dist/server.d.ts +42 -356
  53. package/dist/server.mjs +493 -106
  54. package/dist/tasks-CnMLpfk-.d.ts +274 -0
  55. package/dist/types-BQDlIvfS.d.ts +34 -0
  56. package/dist/{types-BV3nAKTL.d.ts → types-Bfhhnh3G.d.ts} +23 -1
  57. package/dist/types-D5OwhtsQ.d.ts +97 -0
  58. package/dist/vector/hnsw-build-worker.d.ts +2 -7
  59. package/dist/vector/hnsw-build-worker.mjs +2 -1
  60. package/dist/vector/search-worker.d.ts +373 -0
  61. package/dist/vector/search-worker.mjs +279 -0
  62. package/dist/workers/entry.mjs +43 -25
  63. package/package.json +42 -2
  64. package/dist/chunk-FKK76OR7.mjs +0 -456
  65. package/dist/chunk-RQLXC2YS.mjs +0 -269
  66. package/dist/direct-executor-3W4QRA4E.mjs +0 -5
@@ -1,4 +1,4 @@
1
- import { E as EmbeddingAdapter } from '../adapters-CVqI5NBt.js';
1
+ import { E as EmbeddingAdapter } from '../adapters-79OIa4xm.js';
2
2
 
3
3
  /**
4
4
  * How {@link createOpenAIEmbedding} reaches an embeddings endpoint.
@@ -1,4 +1,4 @@
1
- import { NarsilError, ErrorCodes } from '../chunk-UNJZ7ZDB.mjs';
1
+ import { NarsilError, ErrorCodes } from '../chunk-EMI63EXP.mjs';
2
2
 
3
3
  // src/embeddings/openai.ts
4
4
  var RETRYABLE_STATUS_CODES = /* @__PURE__ */ new Set([429, 500, 502, 503]);
@@ -1,6 +1,6 @@
1
- import { E as EmbeddingAdapter } from './adapters-CVqI5NBt.js';
2
- import { I as IndexInfo, m as IndexStats, P as PartitionStatsResult, B as BatchResult, Q as QueryParams, q as QueryResult, n as PreflightResult, t as SuggestParams, u as SuggestResult, M as MemoryStats, V as VectorMaintenanceResult } from './search-DLBtiPdQ.js';
3
- import { I as IndexConfig, A as AnyDocument, a as InsertOptions, P as PartitionConfig } from './schema-CE6S_aAr.js';
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
  *