@claude-flow/cli 3.27.1 → 3.27.3
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 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.25.6
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": {
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.3",
|
|
4
4
|
"files": {
|
|
5
5
|
"auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
|
|
6
6
|
"hook-handler.cjs": "2e4927ff158c0079a67a6f0ef0b99ac748d600d33798b0a5fbd5a6a82225ec03",
|
|
7
7
|
"intelligence.cjs": "bd1f8e4b034944aee1df0391dc47ac2e8cc4b3aa542c65407a59d49620bbf76b",
|
|
8
|
-
"statusline.cjs": "
|
|
8
|
+
"statusline.cjs": "ca46b9c780fee974d4b54cfd610b3b09d77c78c40761dc49ae76355da2f643ba"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"signature": "
|
|
11
|
+
"signature": "XuS7Mn0CwcqZYTTEoSRuCXG3f9fH7Mu7pILRJi86I+Qj4tDmaroqEhu8TWN1PEVXCK5tiLTMnG20ZxcY+twbDg==",
|
|
12
12
|
"algorithm": "ed25519"
|
|
13
13
|
}
|
|
@@ -597,9 +597,28 @@ function getCostFromStdin() {
|
|
|
597
597
|
return null;
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
//
|
|
600
|
+
// Compares dotted-numeric version strings (e.g. "3.27.1" vs "3.27.10").
|
|
601
|
+
// Returns >0 if a>b, <0 if a<b, 0 if equal-as-far-as-parseable. Deliberately
|
|
602
|
+
// simple (no prerelease/build-metadata handling) — this only orders local
|
|
603
|
+
// package.json versions against each other, never anything untrusted from
|
|
604
|
+
// a payload, so a full semver implementation would be dead weight here.
|
|
605
|
+
function compareVersions(a, b) {
|
|
606
|
+
const pa = String(a).split('.').map((n) => parseInt(n, 10));
|
|
607
|
+
const pb = String(b).split('.').map((n) => parseInt(n, 10));
|
|
608
|
+
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
|
|
609
|
+
const na = Number.isFinite(pa[i]) ? pa[i] : 0;
|
|
610
|
+
const nb = Number.isFinite(pb[i]) ? pb[i] : 0;
|
|
611
|
+
if (na !== nb) return na - nb;
|
|
612
|
+
}
|
|
613
|
+
return 0;
|
|
614
|
+
}
|
|
615
|
+
|
|
601
616
|
function getPkgVersion() {
|
|
602
|
-
|
|
617
|
+
// Baked in at generation time from the real running CLI's own resolved
|
|
618
|
+
// version (see generateStatuslineScript()'s doc comment) — correct even
|
|
619
|
+
// when this renders via a pure npx invocation with no local install for
|
|
620
|
+
// the candidate scan below to find.
|
|
621
|
+
let ver = "3.27.3";
|
|
603
622
|
try {
|
|
604
623
|
const home = os.homedir();
|
|
605
624
|
const pkgPaths = [
|
|
@@ -629,11 +648,24 @@ function getPkgVersion() {
|
|
|
629
648
|
);
|
|
630
649
|
}
|
|
631
650
|
} catch { /* ignore */ }
|
|
651
|
+
// Pick the HIGHEST version among every candidate that exists, not the
|
|
652
|
+
// first one found. The marketplace plugin path is probed first (list
|
|
653
|
+
// order above), but Claude Code's own plugin marketplace mechanism
|
|
654
|
+
// syncs on its own git-pull cadence, independent of npm publishes — a
|
|
655
|
+
// freshly-published npm version can sit alongside a stale marketplace
|
|
656
|
+
// checkout for a while (observed live: marketplace one release behind
|
|
657
|
+
// right after a publish). Taking the first EXISTING candidate meant the
|
|
658
|
+
// header could show a stale version even when a newer install (e.g.
|
|
659
|
+
// node_modules/@claude-flow/cli from a plain npm install) was sitting right there.
|
|
660
|
+
let found = false;
|
|
632
661
|
for (const p of pkgPaths) {
|
|
633
662
|
if (!fs.existsSync(p)) continue;
|
|
634
663
|
try {
|
|
635
664
|
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
636
|
-
if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
665
|
+
if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
666
|
+
if (!found || compareVersions(pkg.version, ver) > 0) ver = pkg.version;
|
|
667
|
+
found = true;
|
|
668
|
+
}
|
|
637
669
|
} catch { /* ignore */ }
|
|
638
670
|
}
|
|
639
671
|
} catch { /* ignore */ }
|
package/catalog-manifest.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* - Shared settings cache
|
|
10
10
|
* - Strict 2s timeouts on all shell calls
|
|
11
11
|
*/
|
|
12
|
+
import { getInstalledCliVersion } from './helper-refresh.js';
|
|
12
13
|
/**
|
|
13
14
|
* Generate optimized statusline script
|
|
14
15
|
* Output format:
|
|
@@ -21,6 +22,18 @@
|
|
|
21
22
|
*/
|
|
22
23
|
export function generateStatuslineScript(options) {
|
|
23
24
|
const maxAgents = options.runtime.maxAgents;
|
|
25
|
+
// Resolved reliably HERE (inside the actual running CLI process, via
|
|
26
|
+
// getInstalledCliVersion()'s createRequire/findPackageRoot resolution) —
|
|
27
|
+
// never wrong at generation time. Baked in as getPkgVersion()'s fallback
|
|
28
|
+
// so a pure-npx render (no persistent local install: no marketplace
|
|
29
|
+
// checkout, no project node_modules, nothing under a global prefix — npx
|
|
30
|
+
// only ever installs into its own ephemeral, unpredictably-hashed
|
|
31
|
+
// ~/.npm/_npx/<hash>/ directory, which none of getPkgVersion()'s
|
|
32
|
+
// candidate paths can find) shows the real version instead of the
|
|
33
|
+
// previous hardcoded "3.6" placeholder. getPkgVersion()'s own runtime
|
|
34
|
+
// candidate scan still wins over this baked-in value when it finds
|
|
35
|
+
// something newer (e.g. a later `npm update` in the same project).
|
|
36
|
+
const bakedVersion = getInstalledCliVersion();
|
|
24
37
|
return `#!/usr/bin/env node
|
|
25
38
|
/**
|
|
26
39
|
* RuFlo V3 Statusline — delegation build (#2195)
|
|
@@ -620,9 +633,28 @@ function getCostFromStdin() {
|
|
|
620
633
|
return null;
|
|
621
634
|
}
|
|
622
635
|
|
|
623
|
-
//
|
|
636
|
+
// Compares dotted-numeric version strings (e.g. "3.27.1" vs "3.27.10").
|
|
637
|
+
// Returns >0 if a>b, <0 if a<b, 0 if equal-as-far-as-parseable. Deliberately
|
|
638
|
+
// simple (no prerelease/build-metadata handling) — this only orders local
|
|
639
|
+
// package.json versions against each other, never anything untrusted from
|
|
640
|
+
// a payload, so a full semver implementation would be dead weight here.
|
|
641
|
+
function compareVersions(a, b) {
|
|
642
|
+
const pa = String(a).split('.').map((n) => parseInt(n, 10));
|
|
643
|
+
const pb = String(b).split('.').map((n) => parseInt(n, 10));
|
|
644
|
+
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
|
|
645
|
+
const na = Number.isFinite(pa[i]) ? pa[i] : 0;
|
|
646
|
+
const nb = Number.isFinite(pb[i]) ? pb[i] : 0;
|
|
647
|
+
if (na !== nb) return na - nb;
|
|
648
|
+
}
|
|
649
|
+
return 0;
|
|
650
|
+
}
|
|
651
|
+
|
|
624
652
|
function getPkgVersion() {
|
|
625
|
-
|
|
653
|
+
// Baked in at generation time from the real running CLI's own resolved
|
|
654
|
+
// version (see generateStatuslineScript()'s doc comment) — correct even
|
|
655
|
+
// when this renders via a pure npx invocation with no local install for
|
|
656
|
+
// the candidate scan below to find.
|
|
657
|
+
let ver = ${JSON.stringify(bakedVersion)};
|
|
626
658
|
try {
|
|
627
659
|
const home = os.homedir();
|
|
628
660
|
const pkgPaths = [
|
|
@@ -652,11 +684,24 @@ function getPkgVersion() {
|
|
|
652
684
|
);
|
|
653
685
|
}
|
|
654
686
|
} catch { /* ignore */ }
|
|
687
|
+
// Pick the HIGHEST version among every candidate that exists, not the
|
|
688
|
+
// first one found. The marketplace plugin path is probed first (list
|
|
689
|
+
// order above), but Claude Code's own plugin marketplace mechanism
|
|
690
|
+
// syncs on its own git-pull cadence, independent of npm publishes — a
|
|
691
|
+
// freshly-published npm version can sit alongside a stale marketplace
|
|
692
|
+
// checkout for a while (observed live: marketplace one release behind
|
|
693
|
+
// right after a publish). Taking the first EXISTING candidate meant the
|
|
694
|
+
// header could show a stale version even when a newer install (e.g.
|
|
695
|
+
// node_modules/@claude-flow/cli from a plain npm install) was sitting right there.
|
|
696
|
+
let found = false;
|
|
655
697
|
for (const p of pkgPaths) {
|
|
656
698
|
if (!fs.existsSync(p)) continue;
|
|
657
699
|
try {
|
|
658
700
|
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
659
|
-
if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
701
|
+
if (pkg && typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
702
|
+
if (!found || compareVersions(pkg.version, ver) > 0) ver = pkg.version;
|
|
703
|
+
found = true;
|
|
704
|
+
}
|
|
660
705
|
} catch { /* ignore */ }
|
|
661
706
|
}
|
|
662
707
|
} catch { /* ignore */ }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.3",
|
|
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",
|