@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
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-
|
|
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,
|
|
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 };
|