claude-flow 3.5.16 → 3.5.17
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.5.
|
|
3
|
+
"version": "3.5.17",
|
|
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",
|
|
@@ -5,6 +5,40 @@
|
|
|
5
5
|
import { output } from '../output.js';
|
|
6
6
|
import { select, confirm, input } from '../prompt.js';
|
|
7
7
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
8
|
+
import * as fs from 'fs';
|
|
9
|
+
import * as path from 'path';
|
|
10
|
+
/**
|
|
11
|
+
* Update swarm-activity.json metrics after agent count changes.
|
|
12
|
+
* The statusline reads this file to display the swarm agent count.
|
|
13
|
+
*/
|
|
14
|
+
function updateSwarmActivityMetrics(agentCountDelta) {
|
|
15
|
+
try {
|
|
16
|
+
const metricsDir = path.join(process.cwd(), '.claude-flow', 'metrics');
|
|
17
|
+
const activityPath = path.join(metricsDir, 'swarm-activity.json');
|
|
18
|
+
let data = {
|
|
19
|
+
timestamp: new Date().toISOString(),
|
|
20
|
+
swarm: { active: false, agent_count: 0, coordination_active: false },
|
|
21
|
+
};
|
|
22
|
+
if (fs.existsSync(activityPath)) {
|
|
23
|
+
data = JSON.parse(fs.readFileSync(activityPath, 'utf-8'));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
fs.mkdirSync(metricsDir, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
const swarm = data.swarm ?? {};
|
|
29
|
+
const currentCount = Math.max(0, swarm.agent_count || 0);
|
|
30
|
+
const newCount = Math.max(0, currentCount + agentCountDelta);
|
|
31
|
+
swarm.agent_count = newCount;
|
|
32
|
+
swarm.active = newCount > 0;
|
|
33
|
+
swarm.coordination_active = newCount > 0;
|
|
34
|
+
data.swarm = swarm;
|
|
35
|
+
data.timestamp = new Date().toISOString();
|
|
36
|
+
fs.writeFileSync(activityPath, JSON.stringify(data, null, 2));
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// Non-critical — don't fail the command if metrics update fails
|
|
40
|
+
}
|
|
41
|
+
}
|
|
8
42
|
// Available agent types with descriptions
|
|
9
43
|
const AGENT_TYPES = [
|
|
10
44
|
{ value: 'coder', label: 'Coder', hint: 'Code development with neural patterns' },
|
|
@@ -130,6 +164,8 @@ const spawnCommand = {
|
|
|
130
164
|
});
|
|
131
165
|
output.writeln();
|
|
132
166
|
output.printSuccess(`Agent ${agentName} spawned successfully`);
|
|
167
|
+
// Update swarm-activity.json so statusline reflects the new agent count
|
|
168
|
+
updateSwarmActivityMetrics(1);
|
|
133
169
|
if (ctx.flags.format === 'json') {
|
|
134
170
|
output.printJson(result);
|
|
135
171
|
}
|
|
@@ -350,6 +386,8 @@ const stopCommand = {
|
|
|
350
386
|
output.writeln(output.dim(' Releasing resources...'));
|
|
351
387
|
}
|
|
352
388
|
output.printSuccess(`Agent ${agentId} stopped successfully`);
|
|
389
|
+
// Update swarm-activity.json so statusline reflects the reduced agent count
|
|
390
|
+
updateSwarmActivityMetrics(-1);
|
|
353
391
|
if (ctx.flags.format === 'json') {
|
|
354
392
|
output.printJson(result);
|
|
355
393
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.17",
|
|
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",
|