Commit Graph
6086 Commits
Author SHA1 Message Date
Reuvenandclaude-flow 911bd4e940 fix: browser ENOENT/args/hover + RaBitQ bridge store alignment (v3.6.6)
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>
2026-04-28 00:33:36 -04:00
Reuvenandclaude-flow 234e3cee10 chore: bump to v3.6.5
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-28 00:24:07 -04:00
Reuvenandclaude-flow ca4d1f0a4d feat: add RaBitQ 1-bit quantized search + fix HNSW/RRF bugs (v3.6.5)
- Integrate @ruvector/rabitq-wasm for 32x vector compression and
  Hamming-scan pre-filtering in the memory search pipeline
- Add 3 MCP tools: embeddings_rabitq_build, _search, _status
- Fix: bridgeStoreEntry now returns rawEmbedding for HNSW sync
- Fix: storeEntry adds to HNSW index after bridge store succeeds
- Fix: bridgeStorePattern adds to HNSW in bridge-fallback path
- Fix: RRF scoring uses pure BM25 when row has no embedding
  (prevents 0.3x crush of keyword scores below threshold)
- Fix: pattern-store recognizes bridge-fallback for hnswIndexed

Closes #1659

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-28 00:22:17 -04:00
Reuvenandclaude-flow bd280a79b8 refine: expand ruflo-goals agents with full methodology and MCP tool guidance
- goal-planner: GOAP algorithm, OODA loop, 3 execution modes, planning
  principles, MCP tool references for persistence and learning
- deep-researcher: 7-step methodology, evidence grading rubric, research
  principles, memory namespace conventions
- horizon-tracker: session check-in/check-out protocol, 5 drift detection
  categories, milestone lifecycle, memory persistence patterns

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-28 00:03:36 -04:00
Reuvenandclaude-flow c091ea6284 fix: add $ARGUMENTS to goals command for Claude Code plugin convention
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-28 00:01:47 -04:00
Reuvenandclaude-flow 63bf7f2882 chore: bump to v3.6.4
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:53:58 -04:00
Reuvenandclaude-flow 851f3ed4ce feat: add ruflo-goals plugin — GOAP planning, deep research, horizon tracking
4 skills: deep-research, goal-plan, horizon-track, research-synthesize
3 agents: goal-planner, deep-researcher, horizon-tracker
1 command: /goals

Wires memory, task, workflow, neural, agentdb, and intelligence MCP
tools for long-horizon research and adaptive replanning.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:52:25 -04:00
Reuvenandclaude-flow 23090ddbee fix: transfer_plugin-search null guard on tags/keywords/categories (v3.6.3)
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>
2026-04-27 23:48:57 -04:00
Reuvenandclaude-flow 0ced9bf85f fix: remove invalid skills/commands/agents arrays from plugin creator template
The create-plugin skill was instructing agents to generate plugin.json
with skills, commands, and agents arrays — these fields cause
claude plugin validate to fail. Claude Code auto-discovers them.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:46:03 -04:00
Reuvenandclaude-flow 01c764f6fb fix: microlora adapt auto-pads to 768-dim, system_info reads real version (v3.6.2)
- 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>
2026-04-27 23:45:10 -04:00
Reuvenandclaude-flow 39c3ffe962 fix: 6 MCP tool validation bugs — git refs, npm names, WASM serialization (v3.6.1)
- analyze_diff: allow ~, ^, / in git refs via new validateGitRef()
- transfer_plugin-info: allow @ in npm-scoped names via new validatePackageName()
- agentdb_batch: guard null embedder with actionable error message
- ruvllm_hnsw_route: serialize WASM objects to plain {name, score, metadata}
- ruvllm_microlora_adapt: catch 768-dim mismatch with helpful error
- agentdb_batch: clarify entries go to episodes table, not memory_search
- ADR-092 documents all fixes

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:39:56 -04:00
rUv 146ea66c55 Merge pull request #1658 from ruvnet/feat/claude-plugin-marketplace
feat: 19 Claude Code native plugins — 64 skills, 25 commands, 21 agents
2026-04-27 23:16:43 -04:00
Reuvenandclaude-flow 0c4dd5c946 refine: style Why Ruflo section as blockquote
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:12:09 -04:00
Reuvenandclaude-flow 70a54a7c57 refine: update README intro with Ruflo origin story and architecture framing
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:11:06 -04:00
Reuvenandclaude-flow 81418649c6 feat: add 19 Claude Code native plugins with 64 skills, 25 commands, 21 agents
Complete plugin marketplace for Ruflo with validated Claude Code plugin format:

