claude-flow 3.5.15 → 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.15",
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
  }
@@ -2805,7 +2805,7 @@ const statuslineCommand = {
2805
2805
  function getUserInfo() {
2806
2806
  let name = 'user';
2807
2807
  let gitBranch = '';
2808
- const modelName = 'Opus 4.5';
2808
+ const modelName = 'Opus 4.6 (1M context)';
2809
2809
  const isWindows = process.platform === 'win32';
2810
2810
  try {
2811
2811
  const nameCmd = isWindows
@@ -13,7 +13,7 @@ import type { InitOptions } from './types.js';
13
13
  /**
14
14
  * Generate optimized statusline script
15
15
  * Output format:
16
- * ▊ RuFlo V3 ● user │ ⎇ branch │ Opus 4.6
16
+ * ▊ RuFlo V3.5 ● user │ ⎇ branch │ Opus 4.6 (1M context)
17
17
  * ─────────────────────────────────────────────────────
18
18
  * 🏗️ DDD Domains [●●○○○] 2/5 ⚡ HNSW 150x
19
19
  * 🤖 Swarm ◉ [ 5/15] 👥 2 🪝 10/17 🟢 CVE 3/3 💾 4MB 🧠 63%
@@ -12,7 +12,7 @@
12
12
  /**
13
13
  * Generate optimized statusline script
14
14
  * Output format:
15
- * ▊ RuFlo V3 ● user │ ⎇ branch │ Opus 4.6
15
+ * ▊ RuFlo V3.5 ● user │ ⎇ branch │ Opus 4.6 (1M context)
16
16
  * ─────────────────────────────────────────────────────
17
17
  * 🏗️ DDD Domains [●●○○○] 2/5 ⚡ HNSW 150x
18
18
  * 🤖 Swarm ◉ [ 5/15] 👥 2 🪝 10/17 🟢 CVE 3/3 💾 4MB 🧠 63%
@@ -175,7 +175,7 @@ function getModelName() {
175
175
  const ts = usage[id] && usage[id].lastUsedAt ? new Date(usage[id].lastUsedAt).getTime() : 0;
176
176
  if (ts > latest) { latest = ts; modelId = id; }
177
177
  }
178
- if (modelId.includes('opus')) return 'Opus 4.6';
178
+ if (modelId.includes('opus')) return 'Opus 4.6 (1M context)';
179
179
  if (modelId.includes('sonnet')) return 'Sonnet 4.6';
180
180
  if (modelId.includes('haiku')) return 'Haiku 4.5';
181
181
  return modelId.split('-').slice(1, 3).join(' ');
@@ -191,7 +191,7 @@ function getModelName() {
191
191
  const settings = getSettings();
192
192
  if (settings && settings.model) {
193
193
  const m = settings.model;
194
- if (m.includes('opus')) return 'Opus 4.6';
194
+ if (m.includes('opus')) return 'Opus 4.6 (1M context)';
195
195
  if (m.includes('sonnet')) return 'Sonnet 4.6';
196
196
  if (m.includes('haiku')) return 'Haiku 4.5';
197
197
  }
@@ -578,7 +578,7 @@ function generateStatusline() {
578
578
  const lines = [];
579
579
 
580
580
  // Header
581
- let header = c.bold + c.brightPurple + '\\u258A RuFlo V3 ' + c.reset;
581
+ let header = c.bold + c.brightPurple + '\\u258A RuFlo V3.5 ' + c.reset;
582
582
  header += (swarm.coordinationActive ? c.brightCyan : c.dim) + '\\u25CF ' + c.brightCyan + git.name + c.reset;
583
583
  if (git.gitBranch) {
584
584
  header += ' ' + c.dim + '\\u2502' + c.reset + ' ' + c.brightBlue + '\\u23C7 ' + git.gitBranch + c.reset;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.5.15",
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",