claude-flow 3.31.3 → 3.32.1

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.
package/package.json CHANGED
@@ -1,185 +1,186 @@
1
- {
2
- "name": "claude-flow",
3
- "version": "3.31.3",
4
- "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "bin": {
8
- "claude-flow": "./bin/cli.js"
9
- },
10
- "homepage": "https://github.com/ruvnet/claude-flow#readme",
11
- "bugs": {
12
- "url": "https://github.com/ruvnet/claude-flow/issues",
13
- "email": "support@ruv.io"
14
- },
15
- "funding": {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/ruvnet"
18
- },
19
- "files": [
20
- "bin/**",
21
- "v3/@claude-flow/cli/bin/**",
22
- "v3/@claude-flow/cli/dist/**/*.js",
23
- "v3/@claude-flow/cli/dist/**/*.d.ts",
24
- "!v3/@claude-flow/cli/dist/**/*.map",
25
- "v3/@claude-flow/cli/package.json",
26
- "v3/@claude-flow/cli/catalog-manifest.json",
27
- "v3/@claude-flow/shared/dist/**/*.js",
28
- "v3/@claude-flow/shared/dist/**/*.d.ts",
29
- "!v3/@claude-flow/shared/dist/**/*.map",
30
- "v3/@claude-flow/shared/package.json",
31
- "v3/@claude-flow/guidance/dist/**/*.js",
32
- "v3/@claude-flow/guidance/dist/**/*.d.ts",
33
- "!v3/@claude-flow/guidance/dist/**/*.map",
34
- "v3/@claude-flow/guidance/package.json",
35
- ".claude-plugin/**",
36
- ".claude/**",
37
- "!.claude/**/*.db",
38
- "!.claude/**/*.map",
39
- "!.claude/worktrees/**",
40
- "!.claude/projects/**",
41
- "!.claude/scheduled_tasks.lock",
42
- "!.claude/sessions/**",
43
- "README.md",
44
- "LICENSE"
45
- ],
46
- "scripts": {
47
- "dev": "tsx watch src/index.ts",
48
- "build": "tsc",
49
- "build:ts": "cd v3/@claude-flow/cli && npm run build || true",
50
- "test": "vitest",
51
- "test:ui": "vitest --ui",
52
- "test:security": "vitest run v3/__tests__/security/",
53
- "lint": "cd v3/@claude-flow/cli && npm run lint || true",
54
- "security:audit": "npm audit --audit-level high",
55
- "security:fix": "npm audit fix",
56
- "security:test": "npm run test:security",
57
- "v3:domains": "npm run build:domains",
58
- "v3:swarm": "npm run start:swarm",
59
- "v3:security": "npm run security:audit && npm run security:test"
60
- },
61
- "dependencies": {
62
- "@claude-flow/cli-core": "3.7.0-alpha.5",
63
- "@claude-flow/mcp": "3.0.0-alpha.9",
64
- "@claude-flow/neural": "3.0.0-alpha.9",
65
- "@claude-flow/shared": "3.0.0-alpha.8",
66
- "@noble/ed25519": "2.3.0",
67
- "@ruvector/rabitq-wasm": "0.1.0",
68
- "semver": "7.7.3",
69
- "zod": "3.25.76"
70
- },
71
- "optionalDependencies": {
72
- "@claude-flow/codex": "^3.0.0-alpha.8",
73
- "@claude-flow/plugin-gastown-bridge": "^0.1.3",
74
- "@ruvector/attention": "^0.1.3",
75
- "@ruvector/core": "^0.1.30",
76
- "@ruvector/router": "^0.1.30",
77
- "@ruvector/router-linux-x64-gnu": "^0.1.30",
78
- "@ruvector/sona": "^0.1.5",
79
- "agentdb": "^3.0.0-alpha.17",
80
- "agentic-flow": "^2.0.14"
81
- },
82
- "overrides": {
83
- "ruvector": "^0.2.27",
84
- "better-sqlite3": ">=12.8.0",
85
- "js-yaml": ">=4.3.0",
86
- "hono": ">=4.12.25",
87
- "@ruvector/rvf-wasm": "0.1.5",
88
- "@hono/node-server": ">=1.19.14",
89
- "flatted": ">=3.4.0",
90
- "tar": ">=7.5.11",
91
- "picomatch": ">=4.0.3",
92
- "path-to-regexp": ">=8.2.1",
93
- "undici": ">=8.5.0",
94
- "minimatch": ">=10.0.0",
95
- "@isaacs/brace-expansion": ">=5.0.1",
96
- "cacache": ">=20.0.0",
97
- "make-fetch-happen": ">=15.0.0",
98
- "express-rate-limit": ">=8.4.1",
99
- "express": ">=4.22.2",
100
- "qs": ">=6.15.2",
101
- "protobufjs": ">=8.2.0",
102
- "uuid": ">=14.0.0",
103
- "@opentelemetry/core": ">=2.8.0",
104
- "@opentelemetry/resources": ">=2.8.0",
105
- "@opentelemetry/sdk-trace-base": ">=2.8.0",
106
- "@opentelemetry/sdk-node": ">=0.220.0",
107
- "@opentelemetry/auto-instrumentations-node": ">=0.75.0",
108
- "@opentelemetry/exporter-prometheus": ">=0.220.0",
109
- "@opentelemetry/exporter-trace-otlp-grpc": ">=0.220.0",
110
- "@opentelemetry/exporter-trace-otlp-http": ">=0.220.0",
111
- "@opentelemetry/exporter-trace-otlp-proto": ">=0.220.0",
112
- "@opentelemetry/otlp-exporter-base": ">=0.220.0",
113
- "@opentelemetry/otlp-grpc-exporter-base": ">=0.220.0",
114
- "@opentelemetry/otlp-transformer": ">=0.220.0",
115
- "axios": ">=1.13.2",
116
- "fast-uri": ">=3.1.0",
117
- "vite": ">=8.0.16",
118
- "ws": ">=8.21.0",
119
- "@grpc/grpc-js": ">=1.14.4",
120
- "form-data": ">=4.0.6",
121
- "http-proxy-middleware": ">=3.0.7",
122
- "@ruvector/ruvllm": ">=2.6.0"
123
- },
124
- "devDependencies": {
125
- "@openai/codex": "^0.98.0",
126
- "@types/bcrypt": "^5.0.2",
127
- "@types/node": "^20.0.0",
128
- "eslint": "^8.0.0",
129
- "tsx": "^4.21.0",
130
- "typescript": "^5.0.0",
131
- "vitest": "^3.2.6"
132
- },
133
- "engines": {
134
- "node": ">=20.0.0"
135
- },
136
- "repository": {
137
- "type": "git",
138
- "url": "https://github.com/ruvnet/claude-flow.git"
139
- },
140
- "keywords": [
141
- "ruvflow",
142
- "claude",
143
- "claude-code",
144
- "anthropic",
145
- "ai",
146
- "ai-agents",
147
- "multi-agent",
148
- "agent-orchestration",
149
- "swarm-intelligence",
150
- "swarm",
151
- "mcp",
152
- "model-context-protocol",
153
- "llm",
154
- "large-language-model",
155
- "gpt",
156
- "chatgpt",
157
- "automation",
158
- "workflow",
159
- "orchestration",
160
- "cli",
161
- "developer-tools",
162
- "devtools",
163
- "coding-assistant",
164
- "code-generation",
165
- "enterprise",
166
- "vector-database",
167
- "embeddings",
168
- "machine-learning",
169
- "neural-network",
170
- "hive-mind",
171
- "distributed-systems",
172
- "consensus",
173
- "self-learning"
174
- ],
175
- "author": {
176
- "name": "RuvNet",
177
- "email": "ruv@ruv.io",
178
- "url": "https://ruv.io"
179
- },
180
- "license": "MIT",
181
- "publishConfig": {
182
- "access": "public",
183
- "tag": "latest"
184
- }
185
- }
1
+ {
2
+ "name": "claude-flow",
3
+ "version": "3.32.1",
4
+ "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "claude-flow": "bin/cli.js"
9
+ },
10
+ "homepage": "https://github.com/ruvnet/claude-flow#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/ruvnet/claude-flow/issues",
13
+ "email": "support@ruv.io"
14
+ },
15
+ "funding": {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/ruvnet"
18
+ },
19
+ "files": [
20
+ "bin/**",
21
+ "v3/@claude-flow/cli/bin/**",
22
+ "v3/@claude-flow/cli/dist/**/*.js",
23
+ "v3/@claude-flow/cli/dist/**/*.d.ts",
24
+ "!v3/@claude-flow/cli/dist/**/*.map",
25
+ "v3/@claude-flow/cli/package.json",
26
+ "v3/@claude-flow/cli/catalog-manifest.json",
27
+ "v3/@claude-flow/shared/dist/**/*.js",
28
+ "v3/@claude-flow/shared/dist/**/*.d.ts",
29
+ "!v3/@claude-flow/shared/dist/**/*.map",
30
+ "v3/@claude-flow/shared/package.json",
31
+ "v3/@claude-flow/guidance/dist/**/*.js",
32
+ "v3/@claude-flow/guidance/dist/**/*.d.ts",
33
+ "!v3/@claude-flow/guidance/dist/**/*.map",
34
+ "v3/@claude-flow/guidance/package.json",
35
+ ".claude-plugin/**",
36
+ ".claude/**",
37
+ "!.claude/**/*.db",
38
+ "!.claude/**/*.map",
39
+ "!.claude/worktrees/**",
40
+ "!.claude/projects/**",
41
+ "!.claude/scheduled_tasks.lock",
42
+ "!.claude/sessions/**",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "scripts": {
47
+ "dev": "tsx watch src/index.ts",
48
+ "build": "tsc",
49
+ "build:ts": "cd v3/@claude-flow/cli && npm run build || true",
50
+ "prepublishOnly": "node scripts/prepare-root-publish.mjs",
51
+ "test": "vitest",
52
+ "test:ui": "vitest --ui",
53
+ "test:security": "vitest run v3/__tests__/security/",
54
+ "lint": "cd v3/@claude-flow/cli && npm run lint || true",
55
+ "security:audit": "npm audit --audit-level high",
56
+ "security:fix": "npm audit fix",
57
+ "security:test": "npm run test:security",
58
+ "v3:domains": "npm run build:domains",
59
+ "v3:swarm": "npm run start:swarm",
60
+ "v3:security": "npm run security:audit && npm run security:test"
61
+ },
62
+ "dependencies": {
63
+ "@claude-flow/cli-core": "3.7.0-alpha.5",
64
+ "@claude-flow/mcp": "3.0.0-alpha.9",
65
+ "@claude-flow/neural": "3.0.0-alpha.9",
66
+ "@claude-flow/shared": "3.0.0-alpha.8",
67
+ "@noble/ed25519": "2.3.0",
68
+ "@ruvector/rabitq-wasm": "0.1.0",
69
+ "semver": "7.7.3",
70
+ "zod": "3.25.76"
71
+ },
72
+ "optionalDependencies": {
73
+ "@claude-flow/codex": "^3.0.1",
74
+ "@claude-flow/plugin-gastown-bridge": "^0.1.3",
75
+ "@ruvector/attention": "^0.1.3",
76
+ "@ruvector/core": "^0.1.30",
77
+ "@ruvector/router": "^0.1.30",
78
+ "@ruvector/router-linux-x64-gnu": "^0.1.30",
79
+ "@ruvector/sona": "^0.1.5",
80
+ "agentdb": "^3.0.0-alpha.17",
81
+ "agentic-flow": "^2.0.14"
82
+ },
83
+ "overrides": {
84
+ "ruvector": "^0.2.27",
85
+ "better-sqlite3": ">=12.8.0",
86
+ "js-yaml": ">=4.3.0",
87
+ "hono": ">=4.12.25",
88
+ "@ruvector/rvf-wasm": "0.1.5",
89
+ "@hono/node-server": ">=1.19.14",
90
+ "flatted": ">=3.4.0",
91
+ "tar": ">=7.5.11",
92
+ "picomatch": ">=4.0.3",
93
+ "path-to-regexp": ">=8.2.1",
94
+ "undici": ">=8.5.0",
95
+ "minimatch": ">=10.0.0",
96
+ "@isaacs/brace-expansion": ">=5.0.1",
97
+ "cacache": ">=20.0.0",
98
+ "make-fetch-happen": ">=15.0.0",
99
+ "express-rate-limit": ">=8.4.1",
100
+ "express": ">=4.22.2",
101
+ "qs": ">=6.15.2",
102
+ "protobufjs": ">=8.2.0",
103
+ "uuid": ">=14.0.0",
104
+ "@opentelemetry/core": ">=2.8.0",
105
+ "@opentelemetry/resources": ">=2.8.0",
106
+ "@opentelemetry/sdk-trace-base": ">=2.8.0",
107
+ "@opentelemetry/sdk-node": ">=0.220.0",
108
+ "@opentelemetry/auto-instrumentations-node": ">=0.75.0",
109
+ "@opentelemetry/exporter-prometheus": ">=0.220.0",
110
+ "@opentelemetry/exporter-trace-otlp-grpc": ">=0.220.0",
111
+ "@opentelemetry/exporter-trace-otlp-http": ">=0.220.0",
112
+ "@opentelemetry/exporter-trace-otlp-proto": ">=0.220.0",
113
+ "@opentelemetry/otlp-exporter-base": ">=0.220.0",
114
+ "@opentelemetry/otlp-grpc-exporter-base": ">=0.220.0",
115
+ "@opentelemetry/otlp-transformer": ">=0.220.0",
116
+ "axios": ">=1.13.2",
117
+ "fast-uri": ">=3.1.0",
118
+ "vite": ">=8.0.16",
119
+ "ws": ">=8.21.0",
120
+ "@grpc/grpc-js": ">=1.14.4",
121
+ "form-data": ">=4.0.6",
122
+ "http-proxy-middleware": ">=3.0.7",
123
+ "@ruvector/ruvllm": ">=2.6.0"
124
+ },
125
+ "devDependencies": {
126
+ "@openai/codex": "^0.98.0",
127
+ "@types/bcrypt": "^5.0.2",
128
+ "@types/node": "^20.0.0",
129
+ "eslint": "^8.0.0",
130
+ "tsx": "^4.21.0",
131
+ "typescript": "^5.0.0",
132
+ "vitest": "^3.2.6"
133
+ },
134
+ "engines": {
135
+ "node": ">=20.0.0"
136
+ },
137
+ "repository": {
138
+ "type": "git",
139
+ "url": "https://github.com/ruvnet/claude-flow.git"
140
+ },
141
+ "keywords": [
142
+ "ruvflow",
143
+ "claude",
144
+ "claude-code",
145
+ "anthropic",
146
+ "ai",
147
+ "ai-agents",
148
+ "multi-agent",
149
+ "agent-orchestration",
150
+ "swarm-intelligence",
151
+ "swarm",
152
+ "mcp",
153
+ "model-context-protocol",
154
+ "llm",
155
+ "large-language-model",
156
+ "gpt",
157
+ "chatgpt",
158
+ "automation",
159
+ "workflow",
160
+ "orchestration",
161
+ "cli",
162
+ "developer-tools",
163
+ "devtools",
164
+ "coding-assistant",
165
+ "code-generation",
166
+ "enterprise",
167
+ "vector-database",
168
+ "embeddings",
169
+ "machine-learning",
170
+ "neural-network",
171
+ "hive-mind",
172
+ "distributed-systems",
173
+ "consensus",
174
+ "self-learning"
175
+ ],
176
+ "author": {
177
+ "name": "RuvNet",
178
+ "email": "ruv@ruv.io",
179
+ "url": "https://ruv.io"
180
+ },
181
+ "license": "MIT",
182
+ "publishConfig": {
183
+ "access": "public",
184
+ "tag": "latest"
185
+ }
186
+ }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 1,
4
- "generatedAt": "2026-07-15T18:42:59.914Z",
5
- "gitSha": "8306ad8f",
4
+ "generatedAt": "2026-07-16T23:50:36.870Z",
5
+ "gitSha": "81447ce7",
6
6
  "catalog": {
7
7
  "agents": 164,
8
8
  "tools": 387,
@@ -1404,6 +1404,20 @@ export const doctorCommand = {
1404
1404
  description: 'Verbose output',
1405
1405
  type: 'boolean',
1406
1406
  default: false
1407
+ },
1408
+ {
1409
+ name: 'fix-handles',
1410
+ // Windows-only mitigation for anthropics/claude-code#67888 — Claude Code's
1411
+ // Bash tool spawns cmd.exe/bash.exe without cleaning up child conhost.exe
1412
+ // handles, so a long session accumulates dozens (observed live: 26+
1413
+ // orphaned conhost.exe after a ~4h session). Each holds a kernel object
1414
+ // + ~1MB, and combined with memory pressure this measurably slows the
1415
+ // machine. This flag kills orphan conhost.exe (safe — Windows respawns
1416
+ // on demand). Deliberately does NOT touch cmd.exe/bash.exe — those can
1417
+ // be the invoking shell, and killing them 255's the caller.
1418
+ description: 'Windows only: kill orphaned conhost.exe processes leaked by Claude Code (mitigation for anthropics/claude-code#67888)',
1419
+ type: 'boolean',
1420
+ default: false
1407
1421
  }
1408
1422
  ],
