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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getErrorMessage } from '../utils/error-handler.js';
|
|
2
1
|
import { EventEmitter } from 'events';
|
|
3
2
|
import { writeFile, readFile, mkdir, readdir } from 'fs/promises';
|
|
4
3
|
import { join } from 'path';
|
|
@@ -273,16 +272,22 @@ export interface DeploymentMetrics {
|
|
|
273
272
|
meanTimeToRecovery: number;
|
|
274
273
|
changeFailureRate: number;
|
|
275
274
|
leadTime: number;
|
|
276
|
-
environmentMetrics: Record<
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
275
|
+
environmentMetrics: Record<
|
|
276
|
+
string,
|
|
277
|
+
{
|
|
278
|
+
deployments: number;
|
|
279
|
+
successRate: number;
|
|
280
|
+
averageTime: number;
|
|
281
|
+
}
|
|
282
|
+
>;
|
|
283
|
+
strategyMetrics: Record<
|
|
284
|
+
string,
|
|
285
|
+
{
|
|
286
|
+
deployments: number;
|
|
287
|
+
successRate: number;
|
|
288
|
+
rollbackRate: number;
|
|
289
|
+
}
|
|
290
|
+
>;
|
|
286
291
|
}
|
|
287
292
|
|
|
288
293
|
export class DeploymentManager extends EventEmitter {
|
|
@@ -295,11 +300,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
295
300
|
private logger: Logger;
|
|
296
301
|
private config: ConfigManager;
|
|
297
302
|
|
|
298
|
-
constructor(
|
|
299
|
-
deploymentsPath: string = './deployments',
|
|
300
|
-
logger?: Logger,
|
|
301
|
-
config?: ConfigManager
|
|
302
|
-
) {
|
|
303
|
+
constructor(deploymentsPath: string = './deployments', logger?: Logger, config?: ConfigManager) {
|
|
303
304
|
super();
|
|
304
305
|
this.deploymentsPath = deploymentsPath;
|
|
305
306
|
this.logger = logger || new Logger({ level: 'info', format: 'text', destination: 'console' });
|
|
@@ -312,10 +313,10 @@ export class DeploymentManager extends EventEmitter {
|
|
|
312
313
|
await mkdir(join(this.deploymentsPath, 'environments'), { recursive: true });
|
|
313
314
|
await mkdir(join(this.deploymentsPath, 'strategies'), { recursive: true });
|
|
314
315
|
await mkdir(join(this.deploymentsPath, 'pipelines'), { recursive: true });
|
|
315
|
-
|
|
316
|
+
|
|
316
317
|
await this.loadConfigurations();
|
|
317
318
|
await this.initializeDefaultStrategies();
|
|
318
|
-
|
|
319
|
+
|
|
319
320
|
this.logger.info('Deployment Manager initialized successfully');
|
|
320
321
|
} catch (error) {
|
|
321
322
|
this.logger.error('Failed to initialize Deployment Manager', { error });
|
|
@@ -323,7 +324,9 @@ export class DeploymentManager extends EventEmitter {
|
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
|
|
326
|
-
async createEnvironment(
|
|
327
|
+
async createEnvironment(
|
|
328
|
+
environmentData: Partial<DeploymentEnvironment>,
|
|
329
|
+
): Promise<DeploymentEnvironment> {
|
|
327
330
|
const environment: DeploymentEnvironment = {
|
|
328
331
|
id: environmentData.id || `env-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
329
332
|
name: environmentData.name || 'Unnamed Environment',
|
|
@@ -339,9 +342,9 @@ export class DeploymentManager extends EventEmitter {
|
|
|
339
342
|
cpu: '1',
|
|
340
343
|
memory: '1Gi',
|
|
341
344
|
storage: '10Gi',
|
|
342
|
-
replicas: 1
|
|
345
|
+
replicas: 1,
|
|
343
346
|
},
|
|
344
|
-
...environmentData.configuration
|
|
347
|
+
...environmentData.configuration,
|
|
345
348
|
},
|
|
346
349
|
healthCheck: {
|
|
347
350
|
url: '/health',
|
|
@@ -350,7 +353,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
350
353
|
timeout: 30000,
|
|
351
354
|
interval: 60000,
|
|
352
355
|
retries: 3,
|
|
353
|
-
...environmentData.healthCheck
|
|
356
|
+
...environmentData.healthCheck,
|
|
354
357
|
},
|
|
355
358
|
monitoring: {
|
|
356
359
|
enabled: true,
|
|
@@ -359,9 +362,9 @@ export class DeploymentManager extends EventEmitter {
|
|
|
359
362
|
logs: {
|
|
360
363
|
level: 'info',
|
|
361
364
|
retention: '30d',
|
|
362
|
-
aggregation: true
|
|
365
|
+
aggregation: true,
|
|
363
366
|
},
|
|
364
|
-
...environmentData.monitoring
|
|
367
|
+
...environmentData.monitoring,
|
|
365
368
|
},
|
|
366
369
|
security: {
|
|
367
370
|
tls: true,
|
|
@@ -371,12 +374,12 @@ export class DeploymentManager extends EventEmitter {
|
|
|
371
374
|
scanning: {
|
|
372
375
|
vulnerabilities: true,
|
|
373
376
|
secrets: true,
|
|
374
|
-
licenses: true
|
|
377
|
+
licenses: true,
|
|
375
378
|
},
|
|
376
|
-
...environmentData.security
|
|
379
|
+
...environmentData.security,
|
|
377
380
|
},
|
|
378
381
|
createdAt: new Date(),
|
|
379
|
-
updatedAt: new Date()
|
|
382
|
+
updatedAt: new Date(),
|
|
380
383
|
};
|
|
381
384
|
|
|
382
385
|
this.environments.set(environment.id, environment);
|
|
@@ -420,31 +423,31 @@ export class DeploymentManager extends EventEmitter {
|
|
|
420
423
|
source: deploymentData.source,
|
|
421
424
|
artifacts: {
|
|
422
425
|
files: [],
|
|
423
|
-
...deploymentData.artifacts
|
|
426
|
+
...deploymentData.artifacts,
|
|
424
427
|
},
|
|
425
428
|
metrics: {
|
|
426
429
|
startTime: new Date(),
|
|
427
430
|
deploymentSize: 0,
|
|
428
431
|
successRate: 0,
|
|
429
432
|
errorRate: 0,
|
|
430
|
-
performanceMetrics: {}
|
|
433
|
+
performanceMetrics: {},
|
|
431
434
|
},
|
|
432
|
-
stages: strategy.stages.map(stage => ({
|
|
435
|
+
stages: strategy.stages.map((stage) => ({
|
|
433
436
|
...stage,
|
|
434
437
|
status: 'pending',
|
|
435
|
-
logs: []
|
|
438
|
+
logs: [],
|
|
436
439
|
})),
|
|
437
440
|
approvals: [],
|
|
438
441
|
notifications: [],
|
|
439
442
|
auditLog: [],
|
|
440
443
|
createdAt: new Date(),
|
|
441
|
-
updatedAt: new Date()
|
|
444
|
+
updatedAt: new Date(),
|
|
442
445
|
};
|
|
443
446
|
|
|
444
447
|
this.addAuditEntry(deployment, deploymentData.initiatedBy, 'deployment_created', 'deployment', {
|
|
445
448
|
deploymentId: deployment.id,
|
|
446
449
|
environment: environment.name,
|
|
447
|
-
strategy: strategy.name
|
|
450
|
+
strategy: strategy.name,
|
|
448
451
|
});
|
|
449
452
|
|
|
450
453
|
this.deployments.set(deployment.id, deployment);
|
|
@@ -471,7 +474,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
471
474
|
deployment.updatedAt = new Date();
|
|
472
475
|
|
|
473
476
|
this.addAuditEntry(deployment, 'system', 'deployment_started', 'deployment', {
|
|
474
|
-
deploymentId
|
|
477
|
+
deploymentId,
|
|
475
478
|
});
|
|
476
479
|
|
|
477
480
|
await this.saveDeployment(deployment);
|
|
@@ -480,7 +483,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
480
483
|
try {
|
|
481
484
|
for (const stage of deployment.stages) {
|
|
482
485
|
await this.executeStage(deployment, stage);
|
|
483
|
-
|
|
486
|
+
|
|
484
487
|
if (stage.status === 'failed') {
|
|
485
488
|
await this.handleDeploymentFailure(deployment, stage);
|
|
486
489
|
return;
|
|
@@ -496,9 +499,9 @@ export class DeploymentManager extends EventEmitter {
|
|
|
496
499
|
private async executeStage(deployment: Deployment, stage: DeploymentStage): Promise<void> {
|
|
497
500
|
stage.status = 'running';
|
|
498
501
|
stage.startTime = new Date();
|
|
499
|
-
|
|
502
|
+
|
|
500
503
|
this.addLog(stage, 'info', `Starting stage: ${stage.name}`, 'system');
|
|
501
|
-
|
|
504
|
+
|
|
502
505
|
try {
|
|
503
506
|
// Check conditions
|
|
504
507
|
if (!this.evaluateStageConditions(deployment, stage)) {
|
|
@@ -508,12 +511,12 @@ export class DeploymentManager extends EventEmitter {
|
|
|
508
511
|
}
|
|
509
512
|
|
|
510
513
|
// Handle approvals
|
|
511
|
-
if (stage.type === 'deploy' && await this.requiresApproval(deployment, stage)) {
|
|
514
|
+
if (stage.type === 'deploy' && (await this.requiresApproval(deployment, stage))) {
|
|
512
515
|
await this.requestApproval(deployment, stage);
|
|
513
|
-
|
|
516
|
+
|
|
514
517
|
// Wait for approval
|
|
515
518
|
while (await this.isPendingApproval(deployment, stage)) {
|
|
516
|
-
await new Promise(resolve => setTimeout(resolve, 10000)); // Check every 10 seconds
|
|
519
|
+
await new Promise((resolve) => setTimeout(resolve, 10000)); // Check every 10 seconds
|
|
517
520
|
}
|
|
518
521
|
|
|
519
522
|
if (!(await this.isApproved(deployment, stage))) {
|
|
@@ -531,15 +534,19 @@ export class DeploymentManager extends EventEmitter {
|
|
|
531
534
|
stage.status = 'success';
|
|
532
535
|
stage.endTime = new Date();
|
|
533
536
|
stage.duration = stage.endTime.getTime() - stage.startTime!.getTime();
|
|
534
|
-
|
|
537
|
+
|
|
535
538
|
this.addLog(stage, 'info', `Stage completed successfully in ${stage.duration}ms`, 'system');
|
|
536
|
-
|
|
537
539
|
} catch (error) {
|
|
538
540
|
stage.status = 'failed';
|
|
539
541
|
stage.endTime = new Date();
|
|
540
|
-
|
|
541
|
-
this.addLog(
|
|
542
|
-
|
|
542
|
+
|
|
543
|
+
this.addLog(
|
|
544
|
+
stage,
|
|
545
|
+
'error',
|
|
546
|
+
`Stage failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
547
|
+
'system',
|
|
548
|
+
);
|
|
549
|
+
|
|
543
550
|
// Retry logic
|
|
544
551
|
if (stage.retryPolicy.maxRetries > 0) {
|
|
545
552
|
await this.retryStage(deployment, stage);
|
|
@@ -553,26 +560,31 @@ export class DeploymentManager extends EventEmitter {
|
|
|
553
560
|
private async executeCommand(
|
|
554
561
|
deployment: Deployment,
|
|
555
562
|
stage: DeploymentStage,
|
|
556
|
-
command: DeploymentCommand
|
|
563
|
+
command: DeploymentCommand,
|
|
557
564
|
): Promise<void> {
|
|
558
565
|
return new Promise((resolve, reject) => {
|
|
559
566
|
const environment = this.environments.get(deployment.environmentId);
|
|
560
|
-
|
|
567
|
+
|
|
561
568
|
const processEnv = {
|
|
562
569
|
...process.env,
|
|
563
570
|
...environment?.configuration.environment_variables,
|
|
564
571
|
...command.environment,
|
|
565
572
|
DEPLOYMENT_ID: deployment.id,
|
|
566
573
|
DEPLOYMENT_VERSION: deployment.version,
|
|
567
|
-
ENVIRONMENT_ID: deployment.environmentId
|
|
574
|
+
ENVIRONMENT_ID: deployment.environmentId,
|
|
568
575
|
};
|
|
569
576
|
|
|
570
|
-
this.addLog(
|
|
577
|
+
this.addLog(
|
|
578
|
+
stage,
|
|
579
|
+
'info',
|
|
580
|
+
`Executing: ${command.command} ${command.args.join(' ')}`,
|
|
581
|
+
'command',
|
|
582
|
+
);
|
|
571
583
|
|
|
572
584
|
const childProcess = spawn(command.command, command.args, {
|
|
573
585
|
cwd: command.workingDirectory || process.cwd(),
|
|
574
586
|
env: processEnv,
|
|
575
|
-
stdio: ['pipe', 'pipe', 'pipe']
|
|
587
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
576
588
|
});
|
|
577
589
|
|
|
578
590
|
this.activeProcesses.set(`${deployment.id}-${stage.id}-${command.id}`, childProcess);
|
|
@@ -603,9 +615,14 @@ export class DeploymentManager extends EventEmitter {
|
|
|
603
615
|
|
|
604
616
|
// Check success criteria
|
|
605
617
|
const success = this.evaluateCommandSuccess(command, code, stdout, stderr);
|
|
606
|
-
|
|
618
|
+
|
|
607
619
|
if (success) {
|
|
608
|
-
this.addLog(
|
|
620
|
+
this.addLog(
|
|
621
|
+
stage,
|
|
622
|
+
'info',
|
|
623
|
+
`Command completed successfully (exit code: ${code})`,
|
|
624
|
+
'command',
|
|
625
|
+
);
|
|
609
626
|
resolve();
|
|
610
627
|
} else {
|
|
611
628
|
this.addLog(stage, 'error', `Command failed (exit code: ${code})`, 'command');
|
|
@@ -616,7 +633,12 @@ export class DeploymentManager extends EventEmitter {
|
|
|
616
633
|
childProcess.on('error', (error) => {
|
|
617
634
|
clearTimeout(timeout);
|
|
618
635
|
this.activeProcesses.delete(`${deployment.id}-${stage.id}-${command.id}`);
|
|
619
|
-
this.addLog(
|
|
636
|
+
this.addLog(
|
|
637
|
+
stage,
|
|
638
|
+
'error',
|
|
639
|
+
`Command error: ${error instanceof Error ? error.message : String(error)}`,
|
|
640
|
+
'command',
|
|
641
|
+
);
|
|
620
642
|
reject(error);
|
|
621
643
|
});
|
|
622
644
|
});
|
|
@@ -625,7 +647,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
625
647
|
async rollbackDeployment(
|
|
626
648
|
deploymentId: string,
|
|
627
649
|
reason: string,
|
|
628
|
-
userId: string = 'system'
|
|
650
|
+
userId: string = 'system',
|
|
629
651
|
): Promise<void> {
|
|
630
652
|
const deployment = this.deployments.get(deploymentId);
|
|
631
653
|
if (!deployment) {
|
|
@@ -636,7 +658,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
636
658
|
const previousDeployment = await this.getPreviousSuccessfulDeployment(
|
|
637
659
|
deployment.projectId,
|
|
638
660
|
deployment.environmentId,
|
|
639
|
-
deploymentId
|
|
661
|
+
deploymentId,
|
|
640
662
|
);
|
|
641
663
|
|
|
642
664
|
if (!previousDeployment) {
|
|
@@ -650,7 +672,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
650
672
|
reason,
|
|
651
673
|
timestamp: rollbackStartTime,
|
|
652
674
|
previousDeploymentId: previousDeployment.id,
|
|
653
|
-
rollbackDuration: 0
|
|
675
|
+
rollbackDuration: 0,
|
|
654
676
|
};
|
|
655
677
|
|
|
656
678
|
deployment.status = 'rolled-back';
|
|
@@ -659,27 +681,26 @@ export class DeploymentManager extends EventEmitter {
|
|
|
659
681
|
this.addAuditEntry(deployment, userId, 'rollback_initiated', 'deployment', {
|
|
660
682
|
deploymentId,
|
|
661
683
|
previousDeploymentId: previousDeployment.id,
|
|
662
|
-
reason
|
|
684
|
+
reason,
|
|
663
685
|
});
|
|
664
686
|
|
|
665
687
|
try {
|
|
666
688
|
// Execute rollback strategy
|
|
667
689
|
await this.executeRollbackStrategy(deployment, previousDeployment);
|
|
668
|
-
|
|
690
|
+
|
|
669
691
|
deployment.rollback.rollbackDuration = Date.now() - rollbackStartTime.getTime();
|
|
670
|
-
|
|
692
|
+
|
|
671
693
|
this.addAuditEntry(deployment, userId, 'rollback_completed', 'deployment', {
|
|
672
694
|
deploymentId,
|
|
673
|
-
rollbackDuration: deployment.rollback.rollbackDuration
|
|
695
|
+
rollbackDuration: deployment.rollback.rollbackDuration,
|
|
674
696
|
});
|
|
675
697
|
|
|
676
698
|
this.emit('deployment:rolled-back', deployment);
|
|
677
699
|
this.logger.info(`Deployment rolled back: ${deploymentId}`);
|
|
678
|
-
|
|
679
700
|
} catch (error) {
|
|
680
701
|
this.addAuditEntry(deployment, userId, 'rollback_failed', 'deployment', {
|
|
681
702
|
deploymentId,
|
|
682
|
-
error:
|
|
703
|
+
error: error instanceof Error ? error.message : String(error),
|
|
683
704
|
});
|
|
684
705
|
|
|
685
706
|
this.logger.error(`Rollback failed for deployment ${deploymentId}`, { error });
|
|
@@ -689,78 +710,85 @@ export class DeploymentManager extends EventEmitter {
|
|
|
689
710
|
await this.saveDeployment(deployment);
|
|
690
711
|
}
|
|
691
712
|
|
|
692
|
-
async getDeploymentMetrics(
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
}
|
|
699
|
-
): Promise<DeploymentMetrics> {
|
|
713
|
+
async getDeploymentMetrics(filters?: {
|
|
714
|
+
projectId?: string;
|
|
715
|
+
environmentId?: string;
|
|
716
|
+
strategyId?: string;
|
|
717
|
+
timeRange?: { start: Date; end: Date };
|
|
718
|
+
}): Promise<DeploymentMetrics> {
|
|
700
719
|
let deployments = Array.from(this.deployments.values());
|
|
701
720
|
|
|
702
721
|
// Apply filters
|
|
703
722
|
if (filters) {
|
|
704
723
|
if (filters.projectId) {
|
|
705
|
-
deployments = deployments.filter(d => d.projectId === filters.projectId);
|
|
724
|
+
deployments = deployments.filter((d) => d.projectId === filters.projectId);
|
|
706
725
|
}
|
|
707
726
|
if (filters.environmentId) {
|
|
708
|
-
deployments = deployments.filter(d => d.environmentId === filters.environmentId);
|
|
727
|
+
deployments = deployments.filter((d) => d.environmentId === filters.environmentId);
|
|
709
728
|
}
|
|
710
729
|
if (filters.strategyId) {
|
|
711
|
-
deployments = deployments.filter(d => d.strategyId === filters.strategyId);
|
|
730
|
+
deployments = deployments.filter((d) => d.strategyId === filters.strategyId);
|
|
712
731
|
}
|
|
713
732
|
if (filters.timeRange) {
|
|
714
|
-
deployments = deployments.filter(
|
|
715
|
-
d.createdAt >= filters.timeRange!.start &&
|
|
716
|
-
d.createdAt <= filters.timeRange!.end
|
|
733
|
+
deployments = deployments.filter(
|
|
734
|
+
(d) => d.createdAt >= filters.timeRange!.start && d.createdAt <= filters.timeRange!.end,
|
|
717
735
|
);
|
|
718
736
|
}
|
|
719
737
|
}
|
|
720
738
|
|
|
721
739
|
const totalDeployments = deployments.length;
|
|
722
|
-
const successfulDeployments = deployments.filter(d => d.status === 'success').length;
|
|
723
|
-
const failedDeployments = deployments.filter(d => d.status === 'failed').length;
|
|
724
|
-
const rolledBackDeployments = deployments.filter(d => d.status === 'rolled-back').length;
|
|
740
|
+
const successfulDeployments = deployments.filter((d) => d.status === 'success').length;
|
|
741
|
+
const failedDeployments = deployments.filter((d) => d.status === 'failed').length;
|
|
742
|
+
const rolledBackDeployments = deployments.filter((d) => d.status === 'rolled-back').length;
|
|
725
743
|
|
|
726
|
-
const completedDeployments = deployments.filter(
|
|
727
|
-
d.metrics.endTime && d.metrics.startTime
|
|
744
|
+
const completedDeployments = deployments.filter(
|
|
745
|
+
(d) => d.metrics.endTime && d.metrics.startTime,
|
|
728
746
|
);
|
|
729
747
|
|
|
730
|
-
const averageDeploymentTime =
|
|
731
|
-
completedDeployments.
|
|
732
|
-
|
|
733
|
-
|
|
748
|
+
const averageDeploymentTime =
|
|
749
|
+
completedDeployments.length > 0
|
|
750
|
+
? completedDeployments.reduce(
|
|
751
|
+
(sum, d) => sum + (d.metrics.endTime!.getTime() - d.metrics.startTime.getTime()),
|
|
752
|
+
0,
|
|
753
|
+
) / completedDeployments.length
|
|
754
|
+
: 0;
|
|
734
755
|
|
|
735
756
|
// Calculate environment metrics
|
|
736
757
|
const environmentMetrics: Record<string, any> = {};
|
|
737
758
|
for (const env of this.environments.values()) {
|
|
738
|
-
const envDeployments = deployments.filter(d => d.environmentId === env.id);
|
|
739
|
-
const envSuccessful = envDeployments.filter(d => d.status === 'success').length;
|
|
740
|
-
|
|
759
|
+
const envDeployments = deployments.filter((d) => d.environmentId === env.id);
|
|
760
|
+
const envSuccessful = envDeployments.filter((d) => d.status === 'success').length;
|
|
761
|
+
|
|
741
762
|
environmentMetrics[env.id] = {
|
|
742
763
|
deployments: envDeployments.length,
|
|
743
764
|
successRate: envDeployments.length > 0 ? (envSuccessful / envDeployments.length) * 100 : 0,
|
|
744
|
-
averageTime:
|
|
745
|
-
envDeployments.
|
|
746
|
-
sum + (d.metrics.duration || 0), 0
|
|
747
|
-
|
|
765
|
+
averageTime:
|
|
766
|
+
envDeployments.length > 0
|
|
767
|
+
? envDeployments.reduce((sum, d) => sum + (d.metrics.duration || 0), 0) /
|
|
768
|
+
envDeployments.length
|
|
769
|
+
: 0,
|
|
748
770
|
};
|
|
749
771
|
}
|
|
750
772
|
|
|
751
773
|
// Calculate strategy metrics
|
|
752
774
|
const strategyMetrics: Record<string, any> = {};
|
|
753
775
|
for (const strategy of this.strategies.values()) {
|
|
754
|
-
const strategyDeployments = deployments.filter(d => d.strategyId === strategy.id);
|
|
755
|
-
const strategySuccessful = strategyDeployments.filter(d => d.status === 'success').length;
|
|
756
|
-
const strategyRolledBack = strategyDeployments.filter(
|
|
757
|
-
|
|
776
|
+
const strategyDeployments = deployments.filter((d) => d.strategyId === strategy.id);
|
|
777
|
+
const strategySuccessful = strategyDeployments.filter((d) => d.status === 'success').length;
|
|
778
|
+
const strategyRolledBack = strategyDeployments.filter(
|
|
779
|
+
(d) => d.status === 'rolled-back',
|
|
780
|
+
).length;
|
|
781
|
+
|
|
758
782
|
strategyMetrics[strategy.id] = {
|
|
759
783
|
deployments: strategyDeployments.length,
|
|
760
|
-
successRate:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
784
|
+
successRate:
|
|
785
|
+
strategyDeployments.length > 0
|
|
786
|
+
? (strategySuccessful / strategyDeployments.length) * 100
|
|
787
|
+
: 0,
|
|
788
|
+
rollbackRate:
|
|
789
|
+
strategyDeployments.length > 0
|
|
790
|
+
? (strategyRolledBack / strategyDeployments.length) * 100
|
|
791
|
+
: 0,
|
|
764
792
|
};
|
|
765
793
|
}
|
|
766
794
|
|
|
@@ -772,10 +800,11 @@ export class DeploymentManager extends EventEmitter {
|
|
|
772
800
|
averageDeploymentTime,
|
|
773
801
|
deploymentFrequency: this.calculateDeploymentFrequency(deployments),
|
|
774
802
|
meanTimeToRecovery: this.calculateMTTR(deployments),
|
|
775
|
-
changeFailureRate:
|
|
803
|
+
changeFailureRate:
|
|
804
|
+
((failedDeployments + rolledBackDeployments) / Math.max(totalDeployments, 1)) * 100,
|
|
776
805
|
leadTime: this.calculateLeadTime(deployments),
|
|
777
806
|
environmentMetrics,
|
|
778
|
-
strategyMetrics
|
|
807
|
+
strategyMetrics,
|
|
779
808
|
};
|
|
780
809
|
}
|
|
781
810
|
|
|
@@ -784,27 +813,29 @@ export class DeploymentManager extends EventEmitter {
|
|
|
784
813
|
// Load environments, strategies, and pipelines from disk
|
|
785
814
|
try {
|
|
786
815
|
const envFiles = await readdir(join(this.deploymentsPath, 'environments'));
|
|
787
|
-
for (const file of envFiles.filter(f => f.endsWith('.json'))) {
|
|
816
|
+
for (const file of envFiles.filter((f) => f.endsWith('.json'))) {
|
|
788
817
|
const content = await readFile(join(this.deploymentsPath, 'environments', file), 'utf-8');
|
|
789
818
|
const env: DeploymentEnvironment = JSON.parse(content);
|
|
790
819
|
this.environments.set(env.id, env);
|
|
791
820
|
}
|
|
792
821
|
|
|
793
822
|
const strategyFiles = await readdir(join(this.deploymentsPath, 'strategies'));
|
|
794
|
-
for (const file of strategyFiles.filter(f => f.endsWith('.json'))) {
|
|
823
|
+
for (const file of strategyFiles.filter((f) => f.endsWith('.json'))) {
|
|
795
824
|
const content = await readFile(join(this.deploymentsPath, 'strategies', file), 'utf-8');
|
|
796
825
|
const strategy: DeploymentStrategy = JSON.parse(content);
|
|
797
826
|
this.strategies.set(strategy.id, strategy);
|
|
798
827
|
}
|
|
799
828
|
|
|
800
829
|
const pipelineFiles = await readdir(join(this.deploymentsPath, 'pipelines'));
|
|
801
|
-
for (const file of pipelineFiles.filter(f => f.endsWith('.json'))) {
|
|
830
|
+
for (const file of pipelineFiles.filter((f) => f.endsWith('.json'))) {
|
|
802
831
|
const content = await readFile(join(this.deploymentsPath, 'pipelines', file), 'utf-8');
|
|
803
832
|
const pipeline: DeploymentPipeline = JSON.parse(content);
|
|
804
833
|
this.pipelines.set(pipeline.id, pipeline);
|
|
805
834
|
}
|
|
806
835
|
|
|
807
|
-
this.logger.info(
|
|
836
|
+
this.logger.info(
|
|
837
|
+
`Loaded ${this.environments.size} environments, ${this.strategies.size} strategies, ${this.pipelines.size} pipelines`,
|
|
838
|
+
);
|
|
808
839
|
} catch (error) {
|
|
809
840
|
this.logger.warn('Failed to load some configurations', { error });
|
|
810
841
|
}
|
|
@@ -818,7 +849,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
818
849
|
configuration: {
|
|
819
850
|
monitoringDuration: 300000, // 5 minutes
|
|
820
851
|
automatedRollback: true,
|
|
821
|
-
rollbackThreshold: 5
|
|
852
|
+
rollbackThreshold: 5,
|
|
822
853
|
},
|
|
823
854
|
stages: [
|
|
824
855
|
{
|
|
@@ -832,7 +863,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
832
863
|
timeout: 600000,
|
|
833
864
|
retryPolicy: { maxRetries: 2, backoffMultiplier: 2, initialDelay: 1000 },
|
|
834
865
|
artifacts: { inputs: [], outputs: [] },
|
|
835
|
-
logs: []
|
|
866
|
+
logs: [],
|
|
836
867
|
},
|
|
837
868
|
{
|
|
838
869
|
id: 'deploy-green',
|
|
@@ -845,7 +876,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
845
876
|
timeout: 900000,
|
|
846
877
|
retryPolicy: { maxRetries: 1, backoffMultiplier: 2, initialDelay: 5000 },
|
|
847
878
|
artifacts: { inputs: [], outputs: [] },
|
|
848
|
-
logs: []
|
|
879
|
+
logs: [],
|
|
849
880
|
},
|
|
850
881
|
{
|
|
851
882
|
id: 'verify',
|
|
@@ -858,7 +889,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
858
889
|
timeout: 300000,
|
|
859
890
|
retryPolicy: { maxRetries: 3, backoffMultiplier: 1.5, initialDelay: 2000 },
|
|
860
891
|
artifacts: { inputs: [], outputs: [] },
|
|
861
|
-
logs: []
|
|
892
|
+
logs: [],
|
|
862
893
|
},
|
|
863
894
|
{
|
|
864
895
|
id: 'switch-traffic',
|
|
@@ -871,8 +902,8 @@ export class DeploymentManager extends EventEmitter {
|
|
|
871
902
|
timeout: 60000,
|
|
872
903
|
retryPolicy: { maxRetries: 1, backoffMultiplier: 1, initialDelay: 1000 },
|
|
873
904
|
artifacts: { inputs: [], outputs: [] },
|
|
874
|
-
logs: []
|
|
875
|
-
}
|
|
905
|
+
logs: [],
|
|
906
|
+
},
|
|
876
907
|
],
|
|
877
908
|
rollbackStrategy: {
|
|
878
909
|
automatic: true,
|
|
@@ -882,11 +913,11 @@ export class DeploymentManager extends EventEmitter {
|
|
|
882
913
|
threshold: 5,
|
|
883
914
|
operator: '>',
|
|
884
915
|
duration: 60000,
|
|
885
|
-
description: 'Error rate exceeds 5%'
|
|
886
|
-
}
|
|
916
|
+
description: 'Error rate exceeds 5%',
|
|
917
|
+
},
|
|
887
918
|
],
|
|
888
|
-
timeout: 300000
|
|
889
|
-
}
|
|
919
|
+
timeout: 300000,
|
|
920
|
+
},
|
|
890
921
|
},
|
|
891
922
|
{
|
|
892
923
|
name: 'Canary Deployment',
|
|
@@ -895,7 +926,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
895
926
|
trafficSplitPercentage: 10,
|
|
896
927
|
monitoringDuration: 600000, // 10 minutes
|
|
897
928
|
automatedRollback: true,
|
|
898
|
-
rollbackThreshold: 2
|
|
929
|
+
rollbackThreshold: 2,
|
|
899
930
|
},
|
|
900
931
|
stages: [
|
|
901
932
|
{
|
|
@@ -909,7 +940,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
909
940
|
timeout: 600000,
|
|
910
941
|
retryPolicy: { maxRetries: 2, backoffMultiplier: 2, initialDelay: 1000 },
|
|
911
942
|
artifacts: { inputs: [], outputs: [] },
|
|
912
|
-
logs: []
|
|
943
|
+
logs: [],
|
|
913
944
|
},
|
|
914
945
|
{
|
|
915
946
|
id: 'deploy-canary',
|
|
@@ -922,7 +953,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
922
953
|
timeout: 900000,
|
|
923
954
|
retryPolicy: { maxRetries: 1, backoffMultiplier: 2, initialDelay: 5000 },
|
|
924
955
|
artifacts: { inputs: [], outputs: [] },
|
|
925
|
-
logs: []
|
|
956
|
+
logs: [],
|
|
926
957
|
},
|
|
927
958
|
{
|
|
928
959
|
id: 'monitor-canary',
|
|
@@ -935,7 +966,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
935
966
|
timeout: 600000,
|
|
936
967
|
retryPolicy: { maxRetries: 1, backoffMultiplier: 1, initialDelay: 10000 },
|
|
937
968
|
artifacts: { inputs: [], outputs: [] },
|
|
938
|
-
logs: []
|
|
969
|
+
logs: [],
|
|
939
970
|
},
|
|
940
971
|
{
|
|
941
972
|
id: 'promote-full',
|
|
@@ -948,8 +979,8 @@ export class DeploymentManager extends EventEmitter {
|
|
|
948
979
|
timeout: 300000,
|
|
949
980
|
retryPolicy: { maxRetries: 1, backoffMultiplier: 1, initialDelay: 1000 },
|
|
950
981
|
artifacts: { inputs: [], outputs: [] },
|
|
951
|
-
logs: []
|
|
952
|
-
}
|
|
982
|
+
logs: [],
|
|
983
|
+
},
|
|
953
984
|
],
|
|
954
985
|
rollbackStrategy: {
|
|
955
986
|
automatic: true,
|
|
@@ -959,18 +990,18 @@ export class DeploymentManager extends EventEmitter {
|
|
|
959
990
|
threshold: 2,
|
|
960
991
|
operator: '>',
|
|
961
992
|
duration: 120000,
|
|
962
|
-
description: 'Canary error rate exceeds 2%'
|
|
993
|
+
description: 'Canary error rate exceeds 2%',
|
|
963
994
|
},
|
|
964
995
|
{
|
|
965
996
|
metric: 'response_time',
|
|
966
997
|
threshold: 500,
|
|
967
998
|
operator: '>',
|
|
968
999
|
duration: 180000,
|
|
969
|
-
description: 'Response time exceeds 500ms'
|
|
970
|
-
}
|
|
1000
|
+
description: 'Response time exceeds 500ms',
|
|
1001
|
+
},
|
|
971
1002
|
],
|
|
972
|
-
timeout: 180000
|
|
973
|
-
}
|
|
1003
|
+
timeout: 180000,
|
|
1004
|
+
},
|
|
974
1005
|
},
|
|
975
1006
|
{
|
|
976
1007
|
name: 'Rolling Deployment',
|
|
@@ -979,7 +1010,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
979
1010
|
maxUnavailable: 1,
|
|
980
1011
|
maxSurge: 1,
|
|
981
1012
|
monitoringDuration: 120000,
|
|
982
|
-
automatedRollback: false
|
|
1013
|
+
automatedRollback: false,
|
|
983
1014
|
},
|
|
984
1015
|
stages: [
|
|
985
1016
|
{
|
|
@@ -993,7 +1024,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
993
1024
|
timeout: 600000,
|
|
994
1025
|
retryPolicy: { maxRetries: 2, backoffMultiplier: 2, initialDelay: 1000 },
|
|
995
1026
|
artifacts: { inputs: [], outputs: [] },
|
|
996
|
-
logs: []
|
|
1027
|
+
logs: [],
|
|
997
1028
|
},
|
|
998
1029
|
{
|
|
999
1030
|
id: 'rolling-update',
|
|
@@ -1006,7 +1037,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1006
1037
|
timeout: 1200000,
|
|
1007
1038
|
retryPolicy: { maxRetries: 1, backoffMultiplier: 2, initialDelay: 5000 },
|
|
1008
1039
|
artifacts: { inputs: [], outputs: [] },
|
|
1009
|
-
logs: []
|
|
1040
|
+
logs: [],
|
|
1010
1041
|
},
|
|
1011
1042
|
{
|
|
1012
1043
|
id: 'health-check',
|
|
@@ -1019,26 +1050,26 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1019
1050
|
timeout: 300000,
|
|
1020
1051
|
retryPolicy: { maxRetries: 3, backoffMultiplier: 1.5, initialDelay: 5000 },
|
|
1021
1052
|
artifacts: { inputs: [], outputs: [] },
|
|
1022
|
-
logs: []
|
|
1023
|
-
}
|
|
1053
|
+
logs: [],
|
|
1054
|
+
},
|
|
1024
1055
|
],
|
|
1025
1056
|
rollbackStrategy: {
|
|
1026
1057
|
automatic: false,
|
|
1027
1058
|
conditions: [],
|
|
1028
|
-
timeout: 600000
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1059
|
+
timeout: 600000,
|
|
1060
|
+
},
|
|
1061
|
+
},
|
|
1031
1062
|
];
|
|
1032
1063
|
|
|
1033
1064
|
for (const strategyData of defaultStrategies) {
|
|
1034
|
-
if (!Array.from(this.strategies.values()).some(s => s.name === strategyData.name)) {
|
|
1065
|
+
if (!Array.from(this.strategies.values()).some((s) => s.name === strategyData.name)) {
|
|
1035
1066
|
const strategy: DeploymentStrategy = {
|
|
1036
1067
|
id: `strategy-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
1037
1068
|
notifications: {
|
|
1038
1069
|
channels: [],
|
|
1039
|
-
events: ['deployment:started', 'deployment:completed', 'deployment:failed']
|
|
1070
|
+
events: ['deployment:started', 'deployment:completed', 'deployment:failed'],
|
|
1040
1071
|
},
|
|
1041
|
-
...strategyData
|
|
1072
|
+
...strategyData,
|
|
1042
1073
|
} as DeploymentStrategy;
|
|
1043
1074
|
|
|
1044
1075
|
this.strategies.set(strategy.id, strategy);
|
|
@@ -1067,7 +1098,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1067
1098
|
userId: string,
|
|
1068
1099
|
action: string,
|
|
1069
1100
|
target: string,
|
|
1070
|
-
details: Record<string, any
|
|
1101
|
+
details: Record<string, any>,
|
|
1071
1102
|
): void {
|
|
1072
1103
|
const entry: DeploymentAuditEntry = {
|
|
1073
1104
|
id: `audit-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
@@ -1075,7 +1106,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1075
1106
|
userId,
|
|
1076
1107
|
action,
|
|
1077
1108
|
target,
|
|
1078
|
-
details
|
|
1109
|
+
details,
|
|
1079
1110
|
};
|
|
1080
1111
|
|
|
1081
1112
|
deployment.auditLog.push(entry);
|
|
@@ -1086,14 +1117,14 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1086
1117
|
level: DeploymentLog['level'],
|
|
1087
1118
|
message: string,
|
|
1088
1119
|
source: string,
|
|
1089
|
-
metadata?: Record<string, any
|
|
1120
|
+
metadata?: Record<string, any>,
|
|
1090
1121
|
): void {
|
|
1091
1122
|
const log: DeploymentLog = {
|
|
1092
1123
|
timestamp: new Date(),
|
|
1093
1124
|
level,
|
|
1094
1125
|
message,
|
|
1095
1126
|
source,
|
|
1096
|
-
metadata
|
|
1127
|
+
metadata,
|
|
1097
1128
|
};
|
|
1098
1129
|
|
|
1099
1130
|
stage.logs.push(log);
|
|
@@ -1114,7 +1145,10 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1114
1145
|
this.emit('approval:requested', { deployment, stage });
|
|
1115
1146
|
}
|
|
1116
1147
|
|
|
1117
|
-
private async isPendingApproval(
|
|
1148
|
+
private async isPendingApproval(
|
|
1149
|
+
deployment: Deployment,
|
|
1150
|
+
stage: DeploymentStage,
|
|
1151
|
+
): Promise<boolean> {
|
|
1118
1152
|
// Check if there are pending approvals for this stage
|
|
1119
1153
|
return false; // Simplified for now
|
|
1120
1154
|
}
|
|
@@ -1128,9 +1162,12 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1128
1162
|
command: DeploymentCommand,
|
|
1129
1163
|
exitCode: number | null,
|
|
1130
1164
|
stdout: string,
|
|
1131
|
-
stderr: string
|
|
1165
|
+
stderr: string,
|
|
1132
1166
|
): boolean {
|
|
1133
|
-
if (
|
|
1167
|
+
if (
|
|
1168
|
+
command.successCriteria.exitCode !== undefined &&
|
|
1169
|
+
exitCode !== command.successCriteria.exitCode
|
|
1170
|
+
) {
|
|
1134
1171
|
return false;
|
|
1135
1172
|
}
|
|
1136
1173
|
|
|
@@ -1158,7 +1195,10 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1158
1195
|
this.logger.info(`Retrying stage: ${stage.name}`);
|
|
1159
1196
|
}
|
|
1160
1197
|
|
|
1161
|
-
private async handleDeploymentFailure(
|
|
1198
|
+
private async handleDeploymentFailure(
|
|
1199
|
+
deployment: Deployment,
|
|
1200
|
+
failedStage: DeploymentStage,
|
|
1201
|
+
): Promise<void> {
|
|
1162
1202
|
deployment.status = 'failed';
|
|
1163
1203
|
deployment.metrics.endTime = new Date();
|
|
1164
1204
|
deployment.updatedAt = new Date();
|
|
@@ -1166,7 +1206,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1166
1206
|
this.addAuditEntry(deployment, 'system', 'deployment_failed', 'deployment', {
|
|
1167
1207
|
deploymentId: deployment.id,
|
|
1168
1208
|
failedStage: failedStage.name,
|
|
1169
|
-
reason: 'Stage execution failed'
|
|
1209
|
+
reason: 'Stage execution failed',
|
|
1170
1210
|
});
|
|
1171
1211
|
|
|
1172
1212
|
await this.saveDeployment(deployment);
|
|
@@ -1186,7 +1226,7 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1186
1226
|
|
|
1187
1227
|
this.addAuditEntry(deployment, 'system', 'deployment_error', 'deployment', {
|
|
1188
1228
|
deploymentId: deployment.id,
|
|
1189
|
-
error:
|
|
1229
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1190
1230
|
});
|
|
1191
1231
|
|
|
1192
1232
|
await this.saveDeployment(deployment);
|
|
@@ -1198,12 +1238,13 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1198
1238
|
private async completeDeployment(deployment: Deployment): Promise<void> {
|
|
1199
1239
|
deployment.status = 'success';
|
|
1200
1240
|
deployment.metrics.endTime = new Date();
|
|
1201
|
-
deployment.metrics.duration =
|
|
1241
|
+
deployment.metrics.duration =
|
|
1242
|
+
deployment.metrics.endTime.getTime() - deployment.metrics.startTime.getTime();
|
|
1202
1243
|
deployment.updatedAt = new Date();
|
|
1203
1244
|
|
|
1204
1245
|
this.addAuditEntry(deployment, 'system', 'deployment_completed', 'deployment', {
|
|
1205
1246
|
deploymentId: deployment.id,
|
|
1206
|
-
duration: deployment.metrics.duration
|
|
1247
|
+
duration: deployment.metrics.duration,
|
|
1207
1248
|
});
|
|
1208
1249
|
|
|
1209
1250
|
await this.saveDeployment(deployment);
|
|
@@ -1215,14 +1256,15 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1215
1256
|
private async getPreviousSuccessfulDeployment(
|
|
1216
1257
|
projectId: string,
|
|
1217
1258
|
environmentId: string,
|
|
1218
|
-
currentDeploymentId: string
|
|
1259
|
+
currentDeploymentId: string,
|
|
1219
1260
|
): Promise<Deployment | null> {
|
|
1220
1261
|
const deployments = Array.from(this.deployments.values())
|
|
1221
|
-
.filter(
|
|
1222
|
-
d
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1262
|
+
.filter(
|
|
1263
|
+
(d) =>
|
|
1264
|
+
d.projectId === projectId &&
|
|
1265
|
+
d.environmentId === environmentId &&
|
|
1266
|
+
d.status === 'success' &&
|
|
1267
|
+
d.id !== currentDeploymentId,
|
|
1226
1268
|
)
|
|
1227
1269
|
.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
|
1228
1270
|
|
|
@@ -1231,62 +1273,63 @@ export class DeploymentManager extends EventEmitter {
|
|
|
1231
1273
|
|
|
1232
1274
|
private async executeRollbackStrategy(
|
|
1233
1275
|
deployment: Deployment,
|
|
1234
|
-
previousDeployment: Deployment
|
|
1276
|
+
previousDeployment: Deployment,
|
|
1235
1277
|
): Promise<void> {
|
|
1236
1278
|
// Implement rollback execution logic
|
|
1237
1279
|
this.logger.info(`Executing rollback from ${deployment.id} to ${previousDeployment.id}`);
|
|
1238
|
-
|
|
1280
|
+
|
|
1239
1281
|
// This would typically involve:
|
|
1240
1282
|
// 1. Switching traffic back to previous version
|
|
1241
1283
|
// 2. Updating load balancer configuration
|
|
1242
1284
|
// 3. Rolling back container deployments
|
|
1243
1285
|
// 4. Reverting database migrations if needed
|
|
1244
1286
|
// 5. Updating DNS records
|
|
1245
|
-
|
|
1287
|
+
|
|
1246
1288
|
this.emit('rollback:executed', { deployment, previousDeployment });
|
|
1247
1289
|
}
|
|
1248
1290
|
|
|
1249
1291
|
private calculateDeploymentFrequency(deployments: Deployment[]): number {
|
|
1250
1292
|
if (deployments.length === 0) return 0;
|
|
1251
|
-
|
|
1252
|
-
const sortedDeployments = deployments.sort(
|
|
1253
|
-
a.createdAt.getTime() - b.createdAt.getTime()
|
|
1293
|
+
|
|
1294
|
+
const sortedDeployments = deployments.sort(
|
|
1295
|
+
(a, b) => a.createdAt.getTime() - b.createdAt.getTime(),
|
|
1254
1296
|
);
|
|
1255
|
-
|
|
1297
|
+
|
|
1256
1298
|
const firstDeployment = sortedDeployments[0];
|
|
1257
1299
|
const lastDeployment = sortedDeployments[sortedDeployments.length - 1];
|
|
1258
|
-
|
|
1300
|
+
|
|
1259
1301
|
const timeSpan = lastDeployment.createdAt.getTime() - firstDeployment.createdAt.getTime();
|
|
1260
1302
|
const days = timeSpan / (1000 * 60 * 60 * 24);
|
|
1261
|
-
|
|
1303
|
+
|
|
1262
1304
|
return deployments.length / Math.max(days, 1);
|
|
1263
1305
|
}
|
|
1264
1306
|
|
|
1265
1307
|
private calculateMTTR(deployments: Deployment[]): number {
|
|
1266
|
-
const failedDeployments = deployments.filter(
|
|
1267
|
-
d.status === 'failed' || d.status === 'rolled-back'
|
|
1308
|
+
const failedDeployments = deployments.filter(
|
|
1309
|
+
(d) => d.status === 'failed' || d.status === 'rolled-back',
|
|
1268
1310
|
);
|
|
1269
|
-
|
|
1311
|
+
|
|
1270
1312
|
if (failedDeployments.length === 0) return 0;
|
|
1271
|
-
|
|
1313
|
+
|
|
1272
1314
|
const recoveryTimes = failedDeployments
|
|
1273
|
-
.map(d => d.rollback?.rollbackDuration || 0)
|
|
1274
|
-
.filter(time => time > 0);
|
|
1275
|
-
|
|
1315
|
+
.map((d) => d.rollback?.rollbackDuration || 0)
|
|
1316
|
+
.filter((time) => time > 0);
|
|
1317
|
+
|
|
1276
1318
|
if (recoveryTimes.length === 0) return 0;
|
|
1277
|
-
|
|
1319
|
+
|
|
1278
1320
|
return recoveryTimes.reduce((sum, time) => sum + time, 0) / recoveryTimes.length;
|
|
1279
1321
|
}
|
|
1280
1322
|
|
|
1281
1323
|
private calculateLeadTime(deployments: Deployment[]): number {
|
|
1282
1324
|
// This would typically calculate from commit to production
|
|
1283
1325
|
// For now, return average deployment time
|
|
1284
|
-
const completedDeployments = deployments.filter(d => d.metrics.duration);
|
|
1285
|
-
|
|
1326
|
+
const completedDeployments = deployments.filter((d) => d.metrics.duration);
|
|
1327
|
+
|
|
1286
1328
|
if (completedDeployments.length === 0) return 0;
|
|
1287
|
-
|
|
1288
|
-
return
|
|
1289
|
-
sum + (d.metrics.duration || 0), 0
|
|
1290
|
-
|
|
1329
|
+
|
|
1330
|
+
return (
|
|
1331
|
+
completedDeployments.reduce((sum, d) => sum + (d.metrics.duration || 0), 0) /
|
|
1332
|
+
completedDeployments.length
|
|
1333
|
+
);
|
|
1291
1334
|
}
|
|
1292
|
-
}
|
|
1335
|
+
}
|