v3/implementation/adrs/ADR-070-rvagent-wasm-completion.md
Status: Implemented Date: 2026-03-25 Author: RuvNet Supersedes: Gaps identified in ADR-059
ADR-059 defined the integration plan for @ruvector/rvagent-wasm and
@ruvector/ruvllm-wasm. An audit on 2026-03-25 found that the code was fully
implemented but the wiring was incomplete:
| Item | ADR-059 Status | Actual State |
|---|---|---|
src/ruvector/agent-wasm.ts | Planned | Implemented (387 lines) |
src/mcp-tools/wasm-agent-tools.ts | Planned | Implemented (10 MCP tools) |
src/ruvector/ruvllm-wasm.ts | Pending | Implemented (full module) |
src/mcp-tools/ruvllm-tools.ts | Pending | Implemented (MCP tools) |
src/ruvector/index.ts re-exports | Pending | Implemented (both modules) |
src/mcp-tools/index.ts re-exports | Pending | Implemented (both tool sets) |
src/types/optional-modules.d.ts | Planned | Implemented (ambient types) |
package.json optional deps | Required | Missing — neither package listed |
The sole gap was that @ruvector/rvagent-wasm and @ruvector/ruvllm-wasm were
not declared in package.json optionalDependencies, meaning:
npm install would never fetch themimport() calls would always hit the graceful-degradation pathAdd both packages to optionalDependencies in v3/@claude-flow/cli/package.json:
{
"optionalDependencies": {
"@ruvector/rvagent-wasm": "^0.1.0",
"@ruvector/ruvllm-wasm": "^2.0.2"
}
}
No code changes required — all integration modules, MCP tools, type declarations, and re-exports were already in place.
| Tool | File | Status |
|---|---|---|
wasm_agent_create | wasm-agent-tools.ts | Working |
wasm_agent_prompt | wasm-agent-tools.ts | Working |
wasm_agent_tool | wasm-agent-tools.ts | Working |
wasm_agent_list | wasm-agent-tools.ts | Working |
wasm_agent_terminate | wasm-agent-tools.ts | Working |
wasm_agent_files | wasm-agent-tools.ts | Working |
wasm_agent_export | wasm-agent-tools.ts | Working |
wasm_gallery_list | wasm-agent-tools.ts | Working |
wasm_gallery_search | wasm-agent-tools.ts | Working |
wasm_gallery_create | wasm-agent-tools.ts | Working |
| Tool | File | Status |
|---|---|---|
ruvllm_status | ruvllm-tools.ts | Working |
ruvllm_hnsw_create | ruvllm-tools.ts | Working |
ruvllm_sona_create | ruvllm-tools.ts | Working |
ruvllm_microlora_create | ruvllm-tools.ts | Working |
ruvllm_chat_format | ruvllm-tools.ts | Working |
ruvllm_kvcache_create | ruvllm-tools.ts | Working |
| Module | Lines | Exports |
|---|---|---|
src/ruvector/agent-wasm.ts | 387 | 20+ functions (lifecycle, gallery, RVF, MCP bridge) |
src/ruvector/ruvllm-wasm.ts | ~350 | 12+ functions (HNSW, SONA, MicroLoRA, chat, KV, arena) |
src/ruvector/index.ts | 245 | Re-exports all public API from both modules |
npm install now fetches WASM packages when available for the platform@ruvector/* optional dependency pattern