* fix(migrate,mcp): unresolvable remediation command + false-success HTTP server exit
Two independently-reported, freshly-filed defects:
- #2985: `ruflo migrate status`'s ADR-128 removed-agent remediation
(shipped today via #2973/ADR-382 Part B) printed a command that cannot
succeed twice over: `ruflo plugins install <plugin>` requires -n/--name
(not a positional) AND targets the npm-package plugin system, while the
gap detector's own registry check (installed_plugins.json) is for the
Claude Code marketplace system entirely. Fixed to print the correct
`/plugin install <plugin>@ruflo` slash-command flow, with a one-time
"run /plugin marketplace add ruvnet/ruflo first" hint. Also corrects
three adjacent doc-drift items the reporter found while verifying:
README/USERGUIDE's `claude mcp add ruflo` examples (should be the
canonical `claude-flow` key per #2206 — the exact stray-key duplicate
#2612's healing logic exists to clean up), README's blanket "MCP server
registered: No" claim for the plugin path (ruflo-core ships its own
.mcp.json and does register one), and a stale comment in executor.ts
conflating the CLI-track's mcp__claude-flow__* tool refs with the
marketplace plugin binding (mcp__plugin_<plugin>_<server>__*).
- #2984: `ruflo mcp start -t http` printed a full "Status: Running"
success table — PID, health/RPC URLs — then exited 0 within seconds,
never actually leaving the port bound. Root cause: bin/cli.js's
"normal CLI mode" branch (which any explicit non-stdio --transport
always takes) unconditionally exits once the dispatched command's
action() promise resolves (#1552's "one-shot command" assumption).
mcp.ts's `start` action returned immediately after printing the table,
so the freshly-bound http.Server was torn down within milliseconds of
the printed success claim. Fixed by blocking in the foreground after a
successful start (SIGINT/SIGTERM-driven graceful shutdown), matching
daemon.ts's established `--foreground` pattern — `daemonize` isn't
currently wired to fork/detach anywhere in MCPServerManager, so every
successful start via this path is a foreground server regardless of
the -d flag.
Tests: migrate-agent-detection.test.ts updated for the corrected command
string; new mcp-http-foreground-2984.test.ts spawns the built CLI exactly
like the bug report and asserts the port actually accepts connections
after the success table prints (not just that it printed), then confirms
SIGTERM still produces a clean exit. Both verified via git-stash A/B:
fail against the pre-fix code, pass against the fix.
Full suite otherwise unaffected — same 9 pre-existing sandbox-environment
failures (ruvector/wasm bindings, embedder model downloads) reproduced
identically before this change.
Closes#2985. Closes#2984.
Co-Authored-By: RuFlo <ruv@ruv.net>
* revert: drop migrate-agent-detection changes, superseded by PR #2986
An external contributor (pacphi) independently opened #2986 fixing the
same #2985 with the identical installCommand correction plus a real
`migrate fix --agents` restore command — strictly more complete than
this branch's minimal fix. Dropping the overlapping files here to avoid
a duplicate/conflicting PR; reviewed #2986 and recommended it for merge.
Remaining on this branch: the #2984 mcp start -t http fix and the
doc-drift items #2986 explicitly scoped out (README/USERGUIDE mcp-add
key, executor.ts comment).
Co-Authored-By: RuFlo <ruv@ruv.net>
USERGUIDE.md documented three consensus modes — Majority, Weighted (Queen 3x),
Byzantine — and three queen types — Strategic / Tactical / Adaptive. As
filed in #2422 by @sparkling, none of the weighted-voting behavior is wired:
$ npx @claude-flow/cli@latest hive-mind init -c weighted
[ERROR] Invalid value for --consensus: weighted.
Must be one of: byzantine, raft, gossip, crdt, quorum
And \`calculateRequiredVotes()\` in the shipped hive-mind engine is a pure
equal-vote threshold — no queen multiplier exists in the codebase.
Rewrote 4 USERGUIDE locations (lines ~263, 268, 1693, 2437) to document
the actually-shipped 5 modes: byzantine / raft / gossip / crdt / quorum.
Co-Authored-By: RuFlo <ruv@ruv.net>
The session-cost segment was hardcoded to a "$" prefix. Claude Code's
cost.total_cost_usd is a client-side estimate that may differ from the
actual bill and, on subscription plans, does not reflect out-of-pocket
spend, so the "$" can mislead.
Two environment variables customize the segment, default unchanged:
- RUFLO_STATUSLINE_COST_SYMBOL overrides the "$" ("" = number alone)
- RUFLO_STATUSLINE_HIDE_COST (1/true/yes/on) hides the segment
The change lives in the statusline generator (source of truth); the
committed .claude/helpers/statusline.cjs is regenerated to match. Tests
cover the generator contract, runtime rendering, and generator/artifact
drift.
- Header: v3.5 -> v3.7 reference; surface npx ruflo@latest version
- New "What is new in 3.7" section covering: cli-core split (alpha.5+),
Thompson sampling router (alpha.5), neural@3.0.0-alpha.8 substrate
upgrades (persistence / seedable RNG / self-consistency / Flash Attention
+ MoE migration / retrieval-path observability / SEO keywords), and the
3 new agentdb_*-delete MCP tools (alpha.8)
- AgentDB integration: bumped reference 3.0.0-alpha.10 -> 3.0.0-alpha.13
and called out the new Cypher-routed delete API
End-user CLI surface unchanged. The "What did not change" callout makes
that explicit so 3.6 users can upgrade without relearning anything.
Co-Authored-By: RuFlo <ruv@ruv.net>
* docs: fix init/MCP drift surfaced in #1744 install study
Two papercuts from @ruvnet's methodical install study (issue #1744):
1. README + USERGUIDE both show `npx ruflo@latest init --wizard` in
five places. Per the source (`v3/@claude-flow/cli/src/commands/init.ts:445-447`),
`wizard` is registered as a subcommand: `subcommands: [wizardCommand, ...]`.
The flag form may parse but the canonical form (and what `init --help`
surfaces) is `init wizard`. Updated all 5 occurrences.
2. README's MCP add command:
claude mcp add ruflo -- npx -y @claude-flow/cli@latest
uses the legacy package name. USERGUIDE.md and `ruflo mcp --help` use
the canonical:
claude mcp add ruflo -- npx ruflo@latest mcp start
Both still work, but having two different commands across docs is
the kind of "wait, what?" papercut #1744 logged. Updated README.
No CLI behavior changes. Pure doc consistency.
Closes part of #1744.
Co-Authored-By: RuFlo <ruv@ruv.net>
* docs(USERGUIDE): fix one straggler 'init --wizard' in command-mapping table
Companion to the previous commit on this branch. Caught the row at
USERGUIDE.md:7413 that the regex replace_all missed because the table
row had a different surrounding pattern.
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>