Files
ruflo/v3/@claude-flow/cli/package.json
T
ruv 473d2fcc82 feat(metaharness): SelfEvolvingRouter promotion-gate analyzer (iter 10)
Phase 2 final SHIPPABLE PIECE — the analyzer half of SelfEvolvingRouter
parallel-logging. The recording half (touching model-router.ts hot
path) is deferred to its own ADR since its blast radius is high.

router-parallel-analyze.mjs reads paired routing decisions from a
JSONL trajectory and computes the 3-criteria AND-gate codified in
ADR-150 review-round-1:

  (a) qualityScore improvement > 2%               (relative)
  (b) usdPerDecision increase    < 1%             (relative)
  (c) p95 routing-decision latency increase < 5%  (relative)

ALL THREE must hold. AND, not OR — the OR form let quality gains mask
cost regressions, exactly the failure mode ADR-149's Pareto framing
was built to prevent.

INPUT FORMAT (.swarm/router-parallel.jsonl)
  { ts, task, bandit: {pick, predictedQuality, predictedCostUsd},
    ser:    {pick, predictedQuality, predictedCostUsd},
    outcome:{actualModel, actualQuality, actualUsd, actualLatencyMs} }

COUNTERFACTUAL ATTRIBUTION
- Agreed picks → both arms get the actual outcome.
- Disagreed picks → bandit gets the actual outcome (it executed);
  SER's counterfactual quality/cost come from its predictions, and
  its latency is imputed from the mean of agreed-decision latencies
  for the picked model.

VERIFIED end-to-end with synthetic fixtures:
  Promotable case  (quality +6.24%, cost +0.25%, latency +0%): ✓ exit 0
  Non-promotable   (quality +1.68% — below +2%):               ⚠ exit 0 (1 in --strict)
  Insufficient n<30 path: clean message, exit 0
  Input-file-missing path: clean message, exit 0

OPTIONAL DEPENDENCY WIRING
- @metaharness/kernel@~0.1.0 added to optionalDependencies of both
  v3/@claude-flow/cli/package.json AND ruflo/package.json. The
  analyzer itself is dep-free (reads JSONL); the kernel dep lands now
  so the future Recording side can dynamic-import SelfEvolvingRouter
  without a separate package.json PR.

SMOKE STEP 17d
- All 3 criteria thresholds verifiable in source (2 / 1 / 5)
- AND-semantics literal (passes.quality && passes.cost && passes.latency)
- Insufficient-data guard + --strict mode both required

ADR-150 STATUS UPDATE
Phase 2 SelfEvolvingRouter line marked 🔄/✅ — analyzer landed,
recording half deferred to a separate ADR.

Smoke: 19 → 20. Fleet: 33/33. tsc clean.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-16 14:01:15 -04:00

139 lines
3.9 KiB
JSON

{
"name": "@claude-flow/cli",
"version": "3.11.0",
"type": "module",
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"sideEffects": false,
"bin": {
"cli": "./bin/cli.js",
"claude-flow": "./bin/cli.js",
"claude-flow-mcp": "./bin/mcp-server.js"
},
"homepage": "https://github.com/ruvnet/claude-flow#readme",
"bugs": {
"url": "https://github.com/ruvnet/claude-flow/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/ruvnet/claude-flow.git",
"directory": "v3/@claude-flow/cli"
},
"keywords": [
"claude",
"claude-code",
"anthropic",
"ai-agents",
"multi-agent",
"swarm",
"mcp",
"model-context-protocol",
"llm",
"cli",
"orchestration",
"automation",
"developer-tools",
"coding-assistant",
"vector-database",
"embeddings",
"self-learning",
"enterprise"
],
"author": {
"name": "RuvNet",
"email": "ruv@ruv.io",
"url": "https://ruv.io"
},
"license": "MIT",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
},
"./dist/*": "./dist/*",
"./ruvector": {
"types": "./dist/src/ruvector/index.d.ts",
"import": "./dist/src/ruvector/index.js"
},
"./ruvector/*": {
"types": "./dist/src/ruvector/*.d.ts",
"import": "./dist/src/ruvector/*.js"
},
"./mcp-tools": {
"types": "./dist/src/mcp-tools/index.d.ts",
"import": "./dist/src/mcp-tools/index.js"
},
"./memory": {
"types": "./dist/src/memory/memory-initializer.d.ts",
"import": "./dist/src/memory/memory-initializer.js"
},
"./intelligence": {
"types": "./dist/src/memory/intelligence.d.ts",
"import": "./dist/src/memory/intelligence.js"
}
},
"files": [
"dist",
"bin",
"scripts",
".claude",
"README.md"
],
"scripts": {
"build": "tsc",
"test": "vitest run",
"test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
"test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
"postinstall": "node ./scripts/postinstall.cjs",
"prepublishOnly": "cp ../../../README.md ./README.md",
"release": "npm version prerelease --preid=alpha && npm run publish:all",
"publish:all": "./scripts/publish.sh"
},
"devDependencies": {
"typescript": "^5.3.0",
"vitest": "^4.0.16"
},
"dependencies": {
"@claude-flow/cli-core": "^3.7.0-alpha.5",
"@claude-flow/mcp": "^3.0.0-alpha.8",
"@claude-flow/neural": "^3.0.0-alpha.9",
"@claude-flow/shared": "^3.0.0-alpha.7",
"@noble/ed25519": "^2.1.0",
"@ruvector/rabitq-wasm": "^0.1.0",
"semver": "^7.6.0",
"yaml": "^2.8.0"
},
"optionalDependencies": {
"@claude-flow/aidefence": "^3.0.2",
"@claude-flow/codex": "^3.0.0-alpha.8",
"@claude-flow/embeddings": "^3.0.0-alpha.18",
"@claude-flow/guidance": "^3.0.0-alpha.1",
"@claude-flow/memory": "^3.0.0-alpha.20",
"@claude-flow/plugin-gastown-bridge": "^0.1.3",
"@claude-flow/security": "^3.0.0-alpha.10",
"@metaharness/kernel": "~0.1.0",
"@metaharness/router": "~0.3.2",
"metaharness": "~0.1.11",
"@ruvector/attention": "^0.1.32",
"@ruvector/attention-darwin-arm64": "0.1.32",
"@ruvector/diskann": "^0.1.0",
"@ruvector/learning-wasm": "^0.1.29",
"@ruvector/router": "^0.1.30",
"@ruvector/ruvllm-wasm": "^2.0.2",
"@ruvector/rvagent-wasm": "^0.1.0",
"@ruvector/sona": "^0.1.6",
"@ruvector/tiny-dancer": "^0.1.22",
"agentdb": "^3.0.0-alpha.16",
"agentic-flow": "^3.0.0-alpha.1",
"ruvector": "^0.2.27"
},
"publishConfig": {
"access": "public",
"tag": "latest"
},
"overrides": {
"protobufjs": ">=7.5.6"
}
}