@claude-flow/cli 3.0.0-alpha.158 → 3.0.0-alpha.159
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/dist/src/commands/agent.js +7 -7
- package/dist/src/commands/analyze.js +1 -1
- package/dist/src/commands/hive-mind.js +12 -12
- package/dist/src/commands/hooks.js +31 -31
- package/dist/src/commands/mcp.js +26 -26
- package/dist/src/commands/memory.js +5 -5
- package/dist/src/commands/progress.js +4 -4
- package/dist/src/commands/session.js +9 -9
- package/dist/src/commands/start.js +5 -5
- package/dist/src/commands/status.js +7 -7
- package/dist/src/commands/swarm.js +1 -1
- package/dist/src/commands/task.js +8 -8
- package/dist/src/commands/workflow.js +5 -5
- package/dist/src/mcp-client.d.ts +3 -3
- package/dist/src/mcp-client.js +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -97,7 +97,7 @@ const spawnCommand = {
|
|
|
97
97
|
output.printInfo(`Spawning ${agentType} agent: ${output.highlight(agentName)}`);
|
|
98
98
|
try {
|
|
99
99
|
// Call MCP tool to spawn agent
|
|
100
|
-
const result = await callMCPTool('
|
|
100
|
+
const result = await callMCPTool('agent_spawn', {
|
|
101
101
|
agentType,
|
|
102
102
|
id: agentName,
|
|
103
103
|
config: {
|
|
@@ -175,7 +175,7 @@ const listCommand = {
|
|
|
175
175
|
action: async (ctx) => {
|
|
176
176
|
try {
|
|
177
177
|
// Call MCP tool to list agents
|
|
178
|
-
const result = await callMCPTool('
|
|
178
|
+
const result = await callMCPTool('agent_list', {
|
|
179
179
|
status: ctx.flags.all ? 'all' : ctx.flags.status || undefined,
|
|
180
180
|
agentType: ctx.flags.type || undefined,
|
|
181
181
|
limit: 100,
|
|
@@ -251,7 +251,7 @@ const statusCommand = {
|
|
|
251
251
|
}
|
|
252
252
|
try {
|
|
253
253
|
// Call MCP tool to get agent status
|
|
254
|
-
const status = await callMCPTool('
|
|
254
|
+
const status = await callMCPTool('agent_status', {
|
|
255
255
|
agentId,
|
|
256
256
|
includeMetrics: true,
|
|
257
257
|
includeHistory: false,
|
|
@@ -339,7 +339,7 @@ const stopCommand = {
|
|
|
339
339
|
output.printInfo(`Stopping agent ${agentId}...`);
|
|
340
340
|
try {
|
|
341
341
|
// Call MCP tool to terminate agent
|
|
342
|
-
const result = await callMCPTool('
|
|
342
|
+
const result = await callMCPTool('agent_terminate', {
|
|
343
343
|
agentId,
|
|
344
344
|
graceful: !force,
|
|
345
345
|
reason: 'Stopped by user via CLI',
|
|
@@ -483,7 +483,7 @@ const poolCommand = {
|
|
|
483
483
|
],
|
|
484
484
|
action: async (ctx) => {
|
|
485
485
|
try {
|
|
486
|
-
const result = await callMCPTool('
|
|
486
|
+
const result = await callMCPTool('agent_pool', {
|
|
487
487
|
size: ctx.flags.size,
|
|
488
488
|
min: ctx.flags.min,
|
|
489
489
|
max: ctx.flags.max,
|
|
@@ -562,7 +562,7 @@ const healthCommand = {
|
|
|
562
562
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
563
563
|
const detailed = ctx.flags.detailed;
|
|
564
564
|
try {
|
|
565
|
-
const result = await callMCPTool('
|
|
565
|
+
const result = await callMCPTool('agent_health', {
|
|
566
566
|
agentId,
|
|
567
567
|
detailed,
|
|
568
568
|
});
|
|
@@ -691,7 +691,7 @@ const logsCommand = {
|
|
|
691
691
|
return { success: false, exitCode: 1 };
|
|
692
692
|
}
|
|
693
693
|
try {
|
|
694
|
-
const result = await callMCPTool('
|
|
694
|
+
const result = await callMCPTool('agent_logs', {
|
|
695
695
|
agentId,
|
|
696
696
|
tail,
|
|
697
697
|
level,
|
|
@@ -96,7 +96,7 @@ const diffCommand = {
|
|
|
96
96
|
output.printInfo(`Analyzing diff: ${output.highlight(ref)}`);
|
|
97
97
|
try {
|
|
98
98
|
// Call MCP tool for diff analysis
|
|
99
|
-
const result = await callMCPTool('
|
|
99
|
+
const result = await callMCPTool('analyze_diff', {
|
|
100
100
|
ref,
|
|
101
101
|
includeFileRisks: verbose,
|
|
102
102
|
includeReviewers: showReviewers || showAll,
|
|
@@ -379,7 +379,7 @@ const initCommand = {
|
|
|
379
379
|
const spinner = output.createSpinner({ text: 'Setting up hive infrastructure...', spinner: 'dots' });
|
|
380
380
|
spinner.start();
|
|
381
381
|
try {
|
|
382
|
-
const result = await callMCPTool('hive-
|
|
382
|
+
const result = await callMCPTool('hive-mind_init', config);
|
|
383
383
|
spinner.succeed('Hive Mind initialized');
|
|
384
384
|
if (ctx.flags.format === 'json') {
|
|
385
385
|
output.printJson(result);
|
|
@@ -502,7 +502,7 @@ const spawnCommand = {
|
|
|
502
502
|
let objective = ctx.flags.objective || ctx.args.join(' ');
|
|
503
503
|
output.printInfo(`Spawning ${count} ${role} agent(s)...`);
|
|
504
504
|
try {
|
|
505
|
-
const result = await callMCPTool('hive-
|
|
505
|
+
const result = await callMCPTool('hive-mind_spawn', {
|
|
506
506
|
count,
|
|
507
507
|
role,
|
|
508
508
|
agentType,
|
|
@@ -555,7 +555,7 @@ const spawnCommand = {
|
|
|
555
555
|
let swarmId = result.hiveId || 'default';
|
|
556
556
|
let swarmName = 'Hive Mind Swarm';
|
|
557
557
|
try {
|
|
558
|
-
const statusResult = await callMCPTool('hive-
|
|
558
|
+
const statusResult = await callMCPTool('hive-mind_status', { includeWorkers: false });
|
|
559
559
|
swarmId = statusResult.hiveId || swarmId;
|
|
560
560
|
}
|
|
561
561
|
catch {
|
|
@@ -611,7 +611,7 @@ const statusCommand = {
|
|
|
611
611
|
action: async (ctx) => {
|
|
612
612
|
const detailed = ctx.flags.detailed;
|
|
613
613
|
try {
|
|
614
|
-
const result = await callMCPTool('hive-
|
|
614
|
+
const result = await callMCPTool('hive-mind_status', {
|
|
615
615
|
includeMetrics: detailed,
|
|
616
616
|
includeWorkers: true,
|
|
617
617
|
});
|
|
@@ -769,7 +769,7 @@ const taskCommand = {
|
|
|
769
769
|
const timeout = ctx.flags.timeout;
|
|
770
770
|
output.printInfo('Submitting task to hive...');
|
|
771
771
|
try {
|
|
772
|
-
const result = await callMCPTool('hive-
|
|
772
|
+
const result = await callMCPTool('hive-mind_task', {
|
|
773
773
|
description,
|
|
774
774
|
priority,
|
|
775
775
|
requireConsensus,
|
|
@@ -830,7 +830,7 @@ const optimizeMemoryCommand = {
|
|
|
830
830
|
const spinner = output.createSpinner({ text: 'Analyzing patterns...', spinner: 'dots' });
|
|
831
831
|
spinner.start();
|
|
832
832
|
try {
|
|
833
|
-
const result = await callMCPTool('hive-
|
|
833
|
+
const result = await callMCPTool('hive-mind_optimize-memory', {
|
|
834
834
|
aggressive,
|
|
835
835
|
qualityThreshold: threshold,
|
|
836
836
|
});
|
|
@@ -886,7 +886,7 @@ const joinCommand = {
|
|
|
886
886
|
return { success: false, exitCode: 1 };
|
|
887
887
|
}
|
|
888
888
|
try {
|
|
889
|
-
const result = await callMCPTool('hive-
|
|
889
|
+
const result = await callMCPTool('hive-mind_join', { agentId, role: ctx.flags.role });
|
|
890
890
|
if (!result.success) {
|
|
891
891
|
output.printError(result.error || 'Failed');
|
|
892
892
|
return { success: false, exitCode: 1 };
|
|
@@ -912,7 +912,7 @@ const leaveCommand = {
|
|
|
912
912
|
return { success: false, exitCode: 1 };
|
|
913
913
|
}
|
|
914
914
|
try {
|
|
915
|
-
const result = await callMCPTool('hive-
|
|
915
|
+
const result = await callMCPTool('hive-mind_leave', { agentId });
|
|
916
916
|
if (!result.success) {
|
|
917
917
|
output.printError(result.error || 'Failed');
|
|
918
918
|
return { success: false, exitCode: 1 };
|
|
@@ -941,7 +941,7 @@ const consensusCommand = {
|
|
|
941
941
|
action: async (ctx) => {
|
|
942
942
|
const action = ctx.flags.action || 'list';
|
|
943
943
|
try {
|
|
944
|
-
const result = await callMCPTool('hive-
|
|
944
|
+
const result = await callMCPTool('hive-mind_consensus', { action, proposalId: ctx.flags.proposalId, type: ctx.flags.type, value: ctx.flags.value, vote: ctx.flags.vote === 'yes', voterId: ctx.flags.voterId });
|
|
945
945
|
if (ctx.flags.format === 'json') {
|
|
946
946
|
output.printJson(result);
|
|
947
947
|
return { success: true, data: result };
|
|
@@ -984,7 +984,7 @@ const broadcastCommand = {
|
|
|
984
984
|
return { success: false, exitCode: 1 };
|
|
985
985
|
}
|
|
986
986
|
try {
|
|
987
|
-
const result = await callMCPTool('hive-
|
|
987
|
+
const result = await callMCPTool('hive-mind_broadcast', { message, priority: ctx.flags.priority, fromId: ctx.flags.from });
|
|
988
988
|
if (!result.success) {
|
|
989
989
|
output.printError(result.error || 'Failed');
|
|
990
990
|
return { success: false, exitCode: 1 };
|
|
@@ -1020,7 +1020,7 @@ const memorySubCommand = {
|
|
|
1020
1020
|
return { success: false, exitCode: 1 };
|
|
1021
1021
|
}
|
|
1022
1022
|
try {
|
|
1023
|
-
const result = await callMCPTool('hive-
|
|
1023
|
+
const result = await callMCPTool('hive-mind_memory', { action, key, value });
|
|
1024
1024
|
if (ctx.flags.format === 'json') {
|
|
1025
1025
|
output.printJson(result);
|
|
1026
1026
|
return { success: true, data: result };
|
|
@@ -1088,7 +1088,7 @@ const shutdownCommand = {
|
|
|
1088
1088
|
const spinner = output.createSpinner({ text: 'Graceful shutdown in progress...', spinner: 'dots' });
|
|
1089
1089
|
spinner.start();
|
|
1090
1090
|
try {
|
|
1091
|
-
const result = await callMCPTool('hive-
|
|
1091
|
+
const result = await callMCPTool('hive-mind_shutdown', {
|
|
1092
1092
|
force,
|
|
1093
1093
|
saveState,
|
|
1094
1094
|
});
|
|
@@ -62,7 +62,7 @@ const preEditCommand = {
|
|
|
62
62
|
output.printInfo(`Analyzing context for: ${output.highlight(filePath)}`);
|
|
63
63
|
try {
|
|
64
64
|
// Call MCP tool for pre-edit hook
|
|
65
|
-
const result = await callMCPTool('
|
|
65
|
+
const result = await callMCPTool('hooks_pre-edit', {
|
|
66
66
|
filePath,
|
|
67
67
|
operation,
|
|
68
68
|
context: ctx.flags.context,
|
|
@@ -185,7 +185,7 @@ const postEditCommand = {
|
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
// Call MCP tool for post-edit hook
|
|
188
|
-
const result = await callMCPTool('
|
|
188
|
+
const result = await callMCPTool('hooks_post-edit', {
|
|
189
189
|
filePath,
|
|
190
190
|
success,
|
|
191
191
|
outcome: ctx.flags.outcome,
|
|
@@ -259,7 +259,7 @@ const preCommandCommand = {
|
|
|
259
259
|
output.printInfo(`Analyzing command: ${output.highlight(command)}`);
|
|
260
260
|
try {
|
|
261
261
|
// Call MCP tool for pre-command hook
|
|
262
|
-
const result = await callMCPTool('
|
|
262
|
+
const result = await callMCPTool('hooks_pre-command', {
|
|
263
263
|
command,
|
|
264
264
|
includeAlternatives: true,
|
|
265
265
|
});
|
|
@@ -373,7 +373,7 @@ const postCommandCommand = {
|
|
|
373
373
|
output.printInfo(`Recording command outcome: ${output.highlight(command)}`);
|
|
374
374
|
try {
|
|
375
375
|
// Call MCP tool for post-command hook
|
|
376
|
-
const result = await callMCPTool('
|
|
376
|
+
const result = await callMCPTool('hooks_post-command', {
|
|
377
377
|
command,
|
|
378
378
|
success,
|
|
379
379
|
exitCode: ctx.flags.exitCode || 0,
|
|
@@ -444,7 +444,7 @@ const routeCommand = {
|
|
|
444
444
|
output.printInfo(`Routing task: ${output.highlight(task)}`);
|
|
445
445
|
try {
|
|
446
446
|
// Call MCP tool for routing
|
|
447
|
-
const result = await callMCPTool('
|
|
447
|
+
const result = await callMCPTool('hooks_route', {
|
|
448
448
|
task,
|
|
449
449
|
context: ctx.flags.context,
|
|
450
450
|
topK,
|
|
@@ -533,7 +533,7 @@ const explainCommand = {
|
|
|
533
533
|
output.printInfo(`Explaining routing for: ${output.highlight(task)}`);
|
|
534
534
|
try {
|
|
535
535
|
// Call MCP tool for explanation
|
|
536
|
-
const result = await callMCPTool('
|
|
536
|
+
const result = await callMCPTool('hooks_explain', {
|
|
537
537
|
task,
|
|
538
538
|
agent: ctx.flags.agent,
|
|
539
539
|
verbose: ctx.flags.verbose || false,
|
|
@@ -673,7 +673,7 @@ const pretrainCommand = {
|
|
|
673
673
|
await new Promise(resolve => setTimeout(resolve, 800));
|
|
674
674
|
}
|
|
675
675
|
// Call MCP tool for pretraining
|
|
676
|
-
const result = await callMCPTool('
|
|
676
|
+
const result = await callMCPTool('hooks_pretrain', {
|
|
677
677
|
path: repoPath,
|
|
678
678
|
depth,
|
|
679
679
|
skipCache: ctx.flags.skipCache || false,
|
|
@@ -767,7 +767,7 @@ const buildAgentsCommand = {
|
|
|
767
767
|
try {
|
|
768
768
|
spinner.start();
|
|
769
769
|
// Call MCP tool for building agents
|
|
770
|
-
const result = await callMCPTool('
|
|
770
|
+
const result = await callMCPTool('hooks_build-agents', {
|
|
771
771
|
outputDir: output_dir,
|
|
772
772
|
focus,
|
|
773
773
|
format: configFormat,
|
|
@@ -853,7 +853,7 @@ const metricsCommand = {
|
|
|
853
853
|
output.writeln();
|
|
854
854
|
try {
|
|
855
855
|
// Call MCP tool for metrics
|
|
856
|
-
const result = await callMCPTool('
|
|
856
|
+
const result = await callMCPTool('hooks_metrics', {
|
|
857
857
|
period,
|
|
858
858
|
includeV3: v3Dashboard,
|
|
859
859
|
category: ctx.flags.category,
|
|
@@ -972,7 +972,7 @@ const transferFromProjectCommand = {
|
|
|
972
972
|
try {
|
|
973
973
|
spinner.start();
|
|
974
974
|
// Call MCP tool for transfer
|
|
975
|
-
const result = await callMCPTool('
|
|
975
|
+
const result = await callMCPTool('hooks_transfer', {
|
|
976
976
|
sourcePath,
|
|
977
977
|
filter: ctx.flags.filter,
|
|
978
978
|
minConfidence,
|
|
@@ -1086,7 +1086,7 @@ const listCommand = {
|
|
|
1086
1086
|
action: async (ctx) => {
|
|
1087
1087
|
try {
|
|
1088
1088
|
// Call MCP tool for list
|
|
1089
|
-
const result = await callMCPTool('
|
|
1089
|
+
const result = await callMCPTool('hooks_list', {
|
|
1090
1090
|
enabled: ctx.flags.enabled || undefined,
|
|
1091
1091
|
type: ctx.flags.type || undefined,
|
|
1092
1092
|
});
|
|
@@ -1167,7 +1167,7 @@ const preTaskCommand = {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
output.printInfo(`Starting task: ${output.highlight(taskId)}`);
|
|
1169
1169
|
try {
|
|
1170
|
-
const result = await callMCPTool('
|
|
1170
|
+
const result = await callMCPTool('hooks_pre-task', {
|
|
1171
1171
|
taskId,
|
|
1172
1172
|
description,
|
|
1173
1173
|
autoSpawn: ctx.flags.autoSpawn || false,
|
|
@@ -1312,7 +1312,7 @@ const postTaskCommand = {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
output.printInfo(`Recording outcome for task: ${output.highlight(taskId)}`);
|
|
1314
1314
|
try {
|
|
1315
|
-
const result = await callMCPTool('
|
|
1315
|
+
const result = await callMCPTool('hooks_post-task', {
|
|
1316
1316
|
taskId,
|
|
1317
1317
|
success,
|
|
1318
1318
|
quality: ctx.flags.quality,
|
|
@@ -1372,7 +1372,7 @@ const sessionEndCommand = {
|
|
|
1372
1372
|
action: async (ctx) => {
|
|
1373
1373
|
output.printInfo('Ending session...');
|
|
1374
1374
|
try {
|
|
1375
|
-
const result = await callMCPTool('
|
|
1375
|
+
const result = await callMCPTool('hooks_session-end', {
|
|
1376
1376
|
saveState: ctx.flags.saveState ?? true,
|
|
1377
1377
|
timestamp: Date.now(),
|
|
1378
1378
|
});
|
|
@@ -1451,7 +1451,7 @@ const sessionRestoreCommand = {
|
|
|
1451
1451
|
const sessionId = ctx.args[0] || ctx.flags.sessionId || 'latest';
|
|
1452
1452
|
output.printInfo(`Restoring session: ${output.highlight(sessionId)}`);
|
|
1453
1453
|
try {
|
|
1454
|
-
const result = await callMCPTool('
|
|
1454
|
+
const result = await callMCPTool('hooks_session-restore', {
|
|
1455
1455
|
sessionId,
|
|
1456
1456
|
restoreAgents: ctx.flags.restoreAgents ?? true,
|
|
1457
1457
|
restoreTasks: ctx.flags.restoreTasks ?? true,
|
|
@@ -1583,7 +1583,7 @@ const intelligenceCommand = {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
output.printInfo('Resetting learning state...');
|
|
1585
1585
|
try {
|
|
1586
|
-
await callMCPTool('
|
|
1586
|
+
await callMCPTool('hooks_intelligence-reset', {});
|
|
1587
1587
|
output.printSuccess('Learning state reset');
|
|
1588
1588
|
return { success: true };
|
|
1589
1589
|
}
|
|
@@ -1596,7 +1596,7 @@ const intelligenceCommand = {
|
|
|
1596
1596
|
try {
|
|
1597
1597
|
spinner.start();
|
|
1598
1598
|
// Call MCP tool for intelligence
|
|
1599
|
-
const result = await callMCPTool('
|
|
1599
|
+
const result = await callMCPTool('hooks_intelligence', {
|
|
1600
1600
|
mode,
|
|
1601
1601
|
enableSona,
|
|
1602
1602
|
enableMoe,
|
|
@@ -1760,7 +1760,7 @@ const workerListCommand = {
|
|
|
1760
1760
|
const spinner = output.createSpinner({ text: 'Loading workers...', spinner: 'dots' });
|
|
1761
1761
|
spinner.start();
|
|
1762
1762
|
try {
|
|
1763
|
-
const result = await callMCPTool('
|
|
1763
|
+
const result = await callMCPTool('hooks_worker-list', {
|
|
1764
1764
|
status: ctx.flags['status'] || 'all',
|
|
1765
1765
|
includeActive: ctx.flags['active'] !== false,
|
|
1766
1766
|
});
|
|
@@ -1847,7 +1847,7 @@ const workerDispatchCommand = {
|
|
|
1847
1847
|
const spinner = output.createSpinner({ text: `Dispatching ${trigger} worker...`, spinner: 'dots' });
|
|
1848
1848
|
spinner.start();
|
|
1849
1849
|
try {
|
|
1850
|
-
const result = await callMCPTool('
|
|
1850
|
+
const result = await callMCPTool('hooks_worker-dispatch', {
|
|
1851
1851
|
trigger,
|
|
1852
1852
|
context,
|
|
1853
1853
|
priority,
|
|
@@ -1908,7 +1908,7 @@ const workerStatusCommand = {
|
|
|
1908
1908
|
const spinner = output.createSpinner({ text: 'Checking worker status...', spinner: 'dots' });
|
|
1909
1909
|
spinner.start();
|
|
1910
1910
|
try {
|
|
1911
|
-
const result = await callMCPTool('
|
|
1911
|
+
const result = await callMCPTool('hooks_worker-status', {
|
|
1912
1912
|
workerId,
|
|
1913
1913
|
includeCompleted,
|
|
1914
1914
|
});
|
|
@@ -1997,7 +1997,7 @@ const workerDetectCommand = {
|
|
|
1997
1997
|
const spinner = output.createSpinner({ text: 'Analyzing prompt...', spinner: 'dots' });
|
|
1998
1998
|
spinner.start();
|
|
1999
1999
|
try {
|
|
2000
|
-
const result = await callMCPTool('
|
|
2000
|
+
const result = await callMCPTool('hooks_worker-detect', {
|
|
2001
2001
|
prompt,
|
|
2002
2002
|
autoDispatch,
|
|
2003
2003
|
minConfidence,
|
|
@@ -2063,7 +2063,7 @@ const workerCancelCommand = {
|
|
|
2063
2063
|
const spinner = output.createSpinner({ text: `Cancelling worker ${workerId}...`, spinner: 'dots' });
|
|
2064
2064
|
spinner.start();
|
|
2065
2065
|
try {
|
|
2066
|
-
const result = await callMCPTool('
|
|
2066
|
+
const result = await callMCPTool('hooks_worker-cancel', { workerId });
|
|
2067
2067
|
if (!result.success) {
|
|
2068
2068
|
spinner.fail(`Failed: ${result.error}`);
|
|
2069
2069
|
return { success: false, exitCode: 1 };
|
|
@@ -2137,7 +2137,7 @@ const coverageRouteCommand = {
|
|
|
2137
2137
|
const spinner = output.createSpinner({ text: 'Analyzing coverage and routing task...' });
|
|
2138
2138
|
spinner.start();
|
|
2139
2139
|
try {
|
|
2140
|
-
const result = await callMCPTool('
|
|
2140
|
+
const result = await callMCPTool('hooks_coverage-route', {
|
|
2141
2141
|
task,
|
|
2142
2142
|
threshold,
|
|
2143
2143
|
useRuvector,
|
|
@@ -2240,7 +2240,7 @@ const coverageSuggestCommand = {
|
|
|
2240
2240
|
const spinner = output.createSpinner({ text: `Analyzing coverage for ${path}...` });
|
|
2241
2241
|
spinner.start();
|
|
2242
2242
|
try {
|
|
2243
|
-
const result = await callMCPTool('
|
|
2243
|
+
const result = await callMCPTool('hooks_coverage-suggest', {
|
|
2244
2244
|
path,
|
|
2245
2245
|
threshold,
|
|
2246
2246
|
limit,
|
|
@@ -2334,7 +2334,7 @@ const coverageGapsCommand = {
|
|
|
2334
2334
|
const spinner = output.createSpinner({ text: 'Analyzing project coverage gaps...' });
|
|
2335
2335
|
spinner.start();
|
|
2336
2336
|
try {
|
|
2337
|
-
const result = await callMCPTool('
|
|
2337
|
+
const result = await callMCPTool('hooks_coverage-gaps', {
|
|
2338
2338
|
threshold,
|
|
2339
2339
|
groupByAgent,
|
|
2340
2340
|
});
|
|
@@ -2451,7 +2451,7 @@ const progressHookCommand = {
|
|
|
2451
2451
|
if (summary) {
|
|
2452
2452
|
const spinner = output.createSpinner({ text: 'Getting progress summary...' });
|
|
2453
2453
|
spinner.start();
|
|
2454
|
-
const result = await callMCPTool('
|
|
2454
|
+
const result = await callMCPTool('progress_summary', {});
|
|
2455
2455
|
spinner.stop();
|
|
2456
2456
|
if (ctx.flags.format === 'json') {
|
|
2457
2457
|
output.printJson(result);
|
|
@@ -2464,7 +2464,7 @@ const progressHookCommand = {
|
|
|
2464
2464
|
if (sync) {
|
|
2465
2465
|
const spinner = output.createSpinner({ text: 'Syncing progress...' });
|
|
2466
2466
|
spinner.start();
|
|
2467
|
-
const result = await callMCPTool('
|
|
2467
|
+
const result = await callMCPTool('progress_sync', {});
|
|
2468
2468
|
spinner.stop();
|
|
2469
2469
|
if (ctx.flags.format === 'json') {
|
|
2470
2470
|
output.printJson(result);
|
|
@@ -2479,7 +2479,7 @@ const progressHookCommand = {
|
|
|
2479
2479
|
// Default: check progress
|
|
2480
2480
|
const spinner = output.createSpinner({ text: 'Checking V3 progress...' });
|
|
2481
2481
|
spinner.start();
|
|
2482
|
-
const result = await callMCPTool('
|
|
2482
|
+
const result = await callMCPTool('progress_check', { detailed });
|
|
2483
2483
|
spinner.stop();
|
|
2484
2484
|
if (ctx.flags.format === 'json') {
|
|
2485
2485
|
output.printJson(result);
|
|
@@ -3259,7 +3259,7 @@ const modelRouteCommand = {
|
|
|
3259
3259
|
}
|
|
3260
3260
|
output.printInfo(`Analyzing task complexity: ${output.highlight(task.slice(0, 50))}...`);
|
|
3261
3261
|
try {
|
|
3262
|
-
const result = await callMCPTool('
|
|
3262
|
+
const result = await callMCPTool('hooks_model-route', {
|
|
3263
3263
|
task,
|
|
3264
3264
|
context: ctx.flags.context,
|
|
3265
3265
|
preferCost: ctx.flags['prefer-cost'],
|
|
@@ -3335,7 +3335,7 @@ const modelOutcomeCommand = {
|
|
|
3335
3335
|
return { success: false, exitCode: 1 };
|
|
3336
3336
|
}
|
|
3337
3337
|
try {
|
|
3338
|
-
const result = await callMCPTool('
|
|
3338
|
+
const result = await callMCPTool('hooks_model-outcome', {
|
|
3339
3339
|
task,
|
|
3340
3340
|
model,
|
|
3341
3341
|
outcome,
|
|
@@ -3366,7 +3366,7 @@ const modelStatsCommand = {
|
|
|
3366
3366
|
],
|
|
3367
3367
|
action: async (ctx) => {
|
|
3368
3368
|
try {
|
|
3369
|
-
const result = await callMCPTool('
|
|
3369
|
+
const result = await callMCPTool('hooks_model-stats', {
|
|
3370
3370
|
detailed: ctx.flags.detailed,
|
|
3371
3371
|
});
|
|
3372
3372
|
if (ctx.flags.format === 'json') {
|
package/dist/src/commands/mcp.js
CHANGED
|
@@ -350,36 +350,36 @@ const toolsCommand = {
|
|
|
350
350
|
// Fallback to static tool list
|
|
351
351
|
tools = [
|
|
352
352
|
// Agent tools
|
|
353
|
-
{ name: '
|
|
354
|
-
{ name: '
|
|
355
|
-
{ name: '
|
|
356
|
-
{ name: '
|
|
353
|
+
{ name: 'agent_spawn', category: 'agent', description: 'Spawn a new agent', enabled: true },
|
|
354
|
+
{ name: 'agent_list', category: 'agent', description: 'List all agents', enabled: true },
|
|
355
|
+
{ name: 'agent_terminate', category: 'agent', description: 'Terminate an agent', enabled: true },
|
|
356
|
+
{ name: 'agent_status', category: 'agent', description: 'Get agent status', enabled: true },
|
|
357
357
|
// Swarm tools
|
|
358
|
-
{ name: '
|
|
359
|
-
{ name: '
|
|
360
|
-
{ name: '
|
|
358
|
+
{ name: 'swarm_init', category: 'swarm', description: 'Initialize swarm topology', enabled: true },
|
|
359
|
+
{ name: 'swarm_status', category: 'swarm', description: 'Get swarm status', enabled: true },
|
|
360
|
+
{ name: 'swarm_scale', category: 'swarm', description: 'Scale swarm size', enabled: true },
|
|
361
361
|
// Memory tools
|
|
362
|
-
{ name: '
|
|
363
|
-
{ name: '
|
|
364
|
-
{ name: '
|
|
362
|
+
{ name: 'memory_store', category: 'memory', description: 'Store in memory', enabled: true },
|
|
363
|
+
{ name: 'memory_search', category: 'memory', description: 'Search memory', enabled: true },
|
|
364
|
+
{ name: 'memory_list', category: 'memory', description: 'List memory entries', enabled: true },
|
|
365
365
|
// Config tools
|
|
366
|
-
{ name: '
|
|
367
|
-
{ name: '
|
|
368
|
-
{ name: '
|
|
366
|
+
{ name: 'config_load', category: 'config', description: 'Load configuration', enabled: true },
|
|
367
|
+
{ name: 'config_save', category: 'config', description: 'Save configuration', enabled: true },
|
|
368
|
+
{ name: 'config_validate', category: 'config', description: 'Validate configuration', enabled: true },
|
|
369
369
|
// Hooks tools
|
|
370
|
-
{ name: '
|
|
371
|
-
{ name: '
|
|
372
|
-
{ name: '
|
|
373
|
-
{ name: '
|
|
374
|
-
{ name: '
|
|
375
|
-
{ name: '
|
|
376
|
-
{ name: '
|
|
377
|
-
{ name: '
|
|
378
|
-
{ name: '
|
|
370
|
+
{ name: 'hooks_pre-edit', category: 'hooks', description: 'Pre-edit hook', enabled: true },
|
|
371
|
+
{ name: 'hooks_post-edit', category: 'hooks', description: 'Post-edit hook', enabled: true },
|
|
372
|
+
{ name: 'hooks_pre-command', category: 'hooks', description: 'Pre-command hook', enabled: true },
|
|
373
|
+
{ name: 'hooks_post-command', category: 'hooks', description: 'Post-command hook', enabled: true },
|
|
374
|
+
{ name: 'hooks_route', category: 'hooks', description: 'Route task to agent', enabled: true },
|
|
375
|
+
{ name: 'hooks_explain', category: 'hooks', description: 'Explain routing', enabled: true },
|
|
376
|
+
{ name: 'hooks_pretrain', category: 'hooks', description: 'Pretrain from repo', enabled: true },
|
|
377
|
+
{ name: 'hooks_metrics', category: 'hooks', description: 'Learning metrics', enabled: true },
|
|
378
|
+
{ name: 'hooks_list', category: 'hooks', description: 'List hooks', enabled: true },
|
|
379
379
|
// System tools
|
|
380
|
-
{ name: '
|
|
381
|
-
{ name: '
|
|
382
|
-
{ name: '
|
|
380
|
+
{ name: 'system_info', category: 'system', description: 'System information', enabled: true },
|
|
381
|
+
{ name: 'system_health', category: 'system', description: 'Health status', enabled: true },
|
|
382
|
+
{ name: 'system_metrics', category: 'system', description: 'Server metrics', enabled: true },
|
|
383
383
|
].filter(t => !category || t.category === category);
|
|
384
384
|
}
|
|
385
385
|
if (ctx.flags.format === 'json') {
|
|
@@ -471,7 +471,7 @@ const execCommand = {
|
|
|
471
471
|
}
|
|
472
472
|
],
|
|
473
473
|
examples: [
|
|
474
|
-
{ command: 'claude-flow mcp exec -t
|
|
474
|
+
{ command: 'claude-flow mcp exec -t swarm_init -p \'{"topology":"mesh"}\'', description: 'Execute tool' }
|
|
475
475
|
],
|
|
476
476
|
action: async (ctx) => {
|
|
477
477
|
const tool = ctx.flags.tool || ctx.args[0];
|
|
@@ -514,7 +514,7 @@ const statsCommand = {
|
|
|
514
514
|
action: async (ctx) => {
|
|
515
515
|
// Call MCP memory/stats tool for real statistics
|
|
516
516
|
try {
|
|
517
|
-
const statsResult = await callMCPTool('
|
|
517
|
+
const statsResult = await callMCPTool('memory_stats', {});
|
|
518
518
|
const stats = {
|
|
519
519
|
backend: statsResult.backend,
|
|
520
520
|
entries: {
|
|
@@ -706,7 +706,7 @@ const cleanupCommand = {
|
|
|
706
706
|
}
|
|
707
707
|
output.printInfo('Analyzing memory for cleanup...');
|
|
708
708
|
try {
|
|
709
|
-
const result = await callMCPTool('
|
|
709
|
+
const result = await callMCPTool('memory_cleanup', {
|
|
710
710
|
dryRun,
|
|
711
711
|
olderThan: ctx.flags.olderThan,
|
|
712
712
|
expiredOnly: ctx.flags.expiredOnly,
|
|
@@ -824,7 +824,7 @@ const compressCommand = {
|
|
|
824
824
|
const spinner = output.createSpinner({ text: 'Analyzing current storage...', spinner: 'dots' });
|
|
825
825
|
spinner.start();
|
|
826
826
|
try {
|
|
827
|
-
const result = await callMCPTool('
|
|
827
|
+
const result = await callMCPTool('memory_compress', {
|
|
828
828
|
level,
|
|
829
829
|
target,
|
|
830
830
|
quantize,
|
|
@@ -929,7 +929,7 @@ const exportCommand = {
|
|
|
929
929
|
}
|
|
930
930
|
output.printInfo(`Exporting memory to ${outputPath}...`);
|
|
931
931
|
try {
|
|
932
|
-
const result = await callMCPTool('
|
|
932
|
+
const result = await callMCPTool('memory_export', {
|
|
933
933
|
outputPath,
|
|
934
934
|
format,
|
|
935
935
|
namespace: ctx.flags.namespace,
|
|
@@ -993,7 +993,7 @@ const importCommand = {
|
|
|
993
993
|
}
|
|
994
994
|
output.printInfo(`Importing memory from ${inputPath}...`);
|
|
995
995
|
try {
|
|
996
|
-
const result = await callMCPTool('
|
|
996
|
+
const result = await callMCPTool('memory_import', {
|
|
997
997
|
inputPath,
|
|
998
998
|
merge: ctx.flags.merge ?? true,
|
|
999
999
|
namespace: ctx.flags.namespace,
|
|
@@ -31,7 +31,7 @@ const checkCommand = {
|
|
|
31
31
|
const spinner = output.createSpinner({ text: 'Checking V3 progress...' });
|
|
32
32
|
try {
|
|
33
33
|
spinner.start();
|
|
34
|
-
const result = await callMCPTool('
|
|
34
|
+
const result = await callMCPTool('progress_check', { detailed });
|
|
35
35
|
spinner.stop();
|
|
36
36
|
if (ctx.flags.format === 'json') {
|
|
37
37
|
output.printJson(result);
|
|
@@ -85,7 +85,7 @@ const syncCommand = {
|
|
|
85
85
|
const spinner = output.createSpinner({ text: 'Syncing progress...' });
|
|
86
86
|
try {
|
|
87
87
|
spinner.start();
|
|
88
|
-
const result = await callMCPTool('
|
|
88
|
+
const result = await callMCPTool('progress_sync', {});
|
|
89
89
|
spinner.stop();
|
|
90
90
|
if (ctx.flags.format === 'json') {
|
|
91
91
|
output.printJson(result);
|
|
@@ -117,7 +117,7 @@ const summaryCommand = {
|
|
|
117
117
|
const spinner = output.createSpinner({ text: 'Getting progress summary...' });
|
|
118
118
|
try {
|
|
119
119
|
spinner.start();
|
|
120
|
-
const result = await callMCPTool('
|
|
120
|
+
const result = await callMCPTool('progress_summary', {});
|
|
121
121
|
spinner.stop();
|
|
122
122
|
if (ctx.flags.format === 'json') {
|
|
123
123
|
output.printJson(result);
|
|
@@ -159,7 +159,7 @@ const watchCommand = {
|
|
|
159
159
|
let lastProgress = 0;
|
|
160
160
|
const check = async () => {
|
|
161
161
|
try {
|
|
162
|
-
const result = await callMCPTool('
|
|
162
|
+
const result = await callMCPTool('progress_check', {});
|
|
163
163
|
const currentProgress = result.overall ?? result.progress ?? 0;
|
|
164
164
|
if (currentProgress !== lastProgress) {
|
|
165
165
|
output.writeln(`${output.warning('→')} Progress changed: ${lastProgress}% → ${output.success(currentProgress + '%')}`);
|