Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'

This commit is contained in:
ruv
2026-02-28 14:39:40 -05:00
7854 changed files with 3522914 additions and 0 deletions

View File

@@ -0,0 +1,113 @@
// TypeScript definitions for RuVector Graph WASM
export function init(input?: RequestInfo | URL | Response | BufferSource | WebAssembly.Module): Promise<void>;
export function version(): string;
export class GraphDB {
constructor(metric?: string);
query(cypher: string): Promise<QueryResult>;
createNode(labels: string[], properties: object): string;
getNode(id: string): JsNode | null;
deleteNode(id: string): boolean;
createEdge(from: string, to: string, type: string, properties: object): string;
getEdge(id: string): JsEdge | null;
deleteEdge(id: string): boolean;
createHyperedge(nodes: string[], description: string, embedding?: number[], confidence?: number): string;
getHyperedge(id: string): JsHyperedge | null;
importCypher(statements: string[]): Promise<number>;
exportCypher(): string;
stats(): GraphStats;
}
export class JsNode {
readonly id: string;
readonly labels: string[];
readonly properties: object;
readonly embedding?: number[];
getProperty(key: string): any;
hasLabel(label: string): boolean;
}
export class JsEdge {
readonly id: string;
readonly from: string;
readonly to: string;
readonly type: string;
readonly properties: object;
getProperty(key: string): any;
}
export class JsHyperedge {
readonly id: string;
readonly nodes: string[];
readonly description: string;
readonly embedding: number[];
readonly confidence: number;
readonly properties: object;
readonly order: number;
}
export class QueryResult {
readonly nodes: JsNode[];
readonly edges: JsEdge[];
readonly hyperedges: JsHyperedge[];
readonly data: object[];
readonly count: number;
isEmpty(): boolean;
}
export class AsyncQueryExecutor {
constructor(batchSize?: number);
executeStreaming(query: string): Promise<any>;
executeInWorker(query: string): Promise<any>;
batchSize: number;
}
export class AsyncTransaction {
constructor();
addOperation(operation: string): void;
commit(): Promise<any>;
rollback(): void;
readonly operationCount: number;
readonly isCommitted: boolean;
}
export class BatchOperations {
constructor(maxBatchSize?: number);
executeBatch(statements: string[]): Promise<any>;
readonly maxBatchSize: number;
}
export class ResultStream {
constructor(chunkSize?: number);
nextChunk(): Promise<any>;
reset(): void;
readonly offset: number;
readonly chunkSize: number;
}
export interface GraphStats {
nodeCount: number;
edgeCount: number;
hyperedgeCount: number;
hypergraphEntities: number;
hypergraphEdges: number;
avgEntityDegree: number;
}

View File

@@ -0,0 +1,5 @@
// Re-export from generated WASM bindings
export * from './ruvector_graph_wasm.js';
// Additional convenience exports
export { default as init } from './ruvector_graph_wasm.js';

View File

@@ -0,0 +1,50 @@
{
"name": "@ruvector/graph-wasm",
"version": "2.0.2",
"type": "module",
"description": "Neo4j-compatible hypergraph database in WebAssembly - Cypher queries, SIMD optimization, knowledge graphs",
"main": "ruvector_graph_wasm.js",
"types": "ruvector_graph_wasm.d.ts",
"module": "ruvector_graph_wasm.js",
"sideEffects": [
"./snippets/*"
],
"keywords": [
"graph-database",
"neo4j",
"cypher",
"hypergraph",
"wasm",
"webassembly",
"vector-database",
"knowledge-graph",
"property-graph",
"graph-query",
"embeddings",
"ai",
"machine-learning",
"rag",
"rust",
"browser"
],
"author": "RuVector Team",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ruvnet/ruvector.git",
"directory": "crates/ruvector-graph-wasm"
},
"homepage": "https://github.com/ruvnet/ruvector#readme",
"bugs": {
"url": "https://github.com/ruvnet/ruvector/issues"
},
"files": [
"ruvector_graph_wasm_bg.wasm",
"ruvector_graph_wasm.js",
"ruvector_graph_wasm.d.ts",
"README.md"
],
"publishConfig": {
"access": "public"
}
}