@ruvector/rvf-node 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.
Files changed (2) hide show
  1. package/README.md +59 -0
  2. package/package.json +22 -0
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @ruvector/rvf-node
2
+
3
+ Node.js native bindings for the RuVector Format (RVF) cognitive container.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @ruvector/rvf-node
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ const { RvfDatabase } = require('@ruvector/rvf-node');
15
+
16
+ // Create a vector store
17
+ const db = RvfDatabase.create('vectors.rvf', { dimension: 384 });
18
+
19
+ // Insert vectors
20
+ db.ingestBatch(new Float32Array(384), [1]);
21
+
22
+ // Query nearest neighbors
23
+ const results = db.query(new Float32Array(384), 10);
24
+ console.log(results); // [{ id, distance }]
25
+
26
+ // Inspect segments
27
+ console.log(db.fileId()); // unique file UUID
28
+ console.log(db.dimension()); // 384
29
+ console.log(db.segments()); // [{ type, id, size }]
30
+
31
+ db.close();
32
+ ```
33
+
34
+ ## Features
35
+
36
+ - Native performance via N-API bindings to Rust `rvf-runtime`
37
+ - Full store lifecycle: create, open, ingest, query, delete, compact
38
+ - Lineage tracking with FileIdentity derivation chains
39
+ - Kernel/eBPF segment inspection
40
+ - Cross-platform: Linux x64/arm64, macOS x64/arm64, Windows x64
41
+
42
+ ## API
43
+
44
+ | Method | Description |
45
+ |--------|-------------|
46
+ | `RvfDatabase.create(path, options)` | Create a new RVF store |
47
+ | `RvfDatabase.open(path)` | Open an existing store |
48
+ | `db.ingestBatch(vectors, ids)` | Insert vectors |
49
+ | `db.query(vector, k)` | k-NN similarity search |
50
+ | `db.delete(ids)` | Delete vectors by ID |
51
+ | `db.compact()` | Reclaim deleted space |
52
+ | `db.status()` | Get store stats |
53
+ | `db.segments()` | List all segments |
54
+ | `db.fileId()` | Get unique file UUID |
55
+ | `db.close()` | Close and release lock |
56
+
57
+ ## License
58
+
59
+ MIT
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@ruvector/rvf-node",
3
+ "version": "0.1.0",
4
+ "description": "RuVector Format Node.js native bindings",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "napi": {
8
+ "name": "rvf-node",
9
+ "triples": {
10
+ "defaults": true,
11
+ "additional": ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu"]
12
+ }
13
+ },
14
+ "scripts": {
15
+ "build": "napi build --platform --release",
16
+ "test": "jest"
17
+ },
18
+ "license": "MIT",
19
+ "devDependencies": {
20
+ "@napi-rs/cli": "^2.18.0"
21
+ }
22
+ }