@ruvector/rvf-node 0.1.6 → 0.1.8
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/README.md
CHANGED
|
@@ -18,6 +18,56 @@ npm install @ruvector/rvf-node
|
|
|
18
18
|
- **Kernel & eBPF embedding** — embed compute alongside vector data
|
|
19
19
|
- **Segment inspection** — enumerate all segments in the file
|
|
20
20
|
- **Cross-platform** — Linux (x86_64, aarch64), macOS (x86_64, Apple Silicon), Windows (x86_64)
|
|
21
|
+
- **AGI methods** — HNSW index stats, witness chain verification, state freeze, metric introspection
|
|
22
|
+
|
|
23
|
+
## AGI Methods
|
|
24
|
+
|
|
25
|
+
Four introspection and integrity methods for advanced use cases.
|
|
26
|
+
|
|
27
|
+
### `db.indexStats()` → `RvfIndexStats`
|
|
28
|
+
|
|
29
|
+
Returns HNSW index statistics.
|
|
30
|
+
|
|
31
|
+
| Field | Type | Description |
|
|
32
|
+
|-------|------|-------------|
|
|
33
|
+
| `indexedVectors` | `number` | Number of indexed vectors |
|
|
34
|
+
| `layers` | `number` | Number of HNSW layers |
|
|
35
|
+
| `m` | `number` | M parameter (max edges per node per layer) |
|
|
36
|
+
| `efConstruction` | `number` | ef_construction parameter |
|
|
37
|
+
| `needsRebuild` | `boolean` | Whether index needs rebuilding (dead_space_ratio > 0.3) |
|
|
38
|
+
|
|
39
|
+
### `db.verifyWitness()` → `RvfWitnessResult`
|
|
40
|
+
|
|
41
|
+
Verifies SHAKE-256 witness chain integrity.
|
|
42
|
+
|
|
43
|
+
| Field | Type | Description |
|
|
44
|
+
|-------|------|-------------|
|
|
45
|
+
| `valid` | `boolean` | Whether the chain is valid |
|
|
46
|
+
| `entries` | `number` | Number of entries in the chain |
|
|
47
|
+
| `error` | `string?` | Error message if invalid |
|
|
48
|
+
|
|
49
|
+
### `db.freeze()` → `number`
|
|
50
|
+
|
|
51
|
+
Snapshot-freeze current state. Returns the epoch number.
|
|
52
|
+
|
|
53
|
+
### `db.metric()` → `string`
|
|
54
|
+
|
|
55
|
+
Returns the distance metric name (`"l2"`, `"cosine"`, or `"inner_product"`).
|
|
56
|
+
|
|
57
|
+
### Usage Example
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
const stats = db.indexStats();
|
|
61
|
+
console.log(`Indexed: ${stats.indexedVectors}, HNSW layers: ${stats.layers}`);
|
|
62
|
+
|
|
63
|
+
const witness = db.verifyWitness();
|
|
64
|
+
console.log(`Witness chain: ${witness.entries} entries, valid: ${witness.valid}`);
|
|
65
|
+
|
|
66
|
+
console.log(`Distance metric: ${db.metric()}`);
|
|
67
|
+
|
|
68
|
+
const epoch = db.freeze();
|
|
69
|
+
console.log(`State frozen at epoch ${epoch}`);
|
|
70
|
+
```
|
|
21
71
|
|
|
22
72
|
## Quick Start
|
|
23
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruvector/rvf-node",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "RuVector Format Node.js native bindings",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@ruvector/rvf-node-linux-x64-gnu": "0.1.
|
|
39
|
-
"@ruvector/rvf-node-darwin-x64": "0.1.
|
|
40
|
-
"@ruvector/rvf-node-darwin-arm64": "0.1.
|
|
41
|
-
"@ruvector/rvf-node-win32-x64-msvc": "0.1.
|
|
42
|
-
"@ruvector/rvf-node-linux-arm64-gnu": "0.1.
|
|
38
|
+
"@ruvector/rvf-node-linux-x64-gnu": "0.1.7",
|
|
39
|
+
"@ruvector/rvf-node-darwin-x64": "0.1.7",
|
|
40
|
+
"@ruvector/rvf-node-darwin-arm64": "0.1.7",
|
|
41
|
+
"@ruvector/rvf-node-win32-x64-msvc": "0.1.7",
|
|
42
|
+
"@ruvector/rvf-node-linux-arm64-gnu": "0.1.7"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
Binary file
|
package/rvf-node.darwin-x64.node
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|