@delali/narsil 0.3.1-next.80 → 0.3.1-next.83
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/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/{capabilities-CcTDWh_P.d.ts → capabilities-CAdkp2P-.d.ts} +2 -2
- package/dist/{chunk-HJASKX4F.mjs → chunk-2453RJYK.mjs} +2 -2
- package/dist/{chunk-4QDQEJDV.mjs → chunk-4D6OH4EF.mjs} +6 -6
- package/dist/{chunk-P2PYEZZE.mjs → chunk-4VBG6PEH.mjs} +3 -3
- package/dist/{chunk-Y3L5MDRV.mjs → chunk-5XNIRLFC.mjs} +2 -2
- package/dist/{chunk-NSXQCE4K.mjs → chunk-7JZZ3HNV.mjs} +208 -48
- package/dist/{chunk-2E35UM3G.mjs → chunk-B3UOQJD3.mjs} +1 -1
- package/dist/{chunk-K4FZ55Q2.mjs → chunk-CUP2E4OH.mjs} +175 -99
- package/dist/{chunk-MEOOYKWL.mjs → chunk-GNYXCLJS.mjs} +4 -4
- package/dist/{chunk-OSF3SGJV.mjs → chunk-KJ7LB3TR.mjs} +2 -2
- package/dist/{chunk-DQABW5UQ.mjs → chunk-LS5IRM23.mjs} +1 -1
- package/dist/{chunk-4MQ5F4IL.mjs → chunk-OLXM65YH.mjs} +1 -1
- package/dist/{chunk-23HJ5QXQ.mjs → chunk-RZXNWQSM.mjs} +183 -94
- package/dist/{chunk-R2XCJIO7.mjs → chunk-SREPGC6O.mjs} +2 -2
- package/dist/{chunk-I64LXKO3.mjs → chunk-TPJU7NDJ.mjs} +1 -0
- package/dist/{chunk-YGLSR7BC.mjs → chunk-XYDP7CCJ.mjs} +5 -5
- package/dist/{chunk-QPYV22XH.mjs → chunk-XZF4LZ3X.mjs} +4 -3
- package/dist/{chunk-GG2FBGVZ.mjs → chunk-ZCKPRCYI.mjs} +1 -1
- package/dist/{client-CsybN673.d.ts → client-CKUtkLz3.d.ts} +2 -2
- package/dist/client.d.ts +7 -7
- package/dist/client.mjs +1 -0
- package/dist/{config-CFonR_gY.d.ts → config-BuIkeM5C.d.ts} +39 -3
- package/dist/{config-BCNQtszf.d.ts → config-CSDEPraV.d.ts} +1 -1
- package/dist/direct-executor-6HASZ36Y.mjs +19 -0
- package/dist/distribution/coordinator/etcd.d.ts +1 -1
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +1 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +7 -7
- package/dist/distribution.mjs +756 -64
- package/dist/embeddings/openai.mjs +1 -1
- package/dist/{engine-B0oIF1_r.d.ts → engine-DMNZJAUq.d.ts} +1 -1
- package/dist/{types-ChrVy4lH.d.ts → index-DzONZUKE.d.ts} +79 -37
- package/dist/index.browser.mjs +426 -249
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +14 -14
- package/dist/{memory-B6SBOKlS.d.ts → memory-BPKNx9Tl.d.ts} +1 -0
- package/dist/partial-words.mjs +4 -4
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.mjs +14 -14
- package/dist/react.d.ts +6 -6
- package/dist/react.mjs +1 -0
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +18 -13
- package/dist/{tasks-CYAQe6qd.d.ts → tasks-DGyz586z.d.ts} +1 -1
- package/dist/{thread-P6QJ2Q5O.mjs → thread-33M5AOEI.mjs} +10 -10
- package/dist/vector/search-worker.d.ts +2 -0
- package/dist/vector/search-worker.mjs +8 -7
- package/dist/workers/entry.mjs +5 -5
- package/package.json +11 -7
- package/dist/direct-executor-VNMQ6NIH.mjs +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NarsilConfig } from './config-
|
|
2
|
-
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './
|
|
1
|
+
import { N as NarsilConfig } from './config-CSDEPraV.js';
|
|
2
|
+
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-DzONZUKE.js';
|
|
3
3
|
import { N as NodeTransport } from './types-Cb9kiY5P.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -56,9 +56,45 @@ interface ClusterNodeConfig {
|
|
|
56
56
|
query?: ClusterQueryConfig;
|
|
57
57
|
/** These settings govern how this node stands for controller election, and anything you leave out keeps its default. */
|
|
58
58
|
controller?: ClusterControllerConfig;
|
|
59
|
+
/** These settings govern when this node's memory blocks writes across the cluster, and anything you leave out keeps its default. */
|
|
60
|
+
memory?: ClusterMemoryConfig;
|
|
59
61
|
/** This receives the failures the node reports while running on its own, away from any call you made. */
|
|
60
62
|
onError?: (error: Error) => void;
|
|
61
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* When this node counts as full, which is what makes the cluster refuse inserts and updates to every index with a
|
|
66
|
+
* copy on the node.
|
|
67
|
+
*
|
|
68
|
+
* The node measures its process memory against the container's limit, or the host's memory where no container sets
|
|
69
|
+
* one, and its main thread's heap against the heap limit, once a second. It counts as full once either figure passes
|
|
70
|
+
* `blockWritesAbove` of its limit, and as clear again once both fall below `resumeWritesBelow`, so that a node hovering
|
|
71
|
+
* at the threshold does not switch writes on and off. Removes and searches go through while the node is full, which is
|
|
72
|
+
* how an operator frees memory.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
interface ClusterMemoryConfig {
|
|
77
|
+
/**
|
|
78
|
+
* The node counts as full once either memory figure passes this fraction of its limit. It must lie above
|
|
79
|
+
* `resumeWritesBelow` and at most 1, and it is 0.9 where you name none.
|
|
80
|
+
*/
|
|
81
|
+
blockWritesAbove?: number;
|
|
82
|
+
/**
|
|
83
|
+
* A full node counts as clear again once both memory figures fall below this fraction of their limits. It must lie
|
|
84
|
+
* above 0 and below `blockWritesAbove`, and it is 0.8 where you name none.
|
|
85
|
+
*/
|
|
86
|
+
resumeWritesBelow?: number;
|
|
87
|
+
/**
|
|
88
|
+
* The node holds at most this fraction of its heap limit in the documents of inserts and updates that it has
|
|
89
|
+
* accepted and not yet finished, counting both the writes that clients send it and the writes that other nodes
|
|
90
|
+
* forward to it as primary. It refuses a write whose documents would carry that total past the limit with
|
|
91
|
+
* `CLUSTER_WRITE_BLOCKED`, and the error's details include the reason `write_bytes_in_flight`. It never refuses a
|
|
92
|
+
* replicated entry or a remove. The fraction must lie above 0 and at most 1, and it is 0.02 where you name none,
|
|
93
|
+
* which is low because indexing a document can take many times the size of its text in heap. A value of 1 allows
|
|
94
|
+
* writes in flight up to the whole heap limit.
|
|
95
|
+
*/
|
|
96
|
+
inFlightWriteFraction?: number;
|
|
97
|
+
}
|
|
62
98
|
/**
|
|
63
99
|
* How long this node's turn as controller survives a fault, and how often it
|
|
64
100
|
* stands for election again.
|
|
@@ -198,4 +234,4 @@ interface ClusterNodeInfo {
|
|
|
198
234
|
status: string;
|
|
199
235
|
}
|
|
200
236
|
|
|
201
|
-
export type { ClusterNamespace as C, NodeReadiness as N, ReplicationConfig as R, CreateIndexOptions as a, ClusterNodeConfig as b, ClusterControllerConfig as c,
|
|
237
|
+
export type { ClusterNamespace as C, NodeReadiness as N, ReplicationConfig as R, CreateIndexOptions as a, ClusterNodeConfig as b, ClusterControllerConfig as c, ClusterMemoryConfig as d, ClusterNodeInfo as e, ClusterQueryConfig as f };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
-
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-
|
|
2
|
+
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-BPKNx9Tl.js';
|
|
3
3
|
import { I as IndexConfig, A as AnyDocument } from './schema-DgyDijhf.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { createDirectExecutor } from './chunk-CUP2E4OH.mjs';
|
|
2
|
+
import './chunk-XYDP7CCJ.mjs';
|
|
3
|
+
import './chunk-OLXM65YH.mjs';
|
|
4
|
+
import './chunk-ZCKPRCYI.mjs';
|
|
5
|
+
import './chunk-TGP5M5R7.mjs';
|
|
6
|
+
import './chunk-RZXNWQSM.mjs';
|
|
7
|
+
import './chunk-ZJ4CSAB2.mjs';
|
|
8
|
+
import './chunk-B3UOQJD3.mjs';
|
|
9
|
+
import './chunk-SREPGC6O.mjs';
|
|
10
|
+
import './chunk-WQBCBKY3.mjs';
|
|
11
|
+
import './chunk-4VBG6PEH.mjs';
|
|
12
|
+
import './chunk-KJ7LB3TR.mjs';
|
|
13
|
+
import './chunk-KEHK2O6P.mjs';
|
|
14
|
+
import './chunk-GES7U2PM.mjs';
|
|
15
|
+
import './chunk-LS5IRM23.mjs';
|
|
16
|
+
import './chunk-U2BKYEC7.mjs';
|
|
17
|
+
import './chunk-R6A773WK.mjs';
|
|
18
|
+
import './chunk-YTJCGKM4.mjs';
|
|
19
|
+
import './chunk-TPJU7NDJ.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MAX_NODE_ID_LENGTH, MAX_WATCHERS } from '../../chunk-ORBLD3EL.mjs';
|
|
2
2
|
import '../../chunk-R6A773WK.mjs';
|
|
3
3
|
import { compareCodePoints } from '../../chunk-YTJCGKM4.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from '../../chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from '../../chunk-TPJU7NDJ.mjs';
|
|
5
5
|
import { decode, encode } from '@msgpack/msgpack';
|
|
6
6
|
|
|
7
7
|
// src/distribution/coordinator/etcd/constants.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-OOSIDHA3.mjs';
|
|
2
2
|
import { MAX_MESSAGE_SIZE_BYTES, GRPC_KEEPALIVE_TIMEOUT_MS, GRPC_KEEPALIVE_TIME_MS, GRPC_ENVELOPE_OVERHEAD_BYTES } from '../../chunk-UNEEFTEU.mjs';
|
|
3
3
|
import { TransportError, TransportErrorCodes } from '../../chunk-GCM3JFVA.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from '../../chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from '../../chunk-TPJU7NDJ.mjs';
|
|
5
5
|
|
|
6
6
|
// src/distribution/transport/grpc/codec.ts
|
|
7
7
|
var FIELD_ONE_LENGTH_DELIMITED_KEY = 10;
|
package/dist/distribution.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-
|
|
2
|
-
export { c as ClusterControllerConfig, d as
|
|
3
|
-
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-
|
|
1
|
+
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-BuIkeM5C.js';
|
|
2
|
+
export { c as ClusterControllerConfig, d as ClusterMemoryConfig, e as ClusterNodeInfo, f as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-BuIkeM5C.js';
|
|
3
|
+
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-BPKNx9Tl.js';
|
|
4
4
|
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-DgyDijhf.js';
|
|
5
|
-
import { b as NodeCapacity, N as NodeRole } from './
|
|
6
|
-
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, e as NodeEvent, a as NodeRegistration, P as PartitionAssignment,
|
|
7
|
-
import { N as Narsil } from './engine-
|
|
5
|
+
import { b as NodeCapacity, N as NodeRole } from './index-DzONZUKE.js';
|
|
6
|
+
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexPartitionBytes, e as NodeEvent, f as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, g as PartitionState, S as SchemaEvent, U as UnassignedReason } from './index-DzONZUKE.js';
|
|
7
|
+
import { N as Narsil } from './engine-DMNZJAUq.js';
|
|
8
8
|
export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-Cb9kiY5P.js';
|
|
9
|
-
import './config-
|
|
9
|
+
import './config-CSDEPraV.js';
|
|
10
10
|
import './adapters-79OIa4xm.js';
|
|
11
11
|
|
|
12
12
|
/**
|