claude-flow 2.0.0-alpha.61 → 2.0.0-alpha.63
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/analysis/COMMAND_COMPLIANCE_REPORT.md +54 -0
- package/.claude/commands/analysis/token-efficiency.md +2 -1
- package/.claude/commands/automation/self-healing.md +47 -2
- package/.claude/commands/automation/session-memory.md +39 -10
- package/.claude/commands/automation/smart-agents.md +36 -8
- package/.claude/commands/github/code-review-swarm.md +80 -15
- package/.claude/commands/github/github-modes.md +14 -14
- package/.claude/commands/github/issue-tracker.md +19 -16
- package/.claude/commands/github/multi-repo-swarm.md +114 -16
- package/.claude/commands/github/pr-manager.md +5 -4
- package/.claude/commands/github/project-board-sync.md +38 -5
- package/.claude/commands/github/release-manager.md +19 -19
- package/.claude/commands/github/release-swarm.md +102 -13
- package/.claude/commands/github/repo-architect.md +6 -6
- package/.claude/commands/github/swarm-issue.md +139 -17
- package/.claude/commands/github/swarm-pr.md +49 -15
- package/.claude/commands/github/sync-coordinator.md +33 -33
- package/.claude/commands/github/workflow-automation.md +37 -10
- package/.claude/commands/hooks/overview.md +2 -2
- package/.claude/commands/hooks/setup.md +7 -7
- package/.claude/commands/memory/neural.md +10 -5
- package/.claude/commands/memory/usage.md +9 -5
- package/.claude/commands/monitoring/agents.md +7 -5
- package/.claude/commands/monitoring/status.md +8 -5
- package/.claude/commands/optimization/auto-topology.md +13 -1
- package/.claude/commands/optimization/parallel-execution.md +7 -1
- package/.claude/commands/sparc/analyzer.md +28 -2
- package/.claude/commands/sparc/architect.md +27 -1
- package/.claude/commands/sparc/batch-executor.md +27 -1
- package/.claude/commands/sparc/coder.md +27 -1
- package/.claude/commands/sparc/debugger.md +27 -1
- package/.claude/commands/sparc/designer.md +27 -1
- package/.claude/commands/sparc/documenter.md +27 -1
- package/.claude/commands/sparc/innovator.md +27 -1
- package/.claude/commands/sparc/memory-manager.md +27 -1
- package/.claude/commands/sparc/optimizer.md +27 -1
- package/.claude/commands/sparc/orchestrator.md +106 -2
- package/.claude/commands/sparc/researcher.md +27 -1
- package/.claude/commands/sparc/reviewer.md +27 -1
- package/.claude/commands/sparc/sparc-modes.md +137 -5
- package/.claude/commands/sparc/swarm-coordinator.md +27 -1
- package/.claude/commands/sparc/tdd.md +27 -1
- package/.claude/commands/sparc/tester.md +27 -1
- package/.claude/commands/sparc/workflow-manager.md +27 -1
- package/.claude/commands/swarm/analysis.md +82 -5
- package/.claude/commands/swarm/development.md +83 -6
- package/.claude/commands/swarm/examples.md +141 -3
- package/.claude/commands/swarm/maintenance.md +92 -8
- package/.claude/commands/swarm/optimization.md +107 -9
- package/.claude/commands/swarm/research.md +126 -8
- package/.claude/commands/swarm/testing.md +121 -9
- package/.claude/commands/training/neural-patterns.md +27 -2
- package/.claude/commands/training/specialization.md +13 -3
- package/.claude/commands/workflows/development.md +43 -4
- package/.claude/commands/workflows/research.md +26 -2
- package/CHANGELOG.md +59 -1
- package/README.md +8 -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 +55 -64
- 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.js +49 -49
- package/dist/cli/commands/help-new.js.map +1 -1
- package/dist/cli/commands/help.d.ts.map +1 -1
- package/dist/cli/commands/help.js +122 -125
- 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.map +1 -1
- package/dist/cli/help-formatter.js +8 -14
- package/dist/cli/help-formatter.js.map +1 -1
- 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 +66 -0
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +402 -105
- 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 +278 -140
- 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.map +1 -1
- package/dist/cli/simple-commands/swarm.js +78 -67
- 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.map +1 -1
- package/dist/cli/validation-helper.js.map +1 -1
- 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 +13 -11
- 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 +1 -0
- package/dist/memory/fallback-store.d.ts.map +1 -1
- package/dist/memory/fallback-store.js +25 -3
- 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.d.ts +34 -0
- package/dist/memory/sqlite-store.d.ts.map +1 -0
- package/dist/memory/sqlite-store.js +14 -11
- package/dist/memory/sqlite-store.js.map +1 -1
- package/dist/memory/sqlite-wrapper.d.ts +38 -0
- package/dist/memory/sqlite-wrapper.d.ts.map +1 -0
- package/dist/memory/sqlite-wrapper.js +157 -0
- package/dist/memory/sqlite-wrapper.js.map +1 -0
- 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-api-errors.ts +248 -0
- package/src/api/claude-client-enhanced.ts +616 -0
- package/src/api/claude-client.ts +338 -49
- 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 +82 -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 +57 -55
- package/src/cli/commands/help.ts +162 -159
- 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 +23 -33
- package/src/cli/help-formatter.ts +24 -34
- package/src/cli/help-text.js +71 -61
- 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 +460 -385
- 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 +220 -184
- 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 +50 -46
- 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 +676 -263
- 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 +522 -240
- 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 +790 -443
- 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 +64 -37
- 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 +40 -19
- package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +149 -63
- package/src/cli/simple-commands/init/copy-revised-templates.js +175 -0
- 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 +451 -428
- 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/template-copier.js +583 -0
- 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/coordination.md +16 -0
- 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/memory-bank.md +16 -0
- 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/settings.json.enhanced +35 -0
- package/src/cli/simple-commands/init/templates/sparc-modes.js +637 -26
- 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 +16 -21
- package/src/cli/validation-helper.ts +21 -34
- 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 +371 -179
- 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 +79 -78
- 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 +662 -351
- 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 +40 -18
- 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 +49 -8
- 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 +78 -62
- package/src/memory/sqlite-wrapper.js +173 -0
- 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
|
@@ -8,37 +8,10 @@ import { createClaudeSlashCommands } from './claude-commands/slash-commands.js';
|
|
|
8
8
|
import { createOptimizedClaudeSlashCommands } from './claude-commands/optimized-slash-commands.js';
|
|
9
9
|
import { execSync } from 'child_process';
|
|
10
10
|
import { promises as fs } from 'fs';
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
createFullClaudeMd,
|
|
14
|
-
createMinimalClaudeMd,
|
|
15
|
-
createOptimizedSparcClaudeMd
|
|
16
|
-
} from './templates/claude-md.js';
|
|
17
|
-
import {
|
|
18
|
-
createFullMemoryBankMd,
|
|
19
|
-
createMinimalMemoryBankMd,
|
|
20
|
-
createOptimizedMemoryBankMd
|
|
21
|
-
} from './templates/memory-bank-md.js';
|
|
22
|
-
import {
|
|
23
|
-
createFullCoordinationMd,
|
|
24
|
-
createMinimalCoordinationMd,
|
|
25
|
-
createOptimizedCoordinationMd
|
|
26
|
-
} from './templates/coordination-md.js';
|
|
27
|
-
import {
|
|
28
|
-
createAgentsReadme,
|
|
29
|
-
createSessionsReadme
|
|
30
|
-
} from './templates/readme-files.js';
|
|
31
|
-
import {
|
|
32
|
-
createSparcModeTemplates,
|
|
33
|
-
createSparcModesOverview,
|
|
34
|
-
createSwarmStrategyTemplates
|
|
35
|
-
} from './templates/sparc-modes.js';
|
|
11
|
+
import { copyTemplates } from './template-copier.js';
|
|
12
|
+
import { copyRevisedTemplates, validateTemplatesExist } from './copy-revised-templates.js';
|
|
36
13
|
import { showInitHelp } from './help.js';
|
|
37
|
-
import {
|
|
38
|
-
batchInitCommand,
|
|
39
|
-
batchInitFromConfig,
|
|
40
|
-
validateBatchOptions
|
|
41
|
-
} from './batch-init.js';
|
|
14
|
+
import { batchInitCommand, batchInitFromConfig, validateBatchOptions } from './batch-init.js';
|
|
42
15
|
import { ValidationSystem, runFullValidation } from './validation/index.js';
|
|
43
16
|
import { RollbackSystem, createAtomicOperation } from './rollback/index.js';
|
|
44
17
|
import {
|
|
@@ -47,10 +20,24 @@ import {
|
|
|
47
20
|
createWrapperScript,
|
|
48
21
|
createCommandDoc,
|
|
49
22
|
createHelperScript,
|
|
50
|
-
COMMAND_STRUCTURE
|
|
23
|
+
COMMAND_STRUCTURE,
|
|
51
24
|
} from './templates/enhanced-templates.js';
|
|
52
25
|
import { getIsolatedNpxEnv } from '../../../utils/npx-isolated-cache.js';
|
|
53
26
|
import { updateGitignore, needsGitignoreUpdate } from './gitignore-updater.js';
|
|
27
|
+
import {
|
|
28
|
+
createFullClaudeMd,
|
|
29
|
+
createSparcClaudeMd,
|
|
30
|
+
createMinimalClaudeMd,
|
|
31
|
+
} from './templates/claude-md.js';
|
|
32
|
+
import {
|
|
33
|
+
createFullMemoryBankMd,
|
|
34
|
+
createMinimalMemoryBankMd,
|
|
35
|
+
} from './templates/memory-bank-md.js';
|
|
36
|
+
import {
|
|
37
|
+
createFullCoordinationMd,
|
|
38
|
+
createMinimalCoordinationMd,
|
|
39
|
+
} from './templates/coordination-md.js';
|
|
40
|
+
import { createAgentsReadme, createSessionsReadme } from './templates/readme-files.js';
|
|
54
41
|
|
|
55
42
|
/**
|
|
56
43
|
* Check if Claude Code CLI is installed
|
|
@@ -69,20 +56,20 @@ function isClaudeCodeInstalled() {
|
|
|
69
56
|
*/
|
|
70
57
|
async function setupMcpServers(dryRun = false) {
|
|
71
58
|
console.log('\n🔌 Setting up MCP servers for Claude Code...');
|
|
72
|
-
|
|
59
|
+
|
|
73
60
|
const servers = [
|
|
74
61
|
{
|
|
75
62
|
name: 'claude-flow',
|
|
76
63
|
command: 'npx claude-flow@alpha mcp start',
|
|
77
|
-
description: 'Claude Flow MCP server with swarm orchestration (alpha)'
|
|
64
|
+
description: 'Claude Flow MCP server with swarm orchestration (alpha)',
|
|
78
65
|
},
|
|
79
66
|
{
|
|
80
67
|
name: 'ruv-swarm',
|
|
81
68
|
command: 'npx ruv-swarm mcp start',
|
|
82
|
-
description: 'ruv-swarm MCP server for enhanced coordination'
|
|
83
|
-
}
|
|
69
|
+
description: 'ruv-swarm MCP server for enhanced coordination',
|
|
70
|
+
},
|
|
84
71
|
];
|
|
85
|
-
|
|
72
|
+
|
|
86
73
|
for (const server of servers) {
|
|
87
74
|
try {
|
|
88
75
|
if (!dryRun) {
|
|
@@ -94,10 +81,12 @@ async function setupMcpServers(dryRun = false) {
|
|
|
94
81
|
}
|
|
95
82
|
} catch (err) {
|
|
96
83
|
console.log(` ⚠️ Failed to add ${server.name}: ${err.message}`);
|
|
97
|
-
console.log(
|
|
84
|
+
console.log(
|
|
85
|
+
` You can add it manually with: claude mcp add ${server.name} ${server.command}`,
|
|
86
|
+
);
|
|
98
87
|
}
|
|
99
88
|
}
|
|
100
|
-
|
|
89
|
+
|
|
101
90
|
if (!dryRun) {
|
|
102
91
|
console.log('\n 📋 Verifying MCP servers...');
|
|
103
92
|
try {
|
|
@@ -114,68 +103,68 @@ export async function initCommand(subArgs, flags) {
|
|
|
114
103
|
showInitHelp();
|
|
115
104
|
return;
|
|
116
105
|
}
|
|
117
|
-
|
|
106
|
+
|
|
118
107
|
// Default to enhanced Claude Flow v2 init
|
|
119
108
|
// Use --basic flag for old behavior
|
|
120
109
|
if (!flags.basic && !flags.minimal && !flags.sparc) {
|
|
121
110
|
return await enhancedClaudeFlowInit(flags, subArgs);
|
|
122
111
|
}
|
|
123
|
-
|
|
112
|
+
|
|
124
113
|
// Check for validation and rollback commands
|
|
125
114
|
if (subArgs.includes('--validate') || subArgs.includes('--validate-only')) {
|
|
126
115
|
return handleValidationCommand(subArgs, flags);
|
|
127
116
|
}
|
|
128
|
-
|
|
117
|
+
|
|
129
118
|
if (subArgs.includes('--rollback')) {
|
|
130
119
|
return handleRollbackCommand(subArgs, flags);
|
|
131
120
|
}
|
|
132
|
-
|
|
121
|
+
|
|
133
122
|
if (subArgs.includes('--list-backups')) {
|
|
134
123
|
return handleListBackups(subArgs, flags);
|
|
135
124
|
}
|
|
136
|
-
|
|
125
|
+
|
|
137
126
|
// Check for batch operations
|
|
138
127
|
const batchInitFlag = flags['batch-init'] || subArgs.includes('--batch-init');
|
|
139
128
|
const configFlag = flags.config || subArgs.includes('--config');
|
|
140
|
-
|
|
129
|
+
|
|
141
130
|
if (batchInitFlag || configFlag) {
|
|
142
131
|
return handleBatchInit(subArgs, flags);
|
|
143
132
|
}
|
|
144
|
-
|
|
133
|
+
|
|
145
134
|
// Check if enhanced initialization is requested
|
|
146
135
|
const useEnhanced = subArgs.includes('--enhanced') || subArgs.includes('--safe');
|
|
147
|
-
|
|
136
|
+
|
|
148
137
|
if (useEnhanced) {
|
|
149
138
|
return enhancedInitCommand(subArgs, flags);
|
|
150
139
|
}
|
|
151
|
-
|
|
140
|
+
|
|
152
141
|
// Parse init options
|
|
153
142
|
const initForce = subArgs.includes('--force') || subArgs.includes('-f') || flags.force;
|
|
154
143
|
const initMinimal = subArgs.includes('--minimal') || subArgs.includes('-m') || flags.minimal;
|
|
155
|
-
const initSparc =
|
|
144
|
+
const initSparc = true; // SPARC is now included by default
|
|
156
145
|
const initDryRun = subArgs.includes('--dry-run') || subArgs.includes('-d') || flags.dryRun;
|
|
157
146
|
const initOptimized = initSparc && initForce; // Use optimized templates when both flags are present
|
|
158
147
|
const selectedModes = flags.modes ? flags.modes.split(',') : null; // Support selective mode initialization
|
|
159
|
-
|
|
148
|
+
|
|
160
149
|
// Get the actual working directory (where the command was run from)
|
|
161
150
|
// Use PWD environment variable which preserves the original directory
|
|
162
151
|
const workingDir = process.env.PWD || cwd();
|
|
163
152
|
console.log(`📁 Initializing in: ${workingDir}`);
|
|
164
|
-
|
|
153
|
+
|
|
165
154
|
// Change to the working directory to ensure all file operations happen there
|
|
166
155
|
try {
|
|
167
156
|
process.chdir(workingDir);
|
|
168
157
|
} catch (err) {
|
|
169
158
|
printWarning(`Could not change to directory ${workingDir}: ${err.message}`);
|
|
170
159
|
}
|
|
171
|
-
|
|
160
|
+
|
|
172
161
|
try {
|
|
173
162
|
printSuccess('Initializing Claude Code integration files...');
|
|
174
|
-
|
|
163
|
+
|
|
175
164
|
// Check if files already exist in the working directory
|
|
176
165
|
const files = ['CLAUDE.md', 'memory-bank.md', 'coordination.md'];
|
|
177
166
|
const existingFiles = [];
|
|
178
|
-
|
|
167
|
+
|
|
179
168
|
for (const file of files) {
|
|
180
169
|
try {
|
|
181
170
|
await Deno.stat(`${workingDir}/${file}`);
|
|
@@ -184,197 +173,83 @@ export async function initCommand(subArgs, flags) {
|
|
|
184
173
|
// File doesn't exist, which is what we want
|
|
185
174
|
}
|
|
186
175
|
}
|
|
187
|
-
|
|
176
|
+
|
|
188
177
|
if (existingFiles.length > 0 && !initForce) {
|
|
189
178
|
printWarning(`The following files already exist: ${existingFiles.join(', ')}`);
|
|
190
179
|
console.log('Use --force to overwrite existing files');
|
|
191
180
|
return;
|
|
192
181
|
}
|
|
193
|
-
|
|
194
|
-
//
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (!initDryRun) {
|
|
220
|
-
await Deno.writeTextFile('coordination.md', coordinationMd);
|
|
221
|
-
console.log(' ✓ Created coordination.md' + (initOptimized ? ' (Enhanced with batchtools)' : ''));
|
|
222
|
-
} else {
|
|
223
|
-
console.log(' [DRY RUN] Would create coordination.md' + (initOptimized ? ' (Enhanced with batchtools)' : ''));
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// Create directory structure
|
|
227
|
-
const directories = [
|
|
228
|
-
'memory',
|
|
229
|
-
'memory/agents',
|
|
230
|
-
'memory/sessions',
|
|
231
|
-
'coordination',
|
|
232
|
-
'coordination/memory_bank',
|
|
233
|
-
'coordination/subtasks',
|
|
234
|
-
'coordination/orchestration',
|
|
235
|
-
'.claude',
|
|
236
|
-
'.claude/commands',
|
|
237
|
-
'.claude/commands/sparc',
|
|
238
|
-
'.claude/commands/swarm',
|
|
239
|
-
'.claude/logs',
|
|
240
|
-
'.swarm' // Add .swarm directory for memory persistence (matching hive-mind pattern)
|
|
241
|
-
];
|
|
242
|
-
|
|
243
|
-
for (const dir of directories) {
|
|
244
|
-
try {
|
|
245
|
-
if (!initDryRun) {
|
|
246
|
-
await Deno.mkdir(dir, { recursive: true });
|
|
247
|
-
console.log(` ✓ Created ${dir}/ directory`);
|
|
248
|
-
} else {
|
|
249
|
-
console.log(` [DRY RUN] Would create ${dir}/ directory`);
|
|
250
|
-
}
|
|
251
|
-
} catch (err) {
|
|
252
|
-
if (err.code !== 'EEXIST') {
|
|
253
|
-
throw err;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// Create SPARC command files if --sparc flag is used
|
|
259
|
-
if (initSparc && !initDryRun) {
|
|
260
|
-
try {
|
|
261
|
-
const sparcTargetDir = `${workingDir}/.claude/commands/sparc`;
|
|
262
|
-
|
|
263
|
-
// Get SPARC mode templates
|
|
264
|
-
const sparcTemplates = createSparcModeTemplates();
|
|
265
|
-
|
|
266
|
-
console.log(' 📁 Creating SPARC command files...');
|
|
267
|
-
|
|
268
|
-
for (const [filename, content] of Object.entries(sparcTemplates)) {
|
|
269
|
-
try {
|
|
270
|
-
await Deno.writeTextFile(`${sparcTargetDir}/${filename}`, content);
|
|
271
|
-
console.log(` ✓ Created ${filename}`);
|
|
272
|
-
} catch (err) {
|
|
273
|
-
console.log(` ⚠️ Could not create ${filename}: ${err.message}`);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// Also create sparc-modes.md overview file
|
|
278
|
-
const sparcModesOverview = createSparcModesOverview();
|
|
279
|
-
await Deno.writeTextFile(`${sparcTargetDir}/sparc-modes.md`, sparcModesOverview);
|
|
280
|
-
console.log(` ✓ Created sparc-modes.md`);
|
|
281
|
-
|
|
282
|
-
console.log(' ✅ SPARC command files created successfully');
|
|
283
|
-
} catch (err) {
|
|
284
|
-
console.log(` ⚠️ Could not create SPARC files: ${err.message}`);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// Also create swarm strategy files
|
|
288
|
-
try {
|
|
289
|
-
const swarmTargetDir = `${workingDir}/.claude/commands/swarm`;
|
|
290
|
-
|
|
291
|
-
// Get swarm strategy templates
|
|
292
|
-
const swarmTemplates = createSwarmStrategyTemplates();
|
|
293
|
-
|
|
294
|
-
console.log(' 📁 Creating swarm strategy files...');
|
|
295
|
-
|
|
296
|
-
for (const [filename, content] of Object.entries(swarmTemplates)) {
|
|
297
|
-
try {
|
|
298
|
-
await Deno.writeTextFile(`${swarmTargetDir}/${filename}`, content);
|
|
299
|
-
console.log(` ✓ Created ${filename}`);
|
|
300
|
-
} catch (err) {
|
|
301
|
-
console.log(` ⚠️ Could not create ${filename}: ${err.message}`);
|
|
302
|
-
}
|
|
182
|
+
|
|
183
|
+
// Use template copier to copy all template files
|
|
184
|
+
const templateOptions = {
|
|
185
|
+
sparc: initSparc,
|
|
186
|
+
minimal: initMinimal,
|
|
187
|
+
optimized: initOptimized,
|
|
188
|
+
dryRun: initDryRun,
|
|
189
|
+
force: initForce,
|
|
190
|
+
selectedModes: selectedModes,
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
// First try to copy revised templates from repository
|
|
194
|
+
const validation = validateTemplatesExist();
|
|
195
|
+
if (validation.valid) {
|
|
196
|
+
console.log(' 📁 Copying revised template files...');
|
|
197
|
+
const revisedResults = await copyRevisedTemplates(workingDir, {
|
|
198
|
+
force: initForce,
|
|
199
|
+
dryRun: initDryRun,
|
|
200
|
+
verbose: true,
|
|
201
|
+
sparc: initSparc
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
if (revisedResults.success) {
|
|
205
|
+
console.log(` ✅ Copied ${revisedResults.copiedFiles.length} template files`);
|
|
206
|
+
if (revisedResults.skippedFiles.length > 0) {
|
|
207
|
+
console.log(` ⏭️ Skipped ${revisedResults.skippedFiles.length} existing files`);
|
|
303
208
|
}
|
|
304
|
-
|
|
305
|
-
console.log('
|
|
306
|
-
|
|
307
|
-
console.log(` ⚠️ Could not create swarm files: ${err.message}`);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Create .claude/config.json
|
|
311
|
-
try {
|
|
312
|
-
const configContent = {
|
|
313
|
-
"version": "1.0",
|
|
314
|
-
"sparc": {
|
|
315
|
-
"enabled": true,
|
|
316
|
-
"modes": ["orchestrator", "coder", "researcher", "tdd", "architect", "reviewer", "debugger", "tester", "analyzer", "optimizer", "documenter", "designer", "innovator", "swarm-coordinator", "memory-manager", "batch-executor", "workflow-manager"]
|
|
317
|
-
},
|
|
318
|
-
"swarm": {
|
|
319
|
-
"enabled": true,
|
|
320
|
-
"strategies": ["research", "development", "analysis", "testing", "optimization", "maintenance"]
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
await Deno.writeTextFile(`${workingDir}/.claude/config.json`, JSON.stringify(configContent, null, 2));
|
|
325
|
-
console.log(' ✓ Created .claude/config.json');
|
|
326
|
-
} catch (err) {
|
|
327
|
-
console.log(` ⚠️ Could not create config.json: ${err.message}`);
|
|
209
|
+
} else {
|
|
210
|
+
console.log(' ⚠️ Some template files could not be copied:');
|
|
211
|
+
revisedResults.errors.forEach(err => console.log(` - ${err}`));
|
|
328
212
|
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// Create placeholder files for memory directories
|
|
332
|
-
const agentsReadme = createAgentsReadme();
|
|
333
|
-
if (!initDryRun) {
|
|
334
|
-
await Deno.writeTextFile('memory/agents/README.md', agentsReadme);
|
|
335
|
-
console.log(' ✓ Created memory/agents/README.md');
|
|
336
213
|
} else {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Initialize persistence database
|
|
349
|
-
const initialData = {
|
|
350
|
-
agents: [],
|
|
351
|
-
tasks: [],
|
|
352
|
-
lastUpdated: Date.now()
|
|
353
|
-
};
|
|
354
|
-
if (!initDryRun) {
|
|
355
|
-
await Deno.writeTextFile('memory/claude-flow-data.json', JSON.stringify(initialData, null, 2));
|
|
356
|
-
console.log(' ✓ Created memory/claude-flow-data.json (persistence database)');
|
|
357
|
-
} else {
|
|
358
|
-
console.log(' [DRY RUN] Would create memory/claude-flow-data.json (persistence database)');
|
|
214
|
+
// Fall back to generated templates
|
|
215
|
+
console.log(' ⚠️ Revised templates not available, using generated templates');
|
|
216
|
+
const copyResults = await copyTemplates(workingDir, templateOptions);
|
|
217
|
+
|
|
218
|
+
if (!copyResults.success) {
|
|
219
|
+
printError('Failed to copy templates:');
|
|
220
|
+
copyResults.errors.forEach(err => console.log(` ❌ ${err}`));
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
359
223
|
}
|
|
360
|
-
|
|
224
|
+
|
|
225
|
+
// Directory structure is created by template copier
|
|
226
|
+
|
|
227
|
+
// SPARC files are created by template copier when --sparc flag is used
|
|
228
|
+
|
|
229
|
+
// Memory README files and persistence database are created by template copier
|
|
230
|
+
|
|
361
231
|
// Create local claude-flow executable wrapper
|
|
362
232
|
if (!initDryRun) {
|
|
363
233
|
await createLocalExecutable(workingDir);
|
|
364
234
|
} else {
|
|
365
235
|
console.log(' [DRY RUN] Would create local claude-flow executable wrapper');
|
|
366
236
|
}
|
|
367
|
-
|
|
237
|
+
|
|
368
238
|
// SPARC initialization
|
|
369
239
|
if (initSparc) {
|
|
370
240
|
console.log('\n🚀 Initializing SPARC development environment...');
|
|
371
|
-
|
|
241
|
+
|
|
372
242
|
if (initDryRun) {
|
|
373
243
|
console.log(' [DRY RUN] Would run: npx -y create-sparc init --force');
|
|
374
244
|
console.log(' [DRY RUN] Would create SPARC environment with all modes');
|
|
375
|
-
console.log(
|
|
245
|
+
console.log(
|
|
246
|
+
' [DRY RUN] Would create Claude slash commands' +
|
|
247
|
+
(initOptimized ? ' (Batchtools-optimized)' : ''),
|
|
248
|
+
);
|
|
376
249
|
if (selectedModes) {
|
|
377
|
-
console.log(
|
|
250
|
+
console.log(
|
|
251
|
+
` [DRY RUN] Would create commands for selected modes: ${selectedModes.join(', ')}`,
|
|
252
|
+
);
|
|
378
253
|
}
|
|
379
254
|
} else {
|
|
380
255
|
// Check if create-sparc exists and run it
|
|
@@ -390,28 +265,28 @@ export async function initCommand(subArgs, flags) {
|
|
|
390
265
|
PWD: workingDir, // Ensure PWD is set correctly
|
|
391
266
|
}),
|
|
392
267
|
});
|
|
393
|
-
|
|
268
|
+
|
|
394
269
|
console.log(' 🔄 Running: npx -y create-sparc init --force');
|
|
395
270
|
const createSparcResult = await createSparcCommand.output();
|
|
396
|
-
|
|
271
|
+
|
|
397
272
|
if (createSparcResult.success) {
|
|
398
273
|
console.log(' ✅ SPARC environment initialized successfully');
|
|
399
274
|
sparcInitialized = true;
|
|
400
275
|
} else {
|
|
401
276
|
printWarning('create-sparc failed, creating basic SPARC structure manually...');
|
|
402
|
-
|
|
277
|
+
|
|
403
278
|
// Fallback: create basic SPARC structure manually
|
|
404
279
|
await createSparcStructureManually();
|
|
405
280
|
sparcInitialized = true; // Manual creation still counts as initialized
|
|
406
281
|
}
|
|
407
282
|
} catch (err) {
|
|
408
283
|
printWarning('create-sparc not available, creating basic SPARC structure manually...');
|
|
409
|
-
|
|
284
|
+
|
|
410
285
|
// Fallback: create basic SPARC structure manually
|
|
411
286
|
await createSparcStructureManually();
|
|
412
287
|
sparcInitialized = true; // Manual creation still counts as initialized
|
|
413
288
|
}
|
|
414
|
-
|
|
289
|
+
|
|
415
290
|
// Always create Claude slash commands after SPARC initialization
|
|
416
291
|
if (sparcInitialized) {
|
|
417
292
|
try {
|
|
@@ -426,17 +301,23 @@ export async function initCommand(subArgs, flags) {
|
|
|
426
301
|
}
|
|
427
302
|
}
|
|
428
303
|
}
|
|
429
|
-
|
|
304
|
+
|
|
430
305
|
if (initDryRun) {
|
|
431
|
-
printSuccess(
|
|
306
|
+
printSuccess("🔍 Dry run completed! Here's what would be created:");
|
|
432
307
|
console.log('\n📋 Summary of planned initialization:');
|
|
433
|
-
console.log(
|
|
434
|
-
|
|
308
|
+
console.log(
|
|
309
|
+
` • Configuration: ${initOptimized ? 'Batchtools-optimized SPARC' : initSparc ? 'SPARC-enhanced' : 'Standard'}`,
|
|
310
|
+
);
|
|
311
|
+
console.log(
|
|
312
|
+
` • Template type: ${initOptimized ? 'Optimized for parallel processing' : 'Standard'}`,
|
|
313
|
+
);
|
|
435
314
|
console.log(' • Core files: CLAUDE.md, memory-bank.md, coordination.md');
|
|
436
315
|
console.log(' • Directory structure: memory/, coordination/, .claude/');
|
|
437
316
|
console.log(' • Local executable: ./claude-flow');
|
|
438
317
|
if (initSparc) {
|
|
439
|
-
console.log(
|
|
318
|
+
console.log(
|
|
319
|
+
` • Claude Code slash commands: ${selectedModes ? selectedModes.length : 'All'} SPARC mode commands`,
|
|
320
|
+
);
|
|
440
321
|
console.log(' • SPARC environment with all development modes');
|
|
441
322
|
}
|
|
442
323
|
if (initOptimized) {
|
|
@@ -446,46 +327,54 @@ export async function initCommand(subArgs, flags) {
|
|
|
446
327
|
console.log('\n🚀 To proceed with initialization, run the same command without --dry-run');
|
|
447
328
|
} else {
|
|
448
329
|
printSuccess('🎉 Claude Code integration files initialized successfully!');
|
|
449
|
-
|
|
330
|
+
|
|
450
331
|
if (initOptimized) {
|
|
451
332
|
console.log('\n⚡ Batchtools Optimization Enabled!');
|
|
452
333
|
console.log(' • Parallel processing capabilities activated');
|
|
453
334
|
console.log(' • Performance improvements: 250-500% faster operations');
|
|
454
335
|
console.log(' • Smart batching and concurrent operations available');
|
|
455
336
|
}
|
|
456
|
-
|
|
337
|
+
|
|
457
338
|
console.log('\n📋 What was created:');
|
|
458
|
-
console.log(
|
|
459
|
-
|
|
460
|
-
|
|
339
|
+
console.log(
|
|
340
|
+
` ✅ CLAUDE.md (${initOptimized ? 'Batchtools-optimized' : initSparc ? 'SPARC-enhanced' : 'Standard configuration'})`,
|
|
341
|
+
);
|
|
342
|
+
console.log(
|
|
343
|
+
` ✅ memory-bank.md (${initOptimized ? 'With parallel processing' : 'Standard memory system'})`,
|
|
344
|
+
);
|
|
345
|
+
console.log(
|
|
346
|
+
` ✅ coordination.md (${initOptimized ? 'Enhanced with batchtools' : 'Standard coordination'})`,
|
|
347
|
+
);
|
|
461
348
|
console.log(' ✅ Directory structure with memory/ and coordination/');
|
|
462
349
|
console.log(' ✅ Local executable at ./claude-flow');
|
|
463
350
|
console.log(' ✅ Persistence database at memory/claude-flow-data.json');
|
|
464
|
-
|
|
351
|
+
|
|
465
352
|
if (initSparc) {
|
|
466
353
|
const modeCount = selectedModes ? selectedModes.length : '20+';
|
|
467
354
|
console.log(` ✅ Claude Code slash commands (${modeCount} SPARC modes)`);
|
|
468
355
|
console.log(' ✅ Complete SPARC development environment');
|
|
469
356
|
}
|
|
470
|
-
|
|
357
|
+
|
|
471
358
|
console.log('\n🚀 Next steps:');
|
|
472
359
|
console.log('1. Review and customize the generated files for your project');
|
|
473
|
-
console.log(
|
|
474
|
-
console.log(
|
|
475
|
-
console.log(
|
|
476
|
-
|
|
360
|
+
console.log("2. Run './claude-flow start' to begin the orchestration system");
|
|
361
|
+
console.log("3. Use './claude-flow' instead of 'npx claude-flow' for all commands");
|
|
362
|
+
console.log("4. Use 'claude --dangerously-skip-permissions' for unattended operation");
|
|
363
|
+
|
|
477
364
|
if (initSparc) {
|
|
478
|
-
console.log(
|
|
479
|
-
|
|
365
|
+
console.log(
|
|
366
|
+
'5. Use Claude Code slash commands: /sparc, /sparc-architect, /sparc-tdd, etc.',
|
|
367
|
+
);
|
|
368
|
+
console.log("6. Explore SPARC modes with './claude-flow sparc modes'");
|
|
480
369
|
console.log('7. Try TDD workflow with \'./claude-flow sparc tdd "your task"\'');
|
|
481
|
-
|
|
370
|
+
|
|
482
371
|
if (initOptimized) {
|
|
483
372
|
console.log('8. Use batchtools commands: /batchtools, /performance for optimization');
|
|
484
373
|
console.log('9. Enable parallel processing with --parallel flags');
|
|
485
|
-
console.log(
|
|
374
|
+
console.log("10. Monitor performance with './claude-flow performance monitor'");
|
|
486
375
|
}
|
|
487
376
|
}
|
|
488
|
-
|
|
377
|
+
|
|
489
378
|
// Update .gitignore
|
|
490
379
|
const gitignoreResult = await updateGitignore(workingDir, initForce, initDryRun);
|
|
491
380
|
if (gitignoreResult.success) {
|
|
@@ -497,23 +386,23 @@ export async function initCommand(subArgs, flags) {
|
|
|
497
386
|
} else {
|
|
498
387
|
console.log(` ⚠️ ${gitignoreResult.message}`);
|
|
499
388
|
}
|
|
500
|
-
|
|
389
|
+
|
|
501
390
|
console.log('\n💡 Tips:');
|
|
502
|
-
console.log(
|
|
503
|
-
console.log(
|
|
504
|
-
console.log(
|
|
505
|
-
|
|
391
|
+
console.log(" • Type '/' in Claude Code to see all available slash commands");
|
|
392
|
+
console.log(" • Use './claude-flow status' to check system health");
|
|
393
|
+
console.log(" • Store important context with './claude-flow memory store'");
|
|
394
|
+
|
|
506
395
|
if (initOptimized) {
|
|
507
396
|
console.log(' • Use --parallel flags for concurrent operations');
|
|
508
397
|
console.log(' • Enable batch processing for multiple related tasks');
|
|
509
398
|
console.log(' • Monitor performance with real-time metrics');
|
|
510
399
|
}
|
|
511
|
-
|
|
400
|
+
|
|
512
401
|
// Check for Claude Code and set up MCP servers (always enabled by default)
|
|
513
402
|
if (!initDryRun && isClaudeCodeInstalled()) {
|
|
514
403
|
console.log('\n🔍 Claude Code CLI detected!');
|
|
515
404
|
const skipMcp = subArgs && subArgs.includes && subArgs.includes('--skip-mcp');
|
|
516
|
-
|
|
405
|
+
|
|
517
406
|
if (!skipMcp) {
|
|
518
407
|
await setupMcpServers(initDryRun);
|
|
519
408
|
} else {
|
|
@@ -527,7 +416,6 @@ export async function initCommand(subArgs, flags) {
|
|
|
527
416
|
console.log(' claude mcp add ruv-swarm npx ruv-swarm mcp start');
|
|
528
417
|
}
|
|
529
418
|
}
|
|
530
|
-
|
|
531
419
|
} catch (err) {
|
|
532
420
|
printError(`Failed to initialize files: ${err.message}`);
|
|
533
421
|
}
|
|
@@ -545,17 +433,19 @@ async function handleBatchInit(subArgs, flags) {
|
|
|
545
433
|
maxConcurrency: flags['max-concurrent'] || 5,
|
|
546
434
|
progressTracking: true,
|
|
547
435
|
template: flags.template,
|
|
548
|
-
environments: flags.environments
|
|
436
|
+
environments: flags.environments
|
|
437
|
+
? flags.environments.split(',').map((env) => env.trim())
|
|
438
|
+
: ['dev'],
|
|
549
439
|
};
|
|
550
|
-
|
|
440
|
+
|
|
551
441
|
// Validate options
|
|
552
442
|
const validationErrors = validateBatchOptions(options);
|
|
553
443
|
if (validationErrors.length > 0) {
|
|
554
444
|
printError('Batch options validation failed:');
|
|
555
|
-
validationErrors.forEach(error => console.error(` - ${error}`));
|
|
445
|
+
validationErrors.forEach((error) => console.error(` - ${error}`));
|
|
556
446
|
return;
|
|
557
447
|
}
|
|
558
|
-
|
|
448
|
+
|
|
559
449
|
// Config file mode
|
|
560
450
|
if (flags.config) {
|
|
561
451
|
const configFile = flags.config;
|
|
@@ -566,24 +456,24 @@ async function handleBatchInit(subArgs, flags) {
|
|
|
566
456
|
}
|
|
567
457
|
return;
|
|
568
458
|
}
|
|
569
|
-
|
|
570
|
-
// Batch init mode
|
|
459
|
+
|
|
460
|
+
// Batch init mode
|
|
571
461
|
if (flags['batch-init']) {
|
|
572
462
|
const projectsString = flags['batch-init'];
|
|
573
|
-
const projects = projectsString.split(',').map(project => project.trim());
|
|
574
|
-
|
|
463
|
+
const projects = projectsString.split(',').map((project) => project.trim());
|
|
464
|
+
|
|
575
465
|
if (projects.length === 0) {
|
|
576
466
|
printError('No projects specified for batch initialization');
|
|
577
467
|
return;
|
|
578
468
|
}
|
|
579
|
-
|
|
469
|
+
|
|
580
470
|
printSuccess(`Initializing ${projects.length} projects in batch mode`);
|
|
581
471
|
const results = await batchInitCommand(projects, options);
|
|
582
|
-
|
|
472
|
+
|
|
583
473
|
if (results) {
|
|
584
|
-
const successful = results.filter(r => r.success).length;
|
|
585
|
-
const failed = results.filter(r => !r.success).length;
|
|
586
|
-
|
|
474
|
+
const successful = results.filter((r) => r.success).length;
|
|
475
|
+
const failed = results.filter((r) => !r.success).length;
|
|
476
|
+
|
|
587
477
|
if (failed === 0) {
|
|
588
478
|
printSuccess(`All ${successful} projects initialized successfully`);
|
|
589
479
|
} else {
|
|
@@ -592,9 +482,8 @@ async function handleBatchInit(subArgs, flags) {
|
|
|
592
482
|
}
|
|
593
483
|
return;
|
|
594
484
|
}
|
|
595
|
-
|
|
485
|
+
|
|
596
486
|
printError('No batch operation specified. Use --batch-init <projects> or --config <file>');
|
|
597
|
-
|
|
598
487
|
} catch (err) {
|
|
599
488
|
printError(`Batch initialization failed: ${err.message}`);
|
|
600
489
|
}
|
|
@@ -605,20 +494,20 @@ async function handleBatchInit(subArgs, flags) {
|
|
|
605
494
|
*/
|
|
606
495
|
async function enhancedInitCommand(subArgs, flags) {
|
|
607
496
|
console.log('🛡️ Starting enhanced initialization with validation and rollback...');
|
|
608
|
-
|
|
497
|
+
|
|
609
498
|
// Store parameters to avoid scope issues in async context
|
|
610
499
|
const args = subArgs || [];
|
|
611
500
|
const options = flags || {};
|
|
612
|
-
|
|
501
|
+
|
|
613
502
|
// Get the working directory
|
|
614
503
|
const workingDir = Deno.env.get('PWD') || Deno.cwd();
|
|
615
|
-
|
|
504
|
+
|
|
616
505
|
// Initialize systems
|
|
617
506
|
const rollbackSystem = new RollbackSystem(workingDir);
|
|
618
507
|
const validationSystem = new ValidationSystem(workingDir);
|
|
619
|
-
|
|
508
|
+
|
|
620
509
|
let atomicOp = null;
|
|
621
|
-
|
|
510
|
+
|
|
622
511
|
try {
|
|
623
512
|
// Parse options
|
|
624
513
|
const initOptions = {
|
|
@@ -627,25 +516,25 @@ async function enhancedInitCommand(subArgs, flags) {
|
|
|
627
516
|
sparc: args.includes('--sparc') || args.includes('-s') || options.sparc,
|
|
628
517
|
skipPreValidation: args.includes('--skip-pre-validation'),
|
|
629
518
|
skipBackup: args.includes('--skip-backup'),
|
|
630
|
-
validateOnly: args.includes('--validate-only')
|
|
519
|
+
validateOnly: args.includes('--validate-only'),
|
|
631
520
|
};
|
|
632
521
|
|
|
633
522
|
// Phase 1: Pre-initialization validation
|
|
634
523
|
if (!initOptions.skipPreValidation) {
|
|
635
524
|
console.log('\n🔍 Phase 1: Pre-initialization validation...');
|
|
636
525
|
const preValidation = await validationSystem.validatePreInit(initOptions);
|
|
637
|
-
|
|
526
|
+
|
|
638
527
|
if (!preValidation.success) {
|
|
639
528
|
printError('Pre-initialization validation failed:');
|
|
640
|
-
preValidation.errors.forEach(error => console.error(` ❌ ${error}`));
|
|
529
|
+
preValidation.errors.forEach((error) => console.error(` ❌ ${error}`));
|
|
641
530
|
return;
|
|
642
531
|
}
|
|
643
|
-
|
|
532
|
+
|
|
644
533
|
if (preValidation.warnings.length > 0) {
|
|
645
534
|
printWarning('Pre-initialization warnings:');
|
|
646
|
-
preValidation.warnings.forEach(warning => console.warn(` ⚠️ ${warning}`));
|
|
535
|
+
preValidation.warnings.forEach((warning) => console.warn(` ⚠️ ${warning}`));
|
|
647
536
|
}
|
|
648
|
-
|
|
537
|
+
|
|
649
538
|
printSuccess('Pre-initialization validation passed');
|
|
650
539
|
}
|
|
651
540
|
|
|
@@ -659,10 +548,10 @@ async function enhancedInitCommand(subArgs, flags) {
|
|
|
659
548
|
if (!options.skipBackup) {
|
|
660
549
|
console.log('\n💾 Phase 2: Creating backup...');
|
|
661
550
|
const backupResult = await rollbackSystem.createPreInitBackup();
|
|
662
|
-
|
|
551
|
+
|
|
663
552
|
if (!backupResult.success) {
|
|
664
553
|
printError('Backup creation failed:');
|
|
665
|
-
backupResult.errors.forEach(error => console.error(` ❌ ${error}`));
|
|
554
|
+
backupResult.errors.forEach((error) => console.error(` ❌ ${error}`));
|
|
666
555
|
return;
|
|
667
556
|
}
|
|
668
557
|
}
|
|
@@ -670,7 +559,7 @@ async function enhancedInitCommand(subArgs, flags) {
|
|
|
670
559
|
// Phase 3: Initialize with atomic operations
|
|
671
560
|
console.log('\n🔧 Phase 3: Atomic initialization...');
|
|
672
561
|
atomicOp = createAtomicOperation(rollbackSystem, 'enhanced-init');
|
|
673
|
-
|
|
562
|
+
|
|
674
563
|
const atomicBegin = await atomicOp.begin();
|
|
675
564
|
if (!atomicBegin) {
|
|
676
565
|
printError('Failed to begin atomic operation');
|
|
@@ -683,11 +572,11 @@ async function enhancedInitCommand(subArgs, flags) {
|
|
|
683
572
|
// Phase 4: Post-initialization validation
|
|
684
573
|
console.log('\n✅ Phase 4: Post-initialization validation...');
|
|
685
574
|
const postValidation = await validationSystem.validatePostInit();
|
|
686
|
-
|
|
575
|
+
|
|
687
576
|
if (!postValidation.success) {
|
|
688
577
|
printError('Post-initialization validation failed:');
|
|
689
|
-
postValidation.errors.forEach(error => console.error(` ❌ ${error}`));
|
|
690
|
-
|
|
578
|
+
postValidation.errors.forEach((error) => console.error(` ❌ ${error}`));
|
|
579
|
+
|
|
691
580
|
// Attempt automatic rollback
|
|
692
581
|
console.log('\n🔄 Attempting automatic rollback...');
|
|
693
582
|
await atomicOp.rollback();
|
|
@@ -698,39 +587,38 @@ async function enhancedInitCommand(subArgs, flags) {
|
|
|
698
587
|
// Phase 5: Configuration validation
|
|
699
588
|
console.log('\n🔧 Phase 5: Configuration validation...');
|
|
700
589
|
const configValidation = await validationSystem.validateConfiguration();
|
|
701
|
-
|
|
590
|
+
|
|
702
591
|
if (configValidation.warnings.length > 0) {
|
|
703
592
|
printWarning('Configuration warnings:');
|
|
704
|
-
configValidation.warnings.forEach(warning => console.warn(` ⚠️ ${warning}`));
|
|
593
|
+
configValidation.warnings.forEach((warning) => console.warn(` ⚠️ ${warning}`));
|
|
705
594
|
}
|
|
706
595
|
|
|
707
596
|
// Phase 6: Health checks
|
|
708
597
|
console.log('\n🏥 Phase 6: System health checks...');
|
|
709
598
|
const healthChecks = await validationSystem.runHealthChecks();
|
|
710
|
-
|
|
599
|
+
|
|
711
600
|
if (healthChecks.warnings.length > 0) {
|
|
712
601
|
printWarning('Health check warnings:');
|
|
713
|
-
healthChecks.warnings.forEach(warning => console.warn(` ⚠️ ${warning}`));
|
|
602
|
+
healthChecks.warnings.forEach((warning) => console.warn(` ⚠️ ${warning}`));
|
|
714
603
|
}
|
|
715
604
|
|
|
716
605
|
// Commit atomic operation
|
|
717
606
|
await atomicOp.commit();
|
|
718
|
-
|
|
607
|
+
|
|
719
608
|
// Generate and display validation report
|
|
720
|
-
const fullValidation = await runFullValidation(workingDir, {
|
|
609
|
+
const fullValidation = await runFullValidation(workingDir, {
|
|
721
610
|
postInit: true,
|
|
722
|
-
skipPreInit: options.skipPreValidation
|
|
611
|
+
skipPreInit: options.skipPreValidation,
|
|
723
612
|
});
|
|
724
|
-
|
|
613
|
+
|
|
725
614
|
console.log('\n📊 Validation Report:');
|
|
726
615
|
console.log(fullValidation.report);
|
|
727
616
|
|
|
728
617
|
printSuccess('🎉 Enhanced initialization completed successfully!');
|
|
729
618
|
console.log('\n✨ Your SPARC environment is fully validated and ready to use');
|
|
730
|
-
|
|
731
619
|
} catch (error) {
|
|
732
620
|
printError(`Enhanced initialization failed: ${error.message}`);
|
|
733
|
-
|
|
621
|
+
|
|
734
622
|
// Attempt rollback if atomic operation is active
|
|
735
623
|
if (atomicOp && !atomicOp.completed) {
|
|
736
624
|
console.log('\n🔄 Performing emergency rollback...');
|
|
@@ -749,29 +637,28 @@ async function enhancedInitCommand(subArgs, flags) {
|
|
|
749
637
|
*/
|
|
750
638
|
async function handleValidationCommand(subArgs, flags) {
|
|
751
639
|
const workingDir = Deno.env.get('PWD') || Deno.cwd();
|
|
752
|
-
|
|
640
|
+
|
|
753
641
|
console.log('🔍 Running validation checks...');
|
|
754
|
-
|
|
642
|
+
|
|
755
643
|
const options = {
|
|
756
644
|
skipPreInit: subArgs.includes('--skip-pre-init'),
|
|
757
645
|
skipConfig: subArgs.includes('--skip-config'),
|
|
758
646
|
skipModeTest: subArgs.includes('--skip-mode-test'),
|
|
759
|
-
postInit: !subArgs.includes('--pre-init-only')
|
|
647
|
+
postInit: !subArgs.includes('--pre-init-only'),
|
|
760
648
|
};
|
|
761
|
-
|
|
649
|
+
|
|
762
650
|
try {
|
|
763
651
|
const validationResults = await runFullValidation(workingDir, options);
|
|
764
|
-
|
|
652
|
+
|
|
765
653
|
console.log('\n📊 Validation Results:');
|
|
766
654
|
console.log(validationResults.report);
|
|
767
|
-
|
|
655
|
+
|
|
768
656
|
if (validationResults.success) {
|
|
769
657
|
printSuccess('✅ All validation checks passed');
|
|
770
658
|
} else {
|
|
771
659
|
printError('❌ Some validation checks failed');
|
|
772
660
|
process.exit(1);
|
|
773
661
|
}
|
|
774
|
-
|
|
775
662
|
} catch (error) {
|
|
776
663
|
printError(`Validation failed: ${error.message}`);
|
|
777
664
|
process.exit(1);
|
|
@@ -784,59 +671,59 @@ async function handleValidationCommand(subArgs, flags) {
|
|
|
784
671
|
async function handleRollbackCommand(subArgs, flags) {
|
|
785
672
|
const workingDir = Deno.env.get('PWD') || Deno.cwd();
|
|
786
673
|
const rollbackSystem = new RollbackSystem(workingDir);
|
|
787
|
-
|
|
674
|
+
|
|
788
675
|
try {
|
|
789
676
|
// Check for specific rollback options
|
|
790
677
|
if (subArgs.includes('--full')) {
|
|
791
678
|
console.log('🔄 Performing full rollback...');
|
|
792
679
|
const result = await rollbackSystem.performFullRollback();
|
|
793
|
-
|
|
680
|
+
|
|
794
681
|
if (result.success) {
|
|
795
682
|
printSuccess('Full rollback completed successfully');
|
|
796
683
|
} else {
|
|
797
684
|
printError('Full rollback failed:');
|
|
798
|
-
result.errors.forEach(error => console.error(` ❌ ${error}`));
|
|
685
|
+
result.errors.forEach((error) => console.error(` ❌ ${error}`));
|
|
799
686
|
}
|
|
800
|
-
|
|
801
687
|
} else if (subArgs.includes('--partial')) {
|
|
802
|
-
const phaseIndex = subArgs.findIndex(arg => arg === '--phase');
|
|
688
|
+
const phaseIndex = subArgs.findIndex((arg) => arg === '--phase');
|
|
803
689
|
if (phaseIndex !== -1 && subArgs[phaseIndex + 1]) {
|
|
804
690
|
const phase = subArgs[phaseIndex + 1];
|
|
805
691
|
console.log(`🔄 Performing partial rollback for phase: ${phase}`);
|
|
806
|
-
|
|
692
|
+
|
|
807
693
|
const result = await rollbackSystem.performPartialRollback(phase);
|
|
808
|
-
|
|
694
|
+
|
|
809
695
|
if (result.success) {
|
|
810
696
|
printSuccess(`Partial rollback completed for phase: ${phase}`);
|
|
811
697
|
} else {
|
|
812
698
|
printError(`Partial rollback failed for phase: ${phase}`);
|
|
813
|
-
result.errors.forEach(error => console.error(` ❌ ${error}`));
|
|
699
|
+
result.errors.forEach((error) => console.error(` ❌ ${error}`));
|
|
814
700
|
}
|
|
815
701
|
} else {
|
|
816
702
|
printError('Partial rollback requires --phase <phase-name>');
|
|
817
703
|
}
|
|
818
|
-
|
|
819
704
|
} else {
|
|
820
705
|
// Interactive rollback point selection
|
|
821
706
|
const rollbackPoints = await rollbackSystem.listRollbackPoints();
|
|
822
|
-
|
|
707
|
+
|
|
823
708
|
if (rollbackPoints.rollbackPoints.length === 0) {
|
|
824
709
|
printWarning('No rollback points available');
|
|
825
710
|
return;
|
|
826
711
|
}
|
|
827
|
-
|
|
712
|
+
|
|
828
713
|
console.log('\n📋 Available rollback points:');
|
|
829
714
|
rollbackPoints.rollbackPoints.forEach((point, index) => {
|
|
830
715
|
const date = new Date(point.timestamp).toLocaleString();
|
|
831
716
|
console.log(` ${index + 1}. ${point.type} - ${date}`);
|
|
832
717
|
});
|
|
833
|
-
|
|
718
|
+
|
|
834
719
|
// For now, rollback to the most recent point
|
|
835
720
|
const latest = rollbackPoints.rollbackPoints[0];
|
|
836
721
|
if (latest) {
|
|
837
|
-
console.log(
|
|
722
|
+
console.log(
|
|
723
|
+
`\n🔄 Rolling back to: ${latest.type} (${new Date(latest.timestamp).toLocaleString()})`,
|
|
724
|
+
);
|
|
838
725
|
const result = await rollbackSystem.performFullRollback(latest.backupId);
|
|
839
|
-
|
|
726
|
+
|
|
840
727
|
if (result.success) {
|
|
841
728
|
printSuccess('Rollback completed successfully');
|
|
842
729
|
} else {
|
|
@@ -844,7 +731,6 @@ async function handleRollbackCommand(subArgs, flags) {
|
|
|
844
731
|
}
|
|
845
732
|
}
|
|
846
733
|
}
|
|
847
|
-
|
|
848
734
|
} catch (error) {
|
|
849
735
|
printError(`Rollback operation failed: ${error.message}`);
|
|
850
736
|
}
|
|
@@ -856,12 +742,12 @@ async function handleRollbackCommand(subArgs, flags) {
|
|
|
856
742
|
async function handleListBackups(subArgs, flags) {
|
|
857
743
|
const workingDir = Deno.env.get('PWD') || Deno.cwd();
|
|
858
744
|
const rollbackSystem = new RollbackSystem(workingDir);
|
|
859
|
-
|
|
745
|
+
|
|
860
746
|
try {
|
|
861
747
|
const rollbackPoints = await rollbackSystem.listRollbackPoints();
|
|
862
|
-
|
|
748
|
+
|
|
863
749
|
console.log('\n📋 Rollback Points and Backups:');
|
|
864
|
-
|
|
750
|
+
|
|
865
751
|
if (rollbackPoints.rollbackPoints.length === 0) {
|
|
866
752
|
console.log(' No rollback points available');
|
|
867
753
|
} else {
|
|
@@ -871,7 +757,7 @@ async function handleListBackups(subArgs, flags) {
|
|
|
871
757
|
console.log(` ${index + 1}. ${point.type} - ${date} (${point.backupId || 'No backup'})`);
|
|
872
758
|
});
|
|
873
759
|
}
|
|
874
|
-
|
|
760
|
+
|
|
875
761
|
if (rollbackPoints.checkpoints.length > 0) {
|
|
876
762
|
console.log('\n📍 Checkpoints:');
|
|
877
763
|
rollbackPoints.checkpoints.slice(-5).forEach((checkpoint, index) => {
|
|
@@ -879,7 +765,6 @@ async function handleListBackups(subArgs, flags) {
|
|
|
879
765
|
console.log(` ${index + 1}. ${checkpoint.phase} - ${date} (${checkpoint.status})`);
|
|
880
766
|
});
|
|
881
767
|
}
|
|
882
|
-
|
|
883
768
|
} catch (error) {
|
|
884
769
|
printError(`Failed to list backups: ${error.message}`);
|
|
885
770
|
}
|
|
@@ -888,31 +773,36 @@ async function handleListBackups(subArgs, flags) {
|
|
|
888
773
|
/**
|
|
889
774
|
* Perform initialization with checkpoints
|
|
890
775
|
*/
|
|
891
|
-
async function performInitializationWithCheckpoints(
|
|
776
|
+
async function performInitializationWithCheckpoints(
|
|
777
|
+
rollbackSystem,
|
|
778
|
+
options,
|
|
779
|
+
workingDir,
|
|
780
|
+
dryRun = false,
|
|
781
|
+
) {
|
|
892
782
|
const phases = [
|
|
893
783
|
{ name: 'file-creation', action: () => createInitialFiles(options, workingDir, dryRun) },
|
|
894
784
|
{ name: 'directory-structure', action: () => createDirectoryStructure(workingDir, dryRun) },
|
|
895
785
|
{ name: 'memory-setup', action: () => setupMemorySystem(workingDir, dryRun) },
|
|
896
786
|
{ name: 'coordination-setup', action: () => setupCoordinationSystem(workingDir, dryRun) },
|
|
897
|
-
{ name: 'executable-creation', action: () => createLocalExecutable(workingDir, dryRun) }
|
|
787
|
+
{ name: 'executable-creation', action: () => createLocalExecutable(workingDir, dryRun) },
|
|
898
788
|
];
|
|
899
|
-
|
|
789
|
+
|
|
900
790
|
if (options.sparc) {
|
|
901
791
|
phases.push(
|
|
902
792
|
{ name: 'sparc-init', action: () => createSparcStructureManually() },
|
|
903
|
-
{ name: 'claude-commands', action: () => createClaudeSlashCommands(workingDir) }
|
|
793
|
+
{ name: 'claude-commands', action: () => createClaudeSlashCommands(workingDir) },
|
|
904
794
|
);
|
|
905
795
|
}
|
|
906
|
-
|
|
796
|
+
|
|
907
797
|
for (const phase of phases) {
|
|
908
798
|
console.log(` 🔧 ${phase.name}...`);
|
|
909
|
-
|
|
799
|
+
|
|
910
800
|
// Create checkpoint before phase
|
|
911
801
|
await rollbackSystem.createCheckpoint(phase.name, {
|
|
912
802
|
timestamp: Date.now(),
|
|
913
|
-
phase: phase.name
|
|
803
|
+
phase: phase.name,
|
|
914
804
|
});
|
|
915
|
-
|
|
805
|
+
|
|
916
806
|
try {
|
|
917
807
|
await phase.action();
|
|
918
808
|
console.log(` ✅ ${phase.name} completed`);
|
|
@@ -926,25 +816,37 @@ async function performInitializationWithCheckpoints(rollbackSystem, options, wor
|
|
|
926
816
|
// Helper functions for atomic initialization
|
|
927
817
|
async function createInitialFiles(options, workingDir, dryRun = false) {
|
|
928
818
|
if (!dryRun) {
|
|
929
|
-
const claudeMd = options.sparc
|
|
930
|
-
|
|
819
|
+
const claudeMd = options.sparc
|
|
820
|
+
? createSparcClaudeMd()
|
|
821
|
+
: options.minimal
|
|
822
|
+
? createMinimalClaudeMd()
|
|
823
|
+
: createFullClaudeMd();
|
|
931
824
|
await Deno.writeTextFile(`${workingDir}/CLAUDE.md`, claudeMd);
|
|
932
825
|
|
|
933
826
|
const memoryBankMd = options.minimal ? createMinimalMemoryBankMd() : createFullMemoryBankMd();
|
|
934
827
|
await Deno.writeTextFile(`${workingDir}/memory-bank.md`, memoryBankMd);
|
|
935
828
|
|
|
936
|
-
const coordinationMd = options.minimal
|
|
829
|
+
const coordinationMd = options.minimal
|
|
830
|
+
? createMinimalCoordinationMd()
|
|
831
|
+
: createFullCoordinationMd();
|
|
937
832
|
await Deno.writeTextFile(`${workingDir}/coordination.md`, coordinationMd);
|
|
938
833
|
}
|
|
939
834
|
}
|
|
940
835
|
|
|
941
836
|
async function createDirectoryStructure(workingDir, dryRun = false) {
|
|
942
837
|
const directories = [
|
|
943
|
-
'memory',
|
|
944
|
-
'
|
|
945
|
-
'
|
|
838
|
+
'memory',
|
|
839
|
+
'memory/agents',
|
|
840
|
+
'memory/sessions',
|
|
841
|
+
'coordination',
|
|
842
|
+
'coordination/memory_bank',
|
|
843
|
+
'coordination/subtasks',
|
|
844
|
+
'coordination/orchestration',
|
|
845
|
+
'.claude',
|
|
846
|
+
'.claude/commands',
|
|
847
|
+
'.claude/logs',
|
|
946
848
|
];
|
|
947
|
-
|
|
849
|
+
|
|
948
850
|
if (!dryRun) {
|
|
949
851
|
for (const dir of directories) {
|
|
950
852
|
await Deno.mkdir(`${workingDir}/${dir}`, { recursive: true });
|
|
@@ -955,8 +857,11 @@ async function createDirectoryStructure(workingDir, dryRun = false) {
|
|
|
955
857
|
async function setupMemorySystem(workingDir, dryRun = false) {
|
|
956
858
|
if (!dryRun) {
|
|
957
859
|
const initialData = { agents: [], tasks: [], lastUpdated: Date.now() };
|
|
958
|
-
await Deno.writeTextFile(
|
|
959
|
-
|
|
860
|
+
await Deno.writeTextFile(
|
|
861
|
+
`${workingDir}/memory/claude-flow-data.json`,
|
|
862
|
+
JSON.stringify(initialData, null, 2),
|
|
863
|
+
);
|
|
864
|
+
|
|
960
865
|
await Deno.writeTextFile(`${workingDir}/memory/agents/README.md`, createAgentsReadme());
|
|
961
866
|
await Deno.writeTextFile(`${workingDir}/memory/sessions/README.md`, createSessionsReadme());
|
|
962
867
|
}
|
|
@@ -972,36 +877,41 @@ async function setupCoordinationSystem(workingDir, dryRun = false) {
|
|
|
972
877
|
*/
|
|
973
878
|
async function enhancedClaudeFlowInit(flags, subArgs = []) {
|
|
974
879
|
console.log('🚀 Initializing Claude Flow v2.0.0 with enhanced features...');
|
|
975
|
-
|
|
880
|
+
|
|
976
881
|
const workingDir = process.cwd();
|
|
977
882
|
const force = flags.force || flags.f;
|
|
978
883
|
const dryRun = flags.dryRun || flags['dry-run'] || flags.d;
|
|
979
|
-
|
|
884
|
+
|
|
980
885
|
// Store parameters to avoid scope issues in async context
|
|
981
886
|
const args = subArgs || [];
|
|
982
887
|
const options = flags || {};
|
|
983
|
-
|
|
888
|
+
|
|
984
889
|
// Import fs module for Node.js
|
|
985
890
|
const fs = await import('fs/promises');
|
|
986
891
|
const { chmod } = fs;
|
|
987
|
-
|
|
892
|
+
|
|
988
893
|
try {
|
|
989
894
|
// Check existing files
|
|
990
895
|
const existingFiles = [];
|
|
991
|
-
const filesToCheck = [
|
|
992
|
-
|
|
896
|
+
const filesToCheck = [
|
|
897
|
+
'CLAUDE.md',
|
|
898
|
+
'.claude/settings.json',
|
|
899
|
+
'.mcp.json',
|
|
900
|
+
'claude-flow.config.json',
|
|
901
|
+
];
|
|
902
|
+
|
|
993
903
|
for (const file of filesToCheck) {
|
|
994
904
|
if (existsSync(`${workingDir}/${file}`)) {
|
|
995
905
|
existingFiles.push(file);
|
|
996
906
|
}
|
|
997
907
|
}
|
|
998
|
-
|
|
908
|
+
|
|
999
909
|
if (existingFiles.length > 0 && !force) {
|
|
1000
910
|
printWarning(`The following files already exist: ${existingFiles.join(', ')}`);
|
|
1001
911
|
console.log('Use --force to overwrite existing files');
|
|
1002
912
|
return;
|
|
1003
913
|
}
|
|
1004
|
-
|
|
914
|
+
|
|
1005
915
|
// Create CLAUDE.md
|
|
1006
916
|
if (!dryRun) {
|
|
1007
917
|
await Deno.writeTextFile(`${workingDir}/CLAUDE.md`, createEnhancedClaudeMd());
|
|
@@ -1009,7 +919,7 @@ async function enhancedClaudeFlowInit(flags, subArgs = []) {
|
|
|
1009
919
|
} else {
|
|
1010
920
|
console.log('[DRY RUN] Would create CLAUDE.md (Claude Flow v2.0.0)');
|
|
1011
921
|
}
|
|
1012
|
-
|
|
922
|
+
|
|
1013
923
|
// Create .claude directory structure
|
|
1014
924
|
const claudeDir = `${workingDir}/.claude`;
|
|
1015
925
|
if (!dryRun) {
|
|
@@ -1020,7 +930,7 @@ async function enhancedClaudeFlowInit(flags, subArgs = []) {
|
|
|
1020
930
|
} else {
|
|
1021
931
|
console.log('[DRY RUN] Would create .claude directory structure');
|
|
1022
932
|
}
|
|
1023
|
-
|
|
933
|
+
|
|
1024
934
|
// Create settings.json
|
|
1025
935
|
if (!dryRun) {
|
|
1026
936
|
await Deno.writeTextFile(`${claudeDir}/settings.json`, createEnhancedSettingsJson());
|
|
@@ -1028,84 +938,89 @@ async function enhancedClaudeFlowInit(flags, subArgs = []) {
|
|
|
1028
938
|
} else {
|
|
1029
939
|
console.log('[DRY RUN] Would create .claude/settings.json');
|
|
1030
940
|
}
|
|
1031
|
-
|
|
941
|
+
|
|
1032
942
|
// Create settings.local.json with default MCP permissions
|
|
1033
943
|
const settingsLocal = {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
],
|
|
1039
|
-
"deny": []
|
|
1040
|
-
}
|
|
944
|
+
permissions: {
|
|
945
|
+
allow: ['mcp__ruv-swarm', 'mcp__claude-flow'],
|
|
946
|
+
deny: [],
|
|
947
|
+
},
|
|
1041
948
|
};
|
|
1042
|
-
|
|
949
|
+
|
|
1043
950
|
if (!dryRun) {
|
|
1044
|
-
await Deno.writeTextFile(
|
|
951
|
+
await Deno.writeTextFile(
|
|
952
|
+
`${claudeDir}/settings.local.json`,
|
|
953
|
+
JSON.stringify(settingsLocal, null, 2),
|
|
954
|
+
);
|
|
1045
955
|
printSuccess('✓ Created .claude/settings.local.json with default MCP permissions');
|
|
1046
956
|
} else {
|
|
1047
|
-
console.log(
|
|
957
|
+
console.log(
|
|
958
|
+
'[DRY RUN] Would create .claude/settings.local.json with default MCP permissions',
|
|
959
|
+
);
|
|
1048
960
|
}
|
|
1049
|
-
|
|
961
|
+
|
|
1050
962
|
// Create .mcp.json at project root for MCP server configuration
|
|
1051
963
|
const mcpConfig = {
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
964
|
+
mcpServers: {
|
|
965
|
+
'claude-flow': {
|
|
966
|
+
command: 'npx',
|
|
967
|
+
args: ['claude-flow@alpha', 'mcp', 'start'],
|
|
968
|
+
type: 'stdio',
|
|
1057
969
|
},
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
970
|
+
'ruv-swarm': {
|
|
971
|
+
command: 'npx',
|
|
972
|
+
args: ['ruv-swarm@latest', 'mcp', 'start'],
|
|
973
|
+
type: 'stdio',
|
|
974
|
+
},
|
|
975
|
+
},
|
|
1064
976
|
};
|
|
1065
|
-
|
|
977
|
+
|
|
1066
978
|
if (!dryRun) {
|
|
1067
979
|
await Deno.writeTextFile(`${workingDir}/.mcp.json`, JSON.stringify(mcpConfig, null, 2));
|
|
1068
980
|
printSuccess('✓ Created .mcp.json at project root for MCP server configuration');
|
|
1069
981
|
} else {
|
|
1070
982
|
console.log('[DRY RUN] Would create .mcp.json at project root for MCP server configuration');
|
|
1071
983
|
}
|
|
1072
|
-
|
|
984
|
+
|
|
1073
985
|
// Create claude-flow.config.json for Claude Flow specific settings
|
|
1074
986
|
const claudeFlowConfig = {
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
987
|
+
features: {
|
|
988
|
+
autoTopologySelection: true,
|
|
989
|
+
parallelExecution: true,
|
|
990
|
+
neuralTraining: true,
|
|
991
|
+
bottleneckAnalysis: true,
|
|
992
|
+
smartAutoSpawning: true,
|
|
993
|
+
selfHealingWorkflows: true,
|
|
994
|
+
crossSessionMemory: true,
|
|
995
|
+
githubIntegration: true,
|
|
996
|
+
},
|
|
997
|
+
performance: {
|
|
998
|
+
maxAgents: 10,
|
|
999
|
+
defaultTopology: 'hierarchical',
|
|
1000
|
+
executionStrategy: 'parallel',
|
|
1001
|
+
tokenOptimization: true,
|
|
1002
|
+
cacheEnabled: true,
|
|
1003
|
+
telemetryLevel: 'detailed',
|
|
1084
1004
|
},
|
|
1085
|
-
"performance": {
|
|
1086
|
-
"maxAgents": 10,
|
|
1087
|
-
"defaultTopology": "hierarchical",
|
|
1088
|
-
"executionStrategy": "parallel",
|
|
1089
|
-
"tokenOptimization": true,
|
|
1090
|
-
"cacheEnabled": true,
|
|
1091
|
-
"telemetryLevel": "detailed"
|
|
1092
|
-
}
|
|
1093
1005
|
};
|
|
1094
|
-
|
|
1006
|
+
|
|
1095
1007
|
if (!dryRun) {
|
|
1096
|
-
await Deno.writeTextFile(
|
|
1008
|
+
await Deno.writeTextFile(
|
|
1009
|
+
`${workingDir}/claude-flow.config.json`,
|
|
1010
|
+
JSON.stringify(claudeFlowConfig, null, 2),
|
|
1011
|
+
);
|
|
1097
1012
|
printSuccess('✓ Created claude-flow.config.json for Claude Flow settings');
|
|
1098
1013
|
} else {
|
|
1099
1014
|
console.log('[DRY RUN] Would create claude-flow.config.json for Claude Flow settings');
|
|
1100
1015
|
}
|
|
1101
|
-
|
|
1016
|
+
|
|
1102
1017
|
// Create command documentation
|
|
1103
1018
|
for (const [category, commands] of Object.entries(COMMAND_STRUCTURE)) {
|
|
1104
1019
|
const categoryDir = `${claudeDir}/commands/${category}`;
|
|
1105
|
-
|
|
1020
|
+
|
|
1106
1021
|
if (!dryRun) {
|
|
1107
1022
|
await Deno.mkdir(categoryDir, { recursive: true });
|
|
1108
|
-
|
|
1023
|
+
|
|
1109
1024
|
// Create category README
|
|
1110
1025
|
const categoryReadme = `# ${category.charAt(0).toUpperCase() + category.slice(1)} Commands
|
|
1111
1026
|
|
|
@@ -1113,10 +1028,10 @@ Commands for ${category} operations in Claude Flow.
|
|
|
1113
1028
|
|
|
1114
1029
|
## Available Commands
|
|
1115
1030
|
|
|
1116
|
-
${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
1031
|
+
${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
1117
1032
|
`;
|
|
1118
1033
|
await Deno.writeTextFile(`${categoryDir}/README.md`, categoryReadme);
|
|
1119
|
-
|
|
1034
|
+
|
|
1120
1035
|
// Create individual command docs
|
|
1121
1036
|
for (const command of commands) {
|
|
1122
1037
|
const doc = createCommandDoc(category, command);
|
|
@@ -1124,31 +1039,31 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1124
1039
|
await Deno.writeTextFile(`${categoryDir}/${command}.md`, doc);
|
|
1125
1040
|
}
|
|
1126
1041
|
}
|
|
1127
|
-
|
|
1042
|
+
|
|
1128
1043
|
console.log(` ✓ Created ${commands.length} ${category} command docs`);
|
|
1129
1044
|
} else {
|
|
1130
1045
|
console.log(`[DRY RUN] Would create ${commands.length} ${category} command docs`);
|
|
1131
1046
|
}
|
|
1132
1047
|
}
|
|
1133
|
-
|
|
1048
|
+
|
|
1134
1049
|
// Create wrapper scripts
|
|
1135
1050
|
if (!dryRun) {
|
|
1136
1051
|
// Unix wrapper - now uses universal ES module compatible wrapper
|
|
1137
1052
|
const unixWrapper = createWrapperScript('unix');
|
|
1138
1053
|
await Deno.writeTextFile(`${workingDir}/claude-flow`, unixWrapper);
|
|
1139
1054
|
await fs.chmod(`${workingDir}/claude-flow`, 0o755);
|
|
1140
|
-
|
|
1055
|
+
|
|
1141
1056
|
// Windows wrapper
|
|
1142
1057
|
await Deno.writeTextFile(`${workingDir}/claude-flow.bat`, createWrapperScript('windows'));
|
|
1143
|
-
|
|
1058
|
+
|
|
1144
1059
|
// PowerShell wrapper
|
|
1145
1060
|
await Deno.writeTextFile(`${workingDir}/claude-flow.ps1`, createWrapperScript('powershell'));
|
|
1146
|
-
|
|
1061
|
+
|
|
1147
1062
|
printSuccess('✓ Created platform-specific wrapper scripts');
|
|
1148
1063
|
} else {
|
|
1149
1064
|
console.log('[DRY RUN] Would create wrapper scripts');
|
|
1150
1065
|
}
|
|
1151
|
-
|
|
1066
|
+
|
|
1152
1067
|
// Create helper scripts
|
|
1153
1068
|
const helpers = ['setup-mcp.sh', 'quick-start.sh', 'github-setup.sh'];
|
|
1154
1069
|
for (const helper of helpers) {
|
|
@@ -1160,65 +1075,149 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1160
1075
|
}
|
|
1161
1076
|
}
|
|
1162
1077
|
}
|
|
1163
|
-
|
|
1078
|
+
|
|
1164
1079
|
if (!dryRun) {
|
|
1165
1080
|
printSuccess(`✓ Created ${helpers.length} helper scripts`);
|
|
1166
1081
|
} else {
|
|
1167
1082
|
console.log(`[DRY RUN] Would create ${helpers.length} helper scripts`);
|
|
1168
1083
|
}
|
|
1169
|
-
|
|
1084
|
+
|
|
1170
1085
|
// Create standard directories from original init
|
|
1171
1086
|
const standardDirs = [
|
|
1172
1087
|
'memory',
|
|
1173
|
-
'memory/agents',
|
|
1088
|
+
'memory/agents',
|
|
1174
1089
|
'memory/sessions',
|
|
1175
1090
|
'coordination',
|
|
1176
1091
|
'coordination/memory_bank',
|
|
1177
1092
|
'coordination/subtasks',
|
|
1178
1093
|
'coordination/orchestration',
|
|
1179
|
-
'.swarm'
|
|
1094
|
+
'.swarm', // Add .swarm directory for shared memory
|
|
1095
|
+
'.hive-mind', // Add .hive-mind directory for hive-mind system
|
|
1180
1096
|
];
|
|
1181
|
-
|
|
1097
|
+
|
|
1182
1098
|
for (const dir of standardDirs) {
|
|
1183
1099
|
if (!dryRun) {
|
|
1184
1100
|
await fs.mkdir(`${workingDir}/${dir}`, { recursive: true });
|
|
1185
1101
|
}
|
|
1186
1102
|
}
|
|
1187
|
-
|
|
1103
|
+
|
|
1188
1104
|
if (!dryRun) {
|
|
1189
1105
|
printSuccess('✓ Created standard directory structure');
|
|
1190
|
-
|
|
1106
|
+
|
|
1191
1107
|
// Initialize memory system
|
|
1192
1108
|
const initialData = { agents: [], tasks: [], lastUpdated: Date.now() };
|
|
1193
|
-
await fs.writeFile(
|
|
1194
|
-
|
|
1109
|
+
await fs.writeFile(
|
|
1110
|
+
`${workingDir}/memory/claude-flow-data.json`,
|
|
1111
|
+
JSON.stringify(initialData, null, 2),
|
|
1112
|
+
);
|
|
1113
|
+
|
|
1195
1114
|
// Create README files
|
|
1196
1115
|
await fs.writeFile(`${workingDir}/memory/agents/README.md`, createAgentsReadme());
|
|
1197
1116
|
await fs.writeFile(`${workingDir}/memory/sessions/README.md`, createSessionsReadme());
|
|
1198
|
-
|
|
1117
|
+
|
|
1199
1118
|
printSuccess('✓ Initialized memory system');
|
|
1200
|
-
|
|
1119
|
+
|
|
1201
1120
|
// Initialize memory database with fallback support
|
|
1202
1121
|
try {
|
|
1203
1122
|
// Import and initialize FallbackMemoryStore to create the database
|
|
1204
1123
|
const { FallbackMemoryStore } = await import('../../../memory/fallback-store.js');
|
|
1205
1124
|
const memoryStore = new FallbackMemoryStore();
|
|
1206
1125
|
await memoryStore.initialize();
|
|
1207
|
-
|
|
1126
|
+
|
|
1208
1127
|
if (memoryStore.isUsingFallback()) {
|
|
1209
1128
|
printSuccess('✓ Initialized memory system (in-memory fallback for npx compatibility)');
|
|
1210
|
-
console.log(
|
|
1129
|
+
console.log(
|
|
1130
|
+
' 💡 For persistent storage, install locally: npm install claude-flow@alpha',
|
|
1131
|
+
);
|
|
1211
1132
|
} else {
|
|
1212
1133
|
printSuccess('✓ Initialized memory database (.swarm/memory.db)');
|
|
1213
1134
|
}
|
|
1214
|
-
|
|
1135
|
+
|
|
1215
1136
|
memoryStore.close();
|
|
1216
1137
|
} catch (err) {
|
|
1217
1138
|
console.log(` ⚠️ Could not initialize memory system: ${err.message}`);
|
|
1218
1139
|
console.log(' Memory will be initialized on first use');
|
|
1219
1140
|
}
|
|
1141
|
+
|
|
1142
|
+
// Initialize hive-mind configuration
|
|
1143
|
+
try {
|
|
1144
|
+
const hiveMindConfig = {
|
|
1145
|
+
version: '2.0.0',
|
|
1146
|
+
initialized: new Date().toISOString(),
|
|
1147
|
+
defaults: {
|
|
1148
|
+
queenType: 'strategic',
|
|
1149
|
+
maxWorkers: 8,
|
|
1150
|
+
consensusAlgorithm: 'majority',
|
|
1151
|
+
memorySize: 100,
|
|
1152
|
+
autoScale: true,
|
|
1153
|
+
encryption: false,
|
|
1154
|
+
},
|
|
1155
|
+
mcpTools: {
|
|
1156
|
+
enabled: true,
|
|
1157
|
+
parallel: true,
|
|
1158
|
+
timeout: 60000,
|
|
1159
|
+
},
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
await fs.writeFile(
|
|
1163
|
+
`${workingDir}/.hive-mind/config.json`,
|
|
1164
|
+
JSON.stringify(hiveMindConfig, null, 2),
|
|
1165
|
+
);
|
|
1166
|
+
|
|
1167
|
+
// Initialize hive.db
|
|
1168
|
+
try {
|
|
1169
|
+
const Database = (await import('better-sqlite3')).default;
|
|
1170
|
+
const hivePath = `${workingDir}/.hive-mind/hive.db`;
|
|
1171
|
+
const hiveDb = new Database(hivePath);
|
|
1172
|
+
|
|
1173
|
+
// Create initial tables
|
|
1174
|
+
hiveDb.exec(`
|
|
1175
|
+
CREATE TABLE IF NOT EXISTS swarms (
|
|
1176
|
+
id TEXT PRIMARY KEY,
|
|
1177
|
+
name TEXT NOT NULL,
|
|
1178
|
+
objective TEXT,
|
|
1179
|
+
status TEXT DEFAULT 'active',
|
|
1180
|
+
queen_type TEXT DEFAULT 'strategic',
|
|
1181
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
1182
|
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
1183
|
+
);
|
|
1184
|
+
|
|
1185
|
+
CREATE TABLE IF NOT EXISTS agents (
|
|
1186
|
+
id TEXT PRIMARY KEY,
|
|
1187
|
+
swarm_id TEXT,
|
|
1188
|
+
name TEXT NOT NULL,
|
|
1189
|
+
type TEXT NOT NULL,
|
|
1190
|
+
capabilities TEXT,
|
|
1191
|
+
status TEXT DEFAULT 'active',
|
|
1192
|
+
performance_score REAL DEFAULT 0.5,
|
|
1193
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
1194
|
+
FOREIGN KEY (swarm_id) REFERENCES swarms (id)
|
|
1195
|
+
);
|
|
1196
|
+
|
|
1197
|
+
CREATE TABLE IF NOT EXISTS messages (
|
|
1198
|
+
id TEXT PRIMARY KEY,
|
|
1199
|
+
swarm_id TEXT,
|
|
1200
|
+
agent_id TEXT,
|
|
1201
|
+
content TEXT NOT NULL,
|
|
1202
|
+
type TEXT DEFAULT 'task',
|
|
1203
|
+
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
1204
|
+
FOREIGN KEY (swarm_id) REFERENCES swarms (id),
|
|
1205
|
+
FOREIGN KEY (agent_id) REFERENCES agents (id)
|
|
1206
|
+
);
|
|
1207
|
+
`);
|
|
1208
|
+
|
|
1209
|
+
hiveDb.close();
|
|
1210
|
+
printSuccess('✓ Initialized hive-mind database (.hive-mind/hive.db)');
|
|
1211
|
+
} catch (dbErr) {
|
|
1212
|
+
console.log(` ⚠️ Could not initialize hive-mind database: ${dbErr.message}`);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
printSuccess('✓ Initialized hive-mind system');
|
|
1216
|
+
} catch (err) {
|
|
1217
|
+
console.log(` ⚠️ Could not initialize hive-mind system: ${err.message}`);
|
|
1218
|
+
}
|
|
1220
1219
|
}
|
|
1221
|
-
|
|
1220
|
+
|
|
1222
1221
|
// Update .gitignore with Claude Flow entries
|
|
1223
1222
|
const gitignoreResult = await updateGitignore(workingDir, force, dryRun);
|
|
1224
1223
|
if (gitignoreResult.success) {
|
|
@@ -1230,12 +1229,37 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1230
1229
|
} else {
|
|
1231
1230
|
console.log(` ⚠️ ${gitignoreResult.message}`);
|
|
1232
1231
|
}
|
|
1233
|
-
|
|
1232
|
+
|
|
1233
|
+
// SPARC initialization (now included by default)
|
|
1234
|
+
console.log('\n🚀 Initializing SPARC development environment...');
|
|
1235
|
+
let sparcInitialized = false;
|
|
1236
|
+
try {
|
|
1237
|
+
// Run create-sparc
|
|
1238
|
+
console.log(' 🔄 Running: npx -y create-sparc init --force');
|
|
1239
|
+
execSync('npx -y create-sparc init --force', {
|
|
1240
|
+
cwd: workingDir,
|
|
1241
|
+
stdio: 'inherit',
|
|
1242
|
+
});
|
|
1243
|
+
sparcInitialized = true;
|
|
1244
|
+
printSuccess('✅ SPARC environment initialized successfully');
|
|
1245
|
+
} catch (err) {
|
|
1246
|
+
console.log(` ⚠️ Could not run create-sparc: ${err.message}`);
|
|
1247
|
+
console.log(' SPARC features will be limited to basic functionality');
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
// Create Claude slash commands for SPARC
|
|
1251
|
+
if (sparcInitialized && !dryRun) {
|
|
1252
|
+
console.log('\n📝 Creating Claude Code slash commands...');
|
|
1253
|
+
await createClaudeSlashCommands(workingDir);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1234
1256
|
// Check for Claude Code and set up MCP servers (always enabled by default)
|
|
1235
1257
|
if (!dryRun && isClaudeCodeInstalled()) {
|
|
1236
1258
|
console.log('\n🔍 Claude Code CLI detected!');
|
|
1237
|
-
const skipMcp =
|
|
1238
|
-
|
|
1259
|
+
const skipMcp =
|
|
1260
|
+
(options && options['skip-mcp']) ||
|
|
1261
|
+
(subArgs && subArgs.includes && subArgs.includes('--skip-mcp'));
|
|
1262
|
+
|
|
1239
1263
|
if (!skipMcp) {
|
|
1240
1264
|
await setupMcpServers(dryRun);
|
|
1241
1265
|
} else {
|
|
@@ -1254,7 +1278,7 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1254
1278
|
console.log(' claude mcp add ruv-swarm npx ruv-swarm@latest mcp start');
|
|
1255
1279
|
console.log('\n 💡 MCP servers are defined in .mcp.json (project scope)');
|
|
1256
1280
|
}
|
|
1257
|
-
|
|
1281
|
+
|
|
1258
1282
|
// Final instructions
|
|
1259
1283
|
console.log('\n🎉 Claude Flow v2.0.0 initialization complete!');
|
|
1260
1284
|
console.log('\n📚 Quick Start:');
|
|
@@ -1272,8 +1296,7 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1272
1296
|
console.log('• Check .claude/commands/ for detailed documentation');
|
|
1273
1297
|
console.log('• Use --help with any command for options');
|
|
1274
1298
|
console.log('• Enable GitHub integration with .claude/helpers/github-setup.sh');
|
|
1275
|
-
|
|
1276
1299
|
} catch (err) {
|
|
1277
1300
|
printError(`Failed to initialize Claude Flow v2.0.0: ${err.message}`);
|
|
1278
1301
|
}
|
|
1279
|
-
}
|
|
1302
|
+
}
|