- ruflo-core: MCP server, status, doctor, plugin discovery
- ruflo-swarm: swarm coordination, Monitor, worktree isolation
- ruflo-autopilot: autonomous /loop completion with learning
- ruflo-intelligence: SONA neural patterns, trajectory learning, routing
- ruflo-agentdb: AgentDB controllers, HNSW vector search, RuVector
- ruflo-aidefence: AI safety scanning, PII detection, prompt defense
- ruflo-browser: Playwright browser automation, testing, scraping
- ruflo-jujutsu: git diff analysis, risk scoring, reviewer recs
- ruflo-wasm: sandboxed WASM agents and gallery sharing
- ruflo-workflows: workflow templates, orchestration, lifecycle
- ruflo-daa: Dynamic Agentic Architecture, cognitive patterns
- ruflo-ruvllm: local LLM inference, MicroLoRA, SONA, chat format
- ruflo-rvf: RVF portable memory, session persistence, transfer
- ruflo-loop-workers: background /loop workers, CronCreate
- ruflo-security-audit: CVE scanning, dependency checks
- ruflo-rag-memory: simple store/search/recall interface
- ruflo-testgen: test gap detection, TDD workflow
- ruflo-docs: doc generation, drift detection
- ruflo-plugin-creator: scaffold, validate, publish new plugins

All 19 pass `claude plugin validate`. Skills auto-discovered from
directory structure (not declared in plugin.json). Each skill wires
to ruflo MCP tools via allowed-tools frontmatter.

