Files
ruflo/v3/@claude-flow
rUvandReuven 7ca28a7593 fix(statusline): read installed version from plugin package.json (#1951) (#1960)
The statusline showed a hard-coded "RuFlo V3.5" regardless of the
installed version, even on alpha.27 where `ruflo doctor` correctly
reported the real version.

Two files had the bug:

1. `v3/@claude-flow/cli/.claude/helpers/statusline.cjs` — fully hard-coded
   `▊ RuFlo V3.5 ` in both header constructions, with no version-reading
   logic at all. Added a startup version-probe (4 candidate package.jsons,
   preferring the plugin install at `~/.claude/plugins/marketplaces/ruflo/`)
   and wired `${RUFLO_VERSION}` into both headers.

2. `.claude/helpers/statusline.cjs` — already had version-reading, but its
   candidate list only checked project-local `node_modules` paths, never
   the plugin install location. Plugin users always fell back to `'3.5'`.
   Added the plugin path as the first candidate.

3. `v3/@claude-flow/cli/src/init/statusline-generator.ts` — the template
   that writes `<project>/.claude/helpers/statusline.cjs` at init time had
   the same too-narrow candidate list. Same fix, applied to the template.

Probe order for all three:
  1. ~/.claude/plugins/marketplaces/ruflo/package.json   (plugin install)
  2. <cwd>/node_modules/@claude-flow/cli/package.json    (npm install)
  3. <cwd>/node_modules/ruflo/package.json               (umbrella)
  4. <cwd>/v3/@claude-flow/cli/package.json              (source checkout)

Falls through to a hard-coded default if all four are missing or malformed.

Build verified clean (tsc) on @claude-flow/cli.

Resolves #1951.

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-05-13 09:24:07 -04:00
..