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,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Coordination V2 - Dependency Channel
|
|
3
|
+
*
|
|
4
|
+
* Specialized channel for dependency request and resolution messages.
|
|
5
|
+
* Integrates with Phase 2 dependency graph to coordinate task dependencies
|
|
6
|
+
* across agents.
|
|
7
|
+
*
|
|
8
|
+
* @module coordination/v2/messaging/channels/dependency-channel
|
|
9
|
+
*/ import { DependencyNodeStatus } from '../../core/dependency-node.js';
|
|
10
|
+
import { MessagePriority } from '../../core/message.js';
|
|
11
|
+
/**
|
|
12
|
+
* Dependency channel validation error.
|
|
13
|
+
*/ export class DependencyChannelError extends Error {
|
|
14
|
+
constructor(message){
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = 'DependencyChannelError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Dependency Channel Implementation.
|
|
21
|
+
*
|
|
22
|
+
* Specialized messaging channel for dependency coordination with:
|
|
23
|
+
* - Type-safe dependency request/resolution payloads
|
|
24
|
+
* - Integration with Phase 2 dependency graph
|
|
25
|
+
* - Request/reply pattern for dependency resolution
|
|
26
|
+
* - Automatic priority assignment based on dependency criticality
|
|
27
|
+
* - Timeout handling for dependency requests
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const depChannel = new DependencyChannel(messageBroker);
|
|
32
|
+
*
|
|
33
|
+
* // Request dependency resolution
|
|
34
|
+
* await depChannel.publishDependencyRequest({
|
|
35
|
+
* requesterId: 'agent-1',
|
|
36
|
+
* taskId: 'task-2',
|
|
37
|
+
* dependencyId: 'task-1',
|
|
38
|
+
* timeout: 30000
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* // Publish dependency resolution
|
|
42
|
+
* await depChannel.publishDependencyResolution({
|
|
43
|
+
* dependencyId: 'task-1',
|
|
44
|
+
* providerId: 'agent-0',
|
|
45
|
+
* status: DependencyNodeStatus.COMPLETED,
|
|
46
|
+
* result: { data: 'completed' }
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/ export class DependencyChannel {
|
|
50
|
+
/** Base topic for all dependency messages */ static BASE_TOPIC = 'dependency';
|
|
51
|
+
/** Topic for dependency requests */ static REQUEST_TOPIC = 'dependency.request';
|
|
52
|
+
/** Topic for dependency resolutions */ static RESOLUTION_TOPIC = 'dependency.resolution';
|
|
53
|
+
/** Topic for dependency failures */ static FAILURE_TOPIC = 'dependency.failure';
|
|
54
|
+
broker;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a new dependency channel instance.
|
|
57
|
+
*
|
|
58
|
+
* @param broker - Message broker for publishing/subscribing
|
|
59
|
+
*/ constructor(broker){
|
|
60
|
+
if (!broker) {
|
|
61
|
+
throw new DependencyChannelError('Message broker is required');
|
|
62
|
+
}
|
|
63
|
+
this.broker = broker;
|
|
64
|
+
}
|
|
65
|
+
// ============================================
|
|
66
|
+
// Publishing - Dependency Requests
|
|
67
|
+
// ============================================
|
|
68
|
+
/**
|
|
69
|
+
* Publishes a dependency request.
|
|
70
|
+
*
|
|
71
|
+
* @param config - Dependency request configuration
|
|
72
|
+
* @returns Promise resolving to published message
|
|
73
|
+
* @throws {DependencyChannelError} If validation fails
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* await depChannel.publishDependencyRequest({
|
|
78
|
+
* requesterId: 'agent-1',
|
|
79
|
+
* taskId: 'task-2',
|
|
80
|
+
* dependencyId: 'task-1',
|
|
81
|
+
* timeout: 30000
|
|
82
|
+
* });
|
|
83
|
+
* ```
|
|
84
|
+
*/ async publishDependencyRequest(config) {
|
|
85
|
+
this.validateDependencyRequest(config);
|
|
86
|
+
const payload = {
|
|
87
|
+
requesterId: config.requesterId,
|
|
88
|
+
taskId: config.taskId,
|
|
89
|
+
dependencyId: config.dependencyId,
|
|
90
|
+
timeout: config.timeout,
|
|
91
|
+
timestamp: Date.now(),
|
|
92
|
+
metadata: config.metadata
|
|
93
|
+
};
|
|
94
|
+
const topic = `${DependencyChannel.REQUEST_TOPIC}.${config.dependencyId}`;
|
|
95
|
+
const messageConfig = {
|
|
96
|
+
topic,
|
|
97
|
+
payload,
|
|
98
|
+
priority: MessagePriority.NORMAL,
|
|
99
|
+
senderId: config.requesterId,
|
|
100
|
+
metadata: {
|
|
101
|
+
channel: 'dependency',
|
|
102
|
+
type: 'request',
|
|
103
|
+
dependencyId: config.dependencyId
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return this.broker.publish(messageConfig);
|
|
107
|
+
}
|
|
108
|
+
// ============================================
|
|
109
|
+
// Publishing - Dependency Resolutions
|
|
110
|
+
// ============================================
|
|
111
|
+
/**
|
|
112
|
+
* Publishes a dependency resolution.
|
|
113
|
+
*
|
|
114
|
+
* @param config - Dependency resolution configuration
|
|
115
|
+
* @returns Promise resolving to published message
|
|
116
|
+
* @throws {DependencyChannelError} If validation fails
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* await depChannel.publishDependencyResolution({
|
|
121
|
+
* dependencyId: 'task-1',
|
|
122
|
+
* providerId: 'agent-0',
|
|
123
|
+
* status: DependencyNodeStatus.COMPLETED,
|
|
124
|
+
* result: { output: 'success' }
|
|
125
|
+
* });
|
|
126
|
+
* ```
|
|
127
|
+
*/ async publishDependencyResolution(config) {
|
|
128
|
+
this.validateDependencyResolution(config);
|
|
129
|
+
const payload = {
|
|
130
|
+
dependencyId: config.dependencyId,
|
|
131
|
+
providerId: config.providerId,
|
|
132
|
+
status: config.status,
|
|
133
|
+
result: config.result,
|
|
134
|
+
timestamp: Date.now(),
|
|
135
|
+
metadata: config.metadata
|
|
136
|
+
};
|
|
137
|
+
const topic = `${DependencyChannel.RESOLUTION_TOPIC}.${config.dependencyId}`;
|
|
138
|
+
const messageConfig = {
|
|
139
|
+
topic,
|
|
140
|
+
payload,
|
|
141
|
+
priority: MessagePriority.HIGH,
|
|
142
|
+
senderId: config.providerId,
|
|
143
|
+
metadata: {
|
|
144
|
+
channel: 'dependency',
|
|
145
|
+
type: 'resolution',
|
|
146
|
+
dependencyId: config.dependencyId,
|
|
147
|
+
status: config.status
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
return this.broker.publish(messageConfig);
|
|
151
|
+
}
|
|
152
|
+
// ============================================
|
|
153
|
+
// Publishing - Dependency Failures
|
|
154
|
+
// ============================================
|
|
155
|
+
/**
|
|
156
|
+
* Publishes a dependency failure.
|
|
157
|
+
*
|
|
158
|
+
* @param config - Dependency failure configuration
|
|
159
|
+
* @returns Promise resolving to published message
|
|
160
|
+
* @throws {DependencyChannelError} If validation fails
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* await depChannel.publishDependencyFailure({
|
|
165
|
+
* dependencyId: 'task-1',
|
|
166
|
+
* taskId: 'task-1',
|
|
167
|
+
* reason: 'Execution timeout',
|
|
168
|
+
* error: new Error('Task timed out after 60s')
|
|
169
|
+
* });
|
|
170
|
+
* ```
|
|
171
|
+
*/ async publishDependencyFailure(config) {
|
|
172
|
+
this.validateDependencyFailure(config);
|
|
173
|
+
const payload = {
|
|
174
|
+
dependencyId: config.dependencyId,
|
|
175
|
+
taskId: config.taskId,
|
|
176
|
+
reason: config.reason,
|
|
177
|
+
error: config.error,
|
|
178
|
+
timestamp: Date.now(),
|
|
179
|
+
metadata: config.metadata
|
|
180
|
+
};
|
|
181
|
+
const topic = `${DependencyChannel.FAILURE_TOPIC}.${config.dependencyId}`;
|
|
182
|
+
const messageConfig = {
|
|
183
|
+
topic,
|
|
184
|
+
payload,
|
|
185
|
+
priority: MessagePriority.CRITICAL,
|
|
186
|
+
metadata: {
|
|
187
|
+
channel: 'dependency',
|
|
188
|
+
type: 'failure',
|
|
189
|
+
dependencyId: config.dependencyId
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
return this.broker.publish(messageConfig);
|
|
193
|
+
}
|
|
194
|
+
// ============================================
|
|
195
|
+
// Subscribing
|
|
196
|
+
// ============================================
|
|
197
|
+
/**
|
|
198
|
+
* Subscribes to dependency requests for a specific dependency.
|
|
199
|
+
*
|
|
200
|
+
* @param dependencyId - Dependency ID to monitor
|
|
201
|
+
* @param handler - Callback function for requests
|
|
202
|
+
* @returns Subscription handle
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const sub = await depChannel.subscribeToDependencyRequests('task-1', async (payload) => {
|
|
207
|
+
* console.log(`Dependency requested by ${payload.requesterId}`);
|
|
208
|
+
* });
|
|
209
|
+
* ```
|
|
210
|
+
*/ async subscribeToDependencyRequests(dependencyId, handler) {
|
|
211
|
+
this.validateId(dependencyId, 'Dependency ID');
|
|
212
|
+
return this.broker.subscribe({
|
|
213
|
+
topic: `${DependencyChannel.REQUEST_TOPIC}.${dependencyId}`,
|
|
214
|
+
handler: async (message)=>{
|
|
215
|
+
await handler(message.payload);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Subscribes to all dependency requests.
|
|
221
|
+
*
|
|
222
|
+
* @param handler - Callback function for requests
|
|
223
|
+
* @returns Subscription handle
|
|
224
|
+
*/ async subscribeToAllRequests(handler) {
|
|
225
|
+
return this.broker.subscribe({
|
|
226
|
+
topic: `${DependencyChannel.REQUEST_TOPIC}.*`,
|
|
227
|
+
handler: async (message)=>{
|
|
228
|
+
await handler(message.payload);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Subscribes to dependency resolutions for a specific dependency.
|
|
234
|
+
*
|
|
235
|
+
* @param dependencyId - Dependency ID to monitor
|
|
236
|
+
* @param handler - Callback function for resolutions
|
|
237
|
+
* @returns Subscription handle
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* const sub = await depChannel.subscribeToDependencyResolutions('task-1', async (payload) => {
|
|
242
|
+
* console.log(`Dependency resolved with status: ${payload.status}`);
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*/ async subscribeToDependencyResolutions(dependencyId, handler) {
|
|
246
|
+
this.validateId(dependencyId, 'Dependency ID');
|
|
247
|
+
return this.broker.subscribe({
|
|
248
|
+
topic: `${DependencyChannel.RESOLUTION_TOPIC}.${dependencyId}`,
|
|
249
|
+
handler: async (message)=>{
|
|
250
|
+
await handler(message.payload);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Subscribes to all dependency resolutions.
|
|
256
|
+
*
|
|
257
|
+
* @param handler - Callback function for resolutions
|
|
258
|
+
* @returns Subscription handle
|
|
259
|
+
*/ async subscribeToAllResolutions(handler) {
|
|
260
|
+
return this.broker.subscribe({
|
|
261
|
+
topic: `${DependencyChannel.RESOLUTION_TOPIC}.*`,
|
|
262
|
+
handler: async (message)=>{
|
|
263
|
+
await handler(message.payload);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Subscribes to dependency failures.
|
|
269
|
+
*
|
|
270
|
+
* @param handler - Callback function for failures
|
|
271
|
+
* @returns Subscription handle
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```typescript
|
|
275
|
+
* const sub = await depChannel.subscribeToFailures(async (payload) => {
|
|
276
|
+
* console.error(`Dependency ${payload.dependencyId} failed: ${payload.reason}`);
|
|
277
|
+
* });
|
|
278
|
+
* ```
|
|
279
|
+
*/ async subscribeToFailures(handler) {
|
|
280
|
+
return this.broker.subscribe({
|
|
281
|
+
topic: `${DependencyChannel.FAILURE_TOPIC}.*`,
|
|
282
|
+
handler: async (message)=>{
|
|
283
|
+
await handler(message.payload);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
// ============================================
|
|
288
|
+
// Validation
|
|
289
|
+
// ============================================
|
|
290
|
+
/**
|
|
291
|
+
* Validates dependency request configuration.
|
|
292
|
+
*/ validateDependencyRequest(config) {
|
|
293
|
+
this.validateId(config.requesterId, 'Requester ID');
|
|
294
|
+
this.validateId(config.taskId, 'Task ID');
|
|
295
|
+
this.validateId(config.dependencyId, 'Dependency ID');
|
|
296
|
+
if (config.timeout !== undefined) {
|
|
297
|
+
if (typeof config.timeout !== 'number' || config.timeout <= 0) {
|
|
298
|
+
throw new DependencyChannelError('Timeout must be a positive number');
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Validates dependency resolution configuration.
|
|
304
|
+
*/ validateDependencyResolution(config) {
|
|
305
|
+
this.validateId(config.dependencyId, 'Dependency ID');
|
|
306
|
+
this.validateId(config.providerId, 'Provider ID');
|
|
307
|
+
if (!Object.values(DependencyNodeStatus).includes(config.status)) {
|
|
308
|
+
throw new DependencyChannelError(`Invalid status: ${config.status}`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Validates dependency failure configuration.
|
|
313
|
+
*/ validateDependencyFailure(config) {
|
|
314
|
+
this.validateId(config.dependencyId, 'Dependency ID');
|
|
315
|
+
this.validateId(config.taskId, 'Task ID');
|
|
316
|
+
if (!config.reason || typeof config.reason !== 'string') {
|
|
317
|
+
throw new DependencyChannelError('Failure reason must be a non-empty string');
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Validates an ID field.
|
|
322
|
+
*/ validateId(id, fieldName) {
|
|
323
|
+
if (!id || typeof id !== 'string') {
|
|
324
|
+
throw new DependencyChannelError(`${fieldName} must be a non-empty string`);
|
|
325
|
+
}
|
|
326
|
+
if (id.length > 256) {
|
|
327
|
+
throw new DependencyChannelError(`${fieldName} exceeds 256 characters`);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// ============================================
|
|
331
|
+
// Utility Methods
|
|
332
|
+
// ============================================
|
|
333
|
+
/**
|
|
334
|
+
* Gets the base topic for all dependency messages.
|
|
335
|
+
*/ static getBaseTopic() {
|
|
336
|
+
return DependencyChannel.BASE_TOPIC;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Gets the topic for dependency requests.
|
|
340
|
+
*/ static getRequestTopic() {
|
|
341
|
+
return DependencyChannel.REQUEST_TOPIC;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Gets the topic for dependency resolutions.
|
|
345
|
+
*/ static getResolutionTopic() {
|
|
346
|
+
return DependencyChannel.RESOLUTION_TOPIC;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Gets the topic for dependency failures.
|
|
350
|
+
*/ static getFailureTopic() {
|
|
351
|
+
return DependencyChannel.FAILURE_TOPIC;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
//# sourceMappingURL=dependency-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.ts"],"names":["DependencyNodeStatus","MessagePriority","DependencyChannelError","Error","message","name","DependencyChannel","BASE_TOPIC","REQUEST_TOPIC","RESOLUTION_TOPIC","FAILURE_TOPIC","broker","publishDependencyRequest","config","validateDependencyRequest","payload","requesterId","taskId","dependencyId","timeout","timestamp","Date","now","metadata","topic","messageConfig","priority","NORMAL","senderId","channel","type","publish","publishDependencyResolution","validateDependencyResolution","providerId","status","result","HIGH","publishDependencyFailure","validateDependencyFailure","reason","error","CRITICAL","subscribeToDependencyRequests","handler","validateId","subscribe","subscribeToAllRequests","subscribeToDependencyResolutions","subscribeToAllResolutions","subscribeToFailures","undefined","Object","values","includes","id","fieldName","length","getBaseTopic","getRequestTopic","getResolutionTopic","getFailureTopic"],"mappings":"AAAA;;;;;;;;CAQC,GAED,SAASA,oBAAoB,QA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