Batched publish of iteration #11 (suppression-via-side-effect-module),
iteration #14 (ADR-094 transformers loader: try-prefer
@huggingface/transformers, fall back to @xenova).
Verified in clean smoke install:
- `ruflo --version` clean (no [AgentDB Patch] noise)
- `memory init --force` clean
- transformers-loader.js shipped in @claude-flow/embeddings dist
- ADR-094 inline logic shipped in cli memory-initializer.js
The protobufjs <7.5.5 CVE chain still shows in npm audit because
@huggingface/transformers is an OPTIONAL dep — users opt in via
`npm install @huggingface/transformers` and the loader picks it up.
Once installed, the legacy chain drops and audit clears.
Co-Authored-By: RuFlo <ruv@ruv.net>
Re-audit of published 3.6.17 in clean install showed three root-level
CVEs that overrides could address:
- protobufjs <7.5.5 — CRITICAL — Arbitrary code execution
Comes through @opentelemetry/otlp-transformer in the agentdb
observability suite. Pinning >=7.5.5 (latest 8.0.3 in registry).
- tar <=7.5.10 — HIGH — Hardlink path traversal / arbitrary file write
Previous override said >=7.5.0 but the CVE actually applies through
7.5.10. Tightened to >=7.5.11 (latest 7.5.13).
- uuid <14.0.0 — MODERATE — Missing buffer bounds check in v3/v5/v6
when buf is provided. Pinning >=14.0.0.
Same caveat as the previous overrides commit: npm overrides only apply
at the install root, so these primarily protect our CI/dev environment
and downstream apps that put ruflo in their root deps. Transitive CVEs
through @xenova/transformers chain remain blocked on upstream.
Co-Authored-By: RuFlo <ruv@ruv.net>
@claude-flow/cli ships a postinstall script that copies the agentdb
package's dist/src/controllers/ to dist/controllers/ so callers using
the legacy `agentdb/dist/controllers/...` import path resolve. The
script copied only `controllers/`, but the controllers themselves
import from sibling dirs (`../core/`, `../services/`, `../types/`,
`../utils/`). Without those, `import { cosineSimilarity } from
'../utils/vector-math.js'` in HierarchicalMemory.js failed with
ERR_MODULE_NOT_FOUND, breaking hierarchical memory consolidation
silently in the daemon path.
Fix: postinstall now enumerates every directory under dist/src/ and
copies each to dist/<name>/ (skipping dirs that already exist).
controllers, core, services, types, utils, plus any others — all
reachable from the legacy import root.
Reproduced and verified against published 3.6.17:
$ npm install ruflo@3.6.17
$ ls node_modules/@claude-flow/cli/node_modules/agentdb/dist/utils/vector-math.js
-rw-r--r-- ... vector-math.js # ← previously missing
$ node -e "import('.../agentdb/dist/controllers/HierarchicalMemory.js')
.then(m => console.log('PASS'))"
PASS — module loaded, exports: [ 'HierarchicalMemory' ]
Bumps to 3.6.17 across @claude-flow/cli, claude-flow umbrella, and
ruflo umbrella with all dist-tags (alpha, latest, v3alpha) updated.
Co-Authored-By: RuFlo <ruv@ruv.net>
Iteration #2 of /loop. Three concrete improvements, no publish (batched
for the next release per the loop directive).
Security (npm audit baseline):
- Add overrides for high/critical CVEs in claude-flow umbrella and ruflo:
@hono/node-server >=1.19.10 (auth bypass), flatted >=3.4.0 (DoS),
tar >=7.5.0, picomatch >=4.0.3, path-to-regexp >=8.2.1,
undici >=7.18.0, minimatch >=10.0.0, @isaacs/brace-expansion >=5.0.1,
cacache >=20.0.0, make-fetch-happen >=15.0.0, express-rate-limit >=8.4.1.
npm overrides only apply at the install root, so these primarily
protect our own CI/dev environment and signal intent to consumers.
Transitive CVEs through @xenova/transformers/onnxruntime-web/protobufjs
remain blocked on upstream releases.
ADR-093 F8 — performance_metrics fixtures replaced with self-measured
latency:
- Probe a tiny CPU+memory loop with process.hrtime.bigint, derive avg
and p50/p95/p99 from real recent samples instead of the hardcoded
50/40/100/200ms defaults.
- Throughput now reports actual ops/second from samples in the last 60s
instead of an arbitrary +1/+10 increment per call.
ADR-093 F10 — hooks_intelligence_attention now attends over real stored
patterns when available:
- searchEntries(query) -> top-K stored patterns become the attention
keys/values; labels include pattern IDs and excerpted content.
- When no patterns exist yet, falls back to the previous cosine-harness
but labels them honestly as "(synthetic harness) pattern #N" and
reports implementation: 'real-flash-attention+synthetic-harness'.
- Eliminates the audit-flagged "Flash attention target #1/2/3" placeholder
strings with uniform 0.333 weights when stored patterns are present.
Co-Authored-By: RuFlo <ruv@ruv.net>
Six-agent verification swarm against 3.6.13 surfaced mocks, broken tools,
and partial fixes. ADR-093 documents the findings and decisions; this
commit implements F1, F2, F3, F4, F5, F6, F12 (the in-scope subset).
- F1: hooks_metrics now reads getIntelligenceStatsFromMemory + routing
outcomes instead of substring-matching memory keys. The 3.6.13 #1686
fix landed in v3/mcp/tools/hooks-tools.ts but the runtime uses
v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts — counters now actually
increment after hooks_post-task.
- F2: hooks_worker-dispatch detects daemon presence via .claude-flow/
daemon.pid and returns honest verdicts (`queued`, `no-daemon`,
`synthetic-completed`) instead of the audit-flagged status:"completed"
in 0ms (#1700 item 1).
- F3: hive-mind_init schema now exposes `consensus` (raft|byzantine|
gossip|crdt|quorum, default raft per anti-drift posture) and persists
consensusStrategy into HiveState; hive-mind_status surfaces the
persisted value (#1700 item 4).
- F4: agentdb_pattern-store falls back to memory_store when the
ReasoningBank registry is unavailable, instead of silently failing
with "AgentDB bridge not available" while agentdb_health.reasoningBank.
enabled === true.
- F5: embeddings_status adds a structured ruvectorStatus field
({available, enabled, version}) so callers can distinguish "package
not installed" from "not wired into the pipeline" (#1698 partial
regression at MCP boundary).
- F6: session_list now accepts both writer shapes (`{sessionId, name,
savedAt}` from session_save and `{id, startedAt}` from the auto-session
writer); previously the second shape collapsed to empty objects.
- F12: config_list enumerates the full union (defaults + stored + every
scope) with accurate `source` labels, matching config_export totals.
Deferred (separate ADRs): F7 coordination_orchestrate stub,
F8 performance_metrics latency/throughput fixtures, F9 disabled AgentDB
controllers (route/feedback/semantic-route), F10 hooks_intelligence_
attention placeholder, F11 neural_predict classifier head.
Bumps @claude-flow/cli, claude-flow umbrella, and ruflo umbrella to
3.6.14 with all dist-tags updated. Smoke-tested in clean /tmp install:
ruflo memory init still 6/6 ✓; ruflo --version reports 3.6.14.
Co-Authored-By: RuFlo <ruv@ruv.net>
Bumps all three packages to 3.6.13 with the following fixes:
- #1697 (rvf-wasm SyntaxError): pin @ruvector/rvf-wasm to 0.1.5 via
npm overrides in root and ruflo umbrella package.json. Upstream
republished 0.1.6 with the missing exports map, so fresh installs
also work — the override is defense-in-depth for cached resolves.
- #1698 (HNSW false-negative): await getHNSWIndex() before reading
status in `embeddings index status` and `performance benchmark`.
Differentiate "package not installed" vs "index empty" in the
remediation hint instead of always pointing to npm install.
- #1686 (metrics zeros + null.toFixed crash): pass dbPath to
ReasoningBank so post-* writes persist to .swarm/memory.db,
normalize CLI dashboard against both `statistics`/`stats` and
`executionTime`/`duration` shapes, and add ?? 0 guards on every
toFixed call.
- #1691 (Windows daemon spawn): replace spawn(process.execPath,...,
{shell:true}) with fork(cliPath, ...) so cmd.exe never sees the
spaced node.exe path. Also removes the [DEP0190] security warning.
macOS regression-checked against published 3.6.13.
- #1694 (UI auto-execute): remove 500ms auto-call to executeResearch
in goal_ui/Index.tsx and add an explicit "Start Research" gate
button so the plan is reviewable. Validated in Playwright with
zero console errors.
Co-Authored-By: RuFlo <ruv@ruv.net>
Rewrites claudemd-generator.ts from ~577 to ~280 lines (~50% token reduction).
Adds agent comms (SendMessage pipeline) as core section in every template.
Updates root CLAUDE.md to v3.6.10 with comms-first agent teams section.
Co-Authored-By: claude-flow <ruv@ruv.net>
Bug D final: args.join(',') not args.join(' ') — agent-browser expects
comma-separated single string: --args "--no-sandbox,--disable-dev-shm"
Bug E final: readSysctl used require('fs') which fails silently in ESM.
Now uses top-level import { readFileSync, existsSync } from 'node:fs'.
AppArmor check was already present but never executed due to require().
Co-Authored-By: claude-flow <ruv@ruv.net>
Bug D: --arg → --args (agent-browser CLI expects plural flag with
joined args string, not per-arg iteration).
Bug E: needsNoSandbox now checks apparmor_restrict_unprivileged_userns
in addition to unprivileged_userns_clone for Ubuntu 24.04+.
Issue #1652: DefaultHeadlessExecutor now implements IContentAwareExecutor
with setContext(). Config A removes CLAUDE.md, Config B writes provided
content. Backup/restore ensures original file is preserved.
Co-Authored-By: claude-flow <ruv@ruv.net>
Browser MCP: ENOENT fallback to npx, --args passthrough with Linux
sandbox auto-detect, hover @eN ref parity with click/fill.
RaBitQ: buildRabitqIndex now reads through bridge (better-sqlite3)
first so it sees WAL data from memory_store. Fixes vectorCount: 0
after store. embeddings_search defaults to namespace 'all'.
Co-Authored-By: claude-flow <ruv@ruv.net>
Plugin entries with undefined tags, keywords, categories, or permissions
arrays caused .some()/.includes()/.filter() to crash with "Cannot read
properties of undefined". Added || [] fallback across all array accesses
in search.ts.
Co-Authored-By: claude-flow <ruv@ruv.net>
- microlora_adapt: zero-pad input to MICROLORA_WASM_MIN_DIM (768) so
smaller inputDim values work without user intervention
- system_info: search both ../.. and ../../.. for package.json to find
the real version from compiled dist/ paths
Co-Authored-By: claude-flow <ruv@ruv.net>
Tier A (6 bugs):
- #1647: trajectory-start now persists pending record to disk; intelligence_stats wrapped in try/catch
- #1646: guidance capability catalog referenced 'memory_import' instead of 'memory_import_claude'
- #1617: getProjectCwd() rejects CLAUDE_FLOW_CWD when set to $HOME or '/'
- #1619: system_health checks for agentdb.sqlite and store.rvf, not just legacy store.json
- #1614: RvfBackend persistToDisk uses write queue instead of silently dropping concurrent writes
- #1610: ControllerRegistry.initialize() now receives vectorBackend: 'auto' config
Tier B (7 issues):
- #1636: worker-dispatch returns honest 'scheduled' status instead of faking completion via setTimeout
- #1637: daemon-state.json uses atomic write (tmp + rename) to prevent corruption from concurrent writes
- #1620: init 'Next steps' uses brand-aware binary name (ruflo vs claude-flow)
- #1635/#1633: Windows tasklist command improved with /NH flag and 3s timeout
- #1631: neural_train response includes platformNote when ONNX embeddings unavailable
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
* fix: resolve Tier A blockers #1596, #1567, #1556#1596 — CLI lazy-command routing:
`ruflo daemon start` was mis-routed to the top-level `start` command
because the parser only registered the 10 core sync commands and its
greedy Pass 1 walk happily matched `start` as the command with `daemon`
left as a positional. Teach the parser about lazy command names via
`registerLazyCommandName()`, stop Pass 1 at the first non-flag
positional, and recognize lazy names in Pass 2 so commandPath becomes
`['daemon', 'start']`. The existing positional-based subcommand
fallback in CLI.run() then dispatches correctly. Affects every
lazy-loaded command (daemon, doctor, embeddings, neural, config,
workflow, hive-mind, ...).
#1567 — agent_spawn Zod field mismatch:
validate-input.ts was passing `{ agentType, name }` to
@claude-flow/security's SpawnAgentSchema, which expects `{ type, id }`,
so every MCP agent_spawn call failed with `type: Required`. Align the
field names. Also swallow `invalid_enum_value` issues because the
schema enumerates only 15 built-in agent types — we support custom
types and the inline identifier validator already gated unsafe input.
#1556 — AutoMemoryBridge destroys hand-curated MEMORY.md:
`curateIndex()` fired on every Stop hook tick and overwrote MEMORY.md
with a single-line title stub whenever none of the files in memoryDir
matched the 7 hardcoded DEFAULT_TOPIC_MAPPING filenames — which is
exactly the situation for any project using Claude Code's native
`<type>_<topic>.md` memory convention. Skip the write entirely when
there are no sections to curate and emit `index:skipped` instead;
`curate` must be non-destructive when there's nothing to curate.
Tests:
- __tests__/parser.test.ts: 4 new cases cover lazy command routing,
bare lazy commands, and global flags before a lazy command.
- __tests__/validate-input-agent-spawn.test.ts: built-in type, custom
type, bad identifier, and no-domain cases.
- src/auto-memory-bridge.test.ts: new #1556 case + updated empty-file
case to assert the new non-destructive semantics.
All 120 CLI + 74 memory tests pass locally.
Co-Authored-By: claude-flow <ruv@ruv.net>
* chore: bump to 3.5.80 / memory 3.0.0-alpha.14 for Tier A fixes
- @claude-flow/cli 3.5.78 → 3.5.80
- @claude-flow/memory 3.0.0-alpha.13 → 3.0.0-alpha.14
- claude-flow umbrella 3.5.78 → 3.5.80
- ruflo umbrella 3.5.78 → 3.5.80
Also fixes memory package's prebuild script to clean
tsconfig.tsbuildinfo so tsc --incremental produces fresh
output after rm -rf dist.
Matches published npm artifacts for issues #1596, #1567, #1556.
Co-Authored-By: claude-flow <ruv@ruv.net>
---------
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
ruvllm's TrainingPipeline.saveCheckpoint() is a no-op that writes nothing to disk.
Added fs.existsSync check after ruvllm call so the JS JSON fallback activates and
writes real checkpoint data (5811 bytes).
Co-Authored-By: claude-flow <ruv@ruv.net>
- neural.ts: quantize now performs actual Float32→Int8 conversion with
scale/offset params, reports measured file size ratio instead of
hardcoded 3.92x
- security.ts: CVE command honestly reports no database configured
instead of returning fabricated vulnerability data; threat modeling
labeled as STRIDE reference template, not analysis output
- agent-tools.ts: agent_spawn returns status 'registered' with note
that actual execution requires Task tool or claude -p
- agent-tools.ts: validates agentType/agentId/domain via new
validate-input.ts before processing
- memory-tools.ts: rejects path traversal and shell metacharacters
in keys and namespaces
- validate-input.ts: new input validation utility for MCP tools with
optional @claude-flow/security Zod schema integration
- package.json: added @claude-flow/security to optionalDependencies
Published as v3.5.69 across @claude-flow/cli, claude-flow, ruflo.
Co-Authored-By: claude-flow <ruv@ruv.net>
- Suppress [AgentDB Patch] console.warn in CLI and MCP entry points
(cosmetic warning from agentic-flow v1.x compat patch, not an error)
- Add export paths: ./dist/*, ./memory, ./intelligence for programmatic
deep imports (fixes ERR_PACKAGE_PATH_NOT_EXPORTED on clean install)
- Fix postinstall to resolve agentdb path correctly for both v2 and v3
- Bump to 3.5.64
Co-Authored-By: claude-flow <ruv@ruv.net>
- session-start hook detects old statusline (Math.floor(sizeKB/2) or
Maturity fallback) and auto-regenerates from current generator
- Statusline header now shows real package version (e.g. "RuFlo v3.5.63")
instead of hardcoded "RuFlo V3" — reads from @claude-flow/cli package.json
- Deployed statusline.cjs updated for this repo
- Older installs auto-fix on next session start via MCP hook
Co-Authored-By: claude-flow <ruv@ruv.net>
- Add agentdb ^3.0.0-alpha.11 as optionalDependency in CLI package
- Was resolving to v2.0.0-alpha.3.4 which has no controllers/index.js
- AgentDB v3 moves controllers to dist/src/controllers/ but agentic-flow
patch expects dist/controllers/ — add postinstall symlink
- 19 controllers now load: HNSWIndex, MemoryController, ContextSynthesizer,
ReflexionMemory, AttentionService, EmbeddingService, etc.
Co-Authored-By: claude-flow <ruv@ruv.net>
v0.1.27-0.1.29 had non-functional wrapper (constructor passed wrong arg,
called non-existent methods) and score inversion (routing always returned
empty results). Pin floor to 0.1.30 to prevent broken versions.
Co-Authored-By: claude-flow <ruv@ruv.net>
Remove Math.random() metrics from 6 locations:
- agent_health: CPU/memory/latency were random — now null with notes
- system_health: all checks were hardcoded "healthy" — now real fs checks
- coordination_metrics: latency/throughput were random — now null with real sync data
- github-tools: all 5 tools fabricated — now return _stub:true, local CRUD only
- process monitor: all metrics random — now real os.loadavg/memoryUsage
- hook-handler route: random latency, hardcoded matches — removed
Fix 6 bugs:
- task-tools path mismatch: agents.json → agents/store.json
- token-optimizer double-increment of editsOptimized
- config get: now reads real configManager instead of hardcoded map
- config providers: now reads/writes real config, mutation flags work
- session restore: now syncs to sql.js database after legacy JSON write
- claims rebalance: now executes moves when dryRun=false
Mark stubs honestly (_stub:true):
- neural compress/optimize
- performance bottleneck/profile/optimize
- hooks metrics/pretrain/intelligence-reset (reset now actually deletes files)
- workflow execute/resume (steps stay pending, not auto-completed)
- hooks session-end summary: reads real counts from stores
- hooks explain: reads real success rate from routing-outcomes.json
- hooks transfer: returns failure instead of demo data when source empty
- status.ts: performance claims → 'not measured'
Co-Authored-By: claude-flow <ruv@ruv.net>
- neural-tools: replace pure-random fallback with zero vector, update comments
- hooks-tools: replace 0.85+random matchScore with real keyword ratio
- benchmarks: replace random confidence with embedding-presence check
- No remaining Math.random() used for confidence/accuracy/metrics anywhere
Co-Authored-By: claude-flow <ruv@ruv.net>
- Add deduplicateById() helper using Map to keep last entry per ID
- Dedup in init() reduces 4482→157 entries (194MB→~79KB graph-state.json)
- Dedup in consolidate() with preDedupCount tracking for write-back
- Apply dedup to both v3 and root intelligence.cjs copies
Co-Authored-By: claude-flow <ruv@ruv.net>
- #1514: Remove fabricated token savings (hardcoded +=100 per cache hit,
baseline=1000). getOptimalConfig() now scales with agentCount.
neural_train stores real embedding patterns via generateEmbedding().
neural_predict uses cosine similarity against stored patterns (no
hardcoded labels). Returns empty array when no patterns exist.
verifySignature() confirmed already real (HMAC + timingSafeEqual).
- #1516: All embedding model defaults prefixed with Xenova/ so
@xenova/transformers resolves correctly. ControllerRegistry now
passes embeddingModel to AgentDB constructor.
- #1521: @claude-flow/memory bumped to 3.0.0-alpha.13, better-sqlite3
moved from optionalDependencies to dependencies.
- #1526: hook-handler normalizes snake_case tool_input/tool_name from
Claude Code. intelligence.cjs scoped to current project only
(was scanning all 51+ project dirs).
- ADR-073: Documents stub tool honesty policy and real predictions.
Closes#1514, #1516, #1521, #1526
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>