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,439 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Coordination V2 - Completion Storage Implementation
|
|
3
|
+
*
|
|
4
|
+
* Artifact-backed completion metrics persistence with MessagePack serialization and compression.
|
|
5
|
+
* Performance targets:
|
|
6
|
+
* - Save/load: <20ms p95
|
|
7
|
+
* - Storage efficiency: 3x compression ratio
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Binary MessagePack serialization (3x faster than JSON)
|
|
11
|
+
* - Gzip compression for storage efficiency
|
|
12
|
+
* - Completion timestamp and duration tracking
|
|
13
|
+
* - Agent count and swarm metadata
|
|
14
|
+
* - Schema versioning for backward compatibility
|
|
15
|
+
* - Integrity verification with checksums
|
|
16
|
+
*
|
|
17
|
+
* @module coordination/v2/memory/completion-storage
|
|
18
|
+
*/ import * as msgpack from 'msgpack-lite';
|
|
19
|
+
import { gzip, gunzip } from 'zlib';
|
|
20
|
+
import { promisify } from 'util';
|
|
21
|
+
import { createHash } from 'crypto';
|
|
22
|
+
const gzipAsync = promisify(gzip);
|
|
23
|
+
const gunzipAsync = promisify(gunzip);
|
|
24
|
+
/**
|
|
25
|
+
* Schema version for forward/backward compatibility
|
|
26
|
+
*/ const SCHEMA_VERSION = 1;
|
|
27
|
+
/**
|
|
28
|
+
* CompletionStorage - Artifact-backed completion metrics persistence
|
|
29
|
+
*
|
|
30
|
+
* Provides high-performance storage for swarm completion metrics using:
|
|
31
|
+
* - MessagePack binary serialization (smaller payloads)
|
|
32
|
+
* - Gzip compression (additional size reduction)
|
|
33
|
+
* - Schema versioning for compatibility
|
|
34
|
+
* - Integrity verification with checksums
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const storage = new CompletionStorage(artifactStorage);
|
|
39
|
+
* await storage.initialize();
|
|
40
|
+
*
|
|
41
|
+
* // Save completion metrics
|
|
42
|
+
* const metrics: CompletionMetrics = {
|
|
43
|
+
* swarmId: 'swarm-001',
|
|
44
|
+
* completedAt: Date.now(),
|
|
45
|
+
* startedAt: Date.now() - 60000,
|
|
46
|
+
* durationMs: 60000,
|
|
47
|
+
* agentCount: 5,
|
|
48
|
+
* agentIds: ['agent-1', 'agent-2', 'agent-3', 'agent-4', 'agent-5'],
|
|
49
|
+
* consensusScore: 0.95,
|
|
50
|
+
* testCoverage: 87.5,
|
|
51
|
+
* status: 'success',
|
|
52
|
+
* metadata: {}
|
|
53
|
+
* };
|
|
54
|
+
* await storage.saveCompletion(metrics);
|
|
55
|
+
*
|
|
56
|
+
* // Load completion metrics
|
|
57
|
+
* const loaded = await storage.loadCompletion('swarm-001');
|
|
58
|
+
*
|
|
59
|
+
* // Query completions
|
|
60
|
+
* const successful = await storage.queryCompletions({
|
|
61
|
+
* status: ['success'],
|
|
62
|
+
* minConsensusScore: 0.90,
|
|
63
|
+
* limit: 10
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*/ export class CompletionStorage {
|
|
67
|
+
artifactStorage;
|
|
68
|
+
metrics;
|
|
69
|
+
latencyBuffer = [];
|
|
70
|
+
ready = false;
|
|
71
|
+
constructor(artifactStorage){
|
|
72
|
+
this.artifactStorage = artifactStorage;
|
|
73
|
+
this.metrics = this.initializeMetrics();
|
|
74
|
+
}
|
|
75
|
+
// ===========================
|
|
76
|
+
// Lifecycle
|
|
77
|
+
// ===========================
|
|
78
|
+
/**
|
|
79
|
+
* Initialize storage backend
|
|
80
|
+
*/ async initialize() {
|
|
81
|
+
if (!this.artifactStorage.isReady()) {
|
|
82
|
+
await this.artifactStorage.initialize();
|
|
83
|
+
}
|
|
84
|
+
this.ready = true;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Close storage connections
|
|
88
|
+
*/ async close() {
|
|
89
|
+
this.ready = false;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check if storage is ready
|
|
93
|
+
*/ isReady() {
|
|
94
|
+
return this.ready && this.artifactStorage.isReady();
|
|
95
|
+
}
|
|
96
|
+
// ===========================
|
|
97
|
+
// Core Persistence Operations
|
|
98
|
+
// ===========================
|
|
99
|
+
/**
|
|
100
|
+
* Save completion metrics to artifact storage
|
|
101
|
+
*
|
|
102
|
+
* Performance target: <20ms p95
|
|
103
|
+
*
|
|
104
|
+
* @param metrics - CompletionMetrics to persist
|
|
105
|
+
* @throws Error if serialization or storage fails
|
|
106
|
+
*/ async saveCompletion(metrics) {
|
|
107
|
+
this.ensureReady();
|
|
108
|
+
const startTime = Date.now();
|
|
109
|
+
try {
|
|
110
|
+
// Calculate checksum of metrics
|
|
111
|
+
const metricsJson = JSON.stringify(metrics);
|
|
112
|
+
const checksum = this.calculateChecksum(Buffer.from(metricsJson));
|
|
113
|
+
// Create serialized structure
|
|
114
|
+
const serialized = {
|
|
115
|
+
version: SCHEMA_VERSION,
|
|
116
|
+
metrics,
|
|
117
|
+
checksum,
|
|
118
|
+
serializedAt: Date.now()
|
|
119
|
+
};
|
|
120
|
+
// Encode with MessagePack (binary)
|
|
121
|
+
const packed = msgpack.encode(serialized);
|
|
122
|
+
// Compress with gzip
|
|
123
|
+
const compressed = await gzipAsync(packed);
|
|
124
|
+
// Store in artifact storage
|
|
125
|
+
await this.artifactStorage.uploadArtifact('completion-storage', metrics.swarmId, compressed, {
|
|
126
|
+
type: 'completion-metrics',
|
|
127
|
+
filename: `${metrics.swarmId}.msgpack.gz`,
|
|
128
|
+
tags: [
|
|
129
|
+
'completion',
|
|
130
|
+
'metrics',
|
|
131
|
+
metrics.swarmId,
|
|
132
|
+
metrics.status,
|
|
133
|
+
...metrics.phaseId ? [
|
|
134
|
+
metrics.phaseId
|
|
135
|
+
] : []
|
|
136
|
+
],
|
|
137
|
+
metadata: {
|
|
138
|
+
schemaVersion: SCHEMA_VERSION,
|
|
139
|
+
swarmId: metrics.swarmId,
|
|
140
|
+
completedAt: metrics.completedAt,
|
|
141
|
+
durationMs: metrics.durationMs,
|
|
142
|
+
agentCount: metrics.agentCount,
|
|
143
|
+
status: metrics.status,
|
|
144
|
+
consensusScore: metrics.consensusScore,
|
|
145
|
+
testCoverage: metrics.testCoverage,
|
|
146
|
+
phaseId: metrics.phaseId,
|
|
147
|
+
uncompressedBytes: packed.length,
|
|
148
|
+
compressedBytes: compressed.length,
|
|
149
|
+
checksum
|
|
150
|
+
},
|
|
151
|
+
forceCompression: false // Already compressed
|
|
152
|
+
});
|
|
153
|
+
// Update metrics
|
|
154
|
+
const latency = Date.now() - startTime;
|
|
155
|
+
this.updateSaveMetrics(latency);
|
|
156
|
+
// Performance warning if exceeds target
|
|
157
|
+
if (latency > 20) {
|
|
158
|
+
console.warn(`[CompletionStorage] Save latency ${latency}ms exceeds 20ms target for swarm ${metrics.swarmId}`);
|
|
159
|
+
}
|
|
160
|
+
} catch (error) {
|
|
161
|
+
throw new Error(`Failed to save completion metrics for ${metrics.swarmId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Load completion metrics from artifact storage
|
|
166
|
+
*
|
|
167
|
+
* Performance target: <20ms p95
|
|
168
|
+
*
|
|
169
|
+
* @param swarmId - Swarm identifier
|
|
170
|
+
* @returns CompletionMetrics
|
|
171
|
+
* @throws Error if not found or deserialization fails
|
|
172
|
+
*/ async loadCompletion(swarmId) {
|
|
173
|
+
this.ensureReady();
|
|
174
|
+
const startTime = Date.now();
|
|
175
|
+
try {
|
|
176
|
+
// Query for completion artifacts
|
|
177
|
+
const artifacts = await this.artifactStorage.queryArtifacts({
|
|
178
|
+
sessionId: swarmId,
|
|
179
|
+
type: [
|
|
180
|
+
'completion-metrics'
|
|
181
|
+
],
|
|
182
|
+
sortBy: 'createdAt',
|
|
183
|
+
sortOrder: 'desc',
|
|
184
|
+
limit: 1
|
|
185
|
+
});
|
|
186
|
+
if (artifacts.length === 0) {
|
|
187
|
+
throw new Error(`Completion metrics for swarm ${swarmId} not found in storage`);
|
|
188
|
+
}
|
|
189
|
+
// Download artifact
|
|
190
|
+
const result = await this.artifactStorage.downloadArtifact(artifacts[0].artifactId);
|
|
191
|
+
// Decompress
|
|
192
|
+
const decompressed = await gunzipAsync(result.content);
|
|
193
|
+
// Decode MessagePack
|
|
194
|
+
const serialized = msgpack.decode(decompressed);
|
|
195
|
+
// Validate schema version
|
|
196
|
+
if (serialized.version > SCHEMA_VERSION) {
|
|
197
|
+
throw new Error(`Unsupported schema version ${serialized.version}, current: ${SCHEMA_VERSION}`);
|
|
198
|
+
}
|
|
199
|
+
// Verify checksum
|
|
200
|
+
const metricsJson = JSON.stringify(serialized.metrics);
|
|
201
|
+
const calculatedChecksum = this.calculateChecksum(Buffer.from(metricsJson));
|
|
202
|
+
if (calculatedChecksum !== serialized.checksum) {
|
|
203
|
+
throw new Error(`Checksum mismatch for swarm ${swarmId}: expected ${serialized.checksum}, got ${calculatedChecksum}`);
|
|
204
|
+
}
|
|
205
|
+
// Update metrics
|
|
206
|
+
const latency = Date.now() - startTime;
|
|
207
|
+
this.updateLoadMetrics(latency);
|
|
208
|
+
// Performance warning if exceeds target
|
|
209
|
+
if (latency > 20) {
|
|
210
|
+
console.warn(`[CompletionStorage] Load latency ${latency}ms exceeds 20ms target for swarm ${swarmId}`);
|
|
211
|
+
}
|
|
212
|
+
return serialized.metrics;
|
|
213
|
+
} catch (error) {
|
|
214
|
+
throw new Error(`Failed to load completion metrics for ${swarmId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Query completion metrics with filtering
|
|
219
|
+
*
|
|
220
|
+
* @param filter - Query filter criteria
|
|
221
|
+
* @returns Array of matching CompletionMetrics
|
|
222
|
+
*/ async queryCompletions(filter) {
|
|
223
|
+
this.ensureReady();
|
|
224
|
+
const startTime = Date.now();
|
|
225
|
+
try {
|
|
226
|
+
// Build artifact query
|
|
227
|
+
const tags = [
|
|
228
|
+
'completion'
|
|
229
|
+
];
|
|
230
|
+
if (filter.phaseId) {
|
|
231
|
+
tags.push(filter.phaseId);
|
|
232
|
+
}
|
|
233
|
+
if (filter.status) {
|
|
234
|
+
tags.push(...filter.status);
|
|
235
|
+
}
|
|
236
|
+
// Query artifacts
|
|
237
|
+
const artifacts = await this.artifactStorage.queryArtifacts({
|
|
238
|
+
tags,
|
|
239
|
+
type: [
|
|
240
|
+
'completion-metrics'
|
|
241
|
+
],
|
|
242
|
+
sortBy: filter.sortBy === 'completedAt' ? 'createdAt' : 'createdAt',
|
|
243
|
+
sortOrder: filter.sortOrder || 'desc',
|
|
244
|
+
limit: filter.limit
|
|
245
|
+
});
|
|
246
|
+
// Load and filter metrics
|
|
247
|
+
const completions = [];
|
|
248
|
+
for (const artifact of artifacts){
|
|
249
|
+
try {
|
|
250
|
+
const result = await this.artifactStorage.downloadArtifact(artifact.artifactId);
|
|
251
|
+
const decompressed = await gunzipAsync(result.content);
|
|
252
|
+
const serialized = msgpack.decode(decompressed);
|
|
253
|
+
const metrics = serialized.metrics;
|
|
254
|
+
// Apply additional filters
|
|
255
|
+
if (filter.swarmId && metrics.swarmId !== filter.swarmId) {
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
if (filter.completedAfter && metrics.completedAt < filter.completedAfter) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (filter.completedBefore && metrics.completedAt > filter.completedBefore) {
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
if (filter.minConsensusScore !== undefined && (metrics.consensusScore === undefined || metrics.consensusScore < filter.minConsensusScore)) {
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
if (filter.minTestCoverage !== undefined && (metrics.testCoverage === undefined || metrics.testCoverage < filter.minTestCoverage)) {
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
completions.push(metrics);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
console.warn(`[CompletionStorage] Failed to load artifact ${artifact.artifactId}:`, error);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// Sort if needed
|
|
277
|
+
if (filter.sortBy && filter.sortBy !== 'completedAt') {
|
|
278
|
+
completions.sort((a, b)=>{
|
|
279
|
+
const aVal = a[filter.sortBy];
|
|
280
|
+
const bVal = b[filter.sortBy];
|
|
281
|
+
return filter.sortOrder === 'asc' ? aVal - bVal : bVal - aVal;
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
// Update metrics
|
|
285
|
+
const latency = Date.now() - startTime;
|
|
286
|
+
this.metrics.totalQueries++;
|
|
287
|
+
this.metrics.lastOperationMs = latency;
|
|
288
|
+
return completions;
|
|
289
|
+
} catch (error) {
|
|
290
|
+
throw new Error(`Failed to query completion metrics: ${error instanceof Error ? error.message : String(error)}`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Delete completion metrics
|
|
295
|
+
*
|
|
296
|
+
* @param swarmId - Swarm identifier
|
|
297
|
+
* @returns Promise resolving when deleted
|
|
298
|
+
*/ async deleteCompletion(swarmId) {
|
|
299
|
+
this.ensureReady();
|
|
300
|
+
try {
|
|
301
|
+
const artifacts = await this.artifactStorage.queryArtifacts({
|
|
302
|
+
sessionId: swarmId,
|
|
303
|
+
type: [
|
|
304
|
+
'completion-metrics'
|
|
305
|
+
]
|
|
306
|
+
});
|
|
307
|
+
for (const artifact of artifacts){
|
|
308
|
+
await this.artifactStorage.deleteArtifact(artifact.artifactId);
|
|
309
|
+
}
|
|
310
|
+
} catch (error) {
|
|
311
|
+
throw new Error(`Failed to delete completion metrics for ${swarmId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Get completion count for phase
|
|
316
|
+
*
|
|
317
|
+
* @param phaseId - Phase identifier
|
|
318
|
+
* @returns Number of completions in phase
|
|
319
|
+
*/ async getPhaseCompletionCount(phaseId) {
|
|
320
|
+
const completions = await this.queryCompletions({
|
|
321
|
+
phaseId,
|
|
322
|
+
limit: 10000 // High limit to get all
|
|
323
|
+
});
|
|
324
|
+
return completions.length;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Get average completion duration for phase
|
|
328
|
+
*
|
|
329
|
+
* @param phaseId - Phase identifier
|
|
330
|
+
* @returns Average duration in milliseconds
|
|
331
|
+
*/ async getPhaseAverageDuration(phaseId) {
|
|
332
|
+
const completions = await this.queryCompletions({
|
|
333
|
+
phaseId,
|
|
334
|
+
limit: 10000
|
|
335
|
+
});
|
|
336
|
+
if (completions.length === 0) {
|
|
337
|
+
return 0;
|
|
338
|
+
}
|
|
339
|
+
const totalDuration = completions.reduce((sum, c)=>sum + c.durationMs, 0);
|
|
340
|
+
return totalDuration / completions.length;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Get phase success rate
|
|
344
|
+
*
|
|
345
|
+
* @param phaseId - Phase identifier
|
|
346
|
+
* @returns Success rate (0-1)
|
|
347
|
+
*/ async getPhaseSuccessRate(phaseId) {
|
|
348
|
+
const completions = await this.queryCompletions({
|
|
349
|
+
phaseId,
|
|
350
|
+
limit: 10000
|
|
351
|
+
});
|
|
352
|
+
if (completions.length === 0) {
|
|
353
|
+
return 0;
|
|
354
|
+
}
|
|
355
|
+
const successCount = completions.filter((c)=>c.status === 'success').length;
|
|
356
|
+
return successCount / completions.length;
|
|
357
|
+
}
|
|
358
|
+
// ===========================
|
|
359
|
+
// Utility Methods
|
|
360
|
+
// ===========================
|
|
361
|
+
/**
|
|
362
|
+
* Calculate SHA-256 checksum for integrity verification
|
|
363
|
+
*/ calculateChecksum(buffer) {
|
|
364
|
+
return createHash('sha256').update(buffer).digest('hex');
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Ensure storage is ready for operations
|
|
368
|
+
*/ ensureReady() {
|
|
369
|
+
if (!this.ready) {
|
|
370
|
+
throw new Error('CompletionStorage not initialized. Call initialize() first.');
|
|
371
|
+
}
|
|
372
|
+
if (!this.artifactStorage.isReady()) {
|
|
373
|
+
throw new Error('Artifact storage backend not ready');
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
// ===========================
|
|
377
|
+
// Metrics & Monitoring
|
|
378
|
+
// ===========================
|
|
379
|
+
/**
|
|
380
|
+
* Get storage performance metrics
|
|
381
|
+
*/ getMetrics() {
|
|
382
|
+
return {
|
|
383
|
+
...this.metrics
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Initialize metrics structure
|
|
388
|
+
*/ initializeMetrics() {
|
|
389
|
+
return {
|
|
390
|
+
totalSaves: 0,
|
|
391
|
+
totalLoads: 0,
|
|
392
|
+
totalQueries: 0,
|
|
393
|
+
averageSaveMs: 0,
|
|
394
|
+
averageLoadMs: 0,
|
|
395
|
+
p95SaveMs: 0,
|
|
396
|
+
p95LoadMs: 0,
|
|
397
|
+
lastOperationMs: 0
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Update save operation metrics
|
|
402
|
+
*/ updateSaveMetrics(latency) {
|
|
403
|
+
this.metrics.totalSaves++;
|
|
404
|
+
this.metrics.averageSaveMs = this.updateAverage(this.metrics.averageSaveMs, latency, this.metrics.totalSaves);
|
|
405
|
+
this.latencyBuffer.push(latency);
|
|
406
|
+
this.metrics.p95SaveMs = this.calculateP95();
|
|
407
|
+
this.metrics.lastOperationMs = latency;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Update load operation metrics
|
|
411
|
+
*/ updateLoadMetrics(latency) {
|
|
412
|
+
this.metrics.totalLoads++;
|
|
413
|
+
this.metrics.averageLoadMs = this.updateAverage(this.metrics.averageLoadMs, latency, this.metrics.totalLoads);
|
|
414
|
+
this.latencyBuffer.push(latency);
|
|
415
|
+
this.metrics.p95LoadMs = this.calculateP95();
|
|
416
|
+
this.metrics.lastOperationMs = latency;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Calculate rolling average
|
|
420
|
+
*/ updateAverage(current, newValue, count) {
|
|
421
|
+
return (current * (count - 1) + newValue) / count;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Calculate 95th percentile latency
|
|
425
|
+
*/ calculateP95() {
|
|
426
|
+
if (this.latencyBuffer.length === 0) return 0;
|
|
427
|
+
// Keep buffer size manageable
|
|
428
|
+
if (this.latencyBuffer.length > 1000) {
|
|
429
|
+
this.latencyBuffer = this.latencyBuffer.slice(-1000);
|
|
430
|
+
}
|
|
431
|
+
const sorted = [
|
|
432
|
+
...this.latencyBuffer
|
|
433
|
+
].sort((a, b)=>a - b);
|
|
434
|
+
const index = Math.floor(sorted.length * 0.95);
|
|
435
|
+
return sorted[index] || 0;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
//# sourceMappingURL=completion-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.ts"],"names":["msgpack","gzip","gunzip","promisify","createHash","gzipAsync","gunzipAsync","SCHEMA_VERSION","CompletionStorage","artifactStorage","metrics","latencyBuffer","ready","initializeMetrics","initialize","isReady","close","saveCompletion","ensureReady","startTime","Date","now","metricsJson","JSON","stringify","checksum","calculateChecksum","Buffer","from","serialized","version","serializedAt","packed","encode","compressed","uploadArtifact","swarmId","type","filename","tags","status","phaseId","metadata","schemaVersion","completedAt","durationMs","agentCount","consensusScore","testCoverage","uncompressedBytes","length","compressedBytes","forceCompression","latency","updateSaveMetrics","console","warn","error","Error","message","String","loadCompletion","artifacts","queryArtifacts","sessionId","sortBy","sortOrder","limit","result","downloadArtifact","artifactId","decompressed","content","decode","calculatedChecksum","updateLoadMetrics","queryCompletions","filter","push","completions","artifact","completedAfter","completedBefore","minConsensusScore","undefined","minTestCoverage","sort","a","b","aVal","bVal","totalQueries","lastOperationMs","deleteCompletion","deleteArtifact","getPhaseCompletionCount","getPhaseAverageDuration","totalDuration","reduce","sum","c","getPhaseSuccessRate","successCount","buffer","update","digest","getMetrics","totalSaves","totalLoads","averageSaveMs","averageLoadMs","p95SaveMs","p95LoadMs","updateAverage","calculateP95","current","newValue","count","slice","sorted","index","Math","floor"],"mappings":"AAAA;;;;;;;;;;;;;;;;;CAiBC,GAGD,YAAYA,aAAa,eAAe;AACxC,SAASC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACpC,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,UAAU,QAAQ,SAAS;AAEpC,MAAMC,YAAYF,UAAUF;AAC5B,MAAMK,cAAcH,UAAUD;AAE9B;;CAEC,GACD,MAAMK,iBAAiB;AA4GvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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