Files
ruflo/v3/@claude-flow/cli/src/ruvector
rUv 1d5b06e4a2 fix(federation): unblock main — TS shim types + dispatcher import + witness re-sign (#2604)
* fix(federation): sync shim types + guard optional close() to unblock Build V3

Fixes 7 TS errors on main that block Build V3 across all 3 platforms:
- src/transport/midstream-aware-loader.ts:39-52 — local AgentMessage/
  AgentTransport shim was over-minimized by #2578. Restored required
  {id, type, payload, metadata?} on AgentMessage and made send/onMessage
  2-arg (address, message) to match how plugin.ts actually calls them.
- src/transport/midstream-aware-loader.ts:84 — cast dynamic import()
  through `unknown` since upstream's exported AgentTransport carries a
  richer InboundMessageHandler surface we intentionally hide behind the
  minimal shim.
- src/plugin.ts:481 — this.transport.close is optional (`?`) on the
  shim; guard with optional chaining `close?.()`.

Local tsc build clean after fix.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(federation): dispatcher import + re-sign witness manifests (3.25.3 drift)

Two more preexisting main-red root causes, in the same fix:

(1) inbound-dispatcher.ts:22 still imported `AgentMessage` from
    `agentic-flow/transport/loader` — the exact phantom subpath #2578
    eliminated in midstream-aware-loader.ts. Repointed to the local
    shim. This is the residual site #2578 missed; the graph schema smoke
    (ADR-130 P1) failure was a cascade of this same TS type collision.

(2) Re-signed verification/{linux,macos,windows}/manifest.md.json via
    plugins/ruflo-core/scripts/witness/regen.mjs. The 3.25.3 release
    (PR #2602) edited the ADR-104-transport `desc` string in all 3 per-OS
    manifests but did not re-run regen.mjs, so the stored
    integrity.manifestHash no longer matched sha256(JSON.stringify(
    manifest)) and Witness verify exited 1 across all 3 platforms.
    Manifests now verify cleanly (117 pass, 0 drift, 0 regressed).
    Note: witness/regen.mjs takes --manifest + --history and re-signs
    deterministically from manifest.gitCommit; already wired but the
    3.25.3 release process skipped it.

Local verify: pass=117 drift=0 regressed=0 missing=0 on all 3 OSes.
Local tsc build: clean.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(hooks): PreToolUse hook emits valid JSON verdict (#2613)

Cursor imports third-party Claude Code hooks under its stricter
`preToolUse` contract, which requires stdout to be a valid JSON
permission verdict (`{"permission":"allow"|"deny"|"ask"}`) and
fail-closes on any other text. The prior PreToolUse commands ran the
ruflo hook shim which prints telemetry to stdout — Cursor then blocked
every Bash/Write/Edit tool call across every workspace.

Fix:
1. ruflo-hook.sh (all three copies) — redirect stdout to /dev/null in
   addition to stderr. Claude Code doesn't consume this stdout either,
   so silencing it is a pure cleanup with no functional cost.
2. hooks.json PreToolUse commands — after invoking the shim, always
   `printf` a well-formed `{"permission":"allow"}` verdict. Valid for
   both Claude Code's JSON-hook contract and Cursor's stricter
   preToolUse contract, so telemetry keeps working while nothing is
   blocked. Also guard `${CLAUDE_PLUGIN_ROOT:-}` so an unset env var
   collapses to the safe empty branch instead of a bash parse error.

Simulated Cursor invocation (CLAUDE_PLUGIN_ROOT unset) now emits:
  {"permission":"allow"}

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ci): indirect optional-dep imports in cli — @ruvector/*, @metaharness/router (#2608)

Same install-safety anti-pattern as #2586's prime-radiant fix, now
surfaced in @claude-flow/cli once plugin-agent-federation's TS2307
stopped masking it (630034ca4 on this branch). Build V3 fails with
"Cannot find module '@ruvector/learning-wasm'" and
"Cannot find module '@metaharness/router'" whenever the optional deps
aren't installed — which is the case in the install-safety /
Build V3 configurations.

Every call site is already runtime-guarded (try/catch, availability
probes). But a literal `await import('@ruvector/learning-wasm')` or a
`typeof import('@metaharness/router')` type expression forces tsc to
statically resolve the specifier at build time, so TS2307 fires when
the package is absent.

Fix: route the specifier through a string-typed variable
(`const pkg: string = '...'; await import(pkg)`) — same idiom as the
optional better-sqlite3 loader and #2586. Runtime behaviour unchanged:
the package still loads when present, still falls back cleanly when
absent.

Also replaced services/ruvector-training.ts's static `import type
{ WasmMicroLoRA, ... } from '@ruvector/learning-wasm'` with local
`type X = any` aliases (mirrors the existing FlashAttention et al.
pattern a few lines below).

Verified: with @ruvector/learning-wasm, @ruvector/attention, and
@metaharness/router hidden locally (matching the CI condition), the
cli package now compiles clean (tsc, 0 TS2307). plugin-agent-federation
remains clean as well.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(smoke): add metaharness optionalDep to ruflo wrapper (ADR-150 constraint #2)

The all-plugins-smoke, metaharness-ci `score`, and no-metaharness-smoke
CI jobs all fail on the same single step (ruflo-metaharness smoke #16):

  → 16. ruflo wrapper has metaharness in optionalDependencies
        (architectural constraint #2) ... FAIL:
        ruflo wrapper missing metaharness optionalDep

ADR-150 §"Architectural constraint" rule #2 requires `metaharness` and
`@metaharness/*` packages to live in `optionalDependencies` (never
`dependencies`) so ruflo remains operational when they're removed. The
CLI already satisfies this; the wrapper package.json had an empty
`optionalDependencies` block.

Pin to `~0.3.1` — the current npm-published `metaharness@latest`, and
the same range family used by CLAUDE.md's `@metaharness/router@~0.3.2`
pin. Wrapper install remains graceful-fail when the optional dep is
absent (that's the whole point of ADR-150's removable rule #1).

Unblocks PR #2604 merge. Only 3 CI failures on the branch — all
the same rule — so this single change flips them green.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(smoke): reconcile ADR-150 rule #2 with #2561 npx-startup budget

Two CI gates were mutually incompatible on this PR:

- ruflo-metaharness smoke #16 (older): asserted \`metaharness\` MUST be
  in \`ruflo/package.json\` optionalDependencies.
- guard #2561 (newer): enforces \`RUFLO_MAX=0\` optionalDependencies
  AND FORBIDs \`metaharness\` specifically, because installing it as a
  ruflo postinstall dep timed out the \`npx -y ruflo@alpha --version\`
  fast-path (measured incident).

Adding \`metaharness\` to ruflo optDeps satisfies #16 but breaks #2561;
removing it satisfies #2561 but leaves #16 red (pre-existing main state).

Fix: correct the smoke #16 rule. ADR-150 §"Architectural constraint"
rule #2 says "when \`@metaharness/*\` or \`metaharness\` appears in a
package's dep graph, it MUST be in \`optionalDependencies\`, never
\`dependencies\`". It does NOT require ruflo to depend on metaharness.
The old check was over-restrictive — it demanded PRESENCE, not just
correct SHAPE-when-present. The new check enforces the actual invariant:
no \`metaharness\` / \`@metaharness/*\` in ruflo's hard \`dependencies\`.
Absence is fine (ruflo delegates to @claude-flow/cli, which keeps
metaharness as a runtime dynamic import via ADR-150 rule #1).

#2561 is stronger evidence (proven cold-npx timeout) than the old #16
assertion, so the correction goes to #16.

Verified locally:
  smoke #16 PASS (new logic)
  guard #2561 PASS

Also reverts the ruflo/package.json optionalDeps change that briefly
tried to satisfy the old #16 rule — the wrapper stays clean.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(init): heal duplicate MCP registrations without breaking plugin refs (#2612)

Users who followed pre-rename setup docs ended up with two independent
MCP server registrations pointing at the same binary — one keyed
`claude-flow`, one keyed `ruflo` — doubling Claude Code's tool-schema
load (~350 duplicated tools) with zero added capability. Bug #2612.

The naive fix (rename the canonical key from `claude-flow` → `ruflo`)
silently re-opens #2206 (closed), because ~166 plugin files across
plugins/**/{agents,commands,skills}/*.md reference tools with the
`mcp__claude-flow__*` prefix. Claude Code derives the tool prefix from
the MCP server key; flipping the key to `ruflo` renames every plugin
tool to `mcp__ruflo__*` and every one of those 166 refs errors with
"Unknown tool".

Correct reconciliation:

  - Canonical MCP key STAYS `claude-flow` (preserves #2206 for the 166
    plugin refs). The binary invoked is `ruflo@latest` — only the
    registration name is legacy.
  - Duplicate is HEALED via `ruflo doctor`, not by renaming: detect
    coexisting `ruflo`-keyed + `claude-flow`-keyed registrations for
    the same binary, warn, and instruct the operator to remove the
    `ruflo`-keyed one.

Changes:

  - src/init/mcp-generator.ts — server key restored to `claude-flow`;
    manual `claude mcp add …` commands restored to name `claude-flow`.
    Comment now explains the #2206/#2612 duality.
  - src/init/executor.ts — writeMCPConfig skip-comment updated to
    reflect that `claude-flow` is canonical and `ruflo`-keyed is the
    legacy duplicate form; existing detection accepts both keys (was
    already correct).
  - src/init/claudemd-generator.ts — generated CLAUDE.md `Setup`
    section restored to `claude mcp add claude-flow -- …`.
  - src/commands/doctor.ts — inherit the concurrent session's
    duplicate-detection logic (rufloLocations / duplicateLocations /
    legacyLocations / currentLocations), but flip which key is
    treated as canonical: `claude-flow`/`claude-flow_alpha` are
    current, `ruflo`/`ruflo_alpha` are legacy. Fix-message now
    references removing the `ruflo`-keyed entry and cites #2206.
  - src/commands/swarm.ts — help output uses `claude mcp add
    claude-flow` again.
  - __tests__/issue-2612-mcp-rename.test.ts — regression guard for the
    duplicate-detection warning; header comment documents the
    canonical/legacy roles matching the flipped semantics.
  - CLAUDE.md / v3/@claude-flow/cli/CLAUDE.md / v3/@claude-flow/mcp/CLAUDE.md /
    v3/implementation/init/API.md — kept the binary-update from
    `@claude-flow/cli@latest` → `ruflo@latest` (correct, this IS the
    post-rename wrapper), but restored the MCP server KEY to
    `claude-flow` in every example line.

Verified:
  - tsc clean (CLI package)
  - all 70 test files / 726 tests pass locally, including:
    - __tests__/init-wizard-bugs.test.ts (#2206 canonical key + #2207 dual-key detection)
    - __tests__/stale-mcp-key-2369.test.ts (10 tests, unchanged)
    - __tests__/issue-2612-mcp-rename.test.ts (new — asserts doctor
      surfaces "Duplicate Ruflo MCP registrations found" with legacy
      `ruflo` + current `claude-flow`)
  - Manual doctor run against a synthetic .mcp.json/.claude.json pair
    surfaces the exact warning + remediation string.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-07-09 10:16:55 -04:00
..
2026-01-07 05:53:03 +00:00
2026-01-07 15:05:49 +00:00
2026-01-07 05:22:22 +00:00

RuVector NPM Package API Documentation

Version: 0.1.95 Package: ruvector Repository: https://github.com/ruvnet/ruvector

Overview

RuVector is a high-performance vector database for Node.js with automatic native/WASM fallback. It provides self-learning intelligence for Claude Code with Q-learning optimization, vector memory, and automatic agent routing.

Installation

npm install ruvector

MCP Server Integration

Add to Claude Code:

claude mcp add ruvector-mcp -- npx ruvector mcp-server

Hooks API Reference

The hooks API provides 30+ MCP tools for intelligent agent routing, code analysis, and self-learning capabilities.

Core Routing Functions

hooks_route

Routes a task to the best agent based on learned patterns.

Input Parameters:

Parameter Type Required Description
task string Yes Task description to route
file string No File path for context-aware routing

Return Type:

interface RouteResult {
  success: boolean;
  task: string;
  file?: string;
  agent: string;           // Recommended agent (e.g., "typescript-developer")
  confidence: number;      // Confidence score 0.0-1.0
  reason: string;          // Explanation for routing decision
  alternates?: string[];   // Alternative agent suggestions
  sonaPatterns?: number;   // Number of SONA patterns used (if engine enabled)
  engineRouted?: boolean;  // Whether full engine was used
}

Example Usage:

// MCP Tool Call
const result = await mcp.call('hooks_route', {
  task: 'implement user authentication',
  file: 'src/auth/login.ts'
});

// CLI Usage
npx ruvector hooks route "implement user login"

Error Handling:

  • Returns default agent mapping if no patterns learned
  • Falls back to file extension-based routing if task unclear

hooks_route_enhanced

Enhanced routing using AST complexity, coverage, and diff analysis signals.

Input Parameters:

Parameter Type Required Description
task string Yes Task description
file string No File context for analysis

Return Type:

interface EnhancedRouteResult {
  success: boolean;
  agent: string;
  confidence: number;
  signals: {
    complexity?: number;    // Cyclomatic complexity
    coverage?: number;      // Test coverage percentage
    riskScore?: number;     // Change risk assessment
    diffCategory?: string;  // feature/bugfix/refactor
  };
  explanation: string;
}

Example Usage:

const result = await mcp.call('hooks_route_enhanced', {
  task: 'refactor authentication module',
  file: 'src/auth/handlers.ts'
});

AST Analysis Functions

hooks_ast_analyze

Parses file AST and extracts symbols, imports, and complexity metrics.

Input Parameters:

Parameter Type Required Description
file string Yes File path to analyze

Return Type:

interface FileAnalysis {
  file: string;
  language: string;           // TypeScript, JavaScript, Python, etc.
  imports: ImportInfo[];      // Import statements
  exports: ExportInfo[];      // Export statements
  functions: FunctionInfo[];  // Function definitions
  classes: ClassInfo[];       // Class definitions
  variables: string[];        // Variable declarations
  types: string[];           // Type definitions
  complexity: number;        // Overall complexity score
  lines: number;             // Total lines
  parseTime: number;         // Parse duration in ms
}

interface FunctionInfo {
  name: string;
  params: string[];
  returnType?: string;
  async: boolean;
  exported: boolean;
  startLine: number;
  endLine: number;
  complexity: number;
  calls: string[];           // Functions called within
}

interface ClassInfo {
  name: string;
  extends?: string;
  implements: string[];
  methods: FunctionInfo[];
  properties: string[];
  exported: boolean;
  startLine: number;
  endLine: number;
}

interface ImportInfo {
  source: string;
  default?: string;
  named: string[];
  namespace?: string;
  type: 'esm' | 'commonjs' | 'dynamic';
}

Example Usage:

const analysis = await mcp.call('hooks_ast_analyze', {
  file: 'src/api/routes.ts'
});

// CLI Usage
npx ruvector hooks ast-analyze src/api/routes.ts --json

Error Handling:

  • Returns { success: false, error: message } if file not found
  • Falls back to regex-based analysis if tree-sitter unavailable

hooks_ast_complexity

Calculates cyclomatic and cognitive complexity metrics for files.

Input Parameters:

Parameter Type Required Description
files string[] Yes Array of file paths to analyze
threshold number No Warn if complexity exceeds (default: 10)

Return Type:

interface ComplexityResult {
  success: boolean;
  files: Array<{
    file: string;
    complexity: number;
    functions: Array<{
      name: string;
      complexity: number;
      exceeds: boolean;
    }>;
  }>;
  warnings: string[];
  averageComplexity: number;
}

Example Usage:

const result = await mcp.call('hooks_ast_complexity', {
  files: ['src/auth/*.ts'],
  threshold: 15
});

Diff Analysis Functions

hooks_diff_analyze

Analyzes git diff with semantic embeddings and risk scoring.

Input Parameters:

Parameter Type Required Description
commit string No Commit hash (defaults to staged changes)

Return Type:

interface CommitAnalysis {
  hash: string;
  message: string;
  author: string;
  date: string;
  files: DiffAnalysis[];
  totalAdditions: number;
  totalDeletions: number;
  riskScore: number;        // 0.0-1.0 risk assessment
  embedding?: number[];     // Semantic embedding
}

interface DiffAnalysis {
  file: string;
  hunks: DiffHunk[];
  totalAdditions: number;
  totalDeletions: number;
  complexity: number;
  riskScore: number;
  category: 'feature' | 'bugfix' | 'refactor' | 'docs' | 'test' | 'config' | 'unknown';
  embedding?: number[];
}

interface DiffHunk {
  file: string;
  oldStart: number;
  oldLines: number;
  newStart: number;
  newLines: number;
  content: string;
  additions: string[];
  deletions: string[];
}

Example Usage:

// Analyze staged changes
const staged = await mcp.call('hooks_diff_analyze', {});

// Analyze specific commit
const commit = await mcp.call('hooks_diff_analyze', {
  commit: 'abc123'
});

// CLI Usage
npx ruvector hooks diff-analyze --json
npx ruvector hooks diff-analyze abc123 --json

Error Handling:

  • Returns empty analysis if no changes found
  • Handles merge commits and binary files gracefully

hooks_diff_classify

Classifies change type based on diff patterns.

Input Parameters:

Parameter Type Required Description
commit string No Commit hash (defaults to HEAD)

Return Type:

interface ClassifyResult {
  success: boolean;
  category: 'feature' | 'bugfix' | 'refactor' | 'docs' | 'test' | 'config' | 'unknown';
  confidence: number;
  indicators: string[];  // Patterns that led to classification
}

Example Usage:

const classification = await mcp.call('hooks_diff_classify', {
  commit: 'HEAD~1'
});

Coverage Analysis Functions

hooks_coverage_route

Gets coverage-aware agent routing for a file.

Input Parameters:

Parameter Type Required Description
file string Yes File to analyze

Return Type:

interface CoverageRouteResult {
  success: boolean;
  file: string;
  route: boolean;          // Whether to route to tester
  reason: string;          // Explanation
  coverage: number;        // Coverage percentage (0-100)
  weights: {
    coder: number;         // Weight for coder agent
    tester: number;        // Weight for tester agent
    reviewer: number;      // Weight for reviewer agent
  };
}

Example Usage:

const routing = await mcp.call('hooks_coverage_route', {
  file: 'src/services/auth.ts'
});

// CLI Usage
npx ruvector hooks coverage-route src/services/auth.ts

Error Handling:

  • Returns default weights if no coverage report found
  • Searches common locations: coverage/, .nyc_output/, lcov.info

hooks_coverage_suggest

Suggests tests for files based on coverage data.

Input Parameters:

Parameter Type Required Description
files string[] Yes Files to analyze

Return Type:

interface TestSuggestion {
  file: string;
  testFile: string;           // Suggested test file path
  reason: string;
  priority: 'high' | 'medium' | 'low';
  coverage: number;           // Current coverage %
  uncoveredFunctions: string[];
}

interface SuggestResult {
  success: boolean;
  suggestions: TestSuggestion[];
  overall: {
    lines: number;
    functions: number;
    branches: number;
  };
}

Example Usage:

const suggestions = await mcp.call('hooks_coverage_suggest', {
  files: ['src/api/*.ts', 'src/services/*.ts']
});

Graph Analysis Functions

hooks_graph_mincut

Finds optimal code boundaries using MinCut algorithm (Stoer-Wagner).

Input Parameters:

Parameter Type Required Description
files string[] Yes Files to analyze for module boundaries

Return Type:

interface Partition {
  groups: string[][];    // Two groups of files
  cutWeight: number;     // Weight of edges between groups
  modularity: number;    // Modularity score
}

interface MinCutResult {
  success: boolean;
  partition: Partition;
  bridges: Array<{       // Critical connections
    from: string;
    to: string;
  }>;
  articulationPoints: string[];  // Critical nodes
}

Example Usage:

const boundaries = await mcp.call('hooks_graph_mincut', {
  files: ['src/**/*.ts']
});

