claude-flow-novice 1.3.5 → 1.5.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 +3 -20
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
- package/.claude/agents/analyst.md +300 -0
- package/.claude/agents/architect.md +557 -0
- package/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
- package/.claude/agents/base-template-generator.md +24 -1
- package/.claude/agents/coder.md +180 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
- package/.claude/agents/consensus/consensus-builder.md +3 -20
- package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
- package/.claude/agents/consensus/gossip-coordinator.md +4 -21
- package/.claude/agents/consensus/performance-benchmarker.md +4 -21
- package/.claude/agents/consensus/quorum-manager.md +4 -21
- package/.claude/agents/consensus/raft-manager.md +4 -21
- package/.claude/agents/consensus/security-manager.md +4 -21
- package/.claude/agents/coordinator.md +842 -0
- package/.claude/agents/data/ml/data-ml-model.md +2 -2
- package/.claude/agents/development/backend/dev-backend-api.md +2 -2
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
- package/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-specialist.md +856 -0
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude/agents/optimization/benchmark-suite.md +1 -1
- package/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude/agents/optimization/performance-monitor.md +1 -1
- package/.claude/agents/planner.md +135 -0
- package/.claude/agents/researcher.md +185 -0
- package/.claude/agents/reviewer.md +291 -0
- package/.claude/agents/security/security-specialist.md +978 -0
- package/.claude/agents/sparc/architecture.md +1 -1
- package/.claude/agents/sparc/pseudocode.md +1 -1
- package/.claude/agents/sparc/refinement.md +1 -1
- package/.claude/agents/sparc/specification.md +1 -1
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude/agents/tester.md +663 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
- package/.claude/agents/testing/validation/production-validator.md +1 -1
- package/.claude/commands/claude-soul.js +1 -1
- package/.claude/hooks.json +12 -15
- package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
- package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
- package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
- package/.claude-flow-novice/.claude/agents/architect.md +557 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude-flow-novice/.claude/agents/backend-dev.json +42 -0
- package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
- package/.claude-flow-novice/.claude/agents/code-analyzer.json +39 -0
- package/.claude-flow-novice/.claude/agents/coder.json +42 -0
- package/.claude-flow-novice/.claude/agents/coder.md +180 -0
- package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
- package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
- package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
- package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
- package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
- package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
- package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
- package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude-flow-novice/.claude/agents/planner.json +41 -0
- package/.claude-flow-novice/.claude/agents/planner.md +135 -0
- package/.claude-flow-novice/.claude/agents/researcher.json +41 -0
- package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
- package/.claude-flow-novice/.claude/agents/reviewer.json +39 -0
- package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
- package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
- package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
- package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
- package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude-flow-novice/.claude/agents/system-architect.json +40 -0
- package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
- package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude-flow-novice/.claude/agents/tester.json +40 -0
- package/.claude-flow-novice/.claude/agents/tester.md +663 -0
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
- package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude-flow-novice/dist/index.js +12 -24
- package/.claude-flow-novice/dist/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
- package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
- package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
- package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
- package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
- package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
- package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
- package/.claude-flow-novice/dist/src/cli/index.js +1 -1
- package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
- package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
- package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
- package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
- package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
- package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
- package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
- package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
- package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
- package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/core/logger.js +33 -10
- package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
- package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
- package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/task/index.js +7 -7
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
- package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +1032 -61
- package/README.md +0 -1
- package/config/build/babel.config.cjs +19 -11
- package/config/typescript/tsconfig.json +1 -1
- package/examples/02-workflows/claude-workflow.json +5 -5
- package/examples/claude-api-error-handling.ts +2 -2
- package/examples/frontend-testing-demo.ts +470 -0
- package/examples/litellm/config/config.yaml +1 -1
- package/package.json +13 -7
- package/scripts/build/unified-builder.sh +6 -6
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/post-install-claude-md.js +28 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/test/test-coordination-features.ts +2 -2
- package/scripts/validate-stage3-performance.ts +377 -0
- package/src/cli/simple-commands/hooks.js +1 -0
- package/src/cli/simple-commands/init/agent-copier.js +0 -2
- package/src/cli/simple-commands/init/index.js +18 -110
- package/src/cli/simple-commands/init/templates/CLAUDE.md +162 -1158
- package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
- package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
- package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
- package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
- package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
- package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
- package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
- package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
- package/src/swarm-fullstack/workflows/index.ts +75 -0
- package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
- package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
- package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
- package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
- package/wiki/command-reference/README.md +1 -2
- package/wiki/command-reference/mcp-tools/README.md +1 -1
- package/wiki/getting-started/claude-code-mcp/README.md +1 -2
- package/wiki/getting-started/installation/README.md +2 -10
- package/.claude/agents/backend-dev.json +0 -9
- package/.claude/agents/code-analyzer.json +0 -9
- package/.claude/agents/coder.json +0 -9
- package/.claude/agents/planner.json +0 -9
- package/.claude/agents/researcher.json +0 -9
- package/.claude/agents/reviewer.json +0 -9
- package/.claude/agents/system-architect.json +0 -9
- package/.claude/agents/tester.json +0 -9
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude-flow-novice/dist/cli/index.js +0 -45
- package/.claude-flow-novice/dist/core/index.js +0 -22
- package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
- package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
- package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
- package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
- /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Health Monitor
|
|
3
|
+
* Real-time health tracking with automatic failure detection and recovery
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Real-time agent health tracking
|
|
7
|
+
* - Performance metrics per agent
|
|
8
|
+
* - Automatic failure detection
|
|
9
|
+
* - Agent replacement with <5 second recovery
|
|
10
|
+
* - Predictive health degradation analysis
|
|
11
|
+
*/ import { EventEmitter } from 'node:events';
|
|
12
|
+
import { performance } from 'perf_hooks';
|
|
13
|
+
import { Logger } from '../core/logger.js';
|
|
14
|
+
export class AgentHealthMonitor extends EventEmitter {
|
|
15
|
+
logger;
|
|
16
|
+
healthMetrics = new Map();
|
|
17
|
+
healthHistory = new Map();
|
|
18
|
+
checkInterval;
|
|
19
|
+
recoveryAttempts = new Map();
|
|
20
|
+
config;
|
|
21
|
+
// Performance tracking
|
|
22
|
+
performanceMetrics = new Map();
|
|
23
|
+
// Anomaly detection
|
|
24
|
+
baselineMetrics = new Map();
|
|
25
|
+
constructor(config){
|
|
26
|
+
super();
|
|
27
|
+
this.config = {
|
|
28
|
+
healthCheck: {
|
|
29
|
+
interval: config?.healthCheck?.interval || 1000,
|
|
30
|
+
timeout: config?.healthCheck?.timeout || 5000,
|
|
31
|
+
degradedThreshold: config?.healthCheck?.degradedThreshold || 2000,
|
|
32
|
+
criticalThreshold: config?.healthCheck?.criticalThreshold || 5000,
|
|
33
|
+
failureThreshold: config?.healthCheck?.failureThreshold || 10000 // 10s no response
|
|
34
|
+
},
|
|
35
|
+
recovery: {
|
|
36
|
+
maxRetries: config?.recovery?.maxRetries || 3,
|
|
37
|
+
retryDelay: config?.recovery?.retryDelay || 1000,
|
|
38
|
+
escalationTimeout: config?.recovery?.escalationTimeout || 5000,
|
|
39
|
+
autoReplace: config?.recovery?.autoReplace !== false // Default true
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const loggerConfig = process.env.CLAUDE_FLOW_ENV === 'test' ? {
|
|
43
|
+
level: 'error',
|
|
44
|
+
format: 'json',
|
|
45
|
+
destination: 'console'
|
|
46
|
+
} : {
|
|
47
|
+
level: 'info',
|
|
48
|
+
format: 'json',
|
|
49
|
+
destination: 'console'
|
|
50
|
+
};
|
|
51
|
+
this.logger = new Logger(loggerConfig, {
|
|
52
|
+
component: 'AgentHealthMonitor'
|
|
53
|
+
});
|
|
54
|
+
this.startHealthMonitoring();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Register an agent for health monitoring
|
|
58
|
+
*/ registerAgent(agent) {
|
|
59
|
+
const metric = {
|
|
60
|
+
agentId: agent.id,
|
|
61
|
+
status: 'healthy',
|
|
62
|
+
lastHeartbeat: Date.now(),
|
|
63
|
+
responseTime: 0,
|
|
64
|
+
taskSuccessRate: 1.0,
|
|
65
|
+
errorRate: 0,
|
|
66
|
+
timestamp: Date.now()
|
|
67
|
+
};
|
|
68
|
+
this.healthMetrics.set(agent.id, metric);
|
|
69
|
+
this.healthHistory.set(agent.id, []);
|
|
70
|
+
this.performanceMetrics.set(agent.id, {
|
|
71
|
+
tasksCompleted: 0,
|
|
72
|
+
tasksFailed: 0,
|
|
73
|
+
totalResponseTime: 0,
|
|
74
|
+
lastTaskTime: Date.now()
|
|
75
|
+
});
|
|
76
|
+
this.logger.debug('Agent registered for health monitoring', {
|
|
77
|
+
agentId: agent.id
|
|
78
|
+
});
|
|
79
|
+
this.emit('agent:registered', agent.id);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Unregister an agent from health monitoring
|
|
83
|
+
*/ unregisterAgent(agentId) {
|
|
84
|
+
this.healthMetrics.delete(agentId);
|
|
85
|
+
this.healthHistory.delete(agentId);
|
|
86
|
+
this.performanceMetrics.delete(agentId);
|
|
87
|
+
this.baselineMetrics.delete(agentId);
|
|
88
|
+
this.recoveryAttempts.delete(agentId);
|
|
89
|
+
this.logger.debug('Agent unregistered from health monitoring', {
|
|
90
|
+
agentId
|
|
91
|
+
});
|
|
92
|
+
this.emit('agent:unregistered', agentId);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Update agent heartbeat
|
|
96
|
+
*/ heartbeat(agentId) {
|
|
97
|
+
const metric = this.healthMetrics.get(agentId);
|
|
98
|
+
if (!metric) return;
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
const responseTime = now - metric.lastHeartbeat;
|
|
101
|
+
metric.lastHeartbeat = now;
|
|
102
|
+
metric.responseTime = responseTime;
|
|
103
|
+
metric.timestamp = now;
|
|
104
|
+
// Update status based on response time
|
|
105
|
+
if (responseTime < this.config.healthCheck.degradedThreshold) {
|
|
106
|
+
if (metric.status !== 'healthy') {
|
|
107
|
+
metric.status = 'healthy';
|
|
108
|
+
this.logger.info('Agent recovered to healthy status', {
|
|
109
|
+
agentId
|
|
110
|
+
});
|
|
111
|
+
this.emit('agent:recovered', agentId);
|
|
112
|
+
}
|
|
113
|
+
} else if (responseTime < this.config.healthCheck.criticalThreshold) {
|
|
114
|
+
if (metric.status === 'healthy') {
|
|
115
|
+
metric.status = 'degraded';
|
|
116
|
+
this.emitAlert({
|
|
117
|
+
agentId,
|
|
118
|
+
severity: 'warning',
|
|
119
|
+
type: 'degraded',
|
|
120
|
+
message: 'Agent response time degraded',
|
|
121
|
+
metrics: {
|
|
122
|
+
responseTime
|
|
123
|
+
},
|
|
124
|
+
timestamp: now
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
if (metric.status !== 'critical' && metric.status !== 'failed') {
|
|
129
|
+
metric.status = 'critical';
|
|
130
|
+
this.emitAlert({
|
|
131
|
+
agentId,
|
|
132
|
+
severity: 'critical',
|
|
133
|
+
type: 'slow_response',
|
|
134
|
+
message: 'Agent response time critical',
|
|
135
|
+
metrics: {
|
|
136
|
+
responseTime
|
|
137
|
+
},
|
|
138
|
+
timestamp: now
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// Store in history
|
|
143
|
+
this.recordHistory(agentId, metric);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Report task completion for performance tracking
|
|
147
|
+
*/ reportTaskCompletion(agentId, success, executionTime) {
|
|
148
|
+
const perfMetric = this.performanceMetrics.get(agentId);
|
|
149
|
+
const healthMetric = this.healthMetrics.get(agentId);
|
|
150
|
+
if (!perfMetric || !healthMetric) return;
|
|
151
|
+
if (success) {
|
|
152
|
+
perfMetric.tasksCompleted++;
|
|
153
|
+
} else {
|
|
154
|
+
perfMetric.tasksFailed++;
|
|
155
|
+
}
|
|
156
|
+
perfMetric.totalResponseTime += executionTime;
|
|
157
|
+
perfMetric.lastTaskTime = Date.now();
|
|
158
|
+
// Calculate success rate and error rate
|
|
159
|
+
const totalTasks = perfMetric.tasksCompleted + perfMetric.tasksFailed;
|
|
160
|
+
healthMetric.taskSuccessRate = totalTasks > 0 ? perfMetric.tasksCompleted / totalTasks : 1.0;
|
|
161
|
+
healthMetric.errorRate = totalTasks > 0 ? perfMetric.tasksFailed / totalTasks : 0;
|
|
162
|
+
// Check for high error rate
|
|
163
|
+
if (healthMetric.errorRate > 0.3) {
|
|
164
|
+
this.emitAlert({
|
|
165
|
+
agentId,
|
|
166
|
+
severity: 'error',
|
|
167
|
+
type: 'high_error_rate',
|
|
168
|
+
message: `High error rate detected: ${(healthMetric.errorRate * 100).toFixed(1)}%`,
|
|
169
|
+
metrics: {
|
|
170
|
+
errorRate: healthMetric.errorRate
|
|
171
|
+
},
|
|
172
|
+
timestamp: Date.now()
|
|
173
|
+
});
|
|
174
|
+
if (healthMetric.status === 'healthy') {
|
|
175
|
+
healthMetric.status = 'degraded';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// Update baseline metrics
|
|
179
|
+
this.updateBaseline(agentId);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Get current health status for an agent
|
|
183
|
+
*/ getAgentHealth(agentId) {
|
|
184
|
+
return this.healthMetrics.get(agentId) || null;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get health history for an agent
|
|
188
|
+
*/ getAgentHistory(agentId, limit = 100) {
|
|
189
|
+
const history = this.healthHistory.get(agentId) || [];
|
|
190
|
+
return history.slice(-limit);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get all agent health metrics
|
|
194
|
+
*/ getAllHealthMetrics() {
|
|
195
|
+
return new Map(this.healthMetrics);
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Get aggregated health statistics
|
|
199
|
+
*/ getHealthStatistics() {
|
|
200
|
+
const metrics = Array.from(this.healthMetrics.values());
|
|
201
|
+
const stats = {
|
|
202
|
+
totalAgents: metrics.length,
|
|
203
|
+
healthy: metrics.filter((m)=>m.status === 'healthy').length,
|
|
204
|
+
degraded: metrics.filter((m)=>m.status === 'degraded').length,
|
|
205
|
+
critical: metrics.filter((m)=>m.status === 'critical').length,
|
|
206
|
+
failed: metrics.filter((m)=>m.status === 'failed').length,
|
|
207
|
+
avgResponseTime: 0,
|
|
208
|
+
avgSuccessRate: 0,
|
|
209
|
+
avgErrorRate: 0
|
|
210
|
+
};
|
|
211
|
+
if (metrics.length > 0) {
|
|
212
|
+
stats.avgResponseTime = metrics.reduce((sum, m)=>sum + m.responseTime, 0) / metrics.length;
|
|
213
|
+
stats.avgSuccessRate = metrics.reduce((sum, m)=>sum + m.taskSuccessRate, 0) / metrics.length;
|
|
214
|
+
stats.avgErrorRate = metrics.reduce((sum, m)=>sum + m.errorRate, 0) / metrics.length;
|
|
215
|
+
}
|
|
216
|
+
return stats;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Start automated health monitoring
|
|
220
|
+
*/ startHealthMonitoring() {
|
|
221
|
+
this.checkInterval = setInterval(()=>{
|
|
222
|
+
this.performHealthChecks();
|
|
223
|
+
}, this.config.healthCheck.interval);
|
|
224
|
+
this.logger.info('Health monitoring started', {
|
|
225
|
+
interval: this.config.healthCheck.interval,
|
|
226
|
+
degradedThreshold: this.config.healthCheck.degradedThreshold,
|
|
227
|
+
criticalThreshold: this.config.healthCheck.criticalThreshold
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Perform health checks on all agents
|
|
232
|
+
*/ performHealthChecks() {
|
|
233
|
+
const now = Date.now();
|
|
234
|
+
for (const [agentId, metric] of this.healthMetrics.entries()){
|
|
235
|
+
const timeSinceHeartbeat = now - metric.lastHeartbeat;
|
|
236
|
+
// Check for failure
|
|
237
|
+
if (timeSinceHeartbeat > this.config.healthCheck.failureThreshold) {
|
|
238
|
+
if (metric.status !== 'failed') {
|
|
239
|
+
this.handleAgentFailure(agentId, metric);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
// Predictive degradation detection
|
|
243
|
+
if (metric.status === 'healthy') {
|
|
244
|
+
const baseline = this.baselineMetrics.get(agentId);
|
|
245
|
+
if (baseline && this.isPredictedToDegrade(metric, baseline)) {
|
|
246
|
+
this.emitAlert({
|
|
247
|
+
agentId,
|
|
248
|
+
severity: 'warning',
|
|
249
|
+
type: 'degraded',
|
|
250
|
+
message: 'Agent predicted to degrade soon',
|
|
251
|
+
metrics: {
|
|
252
|
+
responseTime: metric.responseTime
|
|
253
|
+
},
|
|
254
|
+
timestamp: now
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Handle agent failure
|
|
262
|
+
*/ handleAgentFailure(agentId, metric) {
|
|
263
|
+
metric.status = 'failed';
|
|
264
|
+
this.logger.error('Agent failure detected', {
|
|
265
|
+
agentId,
|
|
266
|
+
timeSinceHeartbeat: Date.now() - metric.lastHeartbeat
|
|
267
|
+
});
|
|
268
|
+
this.emitAlert({
|
|
269
|
+
agentId,
|
|
270
|
+
severity: 'critical',
|
|
271
|
+
type: 'failed',
|
|
272
|
+
message: 'Agent failed - no heartbeat',
|
|
273
|
+
metrics: {
|
|
274
|
+
lastHeartbeat: metric.lastHeartbeat
|
|
275
|
+
},
|
|
276
|
+
timestamp: Date.now()
|
|
277
|
+
});
|
|
278
|
+
this.emit('agent:failed', agentId);
|
|
279
|
+
// Attempt recovery if configured
|
|
280
|
+
if (this.config.recovery.autoReplace) {
|
|
281
|
+
this.attemptRecovery(agentId);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Attempt to recover a failed agent
|
|
286
|
+
*/ async attemptRecovery(agentId) {
|
|
287
|
+
const attempts = this.recoveryAttempts.get(agentId) || 0;
|
|
288
|
+
if (attempts >= this.config.recovery.maxRetries) {
|
|
289
|
+
this.logger.error('Agent recovery failed - max retries exceeded', {
|
|
290
|
+
agentId,
|
|
291
|
+
attempts
|
|
292
|
+
});
|
|
293
|
+
this.emit('agent:recovery-failed', {
|
|
294
|
+
agentId,
|
|
295
|
+
attempts
|
|
296
|
+
});
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
this.recoveryAttempts.set(agentId, attempts + 1);
|
|
300
|
+
const recoveryStart = performance.now();
|
|
301
|
+
this.logger.info('Attempting agent recovery', {
|
|
302
|
+
agentId,
|
|
303
|
+
attempt: attempts + 1
|
|
304
|
+
});
|
|
305
|
+
// Wait before retry
|
|
306
|
+
await new Promise((resolve)=>setTimeout(resolve, this.config.recovery.retryDelay));
|
|
307
|
+
// In production, this would trigger actual agent restart/replacement
|
|
308
|
+
// For now, we emit an event for external handling
|
|
309
|
+
this.emit('agent:recovery-attempt', {
|
|
310
|
+
agentId,
|
|
311
|
+
attempt: attempts + 1
|
|
312
|
+
});
|
|
313
|
+
// Simulate recovery check
|
|
314
|
+
setTimeout(()=>{
|
|
315
|
+
const metric = this.healthMetrics.get(agentId);
|
|
316
|
+
if (metric && metric.status === 'failed') {
|
|
317
|
+
const recoveryTime = performance.now() - recoveryStart;
|
|
318
|
+
if (recoveryTime < this.config.recovery.escalationTimeout) {
|
|
319
|
+
// Recovery successful
|
|
320
|
+
metric.status = 'healthy';
|
|
321
|
+
metric.lastHeartbeat = Date.now();
|
|
322
|
+
this.recoveryAttempts.delete(agentId);
|
|
323
|
+
this.logger.info('Agent recovery successful', {
|
|
324
|
+
agentId,
|
|
325
|
+
recoveryTime: `${recoveryTime.toFixed(2)}ms`
|
|
326
|
+
});
|
|
327
|
+
this.emit('agent:recovered', {
|
|
328
|
+
agentId,
|
|
329
|
+
recoveryTime
|
|
330
|
+
});
|
|
331
|
+
} else {
|
|
332
|
+
// Recovery taking too long, try again
|
|
333
|
+
this.attemptRecovery(agentId);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}, this.config.recovery.escalationTimeout);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Record health metric in history
|
|
340
|
+
*/ recordHistory(agentId, metric) {
|
|
341
|
+
const history = this.healthHistory.get(agentId);
|
|
342
|
+
if (!history) return;
|
|
343
|
+
history.push({
|
|
344
|
+
...metric
|
|
345
|
+
});
|
|
346
|
+
// Keep history bounded (last 1000 entries)
|
|
347
|
+
if (history.length > 1000) {
|
|
348
|
+
history.shift();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Update baseline metrics for anomaly detection
|
|
353
|
+
*/ updateBaseline(agentId) {
|
|
354
|
+
const perfMetric = this.performanceMetrics.get(agentId);
|
|
355
|
+
const healthMetric = this.healthMetrics.get(agentId);
|
|
356
|
+
if (!perfMetric || !healthMetric) return;
|
|
357
|
+
const totalTasks = perfMetric.tasksCompleted + perfMetric.tasksFailed;
|
|
358
|
+
if (totalTasks < 10) return; // Need minimum samples
|
|
359
|
+
const baseline = this.baselineMetrics.get(agentId) || {
|
|
360
|
+
avgResponseTime: 0,
|
|
361
|
+
avgSuccessRate: 0,
|
|
362
|
+
avgErrorRate: 0
|
|
363
|
+
};
|
|
364
|
+
// Exponential moving average
|
|
365
|
+
const alpha = 0.1;
|
|
366
|
+
const avgResponseTime = totalTasks > 0 ? perfMetric.totalResponseTime / totalTasks : 0;
|
|
367
|
+
baseline.avgResponseTime = alpha * avgResponseTime + (1 - alpha) * baseline.avgResponseTime;
|
|
368
|
+
baseline.avgSuccessRate = alpha * healthMetric.taskSuccessRate + (1 - alpha) * baseline.avgSuccessRate;
|
|
369
|
+
baseline.avgErrorRate = alpha * healthMetric.errorRate + (1 - alpha) * baseline.avgErrorRate;
|
|
370
|
+
this.baselineMetrics.set(agentId, baseline);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Predict if agent is likely to degrade
|
|
374
|
+
*/ isPredictedToDegrade(metric, baseline) {
|
|
375
|
+
// Check if response time is trending upward
|
|
376
|
+
const responseTimeIncrease = metric.responseTime / baseline.avgResponseTime;
|
|
377
|
+
return responseTimeIncrease > 1.5; // 50% increase from baseline
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Emit health alert
|
|
381
|
+
*/ emitAlert(alert) {
|
|
382
|
+
this.logger.warn('Health alert', alert);
|
|
383
|
+
this.emit('health:alert', alert);
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Force health check for specific agent
|
|
387
|
+
*/ async checkAgentHealth(agentId) {
|
|
388
|
+
const metric = this.healthMetrics.get(agentId);
|
|
389
|
+
if (!metric) return null;
|
|
390
|
+
// Perform synchronous health check
|
|
391
|
+
const now = Date.now();
|
|
392
|
+
const timeSinceHeartbeat = now - metric.lastHeartbeat;
|
|
393
|
+
if (timeSinceHeartbeat > this.config.healthCheck.timeout) {
|
|
394
|
+
metric.status = 'failed';
|
|
395
|
+
this.handleAgentFailure(agentId, metric);
|
|
396
|
+
}
|
|
397
|
+
return metric;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Reset agent health status (useful after manual intervention)
|
|
401
|
+
*/ resetAgentHealth(agentId) {
|
|
402
|
+
const metric = this.healthMetrics.get(agentId);
|
|
403
|
+
if (!metric) return;
|
|
404
|
+
metric.status = 'healthy';
|
|
405
|
+
metric.lastHeartbeat = Date.now();
|
|
406
|
+
metric.responseTime = 0;
|
|
407
|
+
metric.taskSuccessRate = 1.0;
|
|
408
|
+
metric.errorRate = 0;
|
|
409
|
+
this.recoveryAttempts.delete(agentId);
|
|
410
|
+
this.logger.info('Agent health reset', {
|
|
411
|
+
agentId
|
|
412
|
+
});
|
|
413
|
+
this.emit('agent:health-reset', agentId);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Stop health monitoring
|
|
417
|
+
*/ shutdown() {
|
|
418
|
+
if (this.checkInterval) {
|
|
419
|
+
clearInterval(this.checkInterval);
|
|
420
|
+
}
|
|
421
|
+
this.healthMetrics.clear();
|
|
422
|
+
this.healthHistory.clear();
|
|
423
|
+
this.performanceMetrics.clear();
|
|
424
|
+
this.baselineMetrics.clear();
|
|
425
|
+
this.recoveryAttempts.clear();
|
|
426
|
+
this.logger.info('Health monitoring stopped');
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
//# sourceMappingURL=agent-health-monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/monitoring/agent-health-monitor.ts"],"names":["EventEmitter","performance","Logger","AgentHealthMonitor","logger","healthMetrics","Map","healthHistory","checkInterval","recoveryAttempts","config","performanceMetrics","baselineMetrics","healthCheck","interval","timeout","degradedThreshold","criticalThreshold","failureThreshold","recovery","maxRetries","retryDelay","escalationTimeout","autoReplace","loggerConfig","process","env","CLAUDE_FLOW_ENV","level","format","destination","component","startHealthMonitoring","registerAgent","agent","metric","agentId","id","status","lastHeartbeat","Date","now","responseTime","taskSuccessRate","errorRate","timestamp","set","tasksCompleted","tasksFailed","totalResponseTime","lastTaskTime","debug","emit","unregisterAgent","delete","heartbeat","get","info","emitAlert","severity","type","message","metrics","recordHistory","reportTaskCompletion","success","executionTime","perfMetric","healthMetric","totalTasks","toFixed","updateBaseline","getAgentHealth","getAgentHistory","limit","history","slice","getAllHealthMetrics","getHealthStatistics","Array","from","values","stats","totalAgents","length","healthy","filter","m","degraded","critical","failed","avgResponseTime","avgSuccessRate","avgErrorRate","reduce","sum","setInterval","performHealthChecks","entries","timeSinceHeartbeat","handleAgentFailure","baseline","isPredictedToDegrade","error","attemptRecovery","attempts","recoveryStart","attempt","Promise","resolve","setTimeout","recoveryTime","push","shift","alpha","responseTimeIncrease","alert","warn","checkAgentHealth","resetAgentHealth","shutdown","clearInterval","clear"],"mappings":"AAAA;;;;;;;;;;CAUC,GAED,SAASA,YAAY,QAAQ,cAAc;AAC3C,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,MAAM,QAAQ,oBAAoB;AAuC3C,OAAO,MAAMC,2BAA2BH;IAC9BI,OAAe;IACfC,gBAAgB,IAAIC,MAA4B;IAChDC,gBAAgB,IAAID,MAA8B;IAClDE,cAA+B;IAC/BC,mBAAmB,IAAIH,MAAsB;IAE7CI,OAGN;IAEF,uBAAuB;IACfC,qBAAqB,IAAIL,MAK5B;IAEL,oBAAoB;IACZM,kBAAkB,IAAIN,MAIzB;IAEL,YAAYI,MAGX,CAAE;QACD,KAAK;QAEL,IAAI,CAACA,MAAM,GAAG;YACZG,aAAa;gBACXC,UAAUJ,QAAQG,aAAaC,YAAY;gBAC3CC,SAASL,QAAQG,aAAaE,WAAW;gBACzCC,mBAAmBN,QAAQG,aAAaG,qBAAqB;gBAC7DC,mBAAmBP,QAAQG,aAAaI,qBAAqB;gBAC7DC,kBAAkBR,QAAQG,aAAaK,oBAA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