claude-flow 3.59.1 → 3.59.3

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,5 +1,5 @@
1
1
  {
2
- "adoptedAt": 1792516520191,
2
+ "adoptedAt": 1792547603690,
3
3
  "championId": "sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319",
4
4
  "manifest": {
5
5
  "schema": "ruflo.proven-config/v1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.59.1",
3
+ "version": "3.59.3",
4
4
  "workspaces": [
5
5
  "v3/@claude-flow/codex",
6
6
  "v3/@claude-flow/mcp",
@@ -369,11 +369,23 @@ if (isHarness) {
369
369
  const { CLI } = await import('../dist/src/index.js');
370
370
  const cli = new CLI();
371
371
  cli.run()
372
- .then(() => {
373
- // #1552: Exit cleanly after one-shot commands.
374
- // Long-running commands (daemon foreground, mcp, status --watch) never resolve,
375
- // so this only fires for normal CLI commands.
376
- process.exit(0);
372
+ .then(async () => {
373
+ // #1552: one-shot commands can leave the memory ControllerRegistry's
374
+ // database handles and timers alive. Close them before relying on the
375
+ // event loop to drain.
376
+ //
377
+ // #3226: calling process.exit(0) here used to race that teardown and
378
+ // intermittently abort on Windows with a libuv UV_HANDLE_CLOSING
379
+ // assertion *after* the command had printed a successful result. Set
380
+ // the exit status and let the loop drain instead.
381
+ if (process.exitCode === undefined) process.exitCode = 0;
382
+ try {
383
+ const { shutdownBridge } = await import('../dist/src/memory/memory-bridge.js');
384
+ if (typeof shutdownBridge === 'function') await shutdownBridge();
385
+ } catch {
386
+ // Cleanup is best-effort: it must never turn a successful command into
387
+ // a failure. Commands that do not use memory simply have nothing to do.
388
+ }
377
389
  })
378
390
  .catch((error) => {
379
391
  console.error('Fatal error:', error.message);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 7,
4
- "generatedAt": "2026-10-20T17:15:56.251Z",
5
- "gitSha": "9271be48",
4
+ "generatedAt": "2026-10-21T01:53:55.354Z",
5
+ "gitSha": "eb808c24",
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}`);
@@ -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
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.59.1",
3
+ "version": "3.59.3",
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",