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 +1 -1
- package/v3/@claude-flow/cli/catalog-manifest.json +2 -2
- package/v3/@claude-flow/cli/dist/src/commands/hooks.js +27 -13
- package/v3/@claude-flow/cli/dist/src/parser.d.ts +14 -0
- package/v3/@claude-flow/cli/dist/src/parser.js +22 -1
- package/v3/@claude-flow/cli/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.32.
|
|
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",
|
|
@@ -659,17 +659,26 @@ const routeCommand = {
|
|
|
659
659
|
default: 'single',
|
|
660
660
|
},
|
|
661
661
|
{
|
|
662
|
-
// #2778
|
|
663
|
-
//
|
|
664
|
-
//
|
|
665
|
-
//
|
|
666
|
-
//
|
|
667
|
-
//
|
|
668
|
-
//
|
|
669
|
-
|
|
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
|
-
|
|
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 --
|
|
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
|
|
692
|
-
//
|
|
693
|
-
|
|
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(
|
|
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.
|
|
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",
|