Ships the RuvectorWasmAdapter (#568) and restores a functional package —
0.1.30 published with only package.json (empty pkg/). 0.1.31 includes the
built web pkg/ plus the adapter that corrects similarity score, metadata
round-trip, and flat-index reporting.
Co-Authored-By: claude-flow <ruv@ruv.net>
The published @ruvector/wasm build behaves differently from its generated
.d.ts in three ways that bite consumers:
1. HNSW is not active — the wasm32 target compiles without the `hnsw`
feature and falls back to a flat (brute-force) index, so search is O(n).
The O(log n) win is latent until the WASM HNSW lands.
2. `result.score` is a cosine distance (lower is better), not the
"higher is better" similarity the .d.ts advertises (ordering is correct:
a, b before c).
3. Metadata does not round-trip — search/get return {}.
Add RuvectorWasmAdapter (@ruvector/wasm/adapter) which wraps VectorDB with:
- a metadata sidecar so inserted metadata round-trips
- similarity = 1 - distance (generalised per metric) with `.score` aliased
to similarity, plus the raw `distance` preserved
- indexType/usesHnsw + WASM_HNSW_AVAILABLE so callers don't assume HNSW
- client-side metadata filtering with over-fetch
Includes TS declarations with corrected doc comments, a node:test suite
covering all three findings, README guidance, and package exports.
Co-authored-by: Claude <noreply@anthropic.com>
This commit addresses GitHub issue #17 by implementing comprehensive
forgetting mitigation for continual learning in the GNN module.
## New Features
### Optimizer Implementation (training.rs)
- Full Adam optimizer with bias-corrected first and second moments
- SGD with momentum support
- Lazy initialization of state buffers for efficiency
### Replay Buffer (replay.rs)
- Experience replay with reservoir sampling for uniform distribution
- Distribution shift detection with statistical tracking
- Configurable capacity and batch sampling
### Elastic Weight Consolidation (ewc.rs)
- Fisher information diagonal computation
- Anchor weight consolidation for task boundaries
- EWC penalty and gradient computation
### Learning Rate Scheduling (scheduler.rs)
- Constant, StepDecay, Exponential schedulers
- CosineAnnealing with warm restarts
- WarmupLinear for pre-training warmup
- ReduceOnPlateau for adaptive learning
## Deployment Infrastructure
### GitHub Actions Release Pipeline (.github/workflows/release.yml)
- 8-stage CI/CD pipeline for complete releases
- Validates, builds crates, WASM, and native modules
- Publishes to crates.io and npmjs.com
- Creates GitHub releases with artifacts
### Deployment Script (scripts/deploy.sh)
- Comprehensive deployment orchestration
- Version synchronization across Cargo.toml and package.json
- Dry-run mode for testing
- Cross-platform native builds support
## Test Coverage
- 177 tests passing in ruvector-gnn
- Comprehensive tests for all new modules
- Convergence tests for optimizers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>