claude-flow 3.65.1 → 3.66.0

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.
@@ -10,6 +10,12 @@ export interface RateLimitState {
10
10
  }
11
11
  export declare function loadState(): RateLimitState;
12
12
  export declare function saveState(state: RateLimitState): void;
13
+ /**
14
+ * Whether this is a CI run. CI systems set `CI` to `true`, `1` or other values, so any value
15
+ * except empty, `0` or `false` counts (GitHub Actions sets CI=true). Matching only `true` let CI=1 runs check for updates and
16
+ * install one (`npm install @claude-flow/cli@<latest>`) into the working directory mid-run.
17
+ */
18
+ export declare function isCI(env?: NodeJS.ProcessEnv): boolean;
13
19
  export declare function shouldCheckForUpdates(intervalHours?: number): {
14
20
  allowed: boolean;
15
21
  reason?: string;
@@ -45,9 +45,20 @@ export function saveState(state) {
45
45
  ensureDir();
46
46
  fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 2));
47
47
  }
48
+ /**
49
+ * Whether this is a CI run. CI systems set `CI` to `true`, `1` or other values, so any value
50
+ * except empty, `0` or `false` counts (GitHub Actions sets CI=true). Matching only `true` let CI=1 runs check for updates and
51
+ * install one (`npm install @claude-flow/cli@<latest>`) into the working directory mid-run.
52
+ */
53
+ export function isCI(env = process.env) {
54
+ return ['CI', 'CONTINUOUS_INTEGRATION'].some((name) => {
55
+ const value = env[name];
56
+ return value !== undefined && value.trim() !== '' && !/^(0|false)$/i.test(value.trim());
57
+ });
58
+ }
48
59
  export function shouldCheckForUpdates(intervalHours = DEFAULT_INTERVAL_HOURS) {
49
60
  // Skip in CI environments
50
- if (process.env.CI === 'true' || process.env.CONTINUOUS_INTEGRATION === 'true') {
61
+ if (isCI()) {
51
62
  return { allowed: false, reason: 'CI environment detected' };
52
63
  }
53
64
  // Skip if explicitly disabled
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.65.1",
3
+ "version": "3.66.0",
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",