🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/swarm.js

This commit is contained in:
rUv committed 2025-08-13 20:32:54 +00:00
1 parent 4877b1a239
commit 5a90cc032b
3 files changed
+23 -5

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"branch": "checkpoint/pre-edit-20250813-203221", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/claude-telemetry.js", "timestamp": "2025-08-13T20:32:21Z", "type": "pre-edit", "original_branch": "alpha-89"}
+1
View File
@@ -0,0 +1 @@
{"tag": "checkpoint-20250813-203223", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/claude-telemetry.js", "timestamp": "2025-08-13T20:32:23Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 1952 ++------------------------- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/task-1755116945.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/claude-telemetry.js | 308 +++++ 6 files changed, 437 insertions(+), 1832 deletions(-) "}
+21 -5
View File
@@ -792,11 +792,27 @@ The swarm should be self-documenting - use memory_store to save all important in
// --claude flag means interactive mode, so don't add non-interactive flags
// Spawn claude with properly ordered arguments
const claudeProcess = spawn('claude', claudeArgs, {
stdio: 'inherit',
shell: false,
});
// Spawn claude with telemetry tracking if enabled
const useWrapper = process.env.CLAUDE_CODE_ENABLE_TELEMETRY === '1';
if (useWrapper) {
// Use telemetry wrapper to track tokens
const { runClaudeWithTelemetry } = await import('./claude-telemetry.js');
console.log(`📊 Telemetry enabled - tracking token usage...`);
const result = await runClaudeWithTelemetry(claudeArgs, {
sessionId: `swarm-${Date.now()}`,
agentType: 'swarm-claude',
});
console.log('\n✓ Claude Code session completed with telemetry!');
process.exit(result.code);
} else {
const claudeProcess = spawn('claude', claudeArgs, {
stdio: 'inherit',
shell: false,
});
}
console.log('\n✓ Claude Code launched with swarm coordination prompt!');
console.log(' The swarm coordinator will orchestrate all agent tasks');