// CLI Usage
npx ruvector hooks graph-mincut src/**/*.ts

Error Handling:

  • Requires at least 2 connected files
  • Returns empty partition for disconnected graphs

hooks_graph_cluster

Detects code communities using spectral or Louvain clustering.

Input Parameters:

Parameter Type Required Description
files string[] Yes Files to analyze
method string No 'spectral' or 'louvain' (default: 'louvain')
clusters number No Number of clusters for spectral (default: 3)

Return Type:

interface ClusterResult {
  success: boolean;
  method: string;
  clusters: Map<string, number>;  // file -> cluster ID
  numClusters: number;
  modularity: number;
  // For spectral method only:
  eigenvalues?: number[];
  coordinates?: Map<string, number[]>;
}

Example Usage:

// Louvain community detection (automatic cluster count)
const louvain = await mcp.call('hooks_graph_cluster', {
  files: ['src/**/*.ts'],
  method: 'louvain'
});

// Spectral clustering (specify cluster count)
const spectral = await mcp.call('hooks_graph_cluster', {
  files: ['src/**/*.ts'],
  method: 'spectral',
  clusters: 5
});

// CLI Usage
npx ruvector hooks graph-cluster src/**/*.ts --method louvain
npx ruvector hooks graph-cluster src/**/*.ts --method spectral --clusters 5

