mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/mcp/ruv-swarm-tools.ts
This commit is contained in:
1 parent
e79bf3d939
commit
83d5f8a9f7
3 files changed
+13
-5
No files matched your search
@@ -0,0 +1 @@
|
||||
{"branch": "checkpoint/pre-edit-20250816-161356", "file": "/workspaces/claude-code-flow/src/mcp/ruv-swarm-tools.ts", "timestamp": "2025-08-16T16:13:56Z", "type": "pre-edit", "original_branch": "alpha90"}
|
||||
@@ -0,0 +1 @@
|
||||
{"tag": "checkpoint-20250816-161358", "file": "/workspaces/claude-code-flow/src/mcp/ruv-swarm-tools.ts", "timestamp": "2025-08-16T16:13:58Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 132 +++++++++++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1755360795.json | 1 + .claude/checkpoints/1755360796.json | 1 + claude-flow-wiki | 0 src/mcp/ruv-swarm-tools.ts | 14 ++++ 7 files changed, 152 insertions(+), 4 deletions(-) "}
|
||||
@@ -199,7 +199,9 @@ export function createRuvSwarmTools(logger: ILogger): MCPTool[] {
|
||||
String(input.interval || 1),
|
||||
];
|
||||
|
||||
return await executeRuvSwarmCommand('swarm monitor', args, context, logger);
|
||||
const result = await executeRuvSwarmCommand('swarm monitor', args, context, logger);
|
||||
// Apply fix to ensure recentEvents is an array
|
||||
return errorFixes.fixSwarmMonitor(result);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -298,7 +300,9 @@ export function createRuvSwarmTools(logger: ILogger): MCPTool[] {
|
||||
args.push('--agent-id', input.agentId);
|
||||
}
|
||||
|
||||
return await executeRuvSwarmCommand('agent metrics', args, context, logger);
|
||||
const result = await executeRuvSwarmCommand('agent metrics', args, context, logger);
|
||||
// Apply fix to ensure neuralNetworks is an array
|
||||
return errorFixes.fixAgentMetrics(result);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -475,10 +479,12 @@ export function createRuvSwarmTools(logger: ILogger): MCPTool[] {
|
||||
},
|
||||
},
|
||||
handler: async (input: any, context?: RuvSwarmToolContext) => {
|
||||
const args = ['--iterations', String(input.iterations || 10)];
|
||||
// Apply fix to ensure agentId is valid
|
||||
const fixedInput = errorFixes.fixNeuralTrain(input);
|
||||
const args = ['--iterations', String(fixedInput.iterations || 10)];
|
||||
|
||||
if (input.agentId) {
|
||||
args.push('--agent-id', input.agentId);
|
||||
if (fixedInput.agentId) {
|
||||
args.push('--agent-id', fixedInput.agentId);
|
||||
}
|
||||
|
||||
return await executeRuvSwarmCommand('neural train', args, context, logger);
|
||||
|
||||
Reference in new issue
Block a user