@claude-flow/cli 3.59.0 → 3.59.2

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.
@@ -1 +1 @@
1
- 3.58.1
1
+ 3.57.1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": {
3
- "version": "3.59.0",
3
+ "version": "3.59.2",
4
4
  "files": {
5
5
  "auto-memory-hook.mjs": "631fac9d518835e2852a406888316bbbddddb49e7ed8e406d2e971f46833df9a",
6
6
  "hook-handler.cjs": "bc12b3cae92d5a7c8deef699fa00d0ef07b57625c18dbeac4387f15725b8e09f",
@@ -9,6 +9,6 @@
9
9
  "router.cjs": "16648b3c0d73b6681ac2d8d13def6a68286c57f5a11004de5b19a0fa088c833d"
10
10
  }
11
11
  },
12
- "signature": "UrFyN2y6q5foVIweriwE/tsGvYgR5pBWKnPJkKeUEUUI+8ifRmCaKfGsHTwDPogYDcwXM6RHNtP64blacDCcDQ==",
12
+ "signature": "BaO3xf+Vgrc1iHgi5jGtzv+4AXCXigO1MNLDYzT2cbock4gHf1QCwGOc7De47Q60u8WNvj+aMDC+bO/lUlogAg==",
13
13
  "algorithm": "ed25519"
14
14
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 7,
4
- "generatedAt": "2026-10-20T13:46:43.984Z",
5
- "gitSha": "f8b432f1",
4
+ "generatedAt": "2026-10-21T01:00:21.045Z",
5
+ "gitSha": "2276232b",
6
6
  "catalog": {
7
7
  "agents": 176,
8
8
  "tools": 432,
@@ -363,7 +363,7 @@ const statusCommand = {
363
363
  `Progress: ${result.progress}%`,
364
364
  '',
365
365
  `Description: ${result.description}`
366
- ].join('\n'), `Task: ${result.id}`);
366
+ ].join('\n'), `Task: ${result.taskId}`);
367
367
  // Assignment info
368
368
  output.writeln();
369
369
  output.writeln(output.bold('Assignment'));
@@ -487,6 +487,18 @@ const cancelCommand = {
487
487
  taskId,
488
488
  reason: reason || 'Cancelled by user via CLI'
489
489
  });
490
+ // task_cancel answers an unknown or already-finished task with
491
+ // success: false instead of throwing; report it instead of printing
492
+ // "Task ... cancelled" and exiting 0.
493
+ if (result.success === false) {
494
+ if (ctx.flags.format === 'json') {
495
+ output.printJson(result);
496
+ }
497
+ else {
498
+ output.printError(`Failed to cancel task ${taskId}: ${result.error || 'unknown error'}`);
499
+ }
500
+ return { success: false, exitCode: 1, data: result };
501
+ }
490
502
  output.writeln();
491
503
  output.printSuccess(`Task ${taskId} cancelled`);
492
504
  output.printInfo(`Previous status: ${result.previousStatus}`);
@@ -8,7 +8,8 @@
8
8
  * No bundle is a message and exit 1, never a crash; ruflo stays operational without it. Without a terminal (a pipe, CI) the live view cannot run:
9
9
  * a one-line hint and exit 2, unless --plain asks for one frame as plain text and exit 0 (ADR-489 decision E).
10
10
  *
11
- * npx ruflo tui # interactive, in a terminal
11
+ * npx ruflo tui # interactive, in a terminal (mouse on: click a page in the bar, scroll with the wheel)
12
+ * npx ruflo tui --no-mouse # keyboard only, if SGR mouse reporting fights your terminal's text selection
12
13
  * npx ruflo tui --view swarm # start on the Swarm page (keys 1-6 or o c s e m a switch pages)
13
14
  * npx ruflo tui --plain | head # one plain frame, exit 0 (scripts, CI)
14
15
  * npx ruflo tui | cat # not a terminal and no --plain: a hint on stderr, exit 2
