claude-flow-novice 1.6.4 → 1.6.5
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/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/package.json +2 -2
- package/scripts/monitoring/alert-monitor.sh +220 -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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.ts"],"names":["existsSync","execSync","QueryController","Logger","CoordinatorFactory","logger","level","format","destination","detectEnvironment","capabilities","hasSDKCredentials","hasCLI","suggestedMode","validationErrors","apiKey","process","env","ANTHROPIC_API_KEY","trim","length","startsWith","push","cliPathEnv","CLAUDE_CODE_CLI","cliPath","whichResult","encoding","stdio","split","detectMode","validateMode","mode","create","options","startTime","Date","now","requestedMode","info","detectedMode","Error","join","coordinator","createSDKCoordinator","initialize","initTime","initTimeMs","substring","config","maxConcurrentAgents","defaultTokenBudget","enableDynamicAllocation","debug","getCapabilitiesSummary","lines","forEach","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kBAAkB;YAC9CC,yBAAyBlB,QAAQkB,uBAAuB;QAC1D;QAEA,IAAI,CAAC/C,MAAM,CAACgD,KAAK,CAAC,8CAA8CJ;QAEhE,OAAO,IAAI/C,gBAAgB+C;IAC7B;IAEA;;;;;;;;;;;;;;;;GAgBC,GACD,OAAOK,yBAAiC;QACtC,MAAM5C,eAAe,IAAI,CAACD,iBAAiB;QAE3C,MAAM8C,QAAkB;YACtB;YACA,CAAC,mBAAmB,EAAE7C,aAAaC,iBAAiB,GAAG,MAAM,IAAI,CAAC,EAChED,aAAaC,iBAAiB,GAAG,4BAA4B,+BAC7D;YACF,CAAC,mBAAmB,EAAED,aAAaE,MAAM,GAAG,MAAM,IAAI,CAAC,EACrDF,aAAaE,MAAM,GAAG,CAAC,UAAU,EAAEF,aAAae,OAAO,CAAC,CAAC,CAAC,GAAG,uBAC7D;YACF,CAAC,kBAAkB,EAAEf,aAAaG,aAAa,EAAE;SAClD;QAED,IAAIH,aAAaI,gBAAgB,CAACM,MAAM,GAAG,GAAG;YAC5CmC,MAAMjC,IAAI,CAAC;YACXZ,aAAaI,gBAAgB,CAAC0C,OAAO,CAACC,CAAAA;gBACpCF,MAAMjC,IAAI,CAAC,CAAC,IAAI,EAAEmC,KAAK;YACzB;QACF;QAEA,OAAOF,MAAMb,IAAI,CAAC;IACpB;IAEA;;;;;;GAMC,GACD,OAAOgB,UAAmB;QACxB,MAAMhD,eAAe,IAAI,CAACD,iBAAiB;QAC3C,OAAOC,aAAaC,iBAAiB,IAAID,aAAaE,MAAM;IAC9D;AACF"}
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cascading Shutdown Coordinator - Usage Examples
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates hierarchical shutdown coordination with top-down notification
|
|
5
|
+
* and bottom-up completion aggregation.
|
|
6
|
+
*/ import { CascadingShutdown } from './cascading-shutdown.js';
|
|
7
|
+
/**
|
|
8
|
+
* Example 1: Basic Hierarchical Shutdown
|
|
9
|
+
*
|
|
10
|
+
* Simple 3-level hierarchy with graceful shutdown from root.
|
|
11
|
+
*/ async function example1_BasicShutdown() {
|
|
12
|
+
const cascadingShutdown = new CascadingShutdown(undefined, {
|
|
13
|
+
maxShutdownTimeMs: 10000,
|
|
14
|
+
createShutdownCheckpoints: true,
|
|
15
|
+
enableResourceCleanup: true,
|
|
16
|
+
notificationTimeoutMs: 100,
|
|
17
|
+
completionTimeoutMs: 200,
|
|
18
|
+
agentGracePeriodMs: 500
|
|
19
|
+
});
|
|
20
|
+
// Register 3-level hierarchy
|
|
21
|
+
cascadingShutdown.registerHierarchy('swarm-1', 'coordinator-0', [
|
|
22
|
+
{
|
|
23
|
+
agentId: 'coordinator-0',
|
|
24
|
+
level: 0,
|
|
25
|
+
childIds: [
|
|
26
|
+
'agent-1',
|
|
27
|
+
'agent-2'
|
|
28
|
+
],
|
|
29
|
+
resources: [
|
|
30
|
+
{
|
|
31
|
+
type: 'connection',
|
|
32
|
+
id: 'db-conn-1',
|
|
33
|
+
cleaned: false
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'subscription',
|
|
37
|
+
id: 'event-sub-1',
|
|
38
|
+
cleaned: false
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
agentId: 'agent-1',
|
|
44
|
+
level: 1,
|
|
45
|
+
parentId: 'coordinator-0',
|
|
46
|
+
childIds: [
|
|
47
|
+
'agent-3',
|
|
48
|
+
'agent-4'
|
|
49
|
+
],
|
|
50
|
+
resources: [
|
|
51
|
+
{
|
|
52
|
+
type: 'file',
|
|
53
|
+
id: '/tmp/agent-1-cache.json',
|
|
54
|
+
cleaned: false
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
agentId: 'agent-2',
|
|
60
|
+
level: 1,
|
|
61
|
+
parentId: 'coordinator-0',
|
|
62
|
+
childIds: [
|
|
63
|
+
'agent-5'
|
|
64
|
+
],
|
|
65
|
+
resources: [
|
|
66
|
+
{
|
|
67
|
+
type: 'process',
|
|
68
|
+
id: 'worker-proc-123',
|
|
69
|
+
cleaned: false
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
agentId: 'agent-3',
|
|
75
|
+
level: 2,
|
|
76
|
+
parentId: 'agent-1',
|
|
77
|
+
resources: []
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
agentId: 'agent-4',
|
|
81
|
+
level: 2,
|
|
82
|
+
parentId: 'agent-1',
|
|
83
|
+
resources: []
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
agentId: 'agent-5',
|
|
87
|
+
level: 2,
|
|
88
|
+
parentId: 'agent-2',
|
|
89
|
+
resources: []
|
|
90
|
+
}
|
|
91
|
+
]);
|
|
92
|
+
// Register resource cleanup handlers
|
|
93
|
+
cascadingShutdown.registerResourceCleanup('connection', async (resource)=>{
|
|
94
|
+
console.log(`Closing database connection: ${resource.id}`);
|
|
95
|
+
// await db.close(resource.id);
|
|
96
|
+
});
|
|
97
|
+
cascadingShutdown.registerResourceCleanup('file', async (resource)=>{
|
|
98
|
+
console.log(`Deleting temporary file: ${resource.id}`);
|
|
99
|
+
// await fs.unlink(resource.id);
|
|
100
|
+
});
|
|
101
|
+
cascadingShutdown.registerResourceCleanup('process', async (resource)=>{
|
|
102
|
+
console.log(`Terminating worker process: ${resource.id}`);
|
|
103
|
+
// await killProcess(resource.id);
|
|
104
|
+
});
|
|
105
|
+
// Initiate shutdown from root
|
|
106
|
+
const result = await cascadingShutdown.initiateShutdown('coordinator-0', 'Task completed successfully');
|
|
107
|
+
console.log('Shutdown Results:', {
|
|
108
|
+
success: result.success,
|
|
109
|
+
totalAgents: result.totalAgents,
|
|
110
|
+
successfulShutdowns: result.successfulShutdowns,
|
|
111
|
+
totalLatencyMs: result.totalLatencyMs,
|
|
112
|
+
notificationLatencyMs: result.notificationLatencyMs,
|
|
113
|
+
aggregationLatencyMs: result.aggregationLatencyMs,
|
|
114
|
+
resourcesCleaned: result.totalResourcesCleaned
|
|
115
|
+
});
|
|
116
|
+
// Performance validation
|
|
117
|
+
if (result.totalLatencyMs < 1000 && result.totalAgents <= 20) {
|
|
118
|
+
console.log('✅ Performance target met: <1s for 6 agents');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Example 2: Emergency Shutdown
|
|
123
|
+
*
|
|
124
|
+
* Fast shutdown without checkpoints or resource cleanup (critical errors).
|
|
125
|
+
*/ async function example2_EmergencyShutdown() {
|
|
126
|
+
const cascadingShutdown = new CascadingShutdown(undefined, {
|
|
127
|
+
maxShutdownTimeMs: 5000,
|
|
128
|
+
createShutdownCheckpoints: false,
|
|
129
|
+
enableResourceCleanup: false,
|
|
130
|
+
enableEmergencyMode: true
|
|
131
|
+
});
|
|
132
|
+
cascadingShutdown.registerHierarchy('swarm-2', 'root-agent', [
|
|
133
|
+
{
|
|
134
|
+
agentId: 'root-agent',
|
|
135
|
+
level: 0,
|
|
136
|
+
childIds: [
|
|
137
|
+
'agent-a',
|
|
138
|
+
'agent-b'
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
agentId: 'agent-a',
|
|
143
|
+
level: 1,
|
|
144
|
+
parentId: 'root-agent'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
agentId: 'agent-b',
|
|
148
|
+
level: 1,
|
|
149
|
+
parentId: 'root-agent'
|
|
150
|
+
}
|
|
151
|
+
]);
|
|
152
|
+
// Emergency shutdown (skips checkpoints and resource cleanup)
|
|
153
|
+
const result = await cascadingShutdown.emergencyShutdown('root-agent', 'Critical memory leak detected');
|
|
154
|
+
console.log('Emergency Shutdown:', {
|
|
155
|
+
success: result.success,
|
|
156
|
+
latencyMs: result.totalLatencyMs,
|
|
157
|
+
reason: result.reason
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Example 3: Deep Hierarchy (10+ levels)
|
|
162
|
+
*
|
|
163
|
+
* Tests cascading shutdown with maximum nesting depth.
|
|
164
|
+
*/ async function example3_DeepHierarchy() {
|
|
165
|
+
const cascadingShutdown = new CascadingShutdown();
|
|
166
|
+
// Build 10-level hierarchy
|
|
167
|
+
const nodes = [];
|
|
168
|
+
for(let level = 0; level < 10; level++){
|
|
169
|
+
const agentId = `agent-L${level}`;
|
|
170
|
+
const parentId = level > 0 ? `agent-L${level - 1}` : undefined;
|
|
171
|
+
const childIds = level < 9 ? [
|
|
172
|
+
`agent-L${level + 1}`
|
|
173
|
+
] : [];
|
|
174
|
+
nodes.push({
|
|
175
|
+
agentId,
|
|
176
|
+
level,
|
|
177
|
+
parentId,
|
|
178
|
+
childIds
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
cascadingShutdown.registerHierarchy('deep-swarm', 'agent-L0', nodes);
|
|
182
|
+
// Shutdown from root (Level 0)
|
|
183
|
+
const result = await cascadingShutdown.initiateShutdown('agent-L0', 'Deep hierarchy test completion');
|
|
184
|
+
console.log('Deep Hierarchy Shutdown:', {
|
|
185
|
+
maxDepth: result.maxDepth,
|
|
186
|
+
totalAgents: result.totalAgents,
|
|
187
|
+
notificationLatency: result.notificationLatencyMs,
|
|
188
|
+
aggregationLatency: result.aggregationLatencyMs
|
|
189
|
+
});
|
|
190
|
+
// Verify bottom-up completion order
|
|
191
|
+
const levels = result.agentResults.map((r)=>r.level).sort((a, b)=>b - a);
|
|
192
|
+
console.log('Completion order (by level, desc):', levels);
|
|
193
|
+
// Expected: [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] (leaves first, root last)
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Example 4: Event Monitoring
|
|
197
|
+
*
|
|
198
|
+
* Listen to shutdown events for debugging and metrics.
|
|
199
|
+
*/ async function example4_EventMonitoring() {
|
|
200
|
+
const cascadingShutdown = new CascadingShutdown();
|
|
201
|
+
// Monitor shutdown events
|
|
202
|
+
cascadingShutdown.on('shutdown:started', (data)=>{
|
|
203
|
+
console.log('[Event] Shutdown started:', data);
|
|
204
|
+
});
|
|
205
|
+
cascadingShutdown.on('agent:notified', (data)=>{
|
|
206
|
+
console.log(`[Event] Agent ${data.agentId} notified at level ${data.level}`);
|
|
207
|
+
});
|
|
208
|
+
cascadingShutdown.on('agent:shutdown', (result)=>{
|
|
209
|
+
console.log(`[Event] Agent ${result.agentId} shutdown:`, {
|
|
210
|
+
success: result.success,
|
|
211
|
+
resourcesCleaned: result.resourcesCleaned,
|
|
212
|
+
latencyMs: result.completionLatencyMs
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
cascadingShutdown.on('resource:cleaned', (data)=>{
|
|
216
|
+
console.log(`[Event] Resource cleaned: ${data.resourceType} ${data.resourceId}`);
|
|
217
|
+
});
|
|
218
|
+
cascadingShutdown.on('shutdown:completed', (result)=>{
|
|
219
|
+
console.log('[Event] Shutdown completed:', {
|
|
220
|
+
success: result.success,
|
|
221
|
+
totalLatencyMs: result.totalLatencyMs
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
// Register and shutdown
|
|
225
|
+
cascadingShutdown.registerHierarchy('monitored-swarm', 'root', [
|
|
226
|
+
{
|
|
227
|
+
agentId: 'root',
|
|
228
|
+
level: 0,
|
|
229
|
+
childIds: [
|
|
230
|
+
'child-1',
|
|
231
|
+
'child-2'
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
agentId: 'child-1',
|
|
236
|
+
level: 1,
|
|
237
|
+
parentId: 'root'
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
agentId: 'child-2',
|
|
241
|
+
level: 1,
|
|
242
|
+
parentId: 'root'
|
|
243
|
+
}
|
|
244
|
+
]);
|
|
245
|
+
await cascadingShutdown.initiateShutdown('root', 'Event monitoring example');
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Example 5: Integration with HierarchicalCompletionDetector
|
|
249
|
+
*
|
|
250
|
+
* Combine completion detection with cascading shutdown.
|
|
251
|
+
*/ async function example5_CompletionIntegration(hierarchicalDetector) {
|
|
252
|
+
const cascadingShutdown = new CascadingShutdown(hierarchicalDetector, {
|
|
253
|
+
createShutdownCheckpoints: true,
|
|
254
|
+
enableResourceCleanup: true
|
|
255
|
+
});
|
|
256
|
+
// Register hierarchy
|
|
257
|
+
cascadingShutdown.registerHierarchy('completion-swarm', 'pm-agent', [
|
|
258
|
+
{
|
|
259
|
+
agentId: 'pm-agent',
|
|
260
|
+
level: 0,
|
|
261
|
+
childIds: [
|
|
262
|
+
'worker-1',
|
|
263
|
+
'worker-2'
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
agentId: 'worker-1',
|
|
268
|
+
level: 1,
|
|
269
|
+
parentId: 'pm-agent'
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
agentId: 'worker-2',
|
|
273
|
+
level: 1,
|
|
274
|
+
parentId: 'pm-agent'
|
|
275
|
+
}
|
|
276
|
+
]);
|
|
277
|
+
// Wait for completion detection
|
|
278
|
+
const completionResult = await hierarchicalDetector.detectCompletion('completion-swarm');
|
|
279
|
+
if (completionResult.completed) {
|
|
280
|
+
console.log('All agents completed. Initiating shutdown...');
|
|
281
|
+
// Shutdown after completion
|
|
282
|
+
const shutdownResult = await cascadingShutdown.initiateShutdown('pm-agent', 'Task completed - graceful shutdown');
|
|
283
|
+
console.log('Shutdown after completion:', {
|
|
284
|
+
checkpointsCreated: shutdownResult.agentResults.filter((r)=>r.checkpointId).length,
|
|
285
|
+
totalLatencyMs: shutdownResult.totalLatencyMs
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Example 6: 20-Agent Performance Benchmark
|
|
291
|
+
*
|
|
292
|
+
* Validates <1s shutdown target for 20-agent hierarchy.
|
|
293
|
+
*/ async function example6_PerformanceBenchmark() {
|
|
294
|
+
const cascadingShutdown = new CascadingShutdown();
|
|
295
|
+
// Create 20-agent hierarchy (4 levels, 5 agents per level)
|
|
296
|
+
const nodes = [
|
|
297
|
+
{
|
|
298
|
+
agentId: 'root',
|
|
299
|
+
level: 0,
|
|
300
|
+
childIds: [
|
|
301
|
+
'L1-A',
|
|
302
|
+
'L1-B',
|
|
303
|
+
'L1-C',
|
|
304
|
+
'L1-D',
|
|
305
|
+
'L1-E'
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
];
|
|
309
|
+
// Level 1
|
|
310
|
+
for(let i = 0; i < 5; i++){
|
|
311
|
+
const agentId = `L1-${String.fromCharCode(65 + i)}`;
|
|
312
|
+
nodes.push({
|
|
313
|
+
agentId,
|
|
314
|
+
level: 1,
|
|
315
|
+
parentId: 'root',
|
|
316
|
+
childIds: [
|
|
317
|
+
`L2-${String.fromCharCode(65 + i)}`
|
|
318
|
+
]
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
// Level 2
|
|
322
|
+
for(let i = 0; i < 5; i++){
|
|
323
|
+
const agentId = `L2-${String.fromCharCode(65 + i)}`;
|
|
324
|
+
nodes.push({
|
|
325
|
+
agentId,
|
|
326
|
+
level: 2,
|
|
327
|
+
parentId: `L1-${String.fromCharCode(65 + i)}`,
|
|
328
|
+
childIds: [
|
|
329
|
+
`L3-${String.fromCharCode(65 + i)}`
|
|
330
|
+
]
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
// Level 3 (leaf nodes)
|
|
334
|
+
for(let i = 0; i < 5; i++){
|
|
335
|
+
const agentId = `L3-${String.fromCharCode(65 + i)}`;
|
|
336
|
+
nodes.push({
|
|
337
|
+
agentId,
|
|
338
|
+
level: 3,
|
|
339
|
+
parentId: `L2-${String.fromCharCode(65 + i)}`
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
cascadingShutdown.registerHierarchy('benchmark-swarm', 'root', nodes);
|
|
343
|
+
console.log('Starting 20-agent shutdown benchmark...');
|
|
344
|
+
const startTime = Date.now();
|
|
345
|
+
const result = await cascadingShutdown.initiateShutdown('root', 'Performance benchmark');
|
|
346
|
+
const totalTime = Date.now() - startTime;
|
|
347
|
+
console.log('Benchmark Results:', {
|
|
348
|
+
totalAgents: result.totalAgents,
|
|
349
|
+
totalLatencyMs: totalTime,
|
|
350
|
+
targetMet: totalTime < 1000,
|
|
351
|
+
notificationLatencyMs: result.notificationLatencyMs,
|
|
352
|
+
aggregationLatencyMs: result.aggregationLatencyMs
|
|
353
|
+
});
|
|
354
|
+
// Assert performance target
|
|
355
|
+
if (totalTime < 1000) {
|
|
356
|
+
console.log('✅ Performance target achieved: <1s for 20 agents');
|
|
357
|
+
} else {
|
|
358
|
+
console.warn(`⚠️ Performance target missed: ${totalTime}ms > 1000ms`);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
// Export examples
|
|
362
|
+
export { example1_BasicShutdown, example2_EmergencyShutdown, example3_DeepHierarchy, example4_EventMonitoring, example5_CompletionIntegration, example6_PerformanceBenchmark };
|
|
363
|
+
|
|
364
|
+
//# sourceMappingURL=cascading-shutdown.example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.ts"],"names":["CascadingShutdown","example1_BasicShutdown","cascadingShutdown","undefined","maxShutdownTimeMs","createShutdownCheckpoints","enableResourceCleanup","notificationTimeoutMs","completionTimeoutMs","agentGracePeriodMs","registerHierarchy","agentId","level","childIds","resources","type","id","cleaned","parentId","registerResourceCleanup","resource","console","log","result","initiateShutdown","success","totalAgents","successfulShutdowns","totalLatencyMs","notificationLatencyMs","aggregationLatencyMs","resourcesCleaned","totalResourcesCleaned","example2_EmergencyShutdown","enableEmergencyMode","emergencyShutdown","latencyMs","reason","example3_DeepHierarchy","nodes","push","maxDepth","notificationLatency","aggregationLatency","levels","agentResults","map","r","sort","a","b","example4_EventMonitoring","on","data","completionLatencyMs","resourceType","resourceId","example5_CompletionIntegration","hierarchicalDetector","completionResult","detectCompletion","completed","shutdownResult","checkpointsCreated","filter","checkpointId","length","example6_PerformanceBenchmark","i","String","fromCharCode","startTime","Date","now","totalTime","targetMet","warn"],"mappings":"AAAA;;;;;CAKC,GAED,SAASA,iBAAiB,QAAQ,0BAA0B;AAG5D;;;;CAIC,GACD,eAAeC;IACb,MAAMC,oBAAoB,IAAIF,kBAAkBG,WAAW;QACzDC,mBAAmB;QACnBC,2BAA2B;QAC3BC,uBAAuB;QACvBC,uBAAuB;QACvBC,qBAAqB;QACrBC,oBAAoB;IACtB;IAEA,6BAA6B;IAC7BP,kBAAkBQ,iBAAiB,CAAC,WAAW,iBAAiB;QAC9D;YACEC,SAAS;YACTC,OAAO;YACPC,UAAU;gBAAC;gBAAW;aAAU;YAChCC,WAAW;gBACT;oBAAEC,MAAM;oBAAcC,IAAI;oBAAaC,SAAS;gBAAM;gBACtD;oBAAEF,MAAM;oBAAgBC,IAAI;oBAAeC,SAAS;gBAAM;aAC3D;QACH;QACA;YACEN,SAAS;YACTC,OAAO;YACPM,UAAU;YACVL,UAAU;gBAAC;gBAAW;aAAU;YAChCC,WAAW;gBACT;oBAAEC,MAAM;oBAAQC,IAAI;oBAA2BC,SAAS;gBAAM;aAC/D;QACH;QACA;YACEN,SAAS;YACTC,OAAO;YACPM,UAAU;YACVL,UAAU;gBAAC;aAAU;YACrBC,WAAW;gBACT;oBAAEC,MAAM;oBAAWC,IAAI;oBAAmBC,SAAS;gBAAM;aAC1D;QACH;QACA;YACEN,SAAS;YACTC,OAAO;YACPM,UAAU;YACVJ,WAAW,EAAE;QACf;QACA;YACEH,SAAS;YACTC,OAAO;YACPM,UAAU;YACVJ,WAAW,EAAE;QACf;QACA;YACEH,SAAS;YACTC,OAAO;YACPM,UAAU;YACVJ,WAAW,EAAE;QACf;KACD;IAED,qCAAqC;IACrCZ,kBAAkBiB,uBAAuB,CAAC,cAAc,OAAOC;QAC7DC,QAAQC,GAAG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