@ruvector/edge-full 0.1.0
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/LICENSE +21 -0
- package/README.md +390 -0
- package/dag/ruvector_dag_wasm.d.ts +105 -0
- package/dag/ruvector_dag_wasm.js +466 -0
- package/dag/ruvector_dag_wasm_bg.wasm +0 -0
- package/dag/ruvector_dag_wasm_bg.wasm.d.ts +20 -0
- package/edge/ruvector_edge.d.ts +351 -0
- package/edge/ruvector_edge.js +1452 -0
- package/edge/ruvector_edge_bg.wasm +0 -0
- package/edge/ruvector_edge_bg.wasm.d.ts +71 -0
- package/generator.html +2009 -0
- package/graph/ruvector_graph_wasm.d.ts +380 -0
- package/graph/ruvector_graph_wasm.js +1787 -0
- package/graph/ruvector_graph_wasm_bg.wasm +0 -0
- package/graph/ruvector_graph_wasm_bg.wasm.d.ts +80 -0
- package/index.d.ts +64 -0
- package/index.js +182 -0
- package/onnx/ruvector_onnx_embeddings_wasm.d.ts +112 -0
- package/onnx/ruvector_onnx_embeddings_wasm.js +635 -0
- package/onnx/ruvector_onnx_embeddings_wasm_bg.js +629 -0
- package/onnx/ruvector_onnx_embeddings_wasm_bg.wasm +0 -0
- package/onnx/ruvector_onnx_embeddings_wasm_bg.wasm.d.ts +29 -0
- package/package.json +86 -0
- package/rvlite/rvlite.d.ts +556 -0
- package/rvlite/rvlite.js +2366 -0
- package/rvlite/rvlite_bg.wasm +0 -0
- package/rvlite/rvlite_bg.wasm.d.ts +128 -0
- package/sona/ruvector_sona.d.ts +513 -0
- package/sona/ruvector_sona.js +1290 -0
- package/sona/ruvector_sona_bg.wasm +0 -0
- package/sona/ruvector_sona_bg.wasm.d.ts +53 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class AsyncQueryExecutor {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
/**
|
|
8
|
+
* Execute query in a Web Worker for background processing
|
|
9
|
+
*/
|
|
10
|
+
executeInWorker(_query: string): Promise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* Execute query asynchronously with streaming results
|
|
13
|
+
* This is useful for large result sets
|
|
14
|
+
*/
|
|
15
|
+
executeStreaming(_query: string): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new async query executor
|
|
18
|
+
*/
|
|
19
|
+
constructor(batch_size?: number | null);
|
|
20
|
+
/**
|
|
21
|
+
* Get batch size
|
|
22
|
+
*/
|
|
23
|
+
batchSize: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class AsyncTransaction {
|
|
27
|
+
free(): void;
|
|
28
|
+
[Symbol.dispose](): void;
|
|
29
|
+
/**
|
|
30
|
+
* Add operation to transaction
|
|
31
|
+
*/
|
|
32
|
+
addOperation(operation: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Create a new transaction
|
|
35
|
+
*/
|
|
36
|
+
constructor();
|
|
37
|
+
/**
|
|
38
|
+
* Commit transaction asynchronously
|
|
39
|
+
*/
|
|
40
|
+
commit(): Promise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* Rollback transaction
|
|
43
|
+
*/
|
|
44
|
+
rollback(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Check if committed
|
|
47
|
+
*/
|
|
48
|
+
readonly isCommitted: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Get operation count
|
|
51
|
+
*/
|
|
52
|
+
readonly operationCount: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class BatchOperations {
|
|
56
|
+
free(): void;
|
|
57
|
+
[Symbol.dispose](): void;
|
|
58
|
+
/**
|
|
59
|
+
* Execute multiple Cypher statements in batch
|
|
60
|
+
*/
|
|
61
|
+
executeBatch(statements: string[]): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* Create a new batch operations handler
|
|
64
|
+
*/
|
|
65
|
+
constructor(max_batch_size?: number | null);
|
|
66
|
+
/**
|
|
67
|
+
* Get max batch size
|
|
68
|
+
*/
|
|
69
|
+
readonly maxBatchSize: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export class GraphDB {
|
|
73
|
+
free(): void;
|
|
74
|
+
[Symbol.dispose](): void;
|
|
75
|
+
/**
|
|
76
|
+
* Create a new edge (relationship)
|
|
77
|
+
*
|
|
78
|
+
* # Arguments
|
|
79
|
+
* * `from` - Source node ID
|
|
80
|
+
* * `to` - Target node ID
|
|
81
|
+
* * `edge_type` - Relationship type
|
|
82
|
+
* * `properties` - JavaScript object with edge properties
|
|
83
|
+
*
|
|
84
|
+
* # Returns
|
|
85
|
+
* Edge ID
|
|
86
|
+
*/
|
|
87
|
+
createEdge(from: string, to: string, edge_type: string, properties: any): string;
|
|
88
|
+
/**
|
|
89
|
+
* Create a new node
|
|
90
|
+
*
|
|
91
|
+
* # Arguments
|
|
92
|
+
* * `labels` - Array of label strings
|
|
93
|
+
* * `properties` - JavaScript object with node properties
|
|
94
|
+
*
|
|
95
|
+
* # Returns
|
|
96
|
+
* Node ID
|
|
97
|
+
*/
|
|
98
|
+
createNode(labels: string[], properties: any): string;
|
|
99
|
+
/**
|
|
100
|
+
* Delete an edge by ID
|
|
101
|
+
*/
|
|
102
|
+
deleteEdge(id: string): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Delete a node by ID
|
|
105
|
+
*
|
|
106
|
+
* # Arguments
|
|
107
|
+
* * `id` - Node ID
|
|
108
|
+
*
|
|
109
|
+
* # Returns
|
|
110
|
+
* True if deleted, false if not found
|
|
111
|
+
*/
|
|
112
|
+
deleteNode(id: string): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Export database as Cypher CREATE statements
|
|
115
|
+
*
|
|
116
|
+
* # Returns
|
|
117
|
+
* String containing Cypher statements
|
|
118
|
+
*/
|
|
119
|
+
exportCypher(): string;
|
|
120
|
+
/**
|
|
121
|
+
* Get a hyperedge by ID
|
|
122
|
+
*/
|
|
123
|
+
getHyperedge(id: string): JsHyperedge | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Import Cypher statements
|
|
126
|
+
*
|
|
127
|
+
* # Arguments
|
|
128
|
+
* * `statements` - Array of Cypher CREATE statements
|
|
129
|
+
*
|
|
130
|
+
* # Returns
|
|
131
|
+
* Number of statements executed
|
|
132
|
+
*/
|
|
133
|
+
importCypher(statements: string[]): Promise<number>;
|
|
134
|
+
/**
|
|
135
|
+
* Create a hyperedge (n-ary relationship)
|
|
136
|
+
*
|
|
137
|
+
* # Arguments
|
|
138
|
+
* * `nodes` - Array of node IDs
|
|
139
|
+
* * `description` - Natural language description of the relationship
|
|
140
|
+
* * `embedding` - Optional embedding vector (auto-generated if not provided)
|
|
141
|
+
* * `confidence` - Optional confidence score (0.0-1.0, defaults to 1.0)
|
|
142
|
+
*
|
|
143
|
+
* # Returns
|
|
144
|
+
* Hyperedge ID
|
|
145
|
+
*/
|
|
146
|
+
createHyperedge(nodes: string[], description: string, embedding?: Float32Array | null, confidence?: number | null): string;
|
|
147
|
+
/**
|
|
148
|
+
* Create a new GraphDB instance
|
|
149
|
+
*
|
|
150
|
+
* # Arguments
|
|
151
|
+
* * `metric` - Distance metric for hypergraph embeddings ("euclidean", "cosine", "dotproduct", "manhattan")
|
|
152
|
+
*/
|
|
153
|
+
constructor(metric?: string | null);
|
|
154
|
+
/**
|
|
155
|
+
* Execute a Cypher query (basic implementation)
|
|
156
|
+
*
|
|
157
|
+
* # Arguments
|
|
158
|
+
* * `cypher` - Cypher query string
|
|
159
|
+
*
|
|
160
|
+
* # Returns
|
|
161
|
+
* Promise<QueryResult> with matching nodes, edges, and hyperedges
|
|
162
|
+
*/
|
|
163
|
+
query(cypher: string): Promise<QueryResult>;
|
|
164
|
+
/**
|
|
165
|
+
* Get database statistics
|
|
166
|
+
*/
|
|
167
|
+
stats(): any;
|
|
168
|
+
/**
|
|
169
|
+
* Get an edge by ID
|
|
170
|
+
*/
|
|
171
|
+
getEdge(id: string): JsEdge | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Get a node by ID
|
|
174
|
+
*
|
|
175
|
+
* # Arguments
|
|
176
|
+
* * `id` - Node ID
|
|
177
|
+
*
|
|
178
|
+
* # Returns
|
|
179
|
+
* JsNode or null if not found
|
|
180
|
+
*/
|
|
181
|
+
getNode(id: string): JsNode | undefined;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export class JsEdge {
|
|
185
|
+
private constructor();
|
|
186
|
+
free(): void;
|
|
187
|
+
[Symbol.dispose](): void;
|
|
188
|
+
getProperty(key: string): any;
|
|
189
|
+
readonly properties: any;
|
|
190
|
+
readonly id: string;
|
|
191
|
+
readonly to: string;
|
|
192
|
+
readonly from: string;
|
|
193
|
+
readonly type: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export class JsHyperedge {
|
|
197
|
+
private constructor();
|
|
198
|
+
free(): void;
|
|
199
|
+
[Symbol.dispose](): void;
|
|
200
|
+
readonly confidence: number;
|
|
201
|
+
readonly properties: any;
|
|
202
|
+
readonly description: string;
|
|
203
|
+
readonly id: string;
|
|
204
|
+
readonly nodes: string[];
|
|
205
|
+
readonly order: number;
|
|
206
|
+
readonly embedding: Float32Array;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export class JsNode {
|
|
210
|
+
private constructor();
|
|
211
|
+
free(): void;
|
|
212
|
+
[Symbol.dispose](): void;
|
|
213
|
+
/**
|
|
214
|
+
* Get a specific property value
|
|
215
|
+
*/
|
|
216
|
+
getProperty(key: string): any;
|
|
217
|
+
/**
|
|
218
|
+
* Check if node has a specific label
|
|
219
|
+
*/
|
|
220
|
+
hasLabel(label: string): boolean;
|
|
221
|
+
readonly properties: any;
|
|
222
|
+
readonly id: string;
|
|
223
|
+
readonly labels: string[];
|
|
224
|
+
readonly embedding: Float32Array | undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export class QueryResult {
|
|
228
|
+
private constructor();
|
|
229
|
+
free(): void;
|
|
230
|
+
[Symbol.dispose](): void;
|
|
231
|
+
/**
|
|
232
|
+
* Check if result is empty
|
|
233
|
+
*/
|
|
234
|
+
isEmpty(): boolean;
|
|
235
|
+
readonly hyperedges: JsHyperedge[];
|
|
236
|
+
readonly data: any;
|
|
237
|
+
readonly count: number;
|
|
238
|
+
readonly edges: JsEdge[];
|
|
239
|
+
readonly nodes: JsNode[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export class ResultStream {
|
|
243
|
+
free(): void;
|
|
244
|
+
[Symbol.dispose](): void;
|
|
245
|
+
/**
|
|
246
|
+
* Get next chunk of results
|
|
247
|
+
*/
|
|
248
|
+
nextChunk(): Promise<any>;
|
|
249
|
+
/**
|
|
250
|
+
* Create a new result stream
|
|
251
|
+
*/
|
|
252
|
+
constructor(chunk_size?: number | null);
|
|
253
|
+
/**
|
|
254
|
+
* Reset stream to beginning
|
|
255
|
+
*/
|
|
256
|
+
reset(): void;
|
|
257
|
+
/**
|
|
258
|
+
* Get chunk size
|
|
259
|
+
*/
|
|
260
|
+
readonly chunkSize: number;
|
|
261
|
+
/**
|
|
262
|
+
* Get current offset
|
|
263
|
+
*/
|
|
264
|
+
readonly offset: number;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Initialize panic hook for better error messages
|
|
269
|
+
*/
|
|
270
|
+
export function init(): void;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Get version information
|
|
274
|
+
*/
|
|
275
|
+
export function version(): string;
|
|
276
|
+
|
|
277
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
278
|
+
|
|
279
|
+
export interface InitOutput {
|
|
280
|
+
readonly memory: WebAssembly.Memory;
|
|
281
|
+
readonly __wbg_asyncqueryexecutor_free: (a: number, b: number) => void;
|
|
282
|
+
readonly __wbg_asynctransaction_free: (a: number, b: number) => void;
|
|
283
|
+
readonly __wbg_graphdb_free: (a: number, b: number) => void;
|
|
284
|
+
readonly __wbg_jsedge_free: (a: number, b: number) => void;
|
|
285
|
+
readonly __wbg_jshyperedge_free: (a: number, b: number) => void;
|
|
286
|
+
readonly __wbg_jsnode_free: (a: number, b: number) => void;
|
|
287
|
+
readonly __wbg_queryresult_free: (a: number, b: number) => void;
|
|
288
|
+
readonly __wbg_resultstream_free: (a: number, b: number) => void;
|
|
289
|
+
readonly asyncqueryexecutor_batchSize: (a: number) => number;
|
|
290
|
+
readonly asyncqueryexecutor_executeInWorker: (a: number, b: number, c: number) => number;
|
|
291
|
+
readonly asyncqueryexecutor_executeStreaming: (a: number, b: number, c: number) => number;
|
|
292
|
+
readonly asyncqueryexecutor_new: (a: number) => number;
|
|
293
|
+
readonly asyncqueryexecutor_set_batchSize: (a: number, b: number) => void;
|
|
294
|
+
readonly asynctransaction_addOperation: (a: number, b: number, c: number) => void;
|
|
295
|
+
readonly asynctransaction_commit: (a: number) => number;
|
|
296
|
+
readonly asynctransaction_isCommitted: (a: number) => number;
|
|
297
|
+
readonly asynctransaction_new: () => number;
|
|
298
|
+
readonly asynctransaction_operationCount: (a: number) => number;
|
|
299
|
+
readonly asynctransaction_rollback: (a: number) => void;
|
|
300
|
+
readonly batchoperations_executeBatch: (a: number, b: number, c: number) => number;
|
|
301
|
+
readonly batchoperations_new: (a: number) => number;
|
|
302
|
+
readonly graphdb_createEdge: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
303
|
+
readonly graphdb_createHyperedge: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
304
|
+
readonly graphdb_createNode: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
305
|
+
readonly graphdb_deleteEdge: (a: number, b: number, c: number) => number;
|
|
306
|
+
readonly graphdb_deleteNode: (a: number, b: number, c: number) => number;
|
|
307
|
+
readonly graphdb_exportCypher: (a: number, b: number) => void;
|
|
308
|
+
readonly graphdb_getEdge: (a: number, b: number, c: number) => number;
|
|
309
|
+
readonly graphdb_getHyperedge: (a: number, b: number, c: number) => number;
|
|
310
|
+
readonly graphdb_getNode: (a: number, b: number, c: number) => number;
|
|
311
|
+
readonly graphdb_importCypher: (a: number, b: number, c: number) => number;
|
|
312
|
+
readonly graphdb_new: (a: number, b: number, c: number) => void;
|
|
313
|
+
readonly graphdb_query: (a: number, b: number, c: number) => number;
|
|
314
|
+
readonly graphdb_stats: (a: number) => number;
|
|
315
|
+
readonly jsedge_from: (a: number, b: number) => void;
|
|
316
|
+
readonly jsedge_getProperty: (a: number, b: number, c: number) => number;
|
|
317
|
+
readonly jsedge_id: (a: number, b: number) => void;
|
|
318
|
+
readonly jsedge_properties: (a: number) => number;
|
|
319
|
+
readonly jsedge_to: (a: number, b: number) => void;
|
|
320
|
+
readonly jsedge_type: (a: number, b: number) => void;
|
|
321
|
+
readonly jshyperedge_confidence: (a: number) => number;
|
|
322
|
+
readonly jshyperedge_description: (a: number, b: number) => void;
|
|
323
|
+
readonly jshyperedge_embedding: (a: number, b: number) => void;
|
|
324
|
+
readonly jshyperedge_id: (a: number, b: number) => void;
|
|
325
|
+
readonly jshyperedge_nodes: (a: number, b: number) => void;
|
|
326
|
+
readonly jshyperedge_order: (a: number) => number;
|
|
327
|
+
readonly jshyperedge_properties: (a: number) => number;
|
|
328
|
+
readonly jsnode_embedding: (a: number, b: number) => void;
|
|
329
|
+
readonly jsnode_getProperty: (a: number, b: number, c: number) => number;
|
|
330
|
+
readonly jsnode_hasLabel: (a: number, b: number, c: number) => number;
|
|
331
|
+
readonly jsnode_id: (a: number, b: number) => void;
|
|
332
|
+
readonly jsnode_labels: (a: number, b: number) => void;
|
|
333
|
+
readonly jsnode_properties: (a: number) => number;
|
|
334
|
+
readonly queryresult_count: (a: number) => number;
|
|
335
|
+
readonly queryresult_data: (a: number) => number;
|
|
336
|
+
readonly queryresult_edges: (a: number, b: number) => void;
|
|
337
|
+
readonly queryresult_hyperedges: (a: number, b: number) => void;
|
|
338
|
+
readonly queryresult_isEmpty: (a: number) => number;
|
|
339
|
+
readonly queryresult_nodes: (a: number, b: number) => void;
|
|
340
|
+
readonly resultstream_new: (a: number) => number;
|
|
341
|
+
readonly resultstream_nextChunk: (a: number) => number;
|
|
342
|
+
readonly resultstream_offset: (a: number) => number;
|
|
343
|
+
readonly resultstream_reset: (a: number) => void;
|
|
344
|
+
readonly version: (a: number) => void;
|
|
345
|
+
readonly init: () => void;
|
|
346
|
+
readonly batchoperations_maxBatchSize: (a: number) => number;
|
|
347
|
+
readonly resultstream_chunkSize: (a: number) => number;
|
|
348
|
+
readonly __wbg_batchoperations_free: (a: number, b: number) => void;
|
|
349
|
+
readonly __wasm_bindgen_func_elem_446: (a: number, b: number, c: number) => void;
|
|
350
|
+
readonly __wasm_bindgen_func_elem_445: (a: number, b: number) => void;
|
|
351
|
+
readonly __wasm_bindgen_func_elem_774: (a: number, b: number, c: number, d: number) => void;
|
|
352
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
353
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
354
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
355
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
356
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
357
|
+
readonly __wbindgen_start: () => void;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
364
|
+
* a precompiled `WebAssembly.Module`.
|
|
365
|
+
*
|
|
366
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
367
|
+
*
|
|
368
|
+
* @returns {InitOutput}
|
|
369
|
+
*/
|
|
370
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
374
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
375
|
+
*
|
|
376
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
377
|
+
*
|
|
378
|
+
* @returns {Promise<InitOutput>}
|
|
379
|
+
*/
|
|
380
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|