agentic-qe 1.0.0
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/agents/analysis/code-analyzer.md +209 -0
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude/agents/base-template-generator.md +42 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +63 -0
- package/.claude/agents/consensus/crdt-synchronizer.md +997 -0
- package/.claude/agents/consensus/gossip-coordinator.md +63 -0
- package/.claude/agents/consensus/performance-benchmarker.md +851 -0
- package/.claude/agents/consensus/quorum-manager.md +823 -0
- package/.claude/agents/consensus/raft-manager.md +63 -0
- package/.claude/agents/consensus/security-manager.md +622 -0
- package/.claude/agents/core/coder.md +266 -0
- package/.claude/agents/core/planner.md +168 -0
- package/.claude/agents/core/researcher.md +190 -0
- package/.claude/agents/core/reviewer.md +326 -0
- package/.claude/agents/core/tester.md +319 -0
- package/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude/agents/flow-nexus/app-store.md +88 -0
- package/.claude/agents/flow-nexus/authentication.md +69 -0
- package/.claude/agents/flow-nexus/challenges.md +81 -0
- package/.claude/agents/flow-nexus/neural-network.md +88 -0
- package/.claude/agents/flow-nexus/payments.md +83 -0
- package/.claude/agents/flow-nexus/sandbox.md +76 -0
- package/.claude/agents/flow-nexus/swarm.md +76 -0
- package/.claude/agents/flow-nexus/user-tools.md +96 -0
- package/.claude/agents/flow-nexus/workflow.md +84 -0
- package/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude/agents/github/github-modes.md +173 -0
- package/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude/agents/github/pr-manager.md +191 -0
- package/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude/agents/github/release-manager.md +367 -0
- package/.claude/agents/github/release-swarm.md +583 -0
- package/.claude/agents/github/repo-architect.md +398 -0
- package/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude/agents/goal/code-goal-planner.md +446 -0
- package/.claude/agents/goal/goal-planner.md +168 -0
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +130 -0
- package/.claude/agents/hive-mind/queen-coordinator.md +203 -0
- package/.claude/agents/hive-mind/scout-explorer.md +242 -0
- package/.claude/agents/hive-mind/swarm-memory-manager.md +193 -0
- package/.claude/agents/hive-mind/worker-specialist.md +217 -0
- package/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude/agents/qe-api-contract-validator.md +1088 -0
- package/.claude/agents/qe-chaos-engineer.md +736 -0
- package/.claude/agents/qe-coverage-analyzer.md +282 -0
- package/.claude/agents/qe-deployment-readiness.md +1109 -0
- package/.claude/agents/qe-flaky-test-hunter.md +1121 -0
- package/.claude/agents/qe-fleet-commander.md +641 -0
- package/.claude/agents/qe-performance-tester.md +354 -0
- package/.claude/agents/qe-production-intelligence.md +1162 -0
- package/.claude/agents/qe-quality-gate.md +294 -0
- package/.claude/agents/qe-regression-risk-analyzer.md +947 -0
- package/.claude/agents/qe-requirements-validator.md +691 -0
- package/.claude/agents/qe-security-scanner.md +430 -0
- package/.claude/agents/qe-test-data-architect.md +1007 -0
- package/.claude/agents/qe-test-executor.md +365 -0
- package/.claude/agents/qe-test-generator.md +332 -0
- package/.claude/agents/qe-visual-tester.md +754 -0
- package/.claude/agents/sparc/architecture.md +472 -0
- package/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude/agents/sparc/refinement.md +525 -0
- package/.claude/agents/sparc/specification.md +276 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude/agents/swarm/hierarchical-coordinator.md +327 -0
- package/.claude/agents/swarm/mesh-coordinator.md +392 -0
- package/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude/agents/templates/coordinator-swarm-init.md +105 -0
- package/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude/aqe-fleet.json +47 -0
- package/.claude/commands/README.md +106 -0
- package/.claude/commands/agents/README.md +10 -0
- package/.claude/commands/agents/agent-capabilities.md +21 -0
- package/.claude/commands/agents/agent-coordination.md +28 -0
- package/.claude/commands/agents/agent-spawning.md +28 -0
- package/.claude/commands/agents/agent-types.md +26 -0
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +54 -0
- package/.claude/commands/analysis/README.md +9 -0
- package/.claude/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude/commands/analysis/performance-bottlenecks.md +59 -0
- package/.claude/commands/analysis/performance-report.md +25 -0
- package/.claude/commands/analysis/token-efficiency.md +45 -0
- package/.claude/commands/analysis/token-usage.md +25 -0
- package/.claude/commands/aqe-analyze.md +344 -0
- package/.claude/commands/aqe-benchmark.md +466 -0
- package/.claude/commands/aqe-chaos.md +443 -0
- package/.claude/commands/aqe-execute.md +322 -0
- package/.claude/commands/aqe-fleet-status.md +431 -0
- package/.claude/commands/aqe-generate.md +301 -0
- package/.claude/commands/aqe-optimize.md +361 -0
- package/.claude/commands/aqe-report.md +411 -0
- package/.claude/commands/automation/README.md +9 -0
- package/.claude/commands/automation/auto-agent.md +122 -0
- package/.claude/commands/automation/self-healing.md +106 -0
- package/.claude/commands/automation/session-memory.md +90 -0
- package/.claude/commands/automation/smart-agents.md +73 -0
- package/.claude/commands/automation/smart-spawn.md +25 -0
- package/.claude/commands/automation/workflow-select.md +25 -0
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/coordination/agent-spawn.md +25 -0
- package/.claude/commands/coordination/init.md +44 -0
- package/.claude/commands/coordination/orchestrate.md +43 -0
- package/.claude/commands/coordination/spawn.md +45 -0
- package/.claude/commands/coordination/swarm-init.md +85 -0
- package/.claude/commands/coordination/task-orchestrate.md +25 -0
- package/.claude/commands/flow-nexus/app-store.md +124 -0
- package/.claude/commands/flow-nexus/challenges.md +120 -0
- package/.claude/commands/flow-nexus/login-registration.md +65 -0
- package/.claude/commands/flow-nexus/neural-network.md +134 -0
- package/.claude/commands/flow-nexus/payments.md +116 -0
- package/.claude/commands/flow-nexus/sandbox.md +83 -0
- package/.claude/commands/flow-nexus/swarm.md +87 -0
- package/.claude/commands/flow-nexus/user-tools.md +152 -0
- package/.claude/commands/flow-nexus/workflow.md +115 -0
- package/.claude/commands/github/README.md +11 -0
- package/.claude/commands/github/code-review-swarm.md +514 -0
- package/.claude/commands/github/code-review.md +25 -0
- package/.claude/commands/github/github-modes.md +147 -0
- package/.claude/commands/github/github-swarm.md +121 -0
- package/.claude/commands/github/issue-tracker.md +292 -0
- package/.claude/commands/github/issue-triage.md +25 -0
- package/.claude/commands/github/multi-repo-swarm.md +519 -0
- package/.claude/commands/github/pr-enhance.md +26 -0
- package/.claude/commands/github/pr-manager.md +170 -0
- package/.claude/commands/github/project-board-sync.md +471 -0
- package/.claude/commands/github/release-manager.md +338 -0
- package/.claude/commands/github/release-swarm.md +544 -0
- package/.claude/commands/github/repo-analyze.md +25 -0
- package/.claude/commands/github/repo-architect.md +367 -0
- package/.claude/commands/github/swarm-issue.md +482 -0
- package/.claude/commands/github/swarm-pr.md +285 -0
- package/.claude/commands/github/sync-coordinator.md +301 -0
- package/.claude/commands/github/workflow-automation.md +442 -0
- package/.claude/commands/hive-mind/README.md +17 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
- package/.claude/commands/hive-mind/hive-mind.md +27 -0
- package/.claude/commands/hooks/README.md +11 -0
- package/.claude/commands/hooks/overview.md +132 -0
- package/.claude/commands/hooks/post-edit.md +117 -0
- package/.claude/commands/hooks/post-task.md +112 -0
- package/.claude/commands/hooks/pre-edit.md +113 -0
- package/.claude/commands/hooks/pre-task.md +111 -0
- package/.claude/commands/hooks/session-end.md +118 -0
- package/.claude/commands/hooks/setup.md +103 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/commands/memory/memory-persist.md +25 -0
- package/.claude/commands/memory/memory-search.md +25 -0
- package/.claude/commands/memory/memory-usage.md +25 -0
- package/.claude/commands/memory/neural.md +47 -0
- package/.claude/commands/memory/usage.md +46 -0
- package/.claude/commands/monitoring/README.md +9 -0
- package/.claude/commands/monitoring/agent-metrics.md +25 -0
- package/.claude/commands/monitoring/agents.md +44 -0
- package/.claude/commands/monitoring/real-time-view.md +25 -0
- package/.claude/commands/monitoring/status.md +46 -0
- package/.claude/commands/monitoring/swarm-monitor.md +25 -0
- package/.claude/commands/optimization/README.md +9 -0
- package/.claude/commands/optimization/auto-topology.md +62 -0
- package/.claude/commands/optimization/cache-manage.md +25 -0
- package/.claude/commands/optimization/parallel-execute.md +25 -0
- package/.claude/commands/optimization/parallel-execution.md +50 -0
- package/.claude/commands/optimization/topology-optimize.md +25 -0
- package/.claude/commands/pair/commands.md +546 -0
- package/.claude/commands/pair/config.md +510 -0
- package/.claude/commands/pair/examples.md +512 -0
- package/.claude/commands/pair/modes.md +348 -0
- package/.claude/commands/pair/session.md +407 -0
- package/.claude/commands/pair/start.md +209 -0
- package/.claude/commands/sparc/analyzer.md +52 -0
- package/.claude/commands/sparc/architect.md +53 -0
- package/.claude/commands/sparc/batch-executor.md +54 -0
- package/.claude/commands/sparc/coder.md +54 -0
- package/.claude/commands/sparc/debugger.md +54 -0
- package/.claude/commands/sparc/designer.md +53 -0
- package/.claude/commands/sparc/documenter.md +54 -0
- package/.claude/commands/sparc/innovator.md +54 -0
- package/.claude/commands/sparc/memory-manager.md +54 -0
- package/.claude/commands/sparc/optimizer.md +54 -0
- package/.claude/commands/sparc/orchestrator.md +132 -0
- package/.claude/commands/sparc/researcher.md +54 -0
- package/.claude/commands/sparc/reviewer.md +54 -0
- package/.claude/commands/sparc/sparc-modes.md +174 -0
- package/.claude/commands/sparc/swarm-coordinator.md +54 -0
- package/.claude/commands/sparc/tdd.md +54 -0
- package/.claude/commands/sparc/tester.md +54 -0
- package/.claude/commands/sparc/workflow-manager.md +54 -0
- package/.claude/commands/stream-chain/pipeline.md +121 -0
- package/.claude/commands/stream-chain/run.md +70 -0
- package/.claude/commands/swarm/README.md +15 -0
- package/.claude/commands/swarm/analysis.md +95 -0
- package/.claude/commands/swarm/development.md +96 -0
- package/.claude/commands/swarm/examples.md +168 -0
- package/.claude/commands/swarm/maintenance.md +102 -0
- package/.claude/commands/swarm/optimization.md +117 -0
- package/.claude/commands/swarm/research.md +136 -0
- package/.claude/commands/swarm/swarm-analysis.md +8 -0
- package/.claude/commands/swarm/swarm-background.md +8 -0
- package/.claude/commands/swarm/swarm-init.md +19 -0
- package/.claude/commands/swarm/swarm-modes.md +8 -0
- package/.claude/commands/swarm/swarm-monitor.md +8 -0
- package/.claude/commands/swarm/swarm-spawn.md +19 -0
- package/.claude/commands/swarm/swarm-status.md +8 -0
- package/.claude/commands/swarm/swarm-strategies.md +8 -0
- package/.claude/commands/swarm/swarm.md +27 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/training/README.md +9 -0
- package/.claude/commands/training/model-update.md +25 -0
- package/.claude/commands/training/neural-patterns.md +74 -0
- package/.claude/commands/training/neural-train.md +25 -0
- package/.claude/commands/training/pattern-learn.md +25 -0
- package/.claude/commands/training/specialization.md +63 -0
- package/.claude/commands/truth/start.md +143 -0
- package/.claude/commands/verify/check.md +50 -0
- package/.claude/commands/verify/start.md +128 -0
- package/.claude/commands/workflows/README.md +9 -0
- package/.claude/commands/workflows/development.md +78 -0
- package/.claude/commands/workflows/research.md +63 -0
- package/.claude/commands/workflows/workflow-create.md +25 -0
- package/.claude/commands/workflows/workflow-execute.md +25 -0
- package/.claude/commands/workflows/workflow-export.md +25 -0
- package/.claude/helpers/checkpoint-manager.sh +251 -0
- package/.claude/helpers/github-safe.js +106 -0
- package/.claude/helpers/github-setup.sh +28 -0
- package/.claude/helpers/quick-start.sh +19 -0
- package/.claude/helpers/setup-mcp.sh +18 -0
- package/.claude/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude/settings.json +114 -0
- package/.claude/settings.local.json +10 -0
- package/CONTRIBUTING.md +897 -0
- package/LICENSE +21 -0
- package/README.md +632 -0
- package/bin/aqe +959 -0
- package/config/fleet.yaml +50 -0
- package/dist/agents/ApiContractValidatorAgent.d.ts +222 -0
- package/dist/agents/ApiContractValidatorAgent.d.ts.map +1 -0
- package/dist/agents/ApiContractValidatorAgent.js +787 -0
- package/dist/agents/ApiContractValidatorAgent.js.map +1 -0
- package/dist/agents/BaseAgent.d.ts +147 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -0
- package/dist/agents/BaseAgent.js +374 -0
- package/dist/agents/BaseAgent.js.map +1 -0
- package/dist/agents/CoverageAnalyzerAgent.d.ts +103 -0
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/CoverageAnalyzerAgent.js +466 -0
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -0
- package/dist/agents/DeploymentReadinessAgent.d.ts +244 -0
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -0
- package/dist/agents/DeploymentReadinessAgent.js +974 -0
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts +172 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -0
- package/dist/agents/FlakyTestHunterAgent.js +867 -0
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -0
- package/dist/agents/FleetCommanderAgent.d.ts +154 -0
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -0
- package/dist/agents/FleetCommanderAgent.js +924 -0
- package/dist/agents/FleetCommanderAgent.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts +194 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -0
- package/dist/agents/PerformanceTesterAgent.js +972 -0
- package/dist/agents/PerformanceTesterAgent.js.map +1 -0
- package/dist/agents/ProductionIntelligenceAgent.d.ts +224 -0
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -0
- package/dist/agents/ProductionIntelligenceAgent.js +856 -0
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -0
- package/dist/agents/QualityAnalyzerAgent.d.ts +67 -0
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/QualityAnalyzerAgent.js +453 -0
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -0
- package/dist/agents/QualityGateAgent.d.ts +104 -0
- package/dist/agents/QualityGateAgent.d.ts.map +1 -0
- package/dist/agents/QualityGateAgent.js +522 -0
- package/dist/agents/QualityGateAgent.js.map +1 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts +274 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.js +1076 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -0
- package/dist/agents/RequirementsValidatorAgent.d.ts +195 -0
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -0
- package/dist/agents/RequirementsValidatorAgent.js +992 -0
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -0
- package/dist/agents/SecurityScannerAgent.d.ts +126 -0
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -0
- package/dist/agents/SecurityScannerAgent.js +695 -0
- package/dist/agents/SecurityScannerAgent.js.map +1 -0
- package/dist/agents/TestDataArchitectAgent.d.ts +452 -0
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -0
- package/dist/agents/TestDataArchitectAgent.js +1346 -0
- package/dist/agents/TestDataArchitectAgent.js.map +1 -0
- package/dist/agents/TestExecutorAgent.d.ts +101 -0
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -0
- package/dist/agents/TestExecutorAgent.js +730 -0
- package/dist/agents/TestExecutorAgent.js.map +1 -0
- package/dist/agents/TestGeneratorAgent.d.ts +109 -0
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -0
- package/dist/agents/TestGeneratorAgent.js +450 -0
- package/dist/agents/TestGeneratorAgent.js.map +1 -0
- package/dist/agents/index.d.ts +51 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +738 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +32 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +764 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/fleet.d.ts +36 -0
- package/dist/cli/commands/fleet.d.ts.map +1 -0
- package/dist/cli/commands/fleet.js +745 -0
- package/dist/cli/commands/fleet.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +24 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +424 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/init.d.ts +17 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +570 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/run.d.ts +25 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +558 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/index-spec.d.ts +3 -0
- package/dist/cli/index-spec.d.ts.map +1 -0
- package/dist/cli/index-spec.js +154 -0
- package/dist/cli/index-spec.js.map +1 -0
- package/dist/cli/index-working.d.ts +7 -0
- package/dist/cli/index-working.d.ts.map +1 -0
- package/dist/cli/index-working.js +470 -0
- package/dist/cli/index-working.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +174 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/Agent.d.ts +189 -0
- package/dist/core/Agent.d.ts.map +1 -0
- package/dist/core/Agent.js +288 -0
- package/dist/core/Agent.js.map +1 -0
- package/dist/core/EventBus.d.ts +40 -0
- package/dist/core/EventBus.d.ts.map +1 -0
- package/dist/core/EventBus.js +114 -0
- package/dist/core/EventBus.js.map +1 -0
- package/dist/core/FleetManager.d.ts +219 -0
- package/dist/core/FleetManager.d.ts.map +1 -0
- package/dist/core/FleetManager.js +354 -0
- package/dist/core/FleetManager.js.map +1 -0
- package/dist/core/MemoryManager.d.ts +119 -0
- package/dist/core/MemoryManager.d.ts.map +1 -0
- package/dist/core/MemoryManager.js +460 -0
- package/dist/core/MemoryManager.js.map +1 -0
- package/dist/core/Task.d.ts +264 -0
- package/dist/core/Task.d.ts.map +1 -0
- package/dist/core/Task.js +397 -0
- package/dist/core/Task.js.map +1 -0
- package/dist/core/coverage-analyzer.d.ts +50 -0
- package/dist/core/coverage-analyzer.d.ts.map +1 -0
- package/dist/core/coverage-analyzer.js +146 -0
- package/dist/core/coverage-analyzer.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +20 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/quality-gate.d.ts +81 -0
- package/dist/core/quality-gate.d.ts.map +1 -0
- package/dist/core/quality-gate.js +254 -0
- package/dist/core/quality-gate.js.map +1 -0
- package/dist/coverage/coverage-collector.d.ts +62 -0
- package/dist/coverage/coverage-collector.d.ts.map +1 -0
- package/dist/coverage/coverage-collector.js +61 -0
- package/dist/coverage/coverage-collector.js.map +1 -0
- package/dist/coverage/coverage-reporter.d.ts +42 -0
- package/dist/coverage/coverage-reporter.d.ts.map +1 -0
- package/dist/coverage/coverage-reporter.js +53 -0
- package/dist/coverage/coverage-reporter.js.map +1 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/handlers/agent-spawn.d.ts +72 -0
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -0
- package/dist/mcp/handlers/agent-spawn.js +255 -0
- package/dist/mcp/handlers/agent-spawn.js.map +1 -0
- package/dist/mcp/handlers/base-handler.d.ts +53 -0
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -0
- package/dist/mcp/handlers/base-handler.js +77 -0
- package/dist/mcp/handlers/base-handler.js.map +1 -0
- package/dist/mcp/handlers/fleet-init.d.ts +55 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -0
- package/dist/mcp/handlers/fleet-init.js +149 -0
- package/dist/mcp/handlers/fleet-init.js.map +1 -0
- package/dist/mcp/handlers/fleet-status.d.ts +103 -0
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -0
- package/dist/mcp/handlers/fleet-status.js +244 -0
- package/dist/mcp/handlers/fleet-status.js.map +1 -0
- package/dist/mcp/handlers/optimize-tests.d.ts +219 -0
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -0
- package/dist/mcp/handlers/optimize-tests.js +532 -0
- package/dist/mcp/handlers/optimize-tests.js.map +1 -0
- package/dist/mcp/handlers/predict-defects.d.ts +194 -0
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -0
- package/dist/mcp/handlers/predict-defects.js +721 -0
- package/dist/mcp/handlers/predict-defects.js.map +1 -0
- package/dist/mcp/handlers/quality-analyze.d.ts +273 -0
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -0
- package/dist/mcp/handlers/quality-analyze.js +702 -0
- package/dist/mcp/handlers/quality-analyze.js.map +1 -0
- package/dist/mcp/handlers/task-orchestrate.d.ts +152 -0
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -0
- package/dist/mcp/handlers/task-orchestrate.js +629 -0
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -0
- package/dist/mcp/handlers/test-execute.d.ts +132 -0
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -0
- package/dist/mcp/handlers/test-execute.js +436 -0
- package/dist/mcp/handlers/test-execute.js.map +1 -0
- package/dist/mcp/handlers/test-generate.d.ts +107 -0
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -0
- package/dist/mcp/handlers/test-generate.js +437 -0
- package/dist/mcp/handlers/test-generate.js.map +1 -0
- package/dist/mcp/server.d.ts +99 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +214 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/services/AgentRegistry.d.ts +191 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -0
- package/dist/mcp/services/AgentRegistry.js +403 -0
- package/dist/mcp/services/AgentRegistry.js.map +1 -0
- package/dist/mcp/services/HookExecutor.d.ts +165 -0
- package/dist/mcp/services/HookExecutor.d.ts.map +1 -0
- package/dist/mcp/services/HookExecutor.js +327 -0
- package/dist/mcp/services/HookExecutor.js.map +1 -0
- package/dist/mcp/start.d.ts +7 -0
- package/dist/mcp/start.d.ts.map +1 -0
- package/dist/mcp/start.js +35 -0
- package/dist/mcp/start.js.map +1 -0
- package/dist/mcp/tools.d.ts +81 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +471 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/optimization/sublinear-solver.d.ts +72 -0
- package/dist/optimization/sublinear-solver.d.ts.map +1 -0
- package/dist/optimization/sublinear-solver.js +263 -0
- package/dist/optimization/sublinear-solver.js.map +1 -0
- package/dist/scripts/verifyComplexity.d.ts +8 -0
- package/dist/scripts/verifyComplexity.d.ts.map +1 -0
- package/dist/scripts/verifyComplexity.js +56 -0
- package/dist/scripts/verifyComplexity.js.map +1 -0
- package/dist/types/api-contract.types.d.ts +273 -0
- package/dist/types/api-contract.types.d.ts.map +1 -0
- package/dist/types/api-contract.types.js +18 -0
- package/dist/types/api-contract.types.js.map +1 -0
- package/dist/types/errors.d.ts +104 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +226 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/events.d.ts +101 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +6 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/index.d.ts +570 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +131 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/Config.d.ts +128 -0
- package/dist/utils/Config.d.ts.map +1 -0
- package/dist/utils/Config.js +232 -0
- package/dist/utils/Config.js.map +1 -0
- package/dist/utils/Database.d.ts +112 -0
- package/dist/utils/Database.d.ts.map +1 -0
- package/dist/utils/Database.js +352 -0
- package/dist/utils/Database.js.map +1 -0
- package/dist/utils/Logger.d.ts +58 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +125 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/sublinear/coverageOptimizer.d.ts +84 -0
- package/dist/utils/sublinear/coverageOptimizer.d.ts.map +1 -0
- package/dist/utils/sublinear/coverageOptimizer.js +415 -0
- package/dist/utils/sublinear/coverageOptimizer.js.map +1 -0
- package/dist/utils/sublinear/index.d.ts +50 -0
- package/dist/utils/sublinear/index.d.ts.map +1 -0
- package/dist/utils/sublinear/index.js +390 -0
- package/dist/utils/sublinear/index.js.map +1 -0
- package/dist/utils/sublinear/matrixSolver.d.ts +132 -0
- package/dist/utils/sublinear/matrixSolver.d.ts.map +1 -0
- package/dist/utils/sublinear/matrixSolver.js +642 -0
- package/dist/utils/sublinear/matrixSolver.js.map +1 -0
- package/dist/utils/sublinear/temporalPredictor.d.ts +195 -0
- package/dist/utils/sublinear/temporalPredictor.d.ts.map +1 -0
- package/dist/utils/sublinear/temporalPredictor.js +474 -0
- package/dist/utils/sublinear/temporalPredictor.js.map +1 -0
- package/dist/utils/sublinear/testSelector.d.ts +81 -0
- package/dist/utils/sublinear/testSelector.d.ts.map +1 -0
- package/dist/utils/sublinear/testSelector.js +303 -0
- package/dist/utils/sublinear/testSelector.js.map +1 -0
- package/package.json +131 -0
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.FleetCommand = void 0;
|
|
30
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
31
|
+
const ora_1 = __importDefault(require("ora"));
|
|
32
|
+
const fs = __importStar(require("fs-extra"));
|
|
33
|
+
class FleetCommand {
|
|
34
|
+
static async execute(action, options) {
|
|
35
|
+
console.log(chalk_1.default.blue.bold('\n🚁 Fleet Management Operations\n'));
|
|
36
|
+
try {
|
|
37
|
+
// Validate inputs
|
|
38
|
+
await this.validateInputs(action, options);
|
|
39
|
+
const spinner = (0, ora_1.default)('Initializing fleet operation...').start();
|
|
40
|
+
// Execute the requested action
|
|
41
|
+
switch (action) {
|
|
42
|
+
case 'status':
|
|
43
|
+
await this.showFleetStatus(options, spinner);
|
|
44
|
+
break;
|
|
45
|
+
case 'scale':
|
|
46
|
+
await this.scaleFleet(options, spinner);
|
|
47
|
+
break;
|
|
48
|
+
case 'deploy':
|
|
49
|
+
await this.deployFleet(options, spinner);
|
|
50
|
+
break;
|
|
51
|
+
case 'destroy':
|
|
52
|
+
await this.destroyFleet(options, spinner);
|
|
53
|
+
break;
|
|
54
|
+
case 'health':
|
|
55
|
+
await this.healthCheck(options, spinner);
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
await this.showFleetStatus(options, spinner);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error(chalk_1.default.red('❌ Fleet operation failed:'), error.message);
|
|
63
|
+
if (options.verbose) {
|
|
64
|
+
console.error(chalk_1.default.gray(error.stack));
|
|
65
|
+
}
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
static async validateInputs(action, options) {
|
|
70
|
+
const validActions = ['status', 'scale', 'deploy', 'destroy', 'health'];
|
|
71
|
+
if (!validActions.includes(action)) {
|
|
72
|
+
throw new Error(`Invalid action '${action}'. Must be one of: ${validActions.join(', ')}`);
|
|
73
|
+
}
|
|
74
|
+
if (action === 'scale' && !options.agents) {
|
|
75
|
+
throw new Error('Agent count required for scaling operation');
|
|
76
|
+
}
|
|
77
|
+
if (action === 'scale' && options.agents) {
|
|
78
|
+
const agentCount = parseInt(options.agents);
|
|
79
|
+
if (agentCount < 1 || agentCount > 50) {
|
|
80
|
+
throw new Error('Agent count must be between 1 and 50');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Check if fleet configuration exists
|
|
84
|
+
if (!await fs.pathExists('.agentic-qe/config/fleet.json')) {
|
|
85
|
+
throw new Error('Fleet not initialized. Run: agentic-qe init');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
static async showFleetStatus(options, spinner) {
|
|
89
|
+
spinner.text = 'Loading fleet configuration...';
|
|
90
|
+
// Load fleet configuration
|
|
91
|
+
const fleetConfig = await fs.readJson('.agentic-qe/config/fleet.json');
|
|
92
|
+
const agentConfig = await fs.readJson('.agentic-qe/config/agents.json');
|
|
93
|
+
spinner.text = 'Analyzing fleet status...';
|
|
94
|
+
// Load fleet registry
|
|
95
|
+
const registryPath = '.agentic-qe/data/registry.json';
|
|
96
|
+
let fleetRegistry = { fleet: { agents: [], status: 'unknown' } };
|
|
97
|
+
if (await fs.pathExists(registryPath)) {
|
|
98
|
+
fleetRegistry = await fs.readJson(registryPath);
|
|
99
|
+
}
|
|
100
|
+
// Get execution history
|
|
101
|
+
const executionHistory = await this.getExecutionHistory();
|
|
102
|
+
// Analyze agent performance
|
|
103
|
+
const agentPerformance = await this.analyzeAgentPerformance();
|
|
104
|
+
spinner.succeed(chalk_1.default.green('Fleet status loaded successfully!'));
|
|
105
|
+
// Display comprehensive status
|
|
106
|
+
this.displayFleetStatus(fleetConfig, agentConfig, fleetRegistry, executionHistory, agentPerformance, options);
|
|
107
|
+
// Store status check in coordination
|
|
108
|
+
await this.storeStatusCheck();
|
|
109
|
+
}
|
|
110
|
+
static async scaleFleet(options, spinner) {
|
|
111
|
+
const targetAgents = parseInt(options.agents);
|
|
112
|
+
spinner.text = `Scaling fleet to ${targetAgents} agents...`;
|
|
113
|
+
// Load current configuration
|
|
114
|
+
const fleetConfig = await fs.readJson('.agentic-qe/config/fleet.json');
|
|
115
|
+
const agentConfig = await fs.readJson('.agentic-qe/config/agents.json');
|
|
116
|
+
// Calculate scaling changes
|
|
117
|
+
const currentAgents = fleetConfig.maxAgents;
|
|
118
|
+
const scalingOperation = targetAgents > currentAgents ? 'scale-up' : 'scale-down';
|
|
119
|
+
spinner.text = `Performing ${scalingOperation} operation...`;
|
|
120
|
+
// Update configuration
|
|
121
|
+
fleetConfig.maxAgents = targetAgents;
|
|
122
|
+
fleetConfig.lastModified = new Date().toISOString();
|
|
123
|
+
// Update agent distribution
|
|
124
|
+
const agentTypes = agentConfig.fleet.agents;
|
|
125
|
+
const agentsPerType = Math.ceil(targetAgents / agentTypes.length);
|
|
126
|
+
agentTypes.forEach((agent) => {
|
|
127
|
+
agent.count = Math.min(agentsPerType, targetAgents);
|
|
128
|
+
});
|
|
129
|
+
agentConfig.fleet.maxAgents = targetAgents;
|
|
130
|
+
spinner.text = 'Updating configuration files...';
|
|
131
|
+
// Save updated configurations
|
|
132
|
+
await fs.writeJson('.agentic-qe/config/fleet.json', fleetConfig, { spaces: 2 });
|
|
133
|
+
await fs.writeJson('.agentic-qe/config/agents.json', agentConfig, { spaces: 2 });
|
|
134
|
+
// Generate scaling script
|
|
135
|
+
await this.generateScalingScript(scalingOperation, currentAgents, targetAgents, options);
|
|
136
|
+
spinner.succeed(chalk_1.default.green(`Fleet scaled from ${currentAgents} to ${targetAgents} agents!`));
|
|
137
|
+
// Display scaling summary
|
|
138
|
+
this.displayScalingSummary(currentAgents, targetAgents, scalingOperation);
|
|
139
|
+
// Store scaling operation in coordination
|
|
140
|
+
await this.storeScalingOperation(currentAgents, targetAgents);
|
|
141
|
+
}
|
|
142
|
+
static async deployFleet(options, spinner) {
|
|
143
|
+
spinner.text = `Deploying fleet to ${options.env} environment...`;
|
|
144
|
+
// Load configurations
|
|
145
|
+
const fleetConfig = await fs.readJson('.agentic-qe/config/fleet.json');
|
|
146
|
+
const envConfig = await this.loadEnvironmentConfig(options.env);
|
|
147
|
+
spinner.text = 'Preparing deployment manifests...';
|
|
148
|
+
// Generate deployment configuration
|
|
149
|
+
const deploymentConfig = await this.generateDeploymentConfig(fleetConfig, envConfig, options);
|
|
150
|
+
spinner.text = 'Creating deployment artifacts...';
|
|
151
|
+
// Create deployment directory
|
|
152
|
+
const deploymentDir = `.agentic-qe/deployments/${options.env}-${Date.now()}`;
|
|
153
|
+
await fs.ensureDir(deploymentDir);
|
|
154
|
+
// Write deployment artifacts
|
|
155
|
+
await fs.writeJson(`${deploymentDir}/deployment.json`, deploymentConfig, { spaces: 2 });
|
|
156
|
+
// Generate deployment scripts
|
|
157
|
+
await this.generateDeploymentScripts(deploymentDir, deploymentConfig, options);
|
|
158
|
+
spinner.text = 'Validating deployment configuration...';
|
|
159
|
+
// Validate deployment
|
|
160
|
+
const validation = await this.validateDeployment(deploymentConfig);
|
|
161
|
+
if (!validation.valid) {
|
|
162
|
+
throw new Error(`Deployment validation failed: ${validation.errors.join(', ')}`);
|
|
163
|
+
}
|
|
164
|
+
spinner.succeed(chalk_1.default.green(`Fleet deployment prepared for ${options.env} environment!`));
|
|
165
|
+
// Display deployment summary
|
|
166
|
+
this.displayDeploymentSummary(deploymentConfig, validation, options);
|
|
167
|
+
// Store deployment operation
|
|
168
|
+
await this.storeDeploymentOperation(deploymentConfig);
|
|
169
|
+
}
|
|
170
|
+
static async destroyFleet(options, spinner) {
|
|
171
|
+
spinner.text = 'Initiating fleet destruction...';
|
|
172
|
+
// Load current configuration
|
|
173
|
+
const fleetConfig = await fs.readJson('.agentic-qe/config/fleet.json');
|
|
174
|
+
spinner.text = 'Stopping all agents gracefully...';
|
|
175
|
+
// Generate destruction script
|
|
176
|
+
const destructionScript = `#!/bin/bash
|
|
177
|
+
# Fleet Destruction Script
|
|
178
|
+
echo "Stopping Agentic QE Fleet..."
|
|
179
|
+
|
|
180
|
+
# Stop coordination
|
|
181
|
+
npx claude-flow@alpha hooks notify --message "Fleet destruction initiated"
|
|
182
|
+
|
|
183
|
+
# Archive current state
|
|
184
|
+
mkdir -p .agentic-qe/archive/$(date +%Y%m%d-%H%M%S)
|
|
185
|
+
cp -r .agentic-qe/data/* .agentic-qe/archive/$(date +%Y%m%d-%H%M%S)/
|
|
186
|
+
cp -r .agentic-qe/reports/* .agentic-qe/archive/$(date +%Y%m%d-%H%M%S)/
|
|
187
|
+
|
|
188
|
+
# Clear runtime data
|
|
189
|
+
rm -rf .agentic-qe/data/registry.json
|
|
190
|
+
rm -rf .agentic-qe/executions/*
|
|
191
|
+
|
|
192
|
+
echo "Fleet destroyed successfully"
|
|
193
|
+
npx claude-flow@alpha hooks notify --message "Fleet destruction completed"
|
|
194
|
+
`;
|
|
195
|
+
await fs.writeFile('.agentic-qe/scripts/destroy-fleet.sh', destructionScript);
|
|
196
|
+
await fs.chmod('.agentic-qe/scripts/destroy-fleet.sh', '755');
|
|
197
|
+
spinner.text = 'Archiving fleet data...';
|
|
198
|
+
// Create archive
|
|
199
|
+
const archiveDir = `.agentic-qe/archive/${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}`;
|
|
200
|
+
await fs.ensureDir(archiveDir);
|
|
201
|
+
// Archive important data
|
|
202
|
+
const dataToArchive = [
|
|
203
|
+
'.agentic-qe/config',
|
|
204
|
+
'.agentic-qe/data',
|
|
205
|
+
'.agentic-qe/reports'
|
|
206
|
+
];
|
|
207
|
+
for (const dataPath of dataToArchive) {
|
|
208
|
+
if (await fs.pathExists(dataPath)) {
|
|
209
|
+
await fs.copy(dataPath, `${archiveDir}/${dataPath.split('/').pop()}`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
spinner.text = 'Cleaning up fleet resources...';
|
|
213
|
+
// Update fleet status
|
|
214
|
+
const destructionRecord = {
|
|
215
|
+
fleet: {
|
|
216
|
+
id: fleetConfig.fleet?.id || 'unknown',
|
|
217
|
+
status: 'destroyed',
|
|
218
|
+
destroyedAt: new Date().toISOString(),
|
|
219
|
+
reason: 'user_requested',
|
|
220
|
+
agentCount: fleetConfig.maxAgents
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
await fs.writeJson('.agentic-qe/data/destruction.json', destructionRecord, { spaces: 2 });
|
|
224
|
+
spinner.succeed(chalk_1.default.green('Fleet destroyed successfully!'));
|
|
225
|
+
// Display destruction summary
|
|
226
|
+
this.displayDestructionSummary(fleetConfig, archiveDir);
|
|
227
|
+
// Store destruction operation
|
|
228
|
+
await this.storeDestructionOperation(destructionRecord);
|
|
229
|
+
}
|
|
230
|
+
static async healthCheck(options, spinner) {
|
|
231
|
+
spinner.text = 'Running comprehensive health check...';
|
|
232
|
+
const healthReport = {
|
|
233
|
+
timestamp: new Date().toISOString(),
|
|
234
|
+
overall: 'unknown',
|
|
235
|
+
components: {},
|
|
236
|
+
issues: [],
|
|
237
|
+
recommendations: []
|
|
238
|
+
};
|
|
239
|
+
// Check configuration files
|
|
240
|
+
spinner.text = 'Checking configuration integrity...';
|
|
241
|
+
healthReport.components.configuration = await this.checkConfigurationHealth();
|
|
242
|
+
// Check data integrity
|
|
243
|
+
spinner.text = 'Checking data integrity...';
|
|
244
|
+
healthReport.components.data = await this.checkDataHealth();
|
|
245
|
+
// Check recent executions
|
|
246
|
+
spinner.text = 'Checking execution history...';
|
|
247
|
+
healthReport.components.executions = await this.checkExecutionHealth();
|
|
248
|
+
// Check coordination status
|
|
249
|
+
spinner.text = 'Checking coordination status...';
|
|
250
|
+
healthReport.components.coordination = await this.checkCoordinationHealth();
|
|
251
|
+
// Calculate overall health
|
|
252
|
+
const componentStatuses = Object.values(healthReport.components).map((c) => c.status);
|
|
253
|
+
const healthyCount = componentStatuses.filter((status) => status === 'healthy').length;
|
|
254
|
+
const totalCount = componentStatuses.length;
|
|
255
|
+
if (healthyCount === totalCount) {
|
|
256
|
+
healthReport.overall = 'healthy';
|
|
257
|
+
}
|
|
258
|
+
else if (healthyCount >= totalCount * 0.7) {
|
|
259
|
+
healthReport.overall = 'degraded';
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
healthReport.overall = 'critical';
|
|
263
|
+
}
|
|
264
|
+
// Generate recommendations
|
|
265
|
+
healthReport.recommendations = this.generateHealthRecommendations(healthReport.components);
|
|
266
|
+
spinner.succeed(chalk_1.default.green('Health check completed!'));
|
|
267
|
+
// Display health report
|
|
268
|
+
this.displayHealthReport(healthReport, options);
|
|
269
|
+
// Store health check results
|
|
270
|
+
await this.storeHealthCheck(healthReport);
|
|
271
|
+
}
|
|
272
|
+
static async getExecutionHistory() {
|
|
273
|
+
const reportsDir = '.agentic-qe/reports';
|
|
274
|
+
if (!await fs.pathExists(reportsDir)) {
|
|
275
|
+
return [];
|
|
276
|
+
}
|
|
277
|
+
const reportFiles = await fs.readdir(reportsDir);
|
|
278
|
+
const executionFiles = reportFiles
|
|
279
|
+
.filter(file => file.startsWith('execution-') && file.endsWith('.json'))
|
|
280
|
+
.sort()
|
|
281
|
+
.reverse()
|
|
282
|
+
.slice(0, 10); // Last 10 executions
|
|
283
|
+
const history = [];
|
|
284
|
+
for (const file of executionFiles) {
|
|
285
|
+
try {
|
|
286
|
+
const execution = await fs.readJson(`${reportsDir}/${file}`);
|
|
287
|
+
history.push(execution);
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
// Skip corrupted files
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return history;
|
|
294
|
+
}
|
|
295
|
+
static async analyzeAgentPerformance() {
|
|
296
|
+
const executionHistory = await this.getExecutionHistory();
|
|
297
|
+
const performance = {
|
|
298
|
+
totalExecutions: executionHistory.length,
|
|
299
|
+
averageSuccess: 0,
|
|
300
|
+
averageDuration: 0,
|
|
301
|
+
agentUtilization: {},
|
|
302
|
+
trends: 'stable'
|
|
303
|
+
};
|
|
304
|
+
if (executionHistory.length === 0) {
|
|
305
|
+
return performance;
|
|
306
|
+
}
|
|
307
|
+
// Calculate averages
|
|
308
|
+
const totalTests = executionHistory.reduce((sum, exec) => sum + (exec.summary?.total || 0), 0);
|
|
309
|
+
const passedTests = executionHistory.reduce((sum, exec) => sum + (exec.summary?.passed || 0), 0);
|
|
310
|
+
const totalDuration = executionHistory.reduce((sum, exec) => sum + (exec.summary?.duration || 0), 0);
|
|
311
|
+
performance.averageSuccess = totalTests > 0 ? (passedTests / totalTests) * 100 : 0;
|
|
312
|
+
performance.averageDuration = totalDuration / executionHistory.length;
|
|
313
|
+
// Analyze agent utilization
|
|
314
|
+
executionHistory.forEach(exec => {
|
|
315
|
+
Object.entries(exec.agents || {}).forEach(([agent, data]) => {
|
|
316
|
+
if (!performance.agentUtilization[agent]) {
|
|
317
|
+
performance.agentUtilization[agent] = {
|
|
318
|
+
usage: 0,
|
|
319
|
+
tasks: 0,
|
|
320
|
+
avgDuration: 0
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
performance.agentUtilization[agent].usage++;
|
|
324
|
+
performance.agentUtilization[agent].tasks += data.tasks || 0;
|
|
325
|
+
performance.agentUtilization[agent].avgDuration += data.duration || 0;
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
// Normalize agent utilization
|
|
329
|
+
Object.values(performance.agentUtilization).forEach((agent) => {
|
|
330
|
+
agent.avgDuration = agent.avgDuration / agent.usage;
|
|
331
|
+
});
|
|
332
|
+
return performance;
|
|
333
|
+
}
|
|
334
|
+
static displayFleetStatus(fleetConfig, agentConfig, registry, history, performance, options) {
|
|
335
|
+
console.log(chalk_1.default.yellow('\n🚁 Fleet Status Dashboard\n'));
|
|
336
|
+
// Basic fleet information
|
|
337
|
+
console.log(chalk_1.default.blue('📋 Fleet Configuration:'));
|
|
338
|
+
console.log(chalk_1.default.gray(` Topology: ${fleetConfig.topology}`));
|
|
339
|
+
console.log(chalk_1.default.gray(` Max Agents: ${fleetConfig.maxAgents}`));
|
|
340
|
+
console.log(chalk_1.default.gray(` Testing Focus: ${fleetConfig.testingFocus?.join(', ') || 'Not specified'}`));
|
|
341
|
+
console.log(chalk_1.default.gray(` Environments: ${fleetConfig.environments?.join(', ') || 'Not specified'}`));
|
|
342
|
+
// Agent configuration
|
|
343
|
+
console.log(chalk_1.default.blue('\n🤖 Agent Configuration:'));
|
|
344
|
+
const agents = agentConfig.fleet?.agents || [];
|
|
345
|
+
agents.forEach((agent) => {
|
|
346
|
+
console.log(chalk_1.default.gray(` ${agent.type}: ${agent.count} instances`));
|
|
347
|
+
});
|
|
348
|
+
// Fleet status
|
|
349
|
+
console.log(chalk_1.default.blue('\n📊 Fleet Metrics:'));
|
|
350
|
+
console.log(chalk_1.default.gray(` Registry Status: ${registry.fleet?.status || 'Unknown'}`));
|
|
351
|
+
console.log(chalk_1.default.gray(` Total Executions: ${performance.totalExecutions}`));
|
|
352
|
+
console.log(chalk_1.default.gray(` Average Success Rate: ${performance.averageSuccess.toFixed(1)}%`));
|
|
353
|
+
console.log(chalk_1.default.gray(` Average Execution Time: ${(performance.averageDuration / 1000).toFixed(2)}s`));
|
|
354
|
+
// Recent activity
|
|
355
|
+
if (history.length > 0) {
|
|
356
|
+
console.log(chalk_1.default.blue('\n📈 Recent Activity:'));
|
|
357
|
+
const latest = history[0];
|
|
358
|
+
console.log(chalk_1.default.gray(` Latest Execution: ${new Date(latest.timestamp).toLocaleString()}`));
|
|
359
|
+
console.log(chalk_1.default.gray(` Tests: ${latest.summary?.passed || 0}/${latest.summary?.total || 0} passed`));
|
|
360
|
+
console.log(chalk_1.default.gray(` Duration: ${((latest.summary?.duration || 0) / 1000).toFixed(2)}s`));
|
|
361
|
+
}
|
|
362
|
+
// Agent utilization (if verbose)
|
|
363
|
+
if (options.verbose && Object.keys(performance.agentUtilization).length > 0) {
|
|
364
|
+
console.log(chalk_1.default.blue('\n🔧 Agent Utilization:'));
|
|
365
|
+
Object.entries(performance.agentUtilization).forEach(([agent, data]) => {
|
|
366
|
+
console.log(chalk_1.default.gray(` ${agent}: ${data.usage} uses, ${data.tasks} tasks, ${(data.avgDuration / 1000).toFixed(2)}s avg`));
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
// Health indicators
|
|
370
|
+
const healthStatus = this.calculateFleetHealth(fleetConfig, history, performance);
|
|
371
|
+
console.log(chalk_1.default.blue('\n💚 Health Status:'));
|
|
372
|
+
console.log(chalk_1.default.gray(` Overall: ${this.getHealthColor(healthStatus.overall)}${healthStatus.overall}`));
|
|
373
|
+
if (healthStatus.warnings.length > 0) {
|
|
374
|
+
console.log(chalk_1.default.yellow('\n⚠️ Warnings:'));
|
|
375
|
+
healthStatus.warnings.forEach((warning) => {
|
|
376
|
+
console.log(chalk_1.default.yellow(` • ${warning}`));
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
// Next actions
|
|
380
|
+
console.log(chalk_1.default.yellow('\n💡 Recommended Actions:'));
|
|
381
|
+
if (performance.totalExecutions === 0) {
|
|
382
|
+
console.log(chalk_1.default.gray(' 1. Run initial tests: agentic-qe run tests'));
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
console.log(chalk_1.default.gray(' 1. Monitor fleet performance regularly'));
|
|
386
|
+
if (performance.averageSuccess < 90) {
|
|
387
|
+
console.log(chalk_1.default.gray(' 2. Investigate failing tests'));
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
console.log(chalk_1.default.gray(' 3. Scale fleet if needed: agentic-qe fleet scale --agents <count>'));
|
|
391
|
+
}
|
|
392
|
+
static calculateFleetHealth(fleetConfig, history, performance) {
|
|
393
|
+
const health = {
|
|
394
|
+
overall: 'healthy',
|
|
395
|
+
warnings: []
|
|
396
|
+
};
|
|
397
|
+
// Check configuration issues
|
|
398
|
+
if (!fleetConfig.testingFocus || fleetConfig.testingFocus.length === 0) {
|
|
399
|
+
health.warnings.push('No testing focus areas configured');
|
|
400
|
+
}
|
|
401
|
+
// Check execution history
|
|
402
|
+
if (history.length === 0) {
|
|
403
|
+
health.warnings.push('No test execution history found');
|
|
404
|
+
health.overall = 'unknown';
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
// Check success rate
|
|
408
|
+
if (performance.averageSuccess < 80) {
|
|
409
|
+
health.warnings.push(`Low success rate: ${performance.averageSuccess.toFixed(1)}%`);
|
|
410
|
+
health.overall = 'degraded';
|
|
411
|
+
}
|
|
412
|
+
// Check recent activity
|
|
413
|
+
const latestExecution = new Date(history[0].timestamp);
|
|
414
|
+
const daysSinceLastExecution = (Date.now() - latestExecution.getTime()) / (1000 * 60 * 60 * 24);
|
|
415
|
+
if (daysSinceLastExecution > 7) {
|
|
416
|
+
health.warnings.push('No recent test executions (>7 days)');
|
|
417
|
+
health.overall = 'stale';
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
// Critical issues
|
|
421
|
+
if (health.warnings.length > 3) {
|
|
422
|
+
health.overall = 'critical';
|
|
423
|
+
}
|
|
424
|
+
return health;
|
|
425
|
+
}
|
|
426
|
+
static getHealthColor(status) {
|
|
427
|
+
const colors = {
|
|
428
|
+
'healthy': chalk_1.default.green,
|
|
429
|
+
'degraded': chalk_1.default.yellow,
|
|
430
|
+
'critical': chalk_1.default.red,
|
|
431
|
+
'unknown': chalk_1.default.gray,
|
|
432
|
+
'stale': chalk_1.default.yellow
|
|
433
|
+
};
|
|
434
|
+
return (colors[status] || chalk_1.default.white);
|
|
435
|
+
}
|
|
436
|
+
static displayScalingSummary(current, target, operation) {
|
|
437
|
+
console.log(chalk_1.default.yellow('\n📊 Scaling Summary:'));
|
|
438
|
+
console.log(chalk_1.default.gray(` Operation: ${operation}`));
|
|
439
|
+
console.log(chalk_1.default.gray(` Previous Agent Count: ${current}`));
|
|
440
|
+
console.log(chalk_1.default.gray(` New Agent Count: ${target}`));
|
|
441
|
+
console.log(chalk_1.default.gray(` Change: ${target > current ? '+' : ''}${target - current} agents`));
|
|
442
|
+
console.log(chalk_1.default.yellow('\n💡 Next Steps:'));
|
|
443
|
+
console.log(chalk_1.default.gray(' 1. Verify agent allocation with: agentic-qe fleet status --verbose'));
|
|
444
|
+
console.log(chalk_1.default.gray(' 2. Run tests to validate scaled fleet: agentic-qe run tests'));
|
|
445
|
+
}
|
|
446
|
+
static displayDeploymentSummary(config, validation, options) {
|
|
447
|
+
console.log(chalk_1.default.yellow('\n📦 Deployment Summary:'));
|
|
448
|
+
console.log(chalk_1.default.gray(` Environment: ${options.env}`));
|
|
449
|
+
console.log(chalk_1.default.gray(` Agents: ${config.agentCount}`));
|
|
450
|
+
console.log(chalk_1.default.gray(` Components: ${config.components?.length || 0}`));
|
|
451
|
+
console.log(chalk_1.default.gray(` Validation: ${validation.valid ? 'Passed' : 'Failed'}`));
|
|
452
|
+
if (validation.warnings?.length > 0) {
|
|
453
|
+
console.log(chalk_1.default.yellow('\n⚠️ Deployment Warnings:'));
|
|
454
|
+
validation.warnings.forEach((warning) => {
|
|
455
|
+
console.log(chalk_1.default.yellow(` • ${warning}`));
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
console.log(chalk_1.default.yellow('\n💡 Next Steps:'));
|
|
459
|
+
console.log(chalk_1.default.gray(' 1. Review deployment artifacts in .agentic-qe/deployments/'));
|
|
460
|
+
console.log(chalk_1.default.gray(' 2. Execute deployment script to apply changes'));
|
|
461
|
+
console.log(chalk_1.default.gray(' 3. Monitor deployment status after execution'));
|
|
462
|
+
}
|
|
463
|
+
static displayDestructionSummary(fleetConfig, archiveDir) {
|
|
464
|
+
console.log(chalk_1.default.yellow('\n💥 Fleet Destruction Summary:'));
|
|
465
|
+
console.log(chalk_1.default.gray(` Fleet ID: ${fleetConfig.fleet?.id || 'Unknown'}`));
|
|
466
|
+
console.log(chalk_1.default.gray(` Agents Destroyed: ${fleetConfig.maxAgents}`));
|
|
467
|
+
console.log(chalk_1.default.gray(` Data Archived: ${archiveDir}`));
|
|
468
|
+
console.log(chalk_1.default.gray(` Destruction Time: ${new Date().toLocaleString()}`));
|
|
469
|
+
console.log(chalk_1.default.yellow('\n💡 Important Notes:'));
|
|
470
|
+
console.log(chalk_1.default.gray(' • All fleet data has been archived for recovery'));
|
|
471
|
+
console.log(chalk_1.default.gray(' • Run agentic-qe init to create a new fleet'));
|
|
472
|
+
console.log(chalk_1.default.gray(' • Historical data remains accessible in archive'));
|
|
473
|
+
}
|
|
474
|
+
static displayHealthReport(healthReport, options) {
|
|
475
|
+
console.log(chalk_1.default.yellow('\n🏥 Fleet Health Report\n'));
|
|
476
|
+
// Overall status
|
|
477
|
+
const overallColor = this.getHealthColor(healthReport.overall);
|
|
478
|
+
console.log(chalk_1.default.blue('📊 Overall Health:'));
|
|
479
|
+
console.log(` Status: ${overallColor(healthReport.overall.toUpperCase())}`);
|
|
480
|
+
// Component health
|
|
481
|
+
console.log(chalk_1.default.blue('\n🔧 Component Health:'));
|
|
482
|
+
Object.entries(healthReport.components).forEach(([component, data]) => {
|
|
483
|
+
const statusColor = this.getHealthColor(data.status);
|
|
484
|
+
console.log(` ${component}: ${statusColor(data.status)} ${data.message ? `- ${data.message}` : ''}`);
|
|
485
|
+
});
|
|
486
|
+
// Issues
|
|
487
|
+
if (healthReport.issues.length > 0) {
|
|
488
|
+
console.log(chalk_1.default.red('\n🚨 Issues Found:'));
|
|
489
|
+
healthReport.issues.forEach((issue) => {
|
|
490
|
+
console.log(chalk_1.default.red(` • ${issue.severity.toUpperCase()}: ${issue.description}`));
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
// Recommendations
|
|
494
|
+
if (healthReport.recommendations.length > 0) {
|
|
495
|
+
console.log(chalk_1.default.yellow('\n💡 Recommendations:'));
|
|
496
|
+
healthReport.recommendations.forEach((rec) => {
|
|
497
|
+
console.log(chalk_1.default.gray(` • ${rec}`));
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
console.log(chalk_1.default.yellow('\n📁 Health Report Saved:'));
|
|
501
|
+
console.log(chalk_1.default.gray(' Location: .agentic-qe/reports/health-check-[timestamp].json'));
|
|
502
|
+
}
|
|
503
|
+
// Helper methods for deployment and health checks
|
|
504
|
+
static async loadEnvironmentConfig(env) {
|
|
505
|
+
const envConfigPath = `.agentic-qe/config/environments.json`;
|
|
506
|
+
if (await fs.pathExists(envConfigPath)) {
|
|
507
|
+
const envConfigs = await fs.readJson(envConfigPath);
|
|
508
|
+
return envConfigs[env] || {};
|
|
509
|
+
}
|
|
510
|
+
return {};
|
|
511
|
+
}
|
|
512
|
+
static async generateDeploymentConfig(fleetConfig, envConfig, options) {
|
|
513
|
+
return {
|
|
514
|
+
version: '1.0',
|
|
515
|
+
environment: options.env,
|
|
516
|
+
fleet: fleetConfig,
|
|
517
|
+
environment_config: envConfig,
|
|
518
|
+
agentCount: fleetConfig.maxAgents,
|
|
519
|
+
components: [
|
|
520
|
+
'fleet-manager',
|
|
521
|
+
'agent-registry',
|
|
522
|
+
'coordination-service',
|
|
523
|
+
'monitoring-dashboard'
|
|
524
|
+
],
|
|
525
|
+
resources: {
|
|
526
|
+
memory: `${fleetConfig.maxAgents * 100}MB`,
|
|
527
|
+
cpu: `${fleetConfig.maxAgents * 0.5}`,
|
|
528
|
+
storage: '1GB'
|
|
529
|
+
},
|
|
530
|
+
metadata: {
|
|
531
|
+
generatedAt: new Date().toISOString(),
|
|
532
|
+
topology: fleetConfig.topology
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
static async generateDeploymentScripts(deploymentDir, config, options) {
|
|
537
|
+
const deployScript = `#!/bin/bash
|
|
538
|
+
# Deployment script for ${options.env} environment
|
|
539
|
+
echo "Deploying Agentic QE Fleet to ${options.env}..."
|
|
540
|
+
|
|
541
|
+
# Pre-deployment hooks
|
|
542
|
+
npx claude-flow@alpha hooks pre-task --description "Fleet deployment to ${options.env}"
|
|
543
|
+
|
|
544
|
+
# Deploy components
|
|
545
|
+
echo "Deploying ${config.agentCount} agents..."
|
|
546
|
+
|
|
547
|
+
# Post-deployment validation
|
|
548
|
+
echo "Validating deployment..."
|
|
549
|
+
|
|
550
|
+
# Store deployment status
|
|
551
|
+
npx claude-flow@alpha memory store --key "agentic-qe/deployment/status" --value "deployed"
|
|
552
|
+
npx claude-flow@alpha hooks notify --message "Fleet deployed to ${options.env}"
|
|
553
|
+
|
|
554
|
+
echo "Deployment completed successfully!"
|
|
555
|
+
`;
|
|
556
|
+
await fs.writeFile(`${deploymentDir}/deploy.sh`, deployScript);
|
|
557
|
+
await fs.chmod(`${deploymentDir}/deploy.sh`, '755');
|
|
558
|
+
}
|
|
559
|
+
static async validateDeployment(config) {
|
|
560
|
+
const validation = {
|
|
561
|
+
valid: true,
|
|
562
|
+
errors: [],
|
|
563
|
+
warnings: []
|
|
564
|
+
};
|
|
565
|
+
// Validate agent count
|
|
566
|
+
if (config.agentCount < 1) {
|
|
567
|
+
validation.errors.push('Agent count must be at least 1');
|
|
568
|
+
validation.valid = false;
|
|
569
|
+
}
|
|
570
|
+
// Validate resources
|
|
571
|
+
if (!config.resources) {
|
|
572
|
+
validation.warnings.push('No resource limits specified');
|
|
573
|
+
}
|
|
574
|
+
// Validate environment
|
|
575
|
+
if (!config.environment) {
|
|
576
|
+
validation.errors.push('Environment not specified');
|
|
577
|
+
validation.valid = false;
|
|
578
|
+
}
|
|
579
|
+
return validation;
|
|
580
|
+
}
|
|
581
|
+
static async generateScalingScript(operation, current, target, options) {
|
|
582
|
+
const script = `#!/bin/bash
|
|
583
|
+
# Fleet scaling script: ${operation}
|
|
584
|
+
echo "Scaling fleet from ${current} to ${target} agents..."
|
|
585
|
+
|
|
586
|
+
# Pre-scaling coordination
|
|
587
|
+
npx claude-flow@alpha hooks pre-task --description "Fleet scaling: ${operation}"
|
|
588
|
+
|
|
589
|
+
# Update agent configurations
|
|
590
|
+
echo "Updating agent configurations..."
|
|
591
|
+
|
|
592
|
+
# Restart services if needed
|
|
593
|
+
if [ "${operation}" = "scale-up" ]; then
|
|
594
|
+
echo "Starting additional agents..."
|
|
595
|
+
else
|
|
596
|
+
echo "Stopping excess agents..."
|
|
597
|
+
fi
|
|
598
|
+
|
|
599
|
+
# Post-scaling validation
|
|
600
|
+
echo "Validating scaled fleet..."
|
|
601
|
+
|
|
602
|
+
# Store scaling results
|
|
603
|
+
npx claude-flow@alpha memory store --key "agentic-qe/scaling/latest" --value '{"from":${current},"to":${target},"operation":"${operation}"}'
|
|
604
|
+
npx claude-flow@alpha hooks notify --message "Fleet scaled: ${operation} from ${current} to ${target} agents"
|
|
605
|
+
|
|
606
|
+
echo "Scaling completed successfully!"
|
|
607
|
+
`;
|
|
608
|
+
await fs.writeFile('.agentic-qe/scripts/scale-fleet.sh', script);
|
|
609
|
+
await fs.chmod('.agentic-qe/scripts/scale-fleet.sh', '755');
|
|
610
|
+
}
|
|
611
|
+
static async checkConfigurationHealth() {
|
|
612
|
+
const health = { status: 'healthy', issues: [] };
|
|
613
|
+
const requiredFiles = [
|
|
614
|
+
'.agentic-qe/config/fleet.json',
|
|
615
|
+
'.agentic-qe/config/agents.json'
|
|
616
|
+
];
|
|
617
|
+
for (const file of requiredFiles) {
|
|
618
|
+
if (!await fs.pathExists(file)) {
|
|
619
|
+
health.issues.push(`Missing configuration file: ${file}`);
|
|
620
|
+
health.status = 'critical';
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return health;
|
|
624
|
+
}
|
|
625
|
+
static async checkDataHealth() {
|
|
626
|
+
const health = { status: 'healthy', issues: [] };
|
|
627
|
+
// Check if data directory exists
|
|
628
|
+
if (!await fs.pathExists('.agentic-qe/data')) {
|
|
629
|
+
health.issues.push('Data directory missing');
|
|
630
|
+
health.status = 'degraded';
|
|
631
|
+
}
|
|
632
|
+
return health;
|
|
633
|
+
}
|
|
634
|
+
static async checkExecutionHealth() {
|
|
635
|
+
const health = { status: 'healthy', issues: [] };
|
|
636
|
+
const executionHistory = await this.getExecutionHistory();
|
|
637
|
+
if (executionHistory.length === 0) {
|
|
638
|
+
health.issues.push('No execution history found');
|
|
639
|
+
health.status = 'unknown';
|
|
640
|
+
}
|
|
641
|
+
else {
|
|
642
|
+
const latestExecution = executionHistory[0];
|
|
643
|
+
const failureRate = latestExecution.summary?.failed / latestExecution.summary?.total;
|
|
644
|
+
if (failureRate > 0.2) {
|
|
645
|
+
health.issues.push(`High failure rate: ${(failureRate * 100).toFixed(1)}%`);
|
|
646
|
+
health.status = 'degraded';
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
return health;
|
|
650
|
+
}
|
|
651
|
+
static async checkCoordinationHealth() {
|
|
652
|
+
const health = { status: 'healthy', issues: [] };
|
|
653
|
+
// Check if coordination scripts exist
|
|
654
|
+
const coordinationScripts = [
|
|
655
|
+
'.agentic-qe/scripts/pre-execution.sh',
|
|
656
|
+
'.agentic-qe/scripts/post-execution.sh'
|
|
657
|
+
];
|
|
658
|
+
let scriptsFound = 0;
|
|
659
|
+
for (const script of coordinationScripts) {
|
|
660
|
+
if (await fs.pathExists(script)) {
|
|
661
|
+
scriptsFound++;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (scriptsFound === 0) {
|
|
665
|
+
health.issues.push('No coordination scripts found');
|
|
666
|
+
health.status = 'degraded';
|
|
667
|
+
}
|
|
668
|
+
return health;
|
|
669
|
+
}
|
|
670
|
+
static generateHealthRecommendations(components) {
|
|
671
|
+
const recommendations = [];
|
|
672
|
+
Object.entries(components).forEach(([component, data]) => {
|
|
673
|
+
if (data.status !== 'healthy') {
|
|
674
|
+
switch (component) {
|
|
675
|
+
case 'configuration':
|
|
676
|
+
recommendations.push('Run agentic-qe init to recreate missing configuration files');
|
|
677
|
+
break;
|
|
678
|
+
case 'data':
|
|
679
|
+
recommendations.push('Ensure data directory exists and has proper permissions');
|
|
680
|
+
break;
|
|
681
|
+
case 'executions':
|
|
682
|
+
recommendations.push('Run agentic-qe run tests to generate execution history');
|
|
683
|
+
break;
|
|
684
|
+
case 'coordination':
|
|
685
|
+
recommendations.push('Check Claude Flow integration and coordination scripts');
|
|
686
|
+
break;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
if (recommendations.length === 0) {
|
|
691
|
+
recommendations.push('Fleet is healthy - continue regular monitoring');
|
|
692
|
+
}
|
|
693
|
+
return recommendations;
|
|
694
|
+
}
|
|
695
|
+
// Coordination storage methods
|
|
696
|
+
static async storeStatusCheck() {
|
|
697
|
+
const script = `npx claude-flow@alpha hooks notify --message "Fleet status check completed"`;
|
|
698
|
+
await this.executeCoordinationScript(script);
|
|
699
|
+
}
|
|
700
|
+
static async storeScalingOperation(current, target) {
|
|
701
|
+
const script = `npx claude-flow@alpha memory store --key "agentic-qe/fleet/scaling" --value '{"from":${current},"to":${target},"timestamp":"${new Date().toISOString()}"}'`;
|
|
702
|
+
await this.executeCoordinationScript(script);
|
|
703
|
+
}
|
|
704
|
+
static async storeDeploymentOperation(config) {
|
|
705
|
+
const script = `npx claude-flow@alpha memory store --key "agentic-qe/fleet/deployment" --value '${JSON.stringify(config)}'`;
|
|
706
|
+
await this.executeCoordinationScript(script);
|
|
707
|
+
}
|
|
708
|
+
static async storeDestructionOperation(record) {
|
|
709
|
+
const script = `npx claude-flow@alpha memory store --key "agentic-qe/fleet/destruction" --value '${JSON.stringify(record)}'`;
|
|
710
|
+
await this.executeCoordinationScript(script);
|
|
711
|
+
}
|
|
712
|
+
static async storeHealthCheck(healthReport) {
|
|
713
|
+
// Save health report to file
|
|
714
|
+
const reportsDir = '.agentic-qe/reports';
|
|
715
|
+
await fs.ensureDir(reportsDir);
|
|
716
|
+
const timestamp = new Date().toISOString().replace(/:/g, '-');
|
|
717
|
+
const reportFile = `${reportsDir}/health-check-${timestamp}.json`;
|
|
718
|
+
await fs.writeJson(reportFile, healthReport, { spaces: 2 });
|
|
719
|
+
// Store in coordination
|
|
720
|
+
const script = `npx claude-flow@alpha memory store --key "agentic-qe/fleet/health" --value '{"status":"${healthReport.overall}","timestamp":"${healthReport.timestamp}"}'`;
|
|
721
|
+
await this.executeCoordinationScript(script);
|
|
722
|
+
}
|
|
723
|
+
static async executeCoordinationScript(script) {
|
|
724
|
+
try {
|
|
725
|
+
const { execSecure } = require('../../../security/secure-command-executor');
|
|
726
|
+
// Validate the script contains only safe coordination commands
|
|
727
|
+
const allowedCommands = ['npx claude-flow@alpha memory store', 'npx claude-flow@alpha hooks'];
|
|
728
|
+
const isAllowedScript = allowedCommands.some(cmd => script.startsWith(cmd));
|
|
729
|
+
if (!isAllowedScript) {
|
|
730
|
+
console.warn(chalk_1.default.yellow(`⚠️ Script not allowed: ${script}`));
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
execSecure(script, (error) => {
|
|
734
|
+
if (error) {
|
|
735
|
+
console.warn(chalk_1.default.yellow(`⚠️ Coordination warning: ${error.message}`));
|
|
736
|
+
}
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
catch (error) {
|
|
740
|
+
// Silently handle coordination errors
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
exports.FleetCommand = FleetCommand;
|
|
745
|
+
//# sourceMappingURL=fleet.js.map
|