claude-flow 3.32.12 → 3.32.13
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.
|
|
3
|
+
"version": "3.32.13",
|
|
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",
|
|
@@ -644,15 +644,54 @@ const routeCommand = {
|
|
|
644
644
|
description: 'Number of top agent suggestions',
|
|
645
645
|
type: 'number',
|
|
646
646
|
default: 3
|
|
647
|
-
}
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
// #2778 dream-cycle — Mixture-of-Agents test-time scaling.
|
|
650
|
+
// When `--mode moa` is set AND the router would have chosen a
|
|
651
|
+
// Tier-3 model (Sonnet/Opus), swap to N parallel Tier-2 (Haiku)
|
|
652
|
+
// calls + majority-vote consensus. Grade-A ACL 2026 SRW evidence
|
|
653
|
+
// (arXiv 2605.01566): +2.7pp accuracy at equal-cost when parallel
|
|
654
|
+
// generations exceed sequential aggregations.
|
|
655
|
+
name: 'mode',
|
|
656
|
+
description: 'Routing mode: single (default) or moa (mixture-of-agents fanout, #2778)',
|
|
657
|
+
type: 'string',
|
|
658
|
+
choices: ['single', 'moa'],
|
|
659
|
+
default: 'single',
|
|
660
|
+
},
|
|
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',
|
|
670
|
+
description: 'MoA fanout width (N parallel calls at Haiku tier; only meaningful when --mode=moa)',
|
|
671
|
+
type: 'number',
|
|
672
|
+
default: 3,
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
name: 'consensus',
|
|
676
|
+
description: 'MoA consensus strategy: majority-vote (default) or best-confidence',
|
|
677
|
+
type: 'string',
|
|
678
|
+
choices: ['majority-vote', 'best-confidence'],
|
|
679
|
+
default: 'majority-vote',
|
|
680
|
+
},
|
|
648
681
|
],
|
|
649
682
|
examples: [
|
|
650
|
-
{ command: 'claude-flow hooks route -t "Fix authentication bug"', description: 'Route task to optimal agent' },
|
|
651
|
-
{ command: 'claude-flow hooks route -t "Optimize database queries" -K 5', description: 'Get top 5 suggestions' }
|
|
683
|
+
{ command: 'claude-flow hooks route -t "Fix authentication bug"', description: 'Route task to optimal agent (single mode)' },
|
|
684
|
+
{ 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)' },
|
|
652
686
|
],
|
|
653
687
|
action: async (ctx) => {
|
|
654
688
|
const task = ctx.flags.task || ctx.args[0];
|
|
655
689
|
const topK = ctx.flags.topK || 3;
|
|
690
|
+
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);
|
|
694
|
+
const consensus = ctx.flags.consensus || 'majority-vote';
|
|
656
695
|
if (!task) {
|
|
657
696
|
output.printError('Task description is required. Use --task or -t flag.');
|
|
658
697
|
return { success: false, exitCode: 1 };
|
|
@@ -666,6 +705,35 @@ const routeCommand = {
|
|
|
666
705
|
topK,
|
|
667
706
|
includeEstimates: true,
|
|
668
707
|
});
|
|
708
|
+
// #2778 — compute the MoA plan BEFORE the JSON output branch so
|
|
709
|
+
// programmatic callers see `moaPlan` in the JSON result too.
|
|
710
|
+
let moaPlan = null;
|
|
711
|
+
if (mode === 'moa') {
|
|
712
|
+
const complexity = result.estimatedMetrics?.complexity ?? 'medium';
|
|
713
|
+
const wouldTier3 = complexity === 'high';
|
|
714
|
+
const primaryAgent = result.primaryAgent.type;
|
|
715
|
+
const agents = Array.from({ length: parallel }, (_, i) => ({
|
|
716
|
+
name: `moa-${primaryAgent}-${i + 1}`,
|
|
717
|
+
model: 'haiku',
|
|
718
|
+
role: primaryAgent,
|
|
719
|
+
}));
|
|
720
|
+
moaPlan = {
|
|
721
|
+
mode: 'moa',
|
|
722
|
+
parallel,
|
|
723
|
+
tier: 'tier2-haiku',
|
|
724
|
+
consensus,
|
|
725
|
+
rationale: wouldTier3
|
|
726
|
+
? `Complexity=${complexity} would tier-3 (Sonnet/Opus). MoA fanout — ${parallel}× Haiku is typically <1× Sonnet cost (arXiv 2605.01566: +2.7pp at equal cost).`
|
|
727
|
+
: `Complexity=${complexity} — MoA still available as a diversity mechanism, but the single-agent path is usually the cost-optimal choice below Tier-3.`,
|
|
728
|
+
agents,
|
|
729
|
+
synthesizer: {
|
|
730
|
+
name: `moa-synth-${primaryAgent}`,
|
|
731
|
+
model: 'haiku',
|
|
732
|
+
role: 'synthesizer',
|
|
733
|
+
},
|
|
734
|
+
};
|
|
735
|
+
result.moaPlan = moaPlan;
|
|
736
|
+
}
|
|
669
737
|
if (ctx.flags.format === 'json') {
|
|
670
738
|
output.printJson(result);
|
|
671
739
|
return { success: true, data: result };
|
|
@@ -719,6 +787,23 @@ const routeCommand = {
|
|
|
719
787
|
`Complexity: ${result.estimatedMetrics.complexity.toUpperCase()}`
|
|
720
788
|
]);
|
|
721
789
|
}
|
|
790
|
+
// #2778 dream-cycle — render the MoA plan to text output. moaPlan
|
|
791
|
+
// was already spliced into the result above so JSON consumers see it.
|
|
792
|
+
if (mode === 'moa' && moaPlan) {
|
|
793
|
+
const primaryAgent = result.primaryAgent.type;
|
|
794
|
+
output.writeln();
|
|
795
|
+
output.writeln(output.bold('Mixture-of-Agents Plan (#2778)'));
|
|
796
|
+
output.printList([
|
|
797
|
+
`Mode: moa`,
|
|
798
|
+
`Fanout: ${parallel} parallel ${primaryAgent} × Haiku`,
|
|
799
|
+
`Consensus: ${consensus}`,
|
|
800
|
+
`Synthesizer: 1 Haiku agent (${consensus} over ${parallel} verdicts)`,
|
|
801
|
+
]);
|
|
802
|
+
output.writeln();
|
|
803
|
+
output.printBox(`Spawn ${parallel} background Task calls with model="haiku" and subagent_type="${primaryAgent}"\n` +
|
|
804
|
+
`then a synthesizer Task ("moa-synth-${primaryAgent}") that reads all ${parallel} results and picks the ${consensus === 'majority-vote' ? 'majority answer' : 'highest-confidence answer'}.\n\n` +
|
|
805
|
+
`Cost note: ${parallel}× Haiku is typically <1× Sonnet on comparable complexity — see arXiv 2605.01566 for the ACL 2026 evidence.`, 'MoA Execution Directive');
|
|
806
|
+
}
|
|
722
807
|
return { success: true, data: result };
|
|
723
808
|
}
|
|
724
809
|
catch (error) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.32.
|
|
3
|
+
"version": "3.32.13",
|
|
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",
|