claude-flow 3.32.13 → 3.32.14

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.32.13",
3
+ "version": "3.32.14",
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",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 1,
4
- "generatedAt": "2026-07-27T00:32:05.924Z",
5
- "gitSha": "a17a597b",
4
+ "generatedAt": "2026-07-27T02:19:54.128Z",
5
+ "gitSha": "8a884a06",
6
6
  "catalog": {
7
7
  "agents": 164,
8
8
  "tools": 387,
@@ -659,17 +659,26 @@ const routeCommand = {
659
659
  default: 'single',
660
660
  },
661
661
  {
662
- // #2778 deliberately NOT `parallel` (short 'p'). Both swarm.ts and
663
- // workflow.ts declare `--parallel` as a BOOLEAN, and the parser's
664
- // global boolean-flag registry pollutes subcommand-scoped numeric
665
- // flags with the same name (parseFlag then treats `--parallel 7` as
666
- // `parallel:true` and drops the value). Using a distinct name avoids
667
- // the collision without touching parser semantics that other
668
- // subcommands rely on.
669
- name: 'moa-parallel',
662
+ // #2778 canonical fanout-width flag. Restored to `--parallel` in
663
+ // v3.32.14 after the parser scoping fix landed (subcommand's
664
+ // non-boolean declaration now overrides the global boolean set,
665
+ // so `--parallel 7` on `hooks route` no longer collides with the
666
+ // boolean `--parallel` on `swarm start` / `workflow run`).
667
+ // NOTE: no `default:` here default is resolved in the action so
668
+ // we can distinguish "user explicitly passed --parallel" from
669
+ // "user passed --moa-parallel (the v3.32.13 compat alias)". Without
670
+ // this, the parser's applied default would shadow the alias.
671
+ name: 'parallel',
672
+ short: 'p',
670
673
  description: 'MoA fanout width (N parallel calls at Haiku tier; only meaningful when --mode=moa)',
671
674
  type: 'number',
672
- default: 3,
675
+ },
676
+ {
677
+ // v3.32.13 compat alias — kept so any users who upgraded to that
678
+ // release keep working. Prefer `--parallel` going forward.
679
+ name: 'moa-parallel',
680
+ description: 'DEPRECATED alias for --parallel (kept for v3.32.13 backward compat)',
681
+ type: 'number',
673
682
  },
674
683
  {
675
684
  name: 'consensus',
@@ -682,15 +691,20 @@ const routeCommand = {
682
691
  examples: [
683
692
  { command: 'claude-flow hooks route -t "Fix authentication bug"', description: 'Route task to optimal agent (single mode)' },
684
693
  { command: 'claude-flow hooks route -t "Optimize database queries" -K 5', description: 'Get top 5 suggestions' },
685
- { command: 'claude-flow hooks route -t "Design payment webhook" --mode moa --moa-parallel 3', description: 'MoA fanout: 3× Haiku + consensus (dream-cycle #2778)' },
694
+ { command: 'claude-flow hooks route -t "Design payment webhook" --mode moa --parallel 3', description: 'MoA fanout: 3× Haiku + consensus (dream-cycle #2778)' },
686
695
  ],
687
696
  action: async (ctx) => {
688
697
  const task = ctx.flags.task || ctx.args[0];
689
698
  const topK = ctx.flags.topK || 3;
690
699
  const mode = ctx.flags.mode || 'single';
691
- // #2778 flag is --moa-parallel (parser normalizes to camelCase moaParallel)
692
- // to avoid collision with the boolean --parallel from swarm/workflow.
693
- const parallel = Math.max(2, ctx.flags.moaParallel || 3);
700
+ // #2778: prefer canonical --parallel; fall back to --moa-parallel
701
+ // (v3.32.13 compat alias). Nullish coalescing so an explicit 0 still
702
+ // falls through to the alias / default, and neither flag being set
703
+ // resolves to 3 (the ACL 2026 SRW paper's baseline fanout width).
704
+ const parallelRaw = ctx.flags.parallel
705
+ ?? ctx.flags.moaParallel
706
+ ?? 3;
707
+ const parallel = Math.max(2, parallelRaw);
694
708
  const consensus = ctx.flags.consensus || 'majority-vote';
695
709
  if (!task) {
696
710
  output.printError('Task description is required. Use --task or -t flag.');
@@ -78,6 +78,20 @@ export declare class CommandParser {
78
78
  private buildScopedAliases;
79
79
  /**
80
80
  * Get boolean flags scoped to a specific command/subcommand.
81
+ *
82
+ * `getBooleanFlags()` walks EVERY command + subcommand in the registry
83
+ * and adds their boolean options into one flat set. That's convenient
84
+ * for the common case but causes cross-subcommand pollution: if `swarm
85
+ * start --parallel` is boolean AND `hooks route --parallel` is numeric,
86
+ * the flat set marks `parallel` as boolean, and `hooks route --parallel 7`
87
+ * drops the `7` as a positional (parseFlag treats booleanFlags-hit as
88
+ * "consume no value"). This is the exact bug that forced the
89
+ * --moa-parallel rename in the 2026-07-26 dream-cycle #2778 fix.
90
+ *
91
+ * Fix: if the resolved subcommand declares the flag as a non-boolean
92
+ * type, REMOVE it from the boolean set. Narrowest scope wins.
93
+ * (Documented via in-tree comment in commands/hooks.ts and the #2778
94
+ * commit message.)
81
95
  */
82
96
  private getScopedBooleanFlags;
83
97
  private getBooleanFlags;
@@ -406,13 +406,34 @@ export class CommandParser {
406
406
  }
407
407
  /**
408
408
  * Get boolean flags scoped to a specific command/subcommand.
409
+ *
410
+ * `getBooleanFlags()` walks EVERY command + subcommand in the registry
411
+ * and adds their boolean options into one flat set. That's convenient
412
+ * for the common case but causes cross-subcommand pollution: if `swarm
413
+ * start --parallel` is boolean AND `hooks route --parallel` is numeric,
414
+ * the flat set marks `parallel` as boolean, and `hooks route --parallel 7`
415
+ * drops the `7` as a positional (parseFlag treats booleanFlags-hit as
416
+ * "consume no value"). This is the exact bug that forced the
417
+ * --moa-parallel rename in the 2026-07-26 dream-cycle #2778 fix.
418
+ *
419
+ * Fix: if the resolved subcommand declares the flag as a non-boolean
420
+ * type, REMOVE it from the boolean set. Narrowest scope wins.
421
+ * (Documented via in-tree comment in commands/hooks.ts and the #2778
422
+ * commit message.)
409
423
  */
410
424
  getScopedBooleanFlags(resolvedCmd) {
411
425
  const flags = this.getBooleanFlags();
412
426
  if (resolvedCmd?.options) {
413
427
  for (const opt of resolvedCmd.options) {
428
+ const key = this.normalizeKey(opt.name);
414
429
  if (opt.type === 'boolean') {
415
- flags.add(this.normalizeKey(opt.name));
430
+ flags.add(key);
431
+ }
432
+ else if (opt.type) {
433
+ // Subcommand explicitly re-declares this flag as a non-boolean
434
+ // type (string/number/array) — narrowest scope wins, so drop
435
+ // it from the boolean set to override any global pollution.
436
+ flags.delete(key);
416
437
  }
417
438
  }
418
439
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.32.13",
3
+ "version": "3.32.14",
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",