Reporter: @ummcke00. `agent_execute` and the underlying
`executeAgentTask()` runtime hardcoded a `fetch` to
`https://api.anthropic.com/v1/messages` and required
`ANTHROPIC_API_KEY` in the environment — even when the user had
configured OpenRouter, Ollama, or another OpenAI-compatible
endpoint via `.claude-flow/config.yaml`. Result: Ruflo was
unusable for every non-Anthropic deployment.
The companion `callAnthropicMessages()` helper already had a
two-branch dispatch (Anthropic + Ollama via #1725) but
`executeAgentTask()` predated it and never delegated.
## Fix
1. `callAnthropicMessages()` (the router):
- Add OpenRouter branch detected via `RUFLO_PROVIDER=openrouter`
or `OPENROUTER_API_KEY` set when Anthropic key absent. Mirrors
the existing Ollama branch precedence.
- New `callOpenAICompat()` helper — OpenAI-compat shape with
`Authorization: Bearer <key>`, OpenRouter analytics headers,
and logical model name translation (haiku/sonnet/opus →
anthropic/claude-3.5-haiku/sonnet/3-opus).
- Updated "no provider configured" error lists all three options.
2. `executeAgentTask()`:
- Replace the inline Anthropic fetch with `await
callAnthropicMessages({...})`. The agent registry coupling
(store load, status updates, lastResult persistence) stays.
- Surface a #2042-aware remediation pointer when the router
reports no provider is configured.
3. New CI smoke `scripts/smoke-agent-execute-providers.mjs` (5
checks):
- executeAgentTask no longer contains the bypass fetch
- OPENROUTER_API_KEY env var is referenced
- callOpenAICompat helper exists
- No-provider error lists Anthropic + OpenRouter + Ollama
- Behavioral: OPENROUTER_API_KEY set → dispatch reaches the
openrouter branch (auth error names openrouter, not Anthropic)
Wired into v3-ci.yml as `agent-execute-providers-smoke` with
path-filter on `agent-execute-core.ts` and the smoke itself.
Local validation (against built dist):
- No provider set → "No LLM provider configured..."
- OPENROUTER_API_KEY only → "openrouter API error 401: Missing
Authentication header"
- RUFLO_PROVIDER=openrouter
+ both keys → "openrouter API error 401..."
(Anthropic key is bypassed — explicit RUFLO_PROVIDER wins)
`workflow-tools.ts` `workflow_execute` also calls
`executeAgentTask()` and gets the fix transitively with no
direct edits.
Co-Authored-By: RuFlo <ruflo-bot@users.noreply.github.com>
ruvnet's response to @shaal on #2078 acknowledges that the
settings-generator opt-in (#2079 → ruflo-bot email) only fixes half
the surface. The other half is the Claude Code Bash tool's built-in
commit-message instructions, which suggest `Co-Authored-By: RuFlo
<ruv@ruv.net>` regardless of project settings. Users have to
explicitly tell Claude to ignore that suggestion.
This patch adds a rule to the generated CLAUDE.md that does exactly
that — every fresh `ruflo init` now writes:
- NEVER add a `Co-Authored-By` trailer to user commits unless this
project's `.claude/settings.json` has `attribution.commit` set
(#2078). The Claude Code Bash tool may suggest one in its default
commit-message template — ignore it. `Co-Authored-By` is semantic
authorship attribution under git/GitHub convention; the tool is
the facilitator, not a co-author.
The agent reads this on every session start, so the Bash-tool default
gets overridden at the project level without the user having to
discover the override themselves.
Settings-level (`attribution.commit`) opt-in path still works for
users who want the trailer.
Verified: `ruflo init --preset default` in a clean tmpdir produces a
CLAUDE.md containing the rule.
Co-Authored-By: RuFlo <ruflo-bot@users.noreply.github.com>
Three independent bugs across three subsystems, all reproducible on
alpha.76 today. Each fix is small and localized.
#2098A — `--no-global` flag silently ignored (@pierrefuseau)
The parser handles `--no-foo` by stripping the prefix and storing
`flags.foo = false` (parser.ts:291-294), not by storing
`flags['no-foo'] = true`. The consumer at init.ts:190 read the
wrong key (`flags['no-global']`), so the flag was always undefined
and the global ~/.claude/CLAUDE.md got modified anyway.
Fix: read `flags['global'] === false` (the canonical form) AND
keep accepting the literal-key form for any caller passing flags
programmatically.
#2098B / #2093 — Daemon subprocess group not killed (@pierrefuseau, @maxstefanakis1114)
headless-worker-executor.ts spawns `claude --print` without
`detached: true`. Grandchildren (MCP stdio bridges, plugin tools)
belong to the parent's process group, so `child.kill()` on
timeout only signals the head — grandchildren get reparented to
init and leak. Combined with the queue-file path the alpha.73
`.processed/` rename already fixed, the surface was 90% closed
but the residual gap was the missing tree-kill.
Fix: spawn with `detached: true` (POSIX only — Windows process
groups don't work the same way), then signal the group with
`process.kill(-pid, sig)` instead of `child.kill(sig)`. Fallback
to plain `child.kill` if -pid kill fails for any reason.
#2085 — agent_spawn not in swarm_status.agents (@seo-yas)
agent_spawn writes only to the agent store (agent-tools.ts:275),
swarm_status reads only from the swarm store. The two stores are
never bridged. Every topology is affected, not just hierarchical
as the reporter assumed. Also the schema never accepted
`swarmId` — which is why their 5 parameter-shape variants all
failed identically.
Fix: add `swarmId` to the agent_spawn input schema (optional;
defaults to most-recently-created swarm), then after writing the
agent store, also push the agentId into `swarm.agents`. Idempotent
so retries don't duplicate. Exports `loadSwarmStore`/
`saveSwarmStore` from swarm-tools.ts so agent-tools.ts can write
to the same on-disk store the swarm tools read from.
Build: `npm run build` in v3/@claude-flow/cli — clean.
Existing smokes: init-bundle-invariants + github-safe-injection PASS.
Co-Authored-By: RuFlo <ruflo-bot@users.noreply.github.com>
Adds scripts/smoke-init-bundle-invariants.mjs with three assertions:
1. Every subdir under .claude/{commands,agents}/ has a COMMANDS_MAP or
AGENTS_MAP entry (zero orphaned dirs).
2. Every skill in SKILLS_MAP has SKILL.md or README.md in the package
(catches Phase 1 regression).
3. No init-template agent shares a basename with a plugin agent (ADR-128
Phase 2 dedup invariant).
Also copies the 5 remaining SKILLS_MAP-referenced skills that were not in
the 29 Phase-1 core/agentdb/github/v3 set (browser, flow-nexus-neural,
flow-nexus-platform, flow-nexus-swarm, dual-mode) so assertion 2 passes.
Wires the smoke into v3-ci.yml as init-bundle-invariants-smoke job with
path filters on .claude/**, src/init/**, plugins/*/agents|skills|commands/**,
and the smoke itself.
Smoke matrix: init-bundle-invariants=PASS, deprecated-actions=PASS,
github-safe-injection=PASS, github-actions-pins=PASS,
attribution-opt-in=PASS, ruvllm-wasm-auto-init=PASS,
plugin-registry-signature=PASS — no regressions.
Co-Authored-By: RuFlo <ruv@ruv.net>
Deletes commands/flow-nexus/ (9 files) — the only directory the ADR
explicitly marks for deletion. Promotes all remaining orphaned substrate
dirs to first-class COMMANDS_MAP keys: agents, coordination, hiveMind,
memory, swarm, workflows (default true) and pair, training, streamChain,
truth, verify (opt-in, default false). Adds matching CommandsConfig
interface fields and DEFAULT_INIT_OPTIONS entries.
Deviation from task's estimated "87 orphan deletions": the ADR Phase 3
resolution for the other 78 orphaned files is promotion (add COMMANDS_MAP
key), not deletion. Deleting substrate commands like swarm/, memory/,
hive-mind/ would be a regression. Only flow-nexus/ (domain-specific,
plugin-owned) is deleted. Ambiguous-as-substrate files preserved.
Co-Authored-By: RuFlo <ruv@ruv.net>
Changes DEFAULT_INIT_OPTIONS.agents: github, hiveMind, v3, optimization
now default false; core, consensus, swarm, sparc, testing remain true.
agents.all flipped from true to false. Adds --all-agents CLI flag to
restore the full set when users explicitly opt in.
Default install now ships ~17 substrate agents instead of 98. Full set
(89 after Phase 2) available via: ruflo init --all-agents
Co-Authored-By: RuFlo <ruv@ruv.net>
Deletes the 9 init-template agent files that have diverged from their
canonical plugin counterparts. Plugins now own: coder.md (ruflo-core),
researcher.md (ruflo-core), reviewer.md (ruflo-core), tester.md
(ruflo-testgen), memory-specialist.md (ruflo-rag-memory),
security-auditor.md (ruflo-security-audit), sparc-orchestrator.md
(ruflo-sparc), goal-planner.md (ruflo-goals), adr-architect.md
(ruflo-adr). AGENTS_MAP not modified: map values are directory names;
the copy function picks up whatever files remain in those dirs.
Co-Authored-By: RuFlo <ruv@ruv.net>
Post-publish validation of alpha.74 found 5 init-template agents still
shipping `actions/checkout@v3`:
v3/@claude-flow/cli/.claude/agents/github/release-manager.md
v3/@claude-flow/cli/.claude/agents/github/swarm-pr.md
v3/@claude-flow/cli/.claude/agents/github/release-swarm.md
v3/@claude-flow/cli/.claude/agents/github/repo-architect.md
v3/@claude-flow/cli/.claude/agents/github/workflow-automation.md
The Phase 3 sed in PR #2094 only scanned `.claude/agents/github/`
(dogfood) and `v3/@claude-flow/cli/.claude/commands/github/` (init
commands). It missed the *init-template agents* subtree at
`v3/@claude-flow/cli/.claude/agents/github/` and the *dogfood commands*
at `.claude/commands/github/`.
`smoke-deprecated-actions.mjs` had the same scan-tree gap, which is
why CI didn't catch this. Smoke now scans all 5 trees:
.claude/agents/github/
.claude/skills/
.claude/commands/github/ (added)
v3/@claude-flow/cli/.claude/agents/github/ (added)
v3/@claude-flow/cli/.claude/commands/github/
Verified: `npm pack @claude-flow/cli@3.7.0-alpha.74 && grep ... @v3`
showed the 5 missed files in the published tarball.
Versions bumped to 3.7.0-alpha.75 across cli + claude-flow umbrella + ruflo wrapper.
Co-Authored-By: RuFlo <ruflo-bot@users.noreply.github.com>
Remove 13 hardcoded "Generated with Claude Code" attribution strings from
6 github command/agent/skill files (dogfood + init-template copies):
.claude/agents/github/{release-manager,sync-coordinator,issue-tracker}.md
.claude/skills/github-project-management/SKILL.md
v3/@claude-flow/cli/.claude/commands/github/{release-manager,sync-coordinator,issue-tracker}.md
Add <!-- last-updated: 2026-05-21 — ADR-127 --> stamps to the top-level
code-block boundary of each edited file so readers can trace the change
back to this ADR without opening git log.
Export ATTRIBUTION_FOOTER from helpers-generator.ts (ADR-127 §opt-in):
when options.attribution === true, materialise a .claude/helpers/attribution
file during init so PR templates can append it conditionally, without
hard-wiring the emoji into every user's commit history (#1670).
Add scripts/smoke-attribution-opt-in.mjs + github-attribution-opt-in-smoke
CI job: static scan that fails if the 🤖 emoji pattern reappears in the
three github-scoped template trees — prevents copy-paste regression.
Co-Authored-By: RuFlo <ruv@ruv.net>
Replace all actions/checkout@v3 and actions/setup-node@v3 refs with @v4
across .claude/agents/github/, .claude/skills/github-*/,
and v3/@claude-flow/cli/.claude/commands/github/ (19 files total).
Add scripts/smoke-deprecated-actions.mjs: static scan that fails if any
of the deprecated refs (checkout@v3, setup-node@v3,
create-release@*, upload-release-asset@*, softprops/action-gh-release@v1)
reappear in scope — preventing copy-paste regression from blog posts or
AI-generated YAML snippets.
Wire github-deprecated-actions-smoke job and path filter into v3-ci.yml
so every future PR touching the github surface re-runs this gate.
Co-Authored-By: RuFlo <ruv@ruv.net>
github-safe.js (both copies — dogfood + init-template)
Adds GITHUB_SAFE_VERSION='1.0.0' constant for smoke assertions.
Adds explicit 256KB body cap (MAX_BODY_BYTES): rejects oversized bodies
with exit 1 before any temp-file write, matching the GitHub API body
field limit documented in ADR-127. Adds strict error handling: all
execSync calls wrapped in try/catch, cleanup in finally. Adds
GITHUB_SAFE_DRY_RUN=1 env-var for smoke tests to skip gh exec.
github-setup.sh (both copies)
Prepends set -euo pipefail. Replaces bare `gh auth status &>/dev/null`
with a check that parses "Logged in" and "repo" scope from the output.
Adds security rationale comment explaining why each flag is needed.
Agent frontmatter WebFetch removal (dogfood copies only — init-template
commands don't have frontmatter; the relevant change there is the injection
fix below):
release-manager.md — removes WebFetch (keeps Write for CHANGELOG)
release-swarm.md — removes WebFetch (keeps Write for CHANGELOG)
repo-architect.md — removes WebFetch
All 13 agents already have explicit tools: lines; only the 3 above had
WebFetch. No agent in scope now has WebFetch in its tools: list.
swarm-pr.md + swarm-issue.md (BOTH dogfood .claude/agents/github/ AND
init-template v3/@claude-flow/cli/.claude/commands/github/):
Replaces unquoted ${{ github.event.comment.body }} interpolated into
--comment "..." with mktemp + printf + grep + --comment-file pattern.
Replaces unquoted ${{ github.event.label.name }} == "swarm-ready" with
mktemp + printf + grep -qx pattern. Closes prompt-injection path where
a PR comment with shell metacharacters could execute attacker-controlled
shell in a pull_request-triggered workflow.
smoke-github-safe-injection.mjs updated:
Upgrades the >256KB test case from "note" (Phase 1 red) to "ok" (Phase 2
green) now that the 256KB cap is enforced.
Acceptance checks:
node scripts/smoke-github-safe-injection.mjs → all 5 cases pass
node scripts/smoke-github-actions-pins.mjs → ok (no regressions)
grep -r 'github.event.comment.body.*--comment' .claude/agents/ v3/@claude-flow/cli/.claude/
→ exit 1 (no matches)
Co-Authored-By: RuFlo <ruv@ruv.net>
Reported by @seo-yas. The `loadRuvllmWasm()` helper in
`v3/@claude-flow/cli/src/mcp-tools/ruvllm-tools.ts` did a bare
`import('../ruvector/ruvllm-wasm.js')` and never called
`initRuvllmWasm()`. Result: `_wasmReady` stayed false even after
`ruvllm_sona_create` / `ruvllm_microlora_create` / `ruvllm_hnsw_create`,
which left every downstream `sona_*` / `microlora_*` / `hnsw_*` call
either erroring inside the WASM module or returning empty.
`ruvllm_status` reported `wasm.available=true, wasm.initialized=false`
forever because nothing triggered `initSync({ module: wasmBytes })`.
Fix: fold `await mod.initRuvllmWasm()` into `loadRuvllmWasm()`. The
init function is idempotent (early-returns on `_wasmReady`), so the
cost after the first call is one boolean check. `ruvllm_status`
deliberately uses a separate `loadRuvllmWasmModule()` helper so the
diagnostic path stays callable when init has not been attempted (a
diagnostic that triggers the very thing it diagnoses is worse than
useless).
CI guard: `scripts/smoke-ruvllm-wasm-auto-init.mjs` statically asserts
all 12 invariants the fix relies on. Wired into v3-ci.yml as
`ruvllm-wasm-auto-init-smoke` with path filters on the two source files
and the smoke itself, so future refactors that drop the `await
mod.initRuvllmWasm()`, reroute `ruvllm_status` through the auto-init
loader, or add a new `ruvllm_*` tool that bypasses `loadRuvllmWasm()`
without an instance lookup will fail the check before merge.
Versions bumped to 3.7.0-alpha.73 (cli, claude-flow umbrella, ruflo).
Co-Authored-By: RuFlo <ruflo-bot@users.noreply.github.com>
Place above the ruFlo Summit badge in the three customer-facing READMEs
(repo root, ruflo wrapper package, @claude-flow/cli package). Same
hosting pattern as the summit asset.
Co-Authored-By: RuFlo <ruflo-bot@users.noreply.github.com>
The opt-in attribution feature (#1670) used `ruv@ruv.net`, a personal
email that GitHub maps to the maintainer's contributor graph. When
users opt in (or have legacy `.claude/settings.json` from before #1670),
the trailer silently adds ruvnet as a contributor to their repos.
Switch to `ruflo-bot <ruflo-bot@users.noreply.github.com>` — GitHub's
no-reply convention excludes the address from contributor graphs and
maps it to a tool identity rather than a person.
The default (no `--attribution` flag) still writes no trailer at all
per #1670. This is purely about what's written when the user opts in.
Also updates the same trailer format in three sibling locations that
hardcoded the personal email:
- v3/@claude-flow/cli/.claude/settings.json (this repo's local settings,
eating our own dog food)
- v3/@claude-flow/codex/src/generators/agents-md.ts (codex AGENTS.md
template generator)
- v3/@claude-flow/codex/AGENTS.md (the generated AGENTS.md, regenerated
to match the template change)
Out of scope: the harness portion of #2078 (Claude Code runtime trailer)
is a separate concern handled by the Claude Code itself, not by ruflo.
Refs #2078
Co-Authored-By: ruflo-bot <ruflo-bot@users.noreply.github.com>
Bumps @claude-flow/cli, claude-flow, ruflo to 3.7.0-alpha.72 carrying
the fix for #2073 (memory export returned null values; new --value-only
pipe-friendly retrieve flag).
Published:
- @claude-flow/cli@3.7.0-alpha.72 (tags: alpha, latest, v3alpha)
- claude-flow@3.7.0-alpha.72 (tags: alpha, latest, v3alpha)
- ruflo@3.7.0-alpha.72 (tags: alpha, latest, v3alpha)
Verified against the published artifact: `npx @claude-flow/cli@3.7.0-alpha.72
memory export -o out.json -f json -n test` now writes the real entry
value as a parseable JSON string (was null in alpha.71).
Refs #2073
Co-Authored-By: RuFlo <ruv@ruv.net>
Two related fixes for the cost-tracker reporting pipeline:
1. `memory export -f json` now writes the real entry value instead of
null. Root cause: the export tool used `(e as { value?: unknown }).value`
but `listEntries` only returned metadata — the SELECT pulled `content`
from SQL but the result-mapping dropped it. Fix: `listEntries` /
`bridgeListEntries` now accept `includeContent: true` to opt into
returning the full content string, and `memory_export` passes that
flag + writes `e.content` to the exported `value` field.
2. `memory retrieve --value-only` emits ONLY the raw value to stdout —
no box, no banner, no decoration — designed for piping into JSON.parse
without any cleanup. Closes the third suggested fix from #2073.
3. `memory retrieve --format json` was already wired in the handler but
wasn't discoverable through `--help`. Removed dead per-command option
override (the global --format from parser.ts:78 already handles it
with choices: ['text','json','table']) and documented it in a comment.
Backward compat: when callers don't pass `includeContent`, listEntries
omits the field entirely (no behavior change for the 14 existing
call sites that just want metadata). When `includeContent: true`, the
returned id is no longer truncated to 20 chars — exporters need the
full id for round-trip via memory_import.
Verification (against the fixed dist):
$ node bin/cli.js memory store -n test -k x \
--value '{"sessionId":"abc","byTier":{"opus":1.23}}'
$ node bin/cli.js memory retrieve -n test -k x --value-only \
| node -e "console.log(JSON.parse(require('fs').readFileSync(0,'utf8')))"
{ sessionId: 'abc', byTier: { opus: 1.23 } } # ✅
$ node bin/cli.js memory export -o out.json -f json -n test
$ jq -r '.entries[0].value | fromjson' out.json
{ "sessionId": "abc", "byTier": { "opus": 1.23 } } # ✅
Refs #2073. Restores the ruflo-cost-tracker reporting pipeline
(cost summary / report / conversation / budget / export / federation /
optimize — all of which depend on a working memory read path).
Closes#2073
Co-Authored-By: RuFlo <ruv@ruv.net>
The plugin-registry signature verifier in
`v3/@claude-flow/cli/src/plugins/store/discovery.ts` was a stub that
returned `true` whenever the served `registryPublicKey` field started
with `"ed25519"`. The call site only `console.warn`ed on failure and
continued to use the unverified registry. With `requireVerification:
true` (the default), a network adversary on the path to an IPFS
gateway could swap the served registry and have a user install
attacker-controlled plugin tarballs with filesystem+network+hooks
permissions.
Patch (originally proposed in #1922 by @aaronjmars; CWE-347):
- Import `verifyEd25519Signature` from `transfer/ipfs/client.ts` (the
real Ed25519 verifier already lived there, just wasn't wired in).
- Replace the stub with an async verifier that mirrors `signRegistry()`
in `scripts/publish-registry.ts:127-151`: strip `registrySignature` +
`registryPublicKey` from the registry copy, `JSON.stringify`, verify
signature against `expectedPublicKey`.
- Pin verifier to the caller-supplied `expectedPublicKey` (the trusted
pinned key from `DEFAULT_PLUGIN_STORE_CONFIG`), NOT the self-asserted
`registry.registryPublicKey` (which an attacker can swap too).
- Update call site to `await` the now-async verifier AND fail closed
(return demo registry on failure rather than warn+continue).
CI guards (this commit):
1. `scripts/smoke-plugin-registry-signature.mjs` — 13-check regression
smoke covering: (a) static contract on discovery.ts (correct import,
canonicalization, pinned-key call, no stub revival), (b) Ed25519
crypto round-trip matching signRegistry()'s scheme (valid passes,
tampered fails, empty fields fail, swapped served key cannot defeat
the trusted pin), (c) call-site byte check (await + fail-closed).
2. `plugin-registry-signature-smoke` job in `v3-ci.yml` runs the smoke
on push + PR (including from forks now that pull_request branches
include `develop`).
3. Path filters added for `discovery.ts`, `transfer/ipfs/client.ts`,
`publish-registry.ts`, and the smoke itself so any future drift in
the signing scheme triggers re-verification.
Acceptance:
- `node scripts/smoke-plugin-registry-signature.mjs` → 13/13 pass
- Build of `@claude-flow/cli` clean (no new typecheck errors)
- Root npm audit: 0 vulnerabilities
- Supply-chain audit (5 layers): no hard-fail findings
Sibling `verifyRegistrySignature` stub at
`transfer/store/registry.ts:278` is dead code today; tracked as a
follow-up (delete-if-dead or rewrite when wired up).
Co-Authored-By: Aeon (aaronjmars) <aeon@aaronjmars.com>
Co-Authored-By: RuFlo <ruv@ruv.net>
Before:
Root npm audit: 13 HIGH/CRITICAL across 25 vulns
@claude-flow/browser fresh install: similar transitive chain
Audit script reported 0 unaccepted only because it correctly scopes
to direct deps — but transitive surface was hostile
Changes:
1. Bump agentdb to 3.0.0-alpha.14 (was alpha.10/13 across repo)
- 3.0.0-alpha.14 dropped @opentelemetry/sdk-node from its
dependencies block (still in optionalDependencies; overrides handle
that). Eliminates the @opentelemetry/sdk-node CVE chain via direct
dep replacement.
- Updated: v3/@claude-flow/memory, v3/@claude-flow/cli, root.
2. Bump agentic-flow 2.0.7 → 2.0.11 (root) and ^2.0.3 → ^2.0.11
(v3/@claude-flow/browser). Latest 2.x; closer to a Xenova-clean
release when upstream ships it.
3. Add npm overrides at the root + at v3/@claude-flow/browser package
(overrides do not cascade across separate npm projects, so browser
needs its own block for standalone publish):
@opentelemetry/sdk-node >= 0.218.0 (was <0.217.0 CVE)
@opentelemetry/auto-instrumentations >= 0.75.0
@opentelemetry/exporter-prometheus >= 0.217.0
axios >= 1.13.2
fast-uri >= 3.1.0
vite >= 6.4.6
ws >= 8.18.4
Plus the existing browser-package overrides for hono / undici / tar /
minimatch / picomatch / flatted / etc. — copied from root to keep
the standalone npm-published install clean.
After:
Root npm audit: 0 vulnerabilities (13 HIGH/CRITICAL → 0)
Supply-chain audit: PASS (0 unaccepted direct-dep findings)
Browser tests: 230/230 passing
Graph-intel tests: 104/104 passing
One CVE remains in v3/@claude-flow/browser's STANDALONE fresh install
(end-user `npm install`): @xenova/transformers via agentic-flow direct
dependency. Cannot fix without upstream agentic-flow shipping a Xenova-
free release. agentic-flow@3.0.0-alpha.2 still has it. Documented in
accepted-findings.json under cve[] with:
tracking: ADR-121 Phase 4
expiresAt: 2026-08-19 (audit re-fails if upstream still hasn't shipped)
rationale: browser package does not invoke embedding code paths
This is the right level of triage. The audit doesn't lie about it — it
just doesn't block our shipping while we wait for upstream.
Co-Authored-By: RuFlo <ruv@ruv.net>
This commit closes the chain started in ca0a6fa5c (standalone use recipes
landed in repo but never reached npm because no version bumps shipped).
## Changes
### Module version bumps (alpha.43)
- @claude-flow/memory → 3.0.0-alpha.17 (republish standalone use README)
- @claude-flow/embeddings → 3.0.0-alpha.18 (republish standalone use README)
- @claude-flow/security → 3.0.0-alpha.8 (republish standalone use README)
- @claude-flow/neural → 3.0.0-alpha.9 (pin @ruvector/sona to 0.1.5,
republish standalone use README)
- @claude-flow/cli → 3.7.0-alpha.43 (repin to new modules above)
- claude-flow → 3.7.0-alpha.43 (umbrella)
- ruflo → 3.7.0-alpha.43 (umbrella)
### Umbrella bump (alpha.44) — npm download badges
- @claude-flow/cli → 3.7.0-alpha.44
- claude-flow → 3.7.0-alpha.44
- ruflo → 3.7.0-alpha.44
### Neural sona pin (root fix for #2022)
@claude-flow/neural alpha.8 had `"@ruvector/sona": "latest"`, and
@ruvector/sona@0.1.6 (current latest on npm) shipped as an empty publish
— README + package.json only, no index.js or native bins. So every
fresh `npm install @claude-flow/neural@alpha.8` broke at import time
with `Cannot find package '.../node_modules/@ruvector/sona/index.js'`.
Alpha.9 pins to the exact known-good 0.1.5 (which has index.js + 7
platform-specific .node bins). Will revert to a range once
@ruvector/sona@0.1.7+ ships with content (tracked in #2022).
### npm download badges across every published package README
Added `shields.io/npm/dm/<pkg>` (monthly downloads) badges to:
- claims, cli-core, plugins (had no npm badges at all)
- plugin-agent-federation, plugin-iot-cognitum (no npm badges)
- browser, codex, mcp (had version badge, missing downloads)
- umbrella root README (now badges both `ruflo` + `claude-flow`)
The ruflo/README.md and v3/@claude-flow/cli/README.md auto-copy from
root via prepublishOnly, so they inherit the new badges on publish.
Packages that already carried downloads badges (aidefence, deployment,
embeddings, guidance, hooks, integration, memory, neural, performance,
providers, security, shared, swarm, testing) are unchanged.
## Live functional check on the published artifacts
- Fresh `npm install @claude-flow/neural@3.0.0-alpha.9`:
sona resolves to 0.1.5; `import('@claude-flow/neural')` returns
A2CAlgorithm, BalancedMode, BaseModeImplementation, BatchMode,
CuriosityModule, ... (was broken before alpha.9).
- Standalone use sections from ca0a6fa5c now visible on npmjs.com for
memory@alpha.17, embeddings@alpha.18, security@alpha.8, neural@alpha.9.
- npm dm/ badges resolve and render the current weekly download count.
Co-Authored-By: RuFlo <ruv@ruv.net>
Round 1 (alpha.41) added the required --dimension flag to
`ruvector rvf create` but left the equally bogus `--kind browser-session`
in place. ruvector@0.2.25's `rvf create` accepts only:
-d, --dimension <n> (required)
-m, --metric <metric> (optional, default cosine)
Commander's required-option check fires before its unknown-option
check, so the original bug report (#2015) only surfaced the dimension
error. The fresh live regression check after publishing alpha.41
exposed the second-layer bug: `error: unknown option '--kind'`.
This round:
- Strip `--kind browser-session` from all 5 call sites (TS source,
compiled dist via rebuild, replay-spike.sh, browser-agent.md,
browser-record/SKILL.md). Also fixed the ADR prose example.
- Tighten the smoke (scripts/smoke-browser-rvf-create-flags.mjs):
- Switch from rg-based content scan to an explicit PATHS_IN_SCOPE
list (the original `--kind browser-session` anchor is gone, so
we can no longer identify call sites by content).
- Police BOTH invariants per line:
* --dimension / -d is present
* --kind is ABSENT (since ruvector@0.2.25 rejects it)
- Skip quoted-string false positives ('rvf create failed' log lines).
Versions:
@claude-flow/cli 3.7.0-alpha.42
claude-flow 3.7.0-alpha.42
ruflo 3.7.0-alpha.42
@claude-flow/memory 3.0.0-alpha.16 (unchanged, #2019 fix already live)
Post-publish live functional check (everything green):
- ruvector rvf create --dimension 384 (no --kind): exit 0, .rvf file
written. Reproduces what the MCP tool now invokes.
- Published CLI dist:113 carries '--dimension','384', no --kind.
- #2019 vectorBackend / graphAdapter functional test from
alpha.41 still passes against published memory@3.0.0-alpha.16.
- verify.mjs precondition contract still holds.
Co-Authored-By: RuFlo <ruv@ruv.net>
Three small but recurring bugs ship together because they share the
same anti-pattern: a try/catch (or a missing flag) silently turned a
clear precondition failure into a vague "verification failed" /
"controller disabled" / "rvf create failed" outcome that downstream
consumers couldn't act on.
#1880 — witness verify exits 1 on source-only checkouts
- The 12h scheduled verification has been filing a duplicate
"HIGH — verification broken" issue every cron run since 2026-05-10
because the runner does a source-only checkout (no @noble/ed25519
install, no `npm run build`) and verify.mjs lumped that into the
same exit-1 bucket as a real signature regression.
- verify.mjs now reserves exit 2 strictly for precondition misses:
* @noble/ed25519 not installed → exit 2
* every manifest entry missing AND manifest → exit 2
references /dist/ paths (= "dist not built")
Real failures (signature invalid, specific marker regressed)
keep exit 1. The scheduled runner can now distinguish
"needs install/build" from "we broke something".
- New CI guard: scripts/smoke-witness-verify-precondition.mjs
drives all three shapes (missing dep, all-files-missing,
built tree) and asserts the exit code contract.
- Wired into v3-ci.yml as witness-verify-precondition-smoke and
into witness-verify's `needs:` so a contract break blocks publish.
#2019 — vectorBackend controller permanently disabled
- @claude-flow/memory's controller-registry.ts calls
agentdb.getController('vectorBackend'). agentdb@3.0.0-alpha.14's
getController switch only handles memory/reflexion/skills/causal
and throws `Unknown controller: vectorBackend` for everything else
— silently swallowed, leaving the controller `enabled: false`
even though `agentdb.vectorBackend` is a real field on the
instance (assigned in AgentDB.initialize()).
- Registry now probes `agentdb[name]` directly first, falls back to
getController only when the field is absent. Applied to all three
accessor paths (initializeController, get, isEnabled).
- RuntimeConfig gains an optional `agentdb` injection field so
tests and consumers with a pre-built AgentDB can govern it via
the registry.
- Two new tests in controller-registry.test.ts cover both branches
(direct property wins; falls back to getController when absent).
- Full controller-registry suite stays green (67 tests).
#2015 — ruflo-browser session_record fails every call
- ruvector@0.2.25 makes `-d, --dimension <n>` required on
`rvf create`. The browser_session_record MCP tool wrapper invoked
`rvf create … --kind browser-session` WITHOUT the flag, so every
call returned `{ success: false, error: "rvf create failed" }`.
- All five call sites updated to pass `--dimension 384` (matches
MiniLM-L6 / AgentDB index default):
v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts
plugins/ruflo-browser/scripts/replay-spike.sh
plugins/ruflo-browser/agents/browser-agent.md
plugins/ruflo-browser/skills/browser-record/SKILL.md
plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md
- New CI guard: scripts/smoke-browser-rvf-create-flags.mjs
statically scans every `rvf create … --kind browser-session`
invocation across the repo (TS, dist, shell, markdown) and
fails if any is missing --dimension / -d.
- Wired into v3-ci.yml as browser-rvf-create-flags-smoke and into
witness-verify's `needs:` so a regression blocks publish.
Cases covered by guards: source-only checkout (no deps), source-only
checkout with build, built tree, missing dimension flag on TS/dist/
shell/markdown call sites. The smokes are independent jobs so the CI
summary names the specific contract that broke.
Co-Authored-By: RuFlo <ruv@ruv.net>
The pre-bash PreToolUse hook in .claude/helpers/hook-handler.cjs is a
security gate that refuses dangerous commands. In 3.6.30 it read the
wrong stdin field (`toolInput` object instead of `toolInput.command`
string), `.toLowerCase()` threw TypeError, the global safety-timer
try/catch swallowed it, and the handler printed misleading
"[OK] Command validated" while exiting 0 — letting `rm -rf /` through.
The bind-the-string fix already landed in alpha.39 via #1944. This
commit adds:
1. Belt-and-suspenders defensive coding — wrap with String(... || '')
so any future regression that re-binds command to null/undefined/an
object can no longer throw and silently exit 0.
2. New dedicated CI job `pre-bash-hook-smoke` (#2017) that drives real
Claude-Code-shaped PreToolUse JSON into BOTH handler copies and
fails on any of:
- dangerous command + exit 0 (the security bypass)
- "[OK] Command validated" on a dangerous input (misleading log)
- "[WARN] Hook X encountered an error" anywhere (silent-swallow)
Wired into witness-verify's needs:, so the gate now blocks publish.
3. Path filters extended: '**/.claude/helpers/hook-handler.cjs' triggers
the smoke whenever either handler copy changes.
Cases covered: dangerous rm -rf /, fork-bomb, format c:, null command
field (defensive), empty payload, snake_case tool_input.command shape
(the exact #2017 reproduction), innocuous ls -la.
Ships as 3.7.0-alpha.40 to all three packages.
Same failure shape as #1147: `npx @claude-flow/cli@latest` crashes with
`npm error Invalid Version: ` on npm 11.x / Node 24+.
Root cause: @claude-flow/embeddings declared @huggingface/transformers in
both `optionalDependencies` AND `peerDependencies` (with
peerDependenciesMeta.optional = true). When npm 11.x arborist runs
PlaceDep.pruneDedupable → Node.canDedupe → semver.eq, the overlap plus a
"-dev." prerelease transitive (onnxruntime-web@1.26.0-dev.…) trips the
empty-version crash inside @npmcli/arborist.
Fix:
- @claude-flow/embeddings: keep only the optional peerDependency, drop
the duplicate optionalDependencies entry. Bumped to 3.0.0-alpha.17.
- @claude-flow/cli: pin embeddings to ^3.0.0-alpha.17 so existing
lockfiles re-resolve to the fixed version. Bumped to 3.7.0-alpha.39.
Regression guards (so this can't recur):
- scripts/audit-package-dep-overlap.mjs — static check that no package
declares the same name in BOTH optionalDependencies and
peerDependencies. Wired into v3-ci.yml as part of the
plugin-package-audit job.
- scripts/smoke-cli-npx-install.mjs — behavioural smoke: pack the CLI
tarball, install it into a scratch project with optionals enabled,
fail if `npm install` prints "Invalid Version:" or exits non-zero.
New v3-ci.yml job `cli-npx-install-smoke` runs on Node 22 + 24
(Node 24 ships npm 11.x, where the bug surfaces) and gates witness-verify.
Verified end-to-end:
$ npx -y @claude-flow/cli@3.7.0-alpha.39 doctor
✓ MCP Servers, AIDefence, Disk Space, TypeScript … 10 passed
Cuts the alpha.37 release covering the three midstream-related PRs
merged today:
#2005 — ADR-119 — midstreamer adoption assessment (decision: wait)
#2006 — ADR-120 — cross-port plan (Steps 1-3)
#2007 — ADR-120 Step 2 — midstream-aware federation transport loader
Source changes are TS-only + audit guards; no native build surface
change. The midstream-aware loader is opt-in via MIDSTREAMER_QUIC_NATIVE
and falls through transparently to the agentic-flow loader otherwise,
so behavior on the published package is unchanged today.
• audit-fix-invariants.mjs: 27 invariants across 16 files (was 25/14)
• Federation plugin tests: 555/555 passing
• Type-check: clean
Bumps all 3 packages (@claude-flow/cli, claude-flow umbrella,
ruflo umbrella) to 3.7.0-alpha.37.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
A broad MCP tool smoke test bricked the transport mid-batch: after
hooks_pre_task ran, every subsequent hooks_* / mcp_* call returned
`Transport closed`, including mcp_status. Root cause is stdout
protocol corruption — Codex closes the MCP transport the moment it
sees a non-JSON line on fd 1, and one or more of the modules that
hooks_route lazy-loads (@ruvector/router, @claude-flow/neural,
transformers.js/ONNX, semantic-router init) emits a diagnostic via
console.log into the JSON-RPC stream.
Defense in three layers, all in `startStdioServer()`:
1. **Hijack console.log/info/debug → stderr.** As the first thing
the server does, replace those three methods with stderr writers
prefixed `[stdout→stderr]`. Any subsequent module that calls
`console.log(...)` (lazy-loaded or otherwise) goes to stderr
instead of corrupting the protocol. `console.error` is
unchanged.
2. **`writeFrame()` helper for JSON-RPC.** All three
server-originated frames (`server.initialized`, the
`Request too large` error, and tool responses) go through a
dedicated helper that calls `process.stdout.write(...)`
directly. The hijack above can't redirect protocol frames
because they bypass `console.log` entirely.
3. **uncaughtException + unhandledRejection handlers.** Previously
only SIGINT/SIGTERM were caught — an unhandled rejection in a
lazy-loaded module's init (very common during the hooks
semantic-router race the issue describes) crashed the server
silently. Now those go to stderr with the full stack and the
process stays up.
Plus: sets `process.env.MCP_STDIO_MODE = '1'` so downstream code
that wants to behave differently in stdio mode can probe a single
flag.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
`memory_import_claude` only had `allProjects: true/false` granularity.
Voice-fidelity-aware operators (named-persona content, PII-aware
hygiene) couldn't bulk-import without contaminating the unified
`claude-memories` namespace with the subset of files they had to
exclude. The current workaround was to halt imports entirely.
Two new params:
excludeFilePatterns: string[]
Glob patterns matched against the absolute file path. Files
matching ANY pattern are skipped. Supports:
`**` any chars including path separators
`*` any chars except path separators
`?` exactly one char except a path separator
Example: ["**/voice-*.md", "**/persona-*.md"]
excludeFiles: string[]
Absolute file paths to skip verbatim. Faster than a pattern when
the operator already has a list captured.
Both apply to either branch (`allProjects: true` or single-project).
The response gains an `excludedByPattern` counter so callers can
verify the exclusion ran.
A minimal `globToRegex` helper is added (anchored, escapes regex
metas, handles `**` / `*` / `?`). Verified four representative
cases pass; the unrelated regex escapes the issue's voice-fidelity
patterns need.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
The statusLine command was hardcoded as
`sh -c 'D="${CLAUDE_PROJECT_DIR:-.}"; … exec node "$D/<script>"'`
on every platform. On native Windows (cmd / PowerShell, no
Git-Bash) `sh` either isn't on PATH or its quoting gets mangled.
Symptom in #1948: spurious files like `0)` or
`toastr.error('ESD...` appearing in the repo root because misparsed
shell tokens leak back into the file system as filenames.
Fix: detect `process.platform === 'win32'` at init time and emit a
shell-free command instead — a `node -e "…"` one-liner that
resolves the script path internally using `process.env`. No shell
quoting hazards because the resolution happens inside Node, not in
the shell.
Windows: node -e "const fs=require('fs'),p=require('path');
const d=process.env.CLAUDE_PROJECT_DIR||'.';
const f=p.join(d,'.claude/helpers/statusline.cjs');
const h=p.join(process.env.USERPROFILE||process.env.HOME||'.', '.claude/helpers/statusline.cjs');
require(fs.existsSync(f)?f:h);"
POSIX: unchanged (sh -c with project-dir / HOME fallback)
Verified both branches emit valid JSON when generated through the
real settings-generator path on each platform.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
`memory stats` always reported `HNSW Index: active (0 entries)` even
when `memory store` had just stored a vector and `memory search`
successfully retrieved it. Root cause: the rendered count was
`hnsw.entryCount`, which is the live in-process JS state
(`hnswIndex?.entries.size`). A fresh `memory stats` invocation has
never initialized HNSW in this Node process, so the in-process
counter is always 0 — even when the persistent .swarm/memory.db has
many entries with embeddings.
Fix: prefer the persistent count from the `memory_stats` MCP tool,
which already computes `entriesWithEmbeddings` by listing the DB's
real rows. Fall back to the live counter when persistent count
isn't available. When both are non-zero, take the max (covers the
edge case where the live process has indexed more entries than the
persisted store has flushed).
Behavior matrix:
hnsw.available persisted live → rendered
false any any → "not active" (unchanged)
true 0 0 → "available but not initialized"
true N>0 any → "active (max(N,live) entries)"
true 0 M>0 → "active (M entries)" (unchanged)
Adds `entriesWithEmbeddings?: number` to the stats result type so
TypeScript is happy. The MCP tool already returns this field; this
just teaches the consumer to read it.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
Resolves#1989. When encryption at rest is enabled, `.swarm/memory.db`
becomes an RFE1-magicked ciphertext blob rather than a SQLite
database. The statusline-generator's "page count at offset 28"
fallback read ciphertext bytes as a uint32 and rendered
3,367,093,602 patterns, which then cascaded into fake DDD 5/5 /
100% / intelligence 100% downstream.
Three defense layers, all in `statusline-generator.ts` (the template
that `ruflo init` writes to `.claude/helpers/statusline.cjs`):
1. **Magic-bytes check** -- compare the first 16 bytes against the
literal "SQLite format 3\\0" before interpreting any subsequent
bytes. Encrypted, empty, or non-SQLite files are skipped.
2. **Page-count sanity clamp** -- reject pageCount > 1,000,000
(~4GB DB). Catches future regressions or genuinely corrupt
headers even on plaintext SQLite.
3. **Defensive consumer clamps** in `getV3Progress` and
`getSystemMetrics` -- `Number.isFinite` + range check on
`learning.patterns` before deriving domainsCompleted /
intelligencePct. If any future regression in the reader returns
a wild value, the downstream displays stay honest.
Verified with a fake RFE1-headered `memory.db` matching the
forensic bytes from the issue:
Before: DDD Domains 5/5 / 100% / patterns=3367093.6k / 🧠 100%
After: DDD Domains 0/5 / 0% / patterns=0 / 🧠 0%
The `\\0` in the SQLite-magic string is intentional: the
statusline-generator emits via a JS template literal, so the
source-level `\\\\0` resolves to `\\0` in the generated .cjs which
JS then parses as the null byte.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.35.
Fixes:
- #1974 — neural-trader@2.7.1 has a malicious-by-accident `install`
lifecycle script that recursively invokes `npm install` from inside
the install hook → unbounded process recursion → ~120 GB RAM + 3,049
stuck processes on macOS Apple Silicon. The plugin's docs told users
to run the dangerous command verbatim. Now every documented install
uses `npm install --ignore-scripts neural-trader` (the linux-x64
binary is hardcoded inline in the upstream tarball, so the package
still works on that platform after `--ignore-scripts`). 9 files
patched + new `scripts/audit-neural-trader-safety.mjs` CI guard in
the `hook-command-audit` job. Merged via #1976.
Also closed#1975 (recruiter outreach, not a bug) and asked #1973 for
specific repro details (vague "Windows install + bash + wiki" report
without a failing command or error).
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.35 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.35 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.35 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.34.
Code fix:
- #1968 — daemon start --workers map silently dropped the flag when the
launcher forked the foreground child, so the daemon came up with the
full default worker set regardless of the user's selection. Threaded
--workers / --headless / --sandbox through the same validation +
forwarding path the resource thresholds already use. Merged via #1970.
Issue-tracker closeouts (no new code — these were fixed in earlier alphas
but the issues weren't auto-closed by the PRs that resolved them):
- #1946 — doctor "Not initialized" — fixed in alpha.29 (#1959)
- #1943 — global-install hook MODULE_NOT_FOUND — fixed in alpha.28 (#1957)
- #1940 — bridge_status totalEntries:0 — fixed in alpha.31 (#1963)
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.34 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.34 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.34 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>
`daemon start --workers map` (and `--headless` / `--sandbox`) were
accepted by the launcher but silently dropped when it forked the
foreground child — so the daemon came up with the full default worker
set (`map,audit,optimize,consolidate,testgaps`) regardless of what the
user asked for.
Root cause: `startBackgroundDaemon()` only accepted resource thresholds
(`--max-cpu-load` / `--min-free-memory`) and forwarded just those plus
`--workspace` to the forked child. `--workers` / `--headless` /
`--sandbox` were read by `ctx.flags.*` but never passed through.
Fix: thread the three additional flags through the launcher and add
them to the forked child's argv, gated by the same kind of strict
input validation the existing thresholds use:
- `--workers <list>` — `/^[a-z][a-z0-9_-]*(,[a-z][a-z0-9_-]*)*$/`
- `--headless` — boolean
- `--sandbox <mode>` — one of `strict|permissive|disabled`
Anything that fails validation is dropped silently — same posture as
the existing thresholds. Forced through the same `forkArgs.push()`
path so the child sees them in argv (which both the daemon's own arg
parser AND `killStaleDaemons` rely on for workspace identification).
Behaviour now (matching the user's repro from #1968):
$ ruflo daemon start --workers map --max-cpu-load 1000 --min-free-memory 0
$ ruflo daemon status
Workers Enabled: 1
map enabled
Build verified clean (tsc).
Resolves#1968.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
Cumulative batch release closing out the issue-triage cycle that started
at alpha.27. Bumps @claude-flow/cli, claude-flow, and ruflo to alpha.33;
each prior bump (.28→.32) shipped its fix-set immediately but had no
GitHub Release writeup. This commit + tag closes the loop.
Fixes shipped since alpha.27 (resolved-issue list):
Memory layer:
- #1947 vector_indexes schema dim 768→384 (default model is 384-dim)
- #1942 Bridge search index 768 vs imported 384-dim — same root cause
- #1952 Windows: memory store ok, search returns 0 — same root cause
- #1945 CLI memory store didn't persist on non-default memory paths
(bridge ignored CLAUDE_FLOW_MEMORY_PATH / config)
- #1946 doctor reported DB "Not initialized" on a valid DB at
data/memory/memory.db (same cwd-path-hardcode root cause)
- #1941 memory_search returned 0 for non-default namespaces — every
store path now provisions per-namespace vector_indexes rows
- #1940 memory_bridge_status reported totalEntries:0 — used
entries.length (page size) instead of .total (row count)
- #1939 Win32 cwd didn't resolve to Claude Code's on-disk slug —
drive-colon / backslash / whitespace now normalised to `-`
- #1947 RC2 embeddings index -a build required `-c` — now optional
Hooks layer:
- #1944 pre-bash TypeError on every Bash call — toolInput (object)
was used as the prompt string fallback; switched to .command
- #1943 global-install hooks fired MODULE_NOT_FOUND — settings paths
now probe project-local first, fall back to $HOME
UI / statusline:
- #1953 hooks_pretrain extracted 0 patterns on md-heavy repos — used
a code-file budget + code-dir-first traversal
- #1951 statusline hardcoded V3.5 — now probes plugin install path
first, falls back to npm install / source checkout
Verification:
- #1949 federation plugin install 403 on cookies@0.9.1 — added
scripts/verify-federation-plugin.sh that pins cookies@0.9.0
at the verification harness root. Workaround until upstream
pipenet/koa chain ships a non-blocked release.
CI regression guards (so these don't come back):
- scripts/audit-vector-dim.mjs — #1947 dim guard
- scripts/audit-hook-handler-prompt.mjs — #1944 toolInput guard
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.33 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.33 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.33 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.32.
Fixes:
- #1947 RC #2 — `embeddings index -a build` REQUIRED `-c` and the docs
suggested `-c default`/`-c documents`/etc., so users who stored entries
under a non-default namespace ended up with `Vector Count: 0`. The HNSW
index has always been a single global structure across all namespaces;
`-c` is informational only. Make it optional, treat omitted `-c` as
"(all namespaces)", and print a helpful hint when the resulting count
is 0. Merged via #1964.
Also posted an investigation comment on #1949 — the federation plugin
install 403 is genuinely upstream-only (cookies@0.9.1 arrives transitively
via `agentic-flow`, which is third-party; npm `overrides` in a non-root
package.json aren't honored when consumers install the plugin as a dep).
Documented why and what the actual fix path looks like, so the issue
isn't lost.
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.32 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.32 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.32 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>
The HNSW index is a single global structure that indexes every
namespace's embeddings — `-c` was always informational. But the earlier
code REQUIRED `-c` for `build`/`rebuild` and the examples showed
`-c documents`/`-c patterns`/`-c default`, so users who stored entries
under a non-default namespace (e.g. `project`, `claude-memories`) hit
"Collection is required" on plain `-a build`, then re-ran with `-c default`
and got `Vector Count: 0` because that namespace was empty.
Drop the required check. When `-c` is omitted, label the result `(all
namespaces)`, run the same global rebuild, and print a helpful follow-up
if the resulting vector count is 0. Update help text + examples so the
intent is clear ("Omit to build for all namespaces"). No runtime
behavior change for callers passing `-c` — still indexes globally, just
labels the box with whatever they passed.
Build verified clean (tsc).
Resolves#1947 RC #2.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.31.
Fixes:
- #1941 — memory_search returned 0 for non-default namespaces (e.g.
claude-memories) because vector_indexes only held rows for `default`
and `patterns`. Every store path now INSERT-OR-IGNOREs a per-namespace
vector_indexes row before the entry write. Merged via #1963.
- #1940 — memory_bridge_status reported totalEntries: 0 on DBs with
hundreds of rows because it used listEntries({}).entries.length
(capped at the 20-row page size). Now uses .total + reports a
per-namespace breakdown. Merged via #1963.
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.31 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.31 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.31 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>
Two related memory-bridge bugs:
**#1941** — \`memory_search({namespace:"claude-memories"})\` always returned
0 results even when \`memory_import_claude\` had inserted hundreds of rows
into that namespace. The schema's \`vector_indexes\` table held only
\`default\` and \`patterns\` rows; AgentDB's HNSW/router keys namespace
lookups by this table, so any namespace without a row was effectively
unindexed for search.
Fix: every store path (both the AgentDB-bridge \`bridgeStoreEntry\` and the
raw-sql.js fallback \`storeEntry\`) now does \`INSERT OR IGNORE INTO
vector_indexes (id, name, dimensions) VALUES (?, ?, ?)\` for the entry's
namespace before the row insert. Idempotent; legacy DBs without the
table fall through cleanly. Dimensions defaults to the embedding's
actual dim (384 for the default model), preserving #1947's contract.
**#1940** — \`memory_bridge_status\` reported \`totalEntries: 0\` and
\`status: not-synced\` on DBs with hundreds of rows. Root cause: it used
\`listEntries({}).entries.length\`, but \`listEntries\` returns at most 20
entries with the full row count in a separate \`.total\` field — so the
status reporter was capped at the page size, not the table count.
Fix: use \`listEntries({}).total\` for the count. Plus surface a
per-namespace breakdown (\`agentdb.namespaces\`) for the common namespaces
(\`default\`, \`patterns\`, \`claude-memories\`, \`auto-memory\`, \`tasks\`,
\`feedback\`, \`pretrain\`) so callers can see where the rows actually live.
\`bridge.status\` now flips to \`connected\` on ANY persisted row, not only
\`claude-memories\` (the bridge is in use from many import paths).
Build verified clean (tsc).
Resolves#1941, #1940.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.30.
Fixes:
- #1953 — hooks_pretrain extracted 0 patterns on markdown-heavy repos
because the 50-file budget for import-pattern extraction counted EVERY
file (.md/.yaml/.db/.log), not just code files. Fix uses a separate
`codeFilesScanned` counter, sorts readdir so code-likely dirs recurse
first, widens the per-file scan window 30→80 lines, and recognises
more code extensions (.tsx/.jsx/.mjs/.cjs). Merged via #1961.
- #1939 — memory_import_claude({allProjects:false}) returned 0 on Win32
installs because resolveProjectMemoryDir's slug candidates only handled
forward slashes. Added a Win32 candidate that normalises drive-colon,
backslash, and whitespace to `-` (`C:\Users\…\Claude Stuff` →
`C--Users-…-Claude-Stuff`). Merged via #1962.
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.30 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.30 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.30 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>
`memory_import_claude({ allProjects: false })` couldn't find the current
project's memory directory on a pure Win32+Win32 install, because the
slug candidates in `resolveProjectMemoryDir()` only replaced forward
slashes — never the drive-colon, backslash, or whitespace that a Win32
cwd contains.
Example:
- cwd: `C:\Users\tobia\OneDrive\Desktop\Claude Stuff`
- Claude Code's on-disk slug: `C--Users-tobia-OneDrive-Desktop-Claude-Stuff`
- Before this fix: no candidate matched, importer reported `imported: 0,
"No Claude memory files found"`.
Add a Win32-specific candidate gated on `/^[A-Za-z]:[\\/]/` that does the
full normalization (`:` / `\` / `/` / whitespace → `-`). The other four
candidates (legacy POSIX, WSL `/mnt/<drive>/`, leading-dash strip, space
rule) are unchanged, so no regression for the other setup classes.
Verified the new candidate emits
`C--Users-tobia-OneDrive-Desktop-Claude-Stuff` for the reporter's path.
Build verified clean (tsc).
Resolves#1939.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
`hooks_pretrain` reported `patternsExtracted: 0` on any monorepo whose
depth-first traversal hit 50 non-code files (.md / .yaml / .db / .log /
…) before reaching a single .ts/.js/.py/etc. The 50-file budget that
gates the import-pattern scan was checked against `filesAnalyzed`, which
counts EVERY directory entry — so in markdown-heavy repos (docs/, specs/,
_bmad-output/, …) the budget burned out on Markdown long before the
walker recursed into apps/, packages/, or src/.
Two-part fix:
1. Use a separate `codeFilesScanned` counter for the budget, incremented
only inside the `if (codeExts.includes(ext))` block. The 50-file cap
now means "50 code files", which is what the comment always claimed.
2. Sort `readdirSync` entries so the walker recurses into code-likely
dirs first (`src/`, `apps/`, `packages/`, `lib/`, `crates/`, `workers/`,
`server/`, `backend/`, `frontend/`, `app/`, `cli/`, `core/`) and
deprioritises docs/specs/build/coverage/test dirs. Files are mixed in
between. Stable sort so test behaviour is deterministic.
Plus two collateral improvements:
- Widen the per-file scan window from 30 → 80 lines. Modern TS files
often have license headers + JSDoc + type-only imports before the
first `import` — the 30-line cap was missing real imports.
- Recognise more code extensions: `.tsx`, `.jsx`, `.mjs`, `.cjs`. The
`SUPPORTED_EXTRACTION_EXTS` list used by the "found N code files but 0
patterns" note got the same expansion so the diagnostic stays accurate.
Build verified clean (tsc).
Resolves#1953.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.29.
Critical fixes in this release:
- #1945 — CLI `memory store` reported success but didn't persist when the
user had a non-default memory path (e.g. `data/memory/memory.db` via
`CLAUDE_FLOW_MEMORY_PATH`). Root cause: `memory-bridge.ts::getDbPath()`
hard-coded `<cwd>/.swarm/memory.db` and ignored the env var / config,
while `memory init` honored both — so the bridge wrote to one file and
the user's next CLI invocation read from another. Merged via #1959.
- #1946 — `ruflo doctor` reported "Memory Database: Not initialized" on
perfectly-init'd DBs because `doctor.ts::checkMemoryDatabase()` only
probed three legacy paths and ignored `CLAUDE_FLOW_MEMORY_PATH` /
config entirely (also missed `data/memory/memory.db`, a common layout).
Merged via #1959.
- #1951 — statusline showed hard-coded "RuFlo V3.5" regardless of the
installed version. Three files had the bug: two tracked `statusline.cjs`
copies, plus the TypeScript template that writes the project-local
statusline at init time. All now probe a fuller candidate list, preferring
`~/.claude/plugins/marketplaces/ruflo/package.json` (the plugin install,
which was never checked before). Merged via #1960.
Published to npm with all dist-tags updated:
- @claude-flow/cli 3.7.0-alpha.29 (alpha, latest, v3alpha)
- claude-flow 3.7.0-alpha.29 (alpha, latest, v3alpha)
- ruflo 3.7.0-alpha.29 (alpha, latest)
Co-Authored-By: RuFlo <ruv@ruv.net>