@axiomatic-labs/claudeflow 2.12.232 → 2.12.234

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.
Files changed (2) hide show
  1. package/lib/install.js +18 -5
  2. package/package.json +1 -1
package/lib/install.js CHANGED
@@ -274,9 +274,15 @@ async function run() {
274
274
 
275
275
  function ensureGlobalCli(version) {
276
276
  // Returns { available: boolean, autoInstalled: boolean, upgraded: boolean, fromVersion?: string, error?: string }
277
- const present = commandExists('claudeflow');
278
- const installedVersion = present ? readGlobalCliVersion() : null;
279
- const needsUpgrade = present && installedVersion && installedVersion !== version;
277
+ // `commandExists('claudeflow')` yields a false positive when install.js runs
278
+ // under `npx @axiomatic-labs/claudeflow ...` npx injects its own
279
+ // `node_modules/.bin` into PATH and the subprocess sees the self-referential
280
+ // binary even though nothing is installed globally. Cross-check against
281
+ // `npm ls -g` (which never reports the npx cache) so the auto-installer
282
+ // does not skip a missing global.
283
+ const installedVersion = readGlobalCliVersion();
284
+ const present = Boolean(installedVersion);
285
+ const needsUpgrade = present && installedVersion !== version;
280
286
 
281
287
  if (present && !needsUpgrade) {
282
288
  return { available: true, autoInstalled: false, upgraded: false };
@@ -307,7 +313,12 @@ function ensureGlobalCli(version) {
307
313
  stdio: ['ignore', 'pipe', 'pipe'],
308
314
  timeout: 120000,
309
315
  });
310
- if (commandExists('claudeflow')) {
316
+ // Verify with `npm ls -g` rather than `command -v`. Under npx, the
317
+ // subprocess PATH still contains the npx cache, so `command -v`
318
+ // would report true even if the global install wrote to a prefix
319
+ // that the user's shell cannot see.
320
+ const afterVersion = readGlobalCliVersion();
321
+ if (afterVersion) {
311
322
  return {
312
323
  available: true,
313
324
  autoInstalled: !needsUpgrade,
@@ -319,7 +330,7 @@ function ensureGlobalCli(version) {
319
330
  available: false,
320
331
  autoInstalled: false,
321
332
  upgraded: false,
322
- error: 'installed but not on PATH',
333
+ error: 'installed but `npm ls -g` cannot see it — verify `npm config get prefix` is on $PATH',
323
334
  };
324
335
  } catch (err) {
325
336
  const msg = err?.stderr?.toString?.() || err?.message || String(err);
@@ -994,4 +1005,6 @@ module.exports = Object.assign(run, {
994
1005
  isTemplateManagedAgent,
995
1006
  listTemplateManagedAgents,
996
1007
  mergeClaudeSettings,
1008
+ commandExists,
1009
+ readGlobalCliVersion,
997
1010
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomatic-labs/claudeflow",
3
- "version": "2.12.232",
3
+ "version": "2.12.234",
4
4
  "description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
5
5
  "bin": {
6
6
  "claudeflow": "./bin/cli.js"