mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
4e6822fa8dcd1c8d237a8a227d08ce0df80c65ac
429
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3c4638bb91 |
chore(release): 3.7.0-alpha.29 — ships #1945 + #1946 + #1951 critical fixes
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> |
||
|
|
4d6e47d8ad |
chore(release): 3.7.0-alpha.28 — ships #1947 + #1944 + #1943 critical fixes
Bumps @claude-flow/cli, claude-flow, and ruflo to 3.7.0-alpha.28. Critical fixes in this release: - #1947 / #1942 / #1952 — vector_indexes schema dim 768→384 (the default `Xenova/all-MiniLM-L6-v2` model produces 384-dim vectors; the old 768 literal silently broke every `memory_store --vector` insert, so `memory_search` always returned 0 on a fresh install). Merged via #1956. - #1944 — `helpers/hook-handler.cjs` fell back to the `toolInput` *object* instead of `toolInput.command` (string), tripping `.toLowerCase()` on every Bash tool call from Claude Code. Merged via #1957. - #1943 — `settings-generator.ts` anchored hook command paths at `${CLAUDE_PROJECT_DIR}` only, breaking global-install layouts where helpers live at `$HOME/.claude/helpers/` (every Bash/Edit/Session hook fired MODULE_NOT_FOUND). Fix: POSIX `sh` probe tries project-local first, falls back to `$HOME`. Windows: `cmd /c IF EXIST … ELSE …`. Merged via #1957. CI guards added with each fix: - scripts/audit-vector-dim.mjs — catches any `vector_indexes` row whose dim isn't 384 (wired into the existing `witness-verify` gate). - scripts/audit-hook-handler-prompt.mjs — catches the `|| toolInput` (object) regression (wired into `hook-command-audit`). Published to npm with all dist-tags updated: - @claude-flow/cli 3.7.0-alpha.28 (alpha, latest, v3alpha) - claude-flow 3.7.0-alpha.28 (alpha, latest, v3alpha) - ruflo 3.7.0-alpha.28 (alpha, latest) Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
cffa557449 |
chore(release): 3.7.0-alpha.27 — ships managed_agent_* (ADR-115) + ruflo-wasm→ruflo-agent (#1934)
Bumps @claude-flow/cli, claude-flow, ruflo to 3.7.0-alpha.27. Published to npm (alpha/latest/v3alpha updated for all three) so `npx ruflo@latest mcp start` exposes the 6 managed_agent_* tools — without this they were on main but not in any published package, so the /ruflo-agent:managed-agent skill couldn't find them. Validated: `npx ruflo@3.7.0-alpha.27 mcp tools` lists all 6 managed_agent_* (Enabled); `managed_agent_list` with no key returns the graceful "use wasm_agent_create" error. Witness manifest regenerated (all 3 per-OS manifests synced, pass=113/0). What ships since alpha.26: #1928 (ruflo-cost-tracker Windows path), #1929 (ruflo-wasm→ruflo-agent rename + managed_agent_* cloud runtime + ADR-115), #1932 (README plugin links), #1933 (ruflo-agent README). Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
31f22ff9a9 |
fix(#1916): register agent_logs + hive worker resolution + all 20 dangling CLI↔MCP tools — published 3.7.0-alpha.26 (#1924)
* fix(#1916): register agent_logs MCP tool + resolve hive-spawned workers `ruflo agent logs <id>` called `callMCPTool('agent_logs', …)` against a tool that was never registered → `MCP tool not found: agent_logs`. Registered it in agent-tools.ts. Today it returns the agent's createdAt + lastResult as synthetic entries (per-agent activity logging lands with hive worker execution wiring — #1916 items 3/4, a tracked follow-up) with the documented shape `{ agentId, entries: [{timestamp,level,message,context?}], total }`. Also: `hive-mind_spawn` writes workers to `.claude-flow/agents.json`, a different file from the canonical `.claude-flow/agents/store.json` that agent_status/agent_list/agent_logs read — so `agent status <hive-worker-id>` returned `not_found`. Added `loadAllAgents()` (canonical store ∪ hive store, canonical wins on collision) and routed those three tools through it. NOT in this PR: the task-execution dispatch (#1916 items 3/4 — `task_assign` transitions state but doesn't run a worker; hive metrics stay 0). That needs a design decision (which executor) and is a separate change. CI guard: scripts/audit-cli-mcp-tools.mjs — scans every `callMCPTool('<name>')` in src/commands/*.ts and fails if `<name>` isn't registered in src/mcp-tools/*.ts (the `MCP tool not found` class). Monotone-decreasing baseline at verification/cli-mcp-tool-baseline.json — surfaces 20 *other* CLI subcommands with the same dangling-tool bug (`memory export`, `task retry`, `workflow validate`, `session export`, …; agent_logs is now fixed and not in the list). Wired into v3-ci.yml `tool-descriptions-audit` job (already in witness-verify needs[]). Behavioral guard: __tests__/agent-logs-hive-resolution.test.ts. Witness markers for #1916 + #1916-guard. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(#1916): register the 16 missing CLI↔MCP tools — cli-mcp-tool-baseline → 0 The #1916-guard (scripts/audit-cli-mcp-tools.mjs) surfaced 20 `ruflo <cmd>` subcommands that callMCPTool() a tool that was never registered (would die with `MCP tool not found`). Cleared all of them: - Renamed the coverage tools `hooks/coverage-{route,suggest,gaps}` → `hooks_coverage-{route,suggest,gaps}` (the handlers already existed; the slash names just didn't match the CLI's underscore calls). - Pointed `ruflo swarm stop` / `ruflo stop` at the existing `swarm_shutdown` tool instead of a non-existent `swarm_stop`. - Registered 16 new MCP tools (each with ADR-112 "use when … is wrong" guidance): task_retry, workflow_stop, workflow_validate, session_current, session_export, session_import, memory_detailed-stats, memory_cleanup, memory_compress, memory_export, memory_import, hive-mind_optimize-memory, hooks_teammate-idle, hooks_task-completed, mcp_start, mcp_stop Real where the operation maps cleanly to an existing store/backend (task_retry clones into a fresh pending task; memory_export/import dump & re-store entries; memory_cleanup prunes expired TTLs dry-run-by-default; workflow_validate structurally checks a JSON workflow; session_export/import round-trip the session record; memory_detailed-stats reshapes memory_stats). Honest no-ops with the correct return shape + a `note` where the underlying capability genuinely isn't wired yet (memory_compress — sql.js has no on-disk compression; hive-mind_optimize-memory — structural compaction only, pattern-quality consolidation is the intelligence pipeline's job; hooks_* team hooks — auto-assignment/pattern-learning delegated; mcp_start/stop — the MCP toolset runs in-process, there's no separate server to start/stop). cli-mcp-tool-baseline.json is now 0. tool-descriptions-audit still passes (all 16 new tools carry guidance, ≥80 chars, unique). Full cli test suite green (48 files / 1977 tests). Witness #1916-cli-tools marker added → ruflo verify 107 verified, 0 regressed. mcp-tools-deep.test.ts exception list updated for mcp_start/mcp_stop. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(#1916): register coverageRouterTools + harden the CLI↔MCP audit; bump 3.7.0-alpha.26 Validating the alpha.25 publish caught a gap: `ruflo hooks coverage-route` (and -suggest / -gaps) still failed with `Tool not found: hooks_coverage-route`. Root cause: the coverage tools were defined in ruvector/coverage-tools.ts but their array was never imported into mcp-client.ts's TOOL_REGISTRY — renaming the slash→underscore name didn't help because the file wasn't registered at all. - mcp-client.ts: import + `...coverageRouterTools` in registerTools([…]). - coverage-tools.ts: category 'coverage' → 'hooks' (matches the hooks_* names). - scripts/audit-cli-mcp-tools.mjs: now derives the "registered" set from what mcp-client.ts ACTUALLY spreads into registerTools([…]) (resolving each `...xTools` to its `import { xTools } from '<path>'` and scanning that file), instead of "any src file with a name: definition". So an unregistered tool-source file now correctly produces a dangling-reference flag — this is exactly the gap that let hooks_coverage-* slip through. Version bumped to 3.7.0-alpha.26 (alpha.25 shipped the still-broken coverage tools). Witness manifest regenerated. cli-mcp-tool-baseline.json still 0; audit + mcp-tools-deep + mcp-client tests green. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
3c447854d0 |
chore(release): 3.7.0-alpha.24 — ships #1906 agent_execute model-alias fix
All 3 packages on alpha+latest+v3alpha = 3.7.0-alpha.24: @claude-flow/cli@3.7.0-alpha.24 claude-flow@3.7.0-alpha.24 ruflo@3.7.0-alpha.24 Ships #1906 (merged #1908) — agent_execute model aliases now map to current Claude 4.x ids (claude-haiku-4-5-20251001 / claude-sonnet-4-6 / claude-opus-4-7) instead of the deprecated claude-3-*-latest that the Anthropic API 404s. Two CI guards added (unit test + witness marker). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
5b36fe531e |
chore(release): 3.7.0-alpha.23 — ships #1863 task-status crash fix + #1899 hooks rename
All 3 packages on alpha+latest+v3alpha atomically: @claude-flow/cli@3.7.0-alpha.23 claude-flow@3.7.0-alpha.23 ruflo@3.7.0-alpha.23 Includes: - #1863 — guard undefined arrays in `task status` (no more TypeError) - #1863 — new cli-no-crash CI smoke (task create→status + list formatters) - #1899 — ruflo-core hooks call `npx ruflo@alpha` not `npx claude-flow@alpha` (in-tree; marketplace republish of ruflo-core@0.2.2 still pending) Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
7415f83ad7 |
chore(release): 3.7.0-alpha.22 — ADR-112 tool discoverability + #1889 paired-tool round-trip + #1892 statusline
Published with all 3 packages on alpha+latest+v3alpha atomically: @claude-flow/cli@3.7.0-alpha.22 claude-flow@3.7.0-alpha.22 ruflo@3.7.0-alpha.22 Ships #1897 — see release notes for the user-facing overview. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
c08ac22517 |
chore(release): 3.7.0-alpha.21 — ships #1883 + #1884 fixes
Packages bumped + published with all dist-tags updated: - @claude-flow/cli@3.7.0-alpha.21 (alpha + latest + v3alpha) - claude-flow@3.7.0-alpha.21 (alpha + latest + v3alpha) - ruflo@3.7.0-alpha.21 (alpha + latest + v3alpha) Includes: - #1883 — memory_import_claude WSL path resolution (multi-candidate hash + projectPath override input) - #1884 — memory_import_claude key sanitization (write-side sanitizeMemoryKey shares regex source with read-side validator) - new memory-import-smoke CI job + 12 regression checks - witness markers #1883, #1884 (99/99 fixes verified) Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
19a569b1a7 |
feat(federation): ADR-097 phases 2.a/2.b/3-up/4 + ADR-104 transport (#1876)
* feat(federation): ADR-097 Phase 2.a — peer state machine entity layer FederationNode entity gains a state field (ACTIVE/SUSPENDED/EVICTED) plus suspend()/evict()/reactivate() methods. All transitions flow through a canTransition() table in the new federation-node-state.ts value object — self-loops are rejected (so a duplicate suspend can't reset the auto-eviction grace timer), EVICTED is terminal under breaker flow, operator reactivate is the only escape. Also ships pure helpers isCooldownElapsed + shouldAutoEvict so the Phase 2.b breaker service (separate file, deferred) can drive transitions deterministically without owning the clock. 27 new tests pin: legal/illegal edges, no-op invariant on duplicate suspend, EVICTED terminality, props round-trip preservation, cooldown boundaries, auto-evict grace > cooldown. Phase 2.b (breaker service wiring cost-tracker → suspend; outbound short-circuit on !isActive) and Phase 4 (federation_breaker_status MCP + doctor surface) remain deferred per ADR-097 status table. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(federation): ADR-097 Phase 2.b — breaker service + outbound short-circuit Two-layer breaker shipping the active-defense half of the circuit breaker: 1. **evaluatePolicy** (pure) — given rolling samples + node + policy + now, returns SUSPEND/EVICT/REACTIVATE_ELIGIBLE/NONE. Cost-takes-priority over failure-ratio when both trip (cost is the harder-to-fake signal). Auto-evict supersedes reactivate-eligible from SUSPENDED. 2. **FederationBreakerService** — owns per-peer rolling buffer (bounded, default 100k samples), wraps evaluatePolicy with entity mutation, exposes recordOutcome/evaluate/tick/snapshot/forget. Crucially does NOT auto-reactivate — the breaker only signals eligibility; the integrator's health probe owns the reactivate() call. This avoids the "false-positive recovery" failure mode where a peer flaps SUSPENDED↔ ACTIVE on transient telemetry. Coordinator wiring: sendMessage now short-circuits on !peer.isActive BEFORE session lookup, with PEER_SUSPENDED / PEER_EVICTED constant-string errors (no remaining-budget echo per the Phase 1 anti-oracle posture). Security invariants pinned by 25 new tests: - Negative tokens/usd clamped to 0 (no credit-inflation attack) - Failure ratio gated on minSamples=10 (anti-noise) - Strict > on threshold comparisons (boundary correctness) - EVICTED peers always return NONE (terminal under breaker flow) - apply=false dry-run preserves entity state Phase 4 (federation_breaker_status MCP + ruflo doctor surface) is now unblocked: snapshot() + node.stateRecord give it everything it needs. Phase 3 upstream (federation_spend bus emission) remains separate work — when it lands, the bus subscriber calls recordOutcome() and the in-memory buffer becomes a transparent cache. No breaker code changes. Witness manifest: 87 fixes (was 85), Phase2b + Phase2b-coordinator markers signed. Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): @claude-flow/plugin-agent-federation@1.0.0-alpha.6 Ships ADR-097 Phase 2.a (peer state machine) + Phase 2.b (breaker service + outbound short-circuit). Published to npm dist-tag alpha; latest is held at alpha.5 until the breaker bakes for one /loop cycle. Verified: tarball contains dist/application/federation-breaker-service.js, dist/domain/value-objects/federation-node-state.js, and PEER_EVICTED short-circuit in dist/application/federation-coordinator.js. All three witness markers present in the published artifact. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(federation): ADR-097 Phase 4 — operator surface (3 MCP tools + doctor) Closes the loop on the breaker so operators can see and operate it: **3 new MCP tools** (mcp-tools.ts): - federation_breaker_status — per-peer state snapshot + bucket counts; optional nodeId filter - federation_evict — operator-initiated MANUAL_EVICT with audit log + session-termination side effect; idempotent (already-evicted returns false but still emits audit for operator visibility) - federation_reactivate — escape hatch from SUSPENDED (after probe) or EVICTED (operator override) **Coordinator additions** (federation-coordinator.ts): - getPeerStates() — projects stateRecord over discovery.listPeers() - getPeerStateCounts() — O(peers) bucket count for status lines - evictPeer() / reactivatePeer() — async wrappers that audit-log every outcome (applied:true/false in metadata) **Doctor health-check** (cli/doctor.ts): - checkFederationBreaker — probes plugin loadability + asserts FederationNodeState export presence (catches version-skew where users have a pre-Phase-2 plugin installed). Optional plugin → "not installed" is a pass, not a fail. Selectable as `--component federation`. **Plugin index exports** — FederationNodeState + breaker primitives so external integrators (and the doctor probe) can detect Phase 2/4 support. 11 new coordinator tests pin: bucket-count math, audit emission on both success/no-op evict paths, EVICTED → ACTIVE operator override, unknown-peer no-op (no audit silence). 60 plugin-level tests updated to assert the 12-tool count. Witness markers added: ADR-097-Phase4-mcp + ADR-097-Phase4-doctor. 89 signed fixes in the manifest (was 87). Published @claude-flow/plugin-agent-federation@1.0.0-alpha.7 to npm alpha tag. Tarball validated: all 7 markers (Phase 2.a + 2.b + 4) present in dist/. ADR-097 status: Phases 1, 2.a, 2.b, 3-consumer, and 4 all Implemented. Only Phase 3 upstream (federation_spend bus emission) remains deferred — when it lands, the breaker's in-memory rolling buffer becomes a transparent cache with zero breaker code changes. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(federation): ADR-097 Phase 3 upstream — closes ADR-097 100% The last remaining "Deferred" entry from ADR-097's status table. With this, the breaker has end-to-end telemetry: integrators call coordinator.reportSpend() after each downstream agent completes, and the event fans out to TWO subscribers in parallel: 1. SpendReporter — pushes to whatever durable backend the integrator wires (cost-tracker memory namespace, Datadog, accounting DB). The event shape matches the cost-tracker consumer in plugins/ruflo-cost-tracker/scripts/federation.mjs verbatim: { peerId, taskId, tokensUsed, usdSpent, ts, success } 2. FederationBreakerService.recordOutcome — feeds the breaker's in-memory rolling buffer so cost/failure-ratio thresholds fire correctly. Without this fan-out, integrators would have to wire two parallel pipelines for the same telemetry. Both integrations are constructor-optional. A coordinator with neither still accepts reportSpend() calls (silent no-op) so callers don't branch on configuration. **New files:** - application/spend-reporter.ts — SpendReporter interface, FederationSpendEvent type, InMemorySpendReporter reference impl - __tests__/unit/coordinator-spend-reporting.test.ts — 10 tests pinning fan-out, contract shape, ts auto-fill, throw-bubble **New MCP tool:** federation_report_spend (13 tools total) **Coordinator constructor:** added optional 9th arg `integrations: { spendReporter?, breakerService? }` — backward-compat since omission preserves the existing 8-arg shape. **Anti-coupling design:** federation doesn't own model pricing; the caller owns it. reportSpend() is an explicit POST-completion call, not auto-emitted from federation_send. Future enhancement could auto-emit a "predicted cost" placeholder, but deferred until a concrete request justifies the additional state. **Witness:** 90 signed fixes (was 89). Phase 3 upstream marker added. **Published:** @claude-flow/plugin-agent-federation@1.0.0-alpha.8 to npm alpha tag. Tarball validated — all 8 markers (Phase 2.a + 2.b + 3-upstream + 4) present. ADR-097 status: ALL FIVE PHASES IMPLEMENTED (1, 2.a, 2.b, 3-consumer + 3-upstream, 4). Future work is integrator-side (production SpendReporter adapter that persists to ruflo memory; auto-emit predicted-cost placeholder). Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): umbrella alpha.20 — ships ADR-097 Phase 4 doctor surface Bumps + publishes the 3-package umbrella chain: - @claude-flow/cli@3.7.0-alpha.20 - claude-flow@3.7.0-alpha.20 - ruflo@3.7.0-alpha.20 All three on alpha + latest + v3alpha tags per CLAUDE.md publishing rules. Static check confirms `checkFederationBreaker` ships in the published @claude-flow/cli@alpha dist (3 occurrences in package/dist/src/commands/doctor.js). Now visible to users: - `npx ruflo@latest doctor --component federation` reports plugin loadability + version-skew detection (catches users running an older pre-Phase-2 federation plugin against the new MCP tools) Federation plugin already at @claude-flow/plugin-agent-federation @1.0.0-alpha.8 (published earlier this session) — installs via `npm install @claude-flow/plugin-agent-federation@alpha`. Witness manifest re-signed with new release versions; 90 fixes still verified. No new fix entries since this is a release-only bump (the underlying code already shipped in the prior 3 commits today). Co-Authored-By: RuFlo <ruv@ruv.net> * docs(adr): ADR-104 — federation wire transport (agentic-flow loader, WS today, QUIC roadmap) Documents the transport selection for ADR-097 federation. Smoke test mac↔ruvultra over tailscale revealed agentic-flow's published QUIC is API-only — loadWasmModule returns {}, encode/decode are placeholders, crates/agentic-flow-quic/src/wasm.rs explicitly notes the WASM build is a stub since browsers can't do raw UDP. Decision: adopt the loadQuicTransport() loader pattern with WebSocket fallback. Same AgentTransport interface today (WS) and tomorrow (native QUIC when it lands — set AGENTIC_FLOW_QUIC_NATIVE=1). Federation code stays transport-agnostic. Validated: real mac→ruvultra:9101 over tailscale, 125ms send latency (real I/O, not the prior 0ms stub). Upstream contribution: - ruvnet/agentic-flow#153 — adds quic-loader.ts to the published inner package, with WebSocketServer-backed real fallback - Patched build published as agentic-flow@2.0.12-fix.1 (`fix` dist-tag) so federation can consume the working transport without waiting for upstream merge 12h verification routine updated with Check 8 (ADR-104 transport smoke): - Pulls agentic-flow@fix - Stands up real WebSocketServer + client send round-trip on localhost - Asserts real send latency (>0, <5000ms) — catches if a future regression re-introduces the no-op stub behavior - SEVERITY:HIGH if stub regression detected Re-open this ADR when: - ruvnet/agentic-flow ships native QUIC binding - Federation traffic exceeds ~100 RPS to any single peer - Federation peers cross outside tailnet boundary - We have measured WS-vs-QUIC switch data Co-Authored-By: RuFlo <ruv@ruv.net> * feat(federation): wire ADR-104 transport — real mac↔ruvultra peering ADR-104 documented the design (agentic-flow loader pattern, WebSocket fallback today, native QUIC roadmap). This commit wires it into the plugin so federation_send actually moves bytes on the wire. Changes to src/plugin.ts: - New dep: agentic-flow@2.0.12-fix.2 (PR ruvnet/agentic-flow#153 patched build that fixes the published QUIC stub) - initialize() loads transport via loadQuicTransport(), registers it as federation:transport service - If config.port is set, transport.listen(port, host='0.0.0.0') binds an inbound listener (peers that only initiate outbound leave port unset) - sendToNode callback now resolves peer.endpoint via discovery.getPeer, strips the protocol prefix (ws://, tailscale://), and calls transport.send(address, AgentMessage{id, type, payload, metadata}) - shutdown() closes the transport (terminates outbound + inbound clients, awaits server close cb) - Graceful degrade: if transport load fails, plugin logs a warn and continues with the legacy in-process noop (preserves backward compat for tests/sandboxes without ws available) Validated end-to-end on real hardware: ruvultra (linux/x64): plugin booted, listening on 0.0.0.0:9101 mac (darwin/arm64): plugin booted, sent envelope in 150ms over tailscale Witness manifest: 91 fixes (was 90), ADR-104-transport marker added. Service-count assertion bumped 7 → 8 (added federation:transport). All 450 federation tests still pass (transport load is async + safe in the mocked test PluginContext). Published: @claude-flow/plugin-agent-federation@1.0.0-alpha.9 to npm alpha tag. Tarball validated: dist/plugin.js contains 'loadQuicTransport' + 'agentic-flow/transport/loader' import + 'federation:transport' service registration + dep agentic-flow@2.0.12-fix.2. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(deps): regenerate pnpm-lock — was out of sync since alpha.9 (agentic-flow dep adds) * chore: bump agentic-flow dep to 2.0.12-fix.8 to match lockfile (CI fix) --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
a075c59fc2 |
chore: bump versions for #1874 publish chain
@claude-flow/mcp 3.0.0-alpha.8 → 3.0.0-alpha.9 @claude-flow/shared 3.0.0-alpha.7 → 3.0.0-alpha.8 @claude-flow/cli 3.7.0-alpha.18 → 3.7.0-alpha.19 claude-flow 3.7.0-alpha.18 → 3.7.0-alpha.19 ruflo 3.7.0-alpha.18 → 3.7.0-alpha.19 All published to npm with latest/alpha/v3alpha tags synced. Validated end-to-end: fresh `npm install ruflo@latest --omit=optional` resolves to a build where: - @claude-flow/mcp/dist/server.js emits protocolVersion = '2025-11-25' - @claude-flow/shared/dist/mcp/server.js emits protocolVersion = '2024-11-05' - @claude-flow/cli/bin/cli.js respects explicit -t http (#1874 follow-up that was uncovered while smoke-testing the protocol fix) Closes the publish chain for #1874. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
8709c8dd5b |
docs: ADR-102 + bump packages to 3.7.0-alpha.18 (published)
ADR-102 documents the #1859/#1862 root causes (plugin flag drift, CLI parser ambiguity, multi-line Bash mangling), the smoke-harness + flag-priority decisions, and the residual risk perimeter (other plugins, non-bash shells). Anchors the published versions: @claude-flow/cli 3.7.0-alpha.17 → 3.7.0-alpha.18 claude-flow 3.7.0-alpha.17 → 3.7.0-alpha.18 ruflo 3.7.0-alpha.17 → 3.7.0-alpha.18 Refs #1859 #1862 Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
66f7f644d8 |
fix(3.7.0-alpha.17): #1565 supervisor, #1856 mid-flight detector, #1857 Windows tasklist
Closes #1565, #1856, #1857. #1856 — services/worker-daemon.ts: detect workers that were mid-flight at the previous lifetime's crash and count them as failures so the run-counter math stays consistent. Adds `lastStartedAt` to WorkerState, records it in `executeWorker()` before running anything (with an immediate saveState so it survives crashes), restores it on init, and scans for `lastStartedAt > lastRun` in a new `detectMidFlightFailures()` called from `start()` after the orphan reaper. Each detected mid-flight worker bumps `failureCount` and gets an INFO log line; workers retry naturally at their next scheduled interval (no immediate re-run, which would just hammer the same code path that just killed the daemon). #1857 — commands/daemon.ts: split `killStaleDaemons` into a Windows path that uses `tasklist /v /fo csv /nh` + `taskkill /pid <n> /t`, and a POSIX path that keeps the existing `ps -eo pid,command` / process.kill behavior. Same defensive shape: any tooling failure swallowed silently so cleanup doesn't break daemon start. CSV parse splits on `","` after stripping outer quotes — robust against spaces in command lines. NOT runtime-tested on Windows by the maintainer (Mac dev environment); please report regressions. #1565 — commands/daemon.ts: ship `daemon install-supervisor` and `daemon uninstall-supervisor` subcommands. Writes a launchd plist on macOS (`~/Library/LaunchAgents/io.ruv.ruflo.daemon.plist`) with KeepAlive on Crashed=true, ThrottleInterval=10s, RunAtLoad=true — daemon survives crashes AND reboot. On Linux writes a systemd-user unit (`~/.config/systemd/user/ruflo-daemon.service`) with Restart=on-failure, RestartSec=10, StartLimitBurst=5. Both paths log the unit file location and offer a `--dry-run` to preview without writing. `--no-load` skips the immediate launchctl/systemctl enable. Windows scheduled-task installer deferred (errors with a link back to #1565). Validation: - Test suite: 1963 pass / 0 fail / 46 skipped — no regressions - Live #1856: pre-seeded daemon-state.json with audit lastStartedAt > lastRun → after start(), audit.failureCount went 0 → 1 ✓ - Live #1565: `daemon install-supervisor --dry-run` outputs the correct plist with absolute node + cli.js paths, KeepAlive on Crashed, log file paths under .claude-flow/logs/ ✓ - Live #1857: dist contains `killStaleDaemonsWindows`, `tasklist`, `taskkill` references; POSIX path unchanged ✓ - Lifecycle regression: daemon start → status (RUNNING) → stop → status (STOPPED) works on the published distro ✓ Published @claude-flow/cli@3.7.0-alpha.17, claude-flow@3.7.0-alpha.17, ruflo@3.7.0-alpha.17 with all dist-tags. Pre-publish + post-publish validation both green. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
f46e52f41e |
fix(3.7.0-alpha.16): daemon crash recovery (#1855)
Closes #1855. Two recovery gaps that allowed hard failures to leave the system in an inconsistent state are now fixed: Gap 1 — uncaughtException / unhandledRejection handlers: services/worker-daemon.ts now installs `installCrashHandlers()` from the constructor. On uncaught exception or unhandled rejection: 1. Append a structured record to .claude-flow/logs/crash.log (kind, timestamp, pid, message, stack) 2. Synchronously remove daemon.pid and save state via saveState() 3. Snapshot active child PIDs so the next lifetime can reap them 4. process.exit(1) so the failure is visible to supervisors/shells Without these, a thrown error from any timer callback or worker logic path silently crashed the daemon — PID file leaked, no diagnostic trail, operator had no idea why the daemon stopped. Gap 2 — orphan headless worker child reaping: services/headless-worker-executor.ts gains `getActiveChildPids()` returning the PIDs of currently-running children. worker-daemon.ts now writes `.claude-flow/daemon-children.json` on every execution:start/:complete/:error transition with the active PID list. At the top of `start()`, the new lifetime calls `reapOrphanedChildren()`: reads the children file, SIGTERMs any PID still alive that doesn't belong to the current daemon, then truncates the file. Self-PID is always skipped. The daemon log records the reap count. Previously, hard crashes (SIGKILL/OOM/segfault) left `claude --print` children running until their own per-worker timeout (5-15 min), holding API credits + memory. They're now reaped within ~1s of the next `daemon start`. Validation against published @claude-flow/cli@3.7.0-alpha.16: - Test 1: Pre-seeded daemon-children.json with orphan PID; daemon startup reaps the orphan and clears the file. PASS. - Test 2: Daemon throws via setImmediate; crash.log written, daemon.pid cleaned, daemon-state.json preserved. PASS. - Lifecycle regression: daemon start → status (RUNNING) → stop → status (STOPPED) still works; no "already running" line in log. - Test suite: 1963 pass / 0 fail / 46 skipped — no regressions. Out of scope for this issue (would land separately): - Full supervisor / auto-restart (launchd/systemd installer — that's #1565) - `ruflo daemon status --crashes` reader for crash.log - Windows ps replacement for killStaleDaemons (already noted in #1766) Published @claude-flow/cli@3.7.0-alpha.16, claude-flow@3.7.0-alpha.16, ruflo@3.7.0-alpha.16 with all dist-tags. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
d88c69dde9 |
fix(3.7.0-alpha.15): #1852 Windows shell-injection, #1853 daemon self-kill, #1854 memory path
Closes #1852, #1853, #1854. #1852 — services/headless-worker-executor.ts: pipe prompt via stdin instead of as a positional CLI arg. Previously `spawn('claude', ['--print', prompt])` on Windows routed through `cmd.exe /d /s /c` (because `claude` resolves to `claude.cmd`, which Node refuses to exec directly post-CVE-2024-27980). cmd.exe re-tokenized the entire command line including the prompt — any `>` `<` `&` `|` in source-code prompts became shell redirects, creating zero-byte files in cwd named after the next token (e.g. `controller.abort()`, `{const`, `0`, `HTTP`). Fix: `spawn('claude', ['--print'])` with stdio: pipe, then `child.stdin.end(prompt)` to write+close atomically. Stdin bypasses cmd.exe entirely. The end() call still produces EOF so `claude --print` doesn't block (the original concern in #1395 that drove the previous `stdio: ['ignore', ...]` choice). Reporter (@hassamtc) provided exact diff. #1853 — services/worker-daemon.ts: `checkExistingDaemon()` now ignores PID files containing the calling process's own PID. The detached-spawn path in commands/daemon.ts writes the child's PID as a fallback after 500ms; on Node 25 / macOS 26 the child reaches `start()` slower than that 500ms window and reads its own PID back, concluding "another daemon is already running" and exiting before scheduling workers. A daemon process is never "another instance" of itself; treat self-match as absence so start() proceeds normally. #1854 — memory/memory-initializer.ts: introduce `getMemoryRoot()` helper with documented precedence (env → config → default), and route every hardcoded `path.join(process.cwd(), '.swarm')` and `path.resolve( process.cwd(), '.swarm')` site (12+ in this file) through it. The three documented entry points — `CLAUDE_FLOW_MEMORY_PATH` env, `memory.persistPath` / `memory.path` in claude-flow.config.json, and the cwd default — now actually take effect instead of silently no-op'ing. Cached per-process; `_resetMemoryRootCache()` exported for the runtime configure flow + tests. Verification: - 1963 tests pass / 0 fail / 46 skipped - Build clean (tsc) - Live #1852 probe: dist now shows `spawn('claude', ['--print'], ...)` — no prompt as arg, stdio pipe. - Live #1853 probe: `checkExistingDaemon` has the self-PID skip in dist. - Live #1854 probe: default → cwd/.swarm CLAUDE_FLOW_MEMORY_PATH=/tmp/probe-mem → /tmp/probe-mem ✓ Published @claude-flow/cli@3.7.0-alpha.15, claude-flow@3.7.0-alpha.15, ruflo@3.7.0-alpha.15 with all dist-tags. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
2804d85f17 |
fix(3.7.0-alpha.14): auto-compact statusline on narrow terminals
Closes #1153. `ruflo hooks statusline` outputs 5+ lines of full-width formatted content by default. On narrow terminals (≤80 cols, common in tmux splits and side-by-side layouts) the lines wrap awkwardly and consume 6-7 lines of vertical space. Fix: `commands/hooks.ts` statusline now reads `process.stdout.columns` and auto-collapses to the existing single-line `compact` format when the terminal is narrower than 100 cols. New `--full` flag overrides this auto-detection for users who prefer the multi-line output even on narrow terms. `--compact` and `--json` continue to work as explicit overrides; default behavior on wide terminals is unchanged. Verification (this repo, both modes): COLUMNS=80 statusline (no flag) → "DDD:3/5 CVE:0/3 Swarm:1/15 Ctx:50% Int:10%" COLUMNS=80 statusline --full → 5-line multi-line output preserved COLUMNS=200 statusline (no flag) → 5-line multi-line (auto-detected wide) Build clean. Published @claude-flow/cli@3.7.0-alpha.14, claude-flow@3.7.0-alpha.14, ruflo@3.7.0-alpha.14 with all dist-tags. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
c67fa393de |
fix(3.7.0-alpha.13): persist headless results + ab-test guard
Closes #1793, #1652. #1793 — services/worker-daemon.ts: headless worker runs now persist their parsedOutput / output to the same metrics files the local fallback workers write to (.claude-flow/metrics/<name>.json). Previously the AI-mode branch returned the result and exited, leaving rich findings trapped in `.claude-flow/logs/headless/*_result.log` and invisible to `npx ruflo memory stats` and downstream consumers. Mapping mirrors the *Local methods: audit→security-audit.json, optimize→performance.json, testgaps→test-gaps.json, document→documentation.json, etc. Persisted record schema: { timestamp, mode:'headless', workerType, model, durationMs, tokensUsed, executionId, success, findings (= parsedOutput), rawOutputPreview (first 2KB), rawOutputLength }. Persistence is wrapped in try/catch so a write failure logs a warning but doesn't break the worker. #1652 — @claude-flow/guidance/src/analyzer.ts: abBenchmark now throws an actionable error when the provided executor is not content-aware instead of silently producing a guaranteed zero-delta verdict that costs ~$23 per run. The DefaultHeadlessExecutor IS content-aware as of @claude-flow/guidance@3.0.0-alpha.2 (it has `setContext` and physically swaps CLAUDE.md with backup/restore), so the guard only fires for caller-injected bare IHeadlessExecutor implementations. Verification: - @claude-flow/cli: 1963 tests pass / 0 fail / 46 skipped - @claude-flow/guidance: 1331 tests pass / 0 fail - Builds clean for both packages Published @claude-flow/cli@3.7.0-alpha.13, claude-flow@3.7.0-alpha.13, ruflo@3.7.0-alpha.13, and @claude-flow/guidance@3.0.0-alpha.3 with all dist-tags. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
1884ed1010 |
fix(3.7.0-alpha.12): batch resolve issue-fix loop #1839-#1847
Closes #1839, #1840, #1841, #1842, #1843, #1844, #1845, #1846, #1847.
#1839 — bin/cli.js, bin/mcp-server.js, config-adapter.ts: rename
serverInfo.name 'claude-flow' → 'ruflo' so MCP wire identity matches the
package name. Live probe of `ruflo mcp start` now returns
`serverInfo.name="ruflo"` (verified post-build).
#1840 — init/executor.ts: detectExistingRufloMCP() now also walks
parsed.projects[*].mcpServers.ruflo with normalized path matching
(lowercase + forward-slash) so `claude mcp add ruflo` registrations
stored project-scoped in ~/.claude.json are detected and init skips
writing a duplicate .mcp.json.
#1841 — init/mcp-generator.ts: generated .mcp.json now keys
`mcpServers.ruflo` instead of legacy `mcpServers['claude-flow']`. The
printed `claude mcp add` instructions match. Prevents the
duplicate-tool-prefix problem when init runs over an existing ruflo
registration.
#1842 — commands/doctor.ts: checkMcpServers() now traverses
~/.claude.json.projects[*].mcpServers in addition to top-level
mcpServers, so doctor stops warning "No MCP config found" when a
working project-scoped ruflo registration exists.
#1843 — mcp-tools/system-tools.ts: exclude `unknown` from health
denominator (was dragging the score down even when actionable checks
were green) and surface as `advisory` count. Add YAML config and
sql.js/HNSW/.swarm/ruvector memory paths to detection. Local probe:
4 healthy / 5 actionable = 80% (was 4/8 = 50%) with 3 advisory.
#1844 — services/worker-daemon.ts: WorkerDaemon now reads
.claude-flow/config.yaml (and .yml) when config.json is absent, with
lazy `yaml` import so missing dep falls back to a clear warning.
Adds yaml@^2.8.0 to runtime deps. Logs the chosen source.
#1845 — services/worker-daemon.ts + mcp-tools/hooks-tools.ts: durable
queue boundary between MCP dispatch and daemon. mcp__hooks_worker-
dispatch now writes .claude-flow/daemon-queue/<id>.json (the
process-local Map was invisible to the daemon). The daemon polls this
directory every 5s, executes triggerWorker(), and moves processed
entries to .processed/. Adds `mcp-only` status for queue-write
failures so we never claim `queued` without proof on disk.
#1846 — mcp-tools/memory-tools.ts + commands/memory.ts: feature-detect
smartSearch on the resolved @claude-flow/memory build. When absent
(older published memory packages predate the export), fall through to
plain semantic search with an explicit warning + `smartFallback`
field on the response, instead of throwing
`smartSearch is not a function`.
#1847 — mcp-tools/hooks-tools.ts: hooks_pretrain now emits an explicit
note when a non-empty corpus produces zero patterns, naming the
supported extraction extensions (.ts/.js/.py/.go/.rs/.java) and
clarifying that pretrain is a separate axis from live trajectories
and statusline state. Local probe on a Markdown vault returns the
new note correctly.
src/index.ts: pre-existing TS strict-null error in showCommandHelp()
that was preventing `npm run build` (introduced by #1791.4 /
|
||
|
|
addb5cd3f3 |
fix(release): hotfix 3.7.0-alpha.11 — strip workspace: protocol leak (#1825) (#1827)
`@claude-flow/cli@3.7.0-alpha.10` shipped with `"@claude-flow/memory": "workspace:3.0.0-alpha.14"` in optionalDependencies. The `workspace:` protocol is pnpm-internal and breaks every `npm install` with `EUNSUPPORTEDPROTOCOL` before any packages download. Cause: an earlier `pnpm install` rewrote that entry to `workspace:` form, and `npm publish` shipped it as-is (npm doesn't strip workspace: refs the way pnpm publish does). Fix: - Replace `"workspace:3.0.0-alpha.14"` with `"^3.0.0-alpha.14"` - Bump to alpha.11 in cli, umbrella, ruflo - Validated end-to-end: `npm install ruflo@latest` exits 0; bin runs Closes #1825. |
||
|
|
d027af098e |
chore(release): 3.7.0-alpha.10 — 21 fixes from issue-fix loop (#1823)
Bumps version pins and ruflo's @claude-flow/cli dependency. The published artifacts (claude-flow@3.7.0-alpha.10, @claude-flow/cli@3.7.0-alpha.10, ruflo@3.7.0-alpha.10, @claude-flow/security@3.0.0-alpha.7) include all 21 PRs merged today: #1800 #1801 #1802 #1803 #1804 #1805 #1806 #1808 #1809 #1811 #1812 #1813 #1814 #1815 #1816 #1817 #1818 #1819 #1820 #1821 #1822. Closes #1463 #1574 #1608 #1609 #1622 #1651 #1670 #1686 #1779 #1780 #1791 #1798 #1799 #1807 #1810 #1795 #1790. |
||
|
|
8221903b02 |
fix(release): add missing cli runtime deps to umbrella package.json (closes #1795) (#1797)
* fix(release): add missing cli runtime deps to umbrella package.json The published `claude-flow` umbrella tarball bundles `v3/@claude-flow/cli/dist/**` and ships it as the runtime CLI, but the umbrella's `dependencies` only declared `semver` and `zod`. This caused a fatal `ERR_MODULE_NOT_FOUND` on first run for users who installed via `npx claude-flow@latest`: Cannot find package '@claude-flow/cli-core' imported from .../v3/@claude-flow/cli/dist/src/output.js Add the required runtime deps that the bundled cli dist imports (mirrored from `v3/@claude-flow/cli/package.json`): - @claude-flow/cli-core ^3.7.0-alpha.5 - @claude-flow/mcp ^3.0.0-alpha.8 - @claude-flow/neural ^3.0.0-alpha.8 - @claude-flow/shared ^3.0.0-alpha.7 - @noble/ed25519 ^2.1.0 - @ruvector/rabitq-wasm ^0.1.0 Bump umbrella version 3.7.0-alpha.8 -> 3.7.0-alpha.9. Verified locally on Windows: npx claude-flow@latest --version and --help both run cleanly with no module-resolution errors. Co-Authored-By: RuFlo <ruv@ruv.net> * chore(lockfile): regenerate package-lock for added cli runtime deps Adds entries for the six runtime deps introduced in the previous commit so `npm ci` no longer fails with EUSAGE in CI. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
f1a82d9ee3 |
chore(release): 3.7.0-alpha.8 — agentdb delete tools (#1784/#1789)
Bumps three packages to 3.7.0-alpha.8 to ship the agentdb delete bridge wired through agentdb@3.0.0-alpha.13 native APIs: - bridgeDeleteHierarchical -> ReflexionMemory.deleteEpisode - bridgeDeleteCausalEdge -> GraphDatabaseAdapter.deleteEdgesByEndpoints - bridgeDeleteCausalNode -> GraphDatabaseAdapter.deleteNode (cascade) Plus 3 new MCP tools (agentdb_hierarchical-delete / causal-edge-delete / causal-node-delete) wired through. Closes #1784. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
10cf962e4c |
feat(neural): substrate upgrades 1-6 + SEO keywords (#1773) (#1776)
* feat(neural): persistence + seedable PRNG + round-trip tests (#1773 items 1, 3, 6)
Three of the six "what is missing from @claude-flow/neural" items, in
the smallest cohesive unit:
Item 3 (RNG): src/utils/rng.ts — Mulberry32 PRNG, RNG interface,
setGlobalRng/random/randomInt/randomNormal injection points. Math.random
callers can be migrated incrementally; the package default stays
non-deterministic via MathRandomRng for backward compatibility.
Item 1 (persistence): SONAManager, ReasoningBank, PatternLearner each
gain serialize() and deserialize() methods. Float32Array embeddings,
Map<string,X>, and nested structures encode losslessly via
src/utils/serialize.ts (deepEncode/deepDecode). schemaVersion guards
forward-compatibility. Event listeners are NOT persisted (re-register
manually after restore); AgentDB connection is NOT persisted (call
initialize() to re-acquire).
Item 6 (round-trip tests): __tests__/persistence.test.ts — 15 tests
covering Mulberry32 determinism, RNG injection contract, encode/decode
helpers, and serialize/deserialize round-trip for ReasoningBank +
PatternLearner. SONAManager round-trip test deferred — a pre-existing
load-order bug in src/modes/balanced.ts (extends BaseModeImplementation
with undefined parent) blocks instantiating SONAManager from a fresh
vitest context. The serialize/deserialize methods on SONAManager
themselves are correct (build clean) and run fine in production.
Also: removed stale src/*.js and src/*.d.ts files committed from a
prior build (April 6). They were shadowing the .ts source under vitest
(`a.serialize is not a function`) and only the dist/ outputs are
canonical.
Validation:
- npm run build clean (tsc, no errors)
- 121 tests pass: 15 new persistence + 44 algorithms + 39 patterns + 23 sona
- Direct node import of dist/reasoning-bank.js confirms .serialize/.deserialize
are present on the instance
Items 2 (HNSW), 4 (move flash-attention/moe-router from cli), and 5
(self-consistency orchestrator) remain — landing in subsequent fires.
Refs #1773.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(neural): selfConsistency(N) orchestrator (#1773 item 5)
Wang et al. 2022 self-consistency primitive — runs an arbitrary stochastic
operation N times and aggregates. On reasoning benchmarks the technique
typically buys 5-15pp accuracy at the cost of Nx compute. The packages
RL algorithms, pattern matching, and routing all sample randomly and
benefit from variance reduction without retraining.
src/utils/self-consistency.ts: selfConsistency(operation, {N, aggregator}).
Three aggregators:
- majority: pick the most common output (JSON-canonical grouping)
- mean: numeric average with stddev-based agreement
- first: take sample[0]; useful for tests / deterministic ops
Pairs with #1773 item 3 (Mulberry32 seedable PRNG): set the global RNG
before a self-consistency run and the result is reproducible across
machines.
Tests: 9 cases in __tests__/self-consistency.test.ts.
- Deterministic op -> agreement = 1
- Bimodal noise + seeded RNG -> majority picks the more common branch
- Mean aggregator on numeric samples + non-number rejection
- first aggregator
- N <= 0 / non-integer rejection
- Reproducible across runs with same seed
- Object grouping by canonical JSON
- Config preserved on result
Validation: all 130 neural tests pass (added 9 self-consistency).
Build clean.
Items remaining for #1773 substrate work:
- Item 2: ReasoningBank HNSW (brute-force -> AgentDB-backed retrieval)
- Item 4: Move flash-attention.ts + moe-router.ts from cli into package
Refs #1773.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(neural): retrieval-path observability for HNSW vs brute-force (#1773 item 2)
The README claims AgentDB HNSW gives 150x retrieval speedup, but neither
ReasoningBank nor PatternLearner exposes which path is actually firing.
Result: callers cant tell if theyre silently getting O(n) brute-force
when AgentDB failed to load.
Fix: expose retrieval-path counters in getStats().
ReasoningBank.getStats() now reports:
- hnswRetrievalCount: number of retrieves that took the HNSW path
- bruteForceRetrievalCount: number that fell back to cosine-similarity loop
- agentdbEnabled: 1 if AgentDB is loaded, 0 otherwise (already existed)
The retrieve() method tracks which path actually returned candidates and
increments the appropriate counter. AgentDB import failures and empty
results both flow to brute-force; the counter reflects reality.
PatternLearner.getStats() honestly reports:
- hnswEnabled: 0 (no HNSW integration yet — separate follow-up needed)
- bruteForceMatches: count of findMatches calls
PatternLearner.findMatches always takes the brute-force/clustering path;
wiring AgentDB into it is item 2-followup tracked separately. Surfacing
the lie ("we use HNSW") as a number ("hnswEnabled: 0") is the honest
intermediate step.
Tests: 2 new cases in persistence.test.ts verifying counter shape +
PatternLearner honest hnswEnabled=0.
Validation: 132 neural tests pass (added 2 for observability).
Build clean.
5 of 6 #1773 substrate items shipped:
✅ Item 1: Persistence
✅ Item 2: Retrieval-path observability (this commit)
✅ Item 3: Seedable RNG
⏸️ Item 4: Move flash-attention + moe-router from cli (cross-package, queued)
✅ Item 5: selfConsistency orchestrator
✅ Item 6: Round-trip tests
Refs #1773.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(neural): migrate flash-attention + moe-router from cli + SEO keywords (#1773 item 4)
Closes the parallel-implementation gap that motivated #1773. The neural
package now owns the production-grade pieces; cli imports them via the
package boundary instead of maintaining local copies.
Files moved (1,679 LOC total):
cli/src/ruvector/flash-attention.ts 857 LOC -> v3/@claude-flow/neural/src/flash-attention.ts
cli/src/ruvector/moe-router.ts 822 LOC -> v3/@claude-flow/neural/src/moe-router.ts
Both files were self-contained (zero external imports for flash-attention,
only node:fs/path for moe-router) so the migration was mechanical: copy,
add to neural index.ts, redirect imports, delete originals.
Cli updates:
- hooks-tools.ts: 3 dynamic imports redirected to "@claude-flow/neural"
- neural-tools.ts: 1 dynamic import redirected
- ruvector/index.ts: re-exports REMOVED (would force vitest to resolve
neural pkgs transitive @ruvector/sona dep eagerly and break tests).
Direct consumers import from @claude-flow/neural; theres no consumer
that needed the barrel re-export.
- cli/src/ruvector/flash-attention.ts and moe-router.ts: deleted
Neural package SEO: package.json gets a comprehensive keywords array
(80+ tags covering ai-agents, multi-agent, RL, PPO/DQN/A2C/SARSA/QLearning/
DecisionTransformer/Curiosity, LoRA, EWC, FlashAttention, MoE, SONA,
self-consistency, agentdb, hnsw, MCP, etc.) plus full author/repo/bugs/
homepage metadata. Description rewritten to reflect actual surface
instead of the old "Neural module - SONA learning integration, neural modes"
stub.
Validation:
- Both packages build clean (tsc, no errors)
- 781 cli tests pass: 769 baseline + 6 bandit + 6 bridge
- 132 neural tests pass: 44 algorithms + 39 patterns + 23 sona + 15 persistence + 9 self-consistency + 2 retrieval-path observability
Bumps:
@claude-flow/neural 3.0.0-alpha.7 -> 3.0.0-alpha.8 (substantial -- new files, new keywords, new exports)
@claude-flow/cli 3.7.0-alpha.6 -> 3.7.0-alpha.7 (now depends on neural@^3.0.0-alpha.8)
claude-flow 3.7.0-alpha.6 -> 3.7.0-alpha.7
ruflo 3.7.0-alpha.6 -> 3.7.0-alpha.7
ALL SIX #1773 substrate-upgrade items now complete:
Item 1: Persistence on the 3 classes DONE
Item 2: Retrieval-path observability DONE
Item 3: Seedable RNG DONE
Item 4: Flash + MoE migration (this commit) DONE
Item 5: selfConsistency orchestrator DONE
Item 6: Round-trip tests DONE
Refs #1773.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(neural): finalize item 4 — neural pkg flash-attention + moe-router files + SEO keywords + cli-side wiring + version bumps
Companion to
|
||
|
|
0a0a246a62 |
feat(neural): Phase 1 convergence — cli depends on @claude-flow/neural + README cleanup (#1773) (#1774)
* feat(neural): Phase 1 convergence (#1773) + neural README cleanup Adds @claude-flow/neural as cli runtime dep, ships a lazy-loading bridge so cli can call NeuralLearningSystem from the package, and documents the API gap Phase 2+ will cross. Bridge: cli/src/memory/neural-package-bridge.ts (88 LOC). Lazy-loads NLS on first call; idempotent; returns null on failure with CLAUDE_FLOW_DEBUG log (same pattern as #1770). Tests: 6 cases in __tests__/neural-package-bridge.test.ts. Lazy init, idempotent cache, stats shape when loaded, reset(). Tolerant of vitest module resolution. Neural README: fixed 5 factual errors. - 9 RL Algorithms -> 7 (PPO/A2C/DQN/QLearning/SARSA/DT/Curiosity) - Quick-start domain development was invalid (valid: code/creative/ reasoning/chat/math/general) - RL imports missing Algorithm suffix on PPO/A2C/DQN/SARSA - NeuralLearningSystem promoted to top quick-start - Added Integration with cli section Validation: 781 cli tests pass (769 baseline + 6 bandit + 6 bridge). Bumps all three packages to 3.7.0-alpha.6. Refs #1773. Co-Authored-By: RuFlo <ruv@ruv.net> * chore(cli): regenerate pnpm-lock.yaml for @claude-flow/neural dep (#1773) Phase 1 commit added "@claude-flow/neural": "^3.0.0-alpha.7" to cli/ package.json but did not regenerate pnpm-lock.yaml. The Type Check V3 and Test V3 Packages CI jobs run with --frozen-lockfile and refused the install. pnpm install --filter @claude-flow/cli --no-frozen-lockfile locally to bring the lockfile in sync with the package.json change. No source changes — just the lockfile. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
c8827c612c |
feat(router): Thompson sampling bandit replaces deterministic argmax (#1772) (#1772)
The intelligence dashboard showed the model router shipping 77% Opus on
0.30 avg complexity — over-routing to the most expensive tier on tasks
where Haiku would have been correct. Root cause: the deterministic
selectModel() ignored hooks_model-outcome history; outcomes were recorded
but never closed the loop.
This PR converts the router into a cost-adjusted Thompson sampling bandit
so that every model-outcome call updates posterior beliefs over Tier 1 /
Tier 2 / Tier 3, and the router auto-balances cost/quality from real data.
What changed in v3/@claude-flow/cli/src/ruvector/model-router.ts:
- New BetaPrior interface + BANDIT_REWARDS table (cost-adjusted Bernoulli):
Haiku-success -> α += 1.0 (cheap + worked = best outcome)
Sonnet-success -> α += 0.7 (worked, somewhat expensive)
Opus-success -> α += 0.4 (worked but cost-suboptimal)
Sonnet-escalated -> α += 0.1 (partial credit)
*-failure / haiku-escalated / opus-escalated -> α += 0.0
- Pure-JS Beta sampler (Marsaglia-Tsang gamma + ratio + Box-Muller normal)
- selectModel() now multiplies the deterministic complexity score by a
Thompson draw θ_m ~ Beta(α_m, β_m) before argmax. Beta(1,1) cold-start
so behavior matches the prior router until outcomes accumulate.
- recordOutcome() updates priors with the cost-adjusted reward
- RouterState extended with priors; loadState backfills defaults for
pre-bandit state files; reset() and getBanditPriors() updated
Tests (__tests__/router-bandit.test.ts, 6 cases):
- Beta(1,1) uniform prior on cold start
- Cost-adjusted updates produce the right α/β deltas (success/failure/escalated)
- Persistence: priors round-trip across router instances
- Convergence: 100-trial workload at avg complexity 0.3 — Haiku posterior
mean dominates Opus by N=100, and Haiku is picked more than Opus over
the run
- Recovery: even with adversarial cold-start outcomes, exploration pulls
the bandit back to the optimal arm within 100 trials
Validation:
- npm run build clean
- 6 new bandit tests pass
- 769 baseline tests still pass (parser, output, validate-input x 2,
mcp-tools-deep, commands, cli, commands-deep, config-adapter x 2,
p1-commands)
- Benchmarked route() overhead: 45.5 µs/call (under the file headers
documented "<100 µs" target). Adds ~3 sampleBeta() draws per route.
Bumps all three packages to 3.7.0-alpha.5:
@claude-flow/cli 3.7.0-alpha.4 -> 3.7.0-alpha.5
claude-flow 3.7.0-alpha.4 -> 3.7.0-alpha.5
ruflo 3.7.0-alpha.4 -> 3.7.0-alpha.5
Visible result: the 77% Opus / 0.30 complexity mismatch corrects itself
within ~50 routing decisions, automatically. No manual threshold tuning.
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
|
||
|
|
a7122a50e3 |
fix(intelligence): make Flash Attention + ruvllm coordinator stats truthful (#1770) (#1771)
Fix 1: neural_status.flashAttention was hardcoded false (neural-tools.ts:699). Now probes ../ruvector/flash-attention.js loader so it agrees with hooks_intelligence_stats on a single source of truth. Fix 2: ruvllm SonaCoordinator reported unavailable despite @ruvector/ruvllm being resolvable. Root cause: getIntelligenceStats() read ruvllmCoordinator synchronously but it was populated only by an async init path the MCP dashboard never awaits. Fix: lazy-init on stats query via sync createRequire, gated on ruvllmLoaded. Cost: 7.7ms first call, 0.24us steady-state. Also: CLAUDE_FLOW_DEBUG-gated log at the catch site so future regressions of this shape do not disappear silently. Verified: neural_status.features.flashAttention=true (was false); hooks_intelligence_stats.ruvllm.coordinator=active (was unavailable); 769 cli tests pass. Bumps all three packages to 3.7.0-alpha.4. Closes #1770 Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
69e72d2e47 |
fix(daemon): break IPC pipe so background daemon survives parent exit on Windows (#1766)
The Liberation reporter (Zarkk1zz) diagnosed this cleanly. On Windows + Node 25, \`npx claude-flow daemon start\` reported success then the spawned daemon died ~1s later. PR #1719 (v3.6.13) fixed the previous \`spawn(..., {shell:true})\` bug, but the new \`fork(..., { stdio: [..., 'ipc'] })\` path left the IPC channel open. \`child.unref()\` releases the libuv handle but does NOT close the IPC pipe — and on Windows, that pipe is what tied the daemon's lifetime to the parent npx wrapper. When npx exited, the pipe tore down and the daemon went with it. Fix in v3/@claude-flow/cli/src/commands/daemon.ts: - detached: !isWin → detached: true (every platform) - After child.unref(), call child.disconnect() (wrapped in try) to explicitly break the IPC pipe. POSIX-tested locally: macOS daemon start/stop roundtrip works, daemon survives parent exit (PID stays RUNNING after the parent shell exits). Windows path is what changes meaningfully — detached:true gives the child its own session/pgid, disconnect() severs the IPC pipe, daemon genuinely stands on its own. Bumps all three packages to 3.7.0-alpha.3: @claude-flow/cli 3.7.0-alpha.1 → 3.7.0-alpha.3 claude-flow 3.7.0-alpha.1 → 3.7.0-alpha.3 ruflo 3.7.0-alpha.2 → 3.7.0-alpha.3 (Skipped alpha.2 on cli/claude-flow because ruflo already used that slot for the dep-range fix — keeping all three aligned at .3.) Closes #1766 Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
5c51df58cd |
chore(release): 3.7.0-alpha.1 — cli-core split alpha
Bumps three packages to 3.7.0-alpha.1 to ship the cli-core split:
- @claude-flow/cli 3.6.30 → 3.7.0-alpha.1
- claude-flow 3.6.30 → 3.7.0-alpha.1
- ruflo 3.6.30 → 3.7.0-alpha.1
Also published @claude-flow/cli-core@3.7.0-alpha.5 (was already on `alpha`
tag; this release promotes it to `latest` since the cli now depends on it).
What changed (architectural):
- New @claude-flow/cli-core package (~156 KB unpacked, JSON-backed memory,
no SQLite/HNSW/ONNX) for plugin authors who want fast cold-cache spawn
- @claude-flow/cli now depends on cli-core, with 4 foundation modules
(types, output, mcp-tools/types, mcp-tools/validate-input — 1,229 LOC)
re-exported from cli-core instead of duplicated
- 8 plugin scripts (6 cost-tracker + 2 ruflo-adr) opt into the lite path
via CLI_CORE=1 — when set, they spawn cli-core@alpha (~1.5s cold) instead
of cli@latest (~35s cold). 22.9× cold-cache speedup measured
What didn't change (intentional):
- cli's full feature surface — same 26 commands, 140+ subcommands, same
SQLite/HNSW/ONNX semantic search, same MCP tool registry. The lite path
is OPT-IN for plugin authors; default behavior is unchanged.
Refs ADR-100, #1748 Issue 3, #1760, #1764
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
cc114c8db4 |
fix(mcp): sharpen high-overlap tool descriptions for better selection (#1748 Issue 4) (v3.6.30) (#1756)
#1748 Issue 4 — across 4 experiments, the model invoked 0 of 237 Ruflo MCP tools, even on a 230-call-site cross-file refactor. The diagnosis: descriptions don't lead with 'Use when native X doesn't help because Y', so the model's tool-selection heuristic always wins for native tools. This PR sharpens descriptions for 7 of the highest-overlap tools — the ones where the model HAS a native equivalent and the differentiation needs to be crystal clear. Memory family (5 tools — competes with Read/Write/Grep/Glob): - memory_store: 'Use when native Write is wrong because the data is not a file ... AND you need to recall it later by semantic query, not by path' - memory_retrieve: 'Use when native Read is wrong because the value is not a file (lives in .swarm/memory.db)' - memory_search: 'Use when native Grep is wrong because Grep matches characters and you need conceptually-related entries' - memory_delete: 'No native equivalent — Write to a file does not affect the .swarm/memory.db SQLite store' - memory_list: 'Use when native Glob is wrong because the entries are not files' Hooks family (1 high-leverage tool): - hooks_route: '3-tier routing recommendation BEFORE spawning ... Native tools have no equivalent — Claude Code does not introspect its own model-selection cost' Agent family (1 — competes with native Task): - agent_spawn: 'Use when native Task is wrong because you need cost tracking / cross-session learning / swarm coordination' This is a representative subset, not the full 237. Pattern is now established; subsequent PRs can extend per-family. The smoke test for this approach: re-run the #1748 G3 cross-file rename — does the model now invoke memory_search to find existing references, or still fall through to Grep? Published as 3.6.30 to npm: @claude-flow/cli@3.6.30 → tags: latest, alpha, v3alpha claude-flow@3.6.30 → tags: latest, alpha, v3alpha ruflo@3.6.30 → tags: latest, alpha, v3alpha Status of #1748: Issue 1 ✅, Issue 2 ✅, Issue 3 ⏳, Issue 4 (this) — first batch of descriptions sharpened; pattern established; further families land incrementally. Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
7aa7fc93e5 |
fix(hive-mind): pass --mcp-config to spawned worker (#1748 Issue 2) (v3.6.29) (#1755)
The Liberation of Bajor team's eval (#1748) found that \`ruflo hive-mind spawn --claude\` launches the spawned \`claude -p\` worker WITHOUT \`--mcp-config\`, so the worker's MCP tool registry is empty for \`mcp__ruflo__*\`. The coordination prompt then references tools the worker doesn't know about and the worker exits silently. Result: the framework reports swarm success but zero phases complete. Fix in v3/@claude-flow/cli/src/commands/hive-mind.ts: - Add \`--mcp-config <path>\` flag to \`spawn\` subcommand - Resolution order in spawnClaudeCodeInstance: 1. explicit --mcp-config path passed by caller 2. ./.mcp.json in cwd (project-local) 3. ~/.claude.json (user-global) 4. ~/.claude/mcp.json (alt user-global) - If resolved: pass --mcp-config <path> to childSpawn('claude', ...) - If not: warn explicitly so the failure mode is visible (not silent as before). The warning text references #1748 Issue 2 and tells the user how to fix (pass --mcp-config or run \`ruflo init\`). This is the second-most load-bearing of #1748's four findings. Issue 1 (per-plugin hooks layout) shipped in PR #1754 / commit on main. Build verified: \`tsc\` clean, fix present in dist/. Published as 3.6.29 to npm: @claude-flow/cli@3.6.29 → tags: latest, alpha, v3alpha claude-flow@3.6.29 → tags: latest, alpha, v3alpha ruflo@3.6.29 → tags: latest, alpha, v3alpha Issues 3 and 4 from #1748 will land in follow-up PRs: Issue 3 — package size / 30s MCP timeout race (footprint reduction + README pre-warm doc) Issue 4 — tool description sharpening + lite default surface Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
229d273a1f |
fix(init): #1744 honest defaults + runtime fallbacks (v3.6.28) (#1753)
* fix(init): #1744 honest defaults — --no-global, --minimal hooks gate, README install paths (v3.6.28) Three fixes from @ruvnet's install-study (issue #1744) plus three already-on-disk runtime honesty fixes: #1744 changes (this commit): 1. **--no-global flag** for `init` (and codex/dual variants) — opt out of the user-global ~/.claude/CLAUDE.md "Ruflo Integration" pointer block append. Default behavior unchanged (block still appended once, idempotent — but now opt-out is documented). #1744 #2. 2. **--minimal hooks gate** in settings-generator. Before this commit, `--minimal` wrote .claude/settings.json with 4 hook decls pointing at .claude/helpers/hook-handler.cjs but didn't install the helpers directory — so every hook fired and silently failed. Now the hooks block only emits when components.helpers is true. Minimal stays minimal AND functional. #1744 #3. 3. **README Quick Start labeling** — added a head-to-head table distinguishing Plugin install (lite, slash commands only, no MCP) from CLI install (full Ruflo loop, MCP registered, hooks installed). The previous README marketed both equally as "Recommended" which surprised users who chose plugin install and found the MCP tools missing. #1744 #1. Already-on-disk runtime honesty fixes (bundled in this release): 4. v3/@claude-flow/cli/src/commands/performance.ts — drop unverified "Flash Attention 2.49x speedup" optimize/bottleneck recommendations. Re-tagged as "in progress, currently JS reference impl". 5. v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts — drop the silent Tier 4 mock-fallback in embedding resolution. If Tier 1 (agentic-flow) and Tier 3 (ONNX) both failed to import, leave realEmbeddings null and let the explicit hash-fallback path run with a clear _embeddingNote in stats. Silently substituting mock embeddings hid a missing production dependency from callers. 6. v3/@claude-flow/embeddings/src/embedding-service.ts — throw on unknown provider / no-real-provider-available paths instead of silently substituting MockEmbeddingService. Mock embeddings are tests-only; production code that lands on the mock path accidentally is a bug, and silent fallback hid it. All TypeScript clean (tsc --noEmit). Build verified — all 3 fixes present in dist/. Closes #1744 (3 of 5 papercuts; remaining 2 are doc-only, addressed in PR #1751). Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): bump to 3.6.28 — published to npm @claude-flow/cli@3.6.28 → tags: latest, alpha, v3alpha claude-flow@3.6.28 → tags: latest, alpha, v3alpha ruflo@3.6.28 → tags: latest, alpha, v3alpha Includes: #1744 (--no-global, --minimal hooks gate, README install labeling) + runtime honesty fixes (drop unverified Flash Attention claim, drop silent mock embedding fallback, throw on missing real embedding provider). Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): regen verification witness for 3.6.28 totalFixes: 27 → 55 (adds CAP-MCP capability inventory: 300 tools across 28 source files) releases: 3.6.24 → 3.6.28 (current published) manifestHash + signature regenerated from current git commit Includes the #1744 + runtime-honesty fixes shipped in 3.6.28. Run `node scripts/regenerate-witness.mjs` after each release. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
9c1a71f009 |
feat(providers): add Ollama (Tier-2) — closes #1725 + workflow_execute fix
End users on Anthropic Max (which doesn't expose ANTHROPIC_API_KEY) +
Ollama Cloud were locked out of workflow_execute because both
agent-execute paths hardcoded Anthropic. The 4-provider tier-shim in
agentic-flow upstream is a separate fix; this commit closes the gap on
the claude-flow side so Ollama is a first-class Tier-2 option.
src/commands/providers.ts:
- Added 'Ollama' to PROVIDER_CATALOG (LLM, OLLAMA_API_KEY env,
'gpt-oss:120b-cloud, llama3:70b-cloud, qwen2.5-coder:32b-cloud').
- Added 'ollama' to envMapping in resolveApiKey.
- Added ollama endpoint to testProviderConnectivity (tags endpoint).
`claude-flow providers configure -p ollama -k <key>` now accepts
the value; `providers test -p ollama` round-trips the API key.
src/mcp-tools/agent-execute-core.ts:
callAnthropicMessages now picks provider per:
1. RUFLO_PROVIDER=ollama (explicit) OR
2. ANTHROPIC_API_KEY unset AND OLLAMA_API_KEY set (auto-fallback)
When Ollama is selected, callOllamaCompat() runs:
- POST <OLLAMA_BASE_URL or https://ollama.com>/v1/chat/completions
- Bearer auth if apiKey is non-empty AND not the literal 'local'
sentinel (sentinel skips header for self-hosted bind-no-auth)
- OpenAI-compat request shape (messages array w/ system role)
- Normalizes response back to AnthropicCallResult so callers see
the same { success, model, output, usage, durationMs } regardless
of provider.
resolveOllamaModel maps logical names (haiku/sonnet/opus) to the
cloud default 'gpt-oss:120b-cloud'; passes through 'ollama:<model>'
prefix or bare provider-native names like 'llama3.2:1b'.
Validated end-to-end against ruvultra over tailscale:
- Installed ollama 0.23.0 on ruvultra (Ubuntu 24.04)
- Daemon bound to 0.0.0.0:11434
- Pulled llama3.2:1b
- From local Mac: callAnthropicMessages({ prompt, model:
'ollama:llama3.2:1b', timeoutMs: 30000 }) with OLLAMA_BASE_URL=
http://ruvultra:11434 / OLLAMA_API_KEY=local / RUFLO_PROVIDER=ollama
- success: true, 611ms, 49 tokens, response normalized to
AnthropicCallResult shape
Same code path supports Ollama Cloud (default endpoint) when users
set OLLAMA_API_KEY=<real-key>. workflow_execute, which dispatches
through executeAgentTask → callAnthropicMessages, picks up the new
routing automatically — no MCP wire-format change required.
Bump 3.6.26 → 3.6.27 across CLI + claude-flow + ruflo umbrellas.
|
||
|
|
fb2123905f |
chore(release): bump to 3.6.26 + regen witness
13 commits since 3.6.25:
- ADR-098 (plugin capability sync + token diet + neural-learning
standardization + model rightsizing) — 9 commits across 7 plugins
- ADR-096 Phase 5 (ruflo doctor encryption-at-rest section) —
1 commit, 5 tests added
- verification: per-source-file MCP witnesses (28 CAP-MCP entries
on top of the 27 fix entries → 55 total) — 1 commit
- 2 reconciliation commits
Test baseline: 1938/1938 passing, 46 skipped, 0 failures.
Build: tsc --noEmit clean across CLI + plugin-agent-federation.
Witness manifest regenerated for 3.6.26 — all 55 fixes verified.
Note: plugin-agent-federation stays at 1.0.0-alpha.5 (no source
changes in v3/@claude-flow/plugin-agent-federation/ since
3.6.25). The plugin marketplace plugins (plugins/ruflo-*) are
versioned independently per ADR-098.
|
||
|
|
f8cd1c9fe2 |
chore(release): bump to 3.6.25 + regen witness manifest
Versions bumped:
@claude-flow/cli 3.6.24 → 3.6.25
ruflo (umbrella) 3.6.24 → 3.6.25
claude-flow (umbrella) 3.6.24 → 3.6.25
@claude-flow/plugin-agent-fed. 1.0.0-alpha.4 → 1.0.0-alpha.5
Captures 22 commits since 3.6.24:
- audit_1776853149979 hardening (8 commits): execFileSync sweep,
fetch timeouts, env validator, file-mode 0600, MCP stdin DoS cap,
shell injection in github-tools + update/executor
- test suite cleanup: 25 pre-existing failures cleared → 1933/1933 green
- perf: dynamic-import sweep across memory-tools / hooks-tools / commands
- ADR-096 encryption-at-rest Phases 1–4 (vault + session/terminal/memory.db)
- ADR-097 federation budget circuit breaker Phase 1 (alpha.5 bump)
- verification.md capability inventory expansion (300 MCP / 49 CLI /
32 plugins / 43 agents)
- ruflo-federation Claude Code plugin v0.2.0 docs
scripts/regenerate-witness.mjs (new):
Reproducible regen — re-hashes every cited dist file, refreshes
gitCommit / releases / issuedAt, recomputes manifest hash, re-derives
the deterministic Ed25519 keypair from sha256(gitCommit +
":ruflo-witness/v1") via Node's native createPrivateKey/Public from
PKCS#8 (no @noble dep), re-signs.
All 27 existing fixes re-verified after CLI dist rebuild.
verification.md "Coverage so far" updated to reflect:
- the new 3.6.25 release pointer
- explicit pointers to the inventory section + tasks #25/#26 for
the unenumerated ADR-096/097 work
- regen instructions
|
||
|
|
dba6b54d61 | chore: bump to 3.6.24 (GuardedVectorBackend activated) | ||
|
|
892f54a785 | chore: bump to 3.6.23 (G7 mutationGuard + attestationLog activated) | ||
|
|
db210a93a6 |
chore: bump to 3.6.22 + plugin-agent-federation@1.0.0-alpha.4
Batched publish: G1 agent_execute, G3 workflow runtime, G7 controller activation (gnnService + rvfOptimizer), G4 WASM Anthropic fallback, G2 federation Ed25519 signing/verification. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
0f5d415e80 | chore: bump to 3.6.21 (verify command) | ||
|
|
43fda11104 | chore: bump to 3.6.20 (G6 auto-memory dedup) | ||
|
|
6369151ace |
chore: bump to 3.6.19 + @claude-flow/embeddings@3.0.0-alpha.15
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> |
||
|
|
bc399dc9a2 |
sec: tighten npm overrides for protobufjs (critical RCE), tar, uuid
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> |
||
|
|
32c46c2b94 |
fix(install): #1721 — postinstall script copies all dist/src/* siblings
@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>
|
||
|
|
2c9e7e3604 |
chore: bump to 3.6.16
Batched publish of iterations #6 (parallel post-init wiring) and #7 (tight cosmetic warning suppression). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
e4b4a3e1e0 |
fix: security overrides + F8 perf metrics + F10 attention placeholder
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> |
||
|
|
c5915a718d |
fix(mcp): ADR-093 — remediate 7 audit findings, ship 3.6.14
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> |
||
|
|
a10a13e623 |
fix(cli,ui): resolve five issues from May 1-3 reports
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> |
||
|
|
643ed0024c |
chore: bump to v3.6.12 — RuFlo branding, portable MCP server config (#1679)
- Bump @claude-flow/cli, claude-flow umbrella, and ruflo to 3.6.12 - init mcp-generator: spawn `npx ruflo@latest mcp start` (was @claude-flow/cli@latest) for cleaner branding via the ruflo wrapper package - init settings-generator: emit RuFlo-branded attribution (Co-Authored-By: RuFlo <ruv@ruv.net>; Generated with [RuFlo]) - Project .claude/settings.json: replace hardcoded /workspaces/... MCP path with portable npx ruflo@latest, wire statusLine.command to existing helper, drop invalid hook events (TeammateIdle, TaskCompleted, SubagentStart), drop ruv-swarm from enabledMcpjsonServers (not configured) Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
0d9f9b1fe9 |
chore: bump all packages to v3.6.11 — published to npm
SmartRetrieval integration + 4 bug fixes (#1604, #1605, #1606, #1616). Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
c44f527a1e |
feat: lean CLAUDE.md generator with SendMessage-first coordination
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> |
||
|
|
e0a4bfbd77 |
chore: bump all packages to v3.6.9 — published to npm
Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
3983d8aad5 |
fix: browser args comma-join + proper ESM fs import for sysctl (v3.6.8)
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>
|