🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
chore(release): 3.25.3 — 10 fixes + CI guards (#2602)
rUv11f34ec947bd
diff --git a/.claude-plugin/scripts/ruflo-hook.cjs b/.claude-plugin/scripts/ruflo-hook.cjsindex 5b94703c2c..729c62f279 100644--- a/.claude-plugin/scripts/ruflo-hook.cjs+++ b/.claude-plugin/scripts/ruflo-hook.cjs@@ -14,7 +14,7 @@* Behaviour mirrors ruflo-hook.sh:* 1. Reads hook JSON payload from stdin.* 2. Prefers a locally installed `ruflo` or `claude-flow` binary.- * 3. Falls back to `npx --prefer-offline ruflo@latest`.+ * 3. Falls back to `npx --prefer-offline ruflo@alpha`.* 4. Always exits 0 — hook subcommands are best-effort telemetry.* 5. Swallows all stderr — nothing should surface to Claude Code.*@@ -157,7 +157,7 @@ function main() {// a spurious failure even though the shim itself works correctly.// The bash version doesn't hit this because it backgrounded the work.if (process.env.RUFLO_HOOK_SKIP_NPX !== '1') {- invokeHook('npx', ['--prefer-offline', '--yes', 'ruflo@latest'], hookArgs, stdinData);+ invokeHook('npx', ['--prefer-offline', '--yes', 'ruflo@alpha'], hookArgs, stdinData);}done();diff --git a/.github/workflows/helpers-manifest-guard.yml b/.github/workflows/helpers-manifest-guard.ymlnew file mode 100644index 0000000000..e9fe6c8831--- /dev/null+++ b/.github/workflows/helpers-manifest-guard.yml@@ -0,0 +1,74 @@+name: helpers-manifest-guard++# Regression guard for issue #2593.+#+# Root cause: `scripts/sign-helpers.mjs` existed but was NOT wired into+# `prepublishOnly`, so intelligence.cjs shipped in 3.24/3.25 with a stale+# 3.23.0 manifest hash. writeCriticalHelpers then fail-closed on every CLI+# run in stamped projects with a tamper warning.+#+# The fix (commit b6f4750fa) wired `sign-helpers.mjs` + `verify-helpers.mjs`+# into prepublishOnly. This guard fails if either script gets dropped from+# prepublishOnly again, or if either script file goes missing.++on:+ pull_request:+ paths:+ - 'v3/@claude-flow/cli/.claude/helpers/auto-memory-hook.mjs'+ - 'v3/@claude-flow/cli/.claude/helpers/hook-handler.cjs'+ - 'v3/@claude-flow/cli/.claude/helpers/intelligence.cjs'+ - 'v3/@claude-flow/cli/.claude/helpers/helpers.manifest.json'+ - 'v3/@claude-flow/cli/scripts/sign-helpers.mjs'+ - 'v3/@claude-flow/cli/scripts/verify-helpers.mjs'+ - 'v3/@claude-flow/cli/package.json'+ - '.github/workflows/helpers-manifest-guard.yml'+ push:+ branches: [main]+ paths:+ - 'v3/@claude-flow/cli/.claude/helpers/**'+ - 'v3/@claude-flow/cli/scripts/sign-helpers.mjs'+ - 'v3/@claude-flow/cli/scripts/verify-helpers.mjs'+ - 'v3/@claude-flow/cli/package.json'++jobs:+ guard:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ - uses: actions/setup-node@v4+ with:+ node-version: '20'++ # 1. The scripts themselves must exist. If either is deleted, the+ # prepublishOnly command below silently no-ops on that step and+ # manifest drift ships again.+ - name: sign-helpers.mjs and verify-helpers.mjs exist+ run: |+ set -euo pipefail+ test -f v3/@claude-flow/cli/scripts/sign-helpers.mjs || { echo '::error::scripts/sign-helpers.mjs missing (#2593)'; exit 1; }+ test -f v3/@claude-flow/cli/scripts/verify-helpers.mjs || { echo '::error::scripts/verify-helpers.mjs missing (#2593)'; exit 1; }++ # 2. prepublishOnly MUST invoke BOTH sign-helpers and verify-helpers.+ # This is the exact regression from #2593 — sign existed but was+ # never called by publish. Reading scripts.prepublishOnly directly+ # from the parsed JSON avoids false positives from comments/strings.+ - name: prepublishOnly wires sign-helpers + verify-helpers+ run: |+ set -euo pipefail+ pp=$(node -e "process.stdout.write(require('./v3/@claude-flow/cli/package.json').scripts.prepublishOnly || '')")+ echo "prepublishOnly: $pp"+ echo "$pp" | grep -q 'sign-helpers.mjs' || { echo '::error::prepublishOnly must call scripts/sign-helpers.mjs (#2593)'; exit 1; }+ echo "$pp" | grep -q 'verify-helpers.mjs' || { echo '::error::prepublishOnly must call scripts/verify-helpers.mjs (#2593)'; exit 1; }++ # 3. verify-helpers must run sign FIRST then verify — verify has to+ # run AFTER sign or a stale manifest would fail-close the release.+ - name: sign runs before verify in prepublishOnly+ run: |+ set -euo pipefail+ pp=$(node -e "process.stdout.write(require('./v3/@claude-flow/cli/package.json').scripts.prepublishOnly || '')")+ sign_pos=$(echo "$pp" | grep -bo 'sign-helpers.mjs' | head -1 | cut -d: -f1)+ ver_pos=$(echo "$pp" | grep -bo 'verify-helpers.mjs' | head -1 | cut -d: -f1)+ if [ "$sign_pos" -ge "$ver_pos" ]; then+ echo "::error::sign-helpers.mjs must run BEFORE verify-helpers.mjs in prepublishOnly (#2593)"+ exit 1+ fidiff --git a/.github/workflows/no-cli-optdep-bloat-2561.yml b/.github/workflows/no-cli-optdep-bloat-2561.ymlnew file mode 100644index 0000000000..1cd1be1f5f--- /dev/null+++ b/.github/workflows/no-cli-optdep-bloat-2561.yml@@ -0,0 +1,118 @@+# Regression guard for #2561 — CLI optionalDependencies bloat causes cold+# `npx -y @claude-flow/cli@alpha --version` (and `ruflo@alpha` wrapper) to+# time out because npm must resolve/download every optional dep before Node+# ever executes bin/cli.js and can hit its in-process --version fast-path.+#+# The fix (commit 610575ea5) pruned the CLI's optionalDependencies from ~26+# entries down to 5 core packages, and emptied ruflo's optionalDependencies.+# This guard fails CI if either budget is exceeded, OR if any of the+# specific heavy packages that caused the timeout are re-added.+#+# If this guard trips, either:+# (a) prune the dep back out and route the capability through a lazy+# runtime install / plugin store install, or+# (b) supersede this guard in a follow-up PR with a new cold-npx+# benchmark proving the added deps do not re-introduce the timeout.+name: no-cli-optdep-bloat-2561++on:+ push:+ branches: [main]+ paths:+ - 'v3/@claude-flow/cli/package.json'+ - 'ruflo/package.json'+ - '.github/workflows/no-cli-optdep-bloat-2561.yml'+ pull_request:+ paths:+ - 'v3/@claude-flow/cli/package.json'+ - 'ruflo/package.json'+ - '.github/workflows/no-cli-optdep-bloat-2561.yml'+ workflow_dispatch:++jobs:+ guard:+ runs-on: ubuntu-latest+ timeout-minutes: 5+ steps:+ - uses: actions/checkout@v4++ - name: Enforce CLI + ruflo optionalDependencies budget (#2561)+ run: |+ node -e '+ const fs = require("fs");+ const cli = JSON.parse(fs.readFileSync("v3/@claude-flow/cli/package.json", "utf8"));+ const ruflo = JSON.parse(fs.readFileSync("ruflo/package.json", "utf8"));++ const cliOpt = Object.keys(cli.optionalDependencies || {});+ const rufloOpt = Object.keys(ruflo.optionalDependencies || {});++ // Budgets set by #2561 (610575ea5). Tightened intentionally so the+ // in-process --version fast-path at bin/cli.js:101-117 is not+ // starved by a cold npm install of dozens of native/wasm deps.+ const CLI_MAX = 8;+ const RUFLO_MAX = 0;++ // Specific packages proven to trigger the cold-npx timeout in+ // #2561. Re-adding any of these to optionalDependencies re-opens+ // the regression regardless of the count budget.+ const FORBIDDEN = [+ "@claude-flow/aidefence",+ "@claude-flow/codex",+ "@claude-flow/embeddings",+ "@claude-flow/guidance",+ "@claude-flow/plugin-gastown-bridge",+ "@metaharness/darwin",+ "@metaharness/kernel",+ "@metaharness/redblue",+ "@metaharness/router",+ "@metaharness/weight-eft",+ "metaharness",+ "@ruvector/attention",+ "@ruvector/attention-darwin-arm64",+ "@ruvector/diskann",+ "@ruvector/learning-wasm",+ "@ruvector/router",+ "@ruvector/ruvllm-wasm",+ "@ruvector/rvagent-wasm",+ "@ruvector/sona",+ "@ruvector/tiny-dancer",+ "agentbbs",+ "agenticow",+ "page-agent"+ ];++ let failed = false;++ if (cliOpt.length > CLI_MAX) {+ console.error(`FAIL (#2561): v3/@claude-flow/cli optionalDependencies=${cliOpt.length} exceeds budget ${CLI_MAX}`);+ console.error(` entries: ${cliOpt.join(", ")}`);+ failed = true;+ } else {+ console.log(`OK: v3/@claude-flow/cli optionalDependencies=${cliOpt.length} (budget ${CLI_MAX})`);+ }++ if (rufloOpt.length > RUFLO_MAX) {+ console.error(`FAIL (#2561): ruflo optionalDependencies=${rufloOpt.length} exceeds budget ${RUFLO_MAX}`);+ console.error(` entries: ${rufloOpt.join(", ")}`);+ failed = true;+ } else {+ console.log(`OK: ruflo optionalDependencies=${rufloOpt.length} (budget ${RUFLO_MAX})`);+ }++ const reAdded = FORBIDDEN.filter(p => cliOpt.includes(p) || rufloOpt.includes(p));+ if (reAdded.length > 0) {+ console.error(`FAIL (#2561): forbidden heavy optionalDependencies re-added: ${reAdded.join(", ")}`);+ console.error(` these packages caused the cold npx --version timeout in #2561`);+ failed = true;+ } else {+ console.log(`OK: no forbidden heavy optionalDependencies present`);+ }++ if (failed) {+ console.error("");+ console.error("See #2561 for context. If you truly need one of these deps at the CLI");+ console.error("layer, prove cold `npx -y @claude-flow/cli@alpha --version` still");+ console.error("returns under 60s and update this guard in the same PR.");+ process.exit(1);+ }+ 'diff --git a/.github/workflows/no-phantom-agentic-flow-subpath.yml b/.github/workflows/no-phantom-agentic-flow-subpath.ymlnew file mode 100644index 0000000000..670c24db81--- /dev/null+++ b/.github/workflows/no-phantom-agentic-flow-subpath.yml@@ -0,0 +1,82 @@+# Regression guard for issue #2578.+#+# Bug: The ADR-104 witness fix marker was the literal string+# `agentic-flow/transport/loader`, and plugin-agent-federation's+# `src/transport/midstream-aware-loader.ts` performed a static+# `import type { … } from 'agentic-flow/transport/loader'`. Upstream+# `agentic-flow` does not expose that subpath in its `exports` map —+# any external verifier that literally resolves the specifier fails+# with `ERR_MODULE_NOT_FOUND`, and strict `moduleResolution: bundler`+# builds break too.+#+# Rules enforced (regression trip-wires):+# 1. No file under v3/@claude-flow/plugin-agent-federation/src/ may+# static-import `agentic-flow/transport/loader`. Dynamic+# `import('agentic-flow/transport/loader')` guarded by try/catch+# remains allowed (that is the intentional optional-path).+# 2. verification/witness-fixes.json's `ADR-104-transport` entry must+# NOT declare `agentic-flow/transport/loader` as its `marker`.+name: no-phantom-agentic-flow-subpath++on:+ push:+ branches: [main]+ paths:+ - 'v3/@claude-flow/plugin-agent-federation/src/**'+ - 'verification/witness-fixes.json'+ - '.github/workflows/no-phantom-agentic-flow-subpath.yml'+ pull_request:+ paths:+ - 'v3/@claude-flow/plugin-agent-federation/src/**'+ - 'verification/witness-fixes.json'+ - '.github/workflows/no-phantom-agentic-flow-subpath.yml'+ workflow_dispatch:++jobs:+ guard:+ runs-on: ubuntu-latest+ timeout-minutes: 5+ steps:+ - uses: actions/checkout@v4++ - name: Rule 1 — midstream-aware-loader must not static-import agentic-flow/transport/loader+ # Scoped to the file the #2578 fix touched. midstream-aware-loader.ts+ # is what plugin.ts uses at runtime (via loadFederationTransport), so a+ # regression here breaks the runtime path and the external Check 8+ # verifier. A dynamic `import('agentic-flow/transport/loader')` guarded+ # by try/catch is the intentional optional path and stays allowed.+ run: |+ node -e "+ const { readFileSync } = require('fs');+ const target = 'v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.ts';+ const src = readFileSync(target, 'utf-8');+ const re = /^\s*(?:import|export)(?:\s+type)?\s+[^;]*?from\s+['\"]agentic-flow\/transport\/loader['\"]/m;+ if (re.test(src)) {+ console.error('#2578 regression: ' + target + ' static-imports agentic-flow/transport/loader.');+ console.error('That subpath is not in agentic-flow\\'s published exports map — external Check 8 verifiers ERR_MODULE_NOT_FOUND.');+ console.error('Use the locally-declared type surface + dynamic import guarded by try/catch instead.');+ process.exit(1);+ }+ console.log('OK — ' + target + ' does not static-import the phantom subpath.');+ "++ - name: Rule 2 — ADR-104 witness marker must not be the phantom subpath+ run: |+ node -e "+ const { readFileSync } = require('fs');+ const witness = JSON.parse(readFileSync('verification/witness-fixes.json', 'utf-8'));+ const fixes = witness.fixes || witness || [];+ const entries = Array.isArray(fixes) ? fixes : Object.values(fixes);+ const adr104 = entries.find(f => f && f.id === 'ADR-104-transport');+ if (!adr104) {+ console.error('#2578 regression guard: ADR-104-transport entry missing from verification/witness-fixes.json');+ process.exit(1);+ }+ if (adr104.marker === 'agentic-flow/transport/loader') {+ console.error('#2578 regression: ADR-104-transport marker reverted to the phantom subpath.');+ console.error('agentic-flow does not export ./transport/loader — external Check 8 verifiers will ERR_MODULE_NOT_FOUND.');+ console.error('Use a marker that appears in the plugin\\'s own dist (e.g. loadFederationTransport).');+ process.exit(1);+ }+ console.log('OK — ADR-104-transport marker is \"' + adr104.marker + '\" (not the phantom subpath).');+ "diff --git a/.github/workflows/v3-ci.yml b/.github/workflows/v3-ci.ymlindex 1699c641e7..9b2a78622d 100644--- a/.github/workflows/v3-ci.yml+++ b/.github/workflows/v3-ci.yml@@ -484,10 +484,37 @@ jobs:with:version: ${{ env.PNPM_VERSION }}+ - name: Guard #2590 — onnxruntime-node postinstall must be skipped+ # Regression guard for ruvnet/ruflo#2590 — onnxruntime-node's postinstall+ # fetches a GPU nupkg from nuget.org that ETIMEDOUTs from GitHub runners,+ # taking `pnpm install --frozen-lockfile` down. The fix requires BOTH:+ # 1) v3/package.json → pnpm.neverBuiltDependencies contains "onnxruntime-node"+ # 2) this workflow's memory-smoke install uses --ignore-scripts+ # If either regresses, this step fails BEFORE the flaky network install.+ run: |+ set -euo pipefail+ # (1) neverBuiltDependencies gate+ node -e '+ const j = require("./v3/package.json");+ const list = (j.pnpm && j.pnpm.neverBuiltDependencies) || [];+ if (!list.includes("onnxruntime-node")) {+ console.error("REGRESSION #2590: v3/package.json pnpm.neverBuiltDependencies missing onnxruntime-node");+ console.error(" got:", JSON.stringify(list));+ process.exit(1);+ }+ console.log("ok: onnxruntime-node in pnpm.neverBuiltDependencies");+ '+ # (2) workflow install step must pass --ignore-scripts (belt-and-braces)+ if ! grep -qE "pnpm install --frozen-lockfile --ignore-scripts" .github/workflows/v3-ci.yml; then+ echo "REGRESSION #2590: memory-smoke install step lost --ignore-scripts"+ exit 1+ fi+ echo "ok: --ignore-scripts present on memory-smoke pnpm install"+- name: Install workspace + build memory (pnpm — needed for workspace:* protocol)working-directory: v3run: |- pnpm install --frozen-lockfile+ pnpm install --frozen-lockfile --ignore-scriptspnpm --filter @claude-flow/memory... run build- name: Pack memory tarballdiff --git a/.github/workflows/verification-pipeline.yml b/.github/workflows/verification-pipeline.ymlindex ba8daeb299..1547c3151f 100644--- a/.github/workflows/verification-pipeline.yml+++ b/.github/workflows/verification-pipeline.yml@@ -269,6 +269,14 @@ jobs:test -f v3/@claude-flow/cli/bin/cli.js && echo "CLI binary exists" || echo "⚠️ CLI binary not found (non-blocking)"continue-on-error: true+ # Pre-warm npx cache so downstream --version smoke checks don't pay+ # cold-install cost for the CLI + wrapper (#2561).+ - name: Pre-warm npx cache for CLI smoke checks+ run: |+ npm install -g @claude-flow/cli@alpha ruflo@alpha --prefer-offline --no-audit --no-fund || \+ echo "⚠️ Pre-warm install skipped (non-blocking)"+ continue-on-error: true+- name: Package for distributionrun: |echo "📦 Creating package..."diff --git a/package.json b/package.jsonindex a0f6b5d777..c70d3a93d9 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "claude-flow",- "version": "3.25.2",+ "version": "3.25.3","description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration","main": "dist/index.js","type": "module",diff --git a/plugin/scripts/ruflo-hook.cjs b/plugin/scripts/ruflo-hook.cjsindex 5b94703c2c..729c62f279 100644--- a/plugin/scripts/ruflo-hook.cjs+++ b/plugin/scripts/ruflo-hook.cjs@@ -14,7 +14,7 @@* Behaviour mirrors ruflo-hook.sh:* 1. Reads hook JSON payload from stdin.* 2. Prefers a locally installed `ruflo` or `claude-flow` binary.- * 3. Falls back to `npx --prefer-offline ruflo@latest`.+ * 3. Falls back to `npx --prefer-offline ruflo@alpha`.* 4. Always exits 0 — hook subcommands are best-effort telemetry.* 5. Swallows all stderr — nothing should surface to Claude Code.*@@ -157,7 +157,7 @@ function main() {// a spurious failure even though the shim itself works correctly.// The bash version doesn't hit this because it backgrounded the work.if (process.env.RUFLO_HOOK_SKIP_NPX !== '1') {- invokeHook('npx', ['--prefer-offline', '--yes', 'ruflo@latest'], hookArgs, stdinData);+ invokeHook('npx', ['--prefer-offline', '--yes', 'ruflo@alpha'], hookArgs, stdinData);}done();diff --git a/plugins/ruflo-core/scripts/ruflo-hook.cjs b/plugins/ruflo-core/scripts/ruflo-hook.cjsindex 5b94703c2c..729c62f279 100644--- a/plugins/ruflo-core/scripts/ruflo-hook.cjs+++ b/plugins/ruflo-core/scripts/ruflo-hook.cjs@@ -14,7 +14,7 @@* Behaviour mirrors ruflo-hook.sh:* 1. Reads hook JSON payload from stdin.* 2. Prefers a locally installed `ruflo` or `claude-flow` binary.- * 3. Falls back to `npx --prefer-offline ruflo@latest`.+ * 3. Falls back to `npx --prefer-offline ruflo@alpha`.* 4. Always exits 0 — hook subcommands are best-effort telemetry.* 5. Swallows all stderr — nothing should surface to Claude Code.*@@ -157,7 +157,7 @@ function main() {// a spurious failure even though the shim itself works correctly.// The bash version doesn't hit this because it backgrounded the work.if (process.env.RUFLO_HOOK_SKIP_NPX !== '1') {- invokeHook('npx', ['--prefer-offline', '--yes', 'ruflo@latest'], hookArgs, stdinData);+ invokeHook('npx', ['--prefer-offline', '--yes', 'ruflo@alpha'], hookArgs, stdinData);}done();diff --git a/ruflo/package.json b/ruflo/package.jsonindex 3276562be4..ea0487f6ed 100644--- a/ruflo/package.json+++ b/ruflo/package.json@@ -1,6 +1,6 @@{"name": "ruflo",- "version": "3.25.2",+ "version": "3.25.3","description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration","main": "bin/ruflo.js","type": "module",@@ -42,13 +42,7 @@"dependencies": {"@claude-flow/cli": "^3.23.0"},- "optionalDependencies": {- "metaharness": "~0.2.8",- "@metaharness/router": "~0.3.2",- "@metaharness/kernel": "~0.1.2",- "@metaharness/darwin": "~0.8.0",- "@metaharness/redblue": "~0.1.4"- },+ "optionalDependencies": {},"overrides": {"ruvector": "^0.2.27","better-sqlite3": ">=12.8.0",diff --git a/scripts/smoke-ruflo-hook-cjs.mjs b/scripts/smoke-ruflo-hook-cjs.mjsindex 95c137a4b9..67f3d5888c 100644--- a/scripts/smoke-ruflo-hook-cjs.mjs+++ b/scripts/smoke-ruflo-hook-cjs.mjs@@ -12,12 +12,19 @@*/import { spawnSync } from 'node:child_process';+import { readFileSync } from 'node:fs';import { fileURLToPath } from 'node:url';import { dirname, resolve } from 'node:path';const __dirname = dirname(fileURLToPath(import.meta.url));const REPO_ROOT = resolve(__dirname, '..');const SHIM_PATH = resolve(REPO_ROOT, 'plugins', 'ruflo-core', 'scripts', 'ruflo-hook.cjs');+const SH_SHIM_PATH = resolve(REPO_ROOT, 'plugins', 'ruflo-core', 'scripts', 'ruflo-hook.sh');+// Sibling copies must stay in sync — #2132 shipped three .cjs mirrors+const SIBLING_CJS_PATHS = [+ resolve(REPO_ROOT, 'plugin', 'scripts', 'ruflo-hook.cjs'),+ resolve(REPO_ROOT, '.claude-plugin', 'scripts', 'ruflo-hook.cjs'),+];let passed = 0;let failed = 0;@@ -116,6 +123,21 @@ console.log(`Shim path: ${SHIM_PATH}\n`);assert(!hasNodeError, 'No unhandled Node.js error on stderr');}+// Test 10: dist-tag parity — .cjs shims + .sh shim must reference the same ruflo@<tag>+// (Regression guard for #2600 — .cjs drifted to ruflo@latest while .sh used ruflo@alpha.)+{+ const tagRe = /ruflo@([a-z0-9][a-z0-9._-]*)/i;+ const extractTag = (p) => {+ const m = readFileSync(p, 'utf8').match(tagRe);+ return m ? m[1] : null;+ };+ const shTag = extractTag(SH_SHIM_PATH);+ const cjsPaths = [SHIM_PATH, ...SIBLING_CJS_PATHS];+ const cjsTags = cjsPaths.map(extractTag);+ const allMatch = shTag && cjsTags.every((t) => t === shTag);+ assert(allMatch, `dist-tag parity: .sh=${shTag}, .cjs=${JSON.stringify(cjsTags)}`);+}+console.log(`\nResults: ${passed} passed, ${failed} failed`);if (failed > 0) {process.exit(1);diff --git a/v3/@claude-flow/cli/__tests__/doctor-2599-learning-bridge-selfheal.test.ts b/v3/@claude-flow/cli/__tests__/doctor-2599-learning-bridge-selfheal.test.tsnew file mode 100644index 0000000000..697cc25c25--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/doctor-2599-learning-bridge-selfheal.test.ts@@ -0,0 +1,114 @@+/**+ * Regression guard for #2599:+ * Plain `doctor` (no --fix) must self-heal a missing/stale+ * `.claude-flow/memory-package.json` sidecar when the CLI can still resolve+ * `@claude-flow/memory` from its own module context.+ *+ * Root cause: `checkLearningBridge()` used `resolveMemoryPackageFromProject`+ * (project-side walk) and hard-failed on null. Only `--fix` invoked+ * `recordMemoryPackagePath` (CLI-side resolve + write sidecar). The scheduled+ * verification harness runs plain `doctor`, so it reported a hard fail for+ * something the CLI was fully capable of repairing automatically.+ *+ * This test drives the check via the `--component=learning-bridge` flag with+ * the project-side resolver mocked to null and the CLI-side recorder mocked+ * to write the sidecar. On the fixed code, plain `doctor` calls the recorder+ * exactly once (with `resolvedBy: "doctor-auto"`) and the sidecar file+ * appears. On the pre-fix code, the recorder is never called on the plain+ * path and the sidecar never appears — the test fails.+ */++import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { mkdirSync, mkdtempSync, writeFileSync, existsSync, rmSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';++// Mock the resolver module BEFORE importing doctor. checkLearningBridge closes+// over these two functions — the mock reshapes the closure.+vi.mock('../src/init/memory-package-resolver.js', async () => {+ const actual = await vi.importActual<typeof import('../src/init/memory-package-resolver.js')>(+ '../src/init/memory-package-resolver.js',+ );+ return {+ ...actual,+ // Project-side walk fails (stale/missing sidecar, pruned npx cache path).+ resolveMemoryPackageFromProject: vi.fn(() => null),+ // CLI-side recorder succeeds — writes the sidecar and returns a record.+ recordMemoryPackagePath: vi.fn((targetDir: string, resolvedBy = 'init') => {+ const sidecarDir = join(targetDir, '.claude-flow');+ const sidecar = join(sidecarDir, 'memory-package.json');+ const record = {+ distPath: '/fake/npx/cache/@claude-flow/memory/dist/index.js',+ version: '3.25.2',+ resolvedBy,+ resolvedAt: new Date().toISOString(),+ };+ mkdirSync(sidecarDir, { recursive: true });+ writeFileSync(sidecar, JSON.stringify(record, null, 2), 'utf-8');+ return record;+ }),+ readMemoryPackageVersion: vi.fn(() => '3.25.2'),+ };+});++// Import AFTER mock so doctor's module closure picks up the mocked functions.+import { doctorCommand } from '../src/commands/doctor.js';+import * as resolver from '../src/init/memory-package-resolver.js';++const ORIGINAL_CWD = process.cwd();+let tempProject: string;++beforeEach(() => {+ tempProject = mkdtempSync(join(tmpdir(), 'doctor-2599-'));+ // Deploy the auto-memory hook so checkLearningBridge does NOT short-circuit+ // on the "hook not installed" quiet-pass path — we need it to enter the+ // resolver branch that #2599 fixed.+ mkdirSync(join(tempProject, '.claude', 'helpers'), { recursive: true });+ writeFileSync(+ join(tempProject, '.claude', 'helpers', 'auto-memory-hook.mjs'),+ '// stub auto-memory hook for #2599 test\n',+ 'utf-8',+ );+ process.chdir(tempProject);+ vi.mocked(resolver.recordMemoryPackagePath).mockClear();+ vi.mocked(resolver.resolveMemoryPackageFromProject).mockClear();+});++afterEach(() => {+ process.chdir(ORIGINAL_CWD);+ try {+ rmSync(tempProject, { recursive: true, force: true });+ } catch {+ /* ignore */+ }+});++describe('doctor #2599 — plain run self-heals Learning Bridge sidecar', () => {+ it('writes the sidecar automatically on plain `doctor` (no --fix)', async () => {+ // Run doctor scoped to just the Learning Bridge check.+ // Crucially: no `fix`, no `install` flags — this is the plain path+ // that #2599 was reported against.+ const ctx = {+ flags: { component: 'learning-bridge' as unknown as string },+ args: [],+ config: {} as Record<string, unknown>,+ } as unknown as Parameters<NonNullable<typeof doctorCommand.action>>[0];++ await doctorCommand.action!(ctx);++ // #2599: the fix calls recordMemoryPackagePath(cwd, 'doctor-auto') from+ // within checkLearningBridge itself when the project-side resolve fails.+ // On the buggy code this branch does not exist — the recorder is only+ // invoked from the --fix / --install repair block, which we did not set.+ expect(vi.mocked(resolver.recordMemoryPackagePath)).toHaveBeenCalledTimes(1);+ expect(vi.mocked(resolver.recordMemoryPackagePath)).toHaveBeenCalledWith(+ expect.any(String),+ 'doctor-auto',+ );++ // And the sidecar file must exist as observable filesystem side-effect —+ // otherwise the runtime hook still cannot find @claude-flow/memory.+ const sidecar = join(tempProject, '.claude-flow', 'memory-package.json');+ expect(existsSync(sidecar)).toBe(true);+ });+});diff --git a/v3/@claude-flow/cli/__tests__/issue-2566-regression.test.ts b/v3/@claude-flow/cli/__tests__/issue-2566-regression.test.tsnew file mode 100644index 0000000000..46650941ac--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/issue-2566-regression.test.ts@@ -0,0 +1,59 @@+/**+ * CI regression guard for #2566.+ *+ * isAnswerCorrect() in src/benchmarks/gaia-agent.ts originally had two+ * substring checks: forward (`normModel.includes(normExpected)`) and+ * reverse (`normExpected.includes(normModel)`). The reverse check scored+ * a fragmentary model answer as correct whenever its normalized form was+ * any substring of the expected answer — e.g. model `"a"` vs expected+ * `"Paris, France"` → true — inflating GAIA scores via a+ * normalization-collision (the exact vector ADR-167/169 R1 forbid).+ *+ * The fix removes the reverse-substring branch; only the forward+ * substring + numeric-tolerance paths remain.+ *+ * This test locks in the correct behavior so the reverse branch cannot+ * silently return. It FAILS on the original bug and PASSES on the fix.+ */++import { describe, expect, it } from 'vitest';+import { isAnswerCorrect } from '../src/benchmarks/gaia-agent.js';++describe('#2566 — isAnswerCorrect reverse-substring collision', () => {+ it('rejects a fragmentary single-letter model answer against a longer expected answer', () => {+ // The canonical regression case from the issue: model returned "a", the+ // expected answer is "Paris, France". Under the original reverse-substring+ // rule, "paris, france".includes("a") was true → false positive.+ expect(isAnswerCorrect('a', 'Paris, France')).toBe(false);+ });++ it('rejects other fragmentary substrings that would collide under the reverse rule', () => {+ // Every one of these would have returned true under the old reverse rule+ // because they normalize to a substring of the expected answer.+ expect(isAnswerCorrect('e', 'Eiffel Tower')).toBe(false);+ expect(isAnswerCorrect('the', 'the quick brown fox')).toBe(false);+ expect(isAnswerCorrect('19', '1969')).toBe(false);+ expect(isAnswerCorrect('.', '3.14159')).toBe(false);+ });++ it('still accepts exact matches (case + whitespace insensitive)', () => {+ expect(isAnswerCorrect('Paris', 'paris')).toBe(true);+ expect(isAnswerCorrect(' Paris ', 'Paris')).toBe(true);+ });++ it('still accepts forward-substring matches (model contains expected)', () => {+ // The forward direction is the legitimate GAIA case:+ // model responded with extra context, expected is a substring of it.+ expect(isAnswerCorrect('Paris, France', 'Paris')).toBe(true);+ expect(isAnswerCorrect('The answer is 42.', '42')).toBe(true);+ });++ it('still accepts numeric answers within ±1% tolerance', () => {+ expect(isAnswerCorrect('3.14', '3.14159')).toBe(true);+ expect(isAnswerCorrect('100', '100.5')).toBe(true);+ });++ it('rejects numeric answers outside ±1% tolerance', () => {+ expect(isAnswerCorrect('50', '100')).toBe(false);+ });+});diff --git a/v3/@claude-flow/cli/__tests__/memory-store-upsert-default-2594.test.ts b/v3/@claude-flow/cli/__tests__/memory-store-upsert-default-2594.test.tsnew file mode 100644index 0000000000..d9cc8df5e9--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/memory-store-upsert-default-2594.test.ts@@ -0,0 +1,39 @@+/**+ * Regression guard for issue #2594 — `memory store → memory delete → memory store`+ * on the same (namespace, key) crashed with `UNIQUE constraint failed:+ * memory_entries.namespace, memory_entries.key`.+ *+ * Root cause: `memory delete` is a soft delete (sets status='deleted', row+ * remains), the schema's `UNIQUE(namespace, key)` constraint does NOT exclude+ * deleted rows, and the CLI's `memory store` command previously defaulted+ * `--upsert` to `false` — so the second store issued a plain INSERT that+ * collided with the soft-deleted row.+ *+ * Fix (c36cb4d66): flip the CLI-surface default to `--upsert=true` so+ * store→delete→store just works. Users who want strict insert semantics pass+ * `--no-upsert`.+ *+ * This guard is a pure static assertion on the command definition — it fails+ * the moment someone flips the default back to `false`.+ */+import { describe, it, expect } from 'vitest';+import { memoryCommand } from '../src/commands/memory.js';++describe('memory store --upsert default (#2594)', () => {+ const storeCmd = memoryCommand.subcommands?.find(c => c.name === 'store');+ const upsertOpt = storeCmd?.options?.find(o => o.name === 'upsert');++ it('exposes the `store` subcommand with an `upsert` option', () => {+ expect(storeCmd).toBeDefined();+ expect(upsertOpt).toBeDefined();+ expect(upsertOpt?.type).toBe('boolean');+ });++ it('defaults --upsert to true so store→delete→store does not hit UNIQUE(namespace,key)', () => {+ // If this flips back to `false` (or `undefined`), issue #2594 reopens: any+ // `store → delete → store` on the same (namespace, key) will crash with+ // `UNIQUE constraint failed: memory_entries.namespace, memory_entries.key`+ // because the soft-deleted row still occupies the unique slot.+ expect(upsertOpt?.default).toBe(true);+ });+});diff --git a/v3/@claude-flow/cli/__tests__/memory-verify-readonly-2596.test.ts b/v3/@claude-flow/cli/__tests__/memory-verify-readonly-2596.test.tsnew file mode 100644index 0000000000..36c05ca061--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/memory-verify-readonly-2596.test.ts@@ -0,0 +1,68 @@+/**+ * Regression guard for issue #2596 — verifyMemoryInit() must be read-only.+ *+ * Root cause (pre-fix): verifyMemoryInit() ran read/write self-tests on the+ * sql.js in-memory copy, then unconditionally serialized and wrote the buffer+ * back via writeFileRestricted() → atomic rename(tmp, dbPath). initializeMemoryDatabase()+ * activates ControllerRegistry and repairVectorIndexes() (better-sqlite3 in WAL+ * mode), both of which keep native handles open on the same path. On POSIX,+ * rename over an open fd succeeds; on Windows, MoveFileEx onto a path with any+ * open handle in the same process returns EPERM — a Windows-only false negative.+ * The self-test also DELETEs its own inserts before the writeback, so the write+ * was pointless.+ *+ * This guard: initialize a DB via the same initializer, snapshot the on-disk+ * bytes + mtime, call verifyMemoryInit, and assert the file was not touched.+ * Fails on the buggy code (writeback re-serializes → different bytes/mtime);+ * passes on the fix (sql.js in-memory copy discarded on close(), on-disk image+ * untouched).+ */+import { describe, it, expect, beforeEach, afterEach } from 'vitest';+import * as fs from 'node:fs';+import * as os from 'node:os';+import * as path from 'node:path';+import { initializeMemoryDatabase, verifyMemoryInit } from '../src/memory/memory-initializer.js';++let tmp: string;++beforeEach(() => {+ tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'verify-readonly-2596-'));+});++afterEach(() => {+ try { fs.rmSync(tmp, { recursive: true, force: true }); } catch { /* */ }+});++describe('verifyMemoryInit is read-only (#2596)', () => {+ it('does not modify the on-disk DB file (no writeback race with better-sqlite3 handle)', async () => {+ const dbPath = path.join(tmp, 'memory.db');++ // Bootstrap a real DB the same way production does — this also activates the+ // ControllerRegistry / repairVectorIndexes handles that the writeback used to race.+ const init = await initializeMemoryDatabase({ dbPath, force: true, migrate: false });+ expect(init.success).toBe(true);+ expect(fs.existsSync(dbPath)).toBe(true);++ // Snapshot on-disk state BEFORE verify.+ const before = fs.readFileSync(dbPath);+ const beforeMtime = fs.statSync(dbPath).mtimeMs;++ // Give mtime resolution a chance to advance so any writeback would be visible.+ await new Promise(r => setTimeout(r, 20));++ const result = await verifyMemoryInit(dbPath);+ expect(result).toBeDefined();++ // Assertion: the DB image on disk is byte-identical after verification.+ // On the pre-fix code, sql.js re-serialization + writeFileRestricted(encrypt)+ // rewrote the file with a different byte image AND a bumped mtime — both+ // detectable here regardless of platform (the Windows-only failure was the+ // EPERM crash of the writeback itself; the writeback is the disease).+ const after = fs.readFileSync(dbPath);+ const afterMtime = fs.statSync(dbPath).mtimeMs;++ expect(after.length).toBe(before.length);+ expect(after.equals(before)).toBe(true);+ expect(afterMtime).toBe(beforeMtime);+ }, 60_000);+});diff --git a/v3/@claude-flow/cli/package-lock.json b/v3/@claude-flow/cli/package-lock.jsonindex 334f07aaa0..ea47d549b3 100644--- a/v3/@claude-flow/cli/package-lock.json+++ b/v3/@claude-flow/cli/package-lock.json@@ -1,12 +1,12 @@{"name": "@claude-flow/cli",- "version": "3.25.1",+ "version": "3.25.3","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@claude-flow/cli",- "version": "3.25.1",+ "version": "3.25.3","hasInstallScript": true,"license": "MIT","dependencies": {diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.jsonindex 054736f7fe..de1762eb39 100644--- a/v3/@claude-flow/cli/package.json+++ b/v3/@claude-flow/cli/package.json@@ -1,6 +1,6 @@{"name": "@claude-flow/cli",- "version": "3.25.2",+ "version": "3.25.3","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",@@ -89,7 +89,7 @@"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 && rm -rf plugins && mkdir -p plugins && cp -r ../../../plugins/ruflo-metaharness plugins/",+ "prepublishOnly": "cp ../../../README.md ./README.md && rm -rf plugins && mkdir -p plugins && cp -r ../../../plugins/ruflo-metaharness plugins/ && node scripts/sign-helpers.mjs && node scripts/verify-helpers.mjs","release": "npm version prerelease --preid=alpha && npm run publish:all","publish:all": "./scripts/publish.sh"},@@ -108,33 +108,10 @@"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.21",- "@claude-flow/plugin-gastown-bridge": "^0.1.3","@claude-flow/security": "^3.0.0-alpha.10",- "@metaharness/darwin": "~0.8.0",- "@metaharness/kernel": "~0.1.2",- "@metaharness/redblue": "~0.1.4",- "@metaharness/router": "~0.3.2",- "@metaharness/weight-eft": "~0.1.1",- "@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",- "agentbbs": "~0.1.0","agentdb": "^3.0.0-alpha.17","agentic-flow": "^3.0.0-alpha.1",- "agenticow": "~0.2.4",- "metaharness": "~0.2.8",- "page-agent": "~1.11.0","ruvector": "^0.2.27"},"publishConfig": {diff --git a/v3/@claude-flow/cli/scripts/verify-helpers.mjs b/v3/@claude-flow/cli/scripts/verify-helpers.mjsnew file mode 100644index 0000000000..01885252f6--- /dev/null+++ b/v3/@claude-flow/cli/scripts/verify-helpers.mjs@@ -0,0 +1,68 @@+#!/usr/bin/env node+/**+ * Verify .claude/helpers/helpers.manifest.json against the shipped critical+ * helpers (ADR-174, issue #2593). Runs in prepublishOnly AFTER sign-helpers.mjs+ * so npm publish fails closed if the manifest ever drifts from disk again.+ *+ * Checks:+ * 1. Ed25519 signature over the canonical manifest bytes is valid under+ * RUFLO_HELPERS_PUBKEY (same primitive as helper-signing.ts).+ * 2. manifest.version matches package.json version.+ * 3. Every critical helper on disk hashes to the manifest entry.+ *+ * Optional arg: path to a helpers dir (e.g. an extracted `npm pack` tarball).+ * Defaults to <cli-pkg>/.claude/helpers.+ */+import { readFileSync, existsSync } from 'node:fs';+import { createHash, verify as edVerify } from 'node:crypto';+import { join, dirname, resolve } from 'node:path';+import { fileURLToPath } from 'node:url';++const __dirname = dirname(fileURLToPath(import.meta.url));+const PKG_ROOT = join(__dirname, '..');+const HELPERS_DIR = resolve(process.argv[2] || join(PKG_ROOT, '.claude', 'helpers'));+const CRITICAL = ['auto-memory-hook.mjs', 'hook-handler.cjs', 'intelligence.cjs'];++const RUFLO_HELPERS_PUBKEY = `-----BEGIN PUBLIC KEY-----+MCowBQYDK2VwAyEAhnFv74/CRcGWd0hL8zjyZ+52bIJ9SfcSgOutuKgo0Vg=+-----END PUBLIC KEY-----`;++function die(msg) { console.error(`[verify-helpers] ${msg}`); process.exit(1); }++const manifestPath = join(HELPERS_DIR, 'helpers.manifest.json');+if (!existsSync(manifestPath)) die(`missing manifest: ${manifestPath}`);++let signed;+try { signed = JSON.parse(readFileSync(manifestPath, 'utf-8')); }+catch (e) { die(`manifest is not valid JSON: ${e.message}`); }++if (!signed || signed.algorithm !== 'ed25519' || !signed.signature || !signed.manifest?.files) {+ die('manifest is malformed (missing algorithm/signature/files)');+}++// Canonical bytes — sorted file keys, MUST match sign-helpers.mjs + helper-signing.ts.+const sortedFiles = {};+for (const k of Object.keys(signed.manifest.files).sort()) sortedFiles[k] = signed.manifest.files[k];+const canonical = Buffer.from(JSON.stringify({ version: signed.manifest.version, files: sortedFiles }), 'utf-8');++if (!edVerify(null, canonical, RUFLO_HELPERS_PUBKEY, Buffer.from(signed.signature, 'base64'))) {+ die('Ed25519 signature does not verify against RUFLO_HELPERS_PUBKEY');+}++const pkgVersion = JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf-8')).version;+if (signed.manifest.version !== pkgVersion) {+ die(`manifest version ${signed.manifest.version} != package.json ${pkgVersion} — re-run sign-helpers.mjs`);+}++for (const name of CRITICAL) {+ const p = join(HELPERS_DIR, name);+ if (!existsSync(p)) die(`critical helper missing on disk: ${p}`);+ const actual = createHash('sha256').update(readFileSync(p)).digest('hex');+ const expected = signed.manifest.files[name];+ if (!expected) die(`manifest has no entry for ${name}`);+ if (actual !== expected) {+ die(`hash drift for ${name}\n manifest: ${expected}\n on disk: ${actual}\n → re-run sign-helpers.mjs`);+ }+}++console.log(`[verify-helpers] ok — ${CRITICAL.length} helpers match signed manifest @ ${signed.manifest.version}`);diff --git a/v3/@claude-flow/cli/src/benchmarks/gaia-agent.ts b/v3/@claude-flow/cli/src/benchmarks/gaia-agent.tsindex 11183c0298..d3505adefe 100644--- a/v3/@claude-flow/cli/src/benchmarks/gaia-agent.ts+++ b/v3/@claude-flow/cli/src/benchmarks/gaia-agent.ts@@ -771,9 +771,10 @@ export function isAnswerCorrect(modelAnswer: string, expected: string): boolean// Exact matchif (normModel === normExpected) return true;- // Substring match (expected contained in model answer or vice versa)+ // Substring match: expected contained in model answer (forward only).+ // Reverse (normExpected.includes(normModel)) removed — see #2566 / ADR-169 R1:+ // it scored fragmentary model answers ("a" vs "Paris, France") as correct.if (normModel.includes(normExpected)) return true;- if (normExpected.includes(normModel)) return true;// Numeric match with toleranceconst numModel = parseFloat(normModel.replace(/[^0-9.\-]/g, ''));diff --git a/v3/@claude-flow/cli/src/commands/doctor.ts b/v3/@claude-flow/cli/src/commands/doctor.tsindex 884f112524..7fc4ea4c92 100644--- a/v3/@claude-flow/cli/src/commands/doctor.ts+++ b/v3/@claude-flow/cli/src/commands/doctor.ts@@ -299,11 +299,25 @@ async function checkLearningBridge(): Promise<HealthCheck> {};}+ // #2599: Self-heal on plain `doctor` (not just --fix). The project-side resolver+ // fails when the sidecar is stale or missing (e.g. npx cache generation rotated),+ // but the CLI process itself can resolve @claude-flow/memory from its own module+ // context. Write the sidecar automatically instead of hard-failing the check.+ const record = recordMemoryPackagePath(cwd, 'doctor-auto');+ if (record) {+ const version = readMemoryPackageVersion(record.distPath);+ return {+ name: 'Learning Bridge',+ status: 'pass',+ message: `@claude-flow/memory resolvable via auto-recorded sidecar${version ? ` (v${version})` : ''}`,+ };+ }+return {name: 'Learning Bridge',status: 'fail',message: '@claude-flow/memory NOT resolvable — SessionStart self-learning imports are a silent no-op',- fix: 'npx ruflo@latest doctor --fix (records resolver sidecar) — or: npm i -D @claude-flow/memory',+ fix: 'npm i -D @claude-flow/memory (optional dep appears absent — likely --omit=optional install)',};}diff --git a/v3/@claude-flow/cli/src/commands/memory.ts b/v3/@claude-flow/cli/src/commands/memory.tsindex a4051d1fb7..b0dcdbdfae 100644--- a/v3/@claude-flow/cli/src/commands/memory.ts+++ b/v3/@claude-flow/cli/src/commands/memory.ts@@ -71,16 +71,19 @@ const storeCommand: Command = {{name: 'upsert',short: 'u',- description: 'Update if key exists (insert or replace)',+ // #2594: default true so `store → delete → store` doesn't hit the UNIQUE+ // (namespace, key) constraint on the soft-deleted row. Pass --no-upsert+ // for strict insert semantics.+ description: 'Update if key exists (default; pass --no-upsert for strict insert)',type: 'boolean',- default: false+ default: true},DB_PATH_OPTION],examples: [{ command: 'claude-flow memory store -k "api/auth" -v "JWT implementation"', description: 'Store text' },{ command: 'claude-flow memory store -k "pattern/singleton" --vector', description: 'Store vector' },- { command: 'claude-flow memory store -k "pattern" -v "updated" --upsert', description: 'Update existing' }+ { command: 'claude-flow memory store -k "pattern" -v "new" --no-upsert', description: 'Strict insert (fail if key exists)' }],action: async (ctx: CommandContext): Promise<CommandResult> => {const key = ctx.flags.key as string;diff --git a/v3/@claude-flow/cli/src/commands/neural.ts b/v3/@claude-flow/cli/src/commands/neural.tsindex 1f367acef8..94c16dcd66 100644--- a/v3/@claude-flow/cli/src/commands/neural.ts+++ b/v3/@claude-flow/cli/src/commands/neural.ts@@ -580,7 +580,9 @@ const statusCommand: Command = {},{component: 'ReasoningBank',- status: stats.reasoningBankSize > 0 ? output.success('Active') : output.dim('Empty'),+ status: (stats.patternsLearned > 0 || stats.reasoningBankSize > 0)+ ? output.success('Active')+ : output.dim('Empty'),details: `${stats.patternsLearned} patterns stored`,},{diff --git a/v3/@claude-flow/cli/src/memory/memory-initializer.ts b/v3/@claude-flow/cli/src/memory/memory-initializer.tsindex e8f839cac4..1fb75d5238 100644--- a/v3/@claude-flow/cli/src/memory/memory-initializer.ts+++ b/v3/@claude-flow/cli/src/memory/memory-initializer.ts@@ -2578,12 +2578,11 @@ export async function verifyMemoryInit(dbPath: string, options?: {});}- // Cleanup test entry- db.run(`DELETE FROM memory_entries WHERE id = ?`, [testId]);-- // Save changes- const data = db.export();- writeFileRestricted(dbPath, Buffer.from(data), { encrypt: true });+ // Verification is read-only: sql.js holds an in-memory copy; discarding it on+ // close() leaves the on-disk DB untouched. Writing back here would race the+ // still-open better-sqlite3 handle (WAL) owned by ControllerRegistry /+ // repairVectorIndexes — atomic rename fails with EPERM on Windows (#2596)+ // and risks clobbering concurrent writes on all platforms.db.close();const passed = tests.filter(t => t.passed).length;diff --git a/v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.ts b/v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.tsindex 4c750fec17..951ed56904 100644--- a/v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.ts+++ b/v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.ts@@ -28,19 +28,28 @@* surface from agentic-flow so consumers only import from one place.*/-// Type-only imports are erased at compile time — they do not force the-// installation of `agentic-flow`. The value import (`loadQuicTransport`)-// is now lazy via `loadAgenticFlowQuicTransport()` below so the-// federation plugin can install + boot in environments that block the-// koa transitive chain that agentic-flow pulls in (e.g. hardened npm-// registries that block `[email protected]` per issue #1949).-import type {- AgentTransport,- AgentMessage,- QuicTransportConfig,-} from 'agentic-flow/transport/loader';--export type { AgentTransport, AgentMessage, QuicTransportConfig };+// Minimal locally-declared type surface. Previously imported as+// `import type { … } from 'agentic-flow/transport/loader'`, but that+// subpath is not part of agentic-flow's published `exports` map — a+// strict `moduleResolution: bundler` build or an external verifier+// that literally does `import 'agentic-flow/transport/loader'` fails+// with `ERR_MODULE_NOT_FOUND` (issue #2578). agentic-flow remains an+// OPTIONAL peer dep, so the loader must compile without touching its+// exports map at all.+export interface AgentTransport {+ send?: (msg: AgentMessage) => Promise<void> | void;+ onMessage?: (handler: (msg: AgentMessage) => void) => void;+ close?: () => Promise<void> | void;+ [key: string]: unknown;+}+export interface AgentMessage {+ [key: string]: unknown;+}+export interface QuicTransportConfig {+ port?: number;+ host?: string;+ [key: string]: unknown;+}/*** Lazy loader for agentic-flow's `loadQuicTransport`. Returns `null`diff --git a/v3/package.json b/v3/package.jsonindex 0873b39058..ae71564b59 100644--- a/v3/package.json+++ b/v3/package.json@@ -60,6 +60,7 @@},"pnpm": {"neverBuiltDependencies": [+ "onnxruntime-node","sharp"],"overrides": {diff --git a/v3/pnpm-lock.yaml b/v3/pnpm-lock.yamlindex 787abbf587..469eff072b 100644--- a/v3/pnpm-lock.yaml+++ b/v3/pnpm-lock.yaml@@ -5,6 +5,7 @@ settings:excludeLinksFromLockfile: falseneverBuiltDependencies:+ - onnxruntime-node- sharpoverrides:@@ -130,90 +131,21 @@ importers:specifier: ^2.8.0version: 2.8.2optionalDependencies:- '@claude-flow/aidefence':- specifier: ^3.0.2- version: 3.0.3([email protected])- '@claude-flow/codex':- specifier: ^3.0.0-alpha.8- version: 3.0.0-alpha.12(@types/[email protected])- '@claude-flow/embeddings':- specifier: ^3.0.0-alpha.18- version: 3.0.0-alpha.45(@claude-flow/[email protected])(@ruvector/[email protected])(@ruvector/[email protected])(@ruvector/[email protected])([email protected])- '@claude-flow/guidance':- specifier: ^3.0.0-alpha.1- version: link:../guidance'@claude-flow/memory':specifier: ^3.0.0-alpha.21version: link:../memory- '@claude-flow/plugin-gastown-bridge':- specifier: ^0.1.3- version: 0.1.3(@claude-flow/memory@@claude-flow+memory)'@claude-flow/security':specifier: ^3.0.0-alpha.10version: link:../security- '@metaharness/darwin':- specifier: ~0.8.0- version: 0.8.0- '@metaharness/kernel':- specifier: ~0.1.2- version: 0.1.2- '@metaharness/redblue':- specifier: ~0.1.4- version: 0.1.4- '@metaharness/router':- specifier: ~0.3.2- version: 0.3.2(@ruvector/[email protected])- '@metaharness/weight-eft':- specifier: ~0.1.1- version: 0.1.1- '@ruvector/attention':- specifier: ^0.1.32- version: 0.1.32- '@ruvector/attention-darwin-arm64':- specifier: 0.1.32- version: 0.1.32- '@ruvector/diskann':- specifier: ^0.1.0- version: 0.1.0- '@ruvector/learning-wasm':- specifier: ^0.1.29- version: 0.1.29- '@ruvector/router':- specifier: ^0.1.30- version: 0.1.30- '@ruvector/ruvllm-wasm':- specifier: ^2.0.2- version: 2.0.2- '@ruvector/rvagent-wasm':- specifier: ^0.1.0- version: 0.1.0- '@ruvector/sona':- specifier: ^0.1.6- version: 0.1.7- '@ruvector/tiny-dancer':- specifier: ^0.1.22- version: 0.1.22- agentbbs:- specifier: ~0.1.0- version: 0.1.0agentdb:specifier: ^3.0.0-alpha.17version: 3.0.0-alpha.17(@types/[email protected])([email protected])agentic-flow:specifier: ^3.0.0-alpha.1version: 3.0.0-alpha.2- agenticow:- specifier: ~0.2.4- version: 0.2.4- metaharness:- specifier: ~0.2.8- version: 0.2.8(@metaharness/[email protected])- page-agent:- specifier: ~1.11.0- version: 1.11.0([email protected])ruvector:specifier: ^0.2.27+ version: 0.2.27([email protected])devDependencies:typescript:specifier: ^5.3.0@@ -786,86 +718,6 @@ packages:resolution: {integrity: sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==}requiresBuild: true- /@claude-flow/[email protected]([email protected]):- resolution: {integrity: sha512-KP2kgopV9EeicXtIhxhjZJaALg5arqf8h9fPpFDACBfyM8gI7s+zk6TDoL9VWC9eHWtRB/a/cBnq80rjA79ihA==}- engines: {node: '>=18.0.0'}- requiresBuild: true- peerDependencies:- agentdb: '>=2.0.0-alpha.1'- peerDependenciesMeta:- agentdb:- optional: true- dependencies:- agentdb: 3.0.0-alpha.17(@types/[email protected])([email protected])- dev: false- optional: true-- /@claude-flow/[email protected](@types/[email protected]):- resolution: {integrity: sha512-8ouFWhK42nwtn166bdfgcAFqNS/ZcWdqEmUkmIZee1kUwvYIAgOM5LpmPPe0UyFhTwjDv9ztEizhBBRwYbQ+4w==}- engines: {node: '>=18'}- hasBin: true- requiresBuild: true- peerDependencies:- '@claude-flow/cli': ^3.0.0-alpha.1- peerDependenciesMeta:- '@claude-flow/cli':- optional: true- dependencies:- '@iarna/toml': 2.2.5- chalk: 5.6.2- commander: 12.1.0- fs-extra: 11.3.3- inquirer: 9.3.8(@types/[email protected])- toml: 3.0.0- yaml: 2.8.2- transitivePeerDependencies:- - '@types/node'- dev: false- optional: true-- /@claude-flow/[email protected](@claude-flow/[email protected])(@ruvector/[email protected])(@ruvector/[email protected])(@ruvector/[email protected])([email protected]):- resolution: {integrity: sha512-OcFFh7H22ZnApdzqWXPNvUgz6XYYjhaDFyYRufmKPfRYsh8TmWOF5xUV3i9MCRqz38EugJqKQ8mbs35DC+Dgjg==}- engines: {node: '>=20.0.0'}- requiresBuild: true- peerDependencies:- '@claude-flow/shared': ^3.0.0-alpha.1- '@huggingface/transformers': ^4.0.0- '@ruvector/attention': ^2.2.2- '@ruvector/core': ^0.1.31- '@ruvector/diskann': ^0.1.0- '@ruvector/rabitq-wasm': ^0.1.0- agentic-flow: ^2.0.0- ruvector-onnx-embeddings-wasm: ^0.1.2- peerDependenciesMeta:- '@huggingface/transformers':- optional: true- '@ruvector/attention':- optional: true- '@ruvector/core':- optional: true- '@ruvector/diskann':- optional: true- '@ruvector/rabitq-wasm':- optional: true- agentic-flow:- optional: true- ruvector-onnx-embeddings-wasm:- optional: true- dependencies:- '@claude-flow/shared': 3.0.0-alpha.7- '@ruvector/attention': 0.1.32- '@ruvector/diskann': 0.1.0- '@ruvector/rabitq-wasm': 0.1.0- '@xenova/transformers': 2.17.2- agentic-flow: 3.0.0-alpha.2- sql.js: 1.14.1- transitivePeerDependencies:- - bare-abort-controller- - bare-buffer- - react-native-b4a- dev: false- optional: true-/@claude-flow/[email protected]:resolution: {integrity: sha512-lP1t8GMWDl9RxnwMZrjMukZkyglhge7Znhj1PbUiUQ94kHcN+dAxUkA75HM1n7BONbIDcE/CS8qN2ril5KgzNg==}dependencies:@@ -880,23 +732,6 @@ packages:- utf-8-validatedev: false- /@claude-flow/[email protected](@claude-flow/memory@@claude-flow+memory):- resolution: {integrity: sha512-ZHqtgiZOIa0lHelPZ8AWeiW99a84t5PmMY2U90Jp5Iqd/m/P2VIAY0CmHAWEPo1oomTu0NulJFtoblto8K9U9w==}- engines: {node: '>=20.0.0'}- requiresBuild: true- peerDependencies:- '@claude-flow/memory': '>=3.0.0-alpha.1'- peerDependenciesMeta:- '@claude-flow/memory':- optional: true- dependencies:- '@claude-flow/memory': link:@claude-flow/memory- '@iarna/toml': 2.2.5- uuid: 9.0.1- zod: 3.25.76- dev: false- optional: true-/@claude-flow/[email protected]:resolution: {integrity: sha512-5iehTHguBFjlyZqy+fRoKfZVL/nFeE93A94nUUKJvu8y7AmhfpVqtQAZbmKztwQGJ5rv7iBb3Kwl1MUo3K5QkA==}dependencies:@@ -1753,66 +1588,6 @@ packages:resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==}dev: false- /@metaharness/[email protected]:- resolution: {integrity: sha512-B8tF7IrrSxwKS6fEPEL6N2Juth9WWn+hppLUtUYPTJ2vcHzzZPIg2cS5T9qTyNNuANlTSWnQHnvzlfvYdGNfeQ==}- engines: {node: '>=20.0.0'}- hasBin: true- requiresBuild: true- dev: false- optional: true-- /@metaharness/[email protected]:- resolution: {integrity: sha512-Pgefr/es0Btofh7GxQrOAg/i43ZKcLUfeD9rndOAkpA8s3ZYohSmfLerJLNsGOOKc2eTvmmauljl8QEVmKC2dw==}- engines: {node: '>=20.0.0'}- hasBin: true- requiresBuild: true- dev: false- optional: true-- /@metaharness/[email protected]:- resolution: {integrity: sha512-3+8blfjmxXq1Pc7ixMs/mtH4GnQr9U+DUJlLPwHjf803gKrTQKW4l1uLU10n9FwqmIHCbuC+7kBXhGbaE9LQBg==}- engines: {node: '>=20.0.0'}- requiresBuild: true- peerDependencies:- '@ruvector/rvf': ^0.2.0- peerDependenciesMeta:- '@ruvector/rvf':- optional: true- dependencies:- '@ruvector/emergent-time': 0.1.0- dev: false- optional: true-- /@metaharness/[email protected]:- resolution: {integrity: sha512-JaAk6bs3xA7Ks5RnAcZoxI3WfzpYL+Bk262SCI07w82BDOA7C6VxwGM63F7b86lRTKUVjTEnSqf7QZ3uyElT/g==}- engines: {node: '>=20.0.0'}- hasBin: true- requiresBuild: true- dev: false- optional: true-- /@metaharness/[email protected](@ruvector/[email protected]):- resolution: {integrity: sha512-LQElU6mUrWd3ffJ5bwoonEIgw7oFQZpwZaehffyl/Pg+iozpRjIBPEXdb4uTOBnKH+yPiTEWKc+h9AiZr9Os9w==}- engines: {node: '>=20.0.0'}- requiresBuild: true- peerDependencies:- '@ruvector/tiny-dancer': ^0.1.21- peerDependenciesMeta:- '@ruvector/tiny-dancer':- optional: true- dependencies:- '@ruvector/tiny-dancer': 0.1.22- dev: false- optional: true-- /@metaharness/[email protected]:- resolution: {integrity: sha512-GSg0APPAbRK93OzrzlE+R8hfEK+I5+Zhmh0Z28RC9Mk5/MjhPo3shqINO7ye8VPGYHIO4rars9FwCWbe/V4cEQ==}- engines: {node: '>=20.0.0'}- hasBin: true- requiresBuild: true- dev: false- optional: true-resolution: {integrity: sha512-yO28oVFFC7EBoiKdAn+VqRm+plcfv4v0xp6osG/VsCB0NlPZWi87ajbCZZ8f/RvOFLEu7//rSRmuZZ7lMoe3gQ==}engines: {node: '>=18'}@@ -4855,44 +4630,6 @@ packages:dev: falseoptional: true- /@page-agent/[email protected]([email protected]):- resolution: {integrity: sha512-loeD+78vGfxBDj6tFnExhEIreb2NiyFfIxEkILYcfWyz8qUp9vZTpJm/hRNN0EkBsaPF328LfDydMcVKcZIEvw==}- requiresBuild: true- peerDependencies:- zod: ^3.25.0 || ^4.0.0- dependencies:- '@page-agent/llms': 1.11.0([email protected])- '@page-agent/page-controller': 1.11.0- chalk: 5.6.2- zod: 3.25.76- dev: false- optional: true-- /@page-agent/[email protected]([email protected]):- resolution: {integrity: sha512-9coqfbv/jNa7XwwGlQUNrwb3pBgpjgRbAfzB2AYDekyoYtyKsWCFlh6O62ANq3qeqqAOgDWYuuB+Dh7npq2Q3g==}- requiresBuild: true- peerDependencies:- zod: ^3.25.0 || ^4.0.0- dependencies:- chalk: 5.6.2- zod: 3.25.76- dev: false- optional: true-- /@page-agent/[email protected]:- resolution: {integrity: sha512-DOG386ur+0yeC/jKECdGP97ugN+HDuyxPbmdvoUjMWpQcfIFh7QD+wIhdygKPWOvOnwzQxsehzf6IdVdlMQgfg==}- requiresBuild: true- dependencies:- ai-motion: 0.4.8- dev: false- optional: true-- /@page-agent/[email protected]:- resolution: {integrity: sha512-XSJlaNzj3j+uSNfGkkkxw6hyKw+d8fuZd/N1/NrxvTJIiUhVMXQ1PE30JRu5yWzbvmezKSCmloz8wbq4sWsrFw==}- requiresBuild: true- dev: false- optional: true-/@peculiar/[email protected]:resolution: {integrity: sha512-xNLYLBFTBKkCzEZIw842BxytQQATQv+lDTCEMZ8C196iJcJJMBUZxrhSTxLaohMyKK8QlzRNTRkUmanucnDSqg==}requiresBuild: true@@ -5201,73 +4938,9 @@ packages:ruvector-core-linux-x64-gnu: 0.1.29ruvector-core-win32-x64-msvc: 0.1.29- /@ruvector/[email protected]:- resolution: {integrity: sha512-QMw34e96mbgXBkCALtIFQcQhx+Ic9uKf3XYKulT9Ibk3+GN9pdVDUldUZa1m9LZnzz/M8yCcl/9E90lr6hgEag==}- engines: {node: '>= 18'}- cpu: [arm64]- os: [darwin]- requiresBuild: true- dev: false- optional: true-- /@ruvector/[email protected]:- resolution: {integrity: sha512-BpZHgwyxlqZXluFq937KhQZQRLoHq1mPCgbacZAO4nphhpoOWuT4li2vSv3FueYGpzyfFYu27lCJNg05S7r/hw==}- engines: {node: '>= 18'}- cpu: [x64]- os: [darwin]- requiresBuild: true- dev: false- optional: true-- /@ruvector/[email protected]:- resolution: {integrity: sha512-nw2oc/172ZTd1ToQj6bbSkiQavJaU/xfOEW5IQzKMs/Jr3lMvEc9u/AiDBVoMaTe1b2zSjUi4y3n8bDU9Tg1ZQ==}- engines: {node: '>= 18'}- cpu: [arm64]- os: [linux]- requiresBuild: true- dev: false- optional: true-- /@ruvector/[email protected]:- resolution: {integrity: sha512-lRYcowyOiD4edl84PZQ2bwAlH4qTAAXr7G73rFIcwsf53iUm++qG1CgjGcUF9iI8FeEy4BIUgVheVywNOHLYsw==}- engines: {node: '>= 18'}- cpu: [x64]- os: [linux]- requiresBuild: true- dev: false- optional: true-- /@ruvector/[email protected]:- resolution: {integrity: sha512-IAk0Tjco/WSRe6z7k6kR9JzmssMv6g7sg8JaknxbH5HexbKWloh07E9cgoOp2gtciyT1mYF66FgJaamUmHzmqA==}- engines: {node: '>= 18'}- cpu: [x64]- os: [win32]- requiresBuild: true- dev: false- optional: true-- /@ruvector/[email protected]:- resolution: {integrity: sha512-PdhDpQPN7Ch+67LbZCFgosoJ+TmNczTL2X1my+Qh9ejFpPAFwfmE1gTco1HHBA7Vo0gdmB8GxttbqbG+I9vxiQ==}- engines: {node: '>=18.0.0'}- requiresBuild: true- optionalDependencies:- '@ruvector/diskann-darwin-arm64': 0.1.0- '@ruvector/diskann-darwin-x64': 0.1.0- '@ruvector/diskann-linux-arm64-gnu': 0.1.0- '@ruvector/diskann-linux-x64-gnu': 0.1.0- '@ruvector/diskann-win32-x64-msvc': 0.1.0- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-GSvq2bB+aTNXpISTqccdZwOroRLSdQhi33L7569QUVi9P7a03hEtdZSX/Gk5aWtDufp230T57uLXQUA1Q0uBeQ==}- /@ruvector/[email protected]:- resolution: {integrity: sha512-GNy6SSvp44xgWREezVLbnY5F41Wa4AF7hFeE2drYh5MOon+RwxymfNlsjBoAL+osZj44DigPN1lD/yBcv8J8Dg==}- requiresBuild: true- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-/MfLrqsIGxcMVHRW5ZyaU+0w+tnoEw+sLrQCYj/o3E7Gu0Cc+5QFE84p9CJUtaJLO/T+x5kEYLLC4iBwbYjkNg==}engines: {node: '>= 10'}@@ -5661,12 +5334,6 @@ packages:requiresBuild: trueoptional: true- /@ruvector/[email protected]:- resolution: {integrity: sha512-jVu+t710JvEzU6UZZvKrTp+dWsm3hKzOqB+yxrcqFsVaccVfeKyQuvCx13qVENvuntbnfslryErn9QbydH76yQ==}- requiresBuild: true- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-sRGNOMAcyC5p/nITnR0HLFUEObZ9Mh/T1erNiqhKrNUqIPZM1qAYBgN3xmZp02isdiTilRpxQihz3j4EzGPXIw==}engines: {node: '>= 18'}@@ -5690,12 +5357,6 @@ packages:'@ruvector/ruvllm-linux-x64-gnu': 2.0.1'@ruvector/ruvllm-win32-x64-msvc': 2.0.1- /@ruvector/[email protected]:- resolution: {integrity: sha512-zhcnU7XfBEfDwkDFscehq6qGU/TW4LNr287xHHXCuNsaTBPlb8YSnkuMNWg6BBIK/X+UdWAsyYESN5jbNQEaBQ==}- requiresBuild: true- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-vll3WJwDn3oOfy1PB10IG7/f3zBpFiMNHL2/2tdJmeRR8La/rSPJ0ZH5MDIsfleiVtaWzh9bvVCtVkZ6uo2jeg==}cpu: [arm64]@@ -5724,14 +5385,6 @@ packages:requiresBuild: trueoptional: true- /@ruvector/[email protected]:- resolution: {integrity: sha512-P1UaZaWoh6GAm+CUV2tOzKm+J0Z48PFO7OJ3BnPMh6rSFPMbnpdrjbV+WxacV8zsNeceE5iJxwLUYFK5q5YHkg==}- cpu: [x64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-sgnoNphOnbD4d3+YyQ83MlGO7sX4kbcDwsFNz7p2mlTaDR8coQXoudSaPrMeMpeUojFUqoxeDvVly/un3jADig==}cpu: [x64]@@ -5751,19 +5404,6 @@ packages:'@ruvector/rvf-node-win32-x64-msvc': 0.1.7optional: true- /@ruvector/[email protected]:- resolution: {integrity: sha512-9BxoECGiQ7ttj6V0ClLK83DLxaxraRRWzIt06IgETUxTYdqGQ3MZgacEBn7vWRecTK8X9/LrZrIOmNcQZx6OuA==}- engines: {node: '>= 16'}- requiresBuild: true- optionalDependencies:- '@ruvector/rvf-node-darwin-arm64': 0.1.7- '@ruvector/rvf-node-darwin-x64': 0.1.7- '@ruvector/rvf-node-linux-arm64-gnu': 0.1.7- '@ruvector/rvf-node-linux-x64-gnu': 0.2.0- '@ruvector/rvf-node-win32-x64-msvc': 0.1.7- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-YM7L6TvhVoC5w0kUMl8ASback2ka3MesPvuf+lRYSJEcaf6bncPX7YGzcrsheOe4BBwyiyx39vAijVPx1nZkWA==}requiresBuild: true@@ -6871,14 +6511,6 @@ packages:requiresBuild: truedev: false- resolution: {integrity: sha512-XOEjlgdObklxnZdA0yS6pAcKId99SsFwH5ZF5qNByWs6VsTht1oxjbuFhuapGV7fNnQ6Y2XLq0GbtZ7t+sQMbw==}- engines: {node: '>=18'}- hasBin: true- requiresBuild: true- dev: false- optional: true-resolution: {integrity: sha512-OO/hwO+MYtqsgz+6CyrY2BCjcgRWGv5Ob7nFupNEt7m1ZchIArCwvBAcJgFMFNFqWxH6AN2ThiQKBmfXboBkPg==}engines: {node: '>=18.0.0'}@@ -7446,16 +7078,6 @@ packages:- utf-8-validatedev: false- resolution: {integrity: sha512-x7CqbLhivrHNYCN0mLCi5+xDWI1ycJJuMSGGZchmlu2J4RDLLDkRokzA2VM+OaocbCe6sb1mBgrGgP7rsmoCjQ==}- engines: {node: '>=18'}- hasBin: true- requiresBuild: true- dependencies:- '@ruvector/rvf-node': 0.2.0- dev: false- optional: true-resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==}engines: {node: '>= 8.0.0'}@@ -7482,12 +7104,6 @@ packages:clean-stack: 5.3.0indent-string: 5.0.0- resolution: {integrity: sha512-9nQVjf8lrYQWSW0sZdb9bES4x8Ei1w9C0S62po2KvRbMjslmjm0WMeszyW771SEauDnu4YGWqurLZ/gCkCTosQ==}- requiresBuild: true- dev: false- optional: true-resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}peerDependencies:@@ -10152,19 +9768,6 @@ packages:json-buffer: 3.0.1dev: true- resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}- engines: {node: '>=6'}- requiresBuild: true- dev: false- optional: true-- resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}- requiresBuild: true- dev: false- optional: true-resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}engines: {node: '>= 0.8.0'}@@ -10446,28 +10049,6 @@ packages:resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}- /[email protected](@metaharness/[email protected]):- resolution: {integrity: sha512-TFc8fcJR02e4z3ikRMqxmWSqpzPQgGV8S0vd0N2gYUOmtcAnxOfoSmcNbrgGjFrBZDjfCFoZgfIaBlUY+kE1Dg==}- engines: {node: '>=20.0.0'}- hasBin: true- requiresBuild: true- peerDependencies:- '@metaharness/kernel': ^0.1.0- peerDependenciesMeta:- '@metaharness/kernel':- optional: true- dependencies:- '@metaharness/darwin': 0.2.8- '@metaharness/kernel': 0.1.2- '@metaharness/redblue': 0.1.4- '@metaharness/weight-eft': 0.1.1- kolorist: 1.8.0- prompts: 2.4.2- optionalDependencies:- '@ruvector/ruvllm': 2.6.0- dev: false- optional: true-resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==}engines: {node: '>= 0.6'}@@ -11039,7 +10620,6 @@ packages:resolution: {integrity: sha512-5ba7TWomIV/9b6NH/1x/8QEeowsb+jBEvFzU6z0T4mNsFwdPqXeFUM7uxC6QeSRkEbWu3qEB0VMjrvzN/0S9+w==}os: [win32, darwin, linux]- requiresBuild: truedependencies:onnxruntime-common: 1.14.0optional: true@@ -11047,7 +10627,6 @@ packages:resolution: {integrity: sha512-JH7+czbc8ALA819vlTgcV+Q214/+VjGeBHDjX81+ZCD0PCVCIFGFNtT0V4sXG/1JXypKPgScQcB3ij/hk3YnTg==}os: [win32, darwin, linux]- requiresBuild: truedependencies:adm-zip: 0.5.16global-agent: 3.0.0@@ -11214,21 +10793,6 @@ packages:resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}- resolution: {integrity: sha512-zoV2WAxRlIbt80CZzPtpw+DyBdLMRwarJJT7JJSYysUnw72SA/CaG54VpHv3bzbAXrPUZgHXqnn/9FPb3OKRIA==}- requiresBuild: true- peerDependencies:- zod: ^3.25.0 || ^4.0.0- dependencies:- '@page-agent/core': 1.11.0([email protected])- '@page-agent/llms': 1.11.0([email protected])- '@page-agent/page-controller': 1.11.0- '@page-agent/ui': 1.11.0- chalk: 5.6.2- zod: 3.25.76- dev: false- optional: true-resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}engines: {node: '>=6'}@@ -11517,16 +11081,6 @@ packages:dev: falseoptional: true- resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}- engines: {node: '>= 6'}- requiresBuild: true- dependencies:- kleur: 3.0.3- sisteransi: 1.0.5- dev: false- optional: true-resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==}requiresBuild: true@@ -12000,7 +11554,7 @@ packages:- zoddev: falseresolution: {integrity: sha512-Sh1Px7yI/exwaagoy4RjtHAoAQk8ge9kmBE4EL6yfHUwYYaTzTE3TocRbkgxkCcGHLWgX2lQPBLd7iAahNDFHg==}engines: {node: '>=18.0.0'}hasBin: true@@ -12023,9 +11577,7 @@ packages:'@modelcontextprotocol/sdk': 1.27.1([email protected])'@ruvector/attention': 0.1.32'@ruvector/core': 0.1.30- '@ruvector/diskann': 0.1.0'@ruvector/gnn': 0.1.25- '@ruvector/router': 0.1.30'@ruvector/sona': 0.1.7chalk: 4.1.2commander: 11.1.0@@ -12335,12 +11887,6 @@ packages:dependencies:is-arrayish: 0.3.4- resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}- requiresBuild: true- dev: false- optional: true-resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==}engines: {node: '>=8'}diff --git a/verification/linux/manifest.md.json b/verification/linux/manifest.md.jsonindex 6daca8fb74..85c8145127 100644--- a/verification/linux/manifest.md.json+++ b/verification/linux/manifest.md.json@@ -726,7 +726,7 @@},{"id": "ADR-104-transport",- "desc": "Federation plugin wires real wire transport via agentic-flow/transport/loader (loadQuicTransport). plugin.ts loads transport in initialize(), binds optional listener on config.port, closes on shutdown. sendToNode now does real ws send to peer endpoint resolved via discovery.getPeer. Validated mac↔ruvultra over tailscale (150ms real send).",+ "desc": "Federation plugin wires wire transport via loadFederationTransport (midstream-aware loader in src/transport/midstream-aware-loader.ts). agentic-flow is an OPTIONAL peer dep — when its transport/loader subpath is unavailable, the loader falls back to WebSocket via the plugin's bundled midstream-aware path. Verified locally: mac↔ruvultra 150ms real send.","file": "v3/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js","sha256": "744431e9e6175794a779a33ebe16cb7534b44adb1e9591a845f43571780a6b53","marker": "loadQuicTransport",diff --git a/verification/macos/manifest.md.json b/verification/macos/manifest.md.jsonindex 4ecbc5a4e0..4afd9e3b3f 100644--- a/verification/macos/manifest.md.json+++ b/verification/macos/manifest.md.json@@ -726,7 +726,7 @@},{"id": "ADR-104-transport",- "desc": "Federation plugin wires real wire transport via agentic-flow/transport/loader (loadQuicTransport). plugin.ts loads transport in initialize(), binds optional listener on config.port, closes on shutdown. sendToNode now does real ws send to peer endpoint resolved via discovery.getPeer. Validated mac↔ruvultra over tailscale (150ms real send).",+ "desc": "Federation plugin wires wire transport via loadFederationTransport (midstream-aware loader in src/transport/midstream-aware-loader.ts). agentic-flow is an OPTIONAL peer dep — when its transport/loader subpath is unavailable, the loader falls back to WebSocket via the plugin's bundled midstream-aware path. Verified locally: mac↔ruvultra 150ms real send.","file": "v3/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js","sha256": "744431e9e6175794a779a33ebe16cb7534b44adb1e9591a845f43571780a6b53","marker": "loadQuicTransport",diff --git a/verification/windows/manifest.md.json b/verification/windows/manifest.md.jsonindex aea5c10fe5..2cf94867f2 100644--- a/verification/windows/manifest.md.json+++ b/verification/windows/manifest.md.json@@ -726,7 +726,7 @@},{"id": "ADR-104-transport",- "desc": "Federation plugin wires real wire transport via agentic-flow/transport/loader (loadQuicTransport). plugin.ts loads transport in initialize(), binds optional listener on config.port, closes on shutdown. sendToNode now does real ws send to peer endpoint resolved via discovery.getPeer. Validated mac↔ruvultra over tailscale (150ms real send).",+ "desc": "Federation plugin wires wire transport via loadFederationTransport (midstream-aware loader in src/transport/midstream-aware-loader.ts). agentic-flow is an OPTIONAL peer dep — when its transport/loader subpath is unavailable, the loader falls back to WebSocket via the plugin's bundled midstream-aware path. Verified locally: mac↔ruvultra 150ms real send.","file": "v3/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js","sha256": "744431e9e6175794a779a33ebe16cb7534b44adb1e9591a845f43571780a6b53","marker": "loadQuicTransport",diff --git a/verification/witness-fixes.json b/verification/witness-fixes.jsonindex 86d6dd49bd..5195e62f69 100644--- a/verification/witness-fixes.json+++ b/verification/witness-fixes.json@@ -87,9 +87,9 @@},{"id": "ADR-104-transport",- "desc": "Federation plugin wires real wire transport via agentic-flow/transport/loader (loadQuicTransport). plugin.ts loads transport in initialize(), binds optional listener on config.port, closes on shutdown. sendToNode now does real ws send to peer endpoint resolved via discovery.getPeer. Validated mac\u2194ruvultra over tailscale (150ms real send).",+ "desc": "Federation plugin wires wire transport via loadFederationTransport (midstream-aware loader in src/transport/midstream-aware-loader.ts). agentic-flow is an OPTIONAL peer dep \u2014 when its transport/loader subpath is unavailable, the loader falls back to WebSocket via the plugin's bundled midstream-aware path. Verified locally: mac\u2194ruvultra 150ms real send.","file": "v3/@claude-flow/plugin-agent-federation/dist/plugin.js",- "marker": "agentic-flow/transport/loader"+ "marker": "loadFederationTransport"},{"id": "ADR-109-inbound-dispatch",