1409
1423
  examples: [
@@ -1411,13 +1425,78 @@ export const doctorCommand = {
1411
1425
  { command: 'claude-flow doctor --fix', description: 'Print suggested fix commands (does not auto-apply)' },
1412
1426
  { command: 'claude-flow doctor --install', description: 'Auto-install missing dependencies' },
1413
1427
  { command: 'claude-flow doctor -c version', description: 'Check for stale npx cache' },
1414
- { command: 'claude-flow doctor -c claude', description: 'Check Claude Code CLI only' }
1428
+ { command: 'claude-flow doctor -c claude', description: 'Check Claude Code CLI only' },
1429
+ { command: 'claude-flow doctor --fix-handles', description: 'Windows: kill leaked conhost.exe from Claude Code sessions' }
1415
1430
  ],
1416
1431
  action: async (ctx) => {
1417
1432
  const showFix = ctx.flags.fix;
1418
1433
  const autoInstall = ctx.flags.install;
1419
1434
  const component = ctx.flags.component;
1420
1435
  const verbose = ctx.flags.verbose;
1436
+ // Parser camelCases kebab-case flag names — read via `fixHandles`, not `['fix-handles']`.
1437
+ const fixHandles = ctx.flags.fixHandles;
1438
+ // Early-return short-circuit: `--fix-handles` is a targeted mitigation, not
1439
+ // part of the health-check flow. Runs, reports, exits.
1440
+ if (fixHandles) {
1441
+ output.writeln();
1442
+ output.writeln(output.bold('RuFlo Doctor — fix-handles'));
1443
+ output.writeln(output.dim('─'.repeat(50)));
1444
+ output.writeln();
1445
+ if (process.platform !== 'win32') {
1446
+ output.printInfo('--fix-handles is a Windows-only mitigation. On this platform (' + process.platform + '), no action taken.');
1447
+ return { success: true };
1448
+ }
1449
+ const { spawnSync } = await import('child_process');
1450
+ // PowerShell one-liner: read before-count, kill conhost, read after-count, report delta.
1451
+ const psScript = [
1452
+ "$before = (Get-Process conhost -EA SilentlyContinue).Count",
1453
+ "$mem_before = [math]::Round((Get-CimInstance Win32_OperatingSystem).FreePhysicalMemory / 1MB, 2)",
1454
+ "$killed = 0",
1455
+ "Get-Process conhost -EA SilentlyContinue | ForEach-Object {",
1456
+ " try { Stop-Process -Id $_.Id -Force -EA Stop; $killed++ } catch {}",
1457
+ "}",
1458
+ "Start-Sleep -Seconds 1",
1459
+ "$after = (Get-Process conhost -EA SilentlyContinue).Count",
1460
+ "$mem_after = [math]::Round((Get-CimInstance Win32_OperatingSystem).FreePhysicalMemory / 1MB, 2)",
1461
+ "Write-Output ('BEFORE_COUNT=' + $before)",
1462
+ "Write-Output ('KILLED=' + $killed)",
1463
+ "Write-Output ('AFTER_COUNT=' + $after)",
1464
+ "Write-Output ('MEM_BEFORE_GB=' + $mem_before)",
1465
+ "Write-Output ('MEM_AFTER_GB=' + $mem_after)",
1466
+ ].join('; ');
1467
+ const res = spawnSync('powershell', ['-NoProfile', '-Command', psScript], {
1468
+ encoding: 'utf-8', timeout: 30000, windowsHide: true,
1469
+ });
1470
+ if (res.status !== 0) {
1471
+ output.printError('PowerShell exited with code ' + res.status);
1472
+ if (res.stderr)
1473
+ output.writeln(output.dim(res.stderr));
1474
+ return { success: false, exitCode: 1 };
1475
+ }
1476
+ const parse = (key) => {
1477
+ const line = (res.stdout || '').split('\n').find((l) => l.startsWith(key + '='));
1478
+ return line ? line.slice(key.length + 1).trim() : '?';
1479
+ };
1480
+ const before = parse('BEFORE_COUNT');
1481
+ const killed = parse('KILLED');
1482
+ const after = parse('AFTER_COUNT');
1483
+ const memBefore = parse('MEM_BEFORE_GB');
1484
+ const memAfter = parse('MEM_AFTER_GB');
1485
+ output.writeln('conhost.exe processes:');
1486
+ output.writeln(' before: ' + before);
1487
+ output.writeln(' killed: ' + output.success(killed));
1488
+ output.writeln(' after: ' + after);
1489
+ output.writeln('');
1490
+ output.writeln('Free RAM:');
1491
+ output.writeln(' before: ' + memBefore + ' GB');
1492
+ output.writeln(' after: ' + memAfter + ' GB');
1493
+ output.writeln('');
1494
+ output.writeln(output.dim('Note: does NOT touch cmd.exe/bash.exe/node.exe — those may be the invoking shell'));
1495
+ output.writeln(output.dim(' or an active MCP server. Kill them manually if you need to.'));
1496
+ output.writeln('');
1497
+ output.writeln(output.dim('Upstream tracking: https://github.com/anthropics/claude-code/issues/67888'));
1498
+ return { success: true };
1499
+ }
1421
1500
  output.writeln();
1422
1501
  output.writeln(output.bold('RuFlo Doctor'));
1423
1502
  output.writeln(output.dim('System diagnostics and health check'));
@@ -3,6 +3,11 @@
3
3
  * Comprehensive initialization for Claude Flow with Claude Code integration
4
4
  */
5
5
  import type { Command } from '../types.js';
6
+ export declare function runCodexInitializerCli(cwd: string, options: {
7
+ template: string;
8
+ force: boolean;
9
+ dual: boolean;
10
+ }): boolean;
6
11
  export declare const initCommand: Command;
7
12
  export default initCommand;
8
13
  //# sourceMappingURL=init.d.ts.map
@@ -6,6 +6,7 @@ import { output } from '../output.js';
6
6
  import { confirm, select, multiSelect, input } from '../prompt.js';
7
7
  import * as fs from 'fs';
8
8
  import * as path from 'path';
9
+ import { spawnSync } from 'node:child_process';
9
10
  import { executeInit, executeUpgrade, executeUpgradeWithMissing, DEFAULT_INIT_OPTIONS, MINIMAL_INIT_OPTIONS, FULL_INIT_OPTIONS, } from '../init/index.js';
10
11
  import { ENROLLMENT_SCREEN, recordEnrollmentOutcome, shouldOfferEnrollment, } from '../funnel/enrollment.js';
11
12
  import { commandExists } from '../services/harness-hosts.js';
@@ -82,6 +83,27 @@ async function resolveCodexInitializer(cwd) {
82
83
  }
83
84
  return undefined;
84
85
  }
86
+ // Keep Codex out of the CLI dependency graph so cold `npx ruflo --version`
87
+ // remains fast (#2561). An explicit `init --codex` may fetch the small,
88
+ // stable adapter on demand when it is not already installed by an umbrella
89
+ // package, the current project, or the global npm prefix.
90
+ export function runCodexInitializerCli(cwd, options) {
91
+ const npxArgs = [
92
+ '-y',
93
+ '@claude-flow/codex@latest',
94
+ 'init',
95
+ '--template',
96
+ options.template,
97
+ ...(options.force ? ['--force'] : []),
98
+ ...(options.dual ? ['--dual'] : []),
99
+ ];
100
+ const result = process.platform === 'win32'
101
+ ? spawnSync(process.env.ComSpec || 'cmd.exe', ['/d', '/s', '/c', ['npx', ...npxArgs].join(' ')], { cwd, stdio: 'inherit', windowsHide: true })
102
+ : spawnSync('npx', npxArgs, { cwd, stdio: 'inherit' });
103
+ if (result.error)
104
+ throw result.error;
105
+ return result.status === 0;
106
+ }
85
107
  // #2666-adjacent — quietly wire up Codex too when a plain `ruflo init` (no
86
108
  // --codex/--dual) runs on a machine that also has the OpenAI Codex CLI on
87
109
  // PATH: registers its MCP server and installs skills alongside the Claude
@@ -194,7 +216,14 @@ async function initCodexAction(ctx, options) {
194
216
  try {
195
217
  const CodexInitializer = await resolveCodexInitializer(ctx.cwd);
196
218
  if (!CodexInitializer) {
197
- throw new Error('Cannot find module @claude-flow/codex');
219
+ spinner.stop();
220
+ output.printInfo('Fetching the stable Codex adapter for this initialization...');
221
+ const success = runCodexInitializerCli(ctx.cwd, { template, force, dual: dualMode });
222
+ if (!success) {
223
+ output.printError('Codex initialization failed while running @claude-flow/codex@latest.');
224
+ return { success: false, exitCode: 1 };
225
+ }
226
+ return { success: true, data: { adapter: '@claude-flow/codex@latest' } };
198
227
  }
199
228
  const initializer = new CodexInitializer();
200
229
  const result = await initializer.initialize({
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.31.3",
3
+ "version": "3.32.1",
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",
7
7
  "types": "dist/src/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "bin": {
10
- "cli": "./bin/cli.js",
11
- "claude-flow": "./bin/cli.js",
12
- "claude-flow-mcp": "./bin/mcp-server.js"
10
+ "cli": "bin/cli.js",
11
+ "claude-flow": "bin/cli.js",
12
+ "claude-flow-mcp": "bin/mcp-server.js"
13
13
  },
14
14
  "homepage": "https://github.com/ruvnet/claude-flow#readme",
15
15
  "bugs": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "https://github.com/ruvnet/claude-flow.git",
20
+ "url": "git+https://github.com/ruvnet/claude-flow.git",
21
21
  "directory": "v3/@claude-flow/cli"
22
22
  },
23
23
  "keywords": [
@@ -90,8 +90,9 @@
90
90
  "test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
91
91
  "test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
92
92
  "postinstall": "node ./scripts/postinstall.cjs",
93
- "prepublishOnly": "cp ../../../README.md ./README.md && rm -rf plugins && mkdir -p plugins && cp -r ../../../plugins/ruflo-metaharness plugins/ && node scripts/generate-catalog-manifest.mjs && node scripts/sign-helpers.mjs && node scripts/verify-helpers.mjs",
94
- "release": "npm version prerelease --preid=alpha && npm run publish:all",
93
+ "prepublishOnly": "node scripts/prepare-publish.mjs",
94
+ "release": "npm publish --access public --tag latest",
95
+ "release:alpha": "npm version prerelease --preid=alpha && npm run publish:all",
95
96
  "publish:all": "./scripts/publish.sh"
96
97
  },
97
98
  "devDependencies": {
@@ -1 +0,0 @@
1
- sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319
@@ -1 +0,0 @@
1
- 3.29.0
@@ -1,13 +0,0 @@
1
- {
2
- "manifest": {
3
- "version": "3.29.0",
4
- "files": {
5
- "auto-memory-hook.mjs": "e3e1033b24704992ddef6b31c7fa9dd7fcd9e1af7935dd77ef73402b916b31e6",
6
- "hook-handler.cjs": "f51fb035d8a4110fdf763cee2913e285bcdbbaa618cbee980e032f89ffaf89d2",
7
- "intelligence.cjs": "5a55d979cb7ba5c8c4f27f3b2e6d686fbb1045d180023b803da672a37e05b915",
8
- "statusline.cjs": "8416172e504b03f9ec2266a47bba048578c3b1e30c5c7c97a0a8261460cd601d"
9
- }
10
- },
11
- "signature": "F0YZmNYCOnPOkf/kqbUoXtZ/jfYsX+Mn3QTGvtR6dafHx+oZ4uoobOKu/GYls+z+vHN2beL9c9GK53YKB1txBA==",
12
- "algorithm": "ed25519"
13
- }