claude-flow 2.0.0-alpha.60 → 2.0.0-alpha.62
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/.claude/commands/sparc/analyzer.md +24 -77
- package/.claude/commands/sparc/architect.md +25 -76
- package/.claude/commands/sparc/batch-executor.md +28 -78
- package/.claude/commands/sparc/coder.md +28 -79
- package/.claude/commands/sparc/debugger.md +26 -76
- package/.claude/commands/sparc/designer.md +25 -75
- package/.claude/commands/sparc/documenter.md +26 -75
- package/.claude/commands/sparc/innovator.md +26 -76
- package/.claude/commands/sparc/memory-manager.md +28 -77
- package/.claude/commands/sparc/optimizer.md +26 -76
- package/.claude/commands/sparc/orchestrator.md +23 -74
- package/.claude/commands/sparc/researcher.md +26 -77
- package/.claude/commands/sparc/reviewer.md +26 -76
- package/.claude/commands/sparc/sparc-modes.md +38 -358
- package/.claude/commands/sparc/swarm-coordinator.md +28 -77
- package/.claude/commands/sparc/tdd.md +28 -78
- package/.claude/commands/sparc/tester.md +26 -76
- package/.claude/commands/sparc/workflow-manager.md +28 -77
- package/.claude/commands/swarm/analysis.md +14 -17
- package/.claude/commands/swarm/development.md +14 -16
- package/.claude/commands/swarm/examples.md +20 -53
- package/.claude/commands/swarm/maintenance.md +14 -17
- package/.claude/commands/swarm/optimization.md +15 -17
- package/.claude/commands/swarm/research.md +14 -17
- package/.claude/commands/swarm/testing.md +15 -17
- package/.claude/config.json +32 -11
- package/CHANGELOG.md +113 -0
- package/bin/claude-flow +1 -1
- package/dist/adapters/cliffy-node.d.ts.map +1 -1
- package/dist/adapters/cliffy-node.js +13 -7
- package/dist/adapters/cliffy-node.js.map +1 -1
- package/dist/agents/agent-manager.d.ts.map +1 -1
- package/dist/agents/agent-manager.js +77 -65
- package/dist/agents/agent-manager.js.map +1 -1
- package/dist/agents/agent-registry.d.ts.map +1 -1
- package/dist/agents/agent-registry.js +38 -30
- package/dist/agents/agent-registry.js.map +1 -1
- package/dist/api/claude-client.d.ts.map +1 -1
- package/dist/api/claude-client.js +22 -16
- package/dist/api/claude-client.js.map +1 -1
- package/dist/cli/agents/analyst.d.ts.map +1 -1
- package/dist/cli/agents/analyst.js +94 -114
- package/dist/cli/agents/analyst.js.map +1 -1
- package/dist/cli/agents/architect.d.ts.map +1 -1
- package/dist/cli/agents/architect.js +100 -114
- package/dist/cli/agents/architect.js.map +1 -1
- package/dist/cli/agents/base-agent.d.ts.map +1 -1
- package/dist/cli/agents/base-agent.js +27 -27
- package/dist/cli/agents/base-agent.js.map +1 -1
- package/dist/cli/agents/capabilities.d.ts.map +1 -1
- package/dist/cli/agents/capabilities.js +49 -51
- package/dist/cli/agents/capabilities.js.map +1 -1
- package/dist/cli/agents/coder.d.ts.map +1 -1
- package/dist/cli/agents/coder.js +92 -98
- package/dist/cli/agents/coder.js.map +1 -1
- package/dist/cli/agents/coordinator.d.ts.map +1 -1
- package/dist/cli/agents/coordinator.js +59 -64
- package/dist/cli/agents/coordinator.js.map +1 -1
- package/dist/cli/agents/hive-agents.d.ts.map +1 -1
- package/dist/cli/agents/hive-agents.js +22 -24
- package/dist/cli/agents/hive-agents.js.map +1 -1
- package/dist/cli/agents/index.d.ts.map +1 -1
- package/dist/cli/agents/index.js +17 -17
- package/dist/cli/agents/index.js.map +1 -1
- package/dist/cli/agents/researcher.d.ts.map +1 -1
- package/dist/cli/agents/researcher.js +41 -61
- package/dist/cli/agents/researcher.js.map +1 -1
- package/dist/cli/agents/tester.d.ts.map +1 -1
- package/dist/cli/agents/tester.js +78 -90
- package/dist/cli/agents/tester.js.map +1 -1
- package/dist/cli/cli-core.d.ts +4 -1
- package/dist/cli/cli-core.d.ts.map +1 -1
- package/dist/cli/cli-core.js +40 -39
- package/dist/cli/cli-core.js.map +1 -1
- package/dist/cli/command-registry.d.ts.map +1 -1
- package/dist/cli/command-registry.js +99 -74
- package/dist/cli/command-registry.js.map +1 -1
- package/dist/cli/commands/advanced-memory-commands.d.ts.map +1 -1
- package/dist/cli/commands/advanced-memory-commands.js +49 -40
- package/dist/cli/commands/advanced-memory-commands.js.map +1 -1
- package/dist/cli/commands/agent-simple.d.ts +3 -0
- package/dist/cli/commands/agent-simple.d.ts.map +1 -1
- package/dist/cli/commands/agent-simple.js +30 -27
- package/dist/cli/commands/agent-simple.js.map +1 -1
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/agent.js +53 -40
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/cli/commands/claude-api.js +4 -4
- package/dist/cli/commands/claude-api.js.map +1 -1
- package/dist/cli/commands/claude.d.ts.map +1 -1
- package/dist/cli/commands/claude.js +2 -2
- package/dist/cli/commands/claude.js.map +1 -1
- package/dist/cli/commands/config-integration.d.ts +7 -1
- package/dist/cli/commands/config-integration.d.ts.map +1 -1
- package/dist/cli/commands/config-integration.js +18 -9
- package/dist/cli/commands/config-integration.js.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +2 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/enterprise.d.ts.map +1 -1
- package/dist/cli/commands/enterprise.js +115 -95
- package/dist/cli/commands/enterprise.js.map +1 -1
- package/dist/cli/commands/help-new.d.ts +7 -0
- package/dist/cli/commands/help-new.d.ts.map +1 -0
- package/dist/cli/commands/help-new.js +236 -0
- package/dist/cli/commands/help-new.js.map +1 -0
- package/dist/cli/commands/help.d.ts +2 -1
- package/dist/cli/commands/help.d.ts.map +1 -1
- package/dist/cli/commands/help.js +283 -133
- package/dist/cli/commands/help.js.map +1 -1
- package/dist/cli/commands/hive-mind/index.d.ts +1 -1
- package/dist/cli/commands/hive-mind/index.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/index.js +1 -1
- package/dist/cli/commands/hive-mind/index.js.map +1 -1
- package/dist/cli/commands/hive-mind/init.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/init.js.map +1 -1
- package/dist/cli/commands/hive-mind/optimize-memory.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/optimize-memory.js +35 -26
- package/dist/cli/commands/hive-mind/optimize-memory.js.map +1 -1
- package/dist/cli/commands/hive-mind/pause.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/pause.js +8 -6
- package/dist/cli/commands/hive-mind/pause.js.map +1 -1
- package/dist/cli/commands/hive-mind/ps.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/ps.js +17 -12
- package/dist/cli/commands/hive-mind/ps.js.map +1 -1
- package/dist/cli/commands/hive-mind/resume.js +12 -10
- package/dist/cli/commands/hive-mind/resume.js.map +1 -1
- package/dist/cli/commands/hive-mind/spawn.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/spawn.js +20 -11
- package/dist/cli/commands/hive-mind/spawn.js.map +1 -1
- package/dist/cli/commands/hive-mind/status.js +17 -22
- package/dist/cli/commands/hive-mind/status.js.map +1 -1
- package/dist/cli/commands/hive-mind/stop.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/stop.js +23 -15
- package/dist/cli/commands/hive-mind/stop.js.map +1 -1
- package/dist/cli/commands/hive-mind/task.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/task.js +25 -19
- package/dist/cli/commands/hive-mind/task.js.map +1 -1
- package/dist/cli/commands/hive-mind/wizard.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/wizard.js +86 -68
- package/dist/cli/commands/hive-mind/wizard.js.map +1 -1
- package/dist/cli/commands/hive.js +73 -38
- package/dist/cli/commands/hive.js.map +1 -1
- package/dist/cli/commands/hook-validator.d.ts.map +1 -1
- package/dist/cli/commands/hook-validator.js +4 -2
- package/dist/cli/commands/hook-validator.js.map +1 -1
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +8 -8
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +850 -784
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +8 -16
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/memory.d.ts.map +1 -1
- package/dist/cli/commands/memory.js +8 -8
- package/dist/cli/commands/memory.js.map +1 -1
- package/dist/cli/commands/migrate.d.ts.map +1 -1
- package/dist/cli/commands/migrate.js +3 -3
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/monitor.d.ts.map +1 -1
- package/dist/cli/commands/monitor.js +50 -34
- package/dist/cli/commands/monitor.js.map +1 -1
- package/dist/cli/commands/ruv-swarm.d.ts +7 -1
- package/dist/cli/commands/ruv-swarm.d.ts.map +1 -1
- package/dist/cli/commands/ruv-swarm.js +6 -6
- package/dist/cli/commands/ruv-swarm.js.map +1 -1
- package/dist/cli/commands/session.d.ts.map +1 -1
- package/dist/cli/commands/session.js +22 -17
- package/dist/cli/commands/session.js.map +1 -1
- package/dist/cli/commands/sparc.d.ts +1 -1
- package/dist/cli/commands/sparc.d.ts.map +1 -1
- package/dist/cli/commands/sparc.js +146 -126
- package/dist/cli/commands/sparc.js.map +1 -1
- package/dist/cli/commands/start/event-emitter.js +1 -1
- package/dist/cli/commands/start/event-emitter.js.map +1 -1
- package/dist/cli/commands/start/process-manager.d.ts.map +1 -1
- package/dist/cli/commands/start/process-manager.js +20 -18
- package/dist/cli/commands/start/process-manager.js.map +1 -1
- package/dist/cli/commands/start/process-ui-simple.d.ts +4 -0
- package/dist/cli/commands/start/process-ui-simple.d.ts.map +1 -1
- package/dist/cli/commands/start/process-ui-simple.js +2 -2
- package/dist/cli/commands/start/process-ui-simple.js.map +1 -1
- package/dist/cli/commands/start/start-command.d.ts.map +1 -1
- package/dist/cli/commands/start/start-command.js +27 -15
- package/dist/cli/commands/start/start-command.js.map +1 -1
- package/dist/cli/commands/start/system-monitor.d.ts +3 -0
- package/dist/cli/commands/start/system-monitor.d.ts.map +1 -1
- package/dist/cli/commands/start/system-monitor.js +16 -18
- package/dist/cli/commands/start/system-monitor.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +28 -33
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/swarm-spawn.d.ts.map +1 -1
- package/dist/cli/commands/swarm-spawn.js +1 -1
- package/dist/cli/commands/swarm-spawn.js.map +1 -1
- package/dist/cli/commands/swarm.d.ts +4 -1
- package/dist/cli/commands/swarm.d.ts.map +1 -1
- package/dist/cli/commands/swarm.js +23 -18
- package/dist/cli/commands/swarm.js.map +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/workflow.d.ts.map +1 -1
- package/dist/cli/commands/workflow.js +49 -45
- package/dist/cli/commands/workflow.js.map +1 -1
- package/dist/cli/completion.d.ts +3 -0
- package/dist/cli/completion.d.ts.map +1 -1
- package/dist/cli/completion.js +15 -5
- package/dist/cli/completion.js.map +1 -1
- package/dist/cli/formatter.d.ts +3 -0
- package/dist/cli/formatter.d.ts.map +1 -1
- package/dist/cli/formatter.js +3 -3
- package/dist/cli/formatter.js.map +1 -1
- package/dist/cli/help-formatter.d.ts +49 -0
- package/dist/cli/help-formatter.d.ts.map +1 -0
- package/dist/cli/help-formatter.js +108 -0
- package/dist/cli/help-formatter.js.map +1 -0
- package/dist/cli/index-remote.d.ts +4 -0
- package/dist/cli/index-remote.d.ts.map +1 -1
- package/dist/cli/index-remote.js +1 -1
- package/dist/cli/index-remote.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +32 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/batch-tools.d.ts.map +1 -1
- package/dist/cli/init/batch-tools.js.map +1 -1
- package/dist/cli/init/claude-config.d.ts.map +1 -1
- package/dist/cli/init/claude-config.js +111 -106
- package/dist/cli/init/claude-config.js.map +1 -1
- package/dist/cli/init/directory-structure.d.ts.map +1 -1
- package/dist/cli/init/directory-structure.js +3 -3
- package/dist/cli/init/directory-structure.js.map +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/index.js +1 -1
- package/dist/cli/init/index.js.map +1 -1
- package/dist/cli/init/sparc-environment.d.ts.map +1 -1
- package/dist/cli/init/sparc-environment.js +69 -69
- package/dist/cli/init/sparc-environment.js.map +1 -1
- package/dist/cli/init/swarm-commands.d.ts.map +1 -1
- package/dist/cli/init/swarm-commands.js +1 -1
- package/dist/cli/init/swarm-commands.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +6 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/node-compat.d.ts.map +1 -1
- package/dist/cli/node-compat.js +24 -18
- package/dist/cli/node-compat.js.map +1 -1
- package/dist/cli/node-repl.d.ts +4 -0
- package/dist/cli/node-repl.d.ts.map +1 -1
- package/dist/cli/node-repl.js +24 -30
- package/dist/cli/node-repl.js.map +1 -1
- package/dist/cli/repl.d.ts.map +1 -1
- package/dist/cli/repl.js +81 -70
- package/dist/cli/repl.js.map +1 -1
- package/dist/cli/runtime-detector.d.ts.map +1 -1
- package/dist/cli/runtime-detector.js +11 -7
- package/dist/cli/runtime-detector.js.map +1 -1
- package/dist/cli/simple-cli.d.ts +4 -0
- package/dist/cli/simple-cli.d.ts.map +1 -1
- package/dist/cli/simple-cli.js +109 -95
- package/dist/cli/simple-cli.js.map +1 -1
- package/dist/cli/simple-commands/analysis.d.ts.map +1 -1
- package/dist/cli/simple-commands/analysis.js +18 -11
- package/dist/cli/simple-commands/analysis.js.map +1 -1
- package/dist/cli/simple-commands/automation.js +32 -17
- package/dist/cli/simple-commands/automation.js.map +1 -1
- package/dist/cli/simple-commands/batch-manager.js +44 -39
- package/dist/cli/simple-commands/batch-manager.js.map +1 -1
- package/dist/cli/simple-commands/config.d.ts.map +1 -1
- package/dist/cli/simple-commands/config.js +22 -21
- package/dist/cli/simple-commands/config.js.map +1 -1
- package/dist/cli/simple-commands/coordination.d.ts.map +1 -1
- package/dist/cli/simple-commands/coordination.js +12 -12
- package/dist/cli/simple-commands/coordination.js.map +1 -1
- package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +1 -1
- package/dist/cli/simple-commands/fix-hook-variables.js +36 -30
- package/dist/cli/simple-commands/fix-hook-variables.js.map +1 -1
- package/dist/cli/simple-commands/github.d.ts.map +1 -1
- package/dist/cli/simple-commands/github.js +15 -15
- package/dist/cli/simple-commands/github.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +12 -10
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/communication.js +42 -45
- package/dist/cli/simple-commands/hive-mind/communication.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/core.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/core.js +97 -89
- package/dist/cli/simple-commands/hive-mind/core.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js +114 -59
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +182 -103
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/memory.js +105 -75
- package/dist/cli/simple-commands/hive-mind/memory.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +45 -43
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/queen.js +101 -88
- package/dist/cli/simple-commands/hive-mind/queen.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/session-manager.js +75 -53
- package/dist/cli/simple-commands/hive-mind/session-manager.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind-optimize.js +18 -18
- package/dist/cli/simple-commands/hive-mind-optimize.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind.js +207 -144
- package/dist/cli/simple-commands/hive-mind.js.map +1 -1
- package/dist/cli/simple-commands/hook-safety.d.ts.map +1 -1
- package/dist/cli/simple-commands/hook-safety.js +19 -19
- package/dist/cli/simple-commands/hook-safety.js.map +1 -1
- package/dist/cli/simple-commands/hooks.d.ts.map +1 -1
- package/dist/cli/simple-commands/hooks.js +85 -71
- package/dist/cli/simple-commands/hooks.js.map +1 -1
- package/dist/cli/simple-commands/init/batch-init.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/batch-init.js +62 -55
- package/dist/cli/simple-commands/init/batch-init.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +2 -2
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +58 -50
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +34 -28
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/executable-wrapper.js +7 -4
- package/dist/cli/simple-commands/init/executable-wrapper.js.map +1 -1
- package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/gitignore-updater.js +10 -9
- package/dist/cli/simple-commands/init/gitignore-updater.js.map +1 -1
- package/dist/cli/simple-commands/init/help.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/help.js.map +1 -1
- package/dist/cli/simple-commands/init/index.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/index.js +159 -103
- package/dist/cli/simple-commands/init/index.js.map +1 -1
- package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/performance-monitor.js +17 -18
- package/dist/cli/simple-commands/init/performance-monitor.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/backup-manager.js +19 -25
- package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/index.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/index.js +18 -15
- package/dist/cli/simple-commands/init/rollback/index.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js +49 -68
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js +16 -24
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/state-tracker.js +25 -25
- package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +1 -1
- package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js +57 -57
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +1 -1
- package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/sparc/workflows.js +21 -21
- package/dist/cli/simple-commands/init/sparc/workflows.js.map +1 -1
- package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/sparc-structure.js +1 -1
- package/dist/cli/simple-commands/init/sparc-structure.js.map +1 -1
- package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js +69 -78
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +1 -1
- package/dist/cli/simple-commands/init/templates/sparc-modes.js +2 -2
- package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/config-validator.js +12 -16
- package/dist/cli/simple-commands/init/validation/config-validator.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/health-checker.js +39 -41
- package/dist/cli/simple-commands/init/validation/health-checker.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/index.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/index.js +8 -8
- package/dist/cli/simple-commands/init/validation/index.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/mode-validator.js +12 -12
- package/dist/cli/simple-commands/init/validation/mode-validator.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/post-init-validator.js +13 -13
- package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js +19 -24
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +1 -1
- package/dist/cli/simple-commands/mcp.js +2 -2
- package/dist/cli/simple-commands/mcp.js.map +1 -1
- package/dist/cli/simple-commands/memory.js +4 -4
- package/dist/cli/simple-commands/memory.js.map +1 -1
- package/dist/cli/simple-commands/migrate-hooks.d.ts.map +1 -1
- package/dist/cli/simple-commands/migrate-hooks.js +3 -3
- package/dist/cli/simple-commands/migrate-hooks.js.map +1 -1
- package/dist/cli/simple-commands/monitor.d.ts.map +1 -1
- package/dist/cli/simple-commands/monitor.js +34 -26
- package/dist/cli/simple-commands/monitor.js.map +1 -1
- package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +1 -1
- package/dist/cli/simple-commands/process-ui-enhanced.js +53 -39
- package/dist/cli/simple-commands/process-ui-enhanced.js.map +1 -1
- package/dist/cli/simple-commands/sparc-modes/index.js +11 -11
- package/dist/cli/simple-commands/sparc-modes/index.js.map +1 -1
- package/dist/cli/simple-commands/sparc-modes/swarm.js +50 -50
- package/dist/cli/simple-commands/sparc.d.ts.map +1 -1
- package/dist/cli/simple-commands/sparc.js +21 -11
- package/dist/cli/simple-commands/sparc.js.map +1 -1
- package/dist/cli/simple-commands/start-ui.d.ts.map +1 -1
- package/dist/cli/simple-commands/start-ui.js +5 -3
- package/dist/cli/simple-commands/start-ui.js.map +1 -1
- package/dist/cli/simple-commands/start-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/start-wrapper.js +1 -1
- package/dist/cli/simple-commands/start-wrapper.js.map +1 -1
- package/dist/cli/simple-commands/status.js +14 -14
- package/dist/cli/simple-commands/status.js.map +1 -1
- package/dist/cli/simple-commands/swarm-executor.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm-executor.js +19 -19
- package/dist/cli/simple-commands/swarm-executor.js.map +1 -1
- package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm-metrics-integration.js +30 -21
- package/dist/cli/simple-commands/swarm-metrics-integration.js.map +1 -1
- package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm-webui-integration.js +30 -18
- package/dist/cli/simple-commands/swarm-webui-integration.js.map +1 -1
- package/dist/cli/simple-commands/swarm.d.ts +1 -1
- package/dist/cli/simple-commands/swarm.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm.js +81 -76
- package/dist/cli/simple-commands/swarm.js.map +1 -1
- package/dist/cli/simple-commands/training.d.ts.map +1 -1
- package/dist/cli/simple-commands/training.js +7 -7
- package/dist/cli/simple-commands/training.js.map +1 -1
- package/dist/cli/simple-commands/web-server.d.ts.map +1 -1
- package/dist/cli/simple-commands/web-server.js +68 -66
- package/dist/cli/simple-commands/web-server.js.map +1 -1
- package/dist/cli/simple-mcp.d.ts.map +1 -1
- package/dist/cli/simple-mcp.js +2 -4
- package/dist/cli/simple-mcp.js.map +1 -1
- package/dist/cli/simple-orchestrator.d.ts +3 -0
- package/dist/cli/simple-orchestrator.d.ts.map +1 -1
- package/dist/cli/simple-orchestrator.js +36 -35
- package/dist/cli/simple-orchestrator.js.map +1 -1
- package/dist/cli/ui/compatible-ui.d.ts +4 -0
- package/dist/cli/ui/compatible-ui.d.ts.map +1 -1
- package/dist/cli/ui/compatible-ui.js +9 -8
- package/dist/cli/ui/compatible-ui.js.map +1 -1
- package/dist/cli/ui/fallback-handler.d.ts.map +1 -1
- package/dist/cli/ui/fallback-handler.js +4 -4
- package/dist/cli/ui/fallback-handler.js.map +1 -1
- package/dist/cli/ui/index.d.ts +2 -2
- package/dist/cli/ui/index.d.ts.map +1 -1
- package/dist/cli/ui/index.js +3 -3
- package/dist/cli/ui/index.js.map +1 -1
- package/dist/cli/utils/environment-detector.d.ts.map +1 -1
- package/dist/cli/utils/environment-detector.js +13 -11
- package/dist/cli/utils/environment-detector.js.map +1 -1
- package/dist/cli/utils/interactive-detector.d.ts.map +1 -1
- package/dist/cli/utils/interactive-detector.js +1 -1
- package/dist/cli/utils/interactive-detector.js.map +1 -1
- package/dist/cli/utils/prompt-defaults.d.ts.map +1 -1
- package/dist/cli/utils/prompt-defaults.js +6 -7
- package/dist/cli/utils/prompt-defaults.js.map +1 -1
- package/dist/cli/utils/safe-interactive.d.ts.map +1 -1
- package/dist/cli/utils/safe-interactive.js +7 -6
- package/dist/cli/utils/safe-interactive.js.map +1 -1
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +58 -50
- package/dist/cli/utils.js.map +1 -1
- package/dist/cli/validation-helper.d.ts +27 -0
- package/dist/cli/validation-helper.d.ts.map +1 -0
- package/dist/cli/validation-helper.js +72 -0
- package/dist/cli/validation-helper.js.map +1 -0
- package/dist/communication/message-bus.d.ts.map +1 -1
- package/dist/communication/message-bus.js +80 -74
- package/dist/communication/message-bus.js.map +1 -1
- package/dist/config/config-manager.d.ts +3 -0
- package/dist/config/config-manager.d.ts.map +1 -1
- package/dist/config/config-manager.js +23 -6
- package/dist/config/config-manager.js.map +1 -1
- package/dist/config/ruv-swarm-config.d.ts +6 -0
- package/dist/config/ruv-swarm-config.d.ts.map +1 -1
- package/dist/config/ruv-swarm-config.js +37 -22
- package/dist/config/ruv-swarm-config.js.map +1 -1
- package/dist/config/ruv-swarm-integration.d.ts.map +1 -1
- package/dist/config/ruv-swarm-integration.js +21 -21
- package/dist/config/ruv-swarm-integration.js.map +1 -1
- package/dist/constants/agent-types.d.ts +4 -4
- package/dist/constants/agent-types.d.ts.map +1 -1
- package/dist/constants/agent-types.js +4 -4
- package/dist/constants/agent-types.js.map +1 -1
- package/dist/coordination/advanced-scheduler.d.ts.map +1 -1
- package/dist/coordination/advanced-scheduler.js +6 -10
- package/dist/coordination/advanced-scheduler.js.map +1 -1
- package/dist/coordination/advanced-task-executor.d.ts.map +1 -1
- package/dist/coordination/advanced-task-executor.js +33 -33
- package/dist/coordination/advanced-task-executor.js.map +1 -1
- package/dist/coordination/background-executor.d.ts.map +1 -1
- package/dist/coordination/background-executor.js +17 -16
- package/dist/coordination/background-executor.js.map +1 -1
- package/dist/coordination/circuit-breaker.d.ts.map +1 -1
- package/dist/coordination/circuit-breaker.js +3 -0
- package/dist/coordination/circuit-breaker.js.map +1 -1
- package/dist/coordination/conflict-resolution.d.ts.map +1 -1
- package/dist/coordination/conflict-resolution.js +10 -8
- package/dist/coordination/conflict-resolution.js.map +1 -1
- package/dist/coordination/dependency-graph.d.ts.map +1 -1
- package/dist/coordination/dependency-graph.js +4 -3
- package/dist/coordination/dependency-graph.js.map +1 -1
- package/dist/coordination/hive-orchestrator.d.ts.map +1 -1
- package/dist/coordination/hive-orchestrator.js +29 -25
- package/dist/coordination/hive-orchestrator.js.map +1 -1
- package/dist/coordination/hive-protocol.d.ts.map +1 -1
- package/dist/coordination/hive-protocol.js +22 -23
- package/dist/coordination/hive-protocol.js.map +1 -1
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +1 -1
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/load-balancer.d.ts.map +1 -1
- package/dist/coordination/load-balancer.js +55 -56
- package/dist/coordination/load-balancer.js.map +1 -1
- package/dist/coordination/manager.d.ts.map +1 -1
- package/dist/coordination/manager.js +2 -8
- package/dist/coordination/manager.js.map +1 -1
- package/dist/coordination/messaging.d.ts.map +1 -1
- package/dist/coordination/messaging.js +4 -4
- package/dist/coordination/messaging.js.map +1 -1
- package/dist/coordination/metrics.d.ts.map +1 -1
- package/dist/coordination/metrics.js +11 -9
- package/dist/coordination/metrics.js.map +1 -1
- package/dist/coordination/resources.d.ts.map +1 -1
- package/dist/coordination/resources.js +10 -6
- package/dist/coordination/resources.js.map +1 -1
- package/dist/coordination/scheduler.d.ts.map +1 -1
- package/dist/coordination/scheduler.js +4 -4
- package/dist/coordination/scheduler.js.map +1 -1
- package/dist/coordination/swarm-coordinator.d.ts.map +1 -1
- package/dist/coordination/swarm-coordinator.js +32 -34
- package/dist/coordination/swarm-coordinator.js.map +1 -1
- package/dist/coordination/swarm-monitor.d.ts.map +1 -1
- package/dist/coordination/swarm-monitor.js +17 -17
- package/dist/coordination/swarm-monitor.js.map +1 -1
- package/dist/coordination/work-stealing.d.ts.map +1 -1
- package/dist/coordination/work-stealing.js +3 -0
- package/dist/coordination/work-stealing.js.map +1 -1
- package/dist/core/config.d.ts +4 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +28 -31
- package/dist/core/config.js.map +1 -1
- package/dist/core/event-bus.d.ts +3 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/json-persistence.d.ts +3 -0
- package/dist/core/json-persistence.d.ts.map +1 -1
- package/dist/core/json-persistence.js +19 -23
- package/dist/core/json-persistence.js.map +1 -1
- package/dist/core/logger.d.ts +3 -0
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +2 -6
- package/dist/core/logger.js.map +1 -1
- package/dist/core/orchestrator-fixed.d.ts.map +1 -1
- package/dist/core/orchestrator-fixed.js +4 -1
- package/dist/core/orchestrator-fixed.js.map +1 -1
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/orchestrator.js +66 -33
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/persistence.d.ts +3 -0
- package/dist/core/persistence.d.ts.map +1 -1
- package/dist/core/persistence.js +25 -19
- package/dist/core/persistence.js.map +1 -1
- package/dist/enterprise/analytics-manager.d.ts.map +1 -1
- package/dist/enterprise/analytics-manager.js +141 -134
- package/dist/enterprise/analytics-manager.js.map +1 -1
- package/dist/enterprise/audit-manager.d.ts.map +1 -1
- package/dist/enterprise/audit-manager.js +144 -122
- package/dist/enterprise/audit-manager.js.map +1 -1
- package/dist/enterprise/cloud-manager.d.ts.map +1 -1
- package/dist/enterprise/cloud-manager.js +104 -99
- package/dist/enterprise/cloud-manager.js.map +1 -1
- package/dist/enterprise/deployment-manager.d.ts.map +1 -1
- package/dist/enterprise/deployment-manager.js +104 -97
- package/dist/enterprise/deployment-manager.js.map +1 -1
- package/dist/enterprise/index.d.ts +6 -6
- package/dist/enterprise/index.d.ts.map +1 -1
- package/dist/enterprise/project-manager.d.ts.map +1 -1
- package/dist/enterprise/project-manager.js +74 -66
- package/dist/enterprise/project-manager.js.map +1 -1
- package/dist/enterprise/security-manager.d.ts.map +1 -1
- package/dist/enterprise/security-manager.js +137 -129
- package/dist/enterprise/security-manager.js.map +1 -1
- package/dist/hive-mind/core/Agent.d.ts.map +1 -1
- package/dist/hive-mind/core/Agent.js +36 -36
- package/dist/hive-mind/core/Agent.js.map +1 -1
- package/dist/hive-mind/core/Communication.d.ts.map +1 -1
- package/dist/hive-mind/core/Communication.js +17 -17
- package/dist/hive-mind/core/Communication.js.map +1 -1
- package/dist/hive-mind/core/DatabaseManager.d.ts.map +1 -1
- package/dist/hive-mind/core/DatabaseManager.js +104 -58
- package/dist/hive-mind/core/DatabaseManager.js.map +1 -1
- package/dist/hive-mind/core/HiveMind.d.ts.map +1 -1
- package/dist/hive-mind/core/HiveMind.js +35 -35
- package/dist/hive-mind/core/HiveMind.js.map +1 -1
- package/dist/hive-mind/core/Memory.d.ts.map +1 -1
- package/dist/hive-mind/core/Memory.js +78 -71
- package/dist/hive-mind/core/Memory.js.map +1 -1
- package/dist/hive-mind/core/MemoryMonitor.d.ts.map +1 -1
- package/dist/hive-mind/core/MemoryMonitor.js +38 -38
- package/dist/hive-mind/core/MemoryMonitor.js.map +1 -1
- package/dist/hive-mind/core/Queen.d.ts.map +1 -1
- package/dist/hive-mind/core/Queen.js +110 -47
- package/dist/hive-mind/core/Queen.js.map +1 -1
- package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +1 -1
- package/dist/hive-mind/integration/ConsensusEngine.js +25 -23
- package/dist/hive-mind/integration/ConsensusEngine.js.map +1 -1
- package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +1 -1
- package/dist/hive-mind/integration/MCPToolWrapper.js.map +1 -1
- package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +1 -1
- package/dist/hive-mind/integration/SwarmOrchestrator.js +60 -58
- package/dist/hive-mind/integration/SwarmOrchestrator.js.map +1 -1
- package/dist/hive-mind/types.d.ts.map +1 -1
- package/dist/integration/mock-components.d.ts.map +1 -1
- package/dist/integration/mock-components.js +21 -21
- package/dist/integration/mock-components.js.map +1 -1
- package/dist/integration/system-integration.d.ts.map +1 -1
- package/dist/integration/system-integration.js +29 -12
- package/dist/integration/system-integration.js.map +1 -1
- package/dist/mcp/auth.d.ts +1 -1
- package/dist/mcp/auth.d.ts.map +1 -1
- package/dist/mcp/auth.js +8 -1
- package/dist/mcp/auth.js.map +1 -1
- package/dist/mcp/claude-code-wrapper.d.ts.map +1 -1
- package/dist/mcp/claude-code-wrapper.js +169 -68
- package/dist/mcp/claude-code-wrapper.js.map +1 -1
- package/dist/mcp/claude-flow-tools.d.ts.map +1 -1
- package/dist/mcp/claude-flow-tools.js +42 -3
- package/dist/mcp/claude-flow-tools.js.map +1 -1
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/integrate-wrapper.d.ts.map +1 -1
- package/dist/mcp/integrate-wrapper.js +5 -7
- package/dist/mcp/integrate-wrapper.js.map +1 -1
- package/dist/mcp/lifecycle-manager.d.ts.map +1 -1
- package/dist/mcp/lifecycle-manager.js +8 -7
- package/dist/mcp/lifecycle-manager.js.map +1 -1
- package/dist/mcp/load-balancer.d.ts.map +1 -1
- package/dist/mcp/load-balancer.js +5 -1
- package/dist/mcp/load-balancer.js.map +1 -1
- package/dist/mcp/orchestration-integration.d.ts.map +1 -1
- package/dist/mcp/orchestration-integration.js +22 -9
- package/dist/mcp/orchestration-integration.js.map +1 -1
- package/dist/mcp/performance-monitor.d.ts.map +1 -1
- package/dist/mcp/performance-monitor.js +22 -19
- package/dist/mcp/performance-monitor.js.map +1 -1
- package/dist/mcp/protocol-manager.d.ts.map +1 -1
- package/dist/mcp/protocol-manager.js +8 -19
- package/dist/mcp/protocol-manager.js.map +1 -1
- package/dist/mcp/recovery/connection-health-monitor.d.ts.map +1 -1
- package/dist/mcp/recovery/connection-health-monitor.js +5 -5
- package/dist/mcp/recovery/connection-health-monitor.js.map +1 -1
- package/dist/mcp/recovery/connection-state-manager.d.ts +4 -0
- package/dist/mcp/recovery/connection-state-manager.d.ts.map +1 -1
- package/dist/mcp/recovery/connection-state-manager.js +13 -13
- package/dist/mcp/recovery/connection-state-manager.js.map +1 -1
- package/dist/mcp/recovery/fallback-coordinator.d.ts.map +1 -1
- package/dist/mcp/recovery/fallback-coordinator.js +5 -5
- package/dist/mcp/recovery/fallback-coordinator.js.map +1 -1
- package/dist/mcp/recovery/index.d.ts +4 -4
- package/dist/mcp/recovery/index.d.ts.map +1 -1
- package/dist/mcp/recovery/index.js +4 -4
- package/dist/mcp/recovery/index.js.map +1 -1
- package/dist/mcp/recovery/reconnection-manager.d.ts.map +1 -1
- package/dist/mcp/recovery/reconnection-manager.js +1 -1
- package/dist/mcp/recovery/reconnection-manager.js.map +1 -1
- package/dist/mcp/recovery/recovery-manager.d.ts.map +1 -1
- package/dist/mcp/recovery/recovery-manager.js +2 -4
- package/dist/mcp/recovery/recovery-manager.js.map +1 -1
- package/dist/mcp/router.d.ts.map +1 -1
- package/dist/mcp/router.js +3 -0
- package/dist/mcp/router.js.map +1 -1
- package/dist/mcp/ruv-swarm-tools.d.ts.map +1 -1
- package/dist/mcp/ruv-swarm-tools.js +132 -102
- package/dist/mcp/ruv-swarm-tools.js.map +1 -1
- package/dist/mcp/server-with-wrapper.d.ts +3 -0
- package/dist/mcp/server-with-wrapper.d.ts.map +1 -1
- package/dist/mcp/server-with-wrapper.js +2 -3
- package/dist/mcp/server-with-wrapper.js.map +1 -1
- package/dist/mcp/server-wrapper-mode.d.ts +5 -0
- package/dist/mcp/server-wrapper-mode.d.ts.map +1 -1
- package/dist/mcp/server-wrapper-mode.js +2 -3
- package/dist/mcp/server-wrapper-mode.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +12 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +4 -3
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/mcp/sparc-modes.d.ts.map +1 -1
- package/dist/mcp/sparc-modes.js +15 -15
- package/dist/mcp/sparc-modes.js.map +1 -1
- package/dist/mcp/swarm-tools.d.ts.map +1 -1
- package/dist/mcp/swarm-tools.js +100 -80
- package/dist/mcp/swarm-tools.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +28 -12
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/transports/base.d.ts.map +1 -1
- package/dist/mcp/transports/base.js +3 -0
- package/dist/mcp/transports/base.js.map +1 -1
- package/dist/mcp/transports/http.d.ts +3 -0
- package/dist/mcp/transports/http.d.ts.map +1 -1
- package/dist/mcp/transports/http.js +3 -3
- package/dist/mcp/transports/http.js.map +1 -1
- package/dist/mcp/transports/stdio.d.ts +3 -0
- package/dist/mcp/transports/stdio.d.ts.map +1 -1
- package/dist/mcp/transports/stdio.js +3 -0
- package/dist/mcp/transports/stdio.js.map +1 -1
- package/dist/memory/advanced-memory-manager.d.ts.map +1 -1
- package/dist/memory/advanced-memory-manager.js +109 -100
- package/dist/memory/advanced-memory-manager.js.map +1 -1
- package/dist/memory/backends/base.d.ts.map +1 -1
- package/dist/memory/backends/base.js +3 -0
- package/dist/memory/backends/base.js.map +1 -1
- package/dist/memory/backends/markdown.d.ts +3 -0
- package/dist/memory/backends/markdown.d.ts.map +1 -1
- package/dist/memory/backends/markdown.js +8 -8
- package/dist/memory/backends/markdown.js.map +1 -1
- package/dist/memory/backends/sqlite.d.ts +3 -0
- package/dist/memory/backends/sqlite.d.ts.map +1 -1
- package/dist/memory/backends/sqlite.js +6 -2
- package/dist/memory/backends/sqlite.js.map +1 -1
- package/dist/memory/cache.d.ts.map +1 -1
- package/dist/memory/cache.js +5 -3
- package/dist/memory/cache.js.map +1 -1
- package/dist/memory/distributed-memory.d.ts.map +1 -1
- package/dist/memory/distributed-memory.js +27 -28
- package/dist/memory/distributed-memory.js.map +1 -1
- package/dist/memory/fallback-store.d.ts.map +1 -1
- package/dist/memory/fallback-store.js.map +1 -1
- package/dist/memory/in-memory-store.d.ts.map +1 -1
- package/dist/memory/in-memory-store.js +8 -8
- package/dist/memory/in-memory-store.js.map +1 -1
- package/dist/memory/indexer.d.ts.map +1 -1
- package/dist/memory/indexer.js +4 -1
- package/dist/memory/indexer.js.map +1 -1
- package/dist/memory/manager.d.ts.map +1 -1
- package/dist/memory/manager.js +17 -20
- package/dist/memory/manager.js.map +1 -1
- package/dist/memory/sqlite-store.js +12 -8
- package/dist/memory/sqlite-store.js.map +1 -1
- package/dist/memory/swarm-memory.d.ts.map +1 -1
- package/dist/memory/swarm-memory.js +37 -44
- package/dist/memory/swarm-memory.js.map +1 -1
- package/dist/migration/index.d.ts +4 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +8 -8
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/logger.d.ts.map +1 -1
- package/dist/migration/logger.js +5 -5
- package/dist/migration/logger.js.map +1 -1
- package/dist/migration/migration-analyzer.d.ts +3 -0
- package/dist/migration/migration-analyzer.d.ts.map +1 -1
- package/dist/migration/migration-analyzer.js +25 -20
- package/dist/migration/migration-analyzer.js.map +1 -1
- package/dist/migration/migration-runner.d.ts.map +1 -1
- package/dist/migration/migration-runner.js +35 -29
- package/dist/migration/migration-runner.js.map +1 -1
- package/dist/migration/migration-validator.d.ts +3 -0
- package/dist/migration/migration-validator.d.ts.map +1 -1
- package/dist/migration/migration-validator.js +22 -26
- package/dist/migration/migration-validator.js.map +1 -1
- package/dist/migration/progress-reporter.d.ts +3 -0
- package/dist/migration/progress-reporter.d.ts.map +1 -1
- package/dist/migration/progress-reporter.js +8 -8
- package/dist/migration/progress-reporter.js.map +1 -1
- package/dist/migration/rollback-manager.d.ts +3 -0
- package/dist/migration/rollback-manager.d.ts.map +1 -1
- package/dist/migration/rollback-manager.js +29 -26
- package/dist/migration/rollback-manager.js.map +1 -1
- package/dist/monitoring/diagnostics.d.ts.map +1 -1
- package/dist/monitoring/diagnostics.js +49 -37
- package/dist/monitoring/diagnostics.js.map +1 -1
- package/dist/monitoring/health-check.d.ts.map +1 -1
- package/dist/monitoring/health-check.js +24 -25
- package/dist/monitoring/health-check.js.map +1 -1
- package/dist/monitoring/real-time-monitor.d.ts.map +1 -1
- package/dist/monitoring/real-time-monitor.js +71 -58
- package/dist/monitoring/real-time-monitor.js.map +1 -1
- package/dist/resources/resource-manager.d.ts.map +1 -1
- package/dist/resources/resource-manager.js +96 -83
- package/dist/resources/resource-manager.js.map +1 -1
- package/dist/swarm/claude-flow-executor.d.ts.map +1 -1
- package/dist/swarm/claude-flow-executor.js +37 -31
- package/dist/swarm/claude-flow-executor.js.map +1 -1
- package/dist/swarm/coordinator.d.ts.map +1 -1
- package/dist/swarm/coordinator.js +330 -280
- package/dist/swarm/coordinator.js.map +1 -1
- package/dist/swarm/direct-executor.d.ts.map +1 -1
- package/dist/swarm/direct-executor.js +44 -37
- package/dist/swarm/direct-executor.js.map +1 -1
- package/dist/swarm/executor-v2.d.ts.map +1 -1
- package/dist/swarm/executor-v2.js +28 -27
- package/dist/swarm/executor-v2.js.map +1 -1
- package/dist/swarm/executor.d.ts +3 -0
- package/dist/swarm/executor.d.ts.map +1 -1
- package/dist/swarm/executor.js +58 -52
- package/dist/swarm/executor.js.map +1 -1
- package/dist/swarm/index.d.ts.map +1 -1
- package/dist/swarm/index.js +2 -2
- package/dist/swarm/index.js.map +1 -1
- package/dist/swarm/json-output-aggregator.d.ts.map +1 -1
- package/dist/swarm/json-output-aggregator.js +20 -19
- package/dist/swarm/json-output-aggregator.js.map +1 -1
- package/dist/swarm/memory.d.ts.map +1 -1
- package/dist/swarm/memory.js +67 -67
- package/dist/swarm/memory.js.map +1 -1
- package/dist/swarm/optimizations/async-file-manager.d.ts +4 -0
- package/dist/swarm/optimizations/async-file-manager.d.ts.map +1 -1
- package/dist/swarm/optimizations/async-file-manager.js +19 -23
- package/dist/swarm/optimizations/async-file-manager.js.map +1 -1
- package/dist/swarm/optimizations/circular-buffer.d.ts.map +1 -1
- package/dist/swarm/optimizations/circular-buffer.js +2 -4
- package/dist/swarm/optimizations/circular-buffer.js.map +1 -1
- package/dist/swarm/optimizations/connection-pool.d.ts.map +1 -1
- package/dist/swarm/optimizations/connection-pool.js +12 -13
- package/dist/swarm/optimizations/connection-pool.js.map +1 -1
- package/dist/swarm/optimizations/index.js +2 -2
- package/dist/swarm/optimizations/optimized-executor.d.ts.map +1 -1
- package/dist/swarm/optimizations/optimized-executor.js +23 -29
- package/dist/swarm/optimizations/optimized-executor.js.map +1 -1
- package/dist/swarm/optimizations/ttl-map.d.ts.map +1 -1
- package/dist/swarm/optimizations/ttl-map.js +4 -4
- package/dist/swarm/optimizations/ttl-map.js.map +1 -1
- package/dist/swarm/prompt-cli.d.ts.map +1 -1
- package/dist/swarm/prompt-cli.js +18 -13
- package/dist/swarm/prompt-cli.js.map +1 -1
- package/dist/swarm/prompt-copier-enhanced.d.ts.map +1 -1
- package/dist/swarm/prompt-copier-enhanced.js +12 -12
- package/dist/swarm/prompt-copier-enhanced.js.map +1 -1
- package/dist/swarm/prompt-copier.d.ts.map +1 -1
- package/dist/swarm/prompt-copier.js +15 -18
- package/dist/swarm/prompt-copier.js.map +1 -1
- package/dist/swarm/prompt-manager.d.ts.map +1 -1
- package/dist/swarm/prompt-manager.js +27 -21
- package/dist/swarm/prompt-manager.js.map +1 -1
- package/dist/swarm/prompt-utils.d.ts.map +1 -1
- package/dist/swarm/prompt-utils.js +34 -32
- package/dist/swarm/prompt-utils.js.map +1 -1
- package/dist/swarm/sparc-executor.d.ts.map +1 -1
- package/dist/swarm/sparc-executor.js +189 -123
- package/dist/swarm/sparc-executor.js.map +1 -1
- package/dist/swarm/strategies/auto.d.ts.map +1 -1
- package/dist/swarm/strategies/auto.js +105 -86
- package/dist/swarm/strategies/auto.js.map +1 -1
- package/dist/swarm/strategies/base.d.ts.map +1 -1
- package/dist/swarm/strategies/base.js +14 -11
- package/dist/swarm/strategies/base.js.map +1 -1
- package/dist/swarm/strategies/research.d.ts.map +1 -1
- package/dist/swarm/strategies/research.js +76 -71
- package/dist/swarm/strategies/research.js.map +1 -1
- package/dist/swarm/types.d.ts.map +1 -1
- package/dist/swarm/types.js +3 -0
- package/dist/swarm/types.js.map +1 -1
- package/dist/swarm/workers/copy-worker.js +4 -4
- package/dist/swarm/workers/copy-worker.js.map +1 -1
- package/dist/task/commands.d.ts.map +1 -1
- package/dist/task/commands.js +11 -7
- package/dist/task/commands.js.map +1 -1
- package/dist/task/coordination.d.ts.map +1 -1
- package/dist/task/coordination.js +75 -70
- package/dist/task/coordination.js.map +1 -1
- package/dist/task/engine.d.ts.map +1 -1
- package/dist/task/engine.js +34 -32
- package/dist/task/engine.js.map +1 -1
- package/dist/task/index.d.ts +3 -3
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task/index.js +11 -11
- package/dist/task/index.js.map +1 -1
- package/dist/terminal/adapters/native.d.ts.map +1 -1
- package/dist/terminal/adapters/native.js +6 -6
- package/dist/terminal/adapters/native.js.map +1 -1
- package/dist/terminal/adapters/vscode.d.ts +3 -0
- package/dist/terminal/adapters/vscode.d.ts.map +1 -1
- package/dist/terminal/adapters/vscode.js +6 -4
- package/dist/terminal/adapters/vscode.js.map +1 -1
- package/dist/terminal/manager.d.ts.map +1 -1
- package/dist/terminal/manager.js +6 -8
- package/dist/terminal/manager.js.map +1 -1
- package/dist/terminal/pool.d.ts.map +1 -1
- package/dist/terminal/pool.js +3 -0
- package/dist/terminal/pool.js.map +1 -1
- package/dist/terminal/session.d.ts.map +1 -1
- package/dist/terminal/session.js +6 -2
- package/dist/terminal/session.js.map +1 -1
- package/dist/ui/hive-dashboard.d.ts.map +1 -1
- package/dist/ui/hive-dashboard.js +52 -33
- package/dist/ui/hive-dashboard.js.map +1 -1
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js +1 -1
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/helpers.d.ts +3 -0
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +5 -8
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/npx-isolated-cache.js +3 -3
- package/dist/utils/npx-isolated-cache.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +8 -4
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/type-guards.d.ts +1 -1
- package/dist/utils/type-guards.d.ts.map +1 -1
- package/dist/utils/type-guards.js +11 -10
- package/dist/utils/type-guards.js.map +1 -1
- package/package.json +7 -6
- package/src/adapters/cliffy-node.ts +27 -22
- package/src/agents/agent-manager.ts +145 -121
- package/src/agents/agent-registry.ts +77 -70
- package/src/api/claude-client.ts +59 -38
- package/src/api/routes/analysis.js +750 -735
- package/src/cli/__tests__/command-registry.test.js +42 -32
- package/src/cli/__tests__/simple-cli.test.js +42 -37
- package/src/cli/__tests__/utils.test.js +9 -9
- package/src/cli/agents/README.md +30 -4
- package/src/cli/agents/analyst.ts +161 -163
- package/src/cli/agents/architect.ts +126 -131
- package/src/cli/agents/base-agent.ts +48 -47
- package/src/cli/agents/capabilities.ts +87 -85
- package/src/cli/agents/coder.ts +127 -120
- package/src/cli/agents/coordinator.ts +72 -72
- package/src/cli/agents/hive-agents.ts +96 -70
- package/src/cli/agents/index.ts +70 -55
- package/src/cli/agents/researcher.ts +63 -74
- package/src/cli/agents/tester.ts +91 -98
- package/src/cli/cli-core.ts +56 -47
- package/src/cli/command-registry.js +125 -83
- package/src/cli/commands/advanced-memory-commands.ts +210 -142
- package/src/cli/commands/agent-simple.ts +146 -114
- package/src/cli/commands/agent.ts +119 -95
- package/src/cli/commands/claude-api.ts +19 -15
- package/src/cli/commands/claude.ts +96 -88
- package/src/cli/commands/config-integration.ts +120 -101
- package/src/cli/commands/config.ts +10 -8
- package/src/cli/commands/enterprise.ts +323 -187
- package/src/cli/commands/help-new.ts +246 -0
- package/src/cli/commands/help.ts +326 -183
- package/src/cli/commands/hive-mind/index.ts +3 -3
- package/src/cli/commands/hive-mind/init.ts +19 -12
- package/src/cli/commands/hive-mind/optimize-memory.ts +83 -53
- package/src/cli/commands/hive-mind/pause.ts +27 -25
- package/src/cli/commands/hive-mind/ps.ts +43 -37
- package/src/cli/commands/hive-mind/resume.ts +26 -26
- package/src/cli/commands/hive-mind/spawn.ts +37 -29
- package/src/cli/commands/hive-mind/status.ts +51 -51
- package/src/cli/commands/hive-mind/stop.ts +56 -51
- package/src/cli/commands/hive-mind/task.ts +65 -54
- package/src/cli/commands/hive-mind/wizard.ts +181 -167
- package/src/cli/commands/hive.ts +136 -96
- package/src/cli/commands/hook-types.ts +2 -2
- package/src/cli/commands/hook-validator.ts +8 -4
- package/src/cli/commands/hook.ts +44 -42
- package/src/cli/commands/index.ts +1162 -1031
- package/src/cli/commands/mcp.ts +105 -94
- package/src/cli/commands/memory.ts +24 -21
- package/src/cli/commands/migrate.ts +24 -24
- package/src/cli/commands/monitor.ts +123 -93
- package/src/cli/commands/ruv-swarm.ts +131 -122
- package/src/cli/commands/session.ts +60 -45
- package/src/cli/commands/sparc.ts +170 -139
- package/src/cli/commands/start/event-emitter.ts +2 -2
- package/src/cli/commands/start/index.ts +1 -1
- package/src/cli/commands/start/process-manager.ts +30 -47
- package/src/cli/commands/start/process-ui-simple.ts +60 -49
- package/src/cli/commands/start/process-ui.ts +1 -1
- package/src/cli/commands/start/start-command.ts +104 -75
- package/src/cli/commands/start/system-monitor.ts +35 -41
- package/src/cli/commands/start/types.ts +3 -3
- package/src/cli/commands/start.ts +1 -1
- package/src/cli/commands/status.ts +67 -67
- package/src/cli/commands/swarm-spawn.ts +21 -12
- package/src/cli/commands/swarm.ts +221 -150
- package/src/cli/commands/task.ts +55 -55
- package/src/cli/commands/workflow.ts +174 -157
- package/src/cli/completion.ts +34 -19
- package/src/cli/create-enhanced-task.js +49 -17
- package/src/cli/formatter.ts +38 -37
- package/src/cli/help-formatter.js +145 -0
- package/src/cli/help-formatter.ts +173 -0
- package/src/cli/help-text.js +273 -6
- package/src/cli/index-remote.ts +12 -9
- package/src/cli/index.ts +77 -67
- package/src/cli/init/batch-tools.ts +4 -5
- package/src/cli/init/claude-config.ts +125 -118
- package/src/cli/init/directory-structure.ts +10 -11
- package/src/cli/init/index.ts +13 -13
- package/src/cli/init/sparc-environment.ts +90 -74
- package/src/cli/init/swarm-commands.ts +5 -6
- package/src/cli/init/utils.ts +1 -1
- package/src/cli/main.ts +9 -10
- package/src/cli/node-compat.js +26 -19
- package/src/cli/node-repl.ts +104 -87
- package/src/cli/repl.ts +190 -158
- package/src/cli/runtime-detector.js +24 -19
- package/src/cli/simple-cli.js +479 -394
- package/src/cli/simple-cli.ts +426 -366
- package/src/cli/simple-commands/__tests__/agent.test.js +49 -55
- package/src/cli/simple-commands/__tests__/memory.test.js +4 -401
- package/src/cli/simple-commands/__tests__/swarm.test.js +49 -55
- package/src/cli/simple-commands/__tests__/task.test.js +4 -478
- package/src/cli/simple-commands/agent.js +27 -27
- package/src/cli/simple-commands/analysis.js +179 -161
- package/src/cli/simple-commands/automation.js +226 -205
- package/src/cli/simple-commands/batch-manager.js +98 -88
- package/src/cli/simple-commands/config.js +65 -60
- package/src/cli/simple-commands/coordination.js +197 -185
- package/src/cli/simple-commands/enhanced-ui-views.js +142 -115
- package/src/cli/simple-commands/enhanced-webui-complete.js +267 -167
- package/src/cli/simple-commands/fix-hook-variables.js +73 -67
- package/src/cli/simple-commands/github/gh-coordinator.js +63 -53
- package/src/cli/simple-commands/github/github-api.js +45 -47
- package/src/cli/simple-commands/github.js +33 -34
- package/src/cli/simple-commands/hive-mind/auto-save-middleware.js +44 -40
- package/src/cli/simple-commands/hive-mind/communication.js +198 -185
- package/src/cli/simple-commands/hive-mind/core.js +289 -304
- package/src/cli/simple-commands/hive-mind/db-optimizer.js +278 -168
- package/src/cli/simple-commands/hive-mind/mcp-wrapper.js +352 -258
- package/src/cli/simple-commands/hive-mind/memory.js +356 -287
- package/src/cli/simple-commands/hive-mind/performance-optimizer.js +88 -79
- package/src/cli/simple-commands/hive-mind/performance-test.js +61 -49
- package/src/cli/simple-commands/hive-mind/queen.js +223 -213
- package/src/cli/simple-commands/hive-mind/session-manager.js +217 -157
- package/src/cli/simple-commands/hive-mind-optimize.js +69 -65
- package/src/cli/simple-commands/hive-mind-wizard.js +213 -211
- package/src/cli/simple-commands/hive-mind.js +602 -435
- package/src/cli/simple-commands/hive.js +12 -12
- package/src/cli/simple-commands/hook-safety.js +114 -111
- package/src/cli/simple-commands/hooks.js +1077 -1017
- package/src/cli/simple-commands/init/README.md +8 -1
- package/src/cli/simple-commands/init/VALIDATION_ROLLBACK.md +27 -1
- package/src/cli/simple-commands/init/batch-init.js +105 -100
- package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +6 -6
- package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +6 -6
- package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +20 -18
- package/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +85 -71
- package/src/cli/simple-commands/init/claude-commands/slash-commands.js +6 -7
- package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +42 -33
- package/src/cli/simple-commands/init/executable-wrapper.js +13 -10
- package/src/cli/simple-commands/init/gitignore-updater.js +22 -22
- package/src/cli/simple-commands/init/help.js +4 -2
- package/src/cli/simple-commands/init/index.js +405 -303
- package/src/cli/simple-commands/init/performance-monitor.js +71 -64
- package/src/cli/simple-commands/init/rollback/backup-manager.js +44 -64
- package/src/cli/simple-commands/init/rollback/index.js +31 -39
- package/src/cli/simple-commands/init/rollback/recovery-manager.js +71 -101
- package/src/cli/simple-commands/init/rollback/rollback-executor.js +34 -53
- package/src/cli/simple-commands/init/rollback/state-tracker.js +38 -49
- package/src/cli/simple-commands/init/sparc/roo-readme.js +1 -1
- package/src/cli/simple-commands/init/sparc/roomodes-config.js +99 -77
- package/src/cli/simple-commands/init/sparc/workflows.js +37 -33
- package/src/cli/simple-commands/init/sparc-structure.js +9 -10
- package/src/cli/simple-commands/init/templates/CLAUDE.md +94 -26
- package/src/cli/simple-commands/init/templates/claude-flow-universal +9 -7
- package/src/cli/simple-commands/init/templates/claude-md.js +1 -1
- package/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +15 -3
- package/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +12 -2
- package/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +10 -1
- package/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +18 -5
- package/src/cli/simple-commands/init/templates/commands/hooks/notification.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +13 -6
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +13 -5
- package/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +12 -1
- package/src/cli/simple-commands/init/templates/coordination-md.js +1 -1
- package/src/cli/simple-commands/init/templates/enhanced-templates.js +116 -113
- package/src/cli/simple-commands/init/templates/memory-bank-md.js +1 -1
- package/src/cli/simple-commands/init/templates/readme-files.js +1 -1
- package/src/cli/simple-commands/init/templates/safe-hook-patterns.js +176 -127
- package/src/cli/simple-commands/init/templates/settings.json +2 -5
- package/src/cli/simple-commands/init/templates/sparc-modes.js +3 -3
- package/src/cli/simple-commands/init/validation/config-validator.js +17 -28
- package/src/cli/simple-commands/init/validation/health-checker.js +54 -62
- package/src/cli/simple-commands/init/validation/index.js +18 -23
- package/src/cli/simple-commands/init/validation/mode-validator.js +22 -32
- package/src/cli/simple-commands/init/validation/post-init-validator.js +25 -26
- package/src/cli/simple-commands/init/validation/pre-init-validator.js +32 -36
- package/src/cli/simple-commands/init/validation/test-runner.js +55 -63
- package/src/cli/simple-commands/init.js +1 -1
- package/src/cli/simple-commands/mcp-integration-layer.js +179 -110
- package/src/cli/simple-commands/mcp.js +55 -48
- package/src/cli/simple-commands/memory.js +62 -56
- package/src/cli/simple-commands/migrate-hooks.js +9 -10
- package/src/cli/simple-commands/monitor.js +87 -67
- package/src/cli/simple-commands/process-ui-enhanced.js +207 -155
- package/src/cli/simple-commands/process-ui.js +65 -56
- package/src/cli/simple-commands/realtime-update-system.js +136 -129
- package/src/cli/simple-commands/sparc/architecture.js +352 -251
- package/src/cli/simple-commands/sparc/commands.js +122 -94
- package/src/cli/simple-commands/sparc/completion.js +274 -199
- package/src/cli/simple-commands/sparc/coordinator.js +217 -169
- package/src/cli/simple-commands/sparc/index.js +40 -36
- package/src/cli/simple-commands/sparc/phase-base.js +72 -58
- package/src/cli/simple-commands/sparc/pseudocode.js +275 -159
- package/src/cli/simple-commands/sparc/refinement.js +306 -212
- package/src/cli/simple-commands/sparc/specification.js +164 -94
- package/src/cli/simple-commands/sparc-modes/architect.js +1 -1
- package/src/cli/simple-commands/sparc-modes/ask.js +1 -1
- package/src/cli/simple-commands/sparc-modes/code.js +1 -1
- package/src/cli/simple-commands/sparc-modes/debug.js +1 -1
- package/src/cli/simple-commands/sparc-modes/devops.js +1 -1
- package/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
- package/src/cli/simple-commands/sparc-modes/generic.js +1 -1
- package/src/cli/simple-commands/sparc-modes/index.js +15 -15
- package/src/cli/simple-commands/sparc-modes/integration.js +1 -1
- package/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
- package/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
- package/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
- package/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
- package/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
- package/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
- package/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
- package/src/cli/simple-commands/sparc-modes/swarm.js +52 -52
- package/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
- package/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
- package/src/cli/simple-commands/sparc.js +87 -69
- package/src/cli/simple-commands/start-ui.js +21 -20
- package/src/cli/simple-commands/start-wrapper.js +29 -31
- package/src/cli/simple-commands/start.js +1 -1
- package/src/cli/simple-commands/status.js +53 -47
- package/src/cli/simple-commands/swarm-executor.js +47 -57
- package/src/cli/simple-commands/swarm-metrics-integration.js +119 -79
- package/src/cli/simple-commands/swarm-ui.js +120 -118
- package/src/cli/simple-commands/swarm-webui-integration.js +48 -27
- package/src/cli/simple-commands/swarm.js +216 -181
- package/src/cli/simple-commands/task.js +29 -29
- package/src/cli/simple-commands/timestamp-fix.js +28 -25
- package/src/cli/simple-commands/tool-execution-framework.js +115 -118
- package/src/cli/simple-commands/training.js +219 -194
- package/src/cli/simple-commands/web-server.js +118 -117
- package/src/cli/simple-commands/webui-validator.js +4 -3
- package/src/cli/simple-mcp.ts +14 -17
- package/src/cli/simple-orchestrator.ts +113 -101
- package/src/cli/swarm-standalone.js +20 -21
- package/src/cli/ui/compatible-ui.ts +55 -44
- package/src/cli/ui/fallback-handler.ts +19 -16
- package/src/cli/ui/index.ts +14 -15
- package/src/cli/utils/environment-detector.ts +75 -67
- package/src/cli/utils/interactive-detector.js +17 -11
- package/src/cli/utils/prompt-defaults.ts +32 -28
- package/src/cli/utils/safe-interactive.js +21 -20
- package/src/cli/utils.js +127 -110
- package/src/cli/validation-helper.js +113 -0
- package/src/cli/validation-helper.ts +128 -0
- package/src/communication/message-bus.ts +137 -124
- package/src/config/config-manager.ts +62 -30
- package/src/config/ruv-swarm-config.ts +105 -86
- package/src/config/ruv-swarm-integration.ts +38 -38
- package/src/constants/agent-types.ts +9 -8
- package/src/coordination/README.md +54 -31
- package/src/coordination/advanced-scheduler.ts +23 -26
- package/src/coordination/advanced-task-executor.ts +74 -68
- package/src/coordination/background-executor.ts +33 -30
- package/src/coordination/circuit-breaker.ts +26 -27
- package/src/coordination/conflict-resolution.ts +18 -27
- package/src/coordination/dependency-graph.ts +15 -18
- package/src/coordination/hive-orchestrator.ts +111 -81
- package/src/coordination/hive-protocol.ts +68 -77
- package/src/coordination/index.ts +3 -7
- package/src/coordination/load-balancer.ts +115 -105
- package/src/coordination/manager.ts +38 -51
- package/src/coordination/messaging.ts +19 -29
- package/src/coordination/metrics.ts +57 -60
- package/src/coordination/resources.ts +32 -37
- package/src/coordination/scheduler.ts +29 -30
- package/src/coordination/swarm-coordinator.ts +81 -70
- package/src/coordination/swarm-monitor.ts +90 -69
- package/src/coordination/work-stealing.ts +6 -13
- package/src/core/config.ts +148 -143
- package/src/core/event-bus.ts +5 -6
- package/src/core/json-persistence.ts +27 -34
- package/src/core/logger.ts +13 -16
- package/src/core/orchestrator-fixed.ts +33 -32
- package/src/core/orchestrator.ts +166 -159
- package/src/core/persistence.ts +47 -36
- package/src/enterprise/analytics-manager.ts +242 -233
- package/src/enterprise/audit-manager.ts +238 -184
- package/src/enterprise/cloud-manager.ts +167 -151
- package/src/enterprise/deployment-manager.ts +223 -180
- package/src/enterprise/index.ts +7 -7
- package/src/enterprise/project-manager.ts +151 -133
- package/src/enterprise/security-manager.ts +278 -223
- package/src/hive-mind/core/Agent.ts +112 -109
- package/src/hive-mind/core/Communication.ts +67 -69
- package/src/hive-mind/core/DatabaseManager.ts +299 -166
- package/src/hive-mind/core/HiveMind.ts +100 -96
- package/src/hive-mind/core/Memory.ts +304 -295
- package/src/hive-mind/core/MemoryMonitor.ts +46 -47
- package/src/hive-mind/core/Queen.ts +187 -114
- package/src/hive-mind/index.ts +2 -2
- package/src/hive-mind/integration/ConsensusEngine.ts +88 -92
- package/src/hive-mind/integration/MCPToolWrapper.ts +20 -72
- package/src/hive-mind/integration/SwarmOrchestrator.ts +173 -165
- package/src/hive-mind/types.ts +24 -12
- package/src/integration/mock-components.ts +42 -30
- package/src/integration/system-integration.ts +93 -69
- package/src/integration/types.ts +7 -7
- package/src/mcp/README.md +23 -4
- package/src/mcp/auth.ts +25 -18
- package/src/mcp/claude-code-wrapper.ts +257 -150
- package/src/mcp/claude-flow-tools.ts +52 -13
- package/src/mcp/client.ts +15 -13
- package/src/mcp/index.ts +22 -27
- package/src/mcp/integrate-wrapper.ts +18 -18
- package/src/mcp/lifecycle-manager.ts +30 -27
- package/src/mcp/load-balancer.ts +10 -11
- package/src/mcp/mcp-server.js +755 -370
- package/src/mcp/orchestration-integration.ts +32 -17
- package/src/mcp/performance-monitor.ts +65 -51
- package/src/mcp/protocol-manager.ts +36 -52
- package/src/mcp/recovery/connection-health-monitor.ts +40 -35
- package/src/mcp/recovery/connection-state-manager.ts +52 -50
- package/src/mcp/recovery/fallback-coordinator.ts +24 -24
- package/src/mcp/recovery/index.ts +23 -4
- package/src/mcp/recovery/reconnection-manager.ts +14 -15
- package/src/mcp/recovery/recovery-manager.ts +52 -68
- package/src/mcp/router.ts +1 -2
- package/src/mcp/ruv-swarm-tools.ts +167 -138
- package/src/mcp/ruv-swarm-wrapper.js +31 -23
- package/src/mcp/server-with-wrapper.ts +4 -5
- package/src/mcp/server-wrapper-mode.ts +5 -6
- package/src/mcp/server.ts +45 -40
- package/src/mcp/session-manager.ts +8 -11
- package/src/mcp/sparc-modes.ts +29 -28
- package/src/mcp/swarm-tools.ts +131 -114
- package/src/mcp/tests/mcp-integration.test.ts +49 -55
- package/src/mcp/tools.ts +53 -38
- package/src/mcp/transports/base.ts +4 -5
- package/src/mcp/transports/http.ts +45 -42
- package/src/mcp/transports/stdio.ts +9 -12
- package/src/memory/README.md +37 -27
- package/src/memory/advanced-memory-manager.ts +336 -279
- package/src/memory/backends/base.ts +4 -5
- package/src/memory/backends/markdown.ts +16 -22
- package/src/memory/backends/sqlite.ts +19 -15
- package/src/memory/cache.ts +18 -18
- package/src/memory/distributed-memory.ts +84 -92
- package/src/memory/enhanced-examples.js +68 -59
- package/src/memory/enhanced-memory.js +99 -80
- package/src/memory/fallback-store.js +16 -7
- package/src/memory/in-memory-store.js +31 -27
- package/src/memory/index.js +4 -4
- package/src/memory/indexer.ts +6 -10
- package/src/memory/manager.ts +45 -59
- package/src/memory/migration.js +107 -90
- package/src/memory/shared-memory.js +155 -157
- package/src/memory/sqlite-store.js +76 -59
- package/src/memory/swarm-memory.js +138 -131
- package/src/memory/swarm-memory.ts +74 -75
- package/src/memory/test-example.js +28 -30
- package/src/migration/README.md +25 -9
- package/src/migration/index.ts +13 -14
- package/src/migration/logger.ts +9 -7
- package/src/migration/migration-analyzer.ts +66 -52
- package/src/migration/migration-manifest.json +2 -6
- package/src/migration/migration-runner.ts +86 -63
- package/src/migration/migration-validator.ts +93 -68
- package/src/migration/package.json +1 -1
- package/src/migration/progress-reporter.ts +25 -21
- package/src/migration/rollback-manager.ts +79 -63
- package/src/migration/tests/migration-system.test.ts +4 -491
- package/src/migration/tsconfig.json +3 -10
- package/src/migration/types.ts +1 -1
- package/src/monitoring/diagnostics.ts +123 -97
- package/src/monitoring/health-check.ts +45 -51
- package/src/monitoring/real-time-monitor.ts +105 -92
- package/src/resources/resource-manager.ts +205 -159
- package/src/swarm/__tests__/integration.test.ts +59 -65
- package/src/swarm/__tests__/prompt-copier.test.ts +27 -27
- package/src/swarm/claude-flow-executor.ts +50 -49
- package/src/swarm/coordinator.ts +727 -635
- package/src/swarm/direct-executor.ts +80 -86
- package/src/swarm/executor-v2.ts +81 -66
- package/src/swarm/executor.ts +124 -124
- package/src/swarm/index.ts +7 -8
- package/src/swarm/json-output-aggregator.ts +56 -40
- package/src/swarm/memory.ts +152 -147
- package/src/swarm/optimizations/README.md +20 -12
- package/src/swarm/optimizations/__tests__/optimization.test.ts +84 -87
- package/src/swarm/optimizations/async-file-manager.ts +70 -80
- package/src/swarm/optimizations/circular-buffer.ts +37 -37
- package/src/swarm/optimizations/connection-pool.ts +64 -64
- package/src/swarm/optimizations/index.ts +4 -4
- package/src/swarm/optimizations/migration-guide.md +27 -16
- package/src/swarm/optimizations/optimized-executor.ts +104 -114
- package/src/swarm/optimizations/ttl-map.ts +66 -63
- package/src/swarm/prompt-cli.ts +48 -42
- package/src/swarm/prompt-copier-enhanced.ts +54 -55
- package/src/swarm/prompt-copier.ts +59 -65
- package/src/swarm/prompt-copying-README.md +49 -33
- package/src/swarm/prompt-manager.ts +69 -63
- package/src/swarm/prompt-utils.ts +71 -66
- package/src/swarm/sparc-executor.ts +298 -225
- package/src/swarm/strategies/auto.ts +367 -252
- package/src/swarm/strategies/base.ts +24 -20
- package/src/swarm/strategies/research.ts +144 -124
- package/src/swarm/types.ts +340 -309
- package/src/swarm/workers/copy-worker.ts +12 -13
- package/src/task/README.md +99 -70
- package/src/task/commands.ts +16 -8
- package/src/task/coordination.ts +209 -162
- package/src/task/engine.ts +81 -65
- package/src/task/index.ts +28 -31
- package/src/templates/claude-optimized/.claude/BATCHTOOLS_BEST_PRACTICES.md +479 -481
- package/src/templates/claude-optimized/.claude/BATCHTOOLS_GUIDE.md +210 -188
- package/src/templates/claude-optimized/.claude/MIGRATION_GUIDE.md +151 -105
- package/src/templates/claude-optimized/.claude/PERFORMANCE_BENCHMARKS.md +102 -87
- package/src/templates/claude-optimized/.claude/commands/claude-flow-help.md +18 -1
- package/src/templates/claude-optimized/.claude/commands/claude-flow-memory.md +17 -1
- package/src/templates/claude-optimized/.claude/commands/claude-flow-swarm.md +21 -1
- package/src/templates/claude-optimized/.claude/commands/sparc/architect.md +11 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/ask.md +16 -10
- package/src/templates/claude-optimized/.claude/commands/sparc/code.md +26 -7
- package/src/templates/claude-optimized/.claude/commands/sparc/debug.md +14 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/devops.md +23 -10
- package/src/templates/claude-optimized/.claude/commands/sparc/docs-writer.md +8 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/integration.md +43 -27
- package/src/templates/claude-optimized/.claude/commands/sparc/mcp.md +15 -1
- package/src/templates/claude-optimized/.claude/commands/sparc/post-deployment-monitoring-mode.md +45 -30
- package/src/templates/claude-optimized/.claude/commands/sparc/refinement-optimization-mode.md +23 -13
- package/src/templates/claude-optimized/.claude/commands/sparc/security-review.md +31 -17
- package/src/templates/claude-optimized/.claude/commands/sparc/sparc.md +54 -47
- package/src/templates/claude-optimized/.claude/commands/sparc/spec-pseudocode.md +27 -17
- package/src/templates/claude-optimized/.claude/commands/sparc/supabase-admin.md +18 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/tdd.md +23 -9
- package/src/templates/claude-optimized/.claude/commands/sparc/tutorial.md +22 -16
- package/src/templates/claude-optimized/.claude/commands/sparc.md +20 -1
- package/src/templates/claude-optimized/README.md +10 -1
- package/src/templates/claude-optimized/SUMMARY.md +23 -1
- package/src/templates/claude-optimized/deploy-to-project.js +22 -10
- package/src/templates/claude-optimized/install-template.js +14 -10
- package/src/templates/claude-optimized/manifest.json +1 -1
- package/src/templates/claude-optimized/package.json +1 -1
- package/src/templates/claude-optimized/template-manager.js +8 -8
- package/src/templates/claude-optimized/validate-template.js +33 -23
- package/src/terminal/adapters/base.ts +1 -1
- package/src/terminal/adapters/native.ts +47 -47
- package/src/terminal/adapters/vscode.ts +21 -28
- package/src/terminal/manager.ts +27 -22
- package/src/terminal/pool.ts +24 -27
- package/src/terminal/session.ts +18 -18
- package/src/terminal/vscode-bridge.ts +21 -21
- package/src/tests/validation-consistency.test.ts +4 -4
- package/src/types/cliffy.d.ts +11 -14
- package/src/types/global.d.ts +1 -2
- package/src/types/index.ts +2 -2
- package/src/types/mcp.d.ts +11 -17
- package/src/types/vscode.d.ts +18 -5
- package/src/ui/console/README-analysis-tools.md +52 -2
- package/src/ui/console/README.md +33 -1
- package/src/ui/console/WORKFLOW_DESIGNER_README.md +81 -22
- package/src/ui/console/analysis-tools.html +282 -261
- package/src/ui/console/analytics.html +329 -326
- package/src/ui/console/index.html +221 -209
- package/src/ui/console/js/analysis-tools.js +815 -754
- package/src/ui/console/js/command-handler.js +226 -196
- package/src/ui/console/js/console.js +117 -119
- package/src/ui/console/js/daa-tools.js +797 -787
- package/src/ui/console/js/memory-interface.js +676 -638
- package/src/ui/console/js/memory-test.js +49 -46
- package/src/ui/console/js/memory-tools.js +181 -159
- package/src/ui/console/js/settings.js +124 -103
- package/src/ui/console/js/terminal-emulator.js +147 -130
- package/src/ui/console/js/websocket-client.js +71 -71
- package/src/ui/console/js/workflow-designer.js +1126 -1110
- package/src/ui/console/neural-networks-demo.md +45 -16
- package/src/ui/console/styles/analysis-tools.css +571 -561
- package/src/ui/console/styles/console.css +16 -12
- package/src/ui/console/styles/daa-tools.css +322 -319
- package/src/ui/console/styles/responsive.css +71 -70
- package/src/ui/console/styles/settings.css +12 -12
- package/src/ui/console/styles/workflow-designer.css +628 -584
- package/src/ui/console/test-neural-networks.js +59 -54
- package/src/ui/console/test-neural.html +194 -196
- package/src/ui/console/workflow-designer-demo.html +433 -424
- package/src/ui/hive-dashboard.ts +74 -52
- package/src/ui/web-ui/EnhancedProcessUI.js +570 -424
- package/src/ui/web-ui/EnhancedWebUI.js +65 -65
- package/src/ui/web-ui/README.md +16 -16
- package/src/ui/web-ui/components/ComponentLibrary.js +173 -124
- package/src/ui/web-ui/core/EventBus.js +27 -25
- package/src/ui/web-ui/core/MCPIntegrationLayer.js +294 -108
- package/src/ui/web-ui/core/StateManager.js +43 -46
- package/src/ui/web-ui/core/UIManager.js +120 -70
- package/src/ui/web-ui/core/ViewManager.js +16 -19
- package/src/ui/web-ui/index.js +101 -48
- package/src/ui/web-ui/neural-panel-test.js +109 -108
- package/src/ui/web-ui/test-github-view.js +11 -12
- package/src/ui/web-ui/test-neural-panel.html +219 -205
- package/src/ui/web-ui/views/DAAView.js +88 -85
- package/src/ui/web-ui/views/GitHubIntegrationTest.js +42 -42
- package/src/ui/web-ui/views/GitHubIntegrationView.js +59 -53
- package/src/ui/web-ui/views/NeuralNetworkView.js +20 -21
- package/src/ui/web-ui/views/WorkflowAutomationView.js +31 -32
- package/src/utils/error-handler.js +1 -1
- package/src/utils/error-handler.ts +9 -5
- package/src/utils/errors.ts +20 -18
- package/src/utils/formatters.ts +6 -6
- package/src/utils/helpers.ts +53 -55
- package/src/utils/npx-isolated-cache.js +16 -16
- package/src/utils/paths.ts +9 -6
- package/src/utils/timezone-utils.js +16 -16
- package/src/utils/type-guards.ts +37 -26
- package/src/utils/types.ts +2 -2
package/src/cli/simple-cli.js
CHANGED
|
@@ -4,29 +4,45 @@
|
|
|
4
4
|
* This version avoids TypeScript issues in node_modules
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
executeCommand,
|
|
9
|
-
hasCommand,
|
|
10
|
-
showCommandHelp,
|
|
7
|
+
import {
|
|
8
|
+
executeCommand,
|
|
9
|
+
hasCommand,
|
|
10
|
+
showCommandHelp,
|
|
11
11
|
showAllCommands,
|
|
12
|
-
listCommands
|
|
12
|
+
listCommands,
|
|
13
13
|
} from './command-registry.js';
|
|
14
14
|
import { parseFlags } from './utils.js';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
args,
|
|
17
|
+
cwd,
|
|
18
|
+
isMainModule,
|
|
19
|
+
exit,
|
|
20
|
+
readTextFile,
|
|
21
|
+
writeTextFile,
|
|
22
|
+
mkdirAsync,
|
|
23
|
+
errors,
|
|
24
|
+
} from './node-compat.js';
|
|
16
25
|
import { spawn } from 'child_process';
|
|
17
26
|
import process from 'process';
|
|
18
27
|
import readline from 'readline';
|
|
19
|
-
import { getMainHelp, getCommandHelp } from './help-text.js';
|
|
28
|
+
import { getMainHelp, getCommandHelp, getStandardizedCommandHelp } from './help-text.js';
|
|
20
29
|
|
|
21
|
-
const VERSION = '2.0.0-alpha.
|
|
30
|
+
const VERSION = '2.0.0-alpha.61';
|
|
22
31
|
|
|
23
|
-
function printHelp() {
|
|
24
|
-
console.log(getMainHelp());
|
|
32
|
+
function printHelp(plain = false) {
|
|
33
|
+
console.log(getMainHelp(plain));
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
function printCommandHelp(command) {
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
// Try standardized help first
|
|
38
|
+
const standardCommands = ['agent', 'sparc', 'memory'];
|
|
39
|
+
if (standardCommands.includes(command)) {
|
|
40
|
+
const help = getStandardizedCommandHelp(command);
|
|
41
|
+
console.log(help);
|
|
42
|
+
} else {
|
|
43
|
+
const help = getCommandHelp(command);
|
|
44
|
+
console.log(help);
|
|
45
|
+
}
|
|
30
46
|
}
|
|
31
47
|
|
|
32
48
|
// Legacy help function for backward compatibility
|
|
@@ -173,8 +189,8 @@ function printWarning(message) {
|
|
|
173
189
|
console.warn(`⚠️ Warning: ${message}`);
|
|
174
190
|
}
|
|
175
191
|
|
|
176
|
-
function showHelpWithCommands() {
|
|
177
|
-
printHelp();
|
|
192
|
+
function showHelpWithCommands(plain = false) {
|
|
193
|
+
printHelp(plain);
|
|
178
194
|
console.log('\nRegistered Commands:');
|
|
179
195
|
const commands = listCommands();
|
|
180
196
|
for (const command of commands) {
|
|
@@ -185,30 +201,40 @@ function showHelpWithCommands() {
|
|
|
185
201
|
|
|
186
202
|
async function main() {
|
|
187
203
|
// args is imported from node-compat.js
|
|
188
|
-
|
|
204
|
+
|
|
189
205
|
if (args.length === 0) {
|
|
190
|
-
printHelp();
|
|
206
|
+
printHelp(usePlainHelp);
|
|
191
207
|
return;
|
|
192
208
|
}
|
|
193
209
|
|
|
194
210
|
const command = args[0];
|
|
195
211
|
const { flags, args: parsedArgs } = parseFlags(args.slice(1));
|
|
196
|
-
|
|
212
|
+
|
|
213
|
+
// Check for --plain flag for help early
|
|
214
|
+
const usePlainHelp = args.includes('--plain');
|
|
215
|
+
|
|
197
216
|
// Apply environment-based smart defaults
|
|
198
217
|
let enhancedFlags = flags;
|
|
199
218
|
try {
|
|
200
|
-
const { detectExecutionEnvironment, applySmartDefaults } = await import(
|
|
219
|
+
const { detectExecutionEnvironment, applySmartDefaults } = await import(
|
|
220
|
+
'./utils/environment-detector.js'
|
|
221
|
+
);
|
|
201
222
|
enhancedFlags = applySmartDefaults(flags);
|
|
202
|
-
|
|
223
|
+
|
|
203
224
|
// Store environment info for commands that need it
|
|
204
225
|
enhancedFlags._environment = detectExecutionEnvironment({ skipWarnings: true });
|
|
205
226
|
} catch (e) {
|
|
206
227
|
// If environment detector fails, continue with original flags
|
|
207
228
|
enhancedFlags = flags;
|
|
208
229
|
}
|
|
209
|
-
|
|
230
|
+
|
|
210
231
|
// Check if user is asking for help on a specific command
|
|
211
|
-
if (
|
|
232
|
+
if (
|
|
233
|
+
command !== 'help' &&
|
|
234
|
+
command !== '--help' &&
|
|
235
|
+
command !== '-h' &&
|
|
236
|
+
(enhancedFlags.help || enhancedFlags.h)
|
|
237
|
+
) {
|
|
212
238
|
const detailedHelp = getCommandHelp(command);
|
|
213
239
|
if (detailedHelp && !detailedHelp.includes('Help not available')) {
|
|
214
240
|
printCommandHelp(command);
|
|
@@ -231,7 +257,9 @@ async function main() {
|
|
|
231
257
|
console.log(` Terminal: ${env.terminalType}`);
|
|
232
258
|
console.log(` Interactive: ${env.isInteractive ? 'Yes' : 'No'}`);
|
|
233
259
|
console.log(` TTY Support: ${env.supportsRawMode ? 'Yes' : 'No'}`);
|
|
234
|
-
console.log(
|
|
260
|
+
console.log(
|
|
261
|
+
` Detected: ${env.isVSCode ? 'VS Code' : env.isCI ? 'CI/CD' : env.isDocker ? 'Docker' : env.isSSH ? 'SSH' : 'Standard Terminal'}`,
|
|
262
|
+
);
|
|
235
263
|
if (env.recommendedFlags.length > 0) {
|
|
236
264
|
console.log(`\n💡 Recommended flags:`);
|
|
237
265
|
console.log(` ${env.recommendedFlags.join(' ')}`);
|
|
@@ -250,7 +278,7 @@ async function main() {
|
|
|
250
278
|
case '-v':
|
|
251
279
|
printVersion();
|
|
252
280
|
return;
|
|
253
|
-
|
|
281
|
+
|
|
254
282
|
case 'help':
|
|
255
283
|
case '--help':
|
|
256
284
|
case '-h':
|
|
@@ -264,7 +292,7 @@ async function main() {
|
|
|
264
292
|
showCommandHelp(parsedArgs[0]);
|
|
265
293
|
}
|
|
266
294
|
} else {
|
|
267
|
-
printHelp();
|
|
295
|
+
printHelp(usePlainHelp);
|
|
268
296
|
}
|
|
269
297
|
return;
|
|
270
298
|
}
|
|
@@ -283,7 +311,7 @@ async function main() {
|
|
|
283
311
|
|
|
284
312
|
// Legacy command handling (to be refactored)
|
|
285
313
|
const subArgs = parsedArgs; // Use parsed args for legacy commands
|
|
286
|
-
|
|
314
|
+
|
|
287
315
|
switch (command) {
|
|
288
316
|
case 'status':
|
|
289
317
|
printSuccess('Claude-Flow System Status:');
|
|
@@ -294,18 +322,17 @@ async function main() {
|
|
|
294
322
|
console.log('🖥️ Terminal Pool: Ready');
|
|
295
323
|
console.log('🌐 MCP Server: Stopped');
|
|
296
324
|
break;
|
|
297
|
-
|
|
298
|
-
|
|
325
|
+
|
|
299
326
|
case 'monitor':
|
|
300
327
|
printSuccess('Starting system monitor...');
|
|
301
328
|
console.log('📊 Real-time monitoring would display here');
|
|
302
329
|
break;
|
|
303
|
-
|
|
330
|
+
|
|
304
331
|
case 'spawn':
|
|
305
332
|
// Convenience alias for agent spawn
|
|
306
333
|
const spawnType = subArgs[0] || 'general';
|
|
307
334
|
const spawnName = flags.name || `agent-${Date.now()}`;
|
|
308
|
-
|
|
335
|
+
|
|
309
336
|
printSuccess(`Spawning ${spawnType} agent: ${spawnName}`);
|
|
310
337
|
console.log('🤖 Agent would be created with the following configuration:');
|
|
311
338
|
console.log(` Type: ${spawnType}`);
|
|
@@ -314,14 +341,14 @@ async function main() {
|
|
|
314
341
|
console.log(' Status: Ready');
|
|
315
342
|
console.log('\n📋 Note: Full agent spawning requires orchestrator to be running');
|
|
316
343
|
break;
|
|
317
|
-
|
|
344
|
+
|
|
318
345
|
case 'terminal':
|
|
319
346
|
const terminalCmd = subArgs[0];
|
|
320
347
|
switch (terminalCmd) {
|
|
321
348
|
case 'pool':
|
|
322
349
|
const poolCmd = subArgs[1];
|
|
323
350
|
const detailed = subArgs.includes('--detailed') || subArgs.includes('-d');
|
|
324
|
-
|
|
351
|
+
|
|
325
352
|
if (poolCmd === 'status') {
|
|
326
353
|
printSuccess('Terminal Pool Status:');
|
|
327
354
|
console.log('🖥️ Status: Ready');
|
|
@@ -329,7 +356,7 @@ async function main() {
|
|
|
329
356
|
console.log('🟢 Active Terminals: 0');
|
|
330
357
|
console.log('⏸️ Idle Terminals: 0');
|
|
331
358
|
console.log('📈 Total Created: 0');
|
|
332
|
-
|
|
359
|
+
|
|
333
360
|
if (detailed) {
|
|
334
361
|
console.log('\n📋 Detailed Information:');
|
|
335
362
|
console.log(' Configuration:');
|
|
@@ -377,7 +404,7 @@ async function main() {
|
|
|
377
404
|
console.log('Options: --detailed, -d');
|
|
378
405
|
}
|
|
379
406
|
break;
|
|
380
|
-
|
|
407
|
+
|
|
381
408
|
case 'create':
|
|
382
409
|
// Advanced terminal creation
|
|
383
410
|
const nameIndex = subArgs.indexOf('--name');
|
|
@@ -385,15 +412,15 @@ async function main() {
|
|
|
385
412
|
const wdIndex = subArgs.indexOf('--working-directory');
|
|
386
413
|
const envIndex = subArgs.indexOf('--env');
|
|
387
414
|
const persistentIndex = subArgs.indexOf('--persistent');
|
|
388
|
-
|
|
415
|
+
|
|
389
416
|
const terminalConfig = {
|
|
390
417
|
name: nameIndex >= 0 ? subArgs[nameIndex + 1] : 'terminal-' + Date.now(),
|
|
391
418
|
shell: shellIndex >= 0 ? subArgs[shellIndex + 1] : 'bash',
|
|
392
419
|
workingDirectory: wdIndex >= 0 ? subArgs[wdIndex + 1] : cwd(),
|
|
393
420
|
env: envIndex >= 0 ? subArgs[envIndex + 1] : '',
|
|
394
|
-
persistent: persistentIndex >= 0
|
|
421
|
+
persistent: persistentIndex >= 0,
|
|
395
422
|
};
|
|
396
|
-
|
|
423
|
+
|
|
397
424
|
printSuccess('Creating terminal session...');
|
|
398
425
|
console.log(`🆔 Terminal ID: ${terminalConfig.name}`);
|
|
399
426
|
console.log(`🐚 Shell: ${terminalConfig.shell}`);
|
|
@@ -405,14 +432,14 @@ async function main() {
|
|
|
405
432
|
console.log('💾 Persistent: Yes');
|
|
406
433
|
}
|
|
407
434
|
break;
|
|
408
|
-
|
|
435
|
+
|
|
409
436
|
case 'execute':
|
|
410
437
|
case 'exec':
|
|
411
438
|
const execCmd = subArgs.slice(1).join(' ');
|
|
412
439
|
const sessionFlag = subArgs.indexOf('--session');
|
|
413
440
|
const timeoutFlag = subArgs.indexOf('--timeout');
|
|
414
441
|
const backgroundFlag = subArgs.includes('--background');
|
|
415
|
-
|
|
442
|
+
|
|
416
443
|
if (execCmd && sessionFlag < 0) {
|
|
417
444
|
printSuccess(`Executing command: ${execCmd}`);
|
|
418
445
|
console.log('🖥️ Command would execute in terminal pool');
|
|
@@ -424,10 +451,14 @@ async function main() {
|
|
|
424
451
|
const sessionId = subArgs[sessionFlag + 1];
|
|
425
452
|
const cmdStart = subArgs.indexOf('"');
|
|
426
453
|
const cmdEnd = subArgs.lastIndexOf('"');
|
|
427
|
-
const command =
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
454
|
+
const command =
|
|
455
|
+
cmdStart >= 0 && cmdEnd > cmdStart
|
|
456
|
+
? subArgs
|
|
457
|
+
.slice(cmdStart, cmdEnd + 1)
|
|
458
|
+
.join(' ')
|
|
459
|
+
.slice(1, -1)
|
|
460
|
+
: 'echo "No command"';
|
|
461
|
+
|
|
431
462
|
printSuccess(`Executing in session ${sessionId}: ${command}`);
|
|
432
463
|
if (timeoutFlag >= 0) {
|
|
433
464
|
console.log(`⏱️ Timeout: ${subArgs[timeoutFlag + 1]}`);
|
|
@@ -436,13 +467,13 @@ async function main() {
|
|
|
436
467
|
printError('Usage: terminal execute <command> [--session <id>] [--timeout <duration>]');
|
|
437
468
|
}
|
|
438
469
|
break;
|
|
439
|
-
|
|
470
|
+
|
|
440
471
|
case 'batch-exec':
|
|
441
472
|
// Batch command execution
|
|
442
|
-
const batchSession = subArgs.find(arg => !arg.startsWith('--'));
|
|
473
|
+
const batchSession = subArgs.find((arg) => !arg.startsWith('--'));
|
|
443
474
|
const commandsFlag = subArgs.indexOf('--commands');
|
|
444
475
|
const fileFlag = subArgs.indexOf('--file');
|
|
445
|
-
|
|
476
|
+
|
|
446
477
|
if (commandsFlag >= 0) {
|
|
447
478
|
const commands = subArgs[commandsFlag + 1].split(',');
|
|
448
479
|
printSuccess(`Executing ${commands.length} commands in sequence`);
|
|
@@ -455,7 +486,7 @@ async function main() {
|
|
|
455
486
|
console.log('Usage: terminal batch-exec --commands "cmd1,cmd2,cmd3" [--session <id>]');
|
|
456
487
|
}
|
|
457
488
|
break;
|
|
458
|
-
|
|
489
|
+
|
|
459
490
|
case 'list':
|
|
460
491
|
// List all terminal sessions
|
|
461
492
|
const listDetailed = subArgs.includes('--detailed');
|
|
@@ -468,7 +499,7 @@ async function main() {
|
|
|
468
499
|
console.log(' • Average Session Lifetime: N/A');
|
|
469
500
|
}
|
|
470
501
|
break;
|
|
471
|
-
|
|
502
|
+
|
|
472
503
|
case 'info':
|
|
473
504
|
// Get terminal info
|
|
474
505
|
const infoSessionId = subArgs[1];
|
|
@@ -484,7 +515,7 @@ async function main() {
|
|
|
484
515
|
printError('Usage: terminal info <session-id>');
|
|
485
516
|
}
|
|
486
517
|
break;
|
|
487
|
-
|
|
518
|
+
|
|
488
519
|
case 'attach':
|
|
489
520
|
// Attach to terminal
|
|
490
521
|
const attachId = subArgs[1];
|
|
@@ -496,7 +527,7 @@ async function main() {
|
|
|
496
527
|
printError('Usage: terminal attach <session-id>');
|
|
497
528
|
}
|
|
498
529
|
break;
|
|
499
|
-
|
|
530
|
+
|
|
500
531
|
case 'detach':
|
|
501
532
|
// Detach from terminal
|
|
502
533
|
const detachId = subArgs[1];
|
|
@@ -507,7 +538,7 @@ async function main() {
|
|
|
507
538
|
printError('Usage: terminal detach <session-id>');
|
|
508
539
|
}
|
|
509
540
|
break;
|
|
510
|
-
|
|
541
|
+
|
|
511
542
|
case 'terminate':
|
|
512
543
|
// Terminate terminal
|
|
513
544
|
const terminateId = subArgs[1];
|
|
@@ -522,10 +553,10 @@ async function main() {
|
|
|
522
553
|
printError('Usage: terminal terminate <session-id> [--graceful]');
|
|
523
554
|
}
|
|
524
555
|
break;
|
|
525
|
-
|
|
556
|
+
|
|
526
557
|
case 'cleanup':
|
|
527
558
|
// Cleanup idle terminals
|
|
528
|
-
const idleTime = subArgs.find(arg => arg.includes('--idle-longer-than'));
|
|
559
|
+
const idleTime = subArgs.find((arg) => arg.includes('--idle-longer-than'));
|
|
529
560
|
printSuccess('Cleaning up idle terminals...');
|
|
530
561
|
console.log('🧹 Scanning for idle sessions');
|
|
531
562
|
if (idleTime) {
|
|
@@ -533,7 +564,7 @@ async function main() {
|
|
|
533
564
|
}
|
|
534
565
|
console.log('✅ Cleanup complete: 0 terminals removed');
|
|
535
566
|
break;
|
|
536
|
-
|
|
567
|
+
|
|
537
568
|
case 'monitor':
|
|
538
569
|
// Monitor terminal
|
|
539
570
|
const monitorId = subArgs[1];
|
|
@@ -547,7 +578,7 @@ async function main() {
|
|
|
547
578
|
printError('Usage: terminal monitor <session-id>');
|
|
548
579
|
}
|
|
549
580
|
break;
|
|
550
|
-
|
|
581
|
+
|
|
551
582
|
case 'record':
|
|
552
583
|
// Record terminal session
|
|
553
584
|
const recordId = subArgs[1];
|
|
@@ -560,7 +591,7 @@ async function main() {
|
|
|
560
591
|
printError('Usage: terminal record <session-id> --output <file>');
|
|
561
592
|
}
|
|
562
593
|
break;
|
|
563
|
-
|
|
594
|
+
|
|
564
595
|
case 'replay':
|
|
565
596
|
// Replay terminal session
|
|
566
597
|
const replayFile = subArgs[1];
|
|
@@ -572,11 +603,11 @@ async function main() {
|
|
|
572
603
|
printError('Usage: terminal replay <recording-file>');
|
|
573
604
|
}
|
|
574
605
|
break;
|
|
575
|
-
|
|
606
|
+
|
|
576
607
|
case 'share':
|
|
577
608
|
// Share terminal session
|
|
578
609
|
const shareId = subArgs[1];
|
|
579
|
-
const accessLevel = subArgs.find(arg => arg.includes('--access-level'));
|
|
610
|
+
const accessLevel = subArgs.find((arg) => arg.includes('--access-level'));
|
|
580
611
|
if (shareId) {
|
|
581
612
|
printSuccess(`Sharing terminal session: ${shareId}`);
|
|
582
613
|
console.log(`🔗 Share URL: https://claude-flow.local/terminal/${shareId}/view`);
|
|
@@ -586,19 +617,19 @@ async function main() {
|
|
|
586
617
|
printError('Usage: terminal share <session-id> [--access-level read|write]');
|
|
587
618
|
}
|
|
588
619
|
break;
|
|
589
|
-
|
|
620
|
+
|
|
590
621
|
case 'multi-config':
|
|
591
622
|
// Multi-terminal configuration
|
|
592
623
|
const multiCmd = subArgs[1];
|
|
593
624
|
if (multiCmd === 'create') {
|
|
594
|
-
const configName = subArgs.find(arg => !arg.startsWith('--'));
|
|
625
|
+
const configName = subArgs.find((arg) => !arg.startsWith('--'));
|
|
595
626
|
printSuccess(`Creating multi-terminal configuration: ${configName || 'default'}`);
|
|
596
627
|
console.log('📋 Configuration template created');
|
|
597
628
|
} else {
|
|
598
629
|
console.log('Usage: terminal multi-config create --name <name> --config <file>');
|
|
599
630
|
}
|
|
600
631
|
break;
|
|
601
|
-
|
|
632
|
+
|
|
602
633
|
case 'multi-launch':
|
|
603
634
|
// Launch multi-terminal environment
|
|
604
635
|
const envName = subArgs[1];
|
|
@@ -613,17 +644,17 @@ async function main() {
|
|
|
613
644
|
printError('Usage: terminal multi-launch <environment-name>');
|
|
614
645
|
}
|
|
615
646
|
break;
|
|
616
|
-
|
|
647
|
+
|
|
617
648
|
case 'batch-create':
|
|
618
649
|
// Batch create terminals
|
|
619
|
-
const configFile = subArgs.find(arg => arg.includes('--config'));
|
|
650
|
+
const configFile = subArgs.find((arg) => arg.includes('--config'));
|
|
620
651
|
printSuccess('Creating multiple terminal sessions...');
|
|
621
652
|
if (configFile) {
|
|
622
653
|
console.log(`📄 Loading config from: ${configFile.split('=')[1]}`);
|
|
623
654
|
}
|
|
624
655
|
console.log('✅ Created 3 terminal sessions');
|
|
625
656
|
break;
|
|
626
|
-
|
|
657
|
+
|
|
627
658
|
case 'session':
|
|
628
659
|
// Legacy session command handling
|
|
629
660
|
const sessionCmd = subArgs[1];
|
|
@@ -643,7 +674,7 @@ async function main() {
|
|
|
643
674
|
console.log('Terminal session commands: list, info');
|
|
644
675
|
}
|
|
645
676
|
break;
|
|
646
|
-
|
|
677
|
+
|
|
647
678
|
default:
|
|
648
679
|
console.log('Terminal commands:');
|
|
649
680
|
console.log(' Basic:');
|
|
@@ -675,12 +706,12 @@ async function main() {
|
|
|
675
706
|
console.log(' terminal monitor dev --metrics cpu,memory');
|
|
676
707
|
}
|
|
677
708
|
break;
|
|
678
|
-
|
|
709
|
+
|
|
679
710
|
case 'session':
|
|
680
711
|
printSuccess('Terminal session manager ready');
|
|
681
712
|
console.log('🖥️ Session operations would be handled here');
|
|
682
713
|
break;
|
|
683
|
-
|
|
714
|
+
|
|
684
715
|
case 'workflow':
|
|
685
716
|
const workflowFile = subArgs[0];
|
|
686
717
|
if (workflowFile) {
|
|
@@ -690,12 +721,12 @@ async function main() {
|
|
|
690
721
|
printError('Please specify a workflow file');
|
|
691
722
|
}
|
|
692
723
|
break;
|
|
693
|
-
|
|
724
|
+
|
|
694
725
|
case 'repl':
|
|
695
726
|
printSuccess('Starting interactive REPL mode...');
|
|
696
727
|
await startRepl();
|
|
697
728
|
break;
|
|
698
|
-
|
|
729
|
+
|
|
699
730
|
case 'project':
|
|
700
731
|
const projectCmd = subArgs[0];
|
|
701
732
|
switch (projectCmd) {
|
|
@@ -705,24 +736,28 @@ async function main() {
|
|
|
705
736
|
printError('Usage: project create <name> [options]');
|
|
706
737
|
break;
|
|
707
738
|
}
|
|
708
|
-
|
|
739
|
+
|
|
709
740
|
const isolationFlag = subArgs.indexOf('--isolation');
|
|
710
741
|
const resourceQuotaFlag = subArgs.indexOf('--resource-quota');
|
|
711
742
|
const securityProfileFlag = subArgs.indexOf('--security-profile');
|
|
712
743
|
const templateFlag = subArgs.indexOf('--template');
|
|
713
|
-
|
|
744
|
+
|
|
714
745
|
printSuccess(`Creating project: ${projectName}`);
|
|
715
746
|
console.log('🏗️ Project Configuration:');
|
|
716
747
|
console.log(` Name: ${projectName}`);
|
|
717
|
-
console.log(
|
|
748
|
+
console.log(
|
|
749
|
+
` Isolation: ${isolationFlag >= 0 ? subArgs[isolationFlag + 1] : 'standard'}`,
|
|
750
|
+
);
|
|
718
751
|
if (resourceQuotaFlag >= 0) {
|
|
719
752
|
console.log(` Resource Quota: ${subArgs[resourceQuotaFlag + 1]}`);
|
|
720
753
|
}
|
|
721
|
-
console.log(
|
|
754
|
+
console.log(
|
|
755
|
+
` Security Profile: ${securityProfileFlag >= 0 ? subArgs[securityProfileFlag + 1] : 'default'}`,
|
|
756
|
+
);
|
|
722
757
|
if (templateFlag >= 0) {
|
|
723
758
|
console.log(` Template: ${subArgs[templateFlag + 1]}`);
|
|
724
759
|
}
|
|
725
|
-
|
|
760
|
+
|
|
726
761
|
// Create project directory structure
|
|
727
762
|
console.log('\n📁 Creating project structure:');
|
|
728
763
|
console.log(` ✓ Created /projects/${projectName}/`);
|
|
@@ -733,7 +768,7 @@ async function main() {
|
|
|
733
768
|
console.log(` ✓ Created project-config.json`);
|
|
734
769
|
console.log('\n✅ Project created successfully!');
|
|
735
770
|
break;
|
|
736
|
-
|
|
771
|
+
|
|
737
772
|
case 'switch':
|
|
738
773
|
const switchProject = subArgs[1];
|
|
739
774
|
if (!switchProject) {
|
|
@@ -747,21 +782,21 @@ async function main() {
|
|
|
747
782
|
console.log(' ✓ Workflow history loaded');
|
|
748
783
|
console.log(`\n📍 Active project: ${switchProject}`);
|
|
749
784
|
break;
|
|
750
|
-
|
|
785
|
+
|
|
751
786
|
case 'list':
|
|
752
787
|
const showActive = subArgs.includes('--active');
|
|
753
788
|
const withStats = subArgs.includes('--with-stats');
|
|
754
|
-
|
|
789
|
+
|
|
755
790
|
printSuccess('Available projects:');
|
|
756
791
|
const projects = [
|
|
757
792
|
{ name: 'microservices-platform', status: 'active', agents: 12, tasks: 45 },
|
|
758
793
|
{ name: 'ai-research', status: 'idle', agents: 3, tasks: 8 },
|
|
759
|
-
{ name: 'frontend-apps', status: 'archived', agents: 0, tasks: 0 }
|
|
794
|
+
{ name: 'frontend-apps', status: 'archived', agents: 0, tasks: 0 },
|
|
760
795
|
];
|
|
761
|
-
|
|
762
|
-
projects.forEach(project => {
|
|
796
|
+
|
|
797
|
+
projects.forEach((project) => {
|
|
763
798
|
if (showActive && project.status !== 'active') return;
|
|
764
|
-
|
|
799
|
+
|
|
765
800
|
console.log(`\n📦 ${project.name}`);
|
|
766
801
|
console.log(` Status: ${project.status}`);
|
|
767
802
|
if (withStats) {
|
|
@@ -770,15 +805,15 @@ async function main() {
|
|
|
770
805
|
}
|
|
771
806
|
});
|
|
772
807
|
break;
|
|
773
|
-
|
|
808
|
+
|
|
774
809
|
case 'config':
|
|
775
810
|
const configAction = subArgs[1];
|
|
776
811
|
const configProject = subArgs[2];
|
|
777
|
-
|
|
812
|
+
|
|
778
813
|
if (configAction === 'set' && configProject) {
|
|
779
814
|
const configKey = subArgs[3];
|
|
780
815
|
const configValue = subArgs.slice(4).join(' ');
|
|
781
|
-
|
|
816
|
+
|
|
782
817
|
printSuccess(`Updating project configuration: ${configProject}`);
|
|
783
818
|
console.log(` Setting: ${configKey} = ${configValue}`);
|
|
784
819
|
console.log('✅ Configuration updated');
|
|
@@ -791,14 +826,14 @@ async function main() {
|
|
|
791
826
|
console.log(' project config get <project> <key>');
|
|
792
827
|
}
|
|
793
828
|
break;
|
|
794
|
-
|
|
829
|
+
|
|
795
830
|
case 'monitor':
|
|
796
831
|
const monitorProject = subArgs[1];
|
|
797
832
|
if (!monitorProject) {
|
|
798
833
|
printError('Usage: project monitor <name> [options]');
|
|
799
834
|
break;
|
|
800
835
|
}
|
|
801
|
-
|
|
836
|
+
|
|
802
837
|
printSuccess(`Monitoring project: ${monitorProject}`);
|
|
803
838
|
console.log('\n📊 Real-time Metrics:');
|
|
804
839
|
console.log(' Resource Usage:');
|
|
@@ -814,49 +849,52 @@ async function main() {
|
|
|
814
849
|
console.log(' • Today: $124.50');
|
|
815
850
|
console.log(' • This Month: $2,845.00');
|
|
816
851
|
break;
|
|
817
|
-
|
|
852
|
+
|
|
818
853
|
case 'backup':
|
|
819
854
|
const backupProject = subArgs[1];
|
|
820
855
|
if (!backupProject) {
|
|
821
856
|
printError('Usage: project backup <name> [options]');
|
|
822
857
|
break;
|
|
823
858
|
}
|
|
824
|
-
|
|
859
|
+
|
|
825
860
|
const includeData = subArgs.includes('--include-data');
|
|
826
861
|
const includeConfig = subArgs.includes('--include-config');
|
|
827
862
|
const includeHistory = subArgs.includes('--include-history');
|
|
828
863
|
const outputFlag = subArgs.indexOf('--output');
|
|
829
|
-
|
|
864
|
+
|
|
830
865
|
printSuccess(`Creating backup for project: ${backupProject}`);
|
|
831
866
|
console.log('🗄️ Backup Configuration:');
|
|
832
867
|
console.log(` Include Data: ${includeData ? 'Yes' : 'No'}`);
|
|
833
868
|
console.log(` Include Config: ${includeConfig ? 'Yes' : 'No'}`);
|
|
834
869
|
console.log(` Include History: ${includeHistory ? 'Yes' : 'No'}`);
|
|
835
|
-
|
|
870
|
+
|
|
836
871
|
console.log('\n📦 Creating backup...');
|
|
837
872
|
console.log(' ✓ Collecting project data');
|
|
838
873
|
console.log(' ✓ Compressing files');
|
|
839
874
|
console.log(' ✓ Encrypting backup');
|
|
840
|
-
|
|
841
|
-
const outputFile =
|
|
875
|
+
|
|
876
|
+
const outputFile =
|
|
877
|
+
outputFlag >= 0
|
|
878
|
+
? subArgs[outputFlag + 1]
|
|
879
|
+
: `${backupProject}-backup-${Date.now()}.tar.gz`;
|
|
842
880
|
console.log(`\n✅ Backup created: ${outputFile}`);
|
|
843
881
|
console.log(' Size: 145MB');
|
|
844
882
|
console.log(' Checksum: sha256:abcd1234...');
|
|
845
883
|
break;
|
|
846
|
-
|
|
884
|
+
|
|
847
885
|
case 'share':
|
|
848
886
|
const shareFrom = subArgs[1];
|
|
849
887
|
const shareTo = subArgs[2];
|
|
850
|
-
|
|
888
|
+
|
|
851
889
|
if (!shareFrom || !shareTo) {
|
|
852
890
|
printError('Usage: project share <from-project> <to-project> [options]');
|
|
853
891
|
break;
|
|
854
892
|
}
|
|
855
|
-
|
|
893
|
+
|
|
856
894
|
const agentsFlag = subArgs.indexOf('--agents');
|
|
857
895
|
const permissionsFlag = subArgs.indexOf('--permissions');
|
|
858
896
|
const durationFlag = subArgs.indexOf('--duration');
|
|
859
|
-
|
|
897
|
+
|
|
860
898
|
printSuccess(`Sharing resources from ${shareFrom} to ${shareTo}`);
|
|
861
899
|
if (agentsFlag >= 0) {
|
|
862
900
|
console.log(` Agents: ${subArgs[agentsFlag + 1]}`);
|
|
@@ -869,19 +907,19 @@ async function main() {
|
|
|
869
907
|
}
|
|
870
908
|
console.log('\n✅ Resource sharing configured');
|
|
871
909
|
break;
|
|
872
|
-
|
|
910
|
+
|
|
873
911
|
case 'federation':
|
|
874
912
|
const fedCmd = subArgs[1];
|
|
875
|
-
|
|
913
|
+
|
|
876
914
|
if (fedCmd === 'create') {
|
|
877
915
|
const fedName = subArgs[2];
|
|
878
916
|
const projectsFlag = subArgs.indexOf('--projects');
|
|
879
|
-
|
|
917
|
+
|
|
880
918
|
if (!fedName) {
|
|
881
919
|
printError('Usage: project federation create <name> --projects <project-list>');
|
|
882
920
|
break;
|
|
883
921
|
}
|
|
884
|
-
|
|
922
|
+
|
|
885
923
|
printSuccess(`Creating federation: ${fedName}`);
|
|
886
924
|
if (projectsFlag >= 0) {
|
|
887
925
|
console.log(` Projects: ${subArgs[projectsFlag + 1]}`);
|
|
@@ -899,7 +937,7 @@ async function main() {
|
|
|
899
937
|
console.log('Federation commands: create, list, workflow');
|
|
900
938
|
}
|
|
901
939
|
break;
|
|
902
|
-
|
|
940
|
+
|
|
903
941
|
default:
|
|
904
942
|
console.log('Project commands:');
|
|
905
943
|
console.log(' create - Create new project with isolation');
|
|
@@ -911,16 +949,18 @@ async function main() {
|
|
|
911
949
|
console.log(' share - Share resources between projects');
|
|
912
950
|
console.log(' federation - Manage project federations');
|
|
913
951
|
console.log('\nExamples:');
|
|
914
|
-
console.log(
|
|
952
|
+
console.log(
|
|
953
|
+
' project create "microservices" --isolation strict --resource-quota "agents:15,memory:4GB"',
|
|
954
|
+
);
|
|
915
955
|
console.log(' project switch "microservices"');
|
|
916
956
|
console.log(' project monitor "microservices" --real-time');
|
|
917
957
|
}
|
|
918
958
|
break;
|
|
919
|
-
|
|
959
|
+
|
|
920
960
|
case 'cloud':
|
|
921
961
|
const cloudCmd = subArgs[0];
|
|
922
962
|
const cloudProvider = subArgs[1];
|
|
923
|
-
|
|
963
|
+
|
|
924
964
|
switch (cloudCmd) {
|
|
925
965
|
case 'aws':
|
|
926
966
|
switch (cloudProvider) {
|
|
@@ -929,7 +969,7 @@ async function main() {
|
|
|
929
969
|
const awsRegions = subArgs.indexOf('--regions');
|
|
930
970
|
const awsHA = subArgs.includes('--ha-configuration');
|
|
931
971
|
const awsCostOpt = subArgs.includes('--cost-optimization');
|
|
932
|
-
|
|
972
|
+
|
|
933
973
|
printSuccess('Deploying Claude-Flow to AWS');
|
|
934
974
|
console.log('☁️ AWS Deployment Configuration:');
|
|
935
975
|
if (awsServices >= 0) {
|
|
@@ -940,7 +980,7 @@ async function main() {
|
|
|
940
980
|
}
|
|
941
981
|
console.log(` High Availability: ${awsHA ? 'Enabled' : 'Disabled'}`);
|
|
942
982
|
console.log(` Cost Optimization: ${awsCostOpt ? 'Enabled' : 'Disabled'}`);
|
|
943
|
-
|
|
983
|
+
|
|
944
984
|
console.log('\n🚀 Deployment Progress:');
|
|
945
985
|
console.log(' ✓ Creating ECS cluster');
|
|
946
986
|
console.log(' ✓ Setting up Lambda functions');
|
|
@@ -948,13 +988,13 @@ async function main() {
|
|
|
948
988
|
console.log(' ✓ Setting up S3 buckets');
|
|
949
989
|
console.log(' ✓ Configuring CloudWatch monitoring');
|
|
950
990
|
console.log(' ✓ Setting up load balancers');
|
|
951
|
-
|
|
991
|
+
|
|
952
992
|
console.log('\n✅ AWS deployment completed successfully');
|
|
953
993
|
console.log(' Cluster ARN: arn:aws:ecs:us-east-1:123456789012:cluster/claude-flow');
|
|
954
994
|
console.log(' API Gateway: https://api.aws.claude-flow.com');
|
|
955
995
|
console.log(' Monitoring: https://console.aws.amazon.com/cloudwatch');
|
|
956
996
|
break;
|
|
957
|
-
|
|
997
|
+
|
|
958
998
|
case 'configure':
|
|
959
999
|
printSuccess('Configuring AWS integration');
|
|
960
1000
|
console.log('🔧 AWS Configuration:');
|
|
@@ -964,7 +1004,7 @@ async function main() {
|
|
|
964
1004
|
console.log(' ✓ Backup and disaster recovery');
|
|
965
1005
|
console.log(' ✓ Cost monitoring and alerts');
|
|
966
1006
|
break;
|
|
967
|
-
|
|
1007
|
+
|
|
968
1008
|
case 'status':
|
|
969
1009
|
printSuccess('AWS Infrastructure Status');
|
|
970
1010
|
console.log('\n🏗️ Infrastructure Health:');
|
|
@@ -973,26 +1013,26 @@ async function main() {
|
|
|
973
1013
|
console.log(' RDS Database: Available (Multi-AZ)');
|
|
974
1014
|
console.log(' S3 Buckets: 5 buckets, 2.3TB stored');
|
|
975
1015
|
console.log(' CloudWatch: 47 metrics, 0 alarms');
|
|
976
|
-
|
|
1016
|
+
|
|
977
1017
|
console.log('\n💰 Cost Summary (This Month):');
|
|
978
1018
|
console.log(' Compute (ECS/Lambda): $1,245.50');
|
|
979
1019
|
console.log(' Storage (S3/EBS): $342.25');
|
|
980
1020
|
console.log(' Network: $87.30');
|
|
981
1021
|
console.log(' Total: $1,675.05');
|
|
982
1022
|
break;
|
|
983
|
-
|
|
1023
|
+
|
|
984
1024
|
default:
|
|
985
1025
|
console.log('AWS commands: deploy, configure, status');
|
|
986
1026
|
}
|
|
987
1027
|
break;
|
|
988
|
-
|
|
1028
|
+
|
|
989
1029
|
case 'azure':
|
|
990
1030
|
switch (cloudProvider) {
|
|
991
1031
|
case 'deploy':
|
|
992
1032
|
const azureServices = subArgs.indexOf('--services');
|
|
993
1033
|
const azureRegions = subArgs.indexOf('--regions');
|
|
994
1034
|
const azureIntegration = subArgs.includes('--integration-with-aws');
|
|
995
|
-
|
|
1035
|
+
|
|
996
1036
|
printSuccess('Deploying Claude-Flow to Azure');
|
|
997
1037
|
console.log('☁️ Azure Deployment Configuration:');
|
|
998
1038
|
if (azureServices >= 0) {
|
|
@@ -1002,7 +1042,7 @@ async function main() {
|
|
|
1002
1042
|
console.log(` Regions: ${subArgs[azureRegions + 1]}`);
|
|
1003
1043
|
}
|
|
1004
1044
|
console.log(` AWS Integration: ${azureIntegration ? 'Enabled' : 'Disabled'}`);
|
|
1005
|
-
|
|
1045
|
+
|
|
1006
1046
|
console.log('\n🚀 Deployment Progress:');
|
|
1007
1047
|
console.log(' ✓ Creating AKS cluster');
|
|
1008
1048
|
console.log(' ✓ Setting up Azure Functions');
|
|
@@ -1010,13 +1050,13 @@ async function main() {
|
|
|
1010
1050
|
console.log(' ✓ Setting up Blob Storage');
|
|
1011
1051
|
console.log(' ✓ Configuring Azure Monitor');
|
|
1012
1052
|
console.log(' ✓ Setting up Application Gateway');
|
|
1013
|
-
|
|
1053
|
+
|
|
1014
1054
|
console.log('\n✅ Azure deployment completed successfully');
|
|
1015
1055
|
console.log(' Resource Group: claude-flow-production');
|
|
1016
1056
|
console.log(' API Gateway: https://api.azure.claude-flow.com');
|
|
1017
1057
|
console.log(' Monitoring: https://portal.azure.com');
|
|
1018
1058
|
break;
|
|
1019
|
-
|
|
1059
|
+
|
|
1020
1060
|
case 'configure':
|
|
1021
1061
|
printSuccess('Configuring Azure integration');
|
|
1022
1062
|
console.log('🔧 Azure Configuration:');
|
|
@@ -1026,7 +1066,7 @@ async function main() {
|
|
|
1026
1066
|
console.log(' ✓ Backup and site recovery');
|
|
1027
1067
|
console.log(' ✓ Cost management and budgets');
|
|
1028
1068
|
break;
|
|
1029
|
-
|
|
1069
|
+
|
|
1030
1070
|
case 'status':
|
|
1031
1071
|
printSuccess('Azure Infrastructure Status');
|
|
1032
1072
|
console.log('\n🏗️ Infrastructure Health:');
|
|
@@ -1035,26 +1075,26 @@ async function main() {
|
|
|
1035
1075
|
console.log(' Cosmos DB: Available (Global)');
|
|
1036
1076
|
console.log(' Blob Storage: 3 containers, 1.8TB stored');
|
|
1037
1077
|
console.log(' Azure Monitor: 35 metrics, 0 alerts');
|
|
1038
|
-
|
|
1078
|
+
|
|
1039
1079
|
console.log('\n💰 Cost Summary (This Month):');
|
|
1040
1080
|
console.log(' Compute (AKS/Functions): $985.40');
|
|
1041
1081
|
console.log(' Storage (Blob/Cosmos): $267.85');
|
|
1042
1082
|
console.log(' Network: $63.20');
|
|
1043
1083
|
console.log(' Total: $1,316.45');
|
|
1044
1084
|
break;
|
|
1045
|
-
|
|
1085
|
+
|
|
1046
1086
|
default:
|
|
1047
1087
|
console.log('Azure commands: deploy, configure, status');
|
|
1048
1088
|
}
|
|
1049
1089
|
break;
|
|
1050
|
-
|
|
1090
|
+
|
|
1051
1091
|
case 'gcp':
|
|
1052
1092
|
switch (cloudProvider) {
|
|
1053
1093
|
case 'deploy':
|
|
1054
1094
|
const gcpServices = subArgs.indexOf('--services');
|
|
1055
1095
|
const gcpRegions = subArgs.indexOf('--regions');
|
|
1056
1096
|
const multiCloud = subArgs.includes('--multi-cloud-networking');
|
|
1057
|
-
|
|
1097
|
+
|
|
1058
1098
|
printSuccess('Deploying Claude-Flow to Google Cloud');
|
|
1059
1099
|
console.log('☁️ GCP Deployment Configuration:');
|
|
1060
1100
|
if (gcpServices >= 0) {
|
|
@@ -1064,7 +1104,7 @@ async function main() {
|
|
|
1064
1104
|
console.log(` Regions: ${subArgs[gcpRegions + 1]}`);
|
|
1065
1105
|
}
|
|
1066
1106
|
console.log(` Multi-Cloud Networking: ${multiCloud ? 'Enabled' : 'Disabled'}`);
|
|
1067
|
-
|
|
1107
|
+
|
|
1068
1108
|
console.log('\n🚀 Deployment Progress:');
|
|
1069
1109
|
console.log(' ✓ Creating GKE cluster');
|
|
1070
1110
|
console.log(' ✓ Setting up Cloud Functions');
|
|
@@ -1072,13 +1112,13 @@ async function main() {
|
|
|
1072
1112
|
console.log(' ✓ Setting up Cloud Storage');
|
|
1073
1113
|
console.log(' ✓ Configuring Cloud Monitoring');
|
|
1074
1114
|
console.log(' ✓ Setting up Cloud Load Balancing');
|
|
1075
|
-
|
|
1115
|
+
|
|
1076
1116
|
console.log('\n✅ GCP deployment completed successfully');
|
|
1077
1117
|
console.log(' Project ID: claude-flow-production');
|
|
1078
1118
|
console.log(' API Gateway: https://api.gcp.claude-flow.com');
|
|
1079
1119
|
console.log(' Monitoring: https://console.cloud.google.com');
|
|
1080
1120
|
break;
|
|
1081
|
-
|
|
1121
|
+
|
|
1082
1122
|
case 'configure':
|
|
1083
1123
|
printSuccess('Configuring GCP integration');
|
|
1084
1124
|
console.log('🔧 GCP Configuration:');
|
|
@@ -1088,7 +1128,7 @@ async function main() {
|
|
|
1088
1128
|
console.log(' ✓ Backup and disaster recovery');
|
|
1089
1129
|
console.log(' ✓ Budget alerts and cost optimization');
|
|
1090
1130
|
break;
|
|
1091
|
-
|
|
1131
|
+
|
|
1092
1132
|
case 'status':
|
|
1093
1133
|
printSuccess('GCP Infrastructure Status');
|
|
1094
1134
|
console.log('\n🏗️ Infrastructure Health:');
|
|
@@ -1097,22 +1137,22 @@ async function main() {
|
|
|
1097
1137
|
console.log(' Cloud SQL: Available (HA)');
|
|
1098
1138
|
console.log(' Cloud Storage: 4 buckets, 2.1TB stored');
|
|
1099
1139
|
console.log(' Cloud Monitoring: 42 metrics, 0 incidents');
|
|
1100
|
-
|
|
1140
|
+
|
|
1101
1141
|
console.log('\n💰 Cost Summary (This Month):');
|
|
1102
1142
|
console.log(' Compute (GKE/Functions): $1,125.30');
|
|
1103
1143
|
console.log(' Storage (Cloud Storage/SQL): $298.75');
|
|
1104
1144
|
console.log(' Network: $71.45');
|
|
1105
1145
|
console.log(' Total: $1,495.50');
|
|
1106
1146
|
break;
|
|
1107
|
-
|
|
1147
|
+
|
|
1108
1148
|
default:
|
|
1109
1149
|
console.log('GCP commands: deploy, configure, status');
|
|
1110
1150
|
}
|
|
1111
1151
|
break;
|
|
1112
|
-
|
|
1152
|
+
|
|
1113
1153
|
case 'multi-cloud':
|
|
1114
1154
|
const multiCloudCmd = subArgs[1];
|
|
1115
|
-
|
|
1155
|
+
|
|
1116
1156
|
switch (multiCloudCmd) {
|
|
1117
1157
|
case 'deploy':
|
|
1118
1158
|
printSuccess('Deploying multi-cloud Claude-Flow architecture');
|
|
@@ -1120,59 +1160,59 @@ async function main() {
|
|
|
1120
1160
|
console.log(' Primary: AWS (us-east-1)');
|
|
1121
1161
|
console.log(' Secondary: Azure (eastus)');
|
|
1122
1162
|
console.log(' Tertiary: GCP (us-central1)');
|
|
1123
|
-
|
|
1163
|
+
|
|
1124
1164
|
console.log('\n🔗 Cross-Cloud Networking:');
|
|
1125
1165
|
console.log(' ✓ VPN connections established');
|
|
1126
1166
|
console.log(' ✓ DNS and load balancing configured');
|
|
1127
1167
|
console.log(' ✓ Data replication setup');
|
|
1128
1168
|
console.log(' ✓ Unified monitoring deployed');
|
|
1129
|
-
|
|
1169
|
+
|
|
1130
1170
|
console.log('\n✅ Multi-cloud deployment completed');
|
|
1131
1171
|
console.log(' Global endpoint: https://global.claude-flow.com');
|
|
1132
1172
|
console.log(' Failover time: < 30 seconds');
|
|
1133
1173
|
console.log(' Data consistency: Eventually consistent');
|
|
1134
1174
|
break;
|
|
1135
|
-
|
|
1175
|
+
|
|
1136
1176
|
case 'status':
|
|
1137
1177
|
printSuccess('Multi-Cloud Infrastructure Status');
|
|
1138
1178
|
console.log('\n🌐 Global Infrastructure:');
|
|
1139
1179
|
console.log(' AWS (Primary): 🟢 Healthy');
|
|
1140
1180
|
console.log(' Azure (Secondary): 🟢 Healthy');
|
|
1141
1181
|
console.log(' GCP (Tertiary): 🟢 Healthy');
|
|
1142
|
-
|
|
1182
|
+
|
|
1143
1183
|
console.log('\n📊 Traffic Distribution:');
|
|
1144
1184
|
console.log(' AWS: 45% (2,341 req/min)');
|
|
1145
1185
|
console.log(' Azure: 35% (1,823 req/min)');
|
|
1146
1186
|
console.log(' GCP: 20% (1,042 req/min)');
|
|
1147
|
-
|
|
1187
|
+
|
|
1148
1188
|
console.log('\n💰 Total Cost (This Month): $4,487.00');
|
|
1149
1189
|
break;
|
|
1150
|
-
|
|
1190
|
+
|
|
1151
1191
|
case 'failover':
|
|
1152
1192
|
const failoverTarget = subArgs[2];
|
|
1153
1193
|
if (!failoverTarget) {
|
|
1154
1194
|
printError('Usage: cloud multi-cloud failover <target-cloud>');
|
|
1155
1195
|
break;
|
|
1156
1196
|
}
|
|
1157
|
-
|
|
1197
|
+
|
|
1158
1198
|
printWarning(`Initiating failover to ${failoverTarget}`);
|
|
1159
1199
|
console.log('🔄 Failover Process:');
|
|
1160
1200
|
console.log(' ✓ Health check failed on primary');
|
|
1161
1201
|
console.log(' ✓ Traffic routing to secondary');
|
|
1162
1202
|
console.log(' ✓ Database replication verified');
|
|
1163
1203
|
console.log(' ✓ DNS updates propagated');
|
|
1164
|
-
|
|
1204
|
+
|
|
1165
1205
|
console.log(`\n✅ Failover to ${failoverTarget} completed in 23 seconds`);
|
|
1166
1206
|
break;
|
|
1167
|
-
|
|
1207
|
+
|
|
1168
1208
|
default:
|
|
1169
1209
|
console.log('Multi-cloud commands: deploy, status, failover');
|
|
1170
1210
|
}
|
|
1171
1211
|
break;
|
|
1172
|
-
|
|
1212
|
+
|
|
1173
1213
|
case 'kubernetes':
|
|
1174
1214
|
const k8sCmd = subArgs[1];
|
|
1175
|
-
|
|
1215
|
+
|
|
1176
1216
|
switch (k8sCmd) {
|
|
1177
1217
|
case 'deploy':
|
|
1178
1218
|
printSuccess('Deploying Claude-Flow to Kubernetes');
|
|
@@ -1180,7 +1220,7 @@ async function main() {
|
|
|
1180
1220
|
console.log(' Namespace: claude-flow');
|
|
1181
1221
|
console.log(' Replicas: 3');
|
|
1182
1222
|
console.log(' Resources: 1Gi memory, 500m CPU per pod');
|
|
1183
|
-
|
|
1223
|
+
|
|
1184
1224
|
console.log('\n📦 Deploying Components:');
|
|
1185
1225
|
console.log(' ✓ Orchestrator deployment');
|
|
1186
1226
|
console.log(' ✓ MCP server deployment');
|
|
@@ -1188,13 +1228,13 @@ async function main() {
|
|
|
1188
1228
|
console.log(' ✓ Load balancer service');
|
|
1189
1229
|
console.log(' ✓ Ingress controller');
|
|
1190
1230
|
console.log(' ✓ ConfigMaps and Secrets');
|
|
1191
|
-
|
|
1231
|
+
|
|
1192
1232
|
console.log('\n✅ Kubernetes deployment completed');
|
|
1193
1233
|
console.log(' Pods: 3/3 running');
|
|
1194
1234
|
console.log(' Service: claude-flow-orchestrator-service');
|
|
1195
1235
|
console.log(' Ingress: https://k8s.claude-flow.com');
|
|
1196
1236
|
break;
|
|
1197
|
-
|
|
1237
|
+
|
|
1198
1238
|
case 'scale':
|
|
1199
1239
|
const replicas = subArgs[2] || '5';
|
|
1200
1240
|
printSuccess(`Scaling Claude-Flow to ${replicas} replicas`);
|
|
@@ -1205,7 +1245,7 @@ async function main() {
|
|
|
1205
1245
|
console.log(' ✓ Rolling update in progress');
|
|
1206
1246
|
console.log(` ✓ Scaled to ${replicas} replicas successfully`);
|
|
1207
1247
|
break;
|
|
1208
|
-
|
|
1248
|
+
|
|
1209
1249
|
case 'status':
|
|
1210
1250
|
printSuccess('Kubernetes Cluster Status');
|
|
1211
1251
|
console.log('\n⚙️ Cluster Information:');
|
|
@@ -1215,18 +1255,18 @@ async function main() {
|
|
|
1215
1255
|
console.log(' Services: 2 active');
|
|
1216
1256
|
console.log(' ConfigMaps: 2');
|
|
1217
1257
|
console.log(' Secrets: 1');
|
|
1218
|
-
|
|
1258
|
+
|
|
1219
1259
|
console.log('\n📊 Resource Usage:');
|
|
1220
1260
|
console.log(' CPU: 1.2/3.0 cores (40%)');
|
|
1221
1261
|
console.log(' Memory: 2.1/3.0 GB (70%)');
|
|
1222
1262
|
console.log(' Storage: 8.5/50 GB (17%)');
|
|
1223
1263
|
break;
|
|
1224
|
-
|
|
1264
|
+
|
|
1225
1265
|
default:
|
|
1226
1266
|
console.log('Kubernetes commands: deploy, scale, status');
|
|
1227
1267
|
}
|
|
1228
1268
|
break;
|
|
1229
|
-
|
|
1269
|
+
|
|
1230
1270
|
default:
|
|
1231
1271
|
console.log('Cloud commands:');
|
|
1232
1272
|
console.log(' aws - Amazon Web Services integration');
|
|
@@ -1235,14 +1275,16 @@ async function main() {
|
|
|
1235
1275
|
console.log(' multi-cloud - Multi-cloud deployment and management');
|
|
1236
1276
|
console.log(' kubernetes - Kubernetes deployment and management');
|
|
1237
1277
|
console.log('\nExamples:');
|
|
1238
|
-
console.log(
|
|
1278
|
+
console.log(
|
|
1279
|
+
' cloud aws deploy --services "ecs,lambda,rds" --regions "us-east-1,us-west-2"',
|
|
1280
|
+
);
|
|
1239
1281
|
console.log(' cloud azure deploy --services "aks,functions,cosmos-db"');
|
|
1240
1282
|
console.log(' cloud gcp deploy --services "gke,cloud-functions,cloud-sql"');
|
|
1241
1283
|
console.log(' cloud multi-cloud deploy');
|
|
1242
1284
|
console.log(' cloud kubernetes deploy');
|
|
1243
1285
|
}
|
|
1244
1286
|
break;
|
|
1245
|
-
|
|
1287
|
+
|
|
1246
1288
|
case 'claude':
|
|
1247
1289
|
const claudeCmd = subArgs[0];
|
|
1248
1290
|
switch (claudeCmd) {
|
|
@@ -1255,13 +1297,13 @@ async function main() {
|
|
|
1255
1297
|
break;
|
|
1256
1298
|
}
|
|
1257
1299
|
}
|
|
1258
|
-
|
|
1300
|
+
|
|
1259
1301
|
const task = subArgs.slice(1, taskEndIndex).join(' ');
|
|
1260
1302
|
if (!task) {
|
|
1261
1303
|
printError('Usage: claude spawn <task description> [options]');
|
|
1262
1304
|
break;
|
|
1263
1305
|
}
|
|
1264
|
-
|
|
1306
|
+
|
|
1265
1307
|
// Parse flags
|
|
1266
1308
|
const flags = {};
|
|
1267
1309
|
for (let i = taskEndIndex; i < subArgs.length; i++) {
|
|
@@ -1288,7 +1330,7 @@ async function main() {
|
|
|
1288
1330
|
flags.dryRun = true;
|
|
1289
1331
|
}
|
|
1290
1332
|
}
|
|
1291
|
-
|
|
1333
|
+
|
|
1292
1334
|
// Build tools list
|
|
1293
1335
|
let tools = flags.tools || 'View,Edit,Replace,GlobTool,GrepTool,LS,Bash';
|
|
1294
1336
|
if (flags.parallel) {
|
|
@@ -1297,9 +1339,9 @@ async function main() {
|
|
|
1297
1339
|
if (flags.research) {
|
|
1298
1340
|
tools += ',WebFetchTool';
|
|
1299
1341
|
}
|
|
1300
|
-
|
|
1342
|
+
|
|
1301
1343
|
const instanceId = `claude-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
1302
|
-
|
|
1344
|
+
|
|
1303
1345
|
if (flags.dryRun) {
|
|
1304
1346
|
printWarning('DRY RUN - Would execute:');
|
|
1305
1347
|
console.log(`Command: claude "<enhanced task with guidance>" --allowedTools ${tools}`);
|
|
@@ -1327,7 +1369,7 @@ async function main() {
|
|
|
1327
1369
|
console.log(' - Coordination capabilities (swarm management)');
|
|
1328
1370
|
console.log(' - Best practices for multi-agent workflows');
|
|
1329
1371
|
console.log('');
|
|
1330
|
-
|
|
1372
|
+
|
|
1331
1373
|
// Build the actual claude command with enhanced guidance
|
|
1332
1374
|
let enhancedTask = `# Task Assignment
|
|
1333
1375
|
|
|
@@ -1438,36 +1480,38 @@ ${flags.mode === 'api-only' ? `Focus on API design, documentation, and endpoint
|
|
|
1438
1480
|
${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all aspects of the application.` : ''}
|
|
1439
1481
|
|
|
1440
1482
|
`;
|
|
1441
|
-
|
|
1483
|
+
|
|
1442
1484
|
const claudeArgs = [enhancedTask];
|
|
1443
1485
|
claudeArgs.push('--allowedTools', tools);
|
|
1444
|
-
|
|
1486
|
+
|
|
1445
1487
|
// DEBUG: Log what we're about to pass
|
|
1446
1488
|
console.log('\n🔍 DEBUG - Command Construction:');
|
|
1447
1489
|
console.log(`First arg length: ${claudeArgs[0].length} chars`);
|
|
1448
1490
|
console.log(`First 100 chars: ${claudeArgs[0].substring(0, 100)}...`);
|
|
1449
1491
|
console.log(`Args count: ${claudeArgs.length}`);
|
|
1450
|
-
|
|
1492
|
+
|
|
1451
1493
|
if (flags.noPermissions) {
|
|
1452
1494
|
claudeArgs.push('--dangerously-skip-permissions');
|
|
1453
1495
|
}
|
|
1454
|
-
|
|
1496
|
+
|
|
1455
1497
|
if (flags.config) {
|
|
1456
1498
|
claudeArgs.push('--mcp-config', flags.config);
|
|
1457
1499
|
}
|
|
1458
|
-
|
|
1500
|
+
|
|
1459
1501
|
if (flags.verbose) {
|
|
1460
1502
|
claudeArgs.push('--verbose');
|
|
1461
1503
|
}
|
|
1462
|
-
|
|
1504
|
+
|
|
1463
1505
|
// Execute the actual claude command
|
|
1464
1506
|
try {
|
|
1465
1507
|
// Debug: Log the actual command being executed
|
|
1466
1508
|
if (flags.verbose) {
|
|
1467
1509
|
console.log('Debug - Executing command:');
|
|
1468
|
-
console.log(
|
|
1510
|
+
console.log(
|
|
1511
|
+
`claude ${claudeArgs.map((arg) => (arg.includes(' ') || arg.includes('\n') ? `"${arg}"` : arg)).join(' ')}`,
|
|
1512
|
+
);
|
|
1469
1513
|
}
|
|
1470
|
-
|
|
1514
|
+
|
|
1471
1515
|
const child = spawn('claude', claudeArgs, {
|
|
1472
1516
|
env: {
|
|
1473
1517
|
...process.env,
|
|
@@ -1481,9 +1525,9 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1481
1525
|
CLAUDE_FLOW_COORDINATION_ENABLED: flags.parallel ? 'true' : 'false',
|
|
1482
1526
|
CLAUDE_FLOW_FEATURES: 'memory,coordination,swarm',
|
|
1483
1527
|
},
|
|
1484
|
-
stdio: 'inherit'
|
|
1528
|
+
stdio: 'inherit',
|
|
1485
1529
|
});
|
|
1486
|
-
|
|
1530
|
+
|
|
1487
1531
|
// Wait for process to exit
|
|
1488
1532
|
await new Promise((resolve) => {
|
|
1489
1533
|
child.on('exit', (code) => {
|
|
@@ -1501,7 +1545,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1501
1545
|
}
|
|
1502
1546
|
}
|
|
1503
1547
|
break;
|
|
1504
|
-
|
|
1548
|
+
|
|
1505
1549
|
case 'batch':
|
|
1506
1550
|
const workflowFile = subArgs[1];
|
|
1507
1551
|
if (!workflowFile) {
|
|
@@ -1511,33 +1555,38 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1511
1555
|
printSuccess(`Loading workflow: ${workflowFile}`);
|
|
1512
1556
|
console.log('📋 Batch execution would process workflow file');
|
|
1513
1557
|
break;
|
|
1514
|
-
|
|
1558
|
+
|
|
1515
1559
|
default:
|
|
1516
1560
|
console.log('Claude commands: spawn, batch');
|
|
1517
1561
|
console.log('\nExamples:');
|
|
1518
|
-
console.log(
|
|
1562
|
+
console.log(
|
|
1563
|
+
' claude-flow claude spawn "implement user authentication" --research --parallel',
|
|
1564
|
+
);
|
|
1519
1565
|
console.log(' claude-flow claude spawn "fix bug in payment system" --no-permissions');
|
|
1520
1566
|
console.log(' claude-flow claude batch workflow.json --dry-run');
|
|
1521
1567
|
}
|
|
1522
1568
|
break;
|
|
1523
|
-
|
|
1524
|
-
|
|
1569
|
+
|
|
1525
1570
|
case 'deploy':
|
|
1526
1571
|
const deployCmd = subArgs[0];
|
|
1527
1572
|
switch (deployCmd) {
|
|
1528
1573
|
case 'ha-cluster':
|
|
1529
|
-
const nodes = subArgs.find(arg => arg.includes('--nodes'));
|
|
1530
|
-
const regions = subArgs.find(arg => arg.includes('--regions'));
|
|
1531
|
-
const replicationFactor = subArgs.find(arg => arg.includes('--replication-factor'));
|
|
1532
|
-
|
|
1574
|
+
const nodes = subArgs.find((arg) => arg.includes('--nodes'));
|
|
1575
|
+
const regions = subArgs.find((arg) => arg.includes('--regions'));
|
|
1576
|
+
const replicationFactor = subArgs.find((arg) => arg.includes('--replication-factor'));
|
|
1577
|
+
|
|
1533
1578
|
printSuccess('Deploying High Availability Cluster...');
|
|
1534
1579
|
console.log('🏗️ HA Configuration:');
|
|
1535
1580
|
console.log(` Nodes: ${nodes ? nodes.split('=')[1] : '3'}`);
|
|
1536
|
-
console.log(
|
|
1537
|
-
|
|
1581
|
+
console.log(
|
|
1582
|
+
` Regions: ${regions ? regions.split('=')[1] : 'us-east-1,us-west-2,eu-west-1'}`,
|
|
1583
|
+
);
|
|
1584
|
+
console.log(
|
|
1585
|
+
` Replication Factor: ${replicationFactor ? replicationFactor.split('=')[1] : '2'}`,
|
|
1586
|
+
);
|
|
1538
1587
|
console.log(' Load Balancer: nginx');
|
|
1539
1588
|
console.log(' Health Checks: comprehensive');
|
|
1540
|
-
|
|
1589
|
+
|
|
1541
1590
|
console.log('\n🚀 Deployment Progress:');
|
|
1542
1591
|
console.log(' ✓ Provisioning nodes in us-east-1');
|
|
1543
1592
|
console.log(' ✓ Provisioning nodes in us-west-2');
|
|
@@ -1548,10 +1597,10 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1548
1597
|
console.log('\n✅ HA cluster deployed successfully!');
|
|
1549
1598
|
console.log(' Cluster endpoint: https://claude-flow-ha.example.com');
|
|
1550
1599
|
break;
|
|
1551
|
-
|
|
1600
|
+
|
|
1552
1601
|
case 'scaling':
|
|
1553
1602
|
const scalingAction = subArgs[1];
|
|
1554
|
-
|
|
1603
|
+
|
|
1555
1604
|
if (scalingAction === 'configure') {
|
|
1556
1605
|
printSuccess('Configuring Auto-Scaling...');
|
|
1557
1606
|
console.log('📈 Scaling Configuration:');
|
|
@@ -1573,10 +1622,10 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1573
1622
|
console.log('Scaling commands: configure, predictive, status');
|
|
1574
1623
|
}
|
|
1575
1624
|
break;
|
|
1576
|
-
|
|
1625
|
+
|
|
1577
1626
|
case 'security':
|
|
1578
1627
|
const securityAction = subArgs[1];
|
|
1579
|
-
|
|
1628
|
+
|
|
1580
1629
|
if (securityAction === 'harden') {
|
|
1581
1630
|
printSuccess('Applying Security Hardening...');
|
|
1582
1631
|
console.log('🔒 Security Configuration:');
|
|
@@ -1586,7 +1635,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1586
1635
|
console.log(' Authorization: RBAC');
|
|
1587
1636
|
console.log(' Audit Logging: comprehensive');
|
|
1588
1637
|
console.log(' Compliance: SOC2, GDPR, HIPAA');
|
|
1589
|
-
|
|
1638
|
+
|
|
1590
1639
|
console.log('\n🛡️ Applying security measures:');
|
|
1591
1640
|
console.log(' ✓ Enabling encryption at rest');
|
|
1592
1641
|
console.log(' ✓ Configuring TLS 1.3 minimum');
|
|
@@ -1607,7 +1656,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1607
1656
|
console.log('Security commands: harden, policy, rbac, monitor');
|
|
1608
1657
|
}
|
|
1609
1658
|
break;
|
|
1610
|
-
|
|
1659
|
+
|
|
1611
1660
|
case 'kubernetes':
|
|
1612
1661
|
case 'k8s':
|
|
1613
1662
|
printSuccess('Deploying to Kubernetes...');
|
|
@@ -1616,7 +1665,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1616
1665
|
console.log(' Replicas: 3');
|
|
1617
1666
|
console.log(' Image: claude-flow/orchestrator:latest');
|
|
1618
1667
|
console.log(' Service Type: LoadBalancer');
|
|
1619
|
-
|
|
1668
|
+
|
|
1620
1669
|
console.log('\n📦 Creating resources:');
|
|
1621
1670
|
console.log(' ✓ Created namespace/claude-flow');
|
|
1622
1671
|
console.log(' ✓ Created deployment/claude-flow-orchestrator');
|
|
@@ -1626,7 +1675,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1626
1675
|
console.log('\n✅ Kubernetes deployment complete');
|
|
1627
1676
|
console.log(' Service endpoint: http://a1b2c3d4.elb.amazonaws.com');
|
|
1628
1677
|
break;
|
|
1629
|
-
|
|
1678
|
+
|
|
1630
1679
|
default:
|
|
1631
1680
|
console.log('Deploy commands:');
|
|
1632
1681
|
console.log(' ha-cluster - Deploy high availability cluster');
|
|
@@ -1639,7 +1688,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1639
1688
|
console.log(' deploy security harden --profile enterprise');
|
|
1640
1689
|
}
|
|
1641
1690
|
break;
|
|
1642
|
-
|
|
1691
|
+
|
|
1643
1692
|
case 'analytics':
|
|
1644
1693
|
const analyticsCmd = subArgs[0];
|
|
1645
1694
|
switch (analyticsCmd) {
|
|
@@ -1659,7 +1708,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1659
1708
|
console.log(' • Efficiency: ↑ 8% improvement');
|
|
1660
1709
|
console.log(' • Costs: ↓ 15% reduction');
|
|
1661
1710
|
break;
|
|
1662
|
-
|
|
1711
|
+
|
|
1663
1712
|
case 'business-impact':
|
|
1664
1713
|
printSuccess('Business Impact Analysis');
|
|
1665
1714
|
console.log('\n💼 Business Metrics:');
|
|
@@ -1675,7 +1724,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1675
1724
|
console.log(' • Code Coverage: 92%');
|
|
1676
1725
|
console.log(' • Customer Satisfaction: +18%');
|
|
1677
1726
|
break;
|
|
1678
|
-
|
|
1727
|
+
|
|
1679
1728
|
case 'cost':
|
|
1680
1729
|
const costCmd = subArgs[1];
|
|
1681
1730
|
if (costCmd === 'analyze') {
|
|
@@ -1699,7 +1748,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1699
1748
|
console.log('Cost commands: analyze, optimize, budget');
|
|
1700
1749
|
}
|
|
1701
1750
|
break;
|
|
1702
|
-
|
|
1751
|
+
|
|
1703
1752
|
default:
|
|
1704
1753
|
console.log('Analytics commands:');
|
|
1705
1754
|
console.log(' performance - System performance analytics');
|
|
@@ -1711,7 +1760,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1711
1760
|
console.log(' analytics cost analyze --granularity project');
|
|
1712
1761
|
}
|
|
1713
1762
|
break;
|
|
1714
|
-
|
|
1763
|
+
|
|
1715
1764
|
case 'security':
|
|
1716
1765
|
const securityCmd = subArgs[0];
|
|
1717
1766
|
switch (securityCmd) {
|
|
@@ -1722,24 +1771,24 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1722
1771
|
console.log(' MFA: Enabled (TOTP, SMS, Hardware Keys)');
|
|
1723
1772
|
console.log(' Sessions: 42 active');
|
|
1724
1773
|
console.log(' Session Timeout: 4 hours');
|
|
1725
|
-
|
|
1774
|
+
|
|
1726
1775
|
console.log('\n🛡️ Authorization:');
|
|
1727
1776
|
console.log(' Model: Role-Based Access Control (RBAC)');
|
|
1728
1777
|
console.log(' Roles: 5 defined (admin, developer, operator, auditor, viewer)');
|
|
1729
1778
|
console.log(' Permissions: 47 granular permissions');
|
|
1730
1779
|
console.log(' Policy Engine: Active');
|
|
1731
|
-
|
|
1780
|
+
|
|
1732
1781
|
console.log('\n🚦 Rate Limiting:');
|
|
1733
1782
|
console.log(' Global Limit: 1000 req/min');
|
|
1734
1783
|
console.log(' Per-User Limit: 100 req/min');
|
|
1735
1784
|
console.log(' Burst Capacity: 200 requests');
|
|
1736
1785
|
console.log(' Current Usage: 245 req/min (24.5%)');
|
|
1737
|
-
|
|
1786
|
+
|
|
1738
1787
|
console.log('\n⚡ Circuit Breakers:');
|
|
1739
1788
|
console.log(' Total Breakers: 12');
|
|
1740
1789
|
console.log(' Status: 10 closed, 1 half-open, 1 open');
|
|
1741
1790
|
console.log(' Last Triggered: api-gateway (2 minutes ago)');
|
|
1742
|
-
|
|
1791
|
+
|
|
1743
1792
|
console.log('\n📝 Audit Logging:');
|
|
1744
1793
|
console.log(' Status: Active');
|
|
1745
1794
|
console.log(' Storage: Encrypted S3 bucket');
|
|
@@ -1747,10 +1796,10 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1747
1796
|
console.log(' Events Today: 48,234');
|
|
1748
1797
|
console.log(' Compliance: SOC2, GDPR, HIPAA compliant');
|
|
1749
1798
|
break;
|
|
1750
|
-
|
|
1799
|
+
|
|
1751
1800
|
case 'auth':
|
|
1752
1801
|
const authAction = subArgs[1];
|
|
1753
|
-
|
|
1802
|
+
|
|
1754
1803
|
if (authAction === 'configure') {
|
|
1755
1804
|
printSuccess('Configuring Authentication...');
|
|
1756
1805
|
console.log('🔐 Authentication Configuration:');
|
|
@@ -1787,36 +1836,36 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1787
1836
|
console.log('Auth commands: configure, sessions, mfa, tokens');
|
|
1788
1837
|
}
|
|
1789
1838
|
break;
|
|
1790
|
-
|
|
1839
|
+
|
|
1791
1840
|
case 'rbac':
|
|
1792
1841
|
const rbacAction = subArgs[1];
|
|
1793
|
-
|
|
1842
|
+
|
|
1794
1843
|
if (rbacAction === 'roles') {
|
|
1795
1844
|
printSuccess('RBAC Roles:');
|
|
1796
1845
|
console.log('\n👥 Defined Roles:');
|
|
1797
1846
|
console.log('\n📛 admin (3 users)');
|
|
1798
1847
|
console.log(' Permissions: * (all permissions)');
|
|
1799
1848
|
console.log(' Conditions: MFA required, IP restriction');
|
|
1800
|
-
|
|
1849
|
+
|
|
1801
1850
|
console.log('\n📛 developer (45 users)');
|
|
1802
1851
|
console.log(' Permissions:');
|
|
1803
1852
|
console.log(' • projects:read,write');
|
|
1804
1853
|
console.log(' • agents:spawn,monitor');
|
|
1805
1854
|
console.log(' • tasks:create,monitor');
|
|
1806
1855
|
console.log(' Conditions: Time window 06:00-22:00');
|
|
1807
|
-
|
|
1856
|
+
|
|
1808
1857
|
console.log('\n📛 operator (12 users)');
|
|
1809
1858
|
console.log(' Permissions:');
|
|
1810
1859
|
console.log(' • system:monitor');
|
|
1811
1860
|
console.log(' • agents:list,info');
|
|
1812
1861
|
console.log(' • tasks:list,status');
|
|
1813
|
-
|
|
1862
|
+
|
|
1814
1863
|
console.log('\n📛 auditor (5 users)');
|
|
1815
1864
|
console.log(' Permissions:');
|
|
1816
1865
|
console.log(' • audit:read');
|
|
1817
1866
|
console.log(' • system:logs');
|
|
1818
1867
|
console.log(' • reports:generate');
|
|
1819
|
-
|
|
1868
|
+
|
|
1820
1869
|
console.log('\n📛 viewer (85 users)');
|
|
1821
1870
|
console.log(' Permissions:');
|
|
1822
1871
|
console.log(' • *:read (read-only access)');
|
|
@@ -1835,10 +1884,10 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1835
1884
|
console.log('RBAC commands: roles, permissions, assign, revoke');
|
|
1836
1885
|
}
|
|
1837
1886
|
break;
|
|
1838
|
-
|
|
1887
|
+
|
|
1839
1888
|
case 'rate-limit':
|
|
1840
1889
|
const rateLimitAction = subArgs[1];
|
|
1841
|
-
|
|
1890
|
+
|
|
1842
1891
|
if (rateLimitAction === 'status') {
|
|
1843
1892
|
printSuccess('Rate Limiting Status:');
|
|
1844
1893
|
console.log('\n📊 Current Limits:');
|
|
@@ -1853,7 +1902,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1853
1902
|
console.log(' • /api/agents/spawn: 10/minute');
|
|
1854
1903
|
console.log(' • /api/tasks/create: 50/minute');
|
|
1855
1904
|
console.log(' • /api/memory/query: 200/minute');
|
|
1856
|
-
|
|
1905
|
+
|
|
1857
1906
|
console.log('\n🚨 Recent Violations:');
|
|
1858
1907
|
console.log(' • user123: 2 violations (15 min ago)');
|
|
1859
1908
|
console.log(' • api-client-7: 1 violation (1 hour ago)');
|
|
@@ -1868,10 +1917,10 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1868
1917
|
console.log('Rate limit commands: status, configure, reset');
|
|
1869
1918
|
}
|
|
1870
1919
|
break;
|
|
1871
|
-
|
|
1920
|
+
|
|
1872
1921
|
case 'circuit-breaker':
|
|
1873
1922
|
const cbAction = subArgs[1];
|
|
1874
|
-
|
|
1923
|
+
|
|
1875
1924
|
if (cbAction === 'status') {
|
|
1876
1925
|
printSuccess('Circuit Breaker Status:');
|
|
1877
1926
|
console.log('\n⚡ Active Circuit Breakers:');
|
|
@@ -1883,7 +1932,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1883
1932
|
console.log('│ memory-service │ CLOSED │ 1 │ 5,678 │ 3h ago │');
|
|
1884
1933
|
console.log('│ agent-manager │ HALF │ 3 │ 45 │ 5m ago │');
|
|
1885
1934
|
console.log('└──────────────────┴─────────┴──────────┴───────────┴─────────────┘');
|
|
1886
|
-
|
|
1935
|
+
|
|
1887
1936
|
console.log('\n📈 Configuration:');
|
|
1888
1937
|
console.log(' Failure Threshold: 10 failures');
|
|
1889
1938
|
console.log(' Success Threshold: 5 successes');
|
|
@@ -1901,10 +1950,10 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1901
1950
|
console.log('Circuit breaker commands: status, reset, configure');
|
|
1902
1951
|
}
|
|
1903
1952
|
break;
|
|
1904
|
-
|
|
1953
|
+
|
|
1905
1954
|
case 'audit':
|
|
1906
1955
|
const auditAction = subArgs[1];
|
|
1907
|
-
|
|
1956
|
+
|
|
1908
1957
|
if (auditAction === 'status') {
|
|
1909
1958
|
printSuccess('Audit Logging Status:');
|
|
1910
1959
|
console.log(' Status: Active');
|
|
@@ -1922,11 +1971,17 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1922
1971
|
const query = subArgs.slice(2).join(' ');
|
|
1923
1972
|
printSuccess(`Searching audit logs: "${query || 'recent'}"`);
|
|
1924
1973
|
console.log('\n📋 Recent Audit Events:');
|
|
1925
|
-
console.log(
|
|
1974
|
+
console.log(
|
|
1975
|
+
'2024-01-10 14:23:45 | AUTH_SUCCESS | alice@corp.com | Login from 10.0.1.45',
|
|
1976
|
+
);
|
|
1926
1977
|
console.log('2024-01-10 14:24:12 | PERMISSION_GRANTED | alice@corp.com | agents.spawn');
|
|
1927
1978
|
console.log('2024-01-10 14:24:13 | AGENT_CREATED | alice@corp.com | agent-12345');
|
|
1928
|
-
console.log(
|
|
1929
|
-
|
|
1979
|
+
console.log(
|
|
1980
|
+
'2024-01-10 14:25:01 | CONFIG_CHANGED | bob@corp.com | terminal.poolSize: 10->20',
|
|
1981
|
+
);
|
|
1982
|
+
console.log(
|
|
1983
|
+
'2024-01-10 14:26:30 | PERMISSION_DENIED | charlie@corp.com | admin.users.delete',
|
|
1984
|
+
);
|
|
1930
1985
|
} else if (auditAction === 'export') {
|
|
1931
1986
|
printSuccess('Exporting audit logs...');
|
|
1932
1987
|
console.log(' Time range: Last 30 days');
|
|
@@ -1937,7 +1992,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1937
1992
|
console.log('Audit commands: status, search, export, configure');
|
|
1938
1993
|
}
|
|
1939
1994
|
break;
|
|
1940
|
-
|
|
1995
|
+
|
|
1941
1996
|
case 'compliance':
|
|
1942
1997
|
printSuccess('Compliance Status:');
|
|
1943
1998
|
console.log('\n🏛️ Active Compliance Frameworks:');
|
|
@@ -1946,24 +2001,24 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1946
2001
|
console.log(' Next Audit: 2024-04-15');
|
|
1947
2002
|
console.log(' Status: Compliant');
|
|
1948
2003
|
console.log(' Controls: 89/89 passing');
|
|
1949
|
-
|
|
2004
|
+
|
|
1950
2005
|
console.log('\n✅ GDPR (General Data Protection Regulation)');
|
|
1951
2006
|
console.log(' Data Protection Officer: Jane Smith');
|
|
1952
2007
|
console.log(' Privacy Impact Assessments: 12 completed');
|
|
1953
2008
|
console.log(' Data Subject Requests: 3 pending, 45 completed');
|
|
1954
2009
|
console.log(' Status: Compliant');
|
|
1955
|
-
|
|
2010
|
+
|
|
1956
2011
|
console.log('\n✅ HIPAA (Health Insurance Portability Act)');
|
|
1957
2012
|
console.log(' BAA Agreements: 5 active');
|
|
1958
2013
|
console.log(' PHI Encryption: AES-256 at rest, TLS 1.3 in transit');
|
|
1959
2014
|
console.log(' Access Controls: Implemented');
|
|
1960
2015
|
console.log(' Status: Compliant');
|
|
1961
|
-
|
|
2016
|
+
|
|
1962
2017
|
console.log('\n📋 Required Actions:');
|
|
1963
2018
|
console.log(' • Complete Q1 security training (Due: Jan 31)');
|
|
1964
2019
|
console.log(' • Update data retention policies (Due: Feb 15)');
|
|
1965
2020
|
break;
|
|
1966
|
-
|
|
2021
|
+
|
|
1967
2022
|
case 'test':
|
|
1968
2023
|
printSuccess('Running Security Test Suite...');
|
|
1969
2024
|
console.log('\n🧪 Security Tests:');
|
|
@@ -1981,7 +2036,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1981
2036
|
console.log(' • Update TLS certificates (expire in 45 days)');
|
|
1982
2037
|
console.log(' • Review inactive user accounts');
|
|
1983
2038
|
break;
|
|
1984
|
-
|
|
2039
|
+
|
|
1985
2040
|
default:
|
|
1986
2041
|
console.log('Security commands:');
|
|
1987
2042
|
console.log(' status - Show security status overview');
|
|
@@ -1999,7 +2054,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
1999
2054
|
console.log(' security circuit-breaker reset api-gateway');
|
|
2000
2055
|
}
|
|
2001
2056
|
break;
|
|
2002
|
-
|
|
2057
|
+
|
|
2003
2058
|
case 'backup':
|
|
2004
2059
|
const backupCmd = subArgs[0];
|
|
2005
2060
|
switch (backupCmd) {
|
|
@@ -2020,7 +2075,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
2020
2075
|
console.log(' Verification: Automatic');
|
|
2021
2076
|
console.log('\n✅ Backup strategy configured');
|
|
2022
2077
|
break;
|
|
2023
|
-
|
|
2078
|
+
|
|
2024
2079
|
case 'dr':
|
|
2025
2080
|
const drAction = subArgs[1];
|
|
2026
2081
|
if (drAction === 'configure') {
|
|
@@ -2046,14 +2101,14 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
2046
2101
|
console.log('DR commands: configure, test, status');
|
|
2047
2102
|
}
|
|
2048
2103
|
break;
|
|
2049
|
-
|
|
2104
|
+
|
|
2050
2105
|
case 'restore':
|
|
2051
2106
|
const restorePoint = subArgs[1];
|
|
2052
2107
|
if (!restorePoint) {
|
|
2053
2108
|
printError('Usage: backup restore <backup-id|timestamp>');
|
|
2054
2109
|
break;
|
|
2055
2110
|
}
|
|
2056
|
-
|
|
2111
|
+
|
|
2057
2112
|
printSuccess(`Restoring from backup: ${restorePoint}`);
|
|
2058
2113
|
console.log('🔄 Restore Progress:');
|
|
2059
2114
|
console.log(' ✓ Located backup in S3');
|
|
@@ -2065,7 +2120,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
2065
2120
|
console.log(' ✓ Verifying restored data');
|
|
2066
2121
|
console.log('\n✅ Restore completed successfully');
|
|
2067
2122
|
break;
|
|
2068
|
-
|
|
2123
|
+
|
|
2069
2124
|
default:
|
|
2070
2125
|
console.log('Backup commands:');
|
|
2071
2126
|
console.log(' configure - Configure backup strategy');
|
|
@@ -2078,23 +2133,32 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
2078
2133
|
console.log(' backup restore "backup-20240110-023000"');
|
|
2079
2134
|
}
|
|
2080
2135
|
break;
|
|
2081
|
-
|
|
2136
|
+
|
|
2082
2137
|
default:
|
|
2083
2138
|
printError(`Unknown command: ${command}`);
|
|
2084
2139
|
console.log('Run "claude-flow help" for available commands');
|
|
2085
|
-
|
|
2140
|
+
|
|
2086
2141
|
// Suggest similar commands
|
|
2087
|
-
const commonCommands = [
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2142
|
+
const commonCommands = [
|
|
2143
|
+
'agent',
|
|
2144
|
+
'task',
|
|
2145
|
+
'spawn',
|
|
2146
|
+
'init',
|
|
2147
|
+
'start',
|
|
2148
|
+
'status',
|
|
2149
|
+
'memory',
|
|
2150
|
+
'sparc',
|
|
2151
|
+
'help',
|
|
2152
|
+
];
|
|
2153
|
+
const suggestions = commonCommands.filter(
|
|
2154
|
+
(cmd) => cmd.startsWith(command.toLowerCase()) || cmd.includes(command.toLowerCase()),
|
|
2091
2155
|
);
|
|
2092
|
-
|
|
2156
|
+
|
|
2093
2157
|
if (suggestions.length > 0) {
|
|
2094
2158
|
console.log('\nDid you mean:');
|
|
2095
|
-
suggestions.forEach(cmd => console.log(` claude-flow ${cmd}`));
|
|
2159
|
+
suggestions.forEach((cmd) => console.log(` claude-flow ${cmd}`));
|
|
2096
2160
|
}
|
|
2097
|
-
|
|
2161
|
+
|
|
2098
2162
|
exit(1);
|
|
2099
2163
|
}
|
|
2100
2164
|
}
|
|
@@ -2103,7 +2167,7 @@ ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all as
|
|
|
2103
2167
|
async function startRepl() {
|
|
2104
2168
|
console.log('🧠 Claude-Flow Interactive Shell v' + VERSION);
|
|
2105
2169
|
console.log('Type "help" for available commands, "exit" to quit\n');
|
|
2106
|
-
|
|
2170
|
+
|
|
2107
2171
|
const replState = {
|
|
2108
2172
|
history: [],
|
|
2109
2173
|
historyIndex: -1,
|
|
@@ -2112,10 +2176,10 @@ async function startRepl() {
|
|
|
2112
2176
|
agents: [],
|
|
2113
2177
|
tasks: [],
|
|
2114
2178
|
terminals: [],
|
|
2115
|
-
memory: {}
|
|
2116
|
-
}
|
|
2179
|
+
memory: {},
|
|
2180
|
+
},
|
|
2117
2181
|
};
|
|
2118
|
-
|
|
2182
|
+
|
|
2119
2183
|
// REPL command handlers
|
|
2120
2184
|
const replCommands = {
|
|
2121
2185
|
help: () => {
|
|
@@ -2159,7 +2223,7 @@ Shortcuts:
|
|
|
2159
2223
|
↑/↓ - Navigate command history
|
|
2160
2224
|
`);
|
|
2161
2225
|
},
|
|
2162
|
-
|
|
2226
|
+
|
|
2163
2227
|
status: () => {
|
|
2164
2228
|
console.log('🟢 Claude-Flow Status:');
|
|
2165
2229
|
console.log(` Agents: ${replState.context.agents.length} active`);
|
|
@@ -2167,19 +2231,19 @@ Shortcuts:
|
|
|
2167
2231
|
console.log(` Terminals: ${replState.context.terminals.length} active`);
|
|
2168
2232
|
console.log(` Memory Keys: ${Object.keys(replState.context.memory).length}`);
|
|
2169
2233
|
},
|
|
2170
|
-
|
|
2234
|
+
|
|
2171
2235
|
clear: () => {
|
|
2172
2236
|
console.clear();
|
|
2173
2237
|
console.log('🧠 Claude-Flow Interactive Shell v' + VERSION);
|
|
2174
2238
|
},
|
|
2175
|
-
|
|
2239
|
+
|
|
2176
2240
|
history: () => {
|
|
2177
2241
|
console.log('📜 Command History:');
|
|
2178
2242
|
replState.history.forEach((cmd, i) => {
|
|
2179
2243
|
console.log(` ${i + 1}: ${cmd}`);
|
|
2180
2244
|
});
|
|
2181
2245
|
},
|
|
2182
|
-
|
|
2246
|
+
|
|
2183
2247
|
config: async (key) => {
|
|
2184
2248
|
try {
|
|
2185
2249
|
const config = JSON.parse(await readTextFile('claude-flow.config.json'));
|
|
@@ -2196,41 +2260,41 @@ Shortcuts:
|
|
|
2196
2260
|
} catch {
|
|
2197
2261
|
console.log('No configuration file found. Using defaults.');
|
|
2198
2262
|
}
|
|
2199
|
-
}
|
|
2263
|
+
},
|
|
2200
2264
|
};
|
|
2201
|
-
|
|
2265
|
+
|
|
2202
2266
|
// Process REPL commands
|
|
2203
2267
|
async function processReplCommand(input) {
|
|
2204
2268
|
const trimmed = input.trim();
|
|
2205
2269
|
if (!trimmed) return true;
|
|
2206
|
-
|
|
2270
|
+
|
|
2207
2271
|
// Add to history
|
|
2208
2272
|
replState.history.push(trimmed);
|
|
2209
2273
|
replState.historyIndex = replState.history.length;
|
|
2210
|
-
|
|
2274
|
+
|
|
2211
2275
|
// Handle special commands
|
|
2212
2276
|
if (trimmed === 'exit' || trimmed === 'quit') {
|
|
2213
2277
|
console.log('👋 Exiting Claude-Flow REPL...');
|
|
2214
2278
|
return false;
|
|
2215
2279
|
}
|
|
2216
|
-
|
|
2280
|
+
|
|
2217
2281
|
// Handle shell commands
|
|
2218
2282
|
if (trimmed.startsWith('!')) {
|
|
2219
2283
|
const shellCmd = trimmed.substring(1);
|
|
2220
2284
|
try {
|
|
2221
2285
|
await new Promise((resolve) => {
|
|
2222
2286
|
const proc = spawn('sh', ['-c', shellCmd], {
|
|
2223
|
-
stdio: ['inherit', 'pipe', 'pipe']
|
|
2287
|
+
stdio: ['inherit', 'pipe', 'pipe'],
|
|
2224
2288
|
});
|
|
2225
|
-
|
|
2289
|
+
|
|
2226
2290
|
proc.stdout.on('data', (data) => {
|
|
2227
2291
|
console.log(data.toString());
|
|
2228
2292
|
});
|
|
2229
|
-
|
|
2293
|
+
|
|
2230
2294
|
proc.stderr.on('data', (data) => {
|
|
2231
2295
|
console.error(data.toString());
|
|
2232
2296
|
});
|
|
2233
|
-
|
|
2297
|
+
|
|
2234
2298
|
proc.on('exit', resolve);
|
|
2235
2299
|
});
|
|
2236
2300
|
} catch (err) {
|
|
@@ -2238,31 +2302,31 @@ Shortcuts:
|
|
|
2238
2302
|
}
|
|
2239
2303
|
return true;
|
|
2240
2304
|
}
|
|
2241
|
-
|
|
2305
|
+
|
|
2242
2306
|
// Handle search
|
|
2243
2307
|
if (trimmed.startsWith('/')) {
|
|
2244
2308
|
const search = trimmed.substring(1);
|
|
2245
|
-
const matches = replState.history.filter(cmd => cmd.includes(search));
|
|
2309
|
+
const matches = replState.history.filter((cmd) => cmd.includes(search));
|
|
2246
2310
|
if (matches.length > 0) {
|
|
2247
2311
|
console.log('🔍 Search results:');
|
|
2248
|
-
matches.forEach(cmd => console.log(` ${cmd}`));
|
|
2312
|
+
matches.forEach((cmd) => console.log(` ${cmd}`));
|
|
2249
2313
|
} else {
|
|
2250
2314
|
console.log('No matches found');
|
|
2251
2315
|
}
|
|
2252
2316
|
return true;
|
|
2253
2317
|
}
|
|
2254
|
-
|
|
2318
|
+
|
|
2255
2319
|
// Parse command and arguments
|
|
2256
2320
|
const parts = trimmed.split(' ');
|
|
2257
2321
|
const command = parts[0];
|
|
2258
2322
|
const args = parts.slice(1);
|
|
2259
|
-
|
|
2323
|
+
|
|
2260
2324
|
// Handle built-in REPL commands
|
|
2261
2325
|
if (replCommands[command]) {
|
|
2262
2326
|
await replCommands[command](...args);
|
|
2263
2327
|
return true;
|
|
2264
2328
|
}
|
|
2265
|
-
|
|
2329
|
+
|
|
2266
2330
|
// Handle multi-word commands
|
|
2267
2331
|
if (command === 'agent') {
|
|
2268
2332
|
await handleAgentCommand(args, replState);
|
|
@@ -2275,10 +2339,10 @@ Shortcuts:
|
|
|
2275
2339
|
} else {
|
|
2276
2340
|
console.log(`Unknown command: ${command}. Type "help" for available commands.`);
|
|
2277
2341
|
}
|
|
2278
|
-
|
|
2342
|
+
|
|
2279
2343
|
return true;
|
|
2280
2344
|
}
|
|
2281
|
-
|
|
2345
|
+
|
|
2282
2346
|
// Agent command handler
|
|
2283
2347
|
async function handleAgentCommand(args, state) {
|
|
2284
2348
|
const subCmd = args[0];
|
|
@@ -2291,26 +2355,26 @@ Shortcuts:
|
|
|
2291
2355
|
type,
|
|
2292
2356
|
name,
|
|
2293
2357
|
status: 'active',
|
|
2294
|
-
created: new Date().toISOString()
|
|
2358
|
+
created: new Date().toISOString(),
|
|
2295
2359
|
};
|
|
2296
2360
|
state.context.agents.push(agent);
|
|
2297
2361
|
printSuccess(`Spawned ${type} agent: ${name} (${agent.id})`);
|
|
2298
2362
|
break;
|
|
2299
|
-
|
|
2363
|
+
|
|
2300
2364
|
case 'list':
|
|
2301
2365
|
if (state.context.agents.length === 0) {
|
|
2302
2366
|
console.log('No active agents');
|
|
2303
2367
|
} else {
|
|
2304
2368
|
console.log('Active agents:');
|
|
2305
|
-
state.context.agents.forEach(agent => {
|
|
2369
|
+
state.context.agents.forEach((agent) => {
|
|
2306
2370
|
console.log(` ${agent.id} - ${agent.name} (${agent.type}) - ${agent.status}`);
|
|
2307
2371
|
});
|
|
2308
2372
|
}
|
|
2309
2373
|
break;
|
|
2310
|
-
|
|
2374
|
+
|
|
2311
2375
|
case 'info':
|
|
2312
2376
|
const agentId = args[1];
|
|
2313
|
-
const foundAgent = state.context.agents.find(a => a.id === agentId || a.name === agentId);
|
|
2377
|
+
const foundAgent = state.context.agents.find((a) => a.id === agentId || a.name === agentId);
|
|
2314
2378
|
if (foundAgent) {
|
|
2315
2379
|
console.log(`Agent: ${foundAgent.name}`);
|
|
2316
2380
|
console.log(` ID: ${foundAgent.id}`);
|
|
@@ -2321,10 +2385,10 @@ Shortcuts:
|
|
|
2321
2385
|
printError(`Agent not found: ${agentId}`);
|
|
2322
2386
|
}
|
|
2323
2387
|
break;
|
|
2324
|
-
|
|
2388
|
+
|
|
2325
2389
|
case 'terminate':
|
|
2326
2390
|
const termId = args[1];
|
|
2327
|
-
const index = state.context.agents.findIndex(a => a.id === termId || a.name === termId);
|
|
2391
|
+
const index = state.context.agents.findIndex((a) => a.id === termId || a.name === termId);
|
|
2328
2392
|
if (index >= 0) {
|
|
2329
2393
|
const removed = state.context.agents.splice(index, 1)[0];
|
|
2330
2394
|
printSuccess(`Terminated agent: ${removed.name}`);
|
|
@@ -2332,12 +2396,12 @@ Shortcuts:
|
|
|
2332
2396
|
printError(`Agent not found: ${termId}`);
|
|
2333
2397
|
}
|
|
2334
2398
|
break;
|
|
2335
|
-
|
|
2399
|
+
|
|
2336
2400
|
default:
|
|
2337
2401
|
console.log('Agent commands: spawn, list, info, terminate');
|
|
2338
2402
|
}
|
|
2339
2403
|
}
|
|
2340
|
-
|
|
2404
|
+
|
|
2341
2405
|
// Task command handler
|
|
2342
2406
|
async function handleTaskCommand(args, state) {
|
|
2343
2407
|
const subCmd = args[0];
|
|
@@ -2350,32 +2414,34 @@ Shortcuts:
|
|
|
2350
2414
|
type,
|
|
2351
2415
|
description,
|
|
2352
2416
|
status: 'pending',
|
|
2353
|
-
created: new Date().toISOString()
|
|
2417
|
+
created: new Date().toISOString(),
|
|
2354
2418
|
};
|
|
2355
2419
|
state.context.tasks.push(task);
|
|
2356
2420
|
printSuccess(`Created task: ${task.id}`);
|
|
2357
2421
|
console.log(` Type: ${type}`);
|
|
2358
2422
|
console.log(` Description: ${description}`);
|
|
2359
2423
|
break;
|
|
2360
|
-
|
|
2424
|
+
|
|
2361
2425
|
case 'list':
|
|
2362
2426
|
if (state.context.tasks.length === 0) {
|
|
2363
2427
|
console.log('No active tasks');
|
|
2364
2428
|
} else {
|
|
2365
2429
|
console.log('Active tasks:');
|
|
2366
|
-
state.context.tasks.forEach(task => {
|
|
2430
|
+
state.context.tasks.forEach((task) => {
|
|
2367
2431
|
console.log(` ${task.id} - ${task.type} - ${task.status}`);
|
|
2368
2432
|
console.log(` ${task.description}`);
|
|
2369
2433
|
});
|
|
2370
2434
|
}
|
|
2371
2435
|
break;
|
|
2372
|
-
|
|
2436
|
+
|
|
2373
2437
|
case 'assign':
|
|
2374
2438
|
const taskId = args[1];
|
|
2375
2439
|
const assignAgentId = args[2];
|
|
2376
|
-
const foundTask = state.context.tasks.find(t => t.id === taskId);
|
|
2377
|
-
const assignAgent = state.context.agents.find(
|
|
2378
|
-
|
|
2440
|
+
const foundTask = state.context.tasks.find((t) => t.id === taskId);
|
|
2441
|
+
const assignAgent = state.context.agents.find(
|
|
2442
|
+
(a) => a.id === assignAgentId || a.name === assignAgentId,
|
|
2443
|
+
);
|
|
2444
|
+
|
|
2379
2445
|
if (foundTask && assignAgent) {
|
|
2380
2446
|
foundTask.assignedTo = assignAgent.id;
|
|
2381
2447
|
foundTask.status = 'assigned';
|
|
@@ -2384,10 +2450,10 @@ Shortcuts:
|
|
|
2384
2450
|
printError('Task or agent not found');
|
|
2385
2451
|
}
|
|
2386
2452
|
break;
|
|
2387
|
-
|
|
2453
|
+
|
|
2388
2454
|
case 'status':
|
|
2389
2455
|
const statusId = args[1];
|
|
2390
|
-
const statusTask = state.context.tasks.find(t => t.id === statusId);
|
|
2456
|
+
const statusTask = state.context.tasks.find((t) => t.id === statusId);
|
|
2391
2457
|
if (statusTask) {
|
|
2392
2458
|
console.log(`Task: ${statusTask.id}`);
|
|
2393
2459
|
console.log(` Type: ${statusTask.type}`);
|
|
@@ -2401,12 +2467,12 @@ Shortcuts:
|
|
|
2401
2467
|
printError(`Task not found: ${statusId}`);
|
|
2402
2468
|
}
|
|
2403
2469
|
break;
|
|
2404
|
-
|
|
2470
|
+
|
|
2405
2471
|
default:
|
|
2406
2472
|
console.log('Task commands: create, list, assign, status');
|
|
2407
2473
|
}
|
|
2408
2474
|
}
|
|
2409
|
-
|
|
2475
|
+
|
|
2410
2476
|
// Memory command handler
|
|
2411
2477
|
async function handleMemoryCommand(args, state) {
|
|
2412
2478
|
const subCmd = args[0];
|
|
@@ -2421,7 +2487,7 @@ Shortcuts:
|
|
|
2421
2487
|
printError('Usage: memory store <key> <value>');
|
|
2422
2488
|
}
|
|
2423
2489
|
break;
|
|
2424
|
-
|
|
2490
|
+
|
|
2425
2491
|
case 'get':
|
|
2426
2492
|
const getKey = args[1];
|
|
2427
2493
|
if (getKey && state.context.memory[getKey]) {
|
|
@@ -2430,29 +2496,29 @@ Shortcuts:
|
|
|
2430
2496
|
console.log(`Key not found: ${getKey}`);
|
|
2431
2497
|
}
|
|
2432
2498
|
break;
|
|
2433
|
-
|
|
2499
|
+
|
|
2434
2500
|
case 'list':
|
|
2435
2501
|
const keys = Object.keys(state.context.memory);
|
|
2436
2502
|
if (keys.length === 0) {
|
|
2437
2503
|
console.log('No data in memory');
|
|
2438
2504
|
} else {
|
|
2439
2505
|
console.log('Memory keys:');
|
|
2440
|
-
keys.forEach(key => {
|
|
2506
|
+
keys.forEach((key) => {
|
|
2441
2507
|
console.log(` ${key}: ${state.context.memory[key]}`);
|
|
2442
2508
|
});
|
|
2443
2509
|
}
|
|
2444
2510
|
break;
|
|
2445
|
-
|
|
2511
|
+
|
|
2446
2512
|
case 'clear':
|
|
2447
2513
|
state.context.memory = {};
|
|
2448
2514
|
printSuccess('Memory cleared');
|
|
2449
2515
|
break;
|
|
2450
|
-
|
|
2516
|
+
|
|
2451
2517
|
default:
|
|
2452
2518
|
console.log('Memory commands: store, get, list, clear');
|
|
2453
2519
|
}
|
|
2454
2520
|
}
|
|
2455
|
-
|
|
2521
|
+
|
|
2456
2522
|
// Terminal command handler
|
|
2457
2523
|
async function handleTerminalCommand(args, state) {
|
|
2458
2524
|
const subCmd = args[0];
|
|
@@ -2462,23 +2528,23 @@ Shortcuts:
|
|
|
2462
2528
|
const terminal = {
|
|
2463
2529
|
id: name,
|
|
2464
2530
|
status: 'active',
|
|
2465
|
-
created: new Date().toISOString()
|
|
2531
|
+
created: new Date().toISOString(),
|
|
2466
2532
|
};
|
|
2467
2533
|
state.context.terminals.push(terminal);
|
|
2468
2534
|
printSuccess(`Created terminal: ${name}`);
|
|
2469
2535
|
break;
|
|
2470
|
-
|
|
2536
|
+
|
|
2471
2537
|
case 'list':
|
|
2472
2538
|
if (state.context.terminals.length === 0) {
|
|
2473
2539
|
console.log('No active terminals');
|
|
2474
2540
|
} else {
|
|
2475
2541
|
console.log('Active terminals:');
|
|
2476
|
-
state.context.terminals.forEach(term => {
|
|
2542
|
+
state.context.terminals.forEach((term) => {
|
|
2477
2543
|
console.log(` ${term.id} - ${term.status}`);
|
|
2478
2544
|
});
|
|
2479
2545
|
}
|
|
2480
2546
|
break;
|
|
2481
|
-
|
|
2547
|
+
|
|
2482
2548
|
case 'exec':
|
|
2483
2549
|
const cmd = args.slice(1).join(' ');
|
|
2484
2550
|
if (cmd) {
|
|
@@ -2488,7 +2554,7 @@ Shortcuts:
|
|
|
2488
2554
|
printError('Usage: terminal exec <command>');
|
|
2489
2555
|
}
|
|
2490
2556
|
break;
|
|
2491
|
-
|
|
2557
|
+
|
|
2492
2558
|
case 'attach':
|
|
2493
2559
|
const attachId = args[1];
|
|
2494
2560
|
if (attachId) {
|
|
@@ -2499,7 +2565,7 @@ Shortcuts:
|
|
|
2499
2565
|
printError('Usage: terminal attach <id>');
|
|
2500
2566
|
}
|
|
2501
2567
|
break;
|
|
2502
|
-
|
|
2568
|
+
|
|
2503
2569
|
case 'detach':
|
|
2504
2570
|
if (state.currentSession) {
|
|
2505
2571
|
console.log(`Detached from terminal: ${state.currentSession}`);
|
|
@@ -2508,32 +2574,32 @@ Shortcuts:
|
|
|
2508
2574
|
console.log('Not attached to any terminal');
|
|
2509
2575
|
}
|
|
2510
2576
|
break;
|
|
2511
|
-
|
|
2577
|
+
|
|
2512
2578
|
default:
|
|
2513
2579
|
console.log('Terminal commands: create, list, exec, attach, detach');
|
|
2514
2580
|
}
|
|
2515
2581
|
}
|
|
2516
|
-
|
|
2582
|
+
|
|
2517
2583
|
// Main REPL loop with Node.js readline
|
|
2518
2584
|
const rl = readline.createInterface({
|
|
2519
2585
|
input: process.stdin,
|
|
2520
|
-
output: process.stdout
|
|
2586
|
+
output: process.stdout,
|
|
2521
2587
|
});
|
|
2522
|
-
|
|
2588
|
+
|
|
2523
2589
|
// Set prompt based on session
|
|
2524
2590
|
function updatePrompt() {
|
|
2525
|
-
rl.setPrompt(
|
|
2526
|
-
`claude-flow:${replState.currentSession}> ` :
|
|
2527
|
-
|
|
2591
|
+
rl.setPrompt(
|
|
2592
|
+
replState.currentSession ? `claude-flow:${replState.currentSession}> ` : 'claude-flow> ',
|
|
2593
|
+
);
|
|
2528
2594
|
}
|
|
2529
|
-
|
|
2595
|
+
|
|
2530
2596
|
updatePrompt();
|
|
2531
2597
|
rl.prompt();
|
|
2532
|
-
|
|
2598
|
+
|
|
2533
2599
|
// Handle each line of input
|
|
2534
2600
|
rl.on('line', async (input) => {
|
|
2535
2601
|
input = input.trim();
|
|
2536
|
-
|
|
2602
|
+
|
|
2537
2603
|
// Process command
|
|
2538
2604
|
const shouldContinue = await processReplCommand(input);
|
|
2539
2605
|
if (!shouldContinue) {
|
|
@@ -2543,16 +2609,16 @@ Shortcuts:
|
|
|
2543
2609
|
rl.prompt();
|
|
2544
2610
|
}
|
|
2545
2611
|
});
|
|
2546
|
-
|
|
2612
|
+
|
|
2547
2613
|
// Handle CTRL+C
|
|
2548
2614
|
rl.on('SIGINT', () => {
|
|
2549
2615
|
console.log('\nExiting Claude-Flow...');
|
|
2550
2616
|
rl.close();
|
|
2551
2617
|
process.exit(0);
|
|
2552
2618
|
});
|
|
2553
|
-
|
|
2619
|
+
|
|
2554
2620
|
// Wait for REPL to close
|
|
2555
|
-
return new Promise(resolve => {
|
|
2621
|
+
return new Promise((resolve) => {
|
|
2556
2622
|
rl.on('close', resolve);
|
|
2557
2623
|
});
|
|
2558
2624
|
}
|
|
@@ -2879,9 +2945,9 @@ async function createSparcStructureManually() {
|
|
|
2879
2945
|
'.roo/templates',
|
|
2880
2946
|
'.roo/workflows',
|
|
2881
2947
|
'.roo/modes',
|
|
2882
|
-
'.roo/configs'
|
|
2948
|
+
'.roo/configs',
|
|
2883
2949
|
];
|
|
2884
|
-
|
|
2950
|
+
|
|
2885
2951
|
for (const dir of rooDirectories) {
|
|
2886
2952
|
try {
|
|
2887
2953
|
await mkdirAsync(dir, { recursive: true });
|
|
@@ -2892,7 +2958,7 @@ async function createSparcStructureManually() {
|
|
|
2892
2958
|
}
|
|
2893
2959
|
}
|
|
2894
2960
|
}
|
|
2895
|
-
|
|
2961
|
+
|
|
2896
2962
|
// Create .roomodes file (copy from existing if available, or create basic version)
|
|
2897
2963
|
let roomodesContent;
|
|
2898
2964
|
try {
|
|
@@ -2905,112 +2971,131 @@ async function createSparcStructureManually() {
|
|
|
2905
2971
|
await writeTextFile('.roomodes', roomodesContent);
|
|
2906
2972
|
console.log(' ✓ Created .roomodes configuration');
|
|
2907
2973
|
}
|
|
2908
|
-
|
|
2974
|
+
|
|
2909
2975
|
// Create basic workflow templates
|
|
2910
2976
|
const basicWorkflow = createBasicSparcWorkflow();
|
|
2911
2977
|
await writeTextFile('.roo/workflows/basic-tdd.json', basicWorkflow);
|
|
2912
2978
|
console.log(' ✓ Created .roo/workflows/basic-tdd.json');
|
|
2913
|
-
|
|
2979
|
+
|
|
2914
2980
|
// Create README for .roo directory
|
|
2915
2981
|
const rooReadme = createRooReadme();
|
|
2916
2982
|
await writeTextFile('.roo/README.md', rooReadme);
|
|
2917
2983
|
console.log(' ✓ Created .roo/README.md');
|
|
2918
|
-
|
|
2984
|
+
|
|
2919
2985
|
console.log(' ✅ Basic SPARC structure created successfully');
|
|
2920
|
-
|
|
2921
2986
|
} catch (err) {
|
|
2922
2987
|
console.log(` ❌ Failed to create SPARC structure: ${err.message}`);
|
|
2923
2988
|
}
|
|
2924
2989
|
}
|
|
2925
2990
|
|
|
2926
2991
|
function createBasicRoomodesConfig() {
|
|
2927
|
-
return JSON.stringify(
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2992
|
+
return JSON.stringify(
|
|
2993
|
+
{
|
|
2994
|
+
customModes: [
|
|
2995
|
+
{
|
|
2996
|
+
slug: 'architect',
|
|
2997
|
+
name: '🏗️ Architect',
|
|
2998
|
+
roleDefinition:
|
|
2999
|
+
'You design scalable, secure, and modular architectures based on functional specs and user needs. You define responsibilities across services, APIs, and components.',
|
|
3000
|
+
customInstructions:
|
|
3001
|
+
'Create architecture mermaid diagrams, data flows, and integration points. Ensure no part of the design includes secrets or hardcoded env values. Emphasize modular boundaries and maintain extensibility.',
|
|
3002
|
+
groups: ['read', 'edit'],
|
|
3003
|
+
source: 'project',
|
|
3004
|
+
},
|
|
3005
|
+
{
|
|
3006
|
+
slug: 'code',
|
|
3007
|
+
name: '🧠 Auto-Coder',
|
|
3008
|
+
roleDefinition:
|
|
3009
|
+
'You write clean, efficient, modular code based on pseudocode and architecture. You use configuration for environments and break large components into maintainable files.',
|
|
3010
|
+
customInstructions:
|
|
3011
|
+
'Write modular code using clean architecture principles. Never hardcode secrets or environment values. Split code into files < 500 lines. Use config files or environment abstractions. Use \\`new_task\\` for subtasks and finish with \\`attempt_completion\\`.',
|
|
3012
|
+
groups: ['read', 'edit', 'browser', 'mcp', 'command'],
|
|
3013
|
+
source: 'project',
|
|
3014
|
+
},
|
|
3015
|
+
{
|
|
3016
|
+
slug: 'tdd',
|
|
3017
|
+
name: '🧪 Tester (TDD)',
|
|
3018
|
+
roleDefinition:
|
|
3019
|
+
'You implement Test-Driven Development (TDD, London School), writing tests first and refactoring after minimal implementation passes.',
|
|
3020
|
+
customInstructions:
|
|
3021
|
+
'Write failing tests first. Implement only enough code to pass. Refactor after green. Ensure tests do not hardcode secrets. Keep files < 500 lines.',
|
|
3022
|
+
groups: ['read', 'edit', 'browser', 'mcp', 'command'],
|
|
3023
|
+
source: 'project',
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
slug: 'spec-pseudocode',
|
|
3027
|
+
name: '📋 Specification Writer',
|
|
3028
|
+
roleDefinition:
|
|
3029
|
+
'You capture full project context—functional requirements, edge cases, constraints—and translate that into modular pseudocode with TDD anchors.',
|
|
3030
|
+
customInstructions:
|
|
3031
|
+
'Write pseudocode as a series of md files with phase_number_name.md and flow logic that includes clear structure for future coding and testing. Split complex logic across modules.',
|
|
3032
|
+
groups: ['read', 'edit'],
|
|
3033
|
+
source: 'project',
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
slug: 'integration',
|
|
3037
|
+
name: '🔗 System Integrator',
|
|
3038
|
+
roleDefinition:
|
|
3039
|
+
'You merge the outputs of all modes into a working, tested, production-ready system. You ensure consistency, cohesion, and modularity.',
|
|
3040
|
+
customInstructions:
|
|
3041
|
+
'Verify interface compatibility, shared modules, and env config standards. Split integration logic across domains as needed. Use \\`new_task\\` for preflight testing.',
|
|
3042
|
+
groups: ['read', 'edit', 'browser', 'mcp', 'command'],
|
|
3043
|
+
source: 'project',
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
slug: 'debug',
|
|
3047
|
+
name: '🪲 Debugger',
|
|
3048
|
+
roleDefinition:
|
|
3049
|
+
'You troubleshoot runtime bugs, logic errors, or integration failures by tracing, inspecting, and analyzing behavior.',
|
|
3050
|
+
customInstructions:
|
|
3051
|
+
'Use logs, traces, and stack analysis to isolate bugs. Avoid changing env configuration directly. Keep fixes modular.',
|
|
3052
|
+
groups: ['read', 'edit', 'browser', 'mcp', 'command'],
|
|
3053
|
+
source: 'project',
|
|
3054
|
+
},
|
|
3055
|
+
],
|
|
3056
|
+
},
|
|
3057
|
+
null,
|
|
3058
|
+
2,
|
|
3059
|
+
);
|
|
2979
3060
|
}
|
|
2980
3061
|
|
|
2981
3062
|
function createBasicSparcWorkflow() {
|
|
2982
|
-
return JSON.stringify(
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3063
|
+
return JSON.stringify(
|
|
3064
|
+
{
|
|
3065
|
+
name: 'Basic TDD Workflow',
|
|
3066
|
+
description: 'A simple SPARC-based TDD workflow for development',
|
|
3067
|
+
sequential: true,
|
|
3068
|
+
steps: [
|
|
3069
|
+
{
|
|
3070
|
+
mode: 'spec-pseudocode',
|
|
3071
|
+
description: 'Create detailed specifications and pseudocode',
|
|
3072
|
+
phase: 'specification',
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
mode: 'tdd',
|
|
3076
|
+
description: 'Write failing tests (Red phase)',
|
|
3077
|
+
phase: 'red',
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
mode: 'code',
|
|
3081
|
+
description: 'Implement minimal code to pass tests (Green phase)',
|
|
3082
|
+
phase: 'green',
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
mode: 'tdd',
|
|
3086
|
+
description: 'Refactor and optimize (Refactor phase)',
|
|
3087
|
+
phase: 'refactor',
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
mode: 'integration',
|
|
3091
|
+
description: 'Integrate and verify complete solution',
|
|
3092
|
+
phase: 'integration',
|
|
3093
|
+
},
|
|
3094
|
+
],
|
|
3095
|
+
},
|
|
3096
|
+
null,
|
|
3097
|
+
2,
|
|
3098
|
+
);
|
|
3014
3099
|
}
|
|
3015
3100
|
|
|
3016
3101
|
function createRooReadme() {
|
|
@@ -3323,4 +3408,4 @@ For more information about SPARC methodology, see: https://github.com/ruvnet/cla
|
|
|
3323
3408
|
|
|
3324
3409
|
if (isMainModule(import.meta.url)) {
|
|
3325
3410
|
await main();
|
|
3326
|
-
}
|
|
3411
|
+
}
|