@@ -45,7 +46,10 @@ export function lookFlags(flags) {
45
46
  ...(flags?.anim === false ? { anim: false } : {}),
46
47
  ...(flags?.pictures === false ? { pictures: false } : {}),
47
48
  ...(flags?.boot === true ? { boot: true } : {}),
48
- ...(flags?.mouse === true ? { mouse: true } : {}),
49
+ // Mouse defaults ON at the CLI layer (the runTui library itself still defaults off, unchanged for other
50
+ // callers/tests): only --no-mouse turns it off. The CLI must say so explicitly either way rather than
51
+ // omit the key, since (unlike anim/pictures) the CLI's default disagrees with the library's own default.
52
+ ...{ mouse: flags?.mouse !== false },
49
53
  };
50
54
  }
51
55
  /** The AI page's settings from the flags (and one environment variable for the endpoint list). Absent flags leave the defaults; a bad number is ignored, never passed on. */
@@ -69,12 +73,13 @@ export const tuiCommand = {
69
73
  { name: 'fps', description: 'Frames per second for moving pictures, 0-30 (default 8; 0 draws every picture still)', type: 'number' },
70
74
  { name: 'anim', description: 'Animate the pictures. --no-anim draws them still', type: 'boolean', default: true },
71
75
  { name: 'pictures', description: 'Draw the pictures of the console (title art, swarm graph, gauges). --no-pictures shows their words only', type: 'boolean', default: true },
72
- { name: 'mouse', description: 'Read mouse reports: click a page in the bar, scroll with the wheel (every action also has a key)', type: 'boolean', default: false },
76
+ { name: 'mouse', description: 'Read mouse reports: click a page in the bar, scroll with the wheel (every action also has a key). On by default; --no-mouse turns it off if SGR reporting fights your terminal\'s text selection', type: 'boolean', default: true },
73
77
  { name: 'boot', description: 'Play the look\'s start-up screen first (as the console\'s boot setting)', type: 'boolean', default: false },
74
78
  { name: 'plain', description: 'Print one frame as plain text and exit 0 (scripts and CI). Without it, a non-terminal gets a hint and exit 2', type: 'boolean', default: false },
75
79
  ],
76
80
  examples: [
77
- { command: 'npx ruflo tui', description: 'Open the console in this terminal' },
81
+ { command: 'npx ruflo tui', description: 'Open the console in this terminal (mouse on: click a page in the bar, scroll with the wheel)' },
82
+ { command: 'npx ruflo tui --no-mouse', description: 'Keyboard only, if SGR mouse reporting fights your terminal\'s text selection' },
78
83
  { command: 'npx ruflo tui --view swarm', description: 'Start on the Swarm page (keys 1-6 switch pages, tab cycles, q quits)' },
79
84
  { command: 'npx ruflo tui --view ai --model openai/gpt-4o-mini --max-spend-usd 0.1', description: 'The AI page on a cheap OpenRouter model, stopping at $0.10 reported (key in $OPENROUTER_API_KEY, never shown)' },
80
85
  { command: 'npx ruflo tui --plain | head -40', description: 'One plain frame, exit 0: for scripts and CI (no terminal needed)' },
@@ -499,6 +499,18 @@ export const taskTools = [
499
499
  const taskId = input.taskId;
500
500
  const task = store.tasks[taskId];
501
501
  if (task) {
502
+ const previousStatus = task.status;
503
+ // A finished task keeps its outcome: cancelling it used to overwrite a
504
+ // completed task's result and completedAt with a cancel reason.
505
+ if (previousStatus === 'completed' || previousStatus === 'failed' || previousStatus === 'cancelled') {
506
+ return {
507
+ success: false,
508
+ taskId,
509
+ status: previousStatus,
510
+ previousStatus,
511
+ error: `Task is already ${previousStatus}`,
512
+ };
513
+ }
502
514
  task.status = 'cancelled';
503
515
  task.completedAt = new Date().toISOString();
504
516
  task.result = { cancelReason: input.reason || 'Cancelled by user' };
@@ -508,6 +520,7 @@ export const taskTools = [
508
520
  success: true,
509
521
  taskId: task.taskId,
510
522
  status: task.status,
523
+ previousStatus,
511
524
  cancelledAt: task.completedAt,
512
525
  };
513
526
  }
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.59.0",
3
+ "version": "3.59.2",
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",