mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-26 16:04:02 +00:00
NodeBackend.ingestBatch() passed string IDs directly to the N-API layer
via Number(e.id), which returns NaN for non-numeric strings (UUIDs, hex
hashes, etc.). The native Rust HNSW silently drops entries with NaN IDs,
causing silent data loss with no error signal.
Fix: Add a bidirectional string↔numeric mapping layer to NodeBackend,
following the same pattern used by HNSWLibBackend in AgentDB:
- resolveLabel(): allocates sequential i64 labels for string IDs
- query(): maps numeric labels back to original string IDs
- delete(): resolves string IDs to labels before calling native layer
- Mappings persisted to {path}.idmap.json sidecar file
Also fixes query() returning numeric labels instead of original string
IDs, and delete() silently failing for non-numeric IDs.
Bumps @ruvector/rvf from 0.1.9 → 0.2.0 (breaking fix).
Closes ruvnet/agentic-flow#114
Co-Authored-By: claude-flow <ruv@ruv.net>
36 lines
936 B
JSON
36 lines
936 B
JSON
{
|
|
"name": "@ruvector/rvf",
|
|
"version": "0.2.0",
|
|
"description": "RuVector Format — unified TypeScript SDK for vector intelligence",
|
|
"main": "dist/index.js",
|
|
"module": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"require": "./dist/index.js"
|
|
}
|
|
},
|
|
"files": ["dist/", "package.json"],
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"test": "jest",
|
|
"bench": "tsx bench/index.ts",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"keywords": ["vector", "database", "binary-format", "hnsw", "simd", "rvf"],
|
|
"license": "MIT",
|
|
"repository": "https://github.com/ruvnet/ruvector",
|
|
"dependencies": {
|
|
"@ruvector/rvf-node": "^0.1.7"
|
|
},
|
|
"optionalDependencies": {
|
|
"@ruvector/rvf-wasm": "^0.1.5",
|
|
"@ruvector/rvf-solver": "^0.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "^5.0.0",
|
|
"@types/node": "^20.0.0"
|
|
}
|
|
}
|