Includes: marketplace.json, GitHub Pages storefront, CI validation
workflow, minimalist README with USERGUIDE split.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 23:07:33 -04:00
rUvandReuven 8824fe3c49 fix: Tier A+B blockers — 13 issues across CLI, memory, hooks, daemon (v3.5.82) (#1655)
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>
2026-04-27 18:05:33 -04:00
Reuvenandclaude-flow 2980d2bc0d chore: bump to v3.5.81
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 17:52:35 -04:00
rUv ceacbe72bd Merge pull request #1654 from ruvnet/fix/cli-hang-cluster
fix: CLI hang cluster + session crashes (v3.5.81)
2026-04-27 17:50:55 -04:00
Reuvenandclaude-flow f43d5dca3c fix: CLI hang cluster + session crashes (#1653, #1641, #1634, #1629, #1628, #1626)
Root cause: ruflo wrapper missing process.exit(0) after cli.run() resolves.
HNSW VectorDb, sql.js WASM, and ONNX worker threads keep the Node event
loop alive after command handlers return. bin/cli.js had the fix since
v3.5.76 but ruflo/bin/ruflo.js only had .catch(), no .then().

Fixes:
- ruflo wrapper: add process.exit(0) in .then() callback (#1641, #1653, #1629)
- session save: TypeError on result.stats.agentCount — MCP returns
  stats.agents not stats.agentCount (#1634)
- session list: Invalid Date — MCP returns savedAt not updatedAt;
  formatDate now guards empty/invalid input (#1626)
- session current/export: same stats property name mismatch
- memory_search threshold: || → ?? so threshold=0 works (#1628)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 17:49:35 -04:00
rUvandReuven 01070ede81 fix: Tier A blockers #1596, #1567, #1556 (v3.5.80) (#1598)
* 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>
v3.5.80
2026-04-11 12:20:01 -04:00
rUvandReuven b395d12559 feat: ADR-088 LongMemEval benchmark harness for AgentDB (#1566)
Full benchmark implementation to evaluate AgentDB memory system against
the LongMemEval standard (ICLR 2025, 500 questions, 6 categories).

Includes:
- ADR-088 with competitive landscape analysis (MemPalace 96.6%,
  OMEGA 95.4%, Observational Memory 94.87%)
- Benchmark harness with 4 modes: raw, hybrid, full, baseline
- AgentDB adapter (HNSW + ONNX) and baseline adapter (cosine)
- Dataset download scripts (HuggingFace)
- Per-category scoring, latency percentiles, storage metrics
- Honesty protocol: no test-set tuning, full category breakdown

Motivated by MemPalace's claimed "perfect score" — we need a real
apples-to-apples comparison to establish AgentDB's position.

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-04-08 09:59:57 -05:00
Reuvenandclaude-flow eb4f251b6b fix: eliminate 17 remaining bare require() calls in ESM modules (v3.5.78)
Replace runtime require() with ESM imports across 6 files:
- diff-classifier.ts: child_process, util → top-level imports
- coverage-router.ts: fs, path, fs/promises → top-level imports
- performance-tools.ts: unlinkSync, readdirSync → extend existing import
- mcp-server.ts: execFileSync, readFileSync, http → use existing imports
- update/checker.ts: require.resolve → createRequire pattern
- security.ts: execSync → top-level import

Same bug class as #1559 — bare require() crashes in ESM packages.

Co-Authored-By: claude-flow <ruv@ruv.net>
v3.5.78
2026-04-08 10:31:52 -04:00
Reuvenandclaude-flow 0d248b3a54 chore: merge remote main + bump to v3.5.77
Merge PR #1564 fixes (ESM require, cleanup, CLI hang, daemon zombies)
with local commits (ruvllm backends, saveCheckpoint fix).
Bump all packages to 3.5.77 for publish.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-08 10:19:08 -04:00
rUvandReuven 718a92a79a fix: ESM require crashes, cleanup data loss, CLI hang, daemon zombies (v3.5.76) (#1564)
* feat: native ruvllm + graph-node intelligence backends (ADR-086, ADR-087)

Wire @ruvector/ruvllm as intelligence coordinator (SonaCoordinator,
ContrastiveTrainer, TrainingPipeline) and @ruvector/graph-node as
native graph database for agent relationships and causal edges.

- Fix ESM/CJS import: use createRequire pattern for CJS packages
- Eager loading of all backends during initialization
- Wire into neural status, hooks_intelligence, ruvllm_status CLI/MCP
- Auto-trigger background learning on trajectory-end
- Auto-save LoRA checkpoints after neural train
- Graph-node records agents on spawn, causal edges, swarm teams
- Fix community issues #1511, #1509, #1507, #1506, #1505
- Real Product Quantization with k-means trained codebooks
- SONA native routing with 5-tier fallback
- Embedding fallback transparency warnings
- Plugin peer dep fixes (semver ranges, removed phantom deps)

32 test files, 1762 tests passing, 0 regressions.

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

* chore: release v3.5.74

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

* fix: saveCheckpoint verifies file existence, falls through to JS fallback (v3.5.75)

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>

* fix: ESM require crashes, cleanup data loss, CLI hang, daemon zombies, memory CWD (#1559, #1557, #1552, #1551, #1562)

- Replace bare require() with ESM imports in autopilot-state.ts,
  commands/autopilot.ts, commands/claims.ts — fixes ReferenceError on
  clean install (#1559, #1560, #1561, #1563)
- Cleanup command no longer deletes entire .claude/ directory — only
  removes ruflo-owned paths (.claude/helpers/, .claude-flow/, .swarm/,
  etc.) and surgically strips hooks/claudeFlow from settings.json,
  preserving Claude Code's agents, skills, settings.local.json (#1557)
- Add process.exit(0) after cli.run() resolves — prevents one-shot
  commands from hanging due to open DB connections/timers (#1552)
- Daemon start kills stale daemon processes not tracked by PID file,
  daemon stop also cleans up zombies via ps lookup (#1551)
- Auto-memory bridge respects CLAUDE_FLOW_CWD env var for MCP/Claude
  Desktop environments (#1562)

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

---------

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-04-08 10:15:55 -04:00
Reuvenandclaude-flow bf23566f00 fix: saveCheckpoint verifies file existence, falls through to JS fallback (v3.5.75)
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>
2026-04-08 09:06:13 -04:00
Reuvenandclaude-flow 854e807cd5 chore: release v3.5.74
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-08 09:06:13 -04:00
Reuvenandclaude-flow 7eb505d22f feat: native ruvllm + graph-node intelligence backends (ADR-086, ADR-087)
Wire @ruvector/ruvllm as intelligence coordinator (SonaCoordinator,
ContrastiveTrainer, TrainingPipeline) and @ruvector/graph-node as
native graph database for agent relationships and causal edges.

- Fix ESM/CJS import: use createRequire pattern for CJS packages
- Eager loading of all backends during initialization
- Wire into neural status, hooks_intelligence, ruvllm_status CLI/MCP
- Auto-trigger background learning on trajectory-end
- Auto-save LoRA checkpoints after neural train
- Graph-node records agents on spawn, causal edges, swarm teams
- Fix community issues #1511, #1509, #1507, #1506, #1505
- Real Product Quantization with k-means trained codebooks
- SONA native routing with 5-tier fallback
- Embedding fallback transparency warnings
- Plugin peer dep fixes (semver ranges, removed phantom deps)

32 test files, 1762 tests passing, 0 regressions.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-08 09:06:13 -04:00
Dragan Spiridonovandclaude-flow e50df67226 fix: critical security & performance fixes across 6 packages (#1558)
* fix: critical security & performance fixes across 6 packages

Addresses 11 vulnerabilities from security audit + 5 additional issues
found during devil's advocate review, plus test suite fixes across
memory, security, and swarm packages.

## Security Fixes (Critical)

- CRIT-01: SQL injection in embeddings search — replaced string
  interpolation with parameterized queries (db.prepare/bind)
- CRIT-02: Command injection in 4 files — replaced execSync template
  literals with execFileSync + input validation regex:
  - ruvector/import.ts (docker container name)
  - init.ts (embedding model name, 2 locations)
  - agent-browser-adapter.ts (CLI args)
- CRIT-03: Browser eval hardening — 12 dangerous patterns blocked,
  configurable 20KB length limit via CLAUDE_FLOW_MAX_EVAL_SCRIPT_LENGTH

## Security Fixes (High)

- HIGH-01: ESLint rules restricting child_process imports (both
  import and require) with overrides for safe-executor/daemon/mcp-server
- HIGH-02: Hive-mind truthiness fix (=== true vs !== false)
- HIGH-03: Prototype pollution prevention — safeJsonParse with JSON
  reviver stripping __proto__/constructor/prototype in 3 memory backends
- HIGH-04: Plugin sandbox warning on unsandboxed plugin load
- HIGH-05: HNSW hash collision fix — dual-hash (djb2+sdbm) producing
  53-bit values with bidirectional map and linear probing

## Security Fixes (DA Review)

- DA-CRIT-1: Local json-security.ts to avoid cross-package imports
- DA-CRIT-2: PostgreSQL schema name validation (validateSchemaName)
  added to all 6 ruvector commands via pg-utils.ts
- DA-CRIT-3: PID injection prevention in mcp-server — /proc read +
  execFileSync replacing execSync with PID interpolation
- DA-HIGH-3: Timestamp validation (validateTimestamp) in ruvector import
- DA-HIGH-4: 4 additional browser eval bypass patterns (globalThis,
  .constructor, Reflect, eval())
- DA-HIGH-5: ESLint no-restricted-modules for require() coverage

## Performance Fixes

- PERF-01: BoundedSet<T> for gossip seenMessages — Map-based LRU
  eviction capped at 100K entries, prevents unbounded memory growth
- PERF-02: Bulk operations use Promise.allSettled with batch size 50,
  logging partial failures instead of aborting
- PERF-03: CLI lazy loading — reduced sync imports from 37 to 10
  core commands, async getCommandsByCategory() for help display

## Test Suite Fixes

- Fixed 11 broken import paths in security tests (../../security/ →
  ../src/ and ../../helpers/ → ../helpers/)
- Added vitest.config.ts for security package (was inheriting root
  config with missing setup.ts reference)
- Added allowedDirectories to SecurityConfig test fixture
- Fixed sanitizePath test expectation (leading slash removal)
- Fixed hardcoded /workspaces/claude-flow path in memory tests
- Fixed semanticRouter controller test (auto-enables with agentdb)
- Fixed database-provider count test (namespace-scoped assertion)
- Fixed swarm latency tests (toBeGreaterThanOrEqual for sub-ms mocks)
- Added TypeScript as dev dependency for build verification

## Verification

- 22 automated security verification tests in
  security-verification.test.ts covering all 10 user-facing scenarios
- All 5 packages type-check clean (0 errors)
- memory: 9/9 suites, 353/353 tests pass
- swarm: 4/4 suites, 172/172 tests pass
- security: 13/13 suites, 444/444 tests pass
- CLI help displays all 35 commands correctly with lazy loading

## New Files

- v3/@claude-flow/cli/src/commands/ruvector/pg-utils.ts
- v3/@claude-flow/cli/.eslintrc.json
- v3/@claude-flow/cli/__tests__/security-verification.test.ts
- v3/@claude-flow/memory/src/json-security.ts
- v3/@claude-flow/security/vitest.config.ts

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

* fix: address Sherlock review findings for PR #1558

Finding 2 (MUST FIX): Add formatEmbedding array-element validation
- Validate each embedding value is typeof number && Number.isFinite()
- Prevents SQL injection via crafted JSON arrays with string payloads
- Throws descriptive error with index for debugging

Finding 1: Reclassify CRIT-03 eval blocklist as defense-in-depth
- Add comment clarifying pattern blocklist is best-effort, not a sandbox
- Primary defense is the browser sandbox itself
- Update test description to reflect defense-in-depth classification

Finding 3: Add behavioral tests alongside source-guards
- Add formatEmbedding behavioral test with hostile inputs (NaN, Infinity, strings)
- Add CRIT-02 behavioral test verifying execFileSync array argument pattern
- Categorize existing tests as source-guard vs behavioral in comments

Finding 4: Flag HIGH-02 as behavior change
- Add comment explaining === true vs !== false semantic difference
- Documents that undefined/null no longer treated as "skip permissions"

Finding 6: Export BoundedSet, fix test semantics
- Export BoundedSet from gossip.ts for reuse
- Fix test to use FIFO semantics matching production (not LRU)
- Add FIFO-specific test: re-adding doesn't refresh position

Finding 7: Fix BoundedSet comment math
- Remove speculative throughput time estimate
- Use factual memory calculation: 100K × ~40B IDs ≈ 4MB

Finding 5: No change (false positive — Math.abs in manhattanDistance is correct)

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

---------

Co-authored-by: claude-flow <ruv@ruv.net>
2026-04-08 09:05:59 -04:00
rUvandReuven 398f7c2dcc fix: eliminate 9 remaining stubs — real scanning, metrics, health checks (v3.5.72)
- Swarm status: real metrics from state files (elapsed time, avg response, coordination counts)
- Security threats: real STRIDE-mapped file scanning (eval, exec, credentials, http, auth patterns)
- Security secrets: real regex-based scanning with masking (AWS, GitHub, JWT, private keys, etc.)
- Hooks attention: ONNX embedding cascade replaces Math.sin hash, removes fabricated speedup claims
- Neural tools: 4-tier embedding cascade (agentic-flow → ONNX → mock-fallback), provider visible in responses
- Performance benchmarks: honest _dataSource:'synthetic' labels, actual timing still measured
- System health: real disk check (statfsSync) and network check (DNS lookup with timeout)
- Plugin ratings: transparent 'cached — cloud unavailable' label on fallback
- Swarm execute: clarified 3 execution paths (Agent tool, claude -p, hive-mind)

All tests pass: 28/28 files, 1725/1725 tests, 0 TypeScript errors.

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-04-07 09:53:36 -04:00
rUvandReuven a101c2a086 fix: comprehensive #1425 remediation — validation, type safety, honest metrics (v3.5.71)
- Expand input validation from 7/28 to 27/28 MCP tool files (~120+ handlers)
- Eliminate 19 `any` types in v3 commands (2 justified remain in neural.ts)
- Wire providers list/test to real config + HTTP API calls
- Remove fabricated Token Optimizer metrics (+= 200, 352x, 32%, 95% claims)
- Add intelligence layer content-based dedup in load/store/compaction
- Fix vitest config: externalize optional deps (agentic-flow, agentdb)
- Fix test assertions for GitHub tools handler return shapes
- Rebuild integration dist to purge stale claims from compiled output
- ADR-085: documents all 7 remediation items and decisions

Closes #1425

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-04-07 09:43:29 -04:00
Reuvenandclaude-flow dc2abef2a5 fix: address critical #1425 issues — real quantize, honest stubs, input validation
- 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>
2026-04-07 08:36:22 -04:00
Reuvenandclaude-flow de2eab7788 feat: update CLAUDE.md generator with verified capabilities
- Fix agent count: "60+ Types" → "16 Roles + Custom"
- Fix intelligence: remove inflated SONA/HNSW/Flash claims, use honest descriptions
- Add Memory & Vector Search section with MCP tools table (memory_import_claude,
  memory_search_unified, memory_bridge_status)
- Add Key MCP Tools section with ToolSearch discovery guide
- Add Swarm Capabilities: topologies, consensus (3 real), hive-mind, 12 workers
- Add Memory Capabilities: ONNX 384d, DiskANN, sql.js, Claude bridge, unified search
- Add Claude Code ↔ AgentDB Bridge documentation
- Performance section: remove "150x-12,500x" → "HNSW-indexed/DiskANN"
- Standard template: 247 lines (up from 189) with all new sections

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 22:34:01 -04:00
rUv 17e9c0e6bd feat: DiskANN vector search backend with benchmark (ADR-077)
feat: DiskANN vector search backend with benchmark (ADR-077)
2026-04-06 22:18:06 -04:00
Reuvenandclaude-flow d851822226 feat: DiskANN vector search backend with benchmark (ADR-077)
Add @ruvector/diskann as optional vector search backend with
automatic fallback: DiskANN → HNSW → Cosine-JS.

Benchmark results (1K vectors, 384d, k=10):
- DiskANN: 6,048 QPS, 1.000 recall, 0.57ms insert
- HNSW: 7,850 QPS, 0.12 recall, 4,662ms insert
- Cosine-JS: 1,548 QPS, 1.000 recall, 0.89ms insert

DiskANN insert is 8,000x faster than HNSW with perfect recall.
At 5K vectors: 2,501 QPS, 0.874 recall.

Includes: unified search API, auto-selection, benchmark utility,
disk persistence via save/load, product quantization support.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 22:16:47 -04:00
Reuvenandclaude-flow 155b4172d5 fix: bump @ruvector/attention to ^0.1.32, verify MicroLoRA pipeline
- Contrastive loss (InfoNCE): WORKS — 5.6004 loss on test data
- AdamW optimizer step: WORKS — weights updated correctly
- Gradient computation: WORKS — finite difference, norm=39.94
- Full training pipeline verified end-to-end
- stepInPlace pending platform binary rebuild, step() works as fallback
- CLAUDE.md updated with memory bridge MCP tools and accurate stats

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 22:06:29 -04:00
Reuvenandclaude-flow 5b3169171a docs: update CLAUDE.md with memory bridge MCP tools and accurate stats
- Add Claude Code ↔ AgentDB Memory Bridge section with 3 MCP tools:
  memory_import_claude, memory_bridge_status, memory_search_unified
- Update header: 314 MCP tools, 16 agent roles, 19 AgentDB controllers
- Update package versions to 3.5.65
- Document auto-import on session start, unified search, intelligence pipeline

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 21:50:38 -04:00
rUv e9031d622a feat: Phase 2 MCP tools for Claude Code ↔ AgentDB bridge (ADR-076)
feat: bridge Claude Code auto-memory to AgentDB vector search (ADR-076)
2026-04-06 21:41:03 -04:00
Reuvenandclaude-flow 223d6c7327 feat: Phase 2 MCP tools for Claude Code ↔ AgentDB bridge (ADR-076)
3 new MCP tools bridging Claude Code auto-memory to AgentDB:

- memory_import_claude: Import Claude memories with ONNX 384-dim
  embeddings. allProjects=true imports from ALL projects.
  Verified: 4 files, 3 projects, 5 entries vectorized.

- memory_bridge_status: Shows bridge health — Claude files (4),
  AgentDB entries (12), SONA state, connection status.

- memory_search_unified: Semantic search across all namespaces
  (claude-memories, auto-memory, patterns, tasks, feedback).
  Verified: "npm publish" → 0.699, "security" → 0.435.

Also includes Phase 1 helper hook improvements from earlier commit.
Bump to v3.5.65.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 21:40:54 -04:00
Reuvenandclaude-flow 6ed14d6a74 docs: update ADR-076 — Phase 2 MCP tools, Phase 3 MicroLoRA
- Phase 1 (implemented): helper hook bridge with import/import-all/sync
- Phase 2 (proposed): MCP tools (memory_import_claude, memory_import_all,
  memory_bridge_status, memory_bridge_sync, memory_search_unified)
  + CLI commands (ruflo memory import-claude/bridge-status/bridge-sync)
- Phase 3 (future): MicroLoRA embedding adaptation for Claude Code
  domain vocabulary (blocked by @ruvector/learning-wasm WASM binding issues)
- Documents why MCP > helpers: accessible mid-session, discoverable,
  testable, composable, no file path dependencies

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 21:35:27 -04:00
Reuvenandclaude-flow a1df9dd7f1 feat: bridge Claude Code auto-memory to AgentDB vector search (ADR-076)
SessionStart hook now vectorizes imported memory entries into sql.js
with ONNX 384-dim embeddings. Claude Code's MEMORY.md files become
searchable via semantic vector similarity in AgentDB.

New features:
- import: stores auto-memory entries into AgentDB with embeddings
- import-all: imports ALL Claude memories across ALL projects
  (4 files, 5 entries from 3 projects vectorized and verified)
- sync: flushes SONA/ReasoningBank patterns to disk on session end
- status: shows AgentDB, SONA, patterns, trajectories

Verified: "security vulnerability" → security_analysis (0.435),
"npm publish" → publish workflow (0.624), "ruvector" → ruvector (0.678)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 21:33:22 -04:00
Reuvenandclaude-flow d5d5dfba87 fix: worker-detect crash on missing prompt parameter
detectWorkerTriggers() crashed with 'Cannot read properties of
undefined (reading slice)' when called without text. Added null
guard at function entry.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 21:12:57 -04:00
rUv 845acf82bb fix: README honesty audit — remove fabricated metrics, fix inflated claims
fix: README honesty audit — remove fabricated metrics, fix inflated claims
2026-04-06 18:42:32 -04:00
Reuvenandclaude-flow 5f965c04e2 fix: regenerate package-lock.json for @ruvector/router ^0.1.30
CI failed with EUSAGE: lockfile had router@0.1.28 but package.json
wants ^0.1.30. Regenerated with npm install --package-lock-only.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 18:39:37 -04:00
Reuvenandclaude-flow ff3228613a fix: README honesty audit — remove fabricated metrics, fix inflated claims
3-agent swarm audit of 7,541-line README. Changes:

Removed fabricated claims:
- "90.5% accuracy across 40 patterns, 110,600+ examples" → "40 rule-based patterns"
- "100% routing accuracy" → "Q-learning with epsilon-greedy exploration"
- "100+ specialized agents" → "16 specialized agent roles + custom types"

Fixed inflated numbers:
- "150x-12,500x faster" → "HNSW-indexed" (theoretical ceiling, not measured)
- "2.49x-7.47x Flash Attention speedup" → "optimized attention (WASM when available)"
- "352x faster Agent Booster" → "instant (regex-based, no LLM call)"
- "75x faster ONNX" → "faster with ONNX runtime"
- "128x LoRA compression" → "low-rank adaptation"
- "30-50% token reduction" → "reduces usage via caching and smart routing"
- "85% cost savings" → "cost-optimized routing"
- "6 providers" → "5 providers (Anthropic, OpenAI, Google, Cohere, Ollama)"
- "5 consensus" → "3 consensus (Raft, Byzantine, Gossip)" + CRDT marked planned
- "<0.05ms SONA" → "sub-millisecond pattern matching"
- "Self-Optimizing Neural Architecture" → "Self-Optimizing Pattern Learning"
- "Production-ready" → removed from headline
- "2.5x Claude Max extension" → "smart model selection"
- "87% auto conflict resolution" → "AI-assisted"

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 18:38:08 -04:00
Reuvenandclaude-flow 2d3ca5e429 fix: suppress AgentDB Patch warning, add deep export paths
- 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>
2026-04-06 18:24:26 -04:00
Reuvenandclaude-flow a0ef36cbbd fix: auto-regenerate statusline on older installs, show real version
- 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>
2026-04-06 18:16:03 -04:00
rUv f6ab545901 feat: wire self-learning pipeline end-to-end (ADR-075)
feat: wire self-learning pipeline end-to-end (ADR-075)
2026-04-06 18:08:36 -04:00
Reuvenandclaude-flow 656d404b21 feat: wire self-learning pipeline end-to-end (ADR-075)
- recordTrajectory now auto-generates ONNX embeddings per step
- Successful trajectory steps stored as patterns in ReasoningBank
- session-start hook initializes SONA + ReasoningBank automatically
- post-task hook records trajectory with verdict for RL reward
- Memory bridge wires intelligence module as learning backend
  (bypasses AgentDB constructor requirements for better-sqlite3 db)
- Added patternsLearned, signalsProcessed to IntelligenceStats
- Verified: 3 trajectories → 9 patterns, semantic search works
  ("auth" → JWT 0.584, "security" → SQL injection 0.661)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 18:05:15 -04:00
Reuvenandclaude-flow 774dbc3fd6 fix: patch deployed statusline.cjs — remove all fake heuristics
Patches the already-generated statusline.cjs so existing users of this
repo get real data immediately without needing to re-run ruflo init:

- patterns: real entry count from stores, not fileSize/2KB
- intelligence: 0% when no real data, not "does src/ exist? +15%"
- DDD domains: requires 100 real patterns per domain
- AgentDB stats: reads from both auto-memory-store and hooks store

New users get this automatically via the updated generator (3.5.61).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 17:49:04 -04:00
Reuvenandclaude-flow 2169563164 fix: auto-populate AgentDB stats from hook activity
- session-start hook now writes session entry to auto-memory-store.json
- post-task hook now writes task outcome to auto-memory-store.json
- statusline getAgentDBStats reads from both auto-memory-store.json AND
  hooks memory store (.claude-flow/memory/store.json)
- Vectors/Size in statusline will auto-populate as hooks fire
- Removed fake previousSession fallback values (was 3/15 hardcoded)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-06 17:43:47 -04:00