Commit Graph
3018 Commits
Author SHA1 Message Date
rUv 2d590fc041 Merge pull request #4900 from ruvnet/fix/3.74.1-stale-helpers
fix(release): refuse stale helpers at publish; release 3.74.1
2026-11-09 00:32:48 -06:00
randRuFlo ee2f94ad07 fix(release): refuse to publish helpers that differ from HEAD; release 3.74.1
@claude-flow/cli@3.74.0 shipped 3.63.4 .claude/helpers. The committed
package stamp (.helpers-version) reads 3.57.1, so hook-spawned daemons
running an older checkout's CLI (3.63.4) saw the worktree's helpers as
stale and rewrote them between prepare and npm publish. verify-helpers
passed because it signs and checks whatever is on disk.

prepare-publish now diffs .claude/helpers against HEAD before signing
and again after verifying, and throws if any helper content changed
(the regenerated manifest and stamp are excluded). Tested: a dirtied
helper is refused, and a live daemon overwrite during a clean run was
caught.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 01:06:05 -05:00
ruv 4791f07685 chore(release): @claude-flow/memory 3.2.6, @claude-flow/plugins 3.0.3; cli pins memory 3.2.6
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 00:58:08 -05:00
rUv bc480847d8 Merge pull request #4898 from ruvnet/feat/darwin-dependency
feat(metaharness): @metaharness/darwin as a regular dependency, in-process (ADR-526); release 3.74.0
2026-11-08 23:34:08 -06:00
randRuFlo 4467066de4 test(cli): find the hoisted darwin CLI in the ADR-526 parity test
CI's root npm install hoists @metaharness/darwin to the repo root, so the
package-local node_modules path did not exist and beforeAll failed.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-08 23:51:30 -05:00
randRuFlo 9b46f57c58 feat(metaharness): @metaharness/darwin as a regular dependency, used in-process (ADR-526); release 3.74.0
- darwin moves to dependencies (ADR-526 amends ADR-150 rule 2 for darwin
  only); the smoke gate, doctor check and clean-install test accept it.
- src/metaharness/darwin-lib.ts: cached import; metaharness_bench verify and
  every metaharness_gepa op run in-process with the scripts' exact payloads
  and exit codes, falling back to the scripts when darwin does not import.
- ruflo-metaharness 0.5.0: bench.mjs verify imports darwin directly (bare
  import, no tool-time install) and falls back to the installed darwin CLI.
- Parity test vs the plugin scripts; benchmark script + measured runs.
- Version 3.74.0.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-08 22:01:25 -05:00
ruv 7404888a50 fix(cli-core): accept zod 4's invalid_value for custom agent types; cli-core 3.7.6
validateAgentSpawn() runs @claude-flow/security's SpawnAgentSchema and
skips the enum miss for custom agent types by matching
`invalid_enum_value`. That is zod 3's code; zod 4 reports
`invalid_value`, so with security on zod 4 every custom agent type was
rejected. agent_spawn and the hive-mind suites failed in CI (5 files).
It now accepts both codes.

cli-core resolves from the registry (non-bundled leaf), so this bumps it
to 3.7.6, which is already published, and moves the cli and claude-flow
pins and the root lockfile to it.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-08 21:50:20 -05:00
ruv d77ecbe0bd fix(security): migrate input-validator to zod ^4.6.7 (GHSA-mrhx-c7xc-m3w5)
zod < 4.6.6 can exhaust memory while validating oversized constrained
collections (high severity). @claude-flow/security declared zod ^3.22.0,
so every consumer of it (memory, hooks, codex, federation and the cli
bundle) carried a vulnerable zod. A fresh `npm i @claude-flow/memory@3.2.4`
reports 3 high findings via @claude-flow/security -> zod 3.25.76.

API changes handled:
- z.setErrorMap(fn(issue, ctx)) -> z.config({ customError }), with
  invalid_string/validation becoming invalid_format/format. Messages given
  to a check still take precedence; undefined falls back to zod's default.
- z.string().ip({version}) -> z.ipv4() / z.union([z.ipv4(), z.ipv6()]),
  keeping the messages.
- z.record(value) -> z.record(z.string(), value).
- SafeParseReturnType/ZodSchema -> ZodSafeParseResult/ZodType.

The workspace lockfile also drops zod 4.3.5 (vulnerable). Version 3.0.7,
and the cli and claude-flow pins move to 3.0.7. Publishing
@claude-flow/security only; the cli and claude-flow ride the release lane.

