claude-flow 3.31.3 → 3.32.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.32.0",
|
|
4
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
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -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'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.32.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",
|