ruvector/npm/packages
ruvnet 3b00a565eb fix(ruvector): CLI works on fresh DBs via meta sidecar (#417)
Six CLI commands crashed on every fresh database produced by
`ruvector create`:

    $ ruvector create /tmp/x.db -d 384
    $ ruvector insert /tmp/x.db /tmp/v.json
    SyntaxError: Unexpected token 'r', "redb…" is not valid JSON

Root cause: `bin/cli.js` `insert`, `search`, `stats`, `export`, and
`import` all did `JSON.parse(fs.readFileSync(dbPath, 'utf8'))` to
recover the dimension. But `<dbPath>` is a redb (Rust binary) file
managed by `@ruvector/core` — not a JSON document. The first byte
("r") tripped the parser before any other code ran.

Compounding: the same handlers called methods that don't exist on
`VectorDBWrapper` (`db.load`, `db.save`, `db.stats`) and didn't
`await` the async wrapper methods that do exist (`insert`,
`insertBatch`, `search`, `len`).

Fix:

- Persist construction args (dimensions, metric, schema version)
  in `<dbPath>.meta.json` from `create`. `insert`/`search`/`stats`
  read the sidecar and pass them straight to the wrapper
  constructor — no more JSON-parsing of redb bytes.
- Drop calls to the phantom `db.load`/`db.save`/`db.stats` API.
  Persistence is automatic via `storagePath`; counting goes through
  `await db.len()`.
- Make every CLI handler `async` and `await` the wrapper calls.
  Includes `benchmark`, whose previously-dropped promises meant the
  reported insert/search rates were just spinner timing.
- Coerce numeric ids to strings inside `insert` (the native binding
  rejects integer ids).
- Surface a clear, actionable error when a DB exists without a
  sidecar (e.g. created by an older CLI), instead of an opaque
  parse failure.

Verified end-to-end with a new test on Node 22.22.2:

    $ node test/cli-fresh-db.test.mjs
      ok: `ruvector create` exits 0
      ok: redb file exists at dbPath
      ok: sidecar metadata file exists
      ok: sidecar.dimensions = 8
      ok: sidecar.metric = cosine
      ok: `ruvector insert` exits 0
      ok: insert does not crash JSON.parsing the redb binary
      ok: `ruvector search` exits 0
      ok: search prints `Found N results`
      ok: search renders at least one hit row
      ok: `ruvector stats` exits 0
      ok: stats prints Vector Count
      ok: stats fails fast on orphan DB without sidecar
      ok: orphan-DB error message mentions sidecar

    ruvector fresh-DB CLI smoke OK (issue #417)

Out of scope (deliberately): the `export`/`import` handlers also
called the same phantom API. Those need the wrapper to grow an
enumeration method (`db.entries()` or similar) before they can do
honest work — file-only metadata-export is misleading. Tracked in a
follow-up; the existing handlers are left untouched here.

The ONNX-bundle half of #417 ships in a separate PR (#354).

Closes #417

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-07 15:47:09 -04:00
..
acorn-wasm feat(wasm): publish @ruvector/rabitq-wasm and @ruvector/acorn-wasm to npm (#394) 2026-04-26 23:10:39 -04:00
agentic-integration feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
agentic-synth chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
agentic-synth-examples chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
burst-scaling feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
cli feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
cloud-run chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
cognitum-gate-wasm chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
core chore(npm): patch bump packages for security overrides (#346) 2026-04-20 14:14:43 -04:00
diskann docs: add DiskANN usage, API reference, and platform table to README 2026-04-06 18:04:06 -04:00
graph-data-generator chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
graph-node feat(graph-node): add deleteNode/deleteEdge/deleteHyperedge API — closes #427 2026-05-06 09:52:26 -04:00
graph-wasm chore(npm): patch bump packages for security overrides (#346) 2026-04-20 14:14:43 -04:00
node chore(npm): patch bump packages for security overrides (#346) 2026-04-20 14:14:43 -04:00
ospipe chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
ospipe-wasm feat(ospipe): RuVector-enhanced personal AI memory for Screenpipe (#163) 2026-02-12 22:45:25 -05:00
pi-brain feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00
postgres-cli chore: bump @ruvector/postgres-cli to 0.2.7 2026-02-15 06:25:23 +00:00
rabitq-wasm feat(wasm): publish @ruvector/rabitq-wasm and @ruvector/acorn-wasm to npm (#394) 2026-04-26 23:10:39 -04:00
raft chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
replication chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
router chore(router): bump to 0.1.30 for clean publish with aligned deps 2026-04-06 16:36:48 -04:00
router-darwin-arm64 chore(router): bump to 0.1.30 for clean publish with aligned deps 2026-04-06 16:36:48 -04:00
router-darwin-x64 chore(router): bump to 0.1.30 for clean publish with aligned deps 2026-04-06 16:36:48 -04:00
router-linux-arm64-gnu chore(router): bump to 0.1.30 for clean publish with aligned deps 2026-04-06 16:36:48 -04:00
router-linux-x64-gnu chore(router): bump to 0.1.30 for clean publish with aligned deps 2026-04-06 16:36:48 -04:00
router-win32-x64-msvc chore(router): bump to 0.1.30 for clean publish with aligned deps 2026-04-06 16:36:48 -04:00
rudag fix(esm): add .js extensions to dist module specifiers for Node.js ESM compatibility 2026-04-10 16:39:45 +00:00
ruqu-wasm chore(ruqu): bump to v2.0.5 with updated READMEs 2026-02-12 18:44:22 +00:00
ruvbot chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
ruvector fix(ruvector): CLI works on fresh DBs via meta sidecar (#417) 2026-05-07 15:47:09 -04:00
ruvector-cnn feat(ruvector-cnn): CNN contrastive learning + SIMD optimization fixes (#252) 2026-03-11 17:41:53 -04:00
ruvector-extensions feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
ruvector-wasm chore(npm): patch bump packages for security overrides (#346) 2026-04-20 14:14:43 -04:00
ruvector-wasm-unified chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
ruvllm fix(ruvllm): pin optionalDependencies to actually-published 2.0.1 (#411) (#412) 2026-05-01 10:43:46 -04:00
ruvllm-cli chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
ruvllm-darwin-arm64 feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
ruvllm-darwin-x64 feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
ruvllm-linux-arm64-gnu feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
ruvllm-linux-x64-gnu feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
ruvllm-wasm chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
ruvllm-win32-x64-msvc feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
rvdna perf(rvdna): optimize hot paths and add real-data integration tests 2026-02-22 15:44:33 +00:00
rvf chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
rvf-mcp-server docs: update READMEs with self-booting instructions, bump npm versions 2026-02-16 14:43:04 +00:00
rvf-node chore: Update RVF NAPI-RS binaries for all platforms 2026-04-21 20:31:20 +00:00
rvf-solver chore: update npm build artifacts for ruvbot, cognitum-gate-wasm, ospipe, raft, replication, ruvector-wasm-unified, ruvllm, rvf, and other packages 2026-02-23 16:07:05 +00:00
rvf-wasm fix(rvf-solver): add WASM binary, fix CJS loader, and correct field mapping 2026-02-17 02:05:37 +00:00
rvlite chore: bump and publish npm packages (ruvector 0.1.99, rvlite 0.2.4, rvf 0.1.3) 2026-02-15 06:19:48 +00:00
scipix feat(npm): add @ruvector/raft, @ruvector/replication, @ruvector/scipix packages (#129) 2026-01-21 22:58:14 -05:00
sona chore(npm): patch bump packages for security overrides (#346) 2026-04-20 14:14:43 -04:00
spiking-neural feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
tiny-dancer feat(rvf): RuVector Format — Universal Cognitive Container SDK (#166) 2026-02-14 13:14:49 -05:00
tiny-dancer-darwin-arm64 feat: Add platform-specific npm packages for multi-platform support 2025-11-27 15:25:00 +00:00
tiny-dancer-darwin-x64 feat: Add platform-specific npm packages for multi-platform support 2025-11-27 15:25:00 +00:00
tiny-dancer-linux-arm64-gnu feat(rvf): RuVector Format — Universal Cognitive Container SDK (#166) 2026-02-14 13:14:49 -05:00
tiny-dancer-linux-x64-gnu feat: Add platform-specific npm packages for multi-platform support 2025-11-27 15:25:00 +00:00
tiny-dancer-win32-x64-msvc feat: Add platform-specific npm packages for multi-platform support 2025-11-27 15:25:00 +00:00