Tests: the existing 631 pass. input-validator-zod4.test.ts pins the
installed zod at >= 4.6.6, the IP schemas, message precedence, the global
map and the record schemas.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-08 21:11:43 -05:00
ruv e83c3ab6fd chore(release): @claude-flow/memory 3.2.5 (agentdb ^3.7.2); cli pins memory 3.2.5
agentdb ^3.0.0-alpha.20 -> ^3.7.2 (filtered search and in-memory
isolation the backends rely on). Workspace lockfile now resolves agentdb
3.7.2 everywhere. memory@3.2.5 is published before merge, which
audit-leaf-versions-published requires.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-08 20:44:49 -05:00
ruv 1979a92053 chore(release): @claude-flow/memory 3.2.4; cli pins memory 3.2.4 and plugin-agent-federation 1.0.7
The SQLiteBackend migration is in @claude-flow/memory, which the CLI
resolves from the registry, so the leaf-package publish audit (#3335)
requires a bump and a matching CLI pin. memory@3.2.4 is published right
after this merges. The federation pin moves to the 1.0.7 already on npm
(GHSA-vcv2 peer range, #4890).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-08 20:21:25 -05:00
ruvanddskarasev 238ce5b32a fix(memory): migrate CLI-created memory_entries in SQLiteBackend; memory_store metadata (#1426)
Re-applies dskarasev's #1426 on current main.

SQLiteBackend: a memory.db created by the CLI's memory-initializer DDL has no
access_level, version or "references" column. CREATE TABLE IF NOT EXISTS left
that table alone, so every store() failed with "table memory_entries has no
column named access_level". initialize() now adds the missing columns (and
access_count / last_accessed_at for older DDLs) with createDefaultEntry()
defaults.

memory_store: accepts an optional `metadata` object and persists it on both
write paths (AgentDB bridge and sql.js fallback), which both hard-coded '{}'.
Arrays, null and scalars are rejected at the MCP boundary.

Tests: sqlite-backend-legacy-schema.test.ts (fails on main with the
no-such-column error) and memory-store-metadata-1426.test.ts (sql.js path,
bridge path, input check; 6 of 7 fail on main).

Co-Authored-By: dskarasev <dskarasev@users.noreply.github.com>
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-08 20:21:18 -05:00
randRuFlo a8b3304b1e release: ship plugin-agent-federation 1.0.7 (GHSA-vcv2-r9jh-99m5 peer range)
#4890 bumped the bundled federation leaf to 1.0.7 (published) but left the
CLI and root pins at 1.0.6. Move both pins (and the lock specifiers) so the
bundled copy and its declared version agree.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-08 19:50:33 -05:00
randRuFlo dbce4740ba fix(init): keep the ADR-150 metaharness score tip in init's closing hint
#4871 replaced the Next-steps list, which dropped the metaharness tip that
the ruflo-metaharness smoke (17k) asserts; the path-filtered metaharness
CI only ran on the release PR. One dim line under the snapshot.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-08 19:24:27 -05:00
randRuFlo 11773a290a fix(cli): make agentic-flow a regular dependency so Node 20 keeps ruvector
On npm 10 / Node 20, agentic-flow -> fastmcp -> mcp-proxy pulls the
optional pipenet (engines node >=22). npm skips it, then deletes every
package reachable only through optional edges from that failure: all of
agentic-flow, ruvector, @ruvector/attention and @huggingface/transformers.
3.72.2 is affected the same way. Making agentic-flow a regular dependency
(rUv: agentic-flow stays) stops the cascade at pipenet; verified on a
fresh node:20 install of the packed 3.73.0 tarball: all present, 1.5 GB,
same tree as Node 22.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-08 18:56:51 -05:00
randRuFlo 0876443637 release: 3.73.0
Bumps @claude-flow/cli, claude-flow and ruflo to 3.73.0 (ruflo pins cli
3.73.0; ruflo/server.json follows). Minor: init first-win, opt-in
activation events with --no-telemetry-prompt, plugin-surface tagging.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-08 18:43:27 -05:00
rUv b56da1f084 Merge pull request #4868 from ruvnet/weaver/ruflo-plugin-deps
chore(deps): federation midstreamer ^0.3.2, aidefence agentdb ^3.6.0, watermark private
2026-11-08 16:51:55 -06:00
rUvandr 3fe9d70ba7 fix(init): print the project snapshot after the optional prompts (#4875)
#4870 added the telemetry opt-in after capability enrollment, which left
the #4871 snapshot and paste-ready prompt above two questions. Move it
below them so it is the last thing init prints.

Co-authored-by: r <r@x>
2026-11-06 16:11:14 -06:00
rUvandr 657a4ff81c feat(funnel): count plugin-only users via the ruflo-core MCP launch (#4872)
* feat(funnel): count plugin-only users via the ruflo-core MCP launch

Plugin-only users never run init, so no SessionStart hook refreshes the
funnel cache and they are invisible in the usage numbers. The ruflo-core
launcher now sets RUFLO_LAUNCH_SURFACE=plugin; mcp start (stdio) makes the
existing 6h-cached /v1/messages fetch off the start path, gated on
resolveFunnelEnabled(), and the User-Agent gains ' surface/plugin' from a
closed allowlist. Nothing is written to stdout. LIA updated.

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

* fix(ruflo-core): keep RUFLO_MCP_SPAWN inside the env-precedence audit window

The four-line insertion pushed the existing RUFLO_MCP_SPAWN read past the
audit's 20-line function-signature heuristic. Collapse it to one line and
move the explanation to the header comment.

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

---------

Co-authored-by: r <r@x>
2026-11-06 15:00:01 -06:00
rUvandr c29732ed35 feat(init): end init with a snapshot of the user's repo and one prompt to paste (#4871)
Replaces the five-command 'Next steps' list with a local, time-capped snapshot
(tracked files, top languages, most-changed code file over 90 days, test
command) and one ready-to-paste Claude Code prompt about that file. git runs
with argument arrays and a 2s timeout; any failure prints the generic prompt.
Skipped for --format json and --start-all/--start-daemon.

Co-authored-by: r <r@x>
2026-11-06 14:41:05 -06:00
rUv 2d700b957a Merge pull request #4867 from ruvnet/weaver/ruflo-security-2142
fix(transfer): Ed25519 signatures for pattern store publish/download
2026-11-06 14:36:53 -06:00
rUvandr a1549850ec feat(funnel): activation funnel events and a one-time telemetry question in init (#4870)
Measures activation, not just installs (adoption plan item 3). All events
are recorded only with explicit telemetry consent (ADR-302/309), are
daily-bucketed, and carry no paths, prompts or code.

- init_completed: every successful `ruflo init` (main and wizard).
- first_agent_run: first agent spawn or swarm init on this machine, from
  the CLI commands and the agent_spawn / swarm_init MCP tools. Once ever.
- session_active: at most once per UTC day, from the SessionStart
  refresh-funnel, so 7-day retention can be computed server-side.
- Once-ever and once-per-day markers live in funnel-activation.json, because
  a successful flush removes sent events from the queue.
- `ruflo init` asks once, in an interactive terminal only, never in CI or
  when the funnel is disabled: "Share anonymous usage telemetry?" (default
  No). Skippable with --no-telemetry-prompt. Separate from enrollment, which
  must never toggle telemetry (ADR-302).

Server side: cognitum-one/ruflo-funnel-api#1 adds these names to the
allowlist; until it deploys, the server drops them individually.

Co-authored-by: r <r@x>
2026-11-06 14:26:56 -06:00
ruv e3e5f77106 chore(deps): federation midstreamer ^0.3.2, aidefence agentdb ^3.6.0, watermark private
- @claude-flow/plugin-agent-federation 1.0.6: optional peer midstreamer
  >=0.3.1 -> ^0.3.2. 0.3.1 ships no wasm or entry point, so it can't be
  imported; 0.3.2 is the first importable release.
- @claude-flow/aidefence 3.1.1: optional peer agentdb >=2.0.0-alpha.1 ->
  ^3.6.0, matching the ecosystem's agentdb 3.6 convergence.
- @claude-flow/cli: pins @claude-flow/aidefence 3.1.1 and
  @claude-flow/plugin-agent-federation 1.0.6, and agentdb ^3.6.0. Root
  claude-flow pins federation 1.0.6. These ride the next cli release.
- @claude-flow/watermark: private. ruvnet/ai-text-watermark publishes
  @claude-flow/watermark from 0.3.0 on (npm latest 0.4.1); this 0.2.0 copy
  is stale and must never be published over it.

Both released tarballs are byte-identical to 3.1.0 / 1.0.5 apart from
package.json. v3/pnpm-lock.yaml regenerated with pnpm 8.15.0, root
package-lock.json with npm --package-lock-only.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-06 12:27:47 -05:00
ruvandWhitetigersavage 7b51de78a7 fix(transfer): Ed25519 signatures for pattern store publish/download
publish signed with an HMAC and labelled it ed25519; download checked
it with an HMAC keyed by the public key, fell back to a length check on
any error, and only logged a failed check. Sign and verify with
@noble/ed25519 (strict RFC 8032), and refuse to write a pattern whose
signature does not verify. Re-applies the transfer/store part of #2142.

Co-authored-by: Whitetigersavage <bryanjmorrissey@gmail.com>
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-06 12:26:47 -05:00
randRuFlo 53f95e36e6 feat(funnel): honor opt-outs in the messages fetch, wire opt-in telemetry, fix clone tracker
Operational telemetry (ADR-309, legitimate interest):
- `hooks refresh-funnel` (SessionStart) checked only the RUFLO_FUNNEL env
  kill switch. `ruflo funnel disable`, project config, enterprise policy and
  a declined disclosure all still called funnel.ruv.io every session. It now
  resolves the full funnel precedence and makes no request when disabled.
- The fetch's User-Agent adds the CLI release and OS/CPU family only:
  `ruflo-funnel/messages ruflo/<v> (<platform>; <arch>)`, sanitized to token
  characters. The live endpoint accepts it.
- docs/privacy/funnel-legitimate-interest-assessment.md is the assessment
  ADR-309 requires. ADR-309 links it, and ADR-310's acceptance rule now names
  the one documented default request.

Opt-in telemetry (ADR-302/305):
- `ruflo funnel telemetry on|off|status` is the only way to grant the
  telemetry consent domain. Nothing granted it before, so the event queue
  never left the machine.
- With consent, refresh-funnel flushes queued events once per session.
- `funnel disable` and `telemetry off` revoke consent and delete the ID and
  the local queue.

Clone tracker:
- A failed traffic fetch was recorded as 0 clones (snapshots #15-#18 read 0
  while GitHub reported ~258k in 14 days). The script now exits 1 and writes
  nothing.
- The workflow reads TRAFFIC_TOKEN, falling back to GITHUB_TOKEN, because
  the traffic API needs push access.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-06 11:05:25 -05:00
rUv b7bc909d5f Merge pull request #4857 from ruvnet/release/3.72.2
release: 3.72.2 — @ruvector/attention ^2.2.3 (ruvector ^0.3.13), neural 3.0.3 / sona 0.1.11
2026-11-06 07:56:29 -06:00
rUvandClaude bccf17adfa fix(security): daily scan 2026-11-06 — 2 fixes (#4846)
* fix(security): path traversal in hooks_build-agents

outputDir passed validatePath, which allows absolute paths, and format was
spliced unvalidated into each config file name, so an MCP caller could make
the tool create directories and overwrite files outside the project.
Contain the real output directory in the real project root and restrict
format to yaml/json.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVKUis3yTcrY8a2cNer

* fix(security): argv option injection and URL scheme check in browser adapter

AgentBrowserAdapter passed caller values (selectors, text, URLs, paths)
straight into agent-browser's argv, which parses options anywhere, so a
value beginning with -- was read as an option. open/newTab also accepted
any URL scheme, letting the exported browser MCP tools read local files.
Reject unexpected options in command argv and allow only web URLs,
mirroring the CLI's browser-argv guard.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVKUis3yTcrY8a2cNer

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-06 07:10:38 -06:00
randRuFlo 1755052ddf fix(deps): @ruvector/attention ^2.2.3 via ruvector ^0.3.13; neural sona 0.1.11; release 3.72.2
- claude-flow 3.72.1 declared @ruvector/attention ^0.1.3, which resolves to
  0.1.32, without the input-validation / NAPI panic fix in 2.2.3
  (RuVector #1365). ruvector 0.3.12 also depended on ^0.1.3. ruvector
  0.3.13 moves to attention ^2.2.3 and sona ^0.1.11.
  - CLI and umbrella: ruvector ^0.3.13
  - umbrella: attention ^2.2.3 and sona ^0.1.11
  - ruflo override: ruvector ^0.3.13
- @claude-flow/neural 3.0.3 pins @ruvector/sona 0.1.11 (was 0.1.5, see #4844).
- neural benchmark: the attention benchmark never ran. import() of the
  CommonJS package put the classes on `default`, and it called
  computeRaw(), which no release has; the classes expose compute(). Each
  ruflo attention call was checked on 0.1.32 and 2.2.3 with identical
  results.
- v3/pnpm-lock.yaml: pnpm 8.15.0 --lockfile-only; every @claude-flow/* is
  still link:, and rabitq-wasm still resolves 0.1.2 for the CLI.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-06 07:41:59 -05:00
randRuFlo 68c8d74b23 fix(neural): move @ruvector/sona 0.1.5 -> 0.1.10 (@claude-flow/neural 3.0.3)
@claude-flow/neural pinned @ruvector/sona at exactly 0.1.5, five releases
behind. The same probe was run against both versions with the wrapper's
SonaEngine.withConfig shape:

- applyMicroLora with a wrong-length vector: 0.1.5 panics in
  crates/sona/src/lora.rs and aborts Node (exit 134); 0.1.10 throws
  "input length 1 does not match hiddenDim 16", which the caller can catch.
- 30 trajectories + forceLearn, then findPatterns: 0.1.5 returns 0
  patterns; 0.1.10 returns 3 (upstream #1258: MicroLoRA learns from
  feedback, EWC++ takes effect).

neural is a non-bundled leaf, so the fix reaches users only through a
standalone publish of @claude-flow/neural@3.0.3. The CLI and umbrella
pins move to 3.0.3 with it. audit-leaf-versions-published fails until that
publish happens, and that failure is the intended gate.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-06 07:36:26 -05:00
randRuFlo 13432299e5 fix(plugins): keep history in comments, hint on an uncached pin, scope the verified claim
- browser-session-tools / neural-tools: comments keep the versions they
  describe (#2015 was found on 0.2.25; ONNX bundled since 0.2.27). The
  embedder label no longer hardcodes a version the ^0.3.11 range may not
  resolve to.
- Console vector page: npx --offline with only an older pin cached printed a
  bare ENOTCACHED. The result now starts with the command that fixes it.
  Spec added.
- ruflo-ruvector README: the "since 0.3.3" table says which rows were run.
  The two MCP gates were exercised over stdio (refused without the variable,
  allowed with it); 0.3.10/0.3.11 come from release notes. /vector-setup says
  to re-register the server after upgrading.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 22:29:05 -05:00
randRuFlo 4ed8aa3926 feat(plugins): move ruflo-ruvector, ruflo-browser and the console vector page to ruvector 0.3.12
The CLI has depended on ruvector ^0.3.11 since #4838. The plugins still pinned
older releases: 0.3.3 in ruflo-ruvector and the console vector page, and
0.2.27/0.2.25 in ruflo-browser and the CLI's browser-session npx fallback.
0.3.3 predates the 0.3.4 MCP security hardening.

- Every pinned command was run against 0.3.12: the ruflo-ruvector smoke
  (14/14), the console vector page's read commands, and the browser-session
  rvf + trajectory argv.
- Fix the ruflo-browser agent and browser-record recipes. They passed
  --session-id/--task/--args/--verdict to `hooks trajectory-*`, which no
  ruvector release accepts. They now use the argv the browser_session_* MCP
  tools already use.
- ruflo-ruvector README: a "What changed since 0.3.3" table (MCP env gates,
  per-project store, CRUD, `ruvector add`, rvf lock fix, graph-mincut fix),
  a re-verified limitations table, and the correct ADR link and tool count.
  /vector-setup documents RUVECTOR_MCP_ALLOW_INIT and RUVECTOR_MCP_ROOTS.
- Versions: ruflo-ruvector 0.4.0, ruflo-browser 0.3.8, ruflo-console 0.49.12.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 22:20:36 -05:00
rUvandr 29b327ee5f feat(cli,codex): ecosystem integrations + skills; darwin ^0.13.0, ruvllm ^4.1.0; release 3.72.1 (#4838)
* feat(cli,codex): wire ecosystem packages into real code paths + ecosystem skills

Every integration here has a reachable path (optional dep or lazy import,
graceful fallback) and a test that drives the real package.

- @ruvector/learning-wasm 0.1.29 (new optional dep): it was imported by
  ruvector-training.ts, neural.ts and ruvector/index.ts but never declared,
  so MicroLoRA always ran on the JS fallback. Now initializeTraining()
  reports backend 'wasm'; `neural benchmark` measures ~2 us/adaptation at
  256-dim. The benchmark's attention section (broken against
  @ruvector/attention 2.x) no longer aborts the MicroLoRA numbers.
- ruvector ^0.2.27 -> ^0.3.11. ruvector 0.3 ships @ruvector/mincut-wasm and
  its DynamicMinCut wrapper. New ruvector/mincut-bridge.ts folds duplicate and
  reversed edges (the solver rejects them) and backs:
  - agentdb_graph-pathfinder `dynamic-mincut`, previously a k-hop stub: exact
    min cut of the seed's depth-hop neighbourhood, returns the seed's side
    plus cut metadata (cutValue, cutEdges, backend). JS Stoer-Wagner
    fallback for neighbourhoods <= 300 nodes.
  - graph-analyzer loadRuVector(), which probed a nonexistent
    ruvector.hooks_graph_mincut and @ruvector/wasm GraphAnalyzer. Measured
    187 ms vs 6 s (JS) at 1,000 nodes, same cut value.
  spectral-sparsify / connected-component-churn stay k-hop approximations
  and now say so in the response (`implementation`).
- @ruvector/rabitq-wasm 0.1.0 -> 0.1.2: ruvector 0.3.11 declares an optional
  peer >=0.1.1, and npm raises ERESOLVE against an exact 0.1.0 pin. Same API.
- agent-booster ^0.2.2 (new optional dep) backs a new hooks_fast-apply MCP
  tool: merges a code snippet into a file or string (~ms, no LLM), with
  project-root and symlink containment, dryRun and minConfidence. ADR-143
  is respected: it is an applier for caller-supplied snippets, not a Tier-1
  intent engine. The appliance bridge's tier-1 hint, labelled
  'agent-booster' while being two regexes, is now labelled 'codemod' and
  points at hooks_codemod. Path-containment helpers move from hooks-tools.ts
  to realpath-containment.ts so both tools share them.
- ast-analyzer / diff-classifier / coverage-router imported @ruvector/ast,
  @ruvector/diff, @ruvector/coverage, which were never published (npm 404).
  ruvector 0.3's ASTParser needs native tree-sitter and is async-only;
  parseDiff / parseIstanbulCoverage are plain JS equivalent to the local
  parsers. The phantom imports are removed rather than swapped for a no-op hop.
- Skills: six new Claude Code skills (vector-quantization, graph-mincut,
  sublinear-solver, injection-defense, fast-code-edits, lora-learning) in a
  new SKILLS_MAP.ecosystem group, installed by default `ruflo init`
  (`init skills --ecosystem`), and the Codex equivalents bundled in
  @claude-flow/codex .agents/skills (built-in, installed by --full).
  @claude-flow/codex 3.0.5 -> 3.0.6.
- no-cli-optdep-bloat-2561 guard: CLI_MAX 13 -> 17 and learning-wasm off the
  FORBIDDEN list, with cold-install measurements (learning-wasm 0.38 s / 1
  pkg / 104K; agent-booster 0.98 s / 67 pkgs / 5.8M).

Evaluated and not wired: sublinear-time-solver as a PPR accelerator (its
computePageRank took 1.2 s at 500 nodes and 68 s at 2,000, vs ms for the
built-in power iteration; 184 deps / 123 MB), strange-loops (pulls the same
tree), @ruvector/kge, @ruvector/cnn, @ruvector/rvlite, @ruvector/graph-wasm,
@ruvector/emergent-time, agentic-jujutsu, @ruvector/pi-brain (no existing
caller doing the job badly); @ruvector/diskann (see the memory PR).

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(deps): bound @ruvector/ruvllm away from the broken 4.0.x; ruvector override to ^0.3.11

@ruvector/ruvllm 4.0.0/4.0.1 were published from the wrong repository: an
ESM-only GPU-loop harness with no main entry and none of SonaCoordinator,
ContrastiveTrainer, TrainingPipeline or LoraAdapter. The open `>=2.6.0`
ranges in the root and ruflo overrides and the v3 pnpm.overrides let it
resolve, and every createRequire('@ruvector/ruvllm') caller (intelligence.ts,
sona-optimizer.ts, native-training.ts) then fell back to JS silently.

- root/ruflo overrides, v3 pnpm.overrides, providers peer:
  `>=2.6.0 <4.0.0 || ^4.1.0` (2.6-3.x all export the four classes; 4.1.0 is
  the restored runtime). Narrow to ^4.1.0 once it is on the registry.
- root/ruflo overrides: ruvector ^0.2.41 -> ^0.3.11. agentdb 3.3.0 itself
  depends on ruvector ^0.3.5 and the CLI now on ^0.3.11, so the old override
  forced both below their own ranges inside this repo's tree.
- ruflo overrides: agentdb `>=3.3.0` -> `^3.3.0`, agentic-flow `>=2.0.14` ->
  `^2.0.14 || ^3.0.0` (no open-ended ecosystem ranges).
- providers/src/__tests__/ruvllm-runtime-contract.test.ts loads the installed
  package through createRequire, asserts the four classes, constructs a
  SonaCoordinator the way the CLI does, and checks the resolved version is in
  range. Against 4.0.1, require() itself fails (no CJS entry).

Co-Authored-By: claude-flow <ruv@ruv.net>

* test: run ecosystem and ruvllm contract tests where the packages are installed

ci.yml's repo-root npm layout does not install the CLI's optional
dependencies, so those blocks skip there; the pnpm workspace that Test V3
Packages uses installs every one of them, so they run. The probe walks
node_modules only up to the repository root. A @ruvector/ruvllm that is
installed but does not load through require() still fails, and says which
copy and why.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(umbrella): claude-flow carries the CLI's new optional deps; rabitq-wasm 0.1.2

The claude-flow umbrella ships the CLI dist with its own dependency list.
With @ruvector/rabitq-wasm pinned at 0.1.0, npm could not hoist ruvector 0.3
(optional peer rabitq-wasm >=0.1.1) and nested it under agentdb/agentic-flow,
so the umbrella's copy of the CLI could not import('ruvector') and the mincut
path was dead there. rabitq-wasm -> 0.1.2 (same API) puts ruvector back at
the top level; ruvector ^0.3.11, @ruvector/learning-wasm 0.1.29 and
agent-booster ^0.2.2 join the umbrella's optionalDependencies so the WASM
MicroLoRA, min-cut and fast-apply paths are reachable from npx claude-flow too.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(security): @metaharness/darwin ^0.13.0 (GHSA-mjwg-5fm3-fx2p), metaharness ^0.4.20

@metaharness/darwin 0.13.0 fixes a high-severity sandbox bypass
(GHSA-mjwg-5fm3-fx2p); the CLI's `~0.12.0` could never resolve it.

- cli optionalDependencies @metaharness/darwin ~0.12.0 -> ^0.13.0; peer
  metaharness ^0.4.1 -> ^0.4.20
- distill-oracle MH_DARWIN_PIN 0.12.0 -> 0.13.0 (npx tier-1 oracle calls)
- ruflo-metaharness helper pins: _darwin.mjs ~0.12.0 -> ~0.13.0,
  _harness.mjs ~0.4.1 -> ~0.4.20 (tilde, as check-metaharness-pins requires);
  plugin 0.4.0 -> 0.4.1

Checked against 0.13.0 before bumping (0.x minor): same exports
(., ./contrastive, ./gepa), same metaharness-darwin verbs ruflo surfaces
(evolve, evolve-numeric, bench create|verify, security bench), and the gepa
library calls (loadCand6Genome, validateGenome, buildSystemFromGenome)
return identical results to 0.12.0. Tier-2 evolution now runs in an isolated
child process upstream; ruflo already drives darwin as a subprocess. Note:
0.13.0 adds one runtime dependency (@babel/parser), where 0.12 had none.
check-metaharness-pins, metaharness-clean-install-test and the CLI's
metaharness/distill/darwin tests (80) pass.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(deps): @ruvector/ruvllm ^4.1.0 now that the restored runtime is published

4.1.0 is the dual CJS/ESM runtime again. Root and ruflo overrides, v3
pnpm.overrides and the providers peer move from `>=2.6.0 <4.0.0 || ^4.1.0`
to `^4.1.0`; both lockfiles now resolve 4.1.0. The contract test requires
>=4.1 <5 and passed against 4.1.0 (SonaCoordinator, ContrastiveTrainer,
TrainingPipeline, LoraAdapter, DEFAULT_SONA_CONFIG; SonaCoordinator
constructs), as did the CLI's neural-status/trajectory/learning tests.

Co-Authored-By: claude-flow <ruv@ruv.net>

* release: 3.72.1

@claude-flow/cli, claude-flow and ruflo 3.72.1 (ruflo pins cli 3.72.1),
carrying the ecosystem integrations, @claude-flow/memory 3.2.3, codex 3.0.6,
@ruvector/ruvllm ^4.1.0 and @metaharness/darwin ^0.13.0.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(metaharness): tilde-pin darwin ~0.13.0; smoke expects plugin 0.4.1

ruflo-metaharness smoke step 17z73 enforces tilde pins for @metaharness/*
(ADR-150 review: tilde stays on one minor). ~0.13.0 admits the same versions
as ^0.13.0 on a 0.x line and still resolves the GHSA-mjwg-5fm3-fx2p fix.
Smoke step 1 hard-codes the plugin version; it moves to 0.4.1 with the bump
that plugin-version-bump requires. smoke.sh: 128/128 locally.

Co-Authored-By: claude-flow <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-11-05 20:50:18 -06:00
rUvandr 722232566a fix(memory): RvfBackend search through hnsw-index.ts (recall@10 0.09 → 0.89) (#4836)
* fix(memory): RvfBackend search through hnsw-index.ts (recall@10 0.09 -> 0.89)

RvfBackend's inlined HnswLite seeded every search from the first
efConstruction vectors in insertion order and BFS'd a flat neighbour graph,
and each insert was an O(n) brute-force scan. Measured against exact search
on 5,000 random unit vectors (cosine, 200 queries, seed 42):

  index                     384-dim recall@10  1536-dim  clustered 384
  HnswLite (before)         0.091              0.079     0.999
  @ruvector/diskann 0.1.3   0.896              0.739     1.000
  hnsw-index.ts, ef=200     0.888              0.744     0.990

DiskANN matched HNSWIndex on recall but a vector inserted after build() is
not searchable until a full rebuild (3.6-4.3 s at 1k vectors), which breaks
store()-then-search(). HNSWIndex is incremental and is the single HNSW
implementation ADR-125 asks for, so RvfBackend now uses it through a private
RvfVectorIndex (not exported; the prepublishOnly surface check still passes).

- indexes of <= 1000 vectors and dimension-mismatched queries use an exact scan
- distances map back to the old similarity scale; threshold filter unchanged
- re-storing an entry without an embedding removes its old vector
- update() re-indexes when an untyped caller passes an embedding

New rvf-backend-recall.test.ts drives the real RvfBackend.search: recall@10
>= 0.9 on 2000 random 64-dim vectors (HnswLite scored 0.294 there), exact
results at 300 vectors, delete/re-store correctness, recall after reopen.

@claude-flow/memory 3.2.2 -> 3.2.3.

Co-Authored-By: claude-flow <ruv@ruv.net>

* chore(memory): leave the version at 3.2.2 in this PR

audit-leaf-package-publish requires the CLI pin to cover the workspace
version, and audit-leaf-versions-published requires that pin to exist on the
registry. The 3.2.3 bump, its publish and the CLI pin move together in the
release that follows.

Co-Authored-By: claude-flow <ruv@ruv.net>

* release(memory): @claude-flow/memory 3.2.3, CLI pins it

The RvfBackend change has to reach users through a standalone publish:
memory is not bundled into the release tarballs (Publishing Rules).
@claude-flow/memory@3.2.3 is published from this branch's tree; the CLI pin
(dependencies + optionalDependencies) moves to it so audit-leaf-package-publish
and audit-leaf-versions-published both hold. The lockfile also gains the
@ruvector/sona 0.1.10 package entries pnpm reported missing.

Co-Authored-By: claude-flow <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-11-05 19:27:51 -06:00
randRuFlo 096101e794 test(mcp): ship the protocol module in stdio stub fixtures (ADR-524)
The bin launchers now import dist/src/mcp-protocol.js, so the two fixtures
that copy a launcher into a stub tree transpile it from source (as the
policy fixture already does for policy-enforcer). The dispatch-contract
regex accepts the forwarded trace context.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 18:41:18 -05:00
randRuFlo 4943f24efe release: 3.72.0
Minor bump: ADR-524 adds MCP 2026-07-28 support (server/discover, new
error codes, result fields). Supersedes the unpublished 3.71.5 bump.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 17:54:03 -05:00
randRuFlo 4afd1aa69a feat(mcp): serve MCP 2026-07-28 from the stdio servers (ADR-524)
All three stdio MCP servers (bin/cli.js, bin/mcp-server.js, MCPServerManager)
answered initialize with a hardcoded 2024-11-05 and knew nothing of the
2026-07-28 revision. They are now dual-era through one shared module,
src/mcp-protocol.ts:

- initialize echoes a supported legacy version (else 2025-11-25) and reports
  the real package version
- server/discover answered with or without _meta (stdio probe)
- per-request _meta version: -32022 for unknown, -32602 when a modern request
  lacks clientCapabilities
- modern results carry resultType and serverInfo; list results carry
  ttlMs/cacheScope; legacy responses are unchanged
- tools/list sorted by name in both eras (stable prompt caches)
- resources/read uses -32602 for modern, -32002 for legacy
- validated W3C traceparent/tracestate forwarded into the tool-call context

Tasks extension, subscriptions/listen and the HTTP package are Phase 2.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 17:52:44 -05:00
randRuFlo 2306c0adf4 test(cli): mock @claude-flow/aidefence in the #4767 wrapper tests
The root CI job has no built aidefence, so aidefence_has_pii fell through to
the auto-install path and failed. The test covers the MCP wrapper, not the
detector.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 11:24:36 -05:00
randRuFlo 7acac7ad25 test(cli): use parser-shaped skipMcp in the start test; run the FIFO reader from the cli package
The start command now reads the camelCase key the parser produces (#4814),
and the root vitest runs from v3/, where tsx is not hoisted (#4821).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 11:05:37 -05:00
randRuFlo 760d514112 fix(hooks): give pre-bash a 3 s stdin window and re-sign helpers (#4826)
pre-bash now blocks when it gets no command (#4743), so a host that delivers
hook input after 500 ms would have every Bash command blocked. The read ends
at EOF, so a prompt host waits no longer.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 10:42:57 -05:00
r f9063010a2 Merge PR #4826 2026-11-05 10:42:06 -05:00
Parman Mohammadalizadeh fd6c7c4864 fix(hooks): block pre-bash when the command cannot be validated
pre-bash exited 0 on every failure path, so a command passed whenever the
hook input arrived after the 500 ms stdin window, failed to parse, or
raised an exception, and when the 5 s safety timer fired.

pre-bash now exits 2 with a [BLOCKED] reason when no command string was
obtained, when stdin is not valid JSON, in the handler and main catch
paths, and from the safety timer. Every other hook keeps exiting 0.

Fixes #4743
2026-11-05 16:36:13 +01:00
randRuFlo 95ec6e44e8 feat(aidefence): select MCP pattern packs with RUFLO_AIDEFENCE_PACKS (#4785)
Unset keeps the current options exactly. true/false or a comma list of pack
names is passed to createAIDefence in every load and retry branch; any other
value is refused with a clear error.

Closes #4785

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 10:03:51 -05:00
r dc79625daa Merge PR #4823 2026-11-05 10:02:24 -05:00
randRuFlo 6a7097a3ab release: 3.71.5
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 09:56:17 -05:00
randRuFlo 77ca18dcde fix(hive-mind): refuse a role outside worker/specialist/scout on spawn and join
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 09:55:58 -05:00
randRuFlo 08fb7acf88 fix(cli): re-sign helpers manifest for the statusline fix; drop the duplicate fs mock in the #4716 test
vitest resolves 'fs' and 'node:fs' to one module, so the second mock
(existsSync: () => false) won and 8 tests failed on Linux.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-05 09:55:11 -05:00
r d1e4cb92d9 Merge PR #4821
# Conflicts:
#	v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts
2026-11-05 09:54:40 -05:00
r 55603d7745 Merge PR #4820 2026-11-05 09:54:32 -05:00
r ff187f8402 Merge PR #4819 2026-11-05 09:54:32 -05:00
r 6183087803 Merge PR #4818 2026-11-05 09:54:32 -05:00
r ebc84e0c81 Merge PR #4817 2026-11-05 09:54:32 -05:00