ruvector/npm/packages/node/src/index.ts
rUv 2ea884b307 feat: Add persistence support and Cypher queries to @ruvector/graph-node
- Add persistence support using redb storage backend
- Add GraphDatabase.open() factory method for opening existing databases
- Add isPersistent() and getStoragePath() methods
- Update TypeScript definitions with all new APIs
- Add benchmark suite (131K+ ops/sec batch inserts)
- Add comprehensive test suite with persistence tests
- Add GitHub workflow for multi-platform builds
- Fix sync-lockfile.sh working directory bug
- Publish @ruvector/graph-node@0.1.15 to npm
- Publish @ruvector/graph-node-linux-x64-gnu@0.1.15 to npm

Performance benchmarks:
- Node Creation: 9.17K ops/sec
- Batch Node Creation: 131.10K ops/sec
- Edge Creation: 9.30K ops/sec
- Vector Search (k=10): 2.35K ops/sec
- k-hop Traversal: 10.28K ops/sec

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 04:26:50 +00:00

83 lines
1.9 KiB
TypeScript

/**
* @ruvector/node - Unified Ruvector Package
*
* High-performance Rust vector database with GNN capabilities for Node.js.
* This package re-exports both @ruvector/core and @ruvector/gnn for convenience.
*
* @example
* ```typescript
* import {
* // Core vector database
* VectorDB,
* CollectionManager,
* DistanceMetric,
* // GNN capabilities
* RuvectorLayer,
* TensorCompress,
* differentiableSearch
* } from '@ruvector/node';
*
* // Create vector database
* const db = new VectorDB({ dimensions: 384 });
*
* // Create GNN layer
* const layer = new RuvectorLayer(384, 256, 4, 0.1);
* ```
*/
// Re-export everything from @ruvector/core
export {
VectorDB,
CollectionManager,
version,
hello,
getMetrics,
getHealth,
DistanceMetric,
type DbOptions,
type HnswConfig,
type QuantizationConfig,
type VectorEntry,
type SearchQuery,
type SearchResult as CoreSearchResult,
type CollectionConfig,
type CollectionStats,
type Alias,
type HealthResponse,
type Filter
} from '@ruvector/core';
// Re-export everything from @ruvector/gnn
export {
RuvectorLayer,
TensorCompress,
differentiableSearch,
hierarchicalForward,
getCompressionLevel,
init as initGnn,
type CompressionLevelConfig,
type SearchResult as GnnSearchResult
} from '@ruvector/gnn';
// Convenience default export
import * as core from '@ruvector/core';
import * as gnn from '@ruvector/gnn';
export default {
// Core exports
VectorDB: core.VectorDB,
CollectionManager: core.CollectionManager,
version: core.version,
hello: core.hello,
getMetrics: core.getMetrics,
getHealth: core.getHealth,
DistanceMetric: core.DistanceMetric,
// GNN exports
RuvectorLayer: gnn.RuvectorLayer,
TensorCompress: gnn.TensorCompress,
differentiableSearch: gnn.differentiableSearch,
hierarchicalForward: gnn.hierarchicalForward,
getCompressionLevel: gnn.getCompressionLevel,
initGnn: gnn.init
};