@claude-flow/cli 3.27.1 → 3.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "manifest": {
3
- "version": "3.27.1",
3
+ "version": "3.27.2",
4
4
  "files": {
5
5
  "auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
6
6
  "hook-handler.cjs": "2e4927ff158c0079a67a6f0ef0b99ac748d600d33798b0a5fbd5a6a82225ec03",
7
7
  "intelligence.cjs": "bd1f8e4b034944aee1df0391dc47ac2e8cc4b3aa542c65407a59d49620bbf76b",
8
- "statusline.cjs": "44882bcda49ff6dc1d3738e25b6ec23e07bdc0177321b8cd15dd966ff1c7090f"
8
+ "statusline.cjs": "f553f12a34e7df405a64501cdedb684374ef92670279380bc95f625fc68b2d1b"
9
9
  }
10
10
  },
11
- "signature": "roS3Sgyq3yDDiQvm0pyB3ZzdGMUoQnRYJjFdbTSW5HZqPRirjf72qgkzQu+Yw+fNfVBrS9ljS/kWpnJKt/6DAw==",
11
+ "signature": "40Y8+mFRgH7LZZ5TeeDM6aIUcAKrNaN82nyJJzFyepx/HM1chZeK2yEUIbtPhyE0PdyoO4W1OuR3mlxLHgBjCA==",
12
12
  "algorithm": "ed25519"
13
13
  }
@@ -598,6 +598,22 @@ function getCostFromStdin() {
598
598
  }
599
599
 
600
600
  // Read package version from the first package.json we find.
601
+ // Compares dotted-numeric version strings (e.g. "3.27.1" vs "3.27.10").
602
+ // Returns >0 if a>b, <0 if a<b, 0 if equal-as-far-as-parseable. Deliberately
603
+ // simple (no prerelease/build-metadata handling) — this only orders local
604
+ // package.json versions against each other, never anything untrusted from
605
+ // a payload, so a full semver implementation would be dead weight here.
606
+ function compareVersions(a, b) {
607
+ const pa = String(a).split('.').map((n) => parseInt(n, 10));
608
+ const pb = String(b).split('.').map((n) => parseInt(n, 10));
609
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
610
+ const na = Number.isFinite(pa[i]) ? pa[i] : 0;
611
+ const nb = Number.isFinite(pb[i]) ? pb[i] : 0;
612
+ if (na !== nb) return na - nb;
613
+ }
614
+ return 0;
615
+ }
616
+
601
617
  function getPkgVersion() {
602
618
  let ver = '3.6';
603
619
  try {
@@ -629,11 +645,24 @@ function getPkgVersion() {
629
645
  );
630
646
  }
631
647
  } catch { /* ignore */ }
648
+ // Pick the HIGHEST version among every candidate that exists, not the
649
+ // first one found. The marketplace plugin path is probed first (list
650
+ // order above), but Claude Code's own plugin marketplace mechanism
651
+ // syncs on its own git-pull cadence, independent of npm publishes — a
652
+ // freshly-published npm version can sit alongside a stale marketplace
653
+ // checkout for a while (observed live: marketplace one release behind
654
+ // right after a publish). Taking the first EXISTING candidate meant the
655
+ // header could show a stale version even when a newer install (e.g.
656
+ // node_modules/@claude-flow/cli from a plain npm install) was sitting right there.
657
+ let found = false;
632
658
  for (const p of pkgPaths) {
633
659
  if (!fs.existsSync(p)) continue;
634
660
  try {
635
661
  const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
636
- if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) { ver = pkg.version; break; }
662
+ if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
663
+ if (!found || compareVersions(pkg.version, ver) > 0) ver = pkg.version;
664
+ found = true;
665
+ }
637
666
  } catch { /* ignore */ }
638
667
  }
639
668
  } catch { /* ignore */ }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 1,
4
- "generatedAt": "2026-07-14T03:48:36.860Z",
5
- "gitSha": "5ca9ce1b",
4
+ "generatedAt": "2026-07-14T04:02:10.768Z",
5
+ "gitSha": "dbcfe15f",
6
6
  "catalog": {
7
7
  "agents": 164,
8
8
  "tools": 387,
@@ -621,6 +621,22 @@ function getCostFromStdin() {
621
621
  }
622
622
 
623
623
  // Read package version from the first package.json we find.
624
+ // Compares dotted-numeric version strings (e.g. "3.27.1" vs "3.27.10").
625
+ // Returns >0 if a>b, <0 if a<b, 0 if equal-as-far-as-parseable. Deliberately
626
+ // simple (no prerelease/build-metadata handling) — this only orders local
627
+ // package.json versions against each other, never anything untrusted from
628
+ // a payload, so a full semver implementation would be dead weight here.
629
+ function compareVersions(a, b) {
630
+ const pa = String(a).split('.').map((n) => parseInt(n, 10));
631
+ const pb = String(b).split('.').map((n) => parseInt(n, 10));
632
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
633
+ const na = Number.isFinite(pa[i]) ? pa[i] : 0;
634
+ const nb = Number.isFinite(pb[i]) ? pb[i] : 0;
635
+ if (na !== nb) return na - nb;
636
+ }
637
+ return 0;
638
+ }
639
+
624
640
  function getPkgVersion() {
625
641
  let ver = '3.6';
626
642
  try {
@@ -652,11 +668,24 @@ function getPkgVersion() {
652
668
  );
653
669
  }
654
670
  } catch { /* ignore */ }
671
+ // Pick the HIGHEST version among every candidate that exists, not the
672
+ // first one found. The marketplace plugin path is probed first (list
673
+ // order above), but Claude Code's own plugin marketplace mechanism
674
+ // syncs on its own git-pull cadence, independent of npm publishes — a
675
+ // freshly-published npm version can sit alongside a stale marketplace
676
+ // checkout for a while (observed live: marketplace one release behind
677
+ // right after a publish). Taking the first EXISTING candidate meant the
678
+ // header could show a stale version even when a newer install (e.g.
679
+ // node_modules/@claude-flow/cli from a plain npm install) was sitting right there.
680
+ let found = false;
655
681
  for (const p of pkgPaths) {
656
682
  if (!fs.existsSync(p)) continue;
657
683
  try {
658
684
  const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
659
- if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) { ver = pkg.version; break; }
685
+ if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
686
+ if (!found || compareVersions(pkg.version, ver) > 0) ver = pkg.version;
687
+ found = true;
688
+ }
660
689
  } catch { /* ignore */ }
661
690
  }
662
691
  } catch { /* ignore */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.27.1",
3
+ "version": "3.27.2",
4
4
  "type": "module",
5
5
  "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",