Additional MCP Tools

Memory Functions

Tool Description
hooks_remember Store context in vector memory
hooks_recall Search vector memory for relevant context

Learning Functions

Tool Description
hooks_learn Combined learning: record experience and get recommendation
hooks_batch_learn Record multiple experiences in batch
hooks_learning_config Configure learning algorithms (9 algorithms available)
hooks_learning_stats Get learning statistics

Trajectory Functions

Tool Description
hooks_trajectory_begin Begin tracking execution trajectory
hooks_trajectory_step Add step to current trajectory
hooks_trajectory_end End trajectory with quality score

Security Functions

Tool Description
hooks_security_scan Parallel vulnerability pattern detection

Neural Functions

Tool Description
hooks_attention_info Get available attention mechanisms
hooks_gnn_info Get GNN layer capabilities
hooks_rag_context RAG-enhanced context retrieval

Programmatic API

VectorDB

import { VectorDb } from 'ruvector';

const db = new VectorDb({
  dimensions: 384,           // Must match embedding model
  maxElements: 10000,
  storagePath: './vectors.db'
});

// Insert
await db.insert({
  id: 'doc1',
  vector: new Float32Array(384),
  metadata: { title: 'Document 1' }
});

// Search
const results = await db.search({
  vector: queryVector,
  k: 5,
  threshold: 0.7
});

// Get
const doc = await db.get('doc1');

// Delete
await db.delete('doc1');

Core Modules

// AST Parser
import { getCodeParser } from 'ruvector/dist/core/ast-parser';
const parser = getCodeParser();
await parser.init();
const analysis = await parser.analyze('file.ts');

// Diff Embeddings
import diffEmbeddings from 'ruvector/dist/core/diff-embeddings';
const commit = await diffEmbeddings.analyzeCommit('HEAD');
const similar = await diffEmbeddings.findSimilarCommits(diff, 50, 5);

// Coverage Router
import coverage from 'ruvector/dist/core/coverage-router';
const data = coverage.getFileCoverage('file.ts');
const tests = coverage.suggestTests(['file.ts']);

// Graph Algorithms
import graph from 'ruvector/dist/core/graph-algorithms';
const g = graph.buildGraph(nodes, edges);
const partition = graph.minCut(g);
const clusters = graph.louvainCommunities(g);

Performance Characteristics

Operation Latency Notes
ONNX inference ~400ms Initial embedding
HNSW search ~0.045ms 8,800x faster than inference
Memory cache ~0.01ms 40,000x speedup
Native Rust <0.5ms p50 latency
WASM fallback 10-50ms Universal compatibility

Environment Variables

Variable Default Description
RUVECTOR_INTELLIGENCE_ENABLED true Enable/disable intelligence
RUVECTOR_LEARNING_RATE 0.1 Q-learning rate (0.0-1.0)
RUVECTOR_MEMORY_BACKEND rvlite Memory storage backend
INTELLIGENCE_MODE treatment A/B testing mode

CLI Commands

# Initialize hooks
npx ruvector hooks init --pretrain --build-agents quality

# Verify setup
npx ruvector hooks verify
npx ruvector hooks doctor --fix

# Analysis
npx ruvector hooks ast-analyze <file> --json
npx ruvector hooks ast-complexity <files> --threshold 10
npx ruvector hooks diff-analyze [commit] --json
npx ruvector hooks diff-classify [commit]
npx ruvector hooks coverage-route <file>
npx ruvector hooks coverage-suggest <files>
npx ruvector hooks graph-mincut <files>
npx ruvector hooks graph-cluster <files> --method louvain

# Memory
npx ruvector hooks remember "context" -t project
npx ruvector hooks recall "query"
npx ruvector hooks route "task description"

# Stats and export
npx ruvector hooks stats
npx ruvector hooks export -o backup.json
npx ruvector hooks import backup.json --merge

Dependencies

  • @modelcontextprotocol/sdk: ^1.0.0
  • @ruvector/attention: ^0.1.3
  • @ruvector/core: ^0.1.25
  • @ruvector/gnn: ^0.1.22
  • @ruvector/sona: ^0.1.4
  • @xenova/transformers: ^2.17.2