claude-flow-novice 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/MIGRATION_SUMMARY.md +222 -0
- package/.claude/agents/README.md +89 -0
- package/.claude/agents/analysis/code-analyzer.md +209 -0
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude/agents/base-template-generator.md +42 -0
- package/.claude/agents/consensus/README.md +253 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +63 -0
- package/.claude/agents/consensus/consensus-builder.md +242 -0
- package/.claude/agents/consensus/crdt-synchronizer.md +997 -0
- package/.claude/agents/consensus/gossip-coordinator.md +63 -0
- package/.claude/agents/consensus/performance-benchmarker.md +851 -0
- package/.claude/agents/consensus/quorum-manager.md +823 -0
- package/.claude/agents/consensus/raft-manager.md +63 -0
- package/.claude/agents/consensus/security-manager.md +622 -0
- package/.claude/agents/core/coder.md +211 -0
- package/.claude/agents/core/planner.md +116 -0
- package/.claude/agents/core/researcher.md +136 -0
- package/.claude/agents/core/reviewer.md +272 -0
- package/.claude/agents/core/tester.md +266 -0
- package/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude/agents/flow-nexus/app-store.md +88 -0
- package/.claude/agents/flow-nexus/authentication.md +69 -0
- package/.claude/agents/flow-nexus/challenges.md +81 -0
- package/.claude/agents/flow-nexus/neural-network.md +88 -0
- package/.claude/agents/flow-nexus/payments.md +83 -0
- package/.claude/agents/flow-nexus/sandbox.md +76 -0
- package/.claude/agents/flow-nexus/swarm.md +76 -0
- package/.claude/agents/flow-nexus/user-tools.md +96 -0
- package/.claude/agents/flow-nexus/workflow.md +84 -0
- package/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude/agents/github/github-modes.md +173 -0
- package/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude/agents/github/pr-manager.md +191 -0
- package/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude/agents/github/release-manager.md +367 -0
- package/.claude/agents/github/release-swarm.md +583 -0
- package/.claude/agents/github/repo-architect.md +398 -0
- package/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude/agents/goal/goal-planner.md +73 -0
- package/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude/agents/optimization/README.md +250 -0
- package/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude/agents/sparc/architecture.md +472 -0
- package/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude/agents/sparc/refinement.md +525 -0
- package/.claude/agents/sparc/specification.md +276 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude/agents/swarm/README.md +190 -0
- package/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude/agents/templates/coordinator-swarm-init.md +90 -0
- package/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude/agents/testing/e2e/playwright-agent.md +249 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude/commands/agents/README.md +10 -0
- package/.claude/commands/agents/agent-capabilities.md +21 -0
- package/.claude/commands/agents/agent-coordination.md +28 -0
- package/.claude/commands/agents/agent-spawning.md +28 -0
- package/.claude/commands/agents/agent-types.md +26 -0
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +54 -0
- package/.claude/commands/analysis/README.md +9 -0
- package/.claude/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude/commands/analysis/performance-bottlenecks.md +59 -0
- package/.claude/commands/analysis/performance-report.md +25 -0
- package/.claude/commands/analysis/token-efficiency.md +45 -0
- package/.claude/commands/analysis/token-usage.md +25 -0
- package/.claude/commands/automation/README.md +9 -0
- package/.claude/commands/automation/auto-agent.md +122 -0
- package/.claude/commands/automation/self-healing.md +106 -0
- package/.claude/commands/automation/session-memory.md +90 -0
- package/.claude/commands/automation/smart-agents.md +73 -0
- package/.claude/commands/automation/smart-spawn.md +25 -0
- package/.claude/commands/automation/workflow-select.md +25 -0
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/coordination/agent-spawn.md +25 -0
- package/.claude/commands/coordination/init.md +44 -0
- package/.claude/commands/coordination/orchestrate.md +43 -0
- package/.claude/commands/coordination/spawn.md +45 -0
- package/.claude/commands/coordination/swarm-init.md +85 -0
- package/.claude/commands/coordination/task-orchestrate.md +25 -0
- package/.claude/commands/flow-nexus/app-store.md +124 -0
- package/.claude/commands/flow-nexus/challenges.md +120 -0
- package/.claude/commands/flow-nexus/login-registration.md +65 -0
- package/.claude/commands/flow-nexus/neural-network.md +134 -0
- package/.claude/commands/flow-nexus/payments.md +116 -0
- package/.claude/commands/flow-nexus/sandbox.md +83 -0
- package/.claude/commands/flow-nexus/swarm.md +87 -0
- package/.claude/commands/flow-nexus/user-tools.md +152 -0
- package/.claude/commands/flow-nexus/workflow.md +115 -0
- package/.claude/commands/github/README.md +11 -0
- package/.claude/commands/github/code-review-swarm.md +514 -0
- package/.claude/commands/github/code-review.md +25 -0
- package/.claude/commands/github/github-modes.md +147 -0
- package/.claude/commands/github/github-swarm.md +121 -0
- package/.claude/commands/github/issue-tracker.md +292 -0
- package/.claude/commands/github/issue-triage.md +25 -0
- package/.claude/commands/github/multi-repo-swarm.md +519 -0
- package/.claude/commands/github/pr-enhance.md +26 -0
- package/.claude/commands/github/pr-manager.md +170 -0
- package/.claude/commands/github/project-board-sync.md +471 -0
- package/.claude/commands/github/release-manager.md +338 -0
- package/.claude/commands/github/release-swarm.md +544 -0
- package/.claude/commands/github/repo-analyze.md +25 -0
- package/.claude/commands/github/repo-architect.md +367 -0
- package/.claude/commands/github/swarm-issue.md +482 -0
- package/.claude/commands/github/swarm-pr.md +285 -0
- package/.claude/commands/github/sync-coordinator.md +301 -0
- package/.claude/commands/github/workflow-automation.md +442 -0
- package/.claude/commands/hive-mind/README.md +17 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
- package/.claude/commands/hive-mind/hive-mind.md +27 -0
- package/.claude/commands/hooks/README.md +11 -0
- package/.claude/commands/hooks/overview.md +58 -0
- package/.claude/commands/hooks/post-edit.md +117 -0
- package/.claude/commands/hooks/post-task.md +112 -0
- package/.claude/commands/hooks/pre-edit.md +113 -0
- package/.claude/commands/hooks/pre-task.md +111 -0
- package/.claude/commands/hooks/session-end.md +118 -0
- package/.claude/commands/hooks/setup.md +103 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/commands/memory/memory-persist.md +25 -0
- package/.claude/commands/memory/memory-search.md +25 -0
- package/.claude/commands/memory/memory-usage.md +25 -0
- package/.claude/commands/memory/neural.md +47 -0
- package/.claude/commands/memory/usage.md +46 -0
- package/.claude/commands/monitoring/README.md +9 -0
- package/.claude/commands/monitoring/agent-metrics.md +25 -0
- package/.claude/commands/monitoring/agents.md +44 -0
- package/.claude/commands/monitoring/real-time-view.md +25 -0
- package/.claude/commands/monitoring/status.md +46 -0
- package/.claude/commands/monitoring/swarm-monitor.md +25 -0
- package/.claude/commands/optimization/README.md +9 -0
- package/.claude/commands/optimization/auto-topology.md +62 -0
- package/.claude/commands/optimization/cache-manage.md +25 -0
- package/.claude/commands/optimization/parallel-execute.md +25 -0
- package/.claude/commands/optimization/parallel-execution.md +50 -0
- package/.claude/commands/optimization/topology-optimize.md +25 -0
- package/.claude/commands/pair/README.md +261 -0
- package/.claude/commands/pair/commands.md +546 -0
- package/.claude/commands/pair/config.md +510 -0
- package/.claude/commands/pair/examples.md +512 -0
- package/.claude/commands/pair/modes.md +348 -0
- package/.claude/commands/pair/session.md +407 -0
- package/.claude/commands/pair/start.md +209 -0
- package/.claude/commands/sparc/analyzer.md +52 -0
- package/.claude/commands/sparc/architect.md +53 -0
- package/.claude/commands/sparc/batch-executor.md +54 -0
- package/.claude/commands/sparc/coder.md +54 -0
- package/.claude/commands/sparc/debugger.md +54 -0
- package/.claude/commands/sparc/designer.md +53 -0
- package/.claude/commands/sparc/documenter.md +54 -0
- package/.claude/commands/sparc/innovator.md +54 -0
- package/.claude/commands/sparc/memory-manager.md +54 -0
- package/.claude/commands/sparc/optimizer.md +54 -0
- package/.claude/commands/sparc/orchestrator.md +132 -0
- package/.claude/commands/sparc/researcher.md +54 -0
- package/.claude/commands/sparc/reviewer.md +54 -0
- package/.claude/commands/sparc/sparc-modes.md +174 -0
- package/.claude/commands/sparc/swarm-coordinator.md +54 -0
- package/.claude/commands/sparc/tdd.md +54 -0
- package/.claude/commands/sparc/tester.md +54 -0
- package/.claude/commands/sparc/workflow-manager.md +54 -0
- package/.claude/commands/stream-chain/pipeline.md +121 -0
- package/.claude/commands/stream-chain/run.md +70 -0
- package/.claude/commands/swarm/README.md +15 -0
- package/.claude/commands/swarm/analysis.md +95 -0
- package/.claude/commands/swarm/development.md +96 -0
- package/.claude/commands/swarm/examples.md +168 -0
- package/.claude/commands/swarm/maintenance.md +102 -0
- package/.claude/commands/swarm/optimization.md +117 -0
- package/.claude/commands/swarm/research.md +136 -0
- package/.claude/commands/swarm/swarm-analysis.md +8 -0
- package/.claude/commands/swarm/swarm-background.md +8 -0
- package/.claude/commands/swarm/swarm-init.md +19 -0
- package/.claude/commands/swarm/swarm-modes.md +8 -0
- package/.claude/commands/swarm/swarm-monitor.md +8 -0
- package/.claude/commands/swarm/swarm-spawn.md +19 -0
- package/.claude/commands/swarm/swarm-status.md +8 -0
- package/.claude/commands/swarm/swarm-strategies.md +8 -0
- package/.claude/commands/swarm/swarm.md +27 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/testing/playwright-e2e.md +288 -0
- package/.claude/commands/training/README.md +9 -0
- package/.claude/commands/training/model-update.md +25 -0
- package/.claude/commands/training/neural-patterns.md +74 -0
- package/.claude/commands/training/neural-train.md +25 -0
- package/.claude/commands/training/pattern-learn.md +25 -0
- package/.claude/commands/training/specialization.md +63 -0
- package/.claude/commands/truth/start.md +143 -0
- package/.claude/commands/verify/check.md +50 -0
- package/.claude/commands/verify/start.md +128 -0
- package/.claude/commands/workflows/README.md +9 -0
- package/.claude/commands/workflows/development.md +78 -0
- package/.claude/commands/workflows/research.md +63 -0
- package/.claude/commands/workflows/workflow-create.md +25 -0
- package/.claude/commands/workflows/workflow-execute.md +25 -0
- package/.claude/commands/workflows/workflow-export.md +25 -0
- package/.claude/helpers/checkpoint-manager.sh +251 -0
- package/.claude/helpers/github-safe.js +106 -0
- package/.claude/helpers/github-setup.sh +28 -0
- package/.claude/helpers/quick-start.sh +19 -0
- package/.claude/helpers/setup-mcp.sh +18 -0
- package/.claude/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude/settings.json +112 -0
- package/.claude/settings.local.json +10 -0
- package/CHANGELOG.md +1517 -0
- package/LICENSE +21 -0
- package/README.md +338 -0
- package/dist/src/adapters/cliffy-node.js +70 -0
- package/dist/src/adapters/cliffy-node.js.map +1 -0
- package/dist/src/agents/agent-loader.js +208 -0
- package/dist/src/agents/agent-loader.js.map +1 -0
- package/dist/src/agents/agent-manager.js +1786 -0
- package/dist/src/agents/agent-manager.js.map +1 -0
- package/dist/src/agents/agent-registry.js +356 -0
- package/dist/src/agents/agent-registry.js.map +1 -0
- package/dist/src/agents/agent-validator.js +273 -0
- package/dist/src/agents/agent-validator.js.map +1 -0
- package/dist/src/agents/github/agent-factory.js +553 -0
- package/dist/src/agents/github/agent-factory.js.map +1 -0
- package/dist/src/agents/github/compatibility/legacy-agent-mappings.js +307 -0
- package/dist/src/agents/github/compatibility/legacy-agent-mappings.js.map +1 -0
- package/dist/src/agents/github/compatibility/legacy-agent-proxy.js +334 -0
- package/dist/src/agents/github/compatibility/legacy-agent-proxy.js.map +1 -0
- package/dist/src/agents/github/core/github-collaboration-manager.js +796 -0
- package/dist/src/agents/github/core/github-collaboration-manager.js.map +1 -0
- package/dist/src/agents/github/core/github-integration-manager.js +546 -0
- package/dist/src/agents/github/core/github-integration-manager.js.map +1 -0
- package/dist/src/agents/github/core/github-release-coordinator.js +718 -0
- package/dist/src/agents/github/core/github-release-coordinator.js.map +1 -0
- package/dist/src/agents/github/index.js +68 -0
- package/dist/src/agents/github/index.js.map +1 -0
- package/dist/src/agents/github/types/index.js +6 -0
- package/dist/src/agents/github/types/index.js.map +1 -0
- package/dist/src/agents/github/utils/error-handling.js +496 -0
- package/dist/src/agents/github/utils/error-handling.js.map +1 -0
- package/dist/src/agents/github/utils/github-client.js +158 -0
- package/dist/src/agents/github/utils/github-client.js.map +1 -0
- package/dist/src/agents/github/utils/hook-integration.js +450 -0
- package/dist/src/agents/github/utils/hook-integration.js.map +1 -0
- package/dist/src/agents/github/utils/performance-optimizer.js +501 -0
- package/dist/src/agents/github/utils/performance-optimizer.js.map +1 -0
- package/dist/src/agents/hierarchical-coordinator.js +775 -0
- package/dist/src/agents/hierarchical-coordinator.js.map +1 -0
- package/dist/src/agents/lifecycle-manager.js +613 -0
- package/dist/src/agents/lifecycle-manager.js.map +1 -0
- package/dist/src/agents/mesh-coordinator.js +580 -0
- package/dist/src/agents/mesh-coordinator.js.map +1 -0
- package/dist/src/agents/simple-agent.js +89 -0
- package/dist/src/agents/simple-agent.js.map +1 -0
- package/dist/src/agents/task-agent-integration.js +240 -0
- package/dist/src/agents/task-agent-integration.js.map +1 -0
- package/dist/src/api/auth-service.js +474 -0
- package/dist/src/api/auth-service.js.map +1 -0
- package/dist/src/api/claude-api-errors.js +171 -0
- package/dist/src/api/claude-api-errors.js.map +1 -0
- package/dist/src/api/claude-client-enhanced.js +473 -0
- package/dist/src/api/claude-client-enhanced.js.map +1 -0
- package/dist/src/api/claude-client.js +527 -0
- package/dist/src/api/claude-client.js.map +1 -0
- package/dist/src/api/database-service.js +666 -0
- package/dist/src/api/database-service.js.map +1 -0
- package/dist/src/api/swarm-api.js +585 -0
- package/dist/src/api/swarm-api.js.map +1 -0
- package/dist/src/automation/test-pipeline/E2ETestGenerator.js +448 -0
- package/dist/src/automation/test-pipeline/E2ETestGenerator.js.map +1 -0
- package/dist/src/automation/test-pipeline/PerformanceMonitor.js +572 -0
- package/dist/src/automation/test-pipeline/PerformanceMonitor.js.map +1 -0
- package/dist/src/automation/test-pipeline/PipelineValidator.js +654 -0
- package/dist/src/automation/test-pipeline/PipelineValidator.js.map +1 -0
- package/dist/src/automation/test-pipeline/RegressionTestManager.js +545 -0
- package/dist/src/automation/test-pipeline/RegressionTestManager.js.map +1 -0
- package/dist/src/automation/test-pipeline/SwarmTestCoordinator.js +450 -0
- package/dist/src/automation/test-pipeline/SwarmTestCoordinator.js.map +1 -0
- package/dist/src/automation/test-pipeline/TestDataManager.js +708 -0
- package/dist/src/automation/test-pipeline/TestDataManager.js.map +1 -0
- package/dist/src/automation/test-pipeline/TestReportingSystem.js +527 -0
- package/dist/src/automation/test-pipeline/TestReportingSystem.js.map +1 -0
- package/dist/src/automation/test-pipeline/utils/chrome-mcp-integration.js +353 -0
- package/dist/src/automation/test-pipeline/utils/chrome-mcp-integration.js.map +1 -0
- package/dist/src/automation/test-pipeline/utils/swarm-coordinator.js +448 -0
- package/dist/src/automation/test-pipeline/utils/swarm-coordinator.js.map +1 -0
- package/dist/src/ci-cd/deployment-orchestrator.js +477 -0
- package/dist/src/ci-cd/deployment-orchestrator.js.map +1 -0
- package/dist/src/ci-cd/github-actions-templates.js +972 -0
- package/dist/src/ci-cd/github-actions-templates.js.map +1 -0
- package/dist/src/ci-cd/performance/PerformanceGate.js +383 -0
- package/dist/src/ci-cd/performance/PerformanceGate.js.map +1 -0
- package/dist/src/cli/agents/analyst.js +788 -0
- package/dist/src/cli/agents/analyst.js.map +1 -0
- package/dist/src/cli/agents/architect.js +846 -0
- package/dist/src/cli/agents/architect.js.map +1 -0
- package/dist/src/cli/agents/base-agent.js +437 -0
- package/dist/src/cli/agents/base-agent.js.map +1 -0
- package/dist/src/cli/agents/capabilities.js +701 -0
- package/dist/src/cli/agents/capabilities.js.map +1 -0
- package/dist/src/cli/agents/coder.js +936 -0
- package/dist/src/cli/agents/coder.js.map +1 -0
- package/dist/src/cli/agents/coordinator.js +489 -0
- package/dist/src/cli/agents/coordinator.js.map +1 -0
- package/dist/src/cli/agents/hive-agents.js +708 -0
- package/dist/src/cli/agents/hive-agents.js.map +1 -0
- package/dist/src/cli/agents/index.js +299 -0
- package/dist/src/cli/agents/index.js.map +1 -0
- package/dist/src/cli/agents/researcher.js +388 -0
- package/dist/src/cli/agents/researcher.js.map +1 -0
- package/dist/src/cli/agents/tester.js +634 -0
- package/dist/src/cli/agents/tester.js.map +1 -0
- package/dist/src/cli/cli-core.js +264 -0
- package/dist/src/cli/cli-core.js.map +1 -0
- package/dist/src/cli/commands/advanced-memory-commands.js +834 -0
- package/dist/src/cli/commands/advanced-memory-commands.js.map +1 -0
- package/dist/src/cli/commands/agent-simple.js +346 -0
- package/dist/src/cli/commands/agent-simple.js.map +1 -0
- package/dist/src/cli/commands/agent.js +368 -0
- package/dist/src/cli/commands/agent.js.map +1 -0
- package/dist/src/cli/commands/claude-api.js +237 -0
- package/dist/src/cli/commands/claude-api.js.map +1 -0
- package/dist/src/cli/commands/claude.js +132 -0
- package/dist/src/cli/commands/claude.js.map +1 -0
- package/dist/src/cli/commands/config-integration.js +395 -0
- package/dist/src/cli/commands/config-integration.js.map +1 -0
- package/dist/src/cli/commands/config.js +67 -0
- package/dist/src/cli/commands/config.js.map +1 -0
- package/dist/src/cli/commands/enterprise.js +1523 -0
- package/dist/src/cli/commands/enterprise.js.map +1 -0
- package/dist/src/cli/commands/goal-init.js +262 -0
- package/dist/src/cli/commands/goal-init.js.map +1 -0
- package/dist/src/cli/commands/help-new.js +276 -0
- package/dist/src/cli/commands/help-new.js.map +1 -0
- package/dist/src/cli/commands/help.js +1055 -0
- package/dist/src/cli/commands/help.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/index.js +20 -0
- package/dist/src/cli/commands/hive-mind/index.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/init.js +58 -0
- package/dist/src/cli/commands/hive-mind/init.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/optimize-memory.js +362 -0
- package/dist/src/cli/commands/hive-mind/optimize-memory.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/pause.js +73 -0
- package/dist/src/cli/commands/hive-mind/pause.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/ps.js +104 -0
- package/dist/src/cli/commands/hive-mind/ps.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/resume.js +56 -0
- package/dist/src/cli/commands/hive-mind/resume.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/spawn.js +242 -0
- package/dist/src/cli/commands/hive-mind/spawn.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/status.js +250 -0
- package/dist/src/cli/commands/hive-mind/status.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/stop.js +116 -0
- package/dist/src/cli/commands/hive-mind/stop.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/task.js +302 -0
- package/dist/src/cli/commands/hive-mind/task.js.map +1 -0
- package/dist/src/cli/commands/hive-mind/wizard.js +705 -0
- package/dist/src/cli/commands/hive-mind/wizard.js.map +1 -0
- package/dist/src/cli/commands/hive.js +506 -0
- package/dist/src/cli/commands/hive.js.map +1 -0
- package/dist/src/cli/commands/hook-types.js +5 -0
- package/dist/src/cli/commands/hook-types.js.map +1 -0
- package/dist/src/cli/commands/hook-validator.js +177 -0
- package/dist/src/cli/commands/hook-validator.js.map +1 -0
- package/dist/src/cli/commands/hook.js +303 -0
- package/dist/src/cli/commands/hook.js.map +1 -0
- package/dist/src/cli/commands/index.js +2745 -0
- package/dist/src/cli/commands/index.js.map +1 -0
- package/dist/src/cli/commands/maestro.js +242 -0
- package/dist/src/cli/commands/maestro.js.map +1 -0
- package/dist/src/cli/commands/mcp.js +148 -0
- package/dist/src/cli/commands/mcp.js.map +1 -0
- package/dist/src/cli/commands/memory.js +193 -0
- package/dist/src/cli/commands/memory.js.map +1 -0
- package/dist/src/cli/commands/migrate.js +107 -0
- package/dist/src/cli/commands/migrate.js.map +1 -0
- package/dist/src/cli/commands/monitor.js +574 -0
- package/dist/src/cli/commands/monitor.js.map +1 -0
- package/dist/src/cli/commands/neural-init.js +211 -0
- package/dist/src/cli/commands/neural-init.js.map +1 -0
- package/dist/src/cli/commands/ruv-swarm.js +555 -0
- package/dist/src/cli/commands/ruv-swarm.js.map +1 -0
- package/dist/src/cli/commands/session.js +517 -0
- package/dist/src/cli/commands/session.js.map +1 -0
- package/dist/src/cli/commands/sparc.js +486 -0
- package/dist/src/cli/commands/sparc.js.map +1 -0
- package/dist/src/cli/commands/start/event-emitter.js +35 -0
- package/dist/src/cli/commands/start/event-emitter.js.map +1 -0
- package/dist/src/cli/commands/start/index.js +9 -0
- package/dist/src/cli/commands/start/index.js.map +1 -0
- package/dist/src/cli/commands/start/process-manager.js +294 -0
- package/dist/src/cli/commands/start/process-manager.js.map +1 -0
- package/dist/src/cli/commands/start/process-ui-simple.js +322 -0
- package/dist/src/cli/commands/start/process-ui-simple.js.map +1 -0
- package/dist/src/cli/commands/start/process-ui.js +5 -0
- package/dist/src/cli/commands/start/process-ui.js.map +1 -0
- package/dist/src/cli/commands/start/start-command.js +463 -0
- package/dist/src/cli/commands/start/start-command.js.map +1 -0
- package/dist/src/cli/commands/start/system-monitor.js +268 -0
- package/dist/src/cli/commands/start/system-monitor.js.map +1 -0
- package/dist/src/cli/commands/start/types.js +22 -0
- package/dist/src/cli/commands/start/types.js.map +1 -0
- package/dist/src/cli/commands/start.js +6 -0
- package/dist/src/cli/commands/start.js.map +1 -0
- package/dist/src/cli/commands/status.js +328 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/swarm-spawn.js +56 -0
- package/dist/src/cli/commands/swarm-spawn.js.map +1 -0
- package/dist/src/cli/commands/swarm.js +567 -0
- package/dist/src/cli/commands/swarm.js.map +1 -0
- package/dist/src/cli/commands/task.js +44 -0
- package/dist/src/cli/commands/task.js.map +1 -0
- package/dist/src/cli/commands/validate-integration.js +122 -0
- package/dist/src/cli/commands/validate-integration.js.map +1 -0
- package/dist/src/cli/commands/verification.js +351 -0
- package/dist/src/cli/commands/verification.js.map +1 -0
- package/dist/src/cli/commands/workflow.js +615 -0
- package/dist/src/cli/commands/workflow.js.map +1 -0
- package/dist/src/cli/completion.js +578 -0
- package/dist/src/cli/completion.js.map +1 -0
- package/dist/src/cli/consolidated/ConsolidatedCLI.js +379 -0
- package/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -0
- package/dist/src/cli/consolidated/core/CommandHandlers.js +833 -0
- package/dist/src/cli/consolidated/core/CommandHandlers.js.map +1 -0
- package/dist/src/cli/consolidated/core/TierManager.js +291 -0
- package/dist/src/cli/consolidated/core/TierManager.js.map +1 -0
- package/dist/src/cli/consolidated/help/InteractiveHelp.js +714 -0
- package/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -0
- package/dist/src/cli/consolidated/index.js +62 -0
- package/dist/src/cli/consolidated/index.js.map +1 -0
- package/dist/src/cli/consolidated/intelligence/IntelligenceEngine.js +457 -0
- package/dist/src/cli/consolidated/intelligence/IntelligenceEngine.js.map +1 -0
- package/dist/src/cli/consolidated/routing/CommandRouter.js +526 -0
- package/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -0
- package/dist/src/cli/consolidated/utils/IntelligentDefaults.js +729 -0
- package/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -0
- package/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +416 -0
- package/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -0
- package/dist/src/cli/formatter.js +284 -0
- package/dist/src/cli/formatter.js.map +1 -0
- package/dist/src/cli/help-formatter.js +111 -0
- package/dist/src/cli/help-formatter.js.map +1 -0
- package/dist/src/cli/index-remote.js +125 -0
- package/dist/src/cli/index-remote.js.map +1 -0
- package/dist/src/cli/index.js +159 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/init/batch-tools.js +388 -0
- package/dist/src/cli/init/batch-tools.js.map +1 -0
- package/dist/src/cli/init/claude-config.js +401 -0
- package/dist/src/cli/init/claude-config.js.map +1 -0
- package/dist/src/cli/init/directory-structure.js +146 -0
- package/dist/src/cli/init/directory-structure.js.map +1 -0
- package/dist/src/cli/init/index.js +52 -0
- package/dist/src/cli/init/index.js.map +1 -0
- package/dist/src/cli/init/sparc-environment.js +543 -0
- package/dist/src/cli/init/sparc-environment.js.map +1 -0
- package/dist/src/cli/init/swarm-commands.js +796 -0
- package/dist/src/cli/init/swarm-commands.js.map +1 -0
- package/dist/src/cli/init/utils.js +15 -0
- package/dist/src/cli/init/utils.js.map +1 -0
- package/dist/src/cli/maestro-cli-bridge.js +426 -0
- package/dist/src/cli/maestro-cli-bridge.js.map +1 -0
- package/dist/src/cli/main.js +26 -0
- package/dist/src/cli/main.js.map +1 -0
- package/dist/src/cli/node-repl.js +652 -0
- package/dist/src/cli/node-repl.js.map +1 -0
- package/dist/src/cli/repl.js +1078 -0
- package/dist/src/cli/repl.js.map +1 -0
- package/dist/src/cli/simple-cli.js +3026 -0
- package/dist/src/cli/simple-cli.js.map +1 -0
- package/dist/src/cli/simple-mcp.js +87 -0
- package/dist/src/cli/simple-mcp.js.map +1 -0
- package/dist/src/cli/simple-orchestrator.js +857 -0
- package/dist/src/cli/simple-orchestrator.js.map +1 -0
- package/dist/src/cli/ui/compatible-ui.js +322 -0
- package/dist/src/cli/ui/compatible-ui.js.map +1 -0
- package/dist/src/cli/ui/fallback-handler.js +156 -0
- package/dist/src/cli/ui/fallback-handler.js.map +1 -0
- package/dist/src/cli/ui/index.js +32 -0
- package/dist/src/cli/ui/index.js.map +1 -0
- package/dist/src/cli/utils/environment-detector.js +228 -0
- package/dist/src/cli/utils/environment-detector.js.map +1 -0
- package/dist/src/cli/utils/prompt-defaults.js +234 -0
- package/dist/src/cli/utils/prompt-defaults.js.map +1 -0
- package/dist/src/cli/validation-helper.js +66 -0
- package/dist/src/cli/validation-helper.js.map +1 -0
- package/dist/src/communication/message-bus.js +1007 -0
- package/dist/src/communication/message-bus.js.map +1 -0
- package/dist/src/communication/reliable-communication-manager.js +374 -0
- package/dist/src/communication/reliable-communication-manager.js.map +1 -0
- package/dist/src/config/ai/decision-tree-generator.js +763 -0
- package/dist/src/config/ai/decision-tree-generator.js.map +1 -0
- package/dist/src/config/ai/project-detection-engine.js +1081 -0
- package/dist/src/config/ai/project-detection-engine.js.map +1 -0
- package/dist/src/config/config-manager.js +1285 -0
- package/dist/src/config/config-manager.js.map +1 -0
- package/dist/src/config/consent-manager.js +433 -0
- package/dist/src/config/consent-manager.js.map +1 -0
- package/dist/src/config/core/intelligent-configuration-manager.js +674 -0
- package/dist/src/config/core/intelligent-configuration-manager.js.map +1 -0
- package/dist/src/config/index.js +110 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/integration/hooks-integration.js +548 -0
- package/dist/src/config/integration/hooks-integration.js.map +1 -0
- package/dist/src/config/migration/config-migration.js +285 -0
- package/dist/src/config/migration/config-migration.js.map +1 -0
- package/dist/src/config/migration/version-migration-engine.js +984 -0
- package/dist/src/config/migration/version-migration-engine.js.map +1 -0
- package/dist/src/config/migration-manager.js +529 -0
- package/dist/src/config/migration-manager.js.map +1 -0
- package/dist/src/config/ruv-swarm-config.js +332 -0
- package/dist/src/config/ruv-swarm-config.js.map +1 -0
- package/dist/src/config/ruv-swarm-integration.js +285 -0
- package/dist/src/config/ruv-swarm-integration.js.map +1 -0
- package/dist/src/config/storage/multi-tier-storage.js +626 -0
- package/dist/src/config/storage/multi-tier-storage.js.map +1 -0
- package/dist/src/config/test-migration-fixer.js +332 -0
- package/dist/src/config/test-migration-fixer.js.map +1 -0
- package/dist/src/config/ui/progressive-disclosure-engine.js +876 -0
- package/dist/src/config/ui/progressive-disclosure-engine.js.map +1 -0
- package/dist/src/config/utils/config-export-import.js +454 -0
- package/dist/src/config/utils/config-export-import.js.map +1 -0
- package/dist/src/config/utils/zero-config-setup.js +238 -0
- package/dist/src/config/utils/zero-config-setup.js.map +1 -0
- package/dist/src/config/validation/config-validator.js +462 -0
- package/dist/src/config/validation/config-validator.js.map +1 -0
- package/dist/src/config/web-portal-config.js +343 -0
- package/dist/src/config/web-portal-config.js.map +1 -0
- package/dist/src/config/zero-config-setup.js +294 -0
- package/dist/src/config/zero-config-setup.js.map +1 -0
- package/dist/src/constants/agent-types.js +51 -0
- package/dist/src/constants/agent-types.js.map +1 -0
- package/dist/src/coordination/advanced-scheduler.js +370 -0
- package/dist/src/coordination/advanced-scheduler.js.map +1 -0
- package/dist/src/coordination/advanced-task-executor.js +481 -0
- package/dist/src/coordination/advanced-task-executor.js.map +1 -0
- package/dist/src/coordination/background-executor.js +366 -0
- package/dist/src/coordination/background-executor.js.map +1 -0
- package/dist/src/coordination/circuit-breaker.js +286 -0
- package/dist/src/coordination/circuit-breaker.js.map +1 -0
- package/dist/src/coordination/conflict-resolution.js +348 -0
- package/dist/src/coordination/conflict-resolution.js.map +1 -0
- package/dist/src/coordination/dependency-graph.js +398 -0
- package/dist/src/coordination/dependency-graph.js.map +1 -0
- package/dist/src/coordination/hive-orchestrator.js +309 -0
- package/dist/src/coordination/hive-orchestrator.js.map +1 -0
- package/dist/src/coordination/hive-protocol.js +363 -0
- package/dist/src/coordination/hive-protocol.js.map +1 -0
- package/dist/src/coordination/index.js +21 -0
- package/dist/src/coordination/index.js.map +1 -0
- package/dist/src/coordination/load-balancer.js +737 -0
- package/dist/src/coordination/load-balancer.js.map +1 -0
- package/dist/src/coordination/manager.js +360 -0
- package/dist/src/coordination/manager.js.map +1 -0
- package/dist/src/coordination/messaging.js +221 -0
- package/dist/src/coordination/messaging.js.map +1 -0
- package/dist/src/coordination/metrics.js +415 -0
- package/dist/src/coordination/metrics.js.map +1 -0
- package/dist/src/coordination/resources.js +276 -0
- package/dist/src/coordination/resources.js.map +1 -0
- package/dist/src/coordination/scheduler.js +322 -0
- package/dist/src/coordination/scheduler.js.map +1 -0
- package/dist/src/coordination/swarm-coordinator.js +585 -0
- package/dist/src/coordination/swarm-coordinator.js.map +1 -0
- package/dist/src/coordination/swarm-monitor.js +359 -0
- package/dist/src/coordination/swarm-monitor.js.map +1 -0
- package/dist/src/coordination/work-stealing.js +164 -0
- package/dist/src/coordination/work-stealing.js.map +1 -0
- package/dist/src/core/agent-manager.js +80 -0
- package/dist/src/core/agent-manager.js.map +1 -0
- package/dist/src/core/config.js +1221 -0
- package/dist/src/core/config.js.map +1 -0
- package/dist/src/core/event-bus.js +136 -0
- package/dist/src/core/event-bus.js.map +1 -0
- package/dist/src/core/index.js +6 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/json-persistence.js +112 -0
- package/dist/src/core/json-persistence.js.map +1 -0
- package/dist/src/core/logger.js +245 -0
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/core/orchestrator-fixed.js +236 -0
- package/dist/src/core/orchestrator-fixed.js.map +1 -0
- package/dist/src/core/orchestrator.js +1136 -0
- package/dist/src/core/orchestrator.js.map +1 -0
- package/dist/src/core/persistence.js +185 -0
- package/dist/src/core/persistence.js.map +1 -0
- package/dist/src/core/project-manager.js +80 -0
- package/dist/src/core/project-manager.js.map +1 -0
- package/dist/src/core/version.js +35 -0
- package/dist/src/core/version.js.map +1 -0
- package/dist/src/crdt/types.js +509 -0
- package/dist/src/crdt/types.js.map +1 -0
- package/dist/src/enterprise/analytics-manager.js +1133 -0
- package/dist/src/enterprise/analytics-manager.js.map +1 -0
- package/dist/src/enterprise/audit-manager.js +1112 -0
- package/dist/src/enterprise/audit-manager.js.map +1 -0
- package/dist/src/enterprise/cloud-manager.js +886 -0
- package/dist/src/enterprise/cloud-manager.js.map +1 -0
- package/dist/src/enterprise/deployment-manager.js +963 -0
- package/dist/src/enterprise/deployment-manager.js.map +1 -0
- package/dist/src/enterprise/index.js +8 -0
- package/dist/src/enterprise/index.js.map +1 -0
- package/dist/src/enterprise/project-manager.js +577 -0
- package/dist/src/enterprise/project-manager.js.map +1 -0
- package/dist/src/enterprise/security-manager.js +987 -0
- package/dist/src/enterprise/security-manager.js.map +1 -0
- package/dist/src/feature-flags/cli/Phase4CLI.js +463 -0
- package/dist/src/feature-flags/cli/Phase4CLI.js.map +1 -0
- package/dist/src/feature-flags/core/FeatureFlagManager.js +324 -0
- package/dist/src/feature-flags/core/FeatureFlagManager.js.map +1 -0
- package/dist/src/feature-flags/index.js +237 -0
- package/dist/src/feature-flags/index.js.map +1 -0
- package/dist/src/feature-flags/monitoring/RolloutMonitor.js +275 -0
- package/dist/src/feature-flags/monitoring/RolloutMonitor.js.map +1 -0
- package/dist/src/feature-flags/rollout/RolloutController.js +301 -0
- package/dist/src/feature-flags/rollout/RolloutController.js.map +1 -0
- package/dist/src/feature-flags/validation/HookInterceptor.js +310 -0
- package/dist/src/feature-flags/validation/HookInterceptor.js.map +1 -0
- package/dist/src/feature-flags/validation/TruthBasedValidator.js +263 -0
- package/dist/src/feature-flags/validation/TruthBasedValidator.js.map +1 -0
- package/dist/src/hive-mind/core/Agent.js +569 -0
- package/dist/src/hive-mind/core/Agent.js.map +1 -0
- package/dist/src/hive-mind/core/Communication.js +411 -0
- package/dist/src/hive-mind/core/Communication.js.map +1 -0
- package/dist/src/hive-mind/core/DatabaseManager.js +599 -0
- package/dist/src/hive-mind/core/DatabaseManager.js.map +1 -0
- package/dist/src/hive-mind/core/HiveMind.js +575 -0
- package/dist/src/hive-mind/core/HiveMind.js.map +1 -0
- package/dist/src/hive-mind/core/Memory.js +1159 -0
- package/dist/src/hive-mind/core/Memory.js.map +1 -0
- package/dist/src/hive-mind/core/MemoryMonitor.js +525 -0
- package/dist/src/hive-mind/core/MemoryMonitor.js.map +1 -0
- package/dist/src/hive-mind/core/Queen.js +753 -0
- package/dist/src/hive-mind/core/Queen.js.map +1 -0
- package/dist/src/hive-mind/index.js +21 -0
- package/dist/src/hive-mind/index.js.map +1 -0
- package/dist/src/hive-mind/integration/ConsensusEngine.js +460 -0
- package/dist/src/hive-mind/integration/ConsensusEngine.js.map +1 -0
- package/dist/src/hive-mind/integration/MCPToolWrapper.js +243 -0
- package/dist/src/hive-mind/integration/MCPToolWrapper.js.map +1 -0
- package/dist/src/hive-mind/integration/SwarmOrchestrator.js +812 -0
- package/dist/src/hive-mind/integration/SwarmOrchestrator.js.map +1 -0
- package/dist/src/hive-mind/types.js +9 -0
- package/dist/src/hive-mind/types.js.map +1 -0
- package/dist/src/hooks/index.js +197 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/index.js +11 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/integration/mock-components.js +362 -0
- package/dist/src/integration/mock-components.js.map +1 -0
- package/dist/src/integration/system-integration.js +428 -0
- package/dist/src/integration/system-integration.js.map +1 -0
- package/dist/src/integration/types.js +5 -0
- package/dist/src/integration/types.js.map +1 -0
- package/dist/src/lifecycle/communication-protocols.js +568 -0
- package/dist/src/lifecycle/communication-protocols.js.map +1 -0
- package/dist/src/lifecycle/dependency-tracker.js +799 -0
- package/dist/src/lifecycle/dependency-tracker.js.map +1 -0
- package/dist/src/lifecycle/memory-schema.js +622 -0
- package/dist/src/lifecycle/memory-schema.js.map +1 -0
- package/dist/src/maestro/maestro-swarm-coordinator.js +504 -0
- package/dist/src/maestro/maestro-swarm-coordinator.js.map +1 -0
- package/dist/src/maestro/maestro-types.js +3 -0
- package/dist/src/maestro/maestro-types.js.map +1 -0
- package/dist/src/maestro/tests/native-hive-mind-integration.test.js +382 -0
- package/dist/src/maestro/tests/native-hive-mind-integration.test.js.map +1 -0
- package/dist/src/mcp/auth.js +347 -0
- package/dist/src/mcp/auth.js.map +1 -0
- package/dist/src/mcp/claude-code-wrapper.js +717 -0
- package/dist/src/mcp/claude-code-wrapper.js.map +1 -0
- package/dist/src/mcp/claude-flow-tools.js +1365 -0
- package/dist/src/mcp/claude-flow-tools.js.map +1 -0
- package/dist/src/mcp/client.js +201 -0
- package/dist/src/mcp/client.js.map +1 -0
- package/dist/src/mcp/index.js +192 -0
- package/dist/src/mcp/index.js.map +1 -0
- package/dist/src/mcp/integrate-wrapper.js +85 -0
- package/dist/src/mcp/integrate-wrapper.js.map +1 -0
- package/dist/src/mcp/lifecycle-manager.js +348 -0
- package/dist/src/mcp/lifecycle-manager.js.map +1 -0
- package/dist/src/mcp/load-balancer.js +386 -0
- package/dist/src/mcp/load-balancer.js.map +1 -0
- package/dist/src/mcp/orchestration-integration.js +800 -0
- package/dist/src/mcp/orchestration-integration.js.map +1 -0
- package/dist/src/mcp/performance-monitor.js +489 -0
- package/dist/src/mcp/performance-monitor.js.map +1 -0
- package/dist/src/mcp/protocol-manager.js +376 -0
- package/dist/src/mcp/protocol-manager.js.map +1 -0
- package/dist/src/mcp/recovery/connection-health-monitor.js +240 -0
- package/dist/src/mcp/recovery/connection-health-monitor.js.map +1 -0
- package/dist/src/mcp/recovery/connection-state-manager.js +309 -0
- package/dist/src/mcp/recovery/connection-state-manager.js.map +1 -0
- package/dist/src/mcp/recovery/fallback-coordinator.js +288 -0
- package/dist/src/mcp/recovery/fallback-coordinator.js.map +1 -0
- package/dist/src/mcp/recovery/index.js +10 -0
- package/dist/src/mcp/recovery/index.js.map +1 -0
- package/dist/src/mcp/recovery/reconnection-manager.js +219 -0
- package/dist/src/mcp/recovery/reconnection-manager.js.map +1 -0
- package/dist/src/mcp/recovery/recovery-manager.js +262 -0
- package/dist/src/mcp/recovery/recovery-manager.js.map +1 -0
- package/dist/src/mcp/router.js +220 -0
- package/dist/src/mcp/router.js.map +1 -0
- package/dist/src/mcp/ruv-swarm-tools.js +671 -0
- package/dist/src/mcp/ruv-swarm-tools.js.map +1 -0
- package/dist/src/mcp/server-with-wrapper.js +32 -0
- package/dist/src/mcp/server-with-wrapper.js.map +1 -0
- package/dist/src/mcp/server-wrapper-mode.js +26 -0
- package/dist/src/mcp/server-wrapper-mode.js.map +1 -0
- package/dist/src/mcp/server.js +539 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/session-manager.js +338 -0
- package/dist/src/mcp/session-manager.js.map +1 -0
- package/dist/src/mcp/sparc-modes.js +455 -0
- package/dist/src/mcp/sparc-modes.js.map +1 -0
- package/dist/src/mcp/swarm-tools.js +903 -0
- package/dist/src/mcp/swarm-tools.js.map +1 -0
- package/dist/src/mcp/tests/mcp-integration.test.js +493 -0
- package/dist/src/mcp/tests/mcp-integration.test.js.map +1 -0
- package/dist/src/mcp/tools.js +426 -0
- package/dist/src/mcp/tools.js.map +1 -0
- package/dist/src/mcp/transports/base.js +5 -0
- package/dist/src/mcp/transports/base.js.map +1 -0
- package/dist/src/mcp/transports/http.js +414 -0
- package/dist/src/mcp/transports/http.js.map +1 -0
- package/dist/src/mcp/transports/stdio.js +217 -0
- package/dist/src/mcp/transports/stdio.js.map +1 -0
- package/dist/src/memory/advanced-memory-manager.js +1522 -0
- package/dist/src/memory/advanced-memory-manager.js.map +1 -0
- package/dist/src/memory/backends/base.js +5 -0
- package/dist/src/memory/backends/base.js.map +1 -0
- package/dist/src/memory/backends/markdown.js +235 -0
- package/dist/src/memory/backends/markdown.js.map +1 -0
- package/dist/src/memory/backends/sqlite.js +295 -0
- package/dist/src/memory/backends/sqlite.js.map +1 -0
- package/dist/src/memory/cache.js +177 -0
- package/dist/src/memory/cache.js.map +1 -0
- package/dist/src/memory/distributed-memory.js +745 -0
- package/dist/src/memory/distributed-memory.js.map +1 -0
- package/dist/src/memory/indexer.js +184 -0
- package/dist/src/memory/indexer.js.map +1 -0
- package/dist/src/memory/manager.js +457 -0
- package/dist/src/memory/manager.js.map +1 -0
- package/dist/src/memory/sqlite-enhanced-backend.js +529 -0
- package/dist/src/memory/sqlite-enhanced-backend.js.map +1 -0
- package/dist/src/memory/swarm-memory.js +446 -0
- package/dist/src/memory/swarm-memory.js.map +1 -0
- package/dist/src/migration/index.js +94 -0
- package/dist/src/migration/index.js.map +1 -0
- package/dist/src/migration/logger.js +110 -0
- package/dist/src/migration/logger.js.map +1 -0
- package/dist/src/migration/migration-analyzer.js +255 -0
- package/dist/src/migration/migration-analyzer.js.map +1 -0
- package/dist/src/migration/migration-runner.js +511 -0
- package/dist/src/migration/migration-runner.js.map +1 -0
- package/dist/src/migration/migration-validator.js +272 -0
- package/dist/src/migration/migration-validator.js.map +1 -0
- package/dist/src/migration/progress-reporter.js +139 -0
- package/dist/src/migration/progress-reporter.js.map +1 -0
- package/dist/src/migration/rollback-manager.js +310 -0
- package/dist/src/migration/rollback-manager.js.map +1 -0
- package/dist/src/migration/tests/migration-system.test.js +9 -0
- package/dist/src/migration/tests/migration-system.test.js.map +1 -0
- package/dist/src/migration/types.js +5 -0
- package/dist/src/migration/types.js.map +1 -0
- package/dist/src/monitoring/diagnostics.js +532 -0
- package/dist/src/monitoring/diagnostics.js.map +1 -0
- package/dist/src/monitoring/health-check.js +355 -0
- package/dist/src/monitoring/health-check.js.map +1 -0
- package/dist/src/monitoring/phase4/analytics/consensus-tracker.js +764 -0
- package/dist/src/monitoring/phase4/analytics/consensus-tracker.js.map +1 -0
- package/dist/src/monitoring/phase4/analytics/performance-assessor.js +859 -0
- package/dist/src/monitoring/phase4/analytics/performance-assessor.js.map +1 -0
- package/dist/src/monitoring/phase4/analytics/truth-score-analyzer.js +667 -0
- package/dist/src/monitoring/phase4/analytics/truth-score-analyzer.js.map +1 -0
- package/dist/src/monitoring/phase4/dashboard/monitoring-dashboard.js +1008 -0
- package/dist/src/monitoring/phase4/dashboard/monitoring-dashboard.js.map +1 -0
- package/dist/src/monitoring/phase4/rollout-decision-engine.js +849 -0
- package/dist/src/monitoring/phase4/rollout-decision-engine.js.map +1 -0
- package/dist/src/monitoring/real-time-feedback-system.js +688 -0
- package/dist/src/monitoring/real-time-feedback-system.js.map +1 -0
- package/dist/src/monitoring/real-time-monitor.js +981 -0
- package/dist/src/monitoring/real-time-monitor.js.map +1 -0
- package/dist/src/monitoring/regression/RegressionDetector.js +525 -0
- package/dist/src/monitoring/regression/RegressionDetector.js.map +1 -0
- package/dist/src/neural/NeuralDomainMapper.js +1137 -0
- package/dist/src/neural/NeuralDomainMapper.js.map +1 -0
- package/dist/src/neural/index.js +418 -0
- package/dist/src/neural/index.js.map +1 -0
- package/dist/src/neural/integration.js +590 -0
- package/dist/src/neural/integration.js.map +1 -0
- package/dist/src/providers/anthropic-provider.js +245 -0
- package/dist/src/providers/anthropic-provider.js.map +1 -0
- package/dist/src/providers/base-provider.js +389 -0
- package/dist/src/providers/base-provider.js.map +1 -0
- package/dist/src/providers/cohere-provider.js +405 -0
- package/dist/src/providers/cohere-provider.js.map +1 -0
- package/dist/src/providers/google-provider.js +376 -0
- package/dist/src/providers/google-provider.js.map +1 -0
- package/dist/src/providers/index.js +18 -0
- package/dist/src/providers/index.js.map +1 -0
- package/dist/src/providers/ollama-provider.js +400 -0
- package/dist/src/providers/ollama-provider.js.map +1 -0
- package/dist/src/providers/openai-provider.js +364 -0
- package/dist/src/providers/openai-provider.js.map +1 -0
- package/dist/src/providers/provider-manager.js +487 -0
- package/dist/src/providers/provider-manager.js.map +1 -0
- package/dist/src/providers/types.js +55 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/providers/utils.js +343 -0
- package/dist/src/providers/utils.js.map +1 -0
- package/dist/src/quality-gates/automated-review-system.js +645 -0
- package/dist/src/quality-gates/automated-review-system.js.map +1 -0
- package/dist/src/resources/resource-manager.js +1275 -0
- package/dist/src/resources/resource-manager.js.map +1 -0
- package/dist/src/rollback/recovery-manager.js +1065 -0
- package/dist/src/rollback/recovery-manager.js.map +1 -0
- package/dist/src/services/agent-manager.js +308 -0
- package/dist/src/services/agent-manager.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/hook-manager.js +506 -0
- package/dist/src/services/agentic-flow-hooks/hook-manager.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/index.js +322 -0
- package/dist/src/services/agentic-flow-hooks/index.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/llm-hooks.js +445 -0
- package/dist/src/services/agentic-flow-hooks/llm-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/memory-hooks.js +558 -0
- package/dist/src/services/agentic-flow-hooks/memory-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/neural-hooks.js +595 -0
- package/dist/src/services/agentic-flow-hooks/neural-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/performance-hooks.js +640 -0
- package/dist/src/services/agentic-flow-hooks/performance-hooks.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/types.js +8 -0
- package/dist/src/services/agentic-flow-hooks/types.js.map +1 -0
- package/dist/src/services/agentic-flow-hooks/workflow-hooks.js +746 -0
- package/dist/src/services/agentic-flow-hooks/workflow-hooks.js.map +1 -0
- package/dist/src/services/performance-metrics-collector.js +529 -0
- package/dist/src/services/performance-metrics-collector.js.map +1 -0
- package/dist/src/services/swarm-coordinator.js +431 -0
- package/dist/src/services/swarm-coordinator.js.map +1 -0
- package/dist/src/services/swarm-memory-manager.js +513 -0
- package/dist/src/services/swarm-memory-manager.js.map +1 -0
- package/dist/src/services/swarm-relaunch-manager.js +408 -0
- package/dist/src/services/swarm-relaunch-manager.js.map +1 -0
- package/dist/src/services/task-handoff-service.js +361 -0
- package/dist/src/services/task-handoff-service.js.map +1 -0
- package/dist/src/swarm/__tests__/integration.test.js +229 -0
- package/dist/src/swarm/__tests__/integration.test.js.map +1 -0
- package/dist/src/swarm/__tests__/prompt-copier.test.js +346 -0
- package/dist/src/swarm/__tests__/prompt-copier.test.js.map +1 -0
- package/dist/src/swarm/advanced-orchestrator.js +1093 -0
- package/dist/src/swarm/advanced-orchestrator.js.map +1 -0
- package/dist/src/swarm/claude-code-interface.js +959 -0
- package/dist/src/swarm/claude-code-interface.js.map +1 -0
- package/dist/src/swarm/claude-flow-executor.js +218 -0
- package/dist/src/swarm/claude-flow-executor.js.map +1 -0
- package/dist/src/swarm/coordinator.js +3001 -0
- package/dist/src/swarm/coordinator.js.map +1 -0
- package/dist/src/swarm/direct-executor.js +1169 -0
- package/dist/src/swarm/direct-executor.js.map +1 -0
- package/dist/src/swarm/executor-v2.js +312 -0
- package/dist/src/swarm/executor-v2.js.map +1 -0
- package/dist/src/swarm/executor.js +813 -0
- package/dist/src/swarm/executor.js.map +1 -0
- package/dist/src/swarm/hive-mind-integration.js +700 -0
- package/dist/src/swarm/hive-mind-integration.js.map +1 -0
- package/dist/src/swarm/index.js +43 -0
- package/dist/src/swarm/index.js.map +1 -0
- package/dist/src/swarm/json-output-aggregator.js +269 -0
- package/dist/src/swarm/json-output-aggregator.js.map +1 -0
- package/dist/src/swarm/mcp-integration-wrapper.js +623 -0
- package/dist/src/swarm/mcp-integration-wrapper.js.map +1 -0
- package/dist/src/swarm/memory.js +1119 -0
- package/dist/src/swarm/memory.js.map +1 -0
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js +350 -0
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js.map +1 -0
- package/dist/src/swarm/optimizations/async-file-manager.js +273 -0
- package/dist/src/swarm/optimizations/async-file-manager.js.map +1 -0
- package/dist/src/swarm/optimizations/circular-buffer.js +148 -0
- package/dist/src/swarm/optimizations/circular-buffer.js.map +1 -0
- package/dist/src/swarm/optimizations/connection-pool.js +239 -0
- package/dist/src/swarm/optimizations/connection-pool.js.map +1 -0
- package/dist/src/swarm/optimizations/index.js +30 -0
- package/dist/src/swarm/optimizations/index.js.map +1 -0
- package/dist/src/swarm/optimizations/optimized-executor.js +318 -0
- package/dist/src/swarm/optimizations/optimized-executor.js.map +1 -0
- package/dist/src/swarm/optimizations/ttl-map.js +223 -0
- package/dist/src/swarm/optimizations/ttl-map.js.map +1 -0
- package/dist/src/swarm/prompt-cli.js +202 -0
- package/dist/src/swarm/prompt-cli.js.map +1 -0
- package/dist/src/swarm/prompt-copier-enhanced.js +193 -0
- package/dist/src/swarm/prompt-copier-enhanced.js.map +1 -0
- package/dist/src/swarm/prompt-copier.js +376 -0
- package/dist/src/swarm/prompt-copier.js.map +1 -0
- package/dist/src/swarm/prompt-manager.js +287 -0
- package/dist/src/swarm/prompt-manager.js.map +1 -0
- package/dist/src/swarm/prompt-utils.js +299 -0
- package/dist/src/swarm/prompt-utils.js.map +1 -0
- package/dist/src/swarm/result-aggregator.js +713 -0
- package/dist/src/swarm/result-aggregator.js.map +1 -0
- package/dist/src/swarm/sparc-executor.js +1557 -0
- package/dist/src/swarm/sparc-executor.js.map +1 -0
- package/dist/src/swarm/strategies/auto.js +751 -0
- package/dist/src/swarm/strategies/auto.js.map +1 -0
- package/dist/src/swarm/strategies/base.js +117 -0
- package/dist/src/swarm/strategies/base.js.map +1 -0
- package/dist/src/swarm/strategies/research.js +911 -0
- package/dist/src/swarm/strategies/research.js.map +1 -0
- package/dist/src/swarm/strategies/strategy-metrics-patch.js +4 -0
- package/dist/src/swarm/strategies/strategy-metrics-patch.js.map +1 -0
- package/dist/src/swarm/types.js +54 -0
- package/dist/src/swarm/types.js.map +1 -0
- package/dist/src/swarm/workers/copy-worker.js +58 -0
- package/dist/src/swarm/workers/copy-worker.js.map +1 -0
- package/dist/src/swarm-fullstack/adapters/chrome-mcp-adapter.js +412 -0
- package/dist/src/swarm-fullstack/adapters/chrome-mcp-adapter.js.map +1 -0
- package/dist/src/swarm-fullstack/adapters/shadcn-mcp-adapter.js +560 -0
- package/dist/src/swarm-fullstack/adapters/shadcn-mcp-adapter.js.map +1 -0
- package/dist/src/swarm-fullstack/cli/fullstack-cli.js +582 -0
- package/dist/src/swarm-fullstack/cli/fullstack-cli.js.map +1 -0
- package/dist/src/swarm-fullstack/config/fullstack-config.js +369 -0
- package/dist/src/swarm-fullstack/config/fullstack-config.js.map +1 -0
- package/dist/src/swarm-fullstack/core/dynamic-agent-spawner.js +687 -0
- package/dist/src/swarm-fullstack/core/dynamic-agent-spawner.js.map +1 -0
- package/dist/src/swarm-fullstack/core/enhanced-swarm-message-router.js +589 -0
- package/dist/src/swarm-fullstack/core/enhanced-swarm-message-router.js.map +1 -0
- package/dist/src/swarm-fullstack/core/fullstack-orchestrator.js +538 -0
- package/dist/src/swarm-fullstack/core/fullstack-orchestrator.js.map +1 -0
- package/dist/src/swarm-fullstack/types/index.js +8 -0
- package/dist/src/swarm-fullstack/types/index.js.map +1 -0
- package/dist/src/task/commands.js +130 -0
- package/dist/src/task/commands.js.map +1 -0
- package/dist/src/task/coordination.js +737 -0
- package/dist/src/task/coordination.js.map +1 -0
- package/dist/src/task/engine.js +490 -0
- package/dist/src/task/engine.js.map +1 -0
- package/dist/src/task/index.js +269 -0
- package/dist/src/task/index.js.map +1 -0
- package/dist/src/task/types.js +5 -0
- package/dist/src/task/types.js.map +1 -0
- package/dist/src/terminal/adapters/base.js +5 -0
- package/dist/src/terminal/adapters/base.js.map +1 -0
- package/dist/src/terminal/adapters/native.js +473 -0
- package/dist/src/terminal/adapters/native.js.map +1 -0
- package/dist/src/terminal/adapters/vscode.js +285 -0
- package/dist/src/terminal/adapters/vscode.js.map +1 -0
- package/dist/src/terminal/manager.js +237 -0
- package/dist/src/terminal/manager.js.map +1 -0
- package/dist/src/terminal/pool.js +209 -0
- package/dist/src/terminal/pool.js.map +1 -0
- package/dist/src/terminal/session.js +211 -0
- package/dist/src/terminal/session.js.map +1 -0
- package/dist/src/terminal/vscode-bridge.js +186 -0
- package/dist/src/terminal/vscode-bridge.js.map +1 -0
- package/dist/src/testing/performance/PerformanceTestRunner.js +401 -0
- package/dist/src/testing/performance/PerformanceTestRunner.js.map +1 -0
- package/dist/src/testing-integration/chrome-mcp-integration.js +556 -0
- package/dist/src/testing-integration/chrome-mcp-integration.js.map +1 -0
- package/dist/src/testing-integration/continuous-test-runner.js +509 -0
- package/dist/src/testing-integration/continuous-test-runner.js.map +1 -0
- package/dist/src/tests/validation-consistency.test.js +52 -0
- package/dist/src/tests/validation-consistency.test.js.map +1 -0
- package/dist/src/topology/adaptive-coordinator.js +691 -0
- package/dist/src/topology/adaptive-coordinator.js.map +1 -0
- package/dist/src/topology/communication-bridge.js +551 -0
- package/dist/src/topology/communication-bridge.js.map +1 -0
- package/dist/src/topology/enhanced-hierarchical-coordinator.js +1732 -0
- package/dist/src/topology/enhanced-hierarchical-coordinator.js.map +1 -0
- package/dist/src/topology/enhanced-mesh-coordinator.js +1271 -0
- package/dist/src/topology/enhanced-mesh-coordinator.js.map +1 -0
- package/dist/src/topology/topology-manager.js +797 -0
- package/dist/src/topology/topology-manager.js.map +1 -0
- package/dist/src/topology/types.js +8 -0
- package/dist/src/topology/types.js.map +1 -0
- package/dist/src/types/agent-lifecycle-types.js +172 -0
- package/dist/src/types/agent-lifecycle-types.js.map +1 -0
- package/dist/src/types/agent-types.js +11 -0
- package/dist/src/types/agent-types.js.map +1 -0
- package/dist/src/types/cliffy.d.js +9 -0
- package/dist/src/types/cliffy.d.js.map +1 -0
- package/dist/src/types/global.d.js +5 -0
- package/dist/src/types/global.d.js.map +1 -0
- package/dist/src/types/index.js +16 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/mcp.d.js +3 -0
- package/dist/src/types/mcp.d.js.map +1 -0
- package/dist/src/types/vscode.d.js +4 -0
- package/dist/src/types/vscode.d.js.map +1 -0
- package/dist/src/ui/hive-dashboard.js +284 -0
- package/dist/src/ui/hive-dashboard.js.map +1 -0
- package/dist/src/utils/error-handler.js +27 -0
- package/dist/src/utils/error-handler.js.map +1 -0
- package/dist/src/utils/errors.js +195 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/formatters.js +66 -0
- package/dist/src/utils/formatters.js.map +1 -0
- package/dist/src/utils/helpers.js +451 -0
- package/dist/src/utils/helpers.js.map +1 -0
- package/dist/src/utils/paths.js +43 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/type-guards.js +119 -0
- package/dist/src/utils/type-guards.js.map +1 -0
- package/dist/src/utils/types.js +38 -0
- package/dist/src/utils/types.js.map +1 -0
- package/dist/src/verification/agent-scorer.js +633 -0
- package/dist/src/verification/agent-scorer.js.map +1 -0
- package/dist/src/verification/alert-manager.js +1126 -0
- package/dist/src/verification/alert-manager.js.map +1 -0
- package/dist/src/verification/api/types/index.js +6 -0
- package/dist/src/verification/api/types/index.js.map +1 -0
- package/dist/src/verification/checkpoint-manager.js +519 -0
- package/dist/src/verification/checkpoint-manager.js.map +1 -0
- package/dist/src/verification/cli-integration.js +500 -0
- package/dist/src/verification/cli-integration.js.map +1 -0
- package/dist/src/verification/conflict-resolver.js +534 -0
- package/dist/src/verification/conflict-resolver.js.map +1 -0
- package/dist/src/verification/crdt-coordinator.js +506 -0
- package/dist/src/verification/crdt-coordinator.js.map +1 -0
- package/dist/src/verification/dashboard-exporter.js +876 -0
- package/dist/src/verification/dashboard-exporter.js.map +1 -0
- package/dist/src/verification/demo.js +320 -0
- package/dist/src/verification/demo.js.map +1 -0
- package/dist/src/verification/examples.js +508 -0
- package/dist/src/verification/examples.js.map +1 -0
- package/dist/src/verification/hooks.js +961 -0
- package/dist/src/verification/hooks.js.map +1 -0
- package/dist/src/verification/index.js +73 -0
- package/dist/src/verification/index.js.map +1 -0
- package/dist/src/verification/interfaces.js +7 -0
- package/dist/src/verification/interfaces.js.map +1 -0
- package/dist/src/verification/memory-manager.js +510 -0
- package/dist/src/verification/memory-manager.js.map +1 -0
- package/dist/src/verification/middleware.js +579 -0
- package/dist/src/verification/middleware.js.map +1 -0
- package/dist/src/verification/rollback-engine.js +511 -0
- package/dist/src/verification/rollback-engine.js.map +1 -0
- package/dist/src/verification/rollback.js +1710 -0
- package/dist/src/verification/rollback.js.map +1 -0
- package/dist/src/verification/security-bypass-test.js +704 -0
- package/dist/src/verification/security-bypass-test.js.map +1 -0
- package/dist/src/verification/security.js +1125 -0
- package/dist/src/verification/security.js.map +1 -0
- package/dist/src/verification/simple-hooks.js +189 -0
- package/dist/src/verification/simple-hooks.js.map +1 -0
- package/dist/src/verification/system-tracker.js +657 -0
- package/dist/src/verification/system-tracker.js.map +1 -0
- package/dist/src/verification/telemetry.js +922 -0
- package/dist/src/verification/telemetry.js.map +1 -0
- package/dist/src/verification/test-verification.js +43 -0
- package/dist/src/verification/test-verification.js.map +1 -0
- package/dist/src/verification/tests/e2e/verification-pipeline.test.js +1027 -0
- package/dist/src/verification/tests/e2e/verification-pipeline.test.js.map +1 -0
- package/dist/src/verification/tests/integration/cross-agent-communication.test.js +638 -0
- package/dist/src/verification/tests/integration/cross-agent-communication.test.js.map +1 -0
- package/dist/src/verification/tests/mocks/false-reporting-scenarios.test.js +1029 -0
- package/dist/src/verification/tests/mocks/false-reporting-scenarios.test.js.map +1 -0
- package/dist/src/verification/tests/performance/verification-overhead.test.js +587 -0
- package/dist/src/verification/tests/performance/verification-overhead.test.js.map +1 -0
- package/dist/src/verification/tests/unit/truth-scoring.test.js +579 -0
- package/dist/src/verification/tests/unit/truth-scoring.test.js.map +1 -0
- package/dist/src/verification/tests.js +611 -0
- package/dist/src/verification/tests.js.map +1 -0
- package/dist/src/verification/truth-scorer.js +584 -0
- package/dist/src/verification/truth-scorer.js.map +1 -0
- package/dist/src/verification/types.js +56 -0
- package/dist/src/verification/types.js.map +1 -0
- package/dist/src/verification/verification-pipeline.js +884 -0
- package/dist/src/verification/verification-pipeline.js.map +1 -0
- package/dist/src/web/messaging/agent-status-tracker.js +447 -0
- package/dist/src/web/messaging/agent-status-tracker.js.map +1 -0
- package/dist/src/web/messaging/human-intervention-system.js +298 -0
- package/dist/src/web/messaging/human-intervention-system.js.map +1 -0
- package/dist/src/web/messaging/message-filter.js +289 -0
- package/dist/src/web/messaging/message-filter.js.map +1 -0
- package/dist/src/web/messaging/swarm-message-router.js +320 -0
- package/dist/src/web/messaging/swarm-message-router.js.map +1 -0
- package/dist/src/web/messaging/transparency-logger.js +415 -0
- package/dist/src/web/messaging/transparency-logger.js.map +1 -0
- package/dist/src/web/portal-server.js +440 -0
- package/dist/src/web/portal-server.js.map +1 -0
- package/dist/src/web/server.js +311 -0
- package/dist/src/web/server.js.map +1 -0
- package/dist/src/web/websocket/websocket-manager.js +509 -0
- package/dist/src/web/websocket/websocket-manager.js.map +1 -0
- package/dist/src/workflows/feature-lifecycle-manager.js +386 -0
- package/dist/src/workflows/feature-lifecycle-manager.js.map +1 -0
- package/dist/src/workflows/fullstack-coordination-manager.js +801 -0
- package/dist/src/workflows/fullstack-coordination-manager.js.map +1 -0
- package/dist/src/workflows/iterative-development-orchestrator.js +1128 -0
- package/dist/src/workflows/iterative-development-orchestrator.js.map +1 -0
- package/dist/src/workflows/progressive-rollout-manager.js +710 -0
- package/dist/src/workflows/progressive-rollout-manager.js.map +1 -0
- package/package.json +264 -0
- package/scripts/README.md +339 -0
- package/scripts/post-install-claude-md.js +50 -0
- package/src/commands/dependency-recommendations.js +551 -0
- package/src/commands/suggest-improvements.js +492 -0
- package/src/commands/suggest-templates.js +916 -0
- package/src/npx/claude-md-protection.js +169 -0
- package/wiki/INDEX.md +264 -0
- package/wiki/NAVIGATION.md +270 -0
- package/wiki/README.md +101 -0
- package/wiki/accessibility/README.md +103 -0
- package/wiki/accessibility/assistive-tech/screen-reader-support.md +912 -0
- package/wiki/accessibility/automation/agent-testing-automation.md +880 -0
- package/wiki/accessibility/guidelines/wcag-compliance.md +278 -0
- package/wiki/accessibility/i18n/internationalization-strategies.md +1022 -0
- package/wiki/accessibility/motor-accessibility/keyboard-navigation.md +1182 -0
- package/wiki/accessibility/patterns/inclusive-design-patterns.md +715 -0
- package/wiki/accessibility/testing/automated-testing.md +665 -0
- package/wiki/accessibility/visual-design/color-contrast.md +926 -0
- package/wiki/accessibility/workflows/accessibility-first-development.md +916 -0
- package/wiki/accessibility/workflows/inclusive-design-review.md +835 -0
- package/wiki/api-reference/README.md +565 -0
- package/wiki/api-reference/agent-management-api.md +931 -0
- package/wiki/api-reference/cli-api.md +630 -0
- package/wiki/api-reference/configuration-api.md +1355 -0
- package/wiki/api-reference/examples-code-samples.md +2241 -0
- package/wiki/api-reference/hooks-coordination-api.md +1406 -0
- package/wiki/api-reference/mcp-tool-specifications.md +944 -0
- package/wiki/api-reference/plugin-development.md +1695 -0
- package/wiki/api-reference/technical-architecture.md +1729 -0
- package/wiki/command-reference/README.md +305 -0
- package/wiki/command-reference/agent-commands.md +571 -0
- package/wiki/command-reference/cli-commands.md +516 -0
- package/wiki/command-reference/command-syntax.md +676 -0
- package/wiki/command-reference/expert/README.md +616 -0
- package/wiki/command-reference/expert-tier.md +791 -0
- package/wiki/command-reference/intermediate/README.md +628 -0
- package/wiki/command-reference/intermediate-tier.md +1024 -0
- package/wiki/command-reference/mcp-integration.md +412 -0
- package/wiki/command-reference/mcp-tools/README.md +1743 -0
- package/wiki/command-reference/mcp-tools/dual-access-workflows.md +911 -0
- package/wiki/command-reference/mcp-tools/index.md +201 -0
- package/wiki/command-reference/mcp-tools/integration-patterns.md +830 -0
- package/wiki/command-reference/mcp-tools/quick-reference.md +383 -0
- package/wiki/command-reference/mcp-tools/session-management.md +1183 -0
- package/wiki/command-reference/mcp-tools/task-tool-integration.md +827 -0
- package/wiki/command-reference/novice/README.md +661 -0
- package/wiki/command-reference/novice-tier.md +1142 -0
- package/wiki/command-reference/progression-guide.md +772 -0
- package/wiki/command-reference/troubleshooting.md +803 -0
- package/wiki/command-reference/workflows.md +752 -0
- package/wiki/community/README.md +328 -0
- package/wiki/community/contributing/README.md +623 -0
- package/wiki/community/contributing/code-of-conduct.md +388 -0
- package/wiki/community/contributing/collaboration-workflows.md +1 -0
- package/wiki/community/contributing/issue-reporting.md +1 -0
- package/wiki/community/contributing/onboarding-guide.md +1 -0
- package/wiki/community/contributing/recognition-system.md +1 -0
- package/wiki/community/discussions/README.md +54 -0
- package/wiki/community/learning-resources.md +476 -0
- package/wiki/community/showcase/README.md +1 -0
- package/wiki/core-concepts/README.md +656 -0
- package/wiki/core-concepts/agent-feedback-hooks/README.md +298 -0
- package/wiki/core-concepts/agents/README.md +392 -0
- package/wiki/core-concepts/agents/agent-creation-guide.md +431 -0
- package/wiki/core-concepts/agents.md +301 -0
- package/wiki/core-concepts/architecture.md +227 -0
- package/wiki/core-concepts/hooks-lifecycle/README.md +543 -0
- package/wiki/core-concepts/integration.md +507 -0
- package/wiki/core-concepts/memory-system/README.md +521 -0
- package/wiki/core-concepts/performance.md +463 -0
- package/wiki/core-concepts/sparc-methodology/README.md +465 -0
- package/wiki/core-concepts/sparc-workflow.md +407 -0
- package/wiki/core-concepts/swarm-coordination/README.md +525 -0
- package/wiki/core-concepts/swarm-coordination.md +453 -0
- package/wiki/cost-optimization/enterprise-cost-management.md +1356 -0
- package/wiki/deployment/enterprise-deployment-patterns.md +1739 -0
- package/wiki/enterprise-architecture/enterprise-architecture-overview.md +348 -0
- package/wiki/enterprise-architecture/enterprise-scaling-patterns.md +1184 -0
- package/wiki/examples/README.md +288 -0
- package/wiki/examples/automation/cicd-pipeline/README.md +1265 -0
- package/wiki/examples/basic/hello-world/README.md +434 -0
- package/wiki/examples/basic-projects/README.md +427 -0
- package/wiki/examples/enterprise-integration/README.md +602 -0
- package/wiki/examples/integration-patterns.md +825 -0
- package/wiki/examples/legacy-migration/README.md +656 -0
- package/wiki/examples/multi-cloud/README.md +1071 -0
- package/wiki/examples/performance-benchmarks.md +729 -0
- package/wiki/examples/performance-optimization/README.md +1214 -0
- package/wiki/examples/projects/rest-api/README.md +845 -0
- package/wiki/examples/real-time-collaboration/README.md +1092 -0
- package/wiki/examples/scenarios/ecommerce/README.md +1273 -0
- package/wiki/examples/swarm-patterns.md +1026 -0
- package/wiki/examples/templates/download-system.md +993 -0
- package/wiki/examples/templates/javascript/README.md +487 -0
- package/wiki/examples/templates/javascript/package.json +119 -0
- package/wiki/examples/troubleshooting/README.md +1317 -0
- package/wiki/examples/utilities/patterns/README.md +1347 -0
- package/wiki/examples/videos/01-setup.md +403 -0
- package/wiki/examples/workflow-automation/README.md +1023 -0
- package/wiki/getting-started/README.md +398 -0
- package/wiki/getting-started/benefits.md +451 -0
- package/wiki/getting-started/claude-code-mcp/README.md +319 -0
- package/wiki/getting-started/claude-code-mcp/setup.md +431 -0
- package/wiki/getting-started/claude-code-mcp/usage-examples.md +501 -0
- package/wiki/getting-started/cli-access/README.md +300 -0
- package/wiki/getting-started/cli-access/first-commands.md +319 -0
- package/wiki/getting-started/installation/README.md +469 -0
- package/wiki/getting-started/installation/troubleshooting.md +617 -0
- package/wiki/getting-started/learning-path.md +494 -0
- package/wiki/getting-started/learning-plan-generator.md +434 -0
- package/wiki/getting-started/quick-start/README.md +255 -0
- package/wiki/getting-started/quick-start/cli-tutorial.md +680 -0
- package/wiki/getting-started/quick-start/mcp-tutorial.md +544 -0
- package/wiki/governance/multi-project-coordination.md +820 -0
- package/wiki/languages/README.md +349 -0
- package/wiki/languages/go/README.md +124 -0
- package/wiki/languages/go/examples/README.md +1066 -0
- package/wiki/languages/go/frameworks/README.md +708 -0
- package/wiki/languages/go/integration/README.md +748 -0
- package/wiki/languages/go/microservices/README.md +1185 -0
- package/wiki/languages/go/performance/README.md +1310 -0
- package/wiki/languages/go/setup/README.md +397 -0
- package/wiki/languages/go/systems/README.md +1116 -0
- package/wiki/languages/go/testing/README.md +999 -0
- package/wiki/languages/java/README.md +217 -0
- package/wiki/languages/java/claude-flow-integration.md +1220 -0
- package/wiki/languages/java/enterprise-java.md +1247 -0
- package/wiki/languages/java/examples.md +1712 -0
- package/wiki/languages/java/microservices.md +1600 -0
- package/wiki/languages/java/performance.md +1122 -0
- package/wiki/languages/java/project-setup.md +504 -0
- package/wiki/languages/java/spring-boot.md +756 -0
- package/wiki/languages/java/testing.md +1323 -0
- package/wiki/languages/javascript/README.md +575 -0
- package/wiki/languages/javascript/api/README.md +1445 -0
- package/wiki/languages/javascript/backend/README.md +748 -0
- package/wiki/languages/javascript/frontend/README.md +1048 -0
- package/wiki/languages/javascript/integration.md +1107 -0
- package/wiki/languages/javascript/setup/README.md +438 -0
- package/wiki/languages/javascript/testing/README.md +1775 -0
- package/wiki/languages/python/README.md +1002 -0
- package/wiki/languages/python/data-science/README.md +1317 -0
- package/wiki/languages/python/examples/README.md +911 -0
- package/wiki/languages/python/integration.md +1515 -0
- package/wiki/languages/python/mcp-integration.md +843 -0
- package/wiki/languages/python/setup/README.md +622 -0
- package/wiki/languages/python/testing/README.md +1680 -0
- package/wiki/languages/python/web-development/README.md +974 -0
- package/wiki/languages/rust/README.md +936 -0
- package/wiki/languages/rust/examples/cli-mcp-workflows.md +850 -0
- package/wiki/languages/rust/examples/rest-api.md +1927 -0
- package/wiki/languages/rust/setup/cargo-integration.md +780 -0
- package/wiki/languages/rust/testing/quality-validation.md +1098 -0
- package/wiki/languages/rust/web-development/axum.md +1497 -0
- package/wiki/languages/rust/workflows/systems-programming.md +1189 -0
- package/wiki/languages/typescript/README.md +581 -0
- package/wiki/languages/typescript/automation.md +1070 -0
- package/wiki/languages/typescript/coordination.md +971 -0
- package/wiki/languages/typescript/enterprise.md +1368 -0
- package/wiki/languages/typescript/frameworks.md +970 -0
- package/wiki/languages/typescript/migration.md +1384 -0
- package/wiki/languages/typescript/patterns.md +694 -0
- package/wiki/languages/typescript/performance.md +1195 -0
- package/wiki/languages/typescript/setup.md +516 -0
- package/wiki/languages/typescript/workflows.md +481 -0
- package/wiki/monitoring/enterprise-observability.md +1141 -0
- package/wiki/security/enterprise-security-framework.md +1174 -0
- package/wiki/team-coordination/team-scaling-strategies.md +1486 -0
- package/wiki/troubleshooting/README.md +654 -0
- package/wiki/troubleshooting/common-issues/README.md +659 -0
- package/wiki/troubleshooting/common-issues.md +458 -0
- package/wiki/troubleshooting/error-resolution.md +763 -0
- package/wiki/troubleshooting/performance-optimization.md +540 -0
- package/wiki/tutorials/README.md +607 -0
- package/wiki/tutorials/advanced/01-multi-agent-orchestration-patterns.md +585 -0
- package/wiki/tutorials/advanced/02-enterprise-architecture-development.md +661 -0
- package/wiki/tutorials/advanced/03-advanced-sparc-methodology.md +595 -0
- package/wiki/tutorials/advanced/04-performance-optimization-workflows.md +613 -0
- package/wiki/tutorials/advanced/05-custom-agent-development.md +681 -0
- package/wiki/tutorials/advanced/06-legacy-system-integration.md +574 -0
- package/wiki/tutorials/advanced/07-production-deployment-monitoring.md +684 -0
- package/wiki/tutorials/advanced/08-enterprise-scenarios.md +700 -0
- package/wiki/tutorials/advanced/README.md +577 -0
- package/wiki/tutorials/advanced/performance-optimization.md +476 -0
- package/wiki/tutorials/advanced/swarm-orchestration.md +627 -0
- package/wiki/tutorials/beginner/01-first-project.md +532 -0
- package/wiki/tutorials/beginner/02-basic-workflows.md +523 -0
- package/wiki/tutorials/beginner/03-simple-automation.md +641 -0
- package/wiki/tutorials/beginner/04-quality-testing.md +984 -0
- package/wiki/tutorials/beginner/README.md +388 -0
- package/wiki/tutorials/exercises/ecommerce-platform.md +1370 -0
- package/wiki/tutorials/intermediate/01-multi-agent-teams.md +961 -0
- package/wiki/tutorials/intermediate/README.md +452 -0
- package/wiki/tutorials/intermediate/optimization.md +402 -0
- package/wiki/tutorials/skill-assessment.md +522 -0
- package/wiki/tutorials/skill-competency-matrix.md +548 -0
- package/wiki/tutorials/troubleshooting/command-cheatsheet.md +425 -0
- package/wiki/tutorials/troubleshooting/setup-issues.md +717 -0
- package/wiki/video-tutorials/README.md +202 -0
- package/wiki/video-tutorials/accessibility/README.md +1349 -0
- package/wiki/video-tutorials/community/README.md +1366 -0
- package/wiki/video-tutorials/content-organization/README.md +1295 -0
- package/wiki/video-tutorials/distribution/README.md +1093 -0
- package/wiki/video-tutorials/editing/README.md +751 -0
- package/wiki/video-tutorials/interactive/README.md +1151 -0
- package/wiki/video-tutorials/multi-language/README.md +1384 -0
- package/wiki/video-tutorials/planning/README.md +461 -0
- package/wiki/video-tutorials/recording/README.md +619 -0
- package/wiki/video-tutorials/technical-specs/README.md +1018 -0
|
@@ -0,0 +1,1600 @@
|
|
|
1
|
+
# Microservices with Spring Cloud and Quarkus
|
|
2
|
+
|
|
3
|
+
This comprehensive guide covers building microservices architectures using Spring Cloud and Quarkus, including service discovery, configuration management, circuit breakers, and Claude Flow integration for distributed systems development.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### Spring Cloud Microservice
|
|
8
|
+
|
|
9
|
+
```java
|
|
10
|
+
@SpringBootApplication
|
|
11
|
+
@EnableEurekaClient
|
|
12
|
+
@EnableConfigServer
|
|
13
|
+
public class UserServiceApplication {
|
|
14
|
+
public static void main(String[] args) {
|
|
15
|
+
SpringApplication.run(UserServiceApplication.class, args);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Quarkus Microservice
|
|
21
|
+
|
|
22
|
+
```java
|
|
23
|
+
@ApplicationScoped
|
|
24
|
+
@Path("/users")
|
|
25
|
+
public class UserResource {
|
|
26
|
+
|
|
27
|
+
@Inject
|
|
28
|
+
UserService userService;
|
|
29
|
+
|
|
30
|
+
@GET
|
|
31
|
+
@Produces(MediaType.APPLICATION_JSON)
|
|
32
|
+
public List<User> getUsers() {
|
|
33
|
+
return userService.getAllUsers();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### With Claude Flow Integration
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Generate microservices architecture with agents
|
|
42
|
+
npx claude-flow sparc run architect "Design Spring Cloud microservices architecture"
|
|
43
|
+
|
|
44
|
+
# Build distributed system
|
|
45
|
+
npx claude-flow sparc batch architect,coder "Implement microservices with Spring Cloud and Quarkus"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Spring Cloud Microservices
|
|
49
|
+
|
|
50
|
+
### 1. Service Discovery with Eureka
|
|
51
|
+
|
|
52
|
+
```java
|
|
53
|
+
// Eureka Server
|
|
54
|
+
@SpringBootApplication
|
|
55
|
+
@EnableEurekaServer
|
|
56
|
+
public class EurekaServerApplication {
|
|
57
|
+
public static void main(String[] args) {
|
|
58
|
+
SpringApplication.run(EurekaServerApplication.class, args);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// eureka-server.yml
|
|
63
|
+
spring:
|
|
64
|
+
application:
|
|
65
|
+
name: eureka-server
|
|
66
|
+
server:
|
|
67
|
+
port: 8761
|
|
68
|
+
|
|
69
|
+
eureka:
|
|
70
|
+
instance:
|
|
71
|
+
hostname: localhost
|
|
72
|
+
client:
|
|
73
|
+
register-with-eureka: false
|
|
74
|
+
fetch-registry: false
|
|
75
|
+
service-url:
|
|
76
|
+
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
|
|
77
|
+
|
|
78
|
+
// User Service (Eureka Client)
|
|
79
|
+
@SpringBootApplication
|
|
80
|
+
@EnableEurekaClient
|
|
81
|
+
@EnableJpaRepositories
|
|
82
|
+
public class UserServiceApplication {
|
|
83
|
+
|
|
84
|
+
public static void main(String[] args) {
|
|
85
|
+
SpringApplication.run(UserServiceApplication.class, args);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@LoadBalanced
|
|
89
|
+
@Bean
|
|
90
|
+
public RestTemplate restTemplate() {
|
|
91
|
+
return new RestTemplate();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@Bean
|
|
95
|
+
public WebClient.Builder webClientBuilder() {
|
|
96
|
+
return WebClient.builder();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// user-service.yml
|
|
101
|
+
spring:
|
|
102
|
+
application:
|
|
103
|
+
name: user-service
|
|
104
|
+
datasource:
|
|
105
|
+
url: jdbc:postgresql://localhost:5432/userdb
|
|
106
|
+
username: ${DB_USERNAME:user}
|
|
107
|
+
password: ${DB_PASSWORD:password}
|
|
108
|
+
|
|
109
|
+
server:
|
|
110
|
+
port: ${PORT:8081}
|
|
111
|
+
|
|
112
|
+
eureka:
|
|
113
|
+
client:
|
|
114
|
+
service-url:
|
|
115
|
+
defaultZone: http://localhost:8761/eureka/
|
|
116
|
+
instance:
|
|
117
|
+
prefer-ip-address: true
|
|
118
|
+
instance-id: ${spring.application.name}:${server.port}
|
|
119
|
+
|
|
120
|
+
management:
|
|
121
|
+
endpoints:
|
|
122
|
+
web:
|
|
123
|
+
exposure:
|
|
124
|
+
include: health,info,metrics
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 2. Configuration Management with Spring Cloud Config
|
|
128
|
+
|
|
129
|
+
```java
|
|
130
|
+
// Config Server
|
|
131
|
+
@SpringBootApplication
|
|
132
|
+
@EnableConfigServer
|
|
133
|
+
public class ConfigServerApplication {
|
|
134
|
+
public static void main(String[] args) {
|
|
135
|
+
SpringApplication.run(ConfigServerApplication.class, args);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// config-server.yml
|
|
140
|
+
spring:
|
|
141
|
+
application:
|
|
142
|
+
name: config-server
|
|
143
|
+
cloud:
|
|
144
|
+
config:
|
|
145
|
+
server:
|
|
146
|
+
git:
|
|
147
|
+
uri: https://github.com/your-org/microservices-config
|
|
148
|
+
default-label: main
|
|
149
|
+
search-paths: config
|
|
150
|
+
health:
|
|
151
|
+
repositories:
|
|
152
|
+
config:
|
|
153
|
+
label: main
|
|
154
|
+
|
|
155
|
+
server:
|
|
156
|
+
port: 8888
|
|
157
|
+
|
|
158
|
+
eureka:
|
|
159
|
+
client:
|
|
160
|
+
service-url:
|
|
161
|
+
defaultZone: http://localhost:8761/eureka/
|
|
162
|
+
|
|
163
|
+
// Configuration refresh endpoint
|
|
164
|
+
@RestController
|
|
165
|
+
@RefreshScope
|
|
166
|
+
public class ConfigController {
|
|
167
|
+
|
|
168
|
+
@Value("${user.service.max-connections:10}")
|
|
169
|
+
private int maxConnections;
|
|
170
|
+
|
|
171
|
+
@Value("${user.service.timeout:5000}")
|
|
172
|
+
private int timeout;
|
|
173
|
+
|
|
174
|
+
@GetMapping("/config")
|
|
175
|
+
public Map<String, Object> getConfig() {
|
|
176
|
+
Map<String, Object> config = new HashMap<>();
|
|
177
|
+
config.put("maxConnections", maxConnections);
|
|
178
|
+
config.put("timeout", timeout);
|
|
179
|
+
return config;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Automatic configuration refresh
|
|
184
|
+
@Component
|
|
185
|
+
public class ConfigRefreshListener {
|
|
186
|
+
|
|
187
|
+
@EventListener
|
|
188
|
+
public void handleRefreshEvent(RefreshRemoteApplicationEvent event) {
|
|
189
|
+
log.info("Configuration refreshed for service: {}", event.getDestinationService());
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### 3. API Gateway with Spring Cloud Gateway
|
|
195
|
+
|
|
196
|
+
```java
|
|
197
|
+
@SpringBootApplication
|
|
198
|
+
@EnableEurekaClient
|
|
199
|
+
public class ApiGatewayApplication {
|
|
200
|
+
public static void main(String[] args) {
|
|
201
|
+
SpringApplication.run(ApiGatewayApplication.class, args);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Gateway configuration
|
|
206
|
+
@Configuration
|
|
207
|
+
public class GatewayConfig {
|
|
208
|
+
|
|
209
|
+
@Bean
|
|
210
|
+
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
|
|
211
|
+
return builder.routes()
|
|
212
|
+
// User Service routes
|
|
213
|
+
.route("user-service", r -> r
|
|
214
|
+
.path("/api/users/**")
|
|
215
|
+
.filters(f -> f
|
|
216
|
+
.stripPrefix(1)
|
|
217
|
+
.addRequestHeader("X-Gateway", "spring-cloud-gateway")
|
|
218
|
+
.addResponseHeader("X-Response-Time", String.valueOf(System.currentTimeMillis()))
|
|
219
|
+
.circuitBreaker(config -> config
|
|
220
|
+
.setName("user-service-cb")
|
|
221
|
+
.setFallbackUri("forward:/fallback/users")))
|
|
222
|
+
.uri("lb://user-service"))
|
|
223
|
+
|
|
224
|
+
// Order Service routes
|
|
225
|
+
.route("order-service", r -> r
|
|
226
|
+
.path("/api/orders/**")
|
|
227
|
+
.filters(f -> f
|
|
228
|
+
.stripPrefix(1)
|
|
229
|
+
.retry(config -> config
|
|
230
|
+
.setRetries(3)
|
|
231
|
+
.setMethods(HttpMethod.GET)
|
|
232
|
+
.setBackoff(Duration.ofMillis(100), Duration.ofMillis(1000), 2, false)))
|
|
233
|
+
.uri("lb://order-service"))
|
|
234
|
+
|
|
235
|
+
// Rate limiting
|
|
236
|
+
.route("rate-limited", r -> r
|
|
237
|
+
.path("/api/public/**")
|
|
238
|
+
.filters(f -> f
|
|
239
|
+
.requestRateLimiter(config -> config
|
|
240
|
+
.setRateLimiter(redisRateLimiter())
|
|
241
|
+
.setKeyResolver(userKeyResolver())))
|
|
242
|
+
.uri("lb://public-service"))
|
|
243
|
+
.build();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@Bean
|
|
247
|
+
public RedisRateLimiter redisRateLimiter() {
|
|
248
|
+
return new RedisRateLimiter(10, 20, 1); // 10 requests per second, burst of 20
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@Bean
|
|
252
|
+
@Primary
|
|
253
|
+
public KeyResolver userKeyResolver() {
|
|
254
|
+
return exchange -> exchange.getRequest()
|
|
255
|
+
.getHeaders()
|
|
256
|
+
.getFirst("X-User-ID")
|
|
257
|
+
.map(Mono::just)
|
|
258
|
+
.orElse(Mono.just("anonymous"));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Global filters
|
|
263
|
+
@Component
|
|
264
|
+
public class LoggingGlobalFilter implements GlobalFilter, Ordered {
|
|
265
|
+
|
|
266
|
+
@Override
|
|
267
|
+
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
|
268
|
+
String path = exchange.getRequest().getPath().value();
|
|
269
|
+
String method = exchange.getRequest().getMethod().name();
|
|
270
|
+
|
|
271
|
+
log.info("Request: {} {}", method, path);
|
|
272
|
+
|
|
273
|
+
return chain.filter(exchange)
|
|
274
|
+
.then(Mono.fromRunnable(() -> {
|
|
275
|
+
int statusCode = exchange.getResponse().getStatusCode().value();
|
|
276
|
+
log.info("Response: {} {} -> {}", method, path, statusCode);
|
|
277
|
+
}));
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@Override
|
|
281
|
+
public int getOrder() {
|
|
282
|
+
return -1; // Execute before other filters
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Fallback controller
|
|
287
|
+
@RestController
|
|
288
|
+
public class FallbackController {
|
|
289
|
+
|
|
290
|
+
@GetMapping("/fallback/users")
|
|
291
|
+
public ResponseEntity<Map<String, String>> userServiceFallback() {
|
|
292
|
+
Map<String, String> response = new HashMap<>();
|
|
293
|
+
response.put("message", "User service is currently unavailable");
|
|
294
|
+
response.put("status", "fallback");
|
|
295
|
+
return ResponseEntity.ok(response);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### 4. Circuit Breaker with Resilience4j
|
|
301
|
+
|
|
302
|
+
```java
|
|
303
|
+
@Service
|
|
304
|
+
public class OrderService {
|
|
305
|
+
|
|
306
|
+
private final RestTemplate restTemplate;
|
|
307
|
+
private final CircuitBreaker circuitBreaker;
|
|
308
|
+
private final Retry retry;
|
|
309
|
+
private final TimeLimiter timeLimiter;
|
|
310
|
+
|
|
311
|
+
public OrderService(RestTemplate restTemplate, CircuitBreakerRegistry circuitBreakerRegistry,
|
|
312
|
+
RetryRegistry retryRegistry, TimeLimiterRegistry timeLimiterRegistry) {
|
|
313
|
+
this.restTemplate = restTemplate;
|
|
314
|
+
this.circuitBreaker = circuitBreakerRegistry.circuitBreaker("user-service");
|
|
315
|
+
this.retry = retryRegistry.retry("user-service");
|
|
316
|
+
this.timeLimiter = timeLimiterRegistry.timeLimiter("user-service");
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@CircuitBreaker(name = "user-service", fallbackMethod = "getUserFallback")
|
|
320
|
+
@Retry(name = "user-service")
|
|
321
|
+
@TimeLimiter(name = "user-service")
|
|
322
|
+
public CompletableFuture<User> getUser(Long userId) {
|
|
323
|
+
return CompletableFuture.supplyAsync(() -> {
|
|
324
|
+
String url = "http://user-service/api/users/" + userId;
|
|
325
|
+
return restTemplate.getForObject(url, User.class);
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
public CompletableFuture<User> getUserFallback(Long userId, Exception ex) {
|
|
330
|
+
log.warn("Fallback triggered for user {}: {}", userId, ex.getMessage());
|
|
331
|
+
return CompletableFuture.completedFuture(User.builder()
|
|
332
|
+
.id(userId)
|
|
333
|
+
.firstName("Unknown")
|
|
334
|
+
.lastName("User")
|
|
335
|
+
.email("unknown@example.com")
|
|
336
|
+
.build());
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Reactive approach with WebClient
|
|
340
|
+
@Component
|
|
341
|
+
public static class ReactiveOrderService {
|
|
342
|
+
|
|
343
|
+
private final WebClient webClient;
|
|
344
|
+
|
|
345
|
+
public ReactiveOrderService(WebClient.Builder webClientBuilder) {
|
|
346
|
+
this.webClient = webClientBuilder.baseUrl("http://user-service").build();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@CircuitBreaker(name = "user-service-reactive")
|
|
350
|
+
@Retry(name = "user-service-reactive")
|
|
351
|
+
public Mono<User> getUserReactive(Long userId) {
|
|
352
|
+
return webClient.get()
|
|
353
|
+
.uri("/api/users/{id}", userId)
|
|
354
|
+
.retrieve()
|
|
355
|
+
.bodyToMono(User.class)
|
|
356
|
+
.timeout(Duration.ofSeconds(3))
|
|
357
|
+
.onErrorResume(ex -> {
|
|
358
|
+
log.warn("Error calling user service: {}", ex.getMessage());
|
|
359
|
+
return Mono.just(createFallbackUser(userId));
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
private User createFallbackUser(Long userId) {
|
|
364
|
+
return User.builder()
|
|
365
|
+
.id(userId)
|
|
366
|
+
.firstName("Fallback")
|
|
367
|
+
.lastName("User")
|
|
368
|
+
.build();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// Circuit breaker configuration
|
|
374
|
+
resilience4j:
|
|
375
|
+
circuitbreaker:
|
|
376
|
+
instances:
|
|
377
|
+
user-service:
|
|
378
|
+
sliding-window-size: 10
|
|
379
|
+
minimum-number-of-calls: 5
|
|
380
|
+
failure-rate-threshold: 50
|
|
381
|
+
wait-duration-in-open-state: 30s
|
|
382
|
+
permitted-number-of-calls-in-half-open-state: 3
|
|
383
|
+
automatic-transition-from-open-to-half-open-enabled: true
|
|
384
|
+
|
|
385
|
+
retry:
|
|
386
|
+
instances:
|
|
387
|
+
user-service:
|
|
388
|
+
max-attempts: 3
|
|
389
|
+
wait-duration: 1s
|
|
390
|
+
exponential-backoff-multiplier: 2
|
|
391
|
+
|
|
392
|
+
timelimiter:
|
|
393
|
+
instances:
|
|
394
|
+
user-service:
|
|
395
|
+
timeout-duration: 3s
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### 5. Distributed Tracing with Sleuth and Zipkin
|
|
399
|
+
|
|
400
|
+
```java
|
|
401
|
+
// Tracing configuration
|
|
402
|
+
@Configuration
|
|
403
|
+
public class TracingConfiguration {
|
|
404
|
+
|
|
405
|
+
@Bean
|
|
406
|
+
public Sender sender() {
|
|
407
|
+
return OkHttpSender.create("http://zipkin:9411/api/v2/spans");
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
@Bean
|
|
411
|
+
public AsyncReporter<Span> spanReporter() {
|
|
412
|
+
return AsyncReporter.create(sender());
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
@Bean
|
|
416
|
+
public Sampler alwaysSampler() {
|
|
417
|
+
return Sampler.create(1.0f); // Sample 100% of traces
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// Custom span creation
|
|
422
|
+
@Service
|
|
423
|
+
public class TracedUserService {
|
|
424
|
+
|
|
425
|
+
private final UserRepository userRepository;
|
|
426
|
+
private final Tracer tracer;
|
|
427
|
+
|
|
428
|
+
public TracedUserService(UserRepository userRepository, Tracer tracer) {
|
|
429
|
+
this.userRepository = userRepository;
|
|
430
|
+
this.tracer = tracer;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
public User createUser(CreateUserRequest request) {
|
|
434
|
+
Span span = tracer.nextSpan()
|
|
435
|
+
.name("user-creation")
|
|
436
|
+
.tag("user.email", request.getEmail())
|
|
437
|
+
.start();
|
|
438
|
+
|
|
439
|
+
try (Tracer.SpanInScope ws = tracer.withSpanInScope(span)) {
|
|
440
|
+
// Business logic
|
|
441
|
+
User user = new User();
|
|
442
|
+
user.setEmail(request.getEmail());
|
|
443
|
+
user.setFirstName(request.getFirstName());
|
|
444
|
+
user.setLastName(request.getLastName());
|
|
445
|
+
|
|
446
|
+
// Add more spans for sub-operations
|
|
447
|
+
Span validationSpan = tracer.nextSpan()
|
|
448
|
+
.name("user-validation")
|
|
449
|
+
.start();
|
|
450
|
+
|
|
451
|
+
try (Tracer.SpanInScope validationScope = tracer.withSpanInScope(validationSpan)) {
|
|
452
|
+
validateUser(user);
|
|
453
|
+
} finally {
|
|
454
|
+
validationSpan.end();
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
User saved = userRepository.save(user);
|
|
458
|
+
span.tag("user.id", saved.getId().toString());
|
|
459
|
+
|
|
460
|
+
return saved;
|
|
461
|
+
} catch (Exception e) {
|
|
462
|
+
span.tag("error", e.getMessage());
|
|
463
|
+
throw e;
|
|
464
|
+
} finally {
|
|
465
|
+
span.end();
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
@NewSpan("user-validation")
|
|
470
|
+
public void validateUser(@SpanTag("user") User user) {
|
|
471
|
+
// Validation logic
|
|
472
|
+
if (user.getEmail() == null || !user.getEmail().contains("@")) {
|
|
473
|
+
throw new IllegalArgumentException("Invalid email");
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
# application.yml for tracing
|
|
479
|
+
spring:
|
|
480
|
+
sleuth:
|
|
481
|
+
zipkin:
|
|
482
|
+
base-url: http://zipkin:9411
|
|
483
|
+
sampler:
|
|
484
|
+
probability: 1.0 # Sample all requests
|
|
485
|
+
web:
|
|
486
|
+
skip-pattern: /actuator.*
|
|
487
|
+
application:
|
|
488
|
+
name: user-service
|
|
489
|
+
|
|
490
|
+
logging:
|
|
491
|
+
pattern:
|
|
492
|
+
level: "%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]"
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
## Quarkus Microservices
|
|
496
|
+
|
|
497
|
+
### 1. Basic Quarkus Service
|
|
498
|
+
|
|
499
|
+
```java
|
|
500
|
+
// User Resource
|
|
501
|
+
@Path("/users")
|
|
502
|
+
@Produces(MediaType.APPLICATION_JSON)
|
|
503
|
+
@Consumes(MediaType.APPLICATION_JSON)
|
|
504
|
+
public class UserResource {
|
|
505
|
+
|
|
506
|
+
@Inject
|
|
507
|
+
UserService userService;
|
|
508
|
+
|
|
509
|
+
@GET
|
|
510
|
+
public List<User> getAllUsers() {
|
|
511
|
+
return userService.findAll();
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@GET
|
|
515
|
+
@Path("/{id}")
|
|
516
|
+
public Response getUser(@PathParam("id") Long id) {
|
|
517
|
+
return userService.findById(id)
|
|
518
|
+
.map(user -> Response.ok(user).build())
|
|
519
|
+
.orElse(Response.status(Response.Status.NOT_FOUND).build());
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
@POST
|
|
523
|
+
@Transactional
|
|
524
|
+
public Response createUser(@Valid User user) {
|
|
525
|
+
User created = userService.create(user);
|
|
526
|
+
return Response.status(Response.Status.CREATED)
|
|
527
|
+
.entity(created)
|
|
528
|
+
.build();
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
@PUT
|
|
532
|
+
@Path("/{id}")
|
|
533
|
+
@Transactional
|
|
534
|
+
public Response updateUser(@PathParam("id") Long id, @Valid User user) {
|
|
535
|
+
return userService.update(id, user)
|
|
536
|
+
.map(updated -> Response.ok(updated).build())
|
|
537
|
+
.orElse(Response.status(Response.Status.NOT_FOUND).build());
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
@DELETE
|
|
541
|
+
@Path("/{id}")
|
|
542
|
+
@Transactional
|
|
543
|
+
public Response deleteUser(@PathParam("id") Long id) {
|
|
544
|
+
userService.deleteById(id);
|
|
545
|
+
return Response.noContent().build();
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// User Service
|
|
550
|
+
@ApplicationScoped
|
|
551
|
+
public class UserService {
|
|
552
|
+
|
|
553
|
+
@Inject
|
|
554
|
+
UserRepository userRepository;
|
|
555
|
+
|
|
556
|
+
@Inject
|
|
557
|
+
Event<UserCreatedEvent> userCreatedEvent;
|
|
558
|
+
|
|
559
|
+
public List<User> findAll() {
|
|
560
|
+
return userRepository.listAll();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
public Optional<User> findById(Long id) {
|
|
564
|
+
return Optional.ofNullable(userRepository.findById(id));
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
public User create(User user) {
|
|
568
|
+
userRepository.persist(user);
|
|
569
|
+
userCreatedEvent.fire(new UserCreatedEvent(user.id));
|
|
570
|
+
return user;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
public Optional<User> update(Long id, User updatedUser) {
|
|
574
|
+
return findById(id).map(user -> {
|
|
575
|
+
user.firstName = updatedUser.firstName;
|
|
576
|
+
user.lastName = updatedUser.lastName;
|
|
577
|
+
user.email = updatedUser.email;
|
|
578
|
+
return user;
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
public void deleteById(Long id) {
|
|
583
|
+
userRepository.deleteById(id);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// User Entity
|
|
588
|
+
@Entity
|
|
589
|
+
@Table(name = "users")
|
|
590
|
+
public class User extends PanacheEntityBase {
|
|
591
|
+
|
|
592
|
+
@Id
|
|
593
|
+
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
594
|
+
public Long id;
|
|
595
|
+
|
|
596
|
+
@Column(nullable = false, unique = true)
|
|
597
|
+
@NotBlank
|
|
598
|
+
@Email
|
|
599
|
+
public String email;
|
|
600
|
+
|
|
601
|
+
@Column(nullable = false)
|
|
602
|
+
@NotBlank
|
|
603
|
+
public String firstName;
|
|
604
|
+
|
|
605
|
+
@Column(nullable = false)
|
|
606
|
+
@NotBlank
|
|
607
|
+
public String lastName;
|
|
608
|
+
|
|
609
|
+
@CreationTimestamp
|
|
610
|
+
public LocalDateTime createdAt;
|
|
611
|
+
|
|
612
|
+
@UpdateTimestamp
|
|
613
|
+
public LocalDateTime updatedAt;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// User Repository with Panache
|
|
617
|
+
@ApplicationScoped
|
|
618
|
+
public class UserRepository implements PanacheRepository<User> {
|
|
619
|
+
|
|
620
|
+
public Optional<User> findByEmail(String email) {
|
|
621
|
+
return find("email", email).firstResultOptional();
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
public List<User> findByFirstName(String firstName) {
|
|
625
|
+
return find("firstName", firstName).list();
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
public long countActive() {
|
|
629
|
+
return count("active", true);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
### 2. Reactive Quarkus with Mutiny
|
|
635
|
+
|
|
636
|
+
```java
|
|
637
|
+
// Reactive User Resource
|
|
638
|
+
@Path("/users")
|
|
639
|
+
@Produces(MediaType.APPLICATION_JSON)
|
|
640
|
+
@Consumes(MediaType.APPLICATION_JSON)
|
|
641
|
+
public class ReactiveUserResource {
|
|
642
|
+
|
|
643
|
+
@Inject
|
|
644
|
+
ReactiveUserService userService;
|
|
645
|
+
|
|
646
|
+
@GET
|
|
647
|
+
public Uni<List<User>> getAllUsers() {
|
|
648
|
+
return userService.findAll();
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
@GET
|
|
652
|
+
@Path("/{id}")
|
|
653
|
+
public Uni<Response> getUser(@PathParam("id") Long id) {
|
|
654
|
+
return userService.findById(id)
|
|
655
|
+
.map(user -> user != null ?
|
|
656
|
+
Response.ok(user).build() :
|
|
657
|
+
Response.status(Response.Status.NOT_FOUND).build());
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
@POST
|
|
661
|
+
public Uni<Response> createUser(@Valid User user) {
|
|
662
|
+
return userService.create(user)
|
|
663
|
+
.map(created -> Response.status(Response.Status.CREATED)
|
|
664
|
+
.entity(created)
|
|
665
|
+
.build());
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
@GET
|
|
669
|
+
@Path("/stream")
|
|
670
|
+
@Produces(MediaType.SERVER_SENT_EVENTS)
|
|
671
|
+
public Multi<User> streamUsers() {
|
|
672
|
+
return userService.streamActiveUsers();
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
// Reactive User Service
|
|
677
|
+
@ApplicationScoped
|
|
678
|
+
public class ReactiveUserService {
|
|
679
|
+
|
|
680
|
+
@Inject
|
|
681
|
+
ReactiveUserRepository userRepository;
|
|
682
|
+
|
|
683
|
+
@Inject
|
|
684
|
+
@Channel("user-events")
|
|
685
|
+
Emitter<UserEvent> userEventEmitter;
|
|
686
|
+
|
|
687
|
+
public Uni<List<User>> findAll() {
|
|
688
|
+
return userRepository.listAll();
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
public Uni<User> findById(Long id) {
|
|
692
|
+
return userRepository.findById(id);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
public Uni<User> create(User user) {
|
|
696
|
+
return userRepository.persist(user)
|
|
697
|
+
.invoke(created -> {
|
|
698
|
+
// Emit event asynchronously
|
|
699
|
+
userEventEmitter.send(new UserCreatedEvent(created.id));
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
public Multi<User> streamActiveUsers() {
|
|
704
|
+
return Multi.createFrom().ticks().every(Duration.ofSeconds(5))
|
|
705
|
+
.flatMap(tick -> userRepository.findActive().toMulti());
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// Reactive HTTP client example
|
|
709
|
+
@Inject
|
|
710
|
+
@RestClient
|
|
711
|
+
ExternalApiClient externalApiClient;
|
|
712
|
+
|
|
713
|
+
public Uni<UserValidationResult> validateUserExternal(User user) {
|
|
714
|
+
return externalApiClient.validateUser(user)
|
|
715
|
+
.onFailure().retry().atMost(3)
|
|
716
|
+
.onFailure().recoverWithItem(UserValidationResult.failed("External validation failed"));
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// Reactive Repository
|
|
721
|
+
@ApplicationScoped
|
|
722
|
+
public class ReactiveUserRepository implements PanacheRepositoryBase<User, Long> {
|
|
723
|
+
|
|
724
|
+
public Uni<User> findByEmail(String email) {
|
|
725
|
+
return find("email", email).firstResult();
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
public Uni<List<User>> findActive() {
|
|
729
|
+
return find("active", true).list();
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
public Uni<Long> countByStatus(String status) {
|
|
733
|
+
return count("status", status);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// External API client
|
|
738
|
+
@RegisterRestClient(configKey = "external-api")
|
|
739
|
+
public interface ExternalApiClient {
|
|
740
|
+
|
|
741
|
+
@POST
|
|
742
|
+
@Path("/validate-user")
|
|
743
|
+
Uni<UserValidationResult> validateUser(User user);
|
|
744
|
+
|
|
745
|
+
@GET
|
|
746
|
+
@Path("/users/{id}/status")
|
|
747
|
+
Uni<UserStatus> getUserStatus(@PathParam("id") Long id);
|
|
748
|
+
}
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
### 3. Quarkus Native Compilation
|
|
752
|
+
|
|
753
|
+
```bash
|
|
754
|
+
# Build native executable
|
|
755
|
+
./mvnw package -Pnative
|
|
756
|
+
|
|
757
|
+
# Build native container image
|
|
758
|
+
./mvnw package -Pnative -Dquarkus.native.container-build=true
|
|
759
|
+
|
|
760
|
+
# Docker build for native
|
|
761
|
+
FROM quay.io/quarkus/ubi-quarkus-native-image:21.3-java17 AS build
|
|
762
|
+
COPY --chown=quarkus:quarkus mvnw /code/mvnw
|
|
763
|
+
COPY --chown=quarkus:quarkus .mvn /code/.mvn
|
|
764
|
+
COPY --chown=quarkus:quarkus pom.xml /code/
|
|
765
|
+
USER quarkus
|
|
766
|
+
WORKDIR /code
|
|
767
|
+
RUN ./mvnw dependency:go-offline -B
|
|
768
|
+
|
|
769
|
+
COPY src /code/src
|
|
770
|
+
RUN ./mvnw package -Pnative -DskipTests
|
|
771
|
+
|
|
772
|
+
FROM quay.io/quarkus/quarkus-micro-image:1.0
|
|
773
|
+
WORKDIR /work/
|
|
774
|
+
COPY --from=build /code/target/*-runner /work/application
|
|
775
|
+
|
|
776
|
+
EXPOSE 8080
|
|
777
|
+
USER 1001
|
|
778
|
+
|
|
779
|
+
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
### 4. Quarkus Configuration and Profiles
|
|
783
|
+
|
|
784
|
+
```properties
|
|
785
|
+
# application.properties
|
|
786
|
+
quarkus.application.name=user-service
|
|
787
|
+
quarkus.http.port=8080
|
|
788
|
+
|
|
789
|
+
# Database configuration
|
|
790
|
+
quarkus.datasource.db-kind=postgresql
|
|
791
|
+
quarkus.datasource.username=${DB_USERNAME:user}
|
|
792
|
+
quarkus.datasource.password=${DB_PASSWORD:password}
|
|
793
|
+
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/userdb
|
|
794
|
+
|
|
795
|
+
# Hibernate ORM
|
|
796
|
+
quarkus.hibernate-orm.database.generation=update
|
|
797
|
+
quarkus.hibernate-orm.log.sql=false
|
|
798
|
+
|
|
799
|
+
# Health checks
|
|
800
|
+
quarkus.smallrye-health.ui.enable=true
|
|
801
|
+
|
|
802
|
+
# Metrics
|
|
803
|
+
quarkus.micrometer.enabled=true
|
|
804
|
+
quarkus.micrometer.export.prometheus.enabled=true
|
|
805
|
+
|
|
806
|
+
# OpenAPI
|
|
807
|
+
quarkus.swagger-ui.always-include=true
|
|
808
|
+
|
|
809
|
+
# Native compilation
|
|
810
|
+
quarkus.native.additional-build-args=--initialize-at-run-time=org.apache.commons.logging.LogFactory
|
|
811
|
+
|
|
812
|
+
# Profile-specific configurations
|
|
813
|
+
%dev.quarkus.log.level=DEBUG
|
|
814
|
+
%dev.quarkus.hibernate-orm.log.sql=true
|
|
815
|
+
|
|
816
|
+
%test.quarkus.datasource.db-kind=h2
|
|
817
|
+
%test.quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb
|
|
818
|
+
|
|
819
|
+
%prod.quarkus.log.level=INFO
|
|
820
|
+
%prod.quarkus.datasource.jdbc.url=${DATABASE_URL}
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
## Service Mesh with Istio
|
|
824
|
+
|
|
825
|
+
### 1. Istio Configuration
|
|
826
|
+
|
|
827
|
+
```yaml
|
|
828
|
+
# User Service Deployment
|
|
829
|
+
apiVersion: apps/v1
|
|
830
|
+
kind: Deployment
|
|
831
|
+
metadata:
|
|
832
|
+
name: user-service
|
|
833
|
+
labels:
|
|
834
|
+
app: user-service
|
|
835
|
+
version: v1
|
|
836
|
+
spec:
|
|
837
|
+
replicas: 3
|
|
838
|
+
selector:
|
|
839
|
+
matchLabels:
|
|
840
|
+
app: user-service
|
|
841
|
+
version: v1
|
|
842
|
+
template:
|
|
843
|
+
metadata:
|
|
844
|
+
labels:
|
|
845
|
+
app: user-service
|
|
846
|
+
version: v1
|
|
847
|
+
annotations:
|
|
848
|
+
sidecar.istio.io/inject: "true"
|
|
849
|
+
spec:
|
|
850
|
+
containers:
|
|
851
|
+
- name: user-service
|
|
852
|
+
image: user-service:latest
|
|
853
|
+
ports:
|
|
854
|
+
- containerPort: 8080
|
|
855
|
+
env:
|
|
856
|
+
- name: SPRING_PROFILES_ACTIVE
|
|
857
|
+
value: "kubernetes"
|
|
858
|
+
|
|
859
|
+
---
|
|
860
|
+
# Service
|
|
861
|
+
apiVersion: v1
|
|
862
|
+
kind: Service
|
|
863
|
+
metadata:
|
|
864
|
+
name: user-service
|
|
865
|
+
labels:
|
|
866
|
+
app: user-service
|
|
867
|
+
spec:
|
|
868
|
+
ports:
|
|
869
|
+
- port: 80
|
|
870
|
+
targetPort: 8080
|
|
871
|
+
name: http
|
|
872
|
+
selector:
|
|
873
|
+
app: user-service
|
|
874
|
+
|
|
875
|
+
---
|
|
876
|
+
# Virtual Service
|
|
877
|
+
apiVersion: networking.istio.io/v1beta1
|
|
878
|
+
kind: VirtualService
|
|
879
|
+
metadata:
|
|
880
|
+
name: user-service
|
|
881
|
+
spec:
|
|
882
|
+
hosts:
|
|
883
|
+
- user-service
|
|
884
|
+
http:
|
|
885
|
+
- match:
|
|
886
|
+
- headers:
|
|
887
|
+
user-type:
|
|
888
|
+
exact: premium
|
|
889
|
+
route:
|
|
890
|
+
- destination:
|
|
891
|
+
host: user-service
|
|
892
|
+
subset: v2
|
|
893
|
+
weight: 100
|
|
894
|
+
- route:
|
|
895
|
+
- destination:
|
|
896
|
+
host: user-service
|
|
897
|
+
subset: v1
|
|
898
|
+
weight: 90
|
|
899
|
+
- destination:
|
|
900
|
+
host: user-service
|
|
901
|
+
subset: v2
|
|
902
|
+
weight: 10
|
|
903
|
+
|
|
904
|
+
---
|
|
905
|
+
# Destination Rule
|
|
906
|
+
apiVersion: networking.istio.io/v1beta1
|
|
907
|
+
kind: DestinationRule
|
|
908
|
+
metadata:
|
|
909
|
+
name: user-service
|
|
910
|
+
spec:
|
|
911
|
+
host: user-service
|
|
912
|
+
trafficPolicy:
|
|
913
|
+
circuitBreaker:
|
|
914
|
+
consecutiveErrors: 3
|
|
915
|
+
interval: 30s
|
|
916
|
+
baseEjectionTime: 30s
|
|
917
|
+
maxEjectionPercent: 50
|
|
918
|
+
loadBalancer:
|
|
919
|
+
simple: LEAST_CONN
|
|
920
|
+
subsets:
|
|
921
|
+
- name: v1
|
|
922
|
+
labels:
|
|
923
|
+
version: v1
|
|
924
|
+
- name: v2
|
|
925
|
+
labels:
|
|
926
|
+
version: v2
|
|
927
|
+
|
|
928
|
+
---
|
|
929
|
+
# Authorization Policy
|
|
930
|
+
apiVersion: security.istio.io/v1beta1
|
|
931
|
+
kind: AuthorizationPolicy
|
|
932
|
+
metadata:
|
|
933
|
+
name: user-service-authz
|
|
934
|
+
spec:
|
|
935
|
+
selector:
|
|
936
|
+
matchLabels:
|
|
937
|
+
app: user-service
|
|
938
|
+
rules:
|
|
939
|
+
- from:
|
|
940
|
+
- source:
|
|
941
|
+
principals: ["cluster.local/ns/default/sa/api-gateway"]
|
|
942
|
+
- to:
|
|
943
|
+
- operation:
|
|
944
|
+
methods: ["GET", "POST", "PUT", "DELETE"]
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
### 2. Observability with Istio
|
|
948
|
+
|
|
949
|
+
```java
|
|
950
|
+
// Custom metrics for Istio
|
|
951
|
+
@Component
|
|
952
|
+
public class IstioMetrics {
|
|
953
|
+
|
|
954
|
+
@EventListener
|
|
955
|
+
public void handleHttpRequest(HttpRequestEvent event) {
|
|
956
|
+
// Istio automatically collects these metrics
|
|
957
|
+
// Custom business metrics can be added
|
|
958
|
+
Metrics.counter("business.user.operations",
|
|
959
|
+
"operation", event.getOperation(),
|
|
960
|
+
"status", event.getStatus())
|
|
961
|
+
.increment();
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
// Distributed tracing configuration
|
|
966
|
+
@Configuration
|
|
967
|
+
public class TracingConfig {
|
|
968
|
+
|
|
969
|
+
@Bean
|
|
970
|
+
public JaegerTracer jaegerTracer() {
|
|
971
|
+
return Configuration.fromEnv("user-service")
|
|
972
|
+
.getTracer();
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
@Bean
|
|
976
|
+
public TracingFilter tracingFilter() {
|
|
977
|
+
return new TracingFilter(jaegerTracer());
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
```
|
|
981
|
+
|
|
982
|
+
## Event-Driven Architecture
|
|
983
|
+
|
|
984
|
+
### 1. Event Sourcing with Apache Kafka
|
|
985
|
+
|
|
986
|
+
```java
|
|
987
|
+
// Event Store
|
|
988
|
+
@Service
|
|
989
|
+
public class EventStore {
|
|
990
|
+
|
|
991
|
+
@Autowired
|
|
992
|
+
private KafkaTemplate<String, DomainEvent> kafkaTemplate;
|
|
993
|
+
|
|
994
|
+
public void saveEvent(DomainEvent event) {
|
|
995
|
+
String topic = getTopicForEvent(event);
|
|
996
|
+
String key = event.getAggregateId();
|
|
997
|
+
|
|
998
|
+
kafkaTemplate.send(topic, key, event)
|
|
999
|
+
.addCallback(
|
|
1000
|
+
result -> log.info("Event saved: {}", event),
|
|
1001
|
+
failure -> log.error("Failed to save event: {}", event, failure)
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
private String getTopicForEvent(DomainEvent event) {
|
|
1006
|
+
return "events." + event.getClass().getSimpleName().toLowerCase();
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
// Event Handlers
|
|
1011
|
+
@Component
|
|
1012
|
+
public class UserEventHandler {
|
|
1013
|
+
|
|
1014
|
+
@KafkaListener(topics = "events.usercreated", groupId = "user-projection")
|
|
1015
|
+
public void handleUserCreated(UserCreatedEvent event) {
|
|
1016
|
+
log.info("Handling user created event: {}", event);
|
|
1017
|
+
// Update read models, send notifications, etc.
|
|
1018
|
+
updateUserProjection(event);
|
|
1019
|
+
sendWelcomeEmail(event);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
@KafkaListener(topics = "events.userupdated", groupId = "user-projection")
|
|
1023
|
+
public void handleUserUpdated(UserUpdatedEvent event) {
|
|
1024
|
+
log.info("Handling user updated event: {}", event);
|
|
1025
|
+
updateUserProjection(event);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
@KafkaListener(topics = "events.userdeleted", groupId = "user-projection")
|
|
1029
|
+
public void handleUserDeleted(UserDeletedEvent event) {
|
|
1030
|
+
log.info("Handling user deleted event: {}", event);
|
|
1031
|
+
removeUserProjection(event);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
private void updateUserProjection(UserEvent event) {
|
|
1035
|
+
// Update read model
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
private void sendWelcomeEmail(UserCreatedEvent event) {
|
|
1039
|
+
// Send welcome email
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
private void removeUserProjection(UserDeletedEvent event) {
|
|
1043
|
+
// Remove from read model
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// Saga Pattern for distributed transactions
|
|
1048
|
+
@Component
|
|
1049
|
+
public class OrderSaga {
|
|
1050
|
+
|
|
1051
|
+
@SagaOrchestrationStart
|
|
1052
|
+
@KafkaListener(topics = "commands.createorder", groupId = "order-saga")
|
|
1053
|
+
public void handleCreateOrder(CreateOrderCommand command) {
|
|
1054
|
+
// Step 1: Reserve inventory
|
|
1055
|
+
publishCommand(new ReserveInventoryCommand(command.getOrderId(), command.getItems()));
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
@SagaOrchestrationStep
|
|
1059
|
+
@KafkaListener(topics = "events.inventoryreserved", groupId = "order-saga")
|
|
1060
|
+
public void handleInventoryReserved(InventoryReservedEvent event) {
|
|
1061
|
+
// Step 2: Process payment
|
|
1062
|
+
publishCommand(new ProcessPaymentCommand(event.getOrderId(), event.getAmount()));
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
@SagaOrchestrationStep
|
|
1066
|
+
@KafkaListener(topics = "events.paymentprocessed", groupId = "order-saga")
|
|
1067
|
+
public void handlePaymentProcessed(PaymentProcessedEvent event) {
|
|
1068
|
+
// Step 3: Confirm order
|
|
1069
|
+
publishCommand(new ConfirmOrderCommand(event.getOrderId()));
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
@SagaOrchestrationCompensation
|
|
1073
|
+
@KafkaListener(topics = "events.paymentfailed", groupId = "order-saga")
|
|
1074
|
+
public void handlePaymentFailed(PaymentFailedEvent event) {
|
|
1075
|
+
// Compensate: Release inventory
|
|
1076
|
+
publishCommand(new ReleaseInventoryCommand(event.getOrderId()));
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
### 2. CQRS Implementation
|
|
1082
|
+
|
|
1083
|
+
```java
|
|
1084
|
+
// Command Side
|
|
1085
|
+
@RestController
|
|
1086
|
+
@RequestMapping("/api/users/commands")
|
|
1087
|
+
public class UserCommandController {
|
|
1088
|
+
|
|
1089
|
+
@Autowired
|
|
1090
|
+
private CommandBus commandBus;
|
|
1091
|
+
|
|
1092
|
+
@PostMapping
|
|
1093
|
+
public ResponseEntity<String> createUser(@RequestBody CreateUserCommand command) {
|
|
1094
|
+
String userId = commandBus.send(command);
|
|
1095
|
+
return ResponseEntity.status(HttpStatus.ACCEPTED)
|
|
1096
|
+
.body(userId);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
@PutMapping("/{id}")
|
|
1100
|
+
public ResponseEntity<Void> updateUser(@PathVariable String id,
|
|
1101
|
+
@RequestBody UpdateUserCommand command) {
|
|
1102
|
+
command.setUserId(id);
|
|
1103
|
+
commandBus.send(command);
|
|
1104
|
+
return ResponseEntity.accepted().build();
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
// Query Side
|
|
1109
|
+
@RestController
|
|
1110
|
+
@RequestMapping("/api/users/queries")
|
|
1111
|
+
public class UserQueryController {
|
|
1112
|
+
|
|
1113
|
+
@Autowired
|
|
1114
|
+
private QueryBus queryBus;
|
|
1115
|
+
|
|
1116
|
+
@GetMapping("/{id}")
|
|
1117
|
+
public ResponseEntity<UserView> getUser(@PathVariable String id) {
|
|
1118
|
+
GetUserQuery query = new GetUserQuery(id);
|
|
1119
|
+
UserView user = queryBus.send(query);
|
|
1120
|
+
return ResponseEntity.ok(user);
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
@GetMapping
|
|
1124
|
+
public ResponseEntity<List<UserView>> getUsers(@RequestParam(defaultValue = "0") int page,
|
|
1125
|
+
@RequestParam(defaultValue = "20") int size) {
|
|
1126
|
+
GetUsersQuery query = new GetUsersQuery(page, size);
|
|
1127
|
+
List<UserView> users = queryBus.send(query);
|
|
1128
|
+
return ResponseEntity.ok(users);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
// Command Handlers
|
|
1133
|
+
@Component
|
|
1134
|
+
public class UserCommandHandler {
|
|
1135
|
+
|
|
1136
|
+
@Autowired
|
|
1137
|
+
private UserRepository userRepository;
|
|
1138
|
+
|
|
1139
|
+
@Autowired
|
|
1140
|
+
private EventStore eventStore;
|
|
1141
|
+
|
|
1142
|
+
@CommandHandler
|
|
1143
|
+
public String handle(CreateUserCommand command) {
|
|
1144
|
+
User user = User.create(command.getEmail(), command.getFirstName(), command.getLastName());
|
|
1145
|
+
|
|
1146
|
+
userRepository.save(user);
|
|
1147
|
+
|
|
1148
|
+
UserCreatedEvent event = new UserCreatedEvent(
|
|
1149
|
+
user.getId(),
|
|
1150
|
+
user.getEmail(),
|
|
1151
|
+
user.getFirstName(),
|
|
1152
|
+
user.getLastName()
|
|
1153
|
+
);
|
|
1154
|
+
eventStore.saveEvent(event);
|
|
1155
|
+
|
|
1156
|
+
return user.getId();
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
@CommandHandler
|
|
1160
|
+
public void handle(UpdateUserCommand command) {
|
|
1161
|
+
User user = userRepository.findById(command.getUserId())
|
|
1162
|
+
.orElseThrow(() -> new UserNotFoundException(command.getUserId()));
|
|
1163
|
+
|
|
1164
|
+
user.update(command.getFirstName(), command.getLastName());
|
|
1165
|
+
userRepository.save(user);
|
|
1166
|
+
|
|
1167
|
+
UserUpdatedEvent event = new UserUpdatedEvent(
|
|
1168
|
+
user.getId(),
|
|
1169
|
+
user.getFirstName(),
|
|
1170
|
+
user.getLastName()
|
|
1171
|
+
);
|
|
1172
|
+
eventStore.saveEvent(event);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
// Query Handlers
|
|
1177
|
+
@Component
|
|
1178
|
+
public class UserQueryHandler {
|
|
1179
|
+
|
|
1180
|
+
@Autowired
|
|
1181
|
+
private UserViewRepository userViewRepository;
|
|
1182
|
+
|
|
1183
|
+
@QueryHandler
|
|
1184
|
+
public UserView handle(GetUserQuery query) {
|
|
1185
|
+
return userViewRepository.findById(query.getUserId())
|
|
1186
|
+
.orElseThrow(() -> new UserNotFoundException(query.getUserId()));
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
@QueryHandler
|
|
1190
|
+
public List<UserView> handle(GetUsersQuery query) {
|
|
1191
|
+
Pageable pageable = PageRequest.of(query.getPage(), query.getSize());
|
|
1192
|
+
return userViewRepository.findAll(pageable).getContent();
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
## Claude Flow Integration for Microservices
|
|
1198
|
+
|
|
1199
|
+
### 1. Microservices Development Workflow
|
|
1200
|
+
|
|
1201
|
+
```bash
|
|
1202
|
+
# Design microservices architecture
|
|
1203
|
+
npx claude-flow sparc run architect "Design Spring Cloud microservices architecture with service discovery"
|
|
1204
|
+
|
|
1205
|
+
# Generate individual services
|
|
1206
|
+
npx claude-flow sparc batch coder,tester "Create user microservice with Spring Boot and JPA"
|
|
1207
|
+
npx claude-flow sparc batch coder,tester "Create order microservice with Spring Boot and Kafka"
|
|
1208
|
+
npx claude-flow sparc batch coder,tester "Create notification microservice with Quarkus"
|
|
1209
|
+
|
|
1210
|
+
# Setup infrastructure components
|
|
1211
|
+
npx claude-flow sparc run coder "Create API Gateway with Spring Cloud Gateway"
|
|
1212
|
+
npx claude-flow sparc run coder "Setup Eureka service discovery"
|
|
1213
|
+
npx claude-flow sparc run coder "Configure Spring Cloud Config server"
|
|
1214
|
+
|
|
1215
|
+
# Implement cross-cutting concerns
|
|
1216
|
+
npx claude-flow sparc batch coder,reviewer "Add distributed tracing with Sleuth and Zipkin"
|
|
1217
|
+
npx claude-flow sparc batch coder,reviewer "Implement circuit breakers with Resilience4j"
|
|
1218
|
+
|
|
1219
|
+
# Create deployment manifests
|
|
1220
|
+
npx claude-flow sparc run architect "Create Kubernetes deployment manifests for microservices"
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1223
|
+
### 2. MCP Integration for Distributed Systems
|
|
1224
|
+
|
|
1225
|
+
```bash
|
|
1226
|
+
# Initialize microservices development swarm
|
|
1227
|
+
npx claude-flow mcp swarm_init --topology mesh --max-agents 12
|
|
1228
|
+
|
|
1229
|
+
# Spawn microservices specialists
|
|
1230
|
+
npx claude-flow mcp agent_spawn --type architect --capabilities "microservices,spring-cloud,service-mesh"
|
|
1231
|
+
npx claude-flow mcp agent_spawn --type coder --capabilities "spring-boot,spring-cloud-gateway"
|
|
1232
|
+
npx claude-flow mcp agent_spawn --type coder --capabilities "quarkus,reactive,native"
|
|
1233
|
+
npx claude-flow mcp agent_spawn --type tester --capabilities "integration-testing,contract-testing"
|
|
1234
|
+
npx claude-flow mcp agent_spawn --type reviewer --capabilities "distributed-systems,performance"
|
|
1235
|
+
|
|
1236
|
+
# Spawn infrastructure specialists
|
|
1237
|
+
npx claude-flow mcp agent_spawn --type architect --capabilities "kubernetes,istio,helm"
|
|
1238
|
+
npx claude-flow mcp agent_spawn --type coder --capabilities "kafka,event-sourcing,cqrs"
|
|
1239
|
+
npx claude-flow mcp agent_spawn --type monitor --capabilities "prometheus,grafana,jaeger"
|
|
1240
|
+
|
|
1241
|
+
# Orchestrate microservices development
|
|
1242
|
+
npx claude-flow mcp task_orchestrate --task "Build complete microservices ecosystem" --strategy hierarchical
|
|
1243
|
+
```
|
|
1244
|
+
|
|
1245
|
+
## Monitoring and Observability
|
|
1246
|
+
|
|
1247
|
+
### 1. Metrics and Monitoring
|
|
1248
|
+
|
|
1249
|
+
```java
|
|
1250
|
+
// Custom metrics for microservices
|
|
1251
|
+
@Component
|
|
1252
|
+
public class MicroserviceMetrics {
|
|
1253
|
+
|
|
1254
|
+
private final MeterRegistry meterRegistry;
|
|
1255
|
+
private final Counter serviceCallCounter;
|
|
1256
|
+
private final Timer serviceCallTimer;
|
|
1257
|
+
private final Gauge activeConnectionsGauge;
|
|
1258
|
+
|
|
1259
|
+
public MicroserviceMetrics(MeterRegistry meterRegistry, ConnectionPool connectionPool) {
|
|
1260
|
+
this.meterRegistry = meterRegistry;
|
|
1261
|
+
|
|
1262
|
+
this.serviceCallCounter = Counter.builder("microservice.calls.total")
|
|
1263
|
+
.description("Total service calls")
|
|
1264
|
+
.register(meterRegistry);
|
|
1265
|
+
|
|
1266
|
+
this.serviceCallTimer = Timer.builder("microservice.call.duration")
|
|
1267
|
+
.description("Service call duration")
|
|
1268
|
+
.register(meterRegistry);
|
|
1269
|
+
|
|
1270
|
+
this.activeConnectionsGauge = Gauge.builder("microservice.connections.active")
|
|
1271
|
+
.description("Active connections")
|
|
1272
|
+
.register(meterRegistry, connectionPool, ConnectionPool::getActiveCount);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
@EventListener
|
|
1276
|
+
public void handleServiceCall(ServiceCallEvent event) {
|
|
1277
|
+
serviceCallCounter.increment(
|
|
1278
|
+
Tags.of(
|
|
1279
|
+
Tag.of("service", event.getServiceName()),
|
|
1280
|
+
Tag.of("method", event.getMethod()),
|
|
1281
|
+
Tag.of("status", event.getStatus())
|
|
1282
|
+
)
|
|
1283
|
+
);
|
|
1284
|
+
|
|
1285
|
+
serviceCallTimer.record(event.getDuration(), TimeUnit.MILLISECONDS);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
// Health checks for microservices
|
|
1290
|
+
@Component
|
|
1291
|
+
public class MicroserviceHealthIndicator implements HealthIndicator {
|
|
1292
|
+
|
|
1293
|
+
@Autowired
|
|
1294
|
+
private List<ExternalServiceClient> externalClients;
|
|
1295
|
+
|
|
1296
|
+
@Override
|
|
1297
|
+
public Health health() {
|
|
1298
|
+
Health.Builder builder = Health.up();
|
|
1299
|
+
|
|
1300
|
+
for (ExternalServiceClient client : externalClients) {
|
|
1301
|
+
try {
|
|
1302
|
+
boolean isHealthy = client.healthCheck();
|
|
1303
|
+
if (isHealthy) {
|
|
1304
|
+
builder.withDetail(client.getServiceName(), "UP");
|
|
1305
|
+
} else {
|
|
1306
|
+
builder.down().withDetail(client.getServiceName(), "DOWN");
|
|
1307
|
+
}
|
|
1308
|
+
} catch (Exception e) {
|
|
1309
|
+
builder.down().withDetail(client.getServiceName(), "ERROR: " + e.getMessage());
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
return builder.build();
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
```
|
|
1317
|
+
|
|
1318
|
+
### 2. Distributed Logging
|
|
1319
|
+
|
|
1320
|
+
```java
|
|
1321
|
+
// Structured logging for microservices
|
|
1322
|
+
@Component
|
|
1323
|
+
public class StructuredLogger {
|
|
1324
|
+
|
|
1325
|
+
private final Logger logger = LoggerFactory.getLogger(StructuredLogger.class);
|
|
1326
|
+
private final ObjectMapper objectMapper = new ObjectMapper();
|
|
1327
|
+
|
|
1328
|
+
public void logServiceCall(String service, String method, long duration, String status) {
|
|
1329
|
+
try {
|
|
1330
|
+
Map<String, Object> logData = Map.of(
|
|
1331
|
+
"timestamp", Instant.now().toString(),
|
|
1332
|
+
"service", service,
|
|
1333
|
+
"method", method,
|
|
1334
|
+
"duration", duration,
|
|
1335
|
+
"status", status,
|
|
1336
|
+
"traceId", getCurrentTraceId(),
|
|
1337
|
+
"spanId", getCurrentSpanId()
|
|
1338
|
+
);
|
|
1339
|
+
|
|
1340
|
+
logger.info("SERVICE_CALL {}", objectMapper.writeValueAsString(logData));
|
|
1341
|
+
} catch (Exception e) {
|
|
1342
|
+
logger.error("Failed to log service call", e);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
public void logBusinessEvent(String eventType, Map<String, Object> eventData) {
|
|
1347
|
+
try {
|
|
1348
|
+
Map<String, Object> logData = new HashMap<>(eventData);
|
|
1349
|
+
logData.put("timestamp", Instant.now().toString());
|
|
1350
|
+
logData.put("eventType", eventType);
|
|
1351
|
+
logData.put("traceId", getCurrentTraceId());
|
|
1352
|
+
|
|
1353
|
+
logger.info("BUSINESS_EVENT {}", objectMapper.writeValueAsString(logData));
|
|
1354
|
+
} catch (Exception e) {
|
|
1355
|
+
logger.error("Failed to log business event", e);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
private String getCurrentTraceId() {
|
|
1360
|
+
// Get trace ID from Sleuth/Brave context
|
|
1361
|
+
TraceContext traceContext = CurrentTraceContext.current();
|
|
1362
|
+
return traceContext != null ? traceContext.traceIdString() : "unknown";
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
private String getCurrentSpanId() {
|
|
1366
|
+
// Get span ID from Sleuth/Brave context
|
|
1367
|
+
TraceContext traceContext = CurrentTraceContext.current();
|
|
1368
|
+
return traceContext != null ? traceContext.spanIdString() : "unknown";
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
```
|
|
1372
|
+
|
|
1373
|
+
## Security in Microservices
|
|
1374
|
+
|
|
1375
|
+
### 1. JWT Token Propagation
|
|
1376
|
+
|
|
1377
|
+
```java
|
|
1378
|
+
// JWT Token interceptor
|
|
1379
|
+
@Component
|
|
1380
|
+
public class JwtTokenInterceptor implements ClientHttpRequestInterceptor {
|
|
1381
|
+
|
|
1382
|
+
@Override
|
|
1383
|
+
public ClientHttpResponse intercept(
|
|
1384
|
+
HttpRequest request,
|
|
1385
|
+
byte[] body,
|
|
1386
|
+
ClientHttpRequestExecution execution) throws IOException {
|
|
1387
|
+
|
|
1388
|
+
String token = getCurrentJwtToken();
|
|
1389
|
+
if (token != null) {
|
|
1390
|
+
request.getHeaders().add("Authorization", "Bearer " + token);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
return execution.execute(request, body);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
private String getCurrentJwtToken() {
|
|
1397
|
+
SecurityContext context = SecurityContextHolder.getContext();
|
|
1398
|
+
Authentication auth = context.getAuthentication();
|
|
1399
|
+
|
|
1400
|
+
if (auth instanceof JwtAuthenticationToken) {
|
|
1401
|
+
JwtAuthenticationToken jwtAuth = (JwtAuthenticationToken) auth;
|
|
1402
|
+
return jwtAuth.getToken().getTokenValue();
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
return null;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
// WebClient configuration with token propagation
|
|
1410
|
+
@Configuration
|
|
1411
|
+
public class WebClientConfig {
|
|
1412
|
+
|
|
1413
|
+
@Bean
|
|
1414
|
+
public WebClient.Builder webClientBuilder() {
|
|
1415
|
+
return WebClient.builder()
|
|
1416
|
+
.filter(exchangeFilterFunction());
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
private ExchangeFilterFunction exchangeFilterFunction() {
|
|
1420
|
+
return ExchangeFilterFunction.ofRequestProcessor(clientRequest -> {
|
|
1421
|
+
String token = getCurrentJwtToken();
|
|
1422
|
+
if (token != null) {
|
|
1423
|
+
ClientRequest newRequest = ClientRequest.from(clientRequest)
|
|
1424
|
+
.header("Authorization", "Bearer " + token)
|
|
1425
|
+
.build();
|
|
1426
|
+
return Mono.just(newRequest);
|
|
1427
|
+
}
|
|
1428
|
+
return Mono.just(clientRequest);
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
```
|
|
1433
|
+
|
|
1434
|
+
### 2. Service-to-Service Authentication
|
|
1435
|
+
|
|
1436
|
+
```java
|
|
1437
|
+
// OAuth2 client configuration
|
|
1438
|
+
@Configuration
|
|
1439
|
+
@EnableWebFluxSecurity
|
|
1440
|
+
public class SecurityConfig {
|
|
1441
|
+
|
|
1442
|
+
@Bean
|
|
1443
|
+
public ReactiveClientRegistrationRepository clientRegistrationRepository() {
|
|
1444
|
+
return new InMemoryReactiveClientRegistrationRepository(
|
|
1445
|
+
ClientRegistration.withRegistrationId("user-service")
|
|
1446
|
+
.tokenUri("http://auth-service/oauth/token")
|
|
1447
|
+
.clientId("user-service-client")
|
|
1448
|
+
.clientSecret("user-service-secret")
|
|
1449
|
+
.authorizationGrantType(AuthorizationGrantType.CLIENT_CREDENTIALS)
|
|
1450
|
+
.build()
|
|
1451
|
+
);
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
@Bean
|
|
1455
|
+
public ReactiveOAuth2AuthorizedClientManager authorizedClientManager(
|
|
1456
|
+
ReactiveClientRegistrationRepository clientRegistrationRepository) {
|
|
1457
|
+
|
|
1458
|
+
ReactiveOAuth2AuthorizedClientProvider authorizedClientProvider =
|
|
1459
|
+
ReactiveOAuth2AuthorizedClientProviderBuilder.builder()
|
|
1460
|
+
.clientCredentials()
|
|
1461
|
+
.build();
|
|
1462
|
+
|
|
1463
|
+
DefaultReactiveOAuth2AuthorizedClientManager authorizedClientManager =
|
|
1464
|
+
new DefaultReactiveOAuth2AuthorizedClientManager(
|
|
1465
|
+
clientRegistrationRepository,
|
|
1466
|
+
new InMemoryReactiveOAuth2AuthorizedClientService(clientRegistrationRepository));
|
|
1467
|
+
|
|
1468
|
+
authorizedClientManager.setAuthorizedClientProvider(authorizedClientProvider);
|
|
1469
|
+
|
|
1470
|
+
return authorizedClientManager;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
## Testing Microservices
|
|
1476
|
+
|
|
1477
|
+
### 1. Contract Testing with Spring Cloud Contract
|
|
1478
|
+
|
|
1479
|
+
```groovy
|
|
1480
|
+
// User service contract
|
|
1481
|
+
Contract.make {
|
|
1482
|
+
description "should return user by ID"
|
|
1483
|
+
request {
|
|
1484
|
+
method GET()
|
|
1485
|
+
url "/api/users/1"
|
|
1486
|
+
headers {
|
|
1487
|
+
contentType(applicationJson())
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
response {
|
|
1491
|
+
status OK()
|
|
1492
|
+
body([
|
|
1493
|
+
id: 1,
|
|
1494
|
+
email: "john.doe@example.com",
|
|
1495
|
+
firstName: "John",
|
|
1496
|
+
lastName: "Doe"
|
|
1497
|
+
])
|
|
1498
|
+
headers {
|
|
1499
|
+
contentType(applicationJson())
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
// Contract test base class
|
|
1505
|
+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK)
|
|
1506
|
+
public abstract class UserServiceContractTestBase {
|
|
1507
|
+
|
|
1508
|
+
@Autowired
|
|
1509
|
+
private WebApplicationContext context;
|
|
1510
|
+
|
|
1511
|
+
@MockBean
|
|
1512
|
+
private UserService userService;
|
|
1513
|
+
|
|
1514
|
+
@BeforeEach
|
|
1515
|
+
public void setup() {
|
|
1516
|
+
RestAssuredMockMvc.webAppContextSetup(context);
|
|
1517
|
+
|
|
1518
|
+
// Setup mock data
|
|
1519
|
+
User user = User.builder()
|
|
1520
|
+
.id(1L)
|
|
1521
|
+
.email("john.doe@example.com")
|
|
1522
|
+
.firstName("John")
|
|
1523
|
+
.lastName("Doe")
|
|
1524
|
+
.build();
|
|
1525
|
+
|
|
1526
|
+
when(userService.findById(1L)).thenReturn(Optional.of(user));
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
```
|
|
1530
|
+
|
|
1531
|
+
### 2. Integration Testing with TestContainers
|
|
1532
|
+
|
|
1533
|
+
```java
|
|
1534
|
+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
1535
|
+
@Testcontainers
|
|
1536
|
+
class MicroserviceIntegrationTest {
|
|
1537
|
+
|
|
1538
|
+
@Container
|
|
1539
|
+
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:15");
|
|
1540
|
+
|
|
1541
|
+
@Container
|
|
1542
|
+
static KafkaContainer kafka = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:latest"));
|
|
1543
|
+
|
|
1544
|
+
@Container
|
|
1545
|
+
static GenericContainer<?> redis = new GenericContainer<>("redis:7-alpine")
|
|
1546
|
+
.withExposedPorts(6379);
|
|
1547
|
+
|
|
1548
|
+
@DynamicPropertySource
|
|
1549
|
+
static void configureProperties(DynamicPropertyRegistry registry) {
|
|
1550
|
+
registry.add("spring.datasource.url", postgres::getJdbcUrl);
|
|
1551
|
+
registry.add("spring.datasource.username", postgres::getUsername);
|
|
1552
|
+
registry.add("spring.datasource.password", postgres::getPassword);
|
|
1553
|
+
|
|
1554
|
+
registry.add("spring.kafka.bootstrap-servers", kafka::getBootstrapServers);
|
|
1555
|
+
|
|
1556
|
+
registry.add("spring.redis.host", redis::getHost);
|
|
1557
|
+
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
@Test
|
|
1561
|
+
void shouldProcessUserCreationEndToEnd() {
|
|
1562
|
+
// Test complete user creation flow including:
|
|
1563
|
+
// - REST API call
|
|
1564
|
+
// - Database persistence
|
|
1565
|
+
// - Kafka event publishing
|
|
1566
|
+
// - Redis caching
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
```
|
|
1570
|
+
|
|
1571
|
+
## Best Practices
|
|
1572
|
+
|
|
1573
|
+
### 1. Data Management
|
|
1574
|
+
|
|
1575
|
+
- **Database per Service**: Each microservice owns its data
|
|
1576
|
+
- **Eventual Consistency**: Accept eventual consistency between services
|
|
1577
|
+
- **Event Sourcing**: Store events rather than current state
|
|
1578
|
+
- **CQRS**: Separate read and write models
|
|
1579
|
+
|
|
1580
|
+
### 2. Communication Patterns
|
|
1581
|
+
|
|
1582
|
+
- **Synchronous**: REST, GraphQL for real-time queries
|
|
1583
|
+
- **Asynchronous**: Message queues for loose coupling
|
|
1584
|
+
- **Circuit Breakers**: Prevent cascade failures
|
|
1585
|
+
- **Timeouts**: Set appropriate timeouts for all calls
|
|
1586
|
+
|
|
1587
|
+
### 3. Deployment Strategies
|
|
1588
|
+
|
|
1589
|
+
- **Blue-Green Deployment**: Zero-downtime deployments
|
|
1590
|
+
- **Canary Deployment**: Gradual rollout to subset of users
|
|
1591
|
+
- **Rolling Updates**: Update instances one by one
|
|
1592
|
+
- **Feature Flags**: Control feature rollout independently
|
|
1593
|
+
|
|
1594
|
+
## Next Steps
|
|
1595
|
+
|
|
1596
|
+
- [Claude Flow Agent Coordination](claude-flow-integration.md)
|
|
1597
|
+
- [Spring Boot Development](spring-boot.md)
|
|
1598
|
+
- [Enterprise Java Development](enterprise-java.md)
|
|
1599
|
+
- [Performance Optimization](performance.md)
|
|
1600
|
+
- [Testing Strategies](testing.md)
|