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,709 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Communication Bridge - Integration Layer
|
|
3
|
+
*
|
|
4
|
+
* Connects the ultra-fast communication system with the fullstack swarm orchestrator
|
|
5
|
+
* to enable real-time agent coordination during fullstack development workflows.
|
|
6
|
+
*
|
|
7
|
+
* Key Features:
|
|
8
|
+
* - Ultra-fast inter-agent communication (<1ms latency)
|
|
9
|
+
* - Real-time progress broadcasting between agents
|
|
10
|
+
* - Memory coordination across frontend/backend teams
|
|
11
|
+
* - Event-driven architecture for scalability
|
|
12
|
+
* - Backward compatibility with existing systems
|
|
13
|
+
*
|
|
14
|
+
* Architecture:
|
|
15
|
+
* - Bridges CommunicationMemoryStore with FullStackOrchestrator
|
|
16
|
+
* - Integrates UltraFastCommunicationBus with EnhancedSwarmMessageRouter
|
|
17
|
+
* - Provides unified event broadcasting across all agents
|
|
18
|
+
* - Manages memory sharing for iterative building workflows
|
|
19
|
+
*/ import { EventEmitter } from 'events';
|
|
20
|
+
// Import communication components with runtime checks
|
|
21
|
+
let UltraFastCommunicationBus = null;
|
|
22
|
+
let CommunicationMemoryStore = null;
|
|
23
|
+
// Lazy load communication components to avoid top-level await
|
|
24
|
+
async function loadCommunicationComponents() {
|
|
25
|
+
if (UltraFastCommunicationBus !== null) return; // Already loaded
|
|
26
|
+
try {
|
|
27
|
+
const commModule = await import('../../communication/ultra-fast-communication-bus.js');
|
|
28
|
+
UltraFastCommunicationBus = commModule.UltraFastCommunicationBus || commModule.default;
|
|
29
|
+
} catch {
|
|
30
|
+
console.warn('⚠️ Ultra-fast communication bus not available - using fallback');
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const memModule = await import('../../hooks/communication-integrated-post-edit.js');
|
|
34
|
+
CommunicationMemoryStore = memModule.CommunicationMemoryStore;
|
|
35
|
+
} catch {
|
|
36
|
+
console.warn('⚠️ Communication memory store not available - using fallback');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Communication Bridge - Main Integration Class
|
|
41
|
+
*
|
|
42
|
+
* Bridges the ultra-fast communication system with the fullstack orchestrator
|
|
43
|
+
* to enable real-time agent coordination and memory sharing.
|
|
44
|
+
*/ export class CommunicationBridge extends EventEmitter {
|
|
45
|
+
config;
|
|
46
|
+
logger;
|
|
47
|
+
// Communication components
|
|
48
|
+
communicationBus;
|
|
49
|
+
memoryStore;
|
|
50
|
+
communicationEnabled = false;
|
|
51
|
+
// Orchestrator references
|
|
52
|
+
orchestrator = null;
|
|
53
|
+
messageRouter = null;
|
|
54
|
+
// Active subscriptions per swarm
|
|
55
|
+
swarmSubscriptions = new Map();
|
|
56
|
+
agentQueues = new Map();
|
|
57
|
+
// Performance metrics
|
|
58
|
+
metrics = {
|
|
59
|
+
messagesRouted: 0,
|
|
60
|
+
memoryOperations: 0,
|
|
61
|
+
coordinationEvents: 0,
|
|
62
|
+
averageLatency: 0,
|
|
63
|
+
activeSwarms: 0,
|
|
64
|
+
activeAgents: 0
|
|
65
|
+
};
|
|
66
|
+
constructor(config, logger){
|
|
67
|
+
super();
|
|
68
|
+
this.config = {
|
|
69
|
+
enableUltraFastComm: true,
|
|
70
|
+
enableMemorySharing: true,
|
|
71
|
+
enableRealTimeProgress: true,
|
|
72
|
+
messageBufferSize: 65536,
|
|
73
|
+
maxSubscriptionsPerAgent: 100,
|
|
74
|
+
broadcastBatchSize: 32,
|
|
75
|
+
enableCrossLayerCoordination: true,
|
|
76
|
+
enableDependencyTracking: true,
|
|
77
|
+
enableIterativeBuilding: true,
|
|
78
|
+
memoryNamespace: 'fullstack-swarm',
|
|
79
|
+
persistMemory: true,
|
|
80
|
+
memoryTTL: 3600000,
|
|
81
|
+
enableMetrics: true,
|
|
82
|
+
metricsInterval: 5000,
|
|
83
|
+
...config
|
|
84
|
+
};
|
|
85
|
+
this.logger = logger;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Initialize the communication bridge
|
|
89
|
+
*/ async initialize(orchestrator, messageRouter) {
|
|
90
|
+
this.logger.info('Initializing Communication Bridge', {
|
|
91
|
+
enableUltraFastComm: this.config.enableUltraFastComm,
|
|
92
|
+
enableMemorySharing: this.config.enableMemorySharing
|
|
93
|
+
});
|
|
94
|
+
this.orchestrator = orchestrator;
|
|
95
|
+
this.messageRouter = messageRouter;
|
|
96
|
+
// Load communication components lazily
|
|
97
|
+
await loadCommunicationComponents();
|
|
98
|
+
// Initialize communication bus if available
|
|
99
|
+
if (this.config.enableUltraFastComm && UltraFastCommunicationBus) {
|
|
100
|
+
await this.initializeCommunicationBus();
|
|
101
|
+
}
|
|
102
|
+
// Initialize memory store if available
|
|
103
|
+
if (this.config.enableMemorySharing && CommunicationMemoryStore) {
|
|
104
|
+
await this.initializeMemoryStore();
|
|
105
|
+
}
|
|
106
|
+
// Setup event handlers
|
|
107
|
+
this.setupOrchestratorHandlers();
|
|
108
|
+
this.setupMessageRouterHandlers();
|
|
109
|
+
// Start metrics collection
|
|
110
|
+
if (this.config.enableMetrics) {
|
|
111
|
+
this.startMetricsCollection();
|
|
112
|
+
}
|
|
113
|
+
this.logger.info('Communication Bridge initialized successfully', {
|
|
114
|
+
communicationEnabled: this.communicationEnabled,
|
|
115
|
+
componentsActive: {
|
|
116
|
+
communicationBus: !!this.communicationBus,
|
|
117
|
+
memoryStore: !!this.memoryStore
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
this.emit('bridge:initialized');
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Initialize ultra-fast communication bus
|
|
124
|
+
*/ async initializeCommunicationBus() {
|
|
125
|
+
try {
|
|
126
|
+
this.communicationBus = new UltraFastCommunicationBus({
|
|
127
|
+
enableZeroCopy: true,
|
|
128
|
+
enableOptimizedSerialization: true,
|
|
129
|
+
maxBufferSize: this.config.messageBufferSize
|
|
130
|
+
});
|
|
131
|
+
if (this.communicationBus.initialize) {
|
|
132
|
+
await this.communicationBus.initialize();
|
|
133
|
+
}
|
|
134
|
+
this.communicationEnabled = true;
|
|
135
|
+
this.logger.info('Ultra-fast communication bus initialized');
|
|
136
|
+
} catch (error) {
|
|
137
|
+
this.logger.error('Failed to initialize communication bus', {
|
|
138
|
+
error
|
|
139
|
+
});
|
|
140
|
+
this.communicationBus = new EventEmitter(); // Fallback
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Initialize communication memory store
|
|
145
|
+
*/ async initializeMemoryStore() {
|
|
146
|
+
try {
|
|
147
|
+
this.memoryStore = new CommunicationMemoryStore({
|
|
148
|
+
enableCommunication: this.communicationEnabled,
|
|
149
|
+
enableZeroCopy: true,
|
|
150
|
+
enableOptimizedSerialization: true
|
|
151
|
+
});
|
|
152
|
+
await this.memoryStore.initialize();
|
|
153
|
+
// Subscribe to memory events
|
|
154
|
+
this.memoryStore.on('store', (event)=>{
|
|
155
|
+
this.handleMemoryStoreEvent(event);
|
|
156
|
+
});
|
|
157
|
+
this.memoryStore.on('remoteUpdate', (update)=>{
|
|
158
|
+
this.handleMemoryRemoteUpdate(update);
|
|
159
|
+
});
|
|
160
|
+
this.logger.info('Communication memory store initialized');
|
|
161
|
+
} catch (error) {
|
|
162
|
+
this.logger.error('Failed to initialize memory store', {
|
|
163
|
+
error
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Setup orchestrator event handlers
|
|
169
|
+
*/ setupOrchestratorHandlers() {
|
|
170
|
+
if (!this.orchestrator) return;
|
|
171
|
+
// Feature development lifecycle events
|
|
172
|
+
this.orchestrator.on('feature-development-started', (event)=>{
|
|
173
|
+
this.handleFeatureDevelopmentStarted(event);
|
|
174
|
+
});
|
|
175
|
+
this.orchestrator.on('phase-completed', (event)=>{
|
|
176
|
+
this.handlePhaseCompleted(event);
|
|
177
|
+
});
|
|
178
|
+
this.orchestrator.on('swarm-team-ready', (event)=>{
|
|
179
|
+
this.handleSwarmTeamReady(event);
|
|
180
|
+
});
|
|
181
|
+
this.orchestrator.on('feature-development-completed', (event)=>{
|
|
182
|
+
this.handleFeatureDevelopmentCompleted(event);
|
|
183
|
+
});
|
|
184
|
+
this.orchestrator.on('swarm-scaled', (event)=>{
|
|
185
|
+
this.handleSwarmScaled(event);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Setup message router event handlers
|
|
190
|
+
*/ setupMessageRouterHandlers() {
|
|
191
|
+
if (!this.messageRouter) return;
|
|
192
|
+
// Enhanced message routing events
|
|
193
|
+
this.messageRouter.on('enhanced-message', (message)=>{
|
|
194
|
+
this.handleEnhancedMessage(message);
|
|
195
|
+
});
|
|
196
|
+
this.messageRouter.on('swarm-state-updated', (state)=>{
|
|
197
|
+
this.handleSwarmStateUpdated(state);
|
|
198
|
+
});
|
|
199
|
+
// Routing strategy events
|
|
200
|
+
this.messageRouter.on('direct-message', (event)=>{
|
|
201
|
+
this.routeDirectMessage(event);
|
|
202
|
+
});
|
|
203
|
+
this.messageRouter.on('broadcast-message', (event)=>{
|
|
204
|
+
this.routeBroadcastMessage(event);
|
|
205
|
+
});
|
|
206
|
+
this.messageRouter.on('hierarchical-message', (event)=>{
|
|
207
|
+
this.routeHierarchicalMessage(event);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Handle feature development started
|
|
212
|
+
*/ async handleFeatureDevelopmentStarted(event) {
|
|
213
|
+
const { swarmId, request } = event;
|
|
214
|
+
this.logger.info('Feature development started - setting up communication', {
|
|
215
|
+
swarmId,
|
|
216
|
+
featureName: request.name
|
|
217
|
+
});
|
|
218
|
+
// Broadcast to all agents
|
|
219
|
+
await this.broadcastCoordinationEvent({
|
|
220
|
+
type: 'swarm:phase:started',
|
|
221
|
+
swarmId,
|
|
222
|
+
data: {
|
|
223
|
+
phase: 'feature-development',
|
|
224
|
+
feature: request.name,
|
|
225
|
+
requirements: request.requirements
|
|
226
|
+
},
|
|
227
|
+
timestamp: new Date().toISOString(),
|
|
228
|
+
priority: 'high'
|
|
229
|
+
});
|
|
230
|
+
// Store in shared memory
|
|
231
|
+
if (this.memoryStore) {
|
|
232
|
+
await this.memoryStore.store(`swarm:${swarmId}:feature`, request, {
|
|
233
|
+
namespace: this.config.memoryNamespace,
|
|
234
|
+
metadata: {
|
|
235
|
+
type: 'feature-request'
|
|
236
|
+
},
|
|
237
|
+
broadcast: true
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
this.metrics.activeSwarms++;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Handle swarm team ready
|
|
244
|
+
*/ async handleSwarmTeamReady(event) {
|
|
245
|
+
const { swarmId, team } = event;
|
|
246
|
+
this.logger.info('Swarm team ready - initializing agent coordination', {
|
|
247
|
+
swarmId,
|
|
248
|
+
agentCount: team.agents.length
|
|
249
|
+
});
|
|
250
|
+
// Create communication queues for each agent
|
|
251
|
+
for (const agent of team.agents){
|
|
252
|
+
await this.registerAgent(swarmId, agent.id, agent.type);
|
|
253
|
+
}
|
|
254
|
+
// Broadcast team composition to all agents
|
|
255
|
+
await this.broadcastCoordinationEvent({
|
|
256
|
+
type: 'swarm:phase:started',
|
|
257
|
+
swarmId,
|
|
258
|
+
data: {
|
|
259
|
+
phase: 'team-spawning-complete',
|
|
260
|
+
team: {
|
|
261
|
+
agentCount: team.agents.length,
|
|
262
|
+
agents: team.agents.map((a)=>({
|
|
263
|
+
id: a.id,
|
|
264
|
+
type: a.type,
|
|
265
|
+
capabilities: a.capabilities
|
|
266
|
+
}))
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
timestamp: new Date().toISOString(),
|
|
270
|
+
priority: 'high'
|
|
271
|
+
});
|
|
272
|
+
// Store team composition in shared memory
|
|
273
|
+
if (this.memoryStore) {
|
|
274
|
+
await this.memoryStore.store(`swarm:${swarmId}:team`, team, {
|
|
275
|
+
namespace: this.config.memoryNamespace,
|
|
276
|
+
metadata: {
|
|
277
|
+
type: 'team-composition'
|
|
278
|
+
},
|
|
279
|
+
broadcast: true
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
this.metrics.activeAgents += team.agents.length;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Register agent with communication system
|
|
286
|
+
*/ async registerAgent(swarmId, agentId, agentType) {
|
|
287
|
+
const queueId = `${swarmId}:${agentId}`;
|
|
288
|
+
// Create dedicated queue in communication bus
|
|
289
|
+
if (this.communicationBus && this.communicationBus.subscribe) {
|
|
290
|
+
// Subscribe to agent-specific topics
|
|
291
|
+
this.communicationBus.subscribe(`agent:${agentId}:*`, queueId);
|
|
292
|
+
this.communicationBus.subscribe(`swarm:${swarmId}:*`, queueId);
|
|
293
|
+
this.communicationBus.subscribe(`layer:${this.getAgentLayer(agentType)}:*`, queueId);
|
|
294
|
+
}
|
|
295
|
+
// Track agent queue
|
|
296
|
+
this.agentQueues.set(agentId, queueId);
|
|
297
|
+
// Track swarm subscriptions
|
|
298
|
+
if (!this.swarmSubscriptions.has(swarmId)) {
|
|
299
|
+
this.swarmSubscriptions.set(swarmId, new Set());
|
|
300
|
+
}
|
|
301
|
+
this.swarmSubscriptions.get(swarmId).add(agentId);
|
|
302
|
+
// Broadcast agent ready event
|
|
303
|
+
await this.broadcastCoordinationEvent({
|
|
304
|
+
type: 'agent:ready',
|
|
305
|
+
swarmId,
|
|
306
|
+
agentId,
|
|
307
|
+
agentType,
|
|
308
|
+
data: {
|
|
309
|
+
queueId
|
|
310
|
+
},
|
|
311
|
+
timestamp: new Date().toISOString(),
|
|
312
|
+
priority: 'medium'
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Handle enhanced message from message router
|
|
317
|
+
*/ async handleEnhancedMessage(message) {
|
|
318
|
+
const startTime = performance.now();
|
|
319
|
+
try {
|
|
320
|
+
// Route through ultra-fast communication bus
|
|
321
|
+
if (this.communicationBus && this.communicationBus.publish) {
|
|
322
|
+
const topic = this.buildMessageTopic(message);
|
|
323
|
+
const payload = this.serializeMessage(message);
|
|
324
|
+
await this.communicationBus.publish(topic, payload, this.getPriority(message.priority));
|
|
325
|
+
}
|
|
326
|
+
// Broadcast coordination event
|
|
327
|
+
await this.broadcastCoordinationEvent({
|
|
328
|
+
type: this.mapMessageTypeToCoordinationEvent(message.messageType),
|
|
329
|
+
swarmId: message.swarmId,
|
|
330
|
+
agentId: message.agentId,
|
|
331
|
+
agentType: message.agentType,
|
|
332
|
+
data: {
|
|
333
|
+
messageId: message.id,
|
|
334
|
+
messageType: message.messageType,
|
|
335
|
+
content: message.content,
|
|
336
|
+
layer: message.layer
|
|
337
|
+
},
|
|
338
|
+
timestamp: new Date().toISOString(),
|
|
339
|
+
priority: message.priority
|
|
340
|
+
});
|
|
341
|
+
// Update metrics
|
|
342
|
+
const latency = performance.now() - startTime;
|
|
343
|
+
this.updateLatencyMetrics(latency);
|
|
344
|
+
this.metrics.messagesRouted++;
|
|
345
|
+
} catch (error) {
|
|
346
|
+
this.logger.error('Failed to handle enhanced message', {
|
|
347
|
+
error,
|
|
348
|
+
messageId: message.id,
|
|
349
|
+
swarmId: message.swarmId
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Handle phase completed
|
|
355
|
+
*/ async handlePhaseCompleted(event) {
|
|
356
|
+
const { swarmId, phase } = event;
|
|
357
|
+
await this.broadcastCoordinationEvent({
|
|
358
|
+
type: 'swarm:phase:completed',
|
|
359
|
+
swarmId,
|
|
360
|
+
data: {
|
|
361
|
+
phase,
|
|
362
|
+
completedAt: new Date().toISOString(),
|
|
363
|
+
results: event
|
|
364
|
+
},
|
|
365
|
+
timestamp: new Date().toISOString(),
|
|
366
|
+
priority: 'high'
|
|
367
|
+
});
|
|
368
|
+
// Store phase results in shared memory
|
|
369
|
+
if (this.memoryStore) {
|
|
370
|
+
await this.memoryStore.store(`swarm:${swarmId}:phase:${phase}`, event, {
|
|
371
|
+
namespace: this.config.memoryNamespace,
|
|
372
|
+
metadata: {
|
|
373
|
+
type: 'phase-completion',
|
|
374
|
+
phase
|
|
375
|
+
},
|
|
376
|
+
broadcast: true
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Broadcast coordination event to all agents in swarm
|
|
382
|
+
*/ async broadcastCoordinationEvent(event) {
|
|
383
|
+
try {
|
|
384
|
+
// Emit locally
|
|
385
|
+
this.emit('coordination-event', event);
|
|
386
|
+
// Broadcast via communication bus
|
|
387
|
+
if (this.communicationBus && this.communicationBus.publish) {
|
|
388
|
+
const topic = `coordination:${event.type}`;
|
|
389
|
+
const payload = this.serializeCoordinationEvent(event);
|
|
390
|
+
await this.communicationBus.publish(topic, payload, this.getPriority(event.priority));
|
|
391
|
+
}
|
|
392
|
+
// Store in memory if relevant
|
|
393
|
+
if (this.shouldStoreCoordinationEvent(event) && this.memoryStore) {
|
|
394
|
+
await this.memoryStore.store(`coordination:${event.swarmId}:${event.type}:${Date.now()}`, event, {
|
|
395
|
+
namespace: this.config.memoryNamespace,
|
|
396
|
+
metadata: {
|
|
397
|
+
type: 'coordination-event'
|
|
398
|
+
},
|
|
399
|
+
broadcast: false // Already broadcasted above
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
this.metrics.coordinationEvents++;
|
|
403
|
+
} catch (error) {
|
|
404
|
+
this.logger.error('Failed to broadcast coordination event', {
|
|
405
|
+
error,
|
|
406
|
+
event
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Share memory across agents
|
|
412
|
+
*/ async shareMemory(coordination) {
|
|
413
|
+
if (!this.memoryStore) {
|
|
414
|
+
this.logger.warn('Memory store not available for memory sharing');
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
try {
|
|
418
|
+
await this.memoryStore.store(coordination.key, coordination.value, {
|
|
419
|
+
namespace: `${this.config.memoryNamespace}:${coordination.swarmId}`,
|
|
420
|
+
metadata: {
|
|
421
|
+
agentId: coordination.agentId,
|
|
422
|
+
layer: coordination.layer,
|
|
423
|
+
dependencies: coordination.dependencies,
|
|
424
|
+
version: coordination.version
|
|
425
|
+
},
|
|
426
|
+
broadcast: true
|
|
427
|
+
});
|
|
428
|
+
await this.broadcastCoordinationEvent({
|
|
429
|
+
type: 'memory:shared',
|
|
430
|
+
swarmId: coordination.swarmId,
|
|
431
|
+
agentId: coordination.agentId,
|
|
432
|
+
data: {
|
|
433
|
+
key: coordination.key,
|
|
434
|
+
layer: coordination.layer,
|
|
435
|
+
dependencies: coordination.dependencies
|
|
436
|
+
},
|
|
437
|
+
timestamp: new Date().toISOString(),
|
|
438
|
+
priority: 'medium'
|
|
439
|
+
});
|
|
440
|
+
this.metrics.memoryOperations++;
|
|
441
|
+
} catch (error) {
|
|
442
|
+
this.logger.error('Failed to share memory', {
|
|
443
|
+
error,
|
|
444
|
+
coordination
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Query shared memory
|
|
450
|
+
*/ async queryMemory(swarmId, key, options = {}) {
|
|
451
|
+
if (!this.memoryStore) {
|
|
452
|
+
this.logger.warn('Memory store not available for memory query');
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
try {
|
|
456
|
+
const value = await this.memoryStore.retrieve(key, {
|
|
457
|
+
namespace: `${this.config.memoryNamespace}:${swarmId}`,
|
|
458
|
+
queryRemote: options.queryRemote
|
|
459
|
+
});
|
|
460
|
+
if (value) {
|
|
461
|
+
await this.broadcastCoordinationEvent({
|
|
462
|
+
type: 'memory:query',
|
|
463
|
+
swarmId,
|
|
464
|
+
data: {
|
|
465
|
+
key,
|
|
466
|
+
found: true
|
|
467
|
+
},
|
|
468
|
+
timestamp: new Date().toISOString(),
|
|
469
|
+
priority: 'low'
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
this.metrics.memoryOperations++;
|
|
473
|
+
return value;
|
|
474
|
+
} catch (error) {
|
|
475
|
+
this.logger.error('Failed to query memory', {
|
|
476
|
+
error,
|
|
477
|
+
swarmId,
|
|
478
|
+
key
|
|
479
|
+
});
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Handle swarm state updated
|
|
485
|
+
*/ async handleSwarmStateUpdated(state) {
|
|
486
|
+
await this.broadcastCoordinationEvent({
|
|
487
|
+
type: 'swarm:progress:update',
|
|
488
|
+
swarmId: state.swarmId,
|
|
489
|
+
data: {
|
|
490
|
+
complexity: state.complexity,
|
|
491
|
+
agentCount: state.teamComposition.agents.length,
|
|
492
|
+
messageCount: state.messageCount,
|
|
493
|
+
coordination: state.coordination,
|
|
494
|
+
resourceUsage: state.resourceUsage
|
|
495
|
+
},
|
|
496
|
+
timestamp: new Date().toISOString(),
|
|
497
|
+
priority: 'low'
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Handle memory store event
|
|
502
|
+
*/ handleMemoryStoreEvent(event) {
|
|
503
|
+
this.emit('memory:stored', event);
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Handle memory remote update
|
|
507
|
+
*/ handleMemoryRemoteUpdate(update) {
|
|
508
|
+
this.emit('memory:updated', update);
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Route direct message to specific agent
|
|
512
|
+
*/ async routeDirectMessage(event) {
|
|
513
|
+
if (this.communicationBus && this.communicationBus.publish) {
|
|
514
|
+
const topic = `agent:${event.targetAgent}:direct`;
|
|
515
|
+
const payload = this.serializeMessage(event);
|
|
516
|
+
await this.communicationBus.publish(topic, payload, 0); // High priority
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Route broadcast message to layer
|
|
521
|
+
*/ async routeBroadcastMessage(event) {
|
|
522
|
+
if (this.communicationBus && this.communicationBus.publish) {
|
|
523
|
+
const topic = `swarm:${event.swarmId}:broadcast`;
|
|
524
|
+
const payload = this.serializeMessage(event);
|
|
525
|
+
await this.communicationBus.publish(topic, payload, 2); // Normal priority
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Route hierarchical message through coordinators
|
|
530
|
+
*/ async routeHierarchicalMessage(event) {
|
|
531
|
+
if (this.communicationBus && this.communicationBus.publish) {
|
|
532
|
+
const topic = `coordinator:${event.coordinator}:hierarchical`;
|
|
533
|
+
const payload = this.serializeMessage(event);
|
|
534
|
+
await this.communicationBus.publish(topic, payload, 1); // High priority
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Handle feature development completed
|
|
539
|
+
*/ async handleFeatureDevelopmentCompleted(event) {
|
|
540
|
+
const { swarmId, status } = event;
|
|
541
|
+
await this.broadcastCoordinationEvent({
|
|
542
|
+
type: 'swarm:phase:completed',
|
|
543
|
+
swarmId,
|
|
544
|
+
data: {
|
|
545
|
+
phase: 'feature-development-complete',
|
|
546
|
+
status: status.status,
|
|
547
|
+
performance: status.performance
|
|
548
|
+
},
|
|
549
|
+
timestamp: new Date().toISOString(),
|
|
550
|
+
priority: 'high'
|
|
551
|
+
});
|
|
552
|
+
// Cleanup swarm resources
|
|
553
|
+
await this.cleanupSwarm(swarmId);
|
|
554
|
+
this.metrics.activeSwarms--;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Handle swarm scaled
|
|
558
|
+
*/ async handleSwarmScaled(event) {
|
|
559
|
+
const { swarmId, newTeamSize } = event;
|
|
560
|
+
await this.broadcastCoordinationEvent({
|
|
561
|
+
type: 'swarm:phase:started',
|
|
562
|
+
swarmId,
|
|
563
|
+
data: {
|
|
564
|
+
phase: 'swarm-scaled',
|
|
565
|
+
newTeamSize,
|
|
566
|
+
action: event.action
|
|
567
|
+
},
|
|
568
|
+
timestamp: new Date().toISOString(),
|
|
569
|
+
priority: 'high'
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Cleanup swarm resources
|
|
574
|
+
*/ async cleanupSwarm(swarmId) {
|
|
575
|
+
// Remove agent subscriptions
|
|
576
|
+
const agents = this.swarmSubscriptions.get(swarmId);
|
|
577
|
+
if (agents) {
|
|
578
|
+
for (const agentId of agents){
|
|
579
|
+
this.agentQueues.delete(agentId);
|
|
580
|
+
this.metrics.activeAgents--;
|
|
581
|
+
}
|
|
582
|
+
this.swarmSubscriptions.delete(swarmId);
|
|
583
|
+
}
|
|
584
|
+
// Clear memory namespace
|
|
585
|
+
if (this.memoryStore && this.config.persistMemory === false) {
|
|
586
|
+
// Memory cleanup logic would go here
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Build message topic for routing
|
|
591
|
+
*/ buildMessageTopic(message) {
|
|
592
|
+
if (message.targetAgents && message.targetAgents.length > 0) {
|
|
593
|
+
return `agent:${message.targetAgents[0]}:direct`;
|
|
594
|
+
}
|
|
595
|
+
if (message.layer) {
|
|
596
|
+
return `layer:${message.layer}:${message.messageType}`;
|
|
597
|
+
}
|
|
598
|
+
return `swarm:${message.swarmId}:${message.messageType}`;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Map message priority to communication bus priority
|
|
602
|
+
*/ getPriority(priority) {
|
|
603
|
+
const priorityMap = {
|
|
604
|
+
'critical': 0,
|
|
605
|
+
'urgent': 0,
|
|
606
|
+
'high': 1,
|
|
607
|
+
'medium': 2,
|
|
608
|
+
'low': 3
|
|
609
|
+
};
|
|
610
|
+
return priorityMap[priority] || 2;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Map message type to coordination event type
|
|
614
|
+
*/ mapMessageTypeToCoordinationEvent(messageType) {
|
|
615
|
+
const typeMap = {
|
|
616
|
+
'task-start': 'agent:working',
|
|
617
|
+
'completion': 'agent:completed',
|
|
618
|
+
'error': 'agent:failed',
|
|
619
|
+
'coordination': 'swarm:coordination:required',
|
|
620
|
+
'decision': 'swarm:coordination:required'
|
|
621
|
+
};
|
|
622
|
+
return typeMap[messageType] || 'swarm:progress:update';
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Get agent layer from agent type
|
|
626
|
+
*/ getAgentLayer(agentType) {
|
|
627
|
+
if (agentType.includes('frontend') || agentType.includes('ui')) return 'frontend';
|
|
628
|
+
if (agentType.includes('backend') || agentType.includes('api')) return 'backend';
|
|
629
|
+
if (agentType.includes('database') || agentType.includes('data')) return 'database';
|
|
630
|
+
if (agentType.includes('devops') || agentType.includes('deployment')) return 'infrastructure';
|
|
631
|
+
if (agentType.includes('qa') || agentType.includes('test')) return 'testing';
|
|
632
|
+
return 'general';
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Serialize message for communication bus
|
|
636
|
+
*/ serializeMessage(message) {
|
|
637
|
+
const json = JSON.stringify(message);
|
|
638
|
+
const encoder = new TextEncoder();
|
|
639
|
+
return encoder.encode(json).buffer;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Serialize coordination event
|
|
643
|
+
*/ serializeCoordinationEvent(event) {
|
|
644
|
+
const json = JSON.stringify(event);
|
|
645
|
+
const encoder = new TextEncoder();
|
|
646
|
+
return encoder.encode(json).buffer;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Should store coordination event in memory
|
|
650
|
+
*/ shouldStoreCoordinationEvent(event) {
|
|
651
|
+
// Store important coordination events
|
|
652
|
+
const importantTypes = [
|
|
653
|
+
'swarm:phase:started',
|
|
654
|
+
'swarm:phase:completed',
|
|
655
|
+
'swarm:coordination:required',
|
|
656
|
+
'swarm:conflict:detected'
|
|
657
|
+
];
|
|
658
|
+
return importantTypes.includes(event.type);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Update latency metrics
|
|
662
|
+
*/ updateLatencyMetrics(latency) {
|
|
663
|
+
const alpha = 0.2;
|
|
664
|
+
this.metrics.averageLatency = alpha * latency + (1 - alpha) * this.metrics.averageLatency;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Start metrics collection
|
|
668
|
+
*/ startMetricsCollection() {
|
|
669
|
+
setInterval(()=>{
|
|
670
|
+
this.emit('metrics:updated', this.getMetrics());
|
|
671
|
+
}, this.config.metricsInterval);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Get comprehensive metrics
|
|
675
|
+
*/ getMetrics() {
|
|
676
|
+
return {
|
|
677
|
+
...this.metrics,
|
|
678
|
+
communicationEnabled: this.communicationEnabled,
|
|
679
|
+
componentsActive: {
|
|
680
|
+
communicationBus: !!this.communicationBus,
|
|
681
|
+
memoryStore: !!this.memoryStore,
|
|
682
|
+
orchestrator: !!this.orchestrator,
|
|
683
|
+
messageRouter: !!this.messageRouter
|
|
684
|
+
},
|
|
685
|
+
communicationBusMetrics: this.communicationBus?.getMetrics?.() || null,
|
|
686
|
+
memoryStoreMetrics: this.memoryStore?.getMetrics?.() || null
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Graceful shutdown
|
|
691
|
+
*/ async shutdown() {
|
|
692
|
+
this.logger.info('Shutting down Communication Bridge');
|
|
693
|
+
// Cleanup all swarms
|
|
694
|
+
for (const swarmId of this.swarmSubscriptions.keys()){
|
|
695
|
+
await this.cleanupSwarm(swarmId);
|
|
696
|
+
}
|
|
697
|
+
// Close communication components
|
|
698
|
+
if (this.communicationBus && this.communicationBus.shutdown) {
|
|
699
|
+
await this.communicationBus.shutdown();
|
|
700
|
+
}
|
|
701
|
+
if (this.memoryStore && this.memoryStore.close) {
|
|
702
|
+
await this.memoryStore.close();
|
|
703
|
+
}
|
|
704
|
+
this.emit('bridge:shutdown');
|
|
705
|
+
this.logger.info('Communication Bridge shutdown complete');
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
//# sourceMappingURL=communication-bridge.js.map
|