Skip to content

Instantly share code, notes, and snippets.

@ruvnet
Last active July 29, 2026 22:14
Show Gist options
  • Select an option

  • Save ruvnet/ec2e0b472762837e355d0ed4c4f12831 to your computer and use it in GitHub Desktop.

Select an option

Save ruvnet/ec2e0b472762837e355d0ed4c4f12831 to your computer and use it in GitHub Desktop.
RuVector 0.2.40 end-user guide: MetaHarness, Darwin, Flywheel, CLI, SDK, and MCP

RuVector 0.2.40: MetaHarness, Darwin, and Flywheel

RuVector 0.2.40 makes its research and optimization control plane available through the npm SDK, CLI, and MCP server. The integration uses pinned, direct dependencies so an installed package has the same capability set that was tested for the release.

Install

npm install ruvector@0.2.40

Node.js 20 or newer is required.

Check the installation

npx ruvector harness doctor --json

The doctor loads and checks all nine pinned capabilities:

  • MetaHarness core
  • Darwin
  • Flywheel
  • algorithmic harness kernel
  • cost-aware router
  • Red/Blue safety controls
  • Weight-EFT reward-hack detection
  • workspace lens
  • workspace probe

Use the SDK

All new APIs are exported from the main ruvector package:

const {
  getMetaHarnessCapabilities,
  routeWithMetaHarness,
  evaluateMetaHarnessPromotion,
  verifyMetaHarnessReplay,
} = require('ruvector');

const capabilities = await getMetaHarnessCapabilities();

const route = await routeWithMetaHarness({
  rows: [
    {
      embedding: [1, 0],
      scores: { economical: 0.91, frontier: 0.99 },
    },
  ],
  prices: { economical: 1, frontier: 20 },
  queryEmbedding: [1, 0],
  qualityBar: 0.9,
});

console.log(route);
// { id: "economical", predictedQuality: 0.91, costPerMTok: 1, metBar: true }

Additional SDK entry points support:

  • Flywheel generation runs and signed replay verification
  • explicit Darwin evolution runs
  • frozen promotion-gate evaluation
  • algorithmic harness construction
  • workspace receipt scoring
  • reward-hack trajectory scanning
  • live-credential guards

Darwin will not execute unless the caller explicitly supplies { execute: true }.

Use the CLI

Route by quality and cost

Prepare three JSON files:

[
  {
    "embedding": [1, 0],
    "scores": {
      "economical": 0.91,
      "frontier": 0.99
    }
  }
]
{
  "economical": 1,
  "frontier": 20
}
[1, 0]

Then route:

npx ruvector harness route \
  --examples examples.json \
  --prices prices.json \
  --query query.json \
  --quality-bar 0.9

Verify research evidence

npx ruvector harness flywheel verify replay-bundle.json
npx ruvector harness flywheel gate promotion-evidence.json

Run Darwin explicitly

npx ruvector harness darwin evolution-config.json --execute

The --execute requirement is deliberate because Darwin candidates can run code. Review the configuration and sandbox policy before authorizing a run.

Use MCP safely

Start the MCP server with the curated read-only profile:

RUVECTOR_MCP_PROFILE=readonly npx ruvector mcp start

The profile exposes six non-executing MetaHarness tools:

  • metaharness_status
  • metaharness_route
  • metaharness_replay_verify
  • metaharness_flywheel_gate
  • metaharness_workspace_probe
  • metaharness_reward_hack_scan

Darwin execution and Flywheel mutation loops are intentionally not exposed over MCP. They remain explicit SDK/CLI authority boundaries.

Upgrade notes

  • Node.js 20+ is now required.
  • MetaHarness packages are direct dependencies and are installed with RuVector.
  • Dependencies are loaded lazily, keeping ordinary RuVector startup fast.
  • Existing vector database APIs remain available from the same package entry point.

Verification

The published tarball was installed into a clean project before release. The release passed the full npm suite, SDK/CLI/MCP integration checks, MCP handshake and policy checks, distribution verification, startup-budget checks, and a production dependency audit with zero reported vulnerabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment