claude-flow-novice 1.6.4 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/parse-epic.js +180 -0
- package/.claude/settings.local.json +2 -1
- package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +37 -2
- package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +45 -0
- package/.claude-flow-novice/dist/mcp/transports/base.js +5 -0
- package/.claude-flow-novice/dist/mcp/transports/base.js.map +1 -0
- package/.claude-flow-novice/dist/mcp/transports/http.js +414 -0
- package/.claude-flow-novice/dist/mcp/transports/http.js.map +1 -0
- package/.claude-flow-novice/dist/mcp/transports/stdio.js +217 -0
- package/.claude-flow-novice/dist/mcp/transports/stdio.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js +129 -0
- package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/index.js +3 -0
- package/.claude-flow-novice/dist/src/cli/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/utils/epic-parser.js +266 -0
- package/.claude-flow-novice/dist/src/cli/utils/epic-parser.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/message-bus.js +105 -2
- package/.claude-flow-novice/dist/src/communication/message-bus.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js +1 -1
- package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/artifact-cache-optimizer.js +632 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/artifact-cache-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/index.js +11 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/checkpoints/checkpoint-compressor.js +318 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/checkpoints/checkpoint-compressor.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/completion-detector.js +234 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/completion-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/hierarchical-detector.js +347 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/hierarchical-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/index.js +13 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/lamport-clock.js +173 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/lamport-clock.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/mesh-detector.js +526 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/mesh-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/sdk-completion-detector.js +443 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/sdk-completion-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/swarm-shutdown.js +366 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/swarm-shutdown.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.js +287 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.js +364 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.js +492 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/hierarchical-coordinator.js +786 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/hierarchical-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/index.js +16 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/parent-child-manager.js +342 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/parent-child-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/swarm-coordinator-v2.js +601 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/swarm-coordinator-v2.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/agent-state.js +9 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/agent-state.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dead-letter-queue.js +413 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dead-letter-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-graph.js +471 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-graph.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-node.js +379 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-node.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-resolver.js +335 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-resolver.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/help-request-metrics.js +211 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/help-request-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/index.js +33 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-broker.js +920 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-broker.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-router.js +385 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-router.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message.js +138 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/resource-manager-safe.js +478 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/resource-manager-safe.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine-config.js +358 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine-config.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine.js +588 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.js +153 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.js +360 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/topic-manager.js +337 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/topic-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/deadlock-detector.js +424 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/deadlock-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/index.js +9 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/resource-manager.js +669 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/resource-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/artifact-storage.js +451 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/artifact-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/cycle-detector.js +271 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/cycle-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-graph.js +335 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-graph.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-manager.js +439 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-request.js +92 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-request.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/index.js +21 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/topological-sort.js +223 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/topological-sort.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-coordinator.js +436 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-matcher.js +278 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-matcher.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request-handler.js +317 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request-handler.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request.js +273 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/index.js +15 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/waiting-agent-pool.js +512 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/waiting-agent-pool.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/index.js +67 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/help-deadlock-integration.js +557 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/help-deadlock-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.example.js +212 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.example.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.js +552 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/state-machine-integration.js +635 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/state-machine-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/IArtifactStorage.js +28 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/IArtifactStorage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ICoordinator.js +9 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ICoordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ISessionStore.js +25 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ISessionStore.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/artifact-adapter.js +308 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/artifact-adapter.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.js +439 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-graph-storage.js +540 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-graph-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-storage.js +367 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/message-storage.js +518 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/message-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.js +377 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channel.js +371 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.js +355 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/help-channel.js +424 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/help-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/index.js +16 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/state-channel.js +295 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/state-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/task-channel.js +411 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/task-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-bus.js +387 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-persistence.js +589 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-persistence.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-router.js +444 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-router.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/artifact-storage.js +560 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/artifact-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/background-orchestrator.js +335 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/background-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/bash-output-monitor.js +104 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/bash-output-monitor.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/checkpoint-manager.js +847 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/checkpoint-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/help-coordinator.js +470 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/help-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.js +450 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/index.js +13 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/message-bus-integration.js +625 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/message-bus-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/multi-level-control.js +545 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/multi-level-control.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-controller.js +740 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-controller.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-message-integration.js +415 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-message-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/session-pool-optimizer.js +615 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/session-pool-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-machine-integration.js +547 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-machine-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-sdk-integration.js +342 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-sdk-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/security/payload-validator.js +259 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/security/payload-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/framework-registry.js +273 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/framework-registry.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/index.js +8 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-config-manager.js +310 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-config-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-validator.js +218 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/types/sdk.js +9 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/types/sdk.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/index.js +6 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/priority-queue.js +145 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/priority-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/sdk-helpers.js +122 -0
- package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/sdk-helpers.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/config-translator.js +17 -43
- package/.claude-flow-novice/dist/src/coordination/config-translator.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js +34 -76
- package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js +172 -0
- package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/core/index.js +7 -0
- package/.claude-flow-novice/dist/src/coordination/shared/core/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/index.js +19 -0
- package/.claude-flow-novice/dist/src/coordination/shared/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js +24 -0
- package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js +7 -0
- package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js +920 -0
- package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/message.js +138 -0
- package/.claude-flow-novice/dist/src/coordination/shared/message.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js +259 -0
- package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js +17 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js +19 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js +357 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js +679 -0
- package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/types/index.js +7 -0
- package/.claude-flow-novice/dist/src/coordination/shared/types/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js +10 -0
- package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js.map +1 -0
- package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js +52 -2
- package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js.map +1 -1
- package/.claude-flow-novice/dist/src/mcp/mcp-server-novice.js +37 -2
- package/.claude-flow-novice/dist/src/mcp/session-manager.js +3 -1
- package/.claude-flow-novice/dist/src/mcp/session-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/providers/provider-manager.js +36 -3
- package/.claude-flow-novice/dist/src/providers/provider-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js +65 -41
- package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js.map +1 -1
- package/.claude-flow-novice/dist/src/web/api/server.js +1 -1
- package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -1
- package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js +30 -0
- package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js.map +1 -1
- package/.claude-flow-novice/metrics.db-shm +0 -0
- package/.claude-flow-novice/metrics.db-wal +0 -0
- package/config/.env.example +178 -0
- package/config/DEPLOYMENT_GUIDE.md +692 -0
- package/config/README-CONFIG.md +331 -0
- package/config/coordination-config.sh +327 -0
- package/config/docker/env.development +53 -0
- package/config/docker/env.production +83 -0
- package/config/docker/env.staging +70 -0
- package/config/k8s/configmap-development.yaml +60 -0
- package/config/k8s/configmap-production.yaml +85 -0
- package/config/k8s/configmap-staging.yaml +76 -0
- package/config/k8s/secret-production.yaml +62 -0
- package/config/k8s/secret-staging.yaml +36 -0
- package/package.json +2 -2
- package/scripts/monitoring/alert-monitor.sh +220 -0
- package/scripts/monitoring/dashboards/rate-limiting-dashboard.json +211 -0
- package/scripts/monitoring/quick-test-alerting.sh +118 -0
- package/scripts/monitoring/quick-test-rate-limiting.sh +206 -0
- package/scripts/monitoring/rate-limiting-monitor.sh +380 -0
- package/scripts/monitoring/view-alerts.sh +307 -0
- package/scripts/test-zai-api.cjs +2 -2
- package/src/slash-commands/parse-epic.js +1 -1
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
# Production Deployment Guide - Claude Flow Novice
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This guide covers deployment configurations for Claude Flow Novice across development, staging, and production environments with support for 10 to 500 concurrent agents.
|
|
6
|
+
|
|
7
|
+
## Environment Scenarios
|
|
8
|
+
|
|
9
|
+
| Environment | Max Agents | Shards | Memory | Log Level | Alerting | Use Case |
|
|
10
|
+
|-------------|------------|--------|---------|-----------|----------|----------|
|
|
11
|
+
| **Development** | 10 | 4 | 2GB | debug | disabled | Local testing, debugging |
|
|
12
|
+
| **Staging** | 100 | 16 | 10GB | info | enabled | Pre-production validation, chaos testing |
|
|
13
|
+
| **Production** | 500 | 32 | 50GB | warn | enabled | Production workloads, high-scale coordination |
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Docker Deployment
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
|
|
21
|
+
- Docker Engine 20.10+
|
|
22
|
+
- Docker Compose v2+
|
|
23
|
+
- 2GB RAM (development) / 10GB RAM (staging) / 50GB RAM (production)
|
|
24
|
+
|
|
25
|
+
### Development Environment
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# 1. Copy environment file
|
|
29
|
+
cp config/docker/env.development .env
|
|
30
|
+
|
|
31
|
+
# 2. Start services
|
|
32
|
+
docker-compose -f docker-compose.dev.yml up -d
|
|
33
|
+
|
|
34
|
+
# 3. Verify deployment
|
|
35
|
+
docker-compose -f docker-compose.dev.yml ps
|
|
36
|
+
docker logs cfn-coordinator-dev
|
|
37
|
+
|
|
38
|
+
# 4. Test coordination
|
|
39
|
+
curl http://localhost:3000/health
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Staging Environment
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# 1. Copy and configure environment
|
|
46
|
+
cp config/docker/env.staging .env
|
|
47
|
+
|
|
48
|
+
# 2. Generate auth token
|
|
49
|
+
export CFN_AGENT_AUTH_TOKEN=$(openssl rand -base64 32)
|
|
50
|
+
echo "CFN_AGENT_AUTH_TOKEN=${CFN_AGENT_AUTH_TOKEN}" >> .env
|
|
51
|
+
|
|
52
|
+
# 3. Start with tmpfs volume for performance
|
|
53
|
+
docker-compose -f docker-compose.staging.yml up -d
|
|
54
|
+
|
|
55
|
+
# 4. Enable chaos engineering
|
|
56
|
+
# Chaos mode is enabled by default in staging (5% failure rate)
|
|
57
|
+
|
|
58
|
+
# 5. Monitor metrics
|
|
59
|
+
docker logs -f cfn-coordinator-staging
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Production Environment
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 1. Copy production environment
|
|
66
|
+
cp config/docker/env.production .env
|
|
67
|
+
|
|
68
|
+
# 2. Configure secrets (DO NOT use .env for production secrets)
|
|
69
|
+
# Use Docker secrets or external secret management
|
|
70
|
+
docker secret create cfn_auth_token /path/to/token.txt
|
|
71
|
+
docker secret create cfn_db_password /path/to/db_password.txt
|
|
72
|
+
|
|
73
|
+
# 3. Configure TLS certificates
|
|
74
|
+
docker secret create cfn_tls_cert /path/to/cert.pem
|
|
75
|
+
docker secret create cfn_tls_key /path/to/key.pem
|
|
76
|
+
|
|
77
|
+
# 4. Start services with secrets
|
|
78
|
+
docker stack deploy -c docker-compose.production.yml cfn
|
|
79
|
+
|
|
80
|
+
# 5. Verify health
|
|
81
|
+
curl --cacert /path/to/ca.pem https://your-domain.com/health
|
|
82
|
+
|
|
83
|
+
# 6. Monitor logs (minimal in production)
|
|
84
|
+
docker service logs cfn_coordinator
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Production Docker Compose Example:**
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
version: '3.8'
|
|
91
|
+
services:
|
|
92
|
+
coordinator:
|
|
93
|
+
image: claude-flow-novice:latest
|
|
94
|
+
secrets:
|
|
95
|
+
- cfn_auth_token
|
|
96
|
+
- cfn_db_password
|
|
97
|
+
- cfn_tls_cert
|
|
98
|
+
- cfn_tls_key
|
|
99
|
+
environment:
|
|
100
|
+
CFN_AGENT_AUTH_TOKEN_FILE: /run/secrets/cfn_auth_token
|
|
101
|
+
CFN_DB_PASSWORD_FILE: /run/secrets/cfn_db_password
|
|
102
|
+
CFN_TLS_CERT_PATH: /run/secrets/cfn_tls_cert
|
|
103
|
+
CFN_TLS_KEY_PATH: /run/secrets/cfn_tls_key
|
|
104
|
+
env_file:
|
|
105
|
+
- config/docker/env.production
|
|
106
|
+
tmpfs:
|
|
107
|
+
- /dev/shm:size=50g
|
|
108
|
+
deploy:
|
|
109
|
+
resources:
|
|
110
|
+
limits:
|
|
111
|
+
memory: 51200M
|
|
112
|
+
reservations:
|
|
113
|
+
memory: 25600M
|
|
114
|
+
|
|
115
|
+
secrets:
|
|
116
|
+
cfn_auth_token:
|
|
117
|
+
external: true
|
|
118
|
+
cfn_db_password:
|
|
119
|
+
external: true
|
|
120
|
+
cfn_tls_cert:
|
|
121
|
+
external: true
|
|
122
|
+
cfn_tls_key:
|
|
123
|
+
external: true
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Kubernetes Deployment
|
|
129
|
+
|
|
130
|
+
### Prerequisites
|
|
131
|
+
|
|
132
|
+
- Kubernetes 1.24+
|
|
133
|
+
- kubectl configured
|
|
134
|
+
- Namespace created: `kubectl create namespace claude-flow-novice`
|
|
135
|
+
- Storage class with tmpfs support (production)
|
|
136
|
+
|
|
137
|
+
### Development Deployment
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# 1. Apply ConfigMap
|
|
141
|
+
kubectl apply -f config/k8s/configmap-development.yaml
|
|
142
|
+
|
|
143
|
+
# 2. Create deployment
|
|
144
|
+
kubectl apply -f k8s/deployment-development.yaml
|
|
145
|
+
|
|
146
|
+
# 3. Expose service
|
|
147
|
+
kubectl apply -f k8s/service-development.yaml
|
|
148
|
+
|
|
149
|
+
# 4. Verify deployment
|
|
150
|
+
kubectl get pods -n claude-flow-novice
|
|
151
|
+
kubectl logs -f deployment/cfn-coordinator-dev -n claude-flow-novice
|
|
152
|
+
|
|
153
|
+
# 5. Port-forward for testing
|
|
154
|
+
kubectl port-forward -n claude-flow-novice svc/cfn-coordinator-dev 3000:3000
|
|
155
|
+
curl http://localhost:3000/health
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Development Deployment YAML Example:**
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
apiVersion: apps/v1
|
|
162
|
+
kind: Deployment
|
|
163
|
+
metadata:
|
|
164
|
+
name: cfn-coordinator-dev
|
|
165
|
+
namespace: claude-flow-novice
|
|
166
|
+
spec:
|
|
167
|
+
replicas: 1
|
|
168
|
+
selector:
|
|
169
|
+
matchLabels:
|
|
170
|
+
app: cfn-coordinator
|
|
171
|
+
environment: development
|
|
172
|
+
template:
|
|
173
|
+
metadata:
|
|
174
|
+
labels:
|
|
175
|
+
app: cfn-coordinator
|
|
176
|
+
environment: development
|
|
177
|
+
spec:
|
|
178
|
+
containers:
|
|
179
|
+
- name: coordinator
|
|
180
|
+
image: claude-flow-novice:latest
|
|
181
|
+
envFrom:
|
|
182
|
+
- configMapRef:
|
|
183
|
+
name: cfn-coordination-config-dev
|
|
184
|
+
resources:
|
|
185
|
+
requests:
|
|
186
|
+
memory: "1Gi"
|
|
187
|
+
cpu: "500m"
|
|
188
|
+
limits:
|
|
189
|
+
memory: "2Gi"
|
|
190
|
+
cpu: "1000m"
|
|
191
|
+
volumeMounts:
|
|
192
|
+
- name: tmp
|
|
193
|
+
mountPath: /tmp/cfn
|
|
194
|
+
volumes:
|
|
195
|
+
- name: tmp
|
|
196
|
+
emptyDir: {}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Staging Deployment
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# 1. Create secrets
|
|
203
|
+
kubectl create secret generic cfn-coordination-secrets-staging \
|
|
204
|
+
--from-literal=CFN_AGENT_AUTH_TOKEN="$(openssl rand -base64 32)" \
|
|
205
|
+
--from-literal=CFN_DB_PASSWORD="your-staging-password" \
|
|
206
|
+
-n claude-flow-novice
|
|
207
|
+
|
|
208
|
+
# 2. Apply ConfigMap
|
|
209
|
+
kubectl apply -f config/k8s/configmap-staging.yaml
|
|
210
|
+
|
|
211
|
+
# 3. Deploy application
|
|
212
|
+
kubectl apply -f k8s/deployment-staging.yaml
|
|
213
|
+
|
|
214
|
+
# 4. Create service and ingress
|
|
215
|
+
kubectl apply -f k8s/service-staging.yaml
|
|
216
|
+
kubectl apply -f k8s/ingress-staging.yaml
|
|
217
|
+
|
|
218
|
+
# 5. Monitor deployment
|
|
219
|
+
kubectl rollout status deployment/cfn-coordinator-staging -n claude-flow-novice
|
|
220
|
+
kubectl logs -f deployment/cfn-coordinator-staging -n claude-flow-novice
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Staging Deployment with Chaos Engineering:**
|
|
224
|
+
|
|
225
|
+
```yaml
|
|
226
|
+
apiVersion: apps/v1
|
|
227
|
+
kind: Deployment
|
|
228
|
+
metadata:
|
|
229
|
+
name: cfn-coordinator-staging
|
|
230
|
+
namespace: claude-flow-novice
|
|
231
|
+
spec:
|
|
232
|
+
replicas: 2
|
|
233
|
+
selector:
|
|
234
|
+
matchLabels:
|
|
235
|
+
app: cfn-coordinator
|
|
236
|
+
environment: staging
|
|
237
|
+
template:
|
|
238
|
+
metadata:
|
|
239
|
+
labels:
|
|
240
|
+
app: cfn-coordinator
|
|
241
|
+
environment: staging
|
|
242
|
+
spec:
|
|
243
|
+
containers:
|
|
244
|
+
- name: coordinator
|
|
245
|
+
image: claude-flow-novice:latest
|
|
246
|
+
envFrom:
|
|
247
|
+
- configMapRef:
|
|
248
|
+
name: cfn-coordination-config-staging
|
|
249
|
+
env:
|
|
250
|
+
- name: CFN_AGENT_AUTH_TOKEN
|
|
251
|
+
valueFrom:
|
|
252
|
+
secretKeyRef:
|
|
253
|
+
name: cfn-coordination-secrets-staging
|
|
254
|
+
key: CFN_AGENT_AUTH_TOKEN
|
|
255
|
+
- name: CFN_DB_PASSWORD
|
|
256
|
+
valueFrom:
|
|
257
|
+
secretKeyRef:
|
|
258
|
+
name: cfn-coordination-secrets-staging
|
|
259
|
+
key: CFN_DB_PASSWORD
|
|
260
|
+
resources:
|
|
261
|
+
requests:
|
|
262
|
+
memory: "5Gi"
|
|
263
|
+
cpu: "2000m"
|
|
264
|
+
limits:
|
|
265
|
+
memory: "10Gi"
|
|
266
|
+
cpu: "4000m"
|
|
267
|
+
volumeMounts:
|
|
268
|
+
- name: shm
|
|
269
|
+
mountPath: /dev/shm
|
|
270
|
+
volumes:
|
|
271
|
+
- name: shm
|
|
272
|
+
emptyDir:
|
|
273
|
+
medium: Memory
|
|
274
|
+
sizeLimit: 10Gi
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Production Deployment
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# 1. Use external secret management (recommended)
|
|
281
|
+
# Option A: AWS Secrets Manager + External Secrets Operator
|
|
282
|
+
kubectl apply -f k8s/external-secret-prod.yaml
|
|
283
|
+
|
|
284
|
+
# Option B: Manual secret creation (not recommended for production)
|
|
285
|
+
kubectl create secret generic cfn-coordination-secrets-prod \
|
|
286
|
+
--from-literal=CFN_AGENT_AUTH_TOKEN="$(openssl rand -base64 32)" \
|
|
287
|
+
--from-literal=CFN_DB_HOST="postgres.prod.internal" \
|
|
288
|
+
--from-literal=CFN_DB_PASSWORD="your-production-password" \
|
|
289
|
+
-n claude-flow-novice
|
|
290
|
+
|
|
291
|
+
# 2. Create TLS secret for secure communication
|
|
292
|
+
kubectl create secret tls cfn-tls-cert \
|
|
293
|
+
--cert=/path/to/cert.pem \
|
|
294
|
+
--key=/path/to/key.pem \
|
|
295
|
+
-n claude-flow-novice
|
|
296
|
+
|
|
297
|
+
# 3. Apply ConfigMap
|
|
298
|
+
kubectl apply -f config/k8s/configmap-production.yaml
|
|
299
|
+
|
|
300
|
+
# 4. Deploy with high availability
|
|
301
|
+
kubectl apply -f k8s/deployment-production.yaml
|
|
302
|
+
|
|
303
|
+
# 5. Create service and ingress with TLS
|
|
304
|
+
kubectl apply -f k8s/service-production.yaml
|
|
305
|
+
kubectl apply -f k8s/ingress-production.yaml
|
|
306
|
+
|
|
307
|
+
# 6. Monitor rollout
|
|
308
|
+
kubectl rollout status deployment/cfn-coordinator-prod -n claude-flow-novice
|
|
309
|
+
|
|
310
|
+
# 7. Verify health through ingress
|
|
311
|
+
curl https://cfn.your-domain.com/health
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Production Deployment with HA and tmpfs:**
|
|
315
|
+
|
|
316
|
+
```yaml
|
|
317
|
+
apiVersion: apps/v1
|
|
318
|
+
kind: Deployment
|
|
319
|
+
metadata:
|
|
320
|
+
name: cfn-coordinator-prod
|
|
321
|
+
namespace: claude-flow-novice
|
|
322
|
+
spec:
|
|
323
|
+
replicas: 3
|
|
324
|
+
strategy:
|
|
325
|
+
type: RollingUpdate
|
|
326
|
+
rollingUpdate:
|
|
327
|
+
maxSurge: 1
|
|
328
|
+
maxUnavailable: 0
|
|
329
|
+
selector:
|
|
330
|
+
matchLabels:
|
|
331
|
+
app: cfn-coordinator
|
|
332
|
+
environment: production
|
|
333
|
+
template:
|
|
334
|
+
metadata:
|
|
335
|
+
labels:
|
|
336
|
+
app: cfn-coordinator
|
|
337
|
+
environment: production
|
|
338
|
+
spec:
|
|
339
|
+
affinity:
|
|
340
|
+
podAntiAffinity:
|
|
341
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
342
|
+
- labelSelector:
|
|
343
|
+
matchLabels:
|
|
344
|
+
app: cfn-coordinator
|
|
345
|
+
topologyKey: kubernetes.io/hostname
|
|
346
|
+
containers:
|
|
347
|
+
- name: coordinator
|
|
348
|
+
image: claude-flow-novice:1.6.5
|
|
349
|
+
envFrom:
|
|
350
|
+
- configMapRef:
|
|
351
|
+
name: cfn-coordination-config-prod
|
|
352
|
+
env:
|
|
353
|
+
- name: CFN_AGENT_AUTH_TOKEN
|
|
354
|
+
valueFrom:
|
|
355
|
+
secretKeyRef:
|
|
356
|
+
name: cfn-coordination-secrets-prod
|
|
357
|
+
key: CFN_AGENT_AUTH_TOKEN
|
|
358
|
+
- name: CFN_DB_HOST
|
|
359
|
+
valueFrom:
|
|
360
|
+
secretKeyRef:
|
|
361
|
+
name: cfn-coordination-secrets-prod
|
|
362
|
+
key: CFN_DB_HOST
|
|
363
|
+
- name: CFN_DB_PASSWORD
|
|
364
|
+
valueFrom:
|
|
365
|
+
secretKeyRef:
|
|
366
|
+
name: cfn-coordination-secrets-prod
|
|
367
|
+
key: CFN_DB_PASSWORD
|
|
368
|
+
- name: CFN_TRACING_ENDPOINT
|
|
369
|
+
valueFrom:
|
|
370
|
+
secretKeyRef:
|
|
371
|
+
name: cfn-coordination-secrets-prod
|
|
372
|
+
key: CFN_TRACING_ENDPOINT
|
|
373
|
+
resources:
|
|
374
|
+
requests:
|
|
375
|
+
memory: "25Gi"
|
|
376
|
+
cpu: "8000m"
|
|
377
|
+
limits:
|
|
378
|
+
memory: "51Gi"
|
|
379
|
+
cpu: "16000m"
|
|
380
|
+
livenessProbe:
|
|
381
|
+
httpGet:
|
|
382
|
+
path: /health
|
|
383
|
+
port: 3000
|
|
384
|
+
scheme: HTTPS
|
|
385
|
+
initialDelaySeconds: 30
|
|
386
|
+
periodSeconds: 10
|
|
387
|
+
timeoutSeconds: 5
|
|
388
|
+
failureThreshold: 3
|
|
389
|
+
readinessProbe:
|
|
390
|
+
httpGet:
|
|
391
|
+
path: /ready
|
|
392
|
+
port: 3000
|
|
393
|
+
scheme: HTTPS
|
|
394
|
+
initialDelaySeconds: 10
|
|
395
|
+
periodSeconds: 5
|
|
396
|
+
timeoutSeconds: 3
|
|
397
|
+
failureThreshold: 2
|
|
398
|
+
volumeMounts:
|
|
399
|
+
- name: shm
|
|
400
|
+
mountPath: /dev/shm
|
|
401
|
+
- name: tls-certs
|
|
402
|
+
mountPath: /etc/cfn/certs
|
|
403
|
+
readOnly: true
|
|
404
|
+
volumes:
|
|
405
|
+
- name: shm
|
|
406
|
+
emptyDir:
|
|
407
|
+
medium: Memory
|
|
408
|
+
sizeLimit: 50Gi
|
|
409
|
+
- name: tls-certs
|
|
410
|
+
secret:
|
|
411
|
+
secretName: cfn-tls-cert
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Configuration Management
|
|
417
|
+
|
|
418
|
+
### Environment Variables Reference
|
|
419
|
+
|
|
420
|
+
Comprehensive list available in `/config/.env.example`
|
|
421
|
+
|
|
422
|
+
**Critical Production Settings:**
|
|
423
|
+
|
|
424
|
+
- `CFN_BASE_DIR=/dev/shm/cfn` - REQUIRED for production (tmpfs for speed)
|
|
425
|
+
- `CFN_ENABLE_AGENT_AUTH=true` - REQUIRED for security
|
|
426
|
+
- `CFN_ENABLE_TLS=true` - REQUIRED for secure communication
|
|
427
|
+
- `CFN_LOG_LEVEL=warn` - Minimize logging overhead
|
|
428
|
+
- `CFN_CONSENSUS_THRESHOLD=0.95` - Higher threshold for production
|
|
429
|
+
- `CFN_ALERT_COORD_TIME_MS=8000` - Alert on slow coordination
|
|
430
|
+
|
|
431
|
+
### Secret Management
|
|
432
|
+
|
|
433
|
+
**Development:**
|
|
434
|
+
- `.env` file (acceptable for local development)
|
|
435
|
+
|
|
436
|
+
**Staging:**
|
|
437
|
+
- Kubernetes Secrets
|
|
438
|
+
- Docker Secrets
|
|
439
|
+
- Environment-specific tokens
|
|
440
|
+
|
|
441
|
+
**Production (choose one):**
|
|
442
|
+
- AWS Secrets Manager + External Secrets Operator
|
|
443
|
+
- Azure Key Vault + Secrets Store CSI Driver
|
|
444
|
+
- HashiCorp Vault + Vault Agent Injector
|
|
445
|
+
- Google Secret Manager + Workload Identity
|
|
446
|
+
|
|
447
|
+
**Secret Rotation Schedule:**
|
|
448
|
+
- Development: No rotation required
|
|
449
|
+
- Staging: Every 90 days
|
|
450
|
+
- Production: Every 30 days
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Monitoring and Observability
|
|
455
|
+
|
|
456
|
+
### Health Checks
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
# Basic health
|
|
460
|
+
curl http://localhost:3000/health
|
|
461
|
+
|
|
462
|
+
# Detailed status
|
|
463
|
+
curl http://localhost:3000/status
|
|
464
|
+
|
|
465
|
+
# Metrics endpoint (if enabled)
|
|
466
|
+
curl http://localhost:3000/metrics
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Key Metrics to Monitor
|
|
470
|
+
|
|
471
|
+
1. **Coordination Time**: `CFN_ALERT_COORD_TIME_MS` threshold
|
|
472
|
+
2. **Memory Usage**: Alert at 80% of `CFN_TOTAL_MEMORY_LIMIT_MB`
|
|
473
|
+
3. **Agent Failures**: Alert after 3 consecutive failures
|
|
474
|
+
4. **Consensus Success Rate**: Alert below 70%
|
|
475
|
+
|
|
476
|
+
### Logging
|
|
477
|
+
|
|
478
|
+
**Development:**
|
|
479
|
+
- Log Level: `debug`
|
|
480
|
+
- Verbose logging enabled
|
|
481
|
+
- All agent lifecycle events tracked
|
|
482
|
+
|
|
483
|
+
**Staging:**
|
|
484
|
+
- Log Level: `info`
|
|
485
|
+
- Chaos engineering events logged
|
|
486
|
+
- Performance metrics collected
|
|
487
|
+
|
|
488
|
+
**Production:**
|
|
489
|
+
- Log Level: `warn`
|
|
490
|
+
- Minimal logging to reduce overhead
|
|
491
|
+
- Critical errors and alerts only
|
|
492
|
+
- Structured logging with correlation IDs
|
|
493
|
+
|
|
494
|
+
### Distributed Tracing (Production)
|
|
495
|
+
|
|
496
|
+
```yaml
|
|
497
|
+
# Enable in production ConfigMap
|
|
498
|
+
CFN_TRACING_ENABLED: "true"
|
|
499
|
+
CFN_TRACING_ENDPOINT: "http://jaeger-collector:9411"
|
|
500
|
+
CFN_TRACING_SERVICE_NAME: "claude-flow-novice"
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
**Supported Backends:**
|
|
504
|
+
- Jaeger
|
|
505
|
+
- Zipkin
|
|
506
|
+
- OpenTelemetry Collector
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
## Performance Tuning
|
|
511
|
+
|
|
512
|
+
### Development (10 agents)
|
|
513
|
+
- **Shards**: 4
|
|
514
|
+
- **Concurrent Operations**: 10
|
|
515
|
+
- **Cache TTL**: 300s
|
|
516
|
+
- **Memory**: 2GB
|
|
517
|
+
|
|
518
|
+
### Staging (100 agents)
|
|
519
|
+
- **Shards**: 16
|
|
520
|
+
- **Concurrent Operations**: 50
|
|
521
|
+
- **Cache TTL**: 300s
|
|
522
|
+
- **Memory**: 10GB
|
|
523
|
+
- **Chaos**: 5% failure rate
|
|
524
|
+
|
|
525
|
+
### Production (500 agents)
|
|
526
|
+
- **Shards**: 32
|
|
527
|
+
- **Concurrent Operations**: 100
|
|
528
|
+
- **Cache TTL**: 600s
|
|
529
|
+
- **Memory**: 50GB
|
|
530
|
+
- **tmpfs**: REQUIRED (`/dev/shm`)
|
|
531
|
+
|
|
532
|
+
### Scaling Guidelines
|
|
533
|
+
|
|
534
|
+
**Horizontal Scaling (Kubernetes):**
|
|
535
|
+
```bash
|
|
536
|
+
# Scale replicas
|
|
537
|
+
kubectl scale deployment cfn-coordinator-prod --replicas=5 -n claude-flow-novice
|
|
538
|
+
|
|
539
|
+
# Auto-scaling
|
|
540
|
+
kubectl autoscale deployment cfn-coordinator-prod \
|
|
541
|
+
--min=3 --max=10 \
|
|
542
|
+
--cpu-percent=70 \
|
|
543
|
+
-n claude-flow-novice
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
**Vertical Scaling:**
|
|
547
|
+
- Increase `CFN_MAX_AGENTS` in increments of 100
|
|
548
|
+
- Increase `CFN_SHARD_COUNT` proportionally (agents / 15)
|
|
549
|
+
- Increase `CFN_TOTAL_MEMORY_LIMIT_MB` (100MB per agent minimum)
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## Security Best Practices
|
|
554
|
+
|
|
555
|
+
### Authentication
|
|
556
|
+
- ✅ Enable `CFN_ENABLE_AGENT_AUTH=true` in staging/production
|
|
557
|
+
- ✅ Use strong tokens: `openssl rand -base64 32`
|
|
558
|
+
- ✅ Rotate tokens every 30 days (production)
|
|
559
|
+
|
|
560
|
+
### TLS/Encryption
|
|
561
|
+
- ✅ Enable `CFN_ENABLE_TLS=true` in production
|
|
562
|
+
- ✅ Use valid certificates (Let's Encrypt or corporate CA)
|
|
563
|
+
- ✅ Enforce HTTPS at ingress/load balancer
|
|
564
|
+
|
|
565
|
+
### Network Security
|
|
566
|
+
- ✅ Enable rate limiting: `CFN_ENABLE_RATE_LIMITING=true`
|
|
567
|
+
- ✅ Use Kubernetes NetworkPolicies to restrict pod communication
|
|
568
|
+
- ✅ Deploy in private subnets with NAT gateway
|
|
569
|
+
|
|
570
|
+
### Secret Management
|
|
571
|
+
- ❌ NEVER commit secrets to git
|
|
572
|
+
- ❌ NEVER use `.env` files in production
|
|
573
|
+
- ✅ Use external secret management systems
|
|
574
|
+
- ✅ Use Kubernetes RBAC to restrict secret access
|
|
575
|
+
- ✅ Enable audit logging for secret access
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## Disaster Recovery
|
|
580
|
+
|
|
581
|
+
### Backup Strategy
|
|
582
|
+
|
|
583
|
+
**Metrics Database:**
|
|
584
|
+
```bash
|
|
585
|
+
# SQLite (Staging)
|
|
586
|
+
kubectl exec -n claude-flow-novice cfn-coordinator-staging-xxx -- \
|
|
587
|
+
sqlite3 /var/lib/cfn/metrics.db .dump > backup-$(date +%Y%m%d).sql
|
|
588
|
+
|
|
589
|
+
# PostgreSQL (Production)
|
|
590
|
+
pg_dump -h $CFN_DB_HOST -U $CFN_DB_USER cfn_metrics > backup-$(date +%Y%m%d).sql
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
**Configuration:**
|
|
594
|
+
- Store ConfigMaps and Secrets in version control (encrypted)
|
|
595
|
+
- Use GitOps (ArgoCD, FluxCD) for infrastructure as code
|
|
596
|
+
|
|
597
|
+
### Recovery Procedures
|
|
598
|
+
|
|
599
|
+
**Pod Failure:**
|
|
600
|
+
- Kubernetes automatically restarts failed pods
|
|
601
|
+
- Verify with: `kubectl get pods -n claude-flow-novice`
|
|
602
|
+
|
|
603
|
+
**Node Failure:**
|
|
604
|
+
- Pod anti-affinity ensures distribution across nodes
|
|
605
|
+
- Kubernetes reschedules pods to healthy nodes
|
|
606
|
+
|
|
607
|
+
**Cluster Failure:**
|
|
608
|
+
- Maintain multi-region deployment
|
|
609
|
+
- Use disaster recovery cluster in different region
|
|
610
|
+
- RPO: 1 hour, RTO: 15 minutes
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
## Troubleshooting
|
|
615
|
+
|
|
616
|
+
### Common Issues
|
|
617
|
+
|
|
618
|
+
**1. High Coordination Time**
|
|
619
|
+
```bash
|
|
620
|
+
# Check current coordination time
|
|
621
|
+
kubectl logs -n claude-flow-novice deployment/cfn-coordinator-prod | grep "coordination_time"
|
|
622
|
+
|
|
623
|
+
# Solution: Increase shards or reduce agent count
|
|
624
|
+
kubectl edit configmap cfn-coordination-config-prod -n claude-flow-novice
|
|
625
|
+
# Increase CFN_SHARD_COUNT
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
**2. Memory Exhaustion**
|
|
629
|
+
```bash
|
|
630
|
+
# Check memory usage
|
|
631
|
+
kubectl top pods -n claude-flow-novice
|
|
632
|
+
|
|
633
|
+
# Solution: Increase memory limits or reduce agents
|
|
634
|
+
kubectl edit deployment cfn-coordinator-prod -n claude-flow-novice
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
**3. Consensus Failures**
|
|
638
|
+
```bash
|
|
639
|
+
# Check consensus rate
|
|
640
|
+
kubectl logs -n claude-flow-novice deployment/cfn-coordinator-prod | grep "consensus"
|
|
641
|
+
|
|
642
|
+
# Solution: Investigate network latency, increase timeout
|
|
643
|
+
# Edit CFN_CONSENSUS_TIMEOUT_MS in ConfigMap
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
**4. Agent Authentication Failures**
|
|
647
|
+
```bash
|
|
648
|
+
# Verify secret exists
|
|
649
|
+
kubectl get secret cfn-coordination-secrets-prod -n claude-flow-novice
|
|
650
|
+
|
|
651
|
+
# Verify token is mounted
|
|
652
|
+
kubectl exec -n claude-flow-novice cfn-coordinator-prod-xxx -- env | grep CFN_AGENT_AUTH_TOKEN
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
## Deployment Checklist
|
|
658
|
+
|
|
659
|
+
### Pre-Deployment
|
|
660
|
+
- [ ] Environment configuration reviewed and tested
|
|
661
|
+
- [ ] Secrets generated and stored securely
|
|
662
|
+
- [ ] TLS certificates valid and not expiring soon
|
|
663
|
+
- [ ] Resource limits appropriate for agent count
|
|
664
|
+
- [ ] Monitoring and alerting configured
|
|
665
|
+
- [ ] Backup procedures tested
|
|
666
|
+
|
|
667
|
+
### Deployment
|
|
668
|
+
- [ ] Apply ConfigMaps
|
|
669
|
+
- [ ] Create Secrets (use external secret management in production)
|
|
670
|
+
- [ ] Deploy application
|
|
671
|
+
- [ ] Verify health endpoints
|
|
672
|
+
- [ ] Test coordination with sample agents
|
|
673
|
+
- [ ] Monitor logs for errors
|
|
674
|
+
|
|
675
|
+
### Post-Deployment
|
|
676
|
+
- [ ] Verify all pods running: `kubectl get pods -n claude-flow-novice`
|
|
677
|
+
- [ ] Check resource usage: `kubectl top pods -n claude-flow-novice`
|
|
678
|
+
- [ ] Test health endpoints from external network
|
|
679
|
+
- [ ] Verify metrics collection
|
|
680
|
+
- [ ] Confirm alerting triggers
|
|
681
|
+
- [ ] Document deployment in runbook
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
## Support and Resources
|
|
686
|
+
|
|
687
|
+
- GitHub: https://github.com/your-org/claude-flow-novice
|
|
688
|
+
- Documentation: /docs
|
|
689
|
+
- Configuration Examples: /config
|
|
690
|
+
- Monitoring Dashboards: /monitor/dashboard
|
|
691
|
+
|
|
692
|
+
For production support, contact: devops@your-org.com
|