agentic-qe 3.6.7 → 3.6.9
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/skills/README.md +1 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/package.json +5 -2
- package/scripts/benchmark-aqe-baseline.ts +614 -0
- package/v3/CHANGELOG.md +33 -0
- package/v3/dist/adapters/a2a/agent-cards/generator.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/agent-cards/generator.js +2 -1
- package/v3/dist/adapters/a2a/agent-cards/generator.js.map +1 -1
- package/v3/dist/adapters/a2a/auth/jwt-utils.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/auth/jwt-utils.js +3 -2
- package/v3/dist/adapters/a2a/auth/jwt-utils.js.map +1 -1
- package/v3/dist/adapters/a2a/auth/middleware.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/auth/middleware.js +3 -0
- package/v3/dist/adapters/a2a/auth/middleware.js.map +1 -1
- package/v3/dist/adapters/a2a/discovery/agent-health.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/discovery/agent-health.js +4 -3
- package/v3/dist/adapters/a2a/discovery/agent-health.js.map +1 -1
- package/v3/dist/adapters/a2a/discovery/file-watcher.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/discovery/file-watcher.js +3 -2
- package/v3/dist/adapters/a2a/discovery/file-watcher.js.map +1 -1
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.js +6 -5
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.js.map +1 -1
- package/v3/dist/adapters/a2a/jsonrpc/envelope.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/jsonrpc/envelope.js +5 -4
- package/v3/dist/adapters/a2a/jsonrpc/envelope.js.map +1 -1
- package/v3/dist/adapters/ag-ui/event-adapter.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/event-adapter.js +2 -1
- package/v3/dist/adapters/ag-ui/event-adapter.js.map +1 -1
- package/v3/dist/adapters/ag-ui/event-batcher.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/event-batcher.js +2 -1
- package/v3/dist/adapters/ag-ui/event-batcher.js.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch-utils.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch-utils.js +2 -1
- package/v3/dist/adapters/ag-ui/json-patch-utils.js.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch.d.ts +1 -1
- package/v3/dist/adapters/ag-ui/json-patch.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch.js +4 -6
- package/v3/dist/adapters/ag-ui/json-patch.js.map +1 -1
- package/v3/dist/adapters/ag-ui/stream-controller.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/stream-controller.js +3 -0
- package/v3/dist/adapters/ag-ui/stream-controller.js.map +1 -1
- package/v3/dist/adapters/claude-flow/detect.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/detect.js +4 -3
- package/v3/dist/adapters/claude-flow/detect.js.map +1 -1
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js +7 -5
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -1
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js +2 -14
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -1
- package/v3/dist/adapters/trajectory-adapter.d.ts.map +1 -1
- package/v3/dist/adapters/trajectory-adapter.js +5 -3
- package/v3/dist/adapters/trajectory-adapter.js.map +1 -1
- package/v3/dist/agents/claim-verifier/verifiers/test-verifier.d.ts.map +1 -1
- package/v3/dist/agents/claim-verifier/verifiers/test-verifier.js +2 -1
- package/v3/dist/agents/claim-verifier/verifiers/test-verifier.js.map +1 -1
- package/v3/dist/benchmarks/performance-benchmarks.d.ts.map +1 -1
- package/v3/dist/benchmarks/performance-benchmarks.js +4 -3
- package/v3/dist/benchmarks/performance-benchmarks.js.map +1 -1
- package/v3/dist/benchmarks/run-benchmarks.js +27 -45
- package/v3/dist/benchmarks/run-benchmarks.js.map +1 -1
- package/v3/dist/cli/bundle.js +13395 -14755
- package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -1
- package/v3/dist/cli/commands/claude-flow-setup.js +7 -5
- package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -1
- package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
- package/v3/dist/cli/commands/hooks.js +2 -1
- package/v3/dist/cli/commands/hooks.js.map +1 -1
- package/v3/dist/cli/commands/init.d.ts.map +1 -1
- package/v3/dist/cli/commands/init.js +2 -1
- package/v3/dist/cli/commands/init.js.map +1 -1
- package/v3/dist/cli/commands/learning-helpers.d.ts +101 -0
- package/v3/dist/cli/commands/learning-helpers.d.ts.map +1 -0
- package/v3/dist/cli/commands/learning-helpers.js +294 -0
- package/v3/dist/cli/commands/learning-helpers.js.map +1 -0
- package/v3/dist/cli/commands/learning.d.ts +1 -6
- package/v3/dist/cli/commands/learning.d.ts.map +1 -1
- package/v3/dist/cli/commands/learning.js +230 -839
- package/v3/dist/cli/commands/learning.js.map +1 -1
- package/v3/dist/cli/commands/qe-tools.d.ts.map +1 -1
- package/v3/dist/cli/commands/qe-tools.js +2 -1
- package/v3/dist/cli/commands/qe-tools.js.map +1 -1
- package/v3/dist/cli/commands/sync.d.ts.map +1 -1
- package/v3/dist/cli/commands/sync.js +5 -4
- package/v3/dist/cli/commands/sync.js.map +1 -1
- package/v3/dist/cli/commands/token-usage.d.ts.map +1 -1
- package/v3/dist/cli/commands/token-usage.js +2 -1
- package/v3/dist/cli/commands/token-usage.js.map +1 -1
- package/v3/dist/cli/commands/validate.d.ts.map +1 -1
- package/v3/dist/cli/commands/validate.js +3 -2
- package/v3/dist/cli/commands/validate.js.map +1 -1
- package/v3/dist/cli/config/cli-config.d.ts.map +1 -1
- package/v3/dist/cli/config/cli-config.js +2 -1
- package/v3/dist/cli/config/cli-config.js.map +1 -1
- package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -1
- package/v3/dist/cli/handlers/init-handler.js +3 -2
- package/v3/dist/cli/handlers/init-handler.js.map +1 -1
- package/v3/dist/cli/helpers/safe-json.d.ts +4 -48
- package/v3/dist/cli/helpers/safe-json.d.ts.map +1 -1
- package/v3/dist/cli/helpers/safe-json.js +4 -68
- package/v3/dist/cli/helpers/safe-json.js.map +1 -1
- package/v3/dist/cli/index.js +3 -2
- package/v3/dist/cli/index.js.map +1 -1
- package/v3/dist/cli/scheduler/persistent-scheduler.d.ts.map +1 -1
- package/v3/dist/cli/scheduler/persistent-scheduler.js +4 -2
- package/v3/dist/cli/scheduler/persistent-scheduler.js.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.js +2 -1
- package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
- package/v3/dist/coordination/agent-teams/tracing.d.ts.map +1 -1
- package/v3/dist/coordination/agent-teams/tracing.js +2 -1
- package/v3/dist/coordination/agent-teams/tracing.js.map +1 -1
- package/v3/dist/coordination/circuit-breaker/breaker-registry.d.ts.map +1 -1
- package/v3/dist/coordination/circuit-breaker/breaker-registry.js +3 -2
- package/v3/dist/coordination/circuit-breaker/breaker-registry.js.map +1 -1
- package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.d.ts.map +1 -1
- package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.js +3 -2
- package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.js.map +1 -1
- package/v3/dist/coordination/consensus/consensus-engine.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/consensus-engine.js +7 -6
- package/v3/dist/coordination/consensus/consensus-engine.js.map +1 -1
- package/v3/dist/coordination/consensus/model-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/model-provider.js +2 -1
- package/v3/dist/coordination/consensus/model-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/claude-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/claude-provider.js +13 -12
- package/v3/dist/coordination/consensus/providers/claude-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/gemini-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/gemini-provider.js +13 -12
- package/v3/dist/coordination/consensus/providers/gemini-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/native-learning-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/native-learning-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/native-learning-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/ollama-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/ollama-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/ollama-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/openai-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/openai-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/openai-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/openrouter-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/openrouter-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/openrouter-provider.js.map +1 -1
- package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.d.ts.map +1 -1
- package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.js +5 -4
- package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.js.map +1 -1
- package/v3/dist/coordination/mincut/dream-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/dream-integration.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +4 -2
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.js +13 -3
- package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-persistence.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-persistence.js +5 -4
- package/v3/dist/coordination/mincut/mincut-persistence.js.map +1 -1
- package/v3/dist/coordination/mincut/neural-goap.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/neural-goap.js +2 -1
- package/v3/dist/coordination/mincut/neural-goap.js.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.js +7 -2
- package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
- package/v3/dist/coordination/mincut/strange-loop.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/strange-loop.js +10 -2
- package/v3/dist/coordination/mincut/strange-loop.js.map +1 -1
- package/v3/dist/coordination/mincut/time-crystal.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/time-crystal.js +2 -1
- package/v3/dist/coordination/mincut/time-crystal.js.map +1 -1
- package/v3/dist/coordination/mixins/consensus-enabled-domain.d.ts +19 -3
- package/v3/dist/coordination/mixins/consensus-enabled-domain.d.ts.map +1 -1
- package/v3/dist/coordination/mixins/consensus-enabled-domain.js +6 -2
- package/v3/dist/coordination/mixins/consensus-enabled-domain.js.map +1 -1
- package/v3/dist/coordination/plugin.d.ts +1 -1
- package/v3/dist/coordination/plugin.d.ts.map +1 -1
- package/v3/dist/coordination/plugin.js +1 -1
- package/v3/dist/coordination/plugin.js.map +1 -1
- package/v3/dist/coordination/protocol-executor.d.ts.map +1 -1
- package/v3/dist/coordination/protocol-executor.js +4 -3
- package/v3/dist/coordination/protocol-executor.js.map +1 -1
- package/v3/dist/coordination/protocols/code-intelligence-index.d.ts +1 -1
- package/v3/dist/coordination/protocols/code-intelligence-index.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/code-intelligence-index.js +22 -10
- package/v3/dist/coordination/protocols/code-intelligence-index.js.map +1 -1
- package/v3/dist/coordination/protocols/defect-investigation.d.ts +2 -2
- package/v3/dist/coordination/protocols/defect-investigation.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/defect-investigation.js +16 -7
- package/v3/dist/coordination/protocols/defect-investigation.js.map +1 -1
- package/v3/dist/coordination/protocols/learning-consolidation.d.ts +1 -1
- package/v3/dist/coordination/protocols/learning-consolidation.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/learning-consolidation.js +6 -5
- package/v3/dist/coordination/protocols/learning-consolidation.js.map +1 -1
- package/v3/dist/coordination/protocols/morning-sync.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/morning-sync.js +2 -1
- package/v3/dist/coordination/protocols/morning-sync.js.map +1 -1
- package/v3/dist/coordination/protocols/quality-gate.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/quality-gate.js +6 -5
- package/v3/dist/coordination/protocols/quality-gate.js.map +1 -1
- package/v3/dist/coordination/protocols/security-audit.d.ts +1 -1
- package/v3/dist/coordination/protocols/security-audit.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/security-audit.js +35 -13
- package/v3/dist/coordination/protocols/security-audit.js.map +1 -1
- package/v3/dist/coordination/queen-coordinator.d.ts +26 -257
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +282 -1175
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/coordination/queen-event-handlers.d.ts +61 -0
- package/v3/dist/coordination/queen-event-handlers.d.ts.map +1 -0
- package/v3/dist/coordination/queen-event-handlers.js +311 -0
- package/v3/dist/coordination/queen-event-handlers.js.map +1 -0
- package/v3/dist/coordination/queen-lifecycle.d.ts +61 -0
- package/v3/dist/coordination/queen-lifecycle.d.ts.map +1 -0
- package/v3/dist/coordination/queen-lifecycle.js +162 -0
- package/v3/dist/coordination/queen-lifecycle.js.map +1 -0
- package/v3/dist/coordination/queen-task-management.d.ts +84 -0
- package/v3/dist/coordination/queen-task-management.d.ts.map +1 -0
- package/v3/dist/coordination/queen-task-management.js +333 -0
- package/v3/dist/coordination/queen-task-management.js.map +1 -0
- package/v3/dist/coordination/queen-types.d.ts +175 -0
- package/v3/dist/coordination/queen-types.d.ts.map +1 -0
- package/v3/dist/coordination/queen-types.js +80 -0
- package/v3/dist/coordination/queen-types.js.map +1 -0
- package/v3/dist/coordination/queen-work-stealing.d.ts +33 -0
- package/v3/dist/coordination/queen-work-stealing.d.ts.map +1 -0
- package/v3/dist/coordination/queen-work-stealing.js +78 -0
- package/v3/dist/coordination/queen-work-stealing.js.map +1 -0
- package/v3/dist/coordination/result-saver.d.ts.map +1 -1
- package/v3/dist/coordination/result-saver.js +2 -1
- package/v3/dist/coordination/result-saver.js.map +1 -1
- package/v3/dist/coordination/task-executor.d.ts +45 -2
- package/v3/dist/coordination/task-executor.d.ts.map +1 -1
- package/v3/dist/coordination/task-executor.js +643 -570
- package/v3/dist/coordination/task-executor.js.map +1 -1
- package/v3/dist/coordination/workflow-builtin.d.ts +17 -0
- package/v3/dist/coordination/workflow-builtin.d.ts.map +1 -0
- package/v3/dist/coordination/workflow-builtin.js +648 -0
- package/v3/dist/coordination/workflow-builtin.js.map +1 -0
- package/v3/dist/coordination/workflow-orchestrator.d.ts +13 -300
- package/v3/dist/coordination/workflow-orchestrator.d.ts.map +1 -1
- package/v3/dist/coordination/workflow-orchestrator.js +142 -1009
- package/v3/dist/coordination/workflow-orchestrator.js.map +1 -1
- package/v3/dist/coordination/workflow-types.d.ts +250 -0
- package/v3/dist/coordination/workflow-types.d.ts.map +1 -0
- package/v3/dist/coordination/workflow-types.js +27 -0
- package/v3/dist/coordination/workflow-types.js.map +1 -0
- package/v3/dist/domains/base-domain-coordinator.d.ts +119 -0
- package/v3/dist/domains/base-domain-coordinator.d.ts.map +1 -0
- package/v3/dist/domains/base-domain-coordinator.js +200 -0
- package/v3/dist/domains/base-domain-coordinator.js.map +1 -0
- package/v3/dist/domains/chaos-resilience/coordinator.d.ts +12 -70
- package/v3/dist/domains/chaos-resilience/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/coordinator.js +25 -181
- package/v3/dist/domains/chaos-resilience/coordinator.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js +2 -1
- package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.js +15 -13
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/load-tester.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/load-tester.js +8 -7
- package/v3/dist/domains/chaos-resilience/services/load-tester.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.js +7 -5
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.js.map +1 -1
- package/v3/dist/domains/code-intelligence/coordinator-consensus.d.ts +33 -0
- package/v3/dist/domains/code-intelligence/coordinator-consensus.d.ts.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-consensus.js +81 -0
- package/v3/dist/domains/code-intelligence/coordinator-consensus.js.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.d.ts +44 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.d.ts.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.js +183 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.js.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.d.ts +40 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.d.ts.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.js +191 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.js.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator.d.ts +17 -93
- package/v3/dist/domains/code-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/coordinator.js +46 -565
- package/v3/dist/domains/code-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/code-intelligence/index.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/index.js +10 -0
- package/v3/dist/domains/code-intelligence/index.js.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.js +2 -1
- package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/index.d.ts +3 -3
- package/v3/dist/domains/code-intelligence/services/c4-model/index.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/index.js +2 -2
- package/v3/dist/domains/code-intelligence/services/c4-model/index.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/types.d.ts +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/types.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/impact-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/impact-analyzer.js +3 -2
- package/v3/dist/domains/code-intelligence/services/impact-analyzer.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.js +8 -6
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +3 -2
- package/v3/dist/domains/code-intelligence/services/metric-collector/loc-counter.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/test-counter.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/test-counter.js +3 -2
- package/v3/dist/domains/code-intelligence/services/metric-collector/test-counter.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js +8 -6
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/semantic-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/semantic-analyzer.js +5 -4
- package/v3/dist/domains/code-intelligence/services/semantic-analyzer.js.map +1 -1
- package/v3/dist/domains/contract-testing/coordinator.d.ts +13 -89
- package/v3/dist/domains/contract-testing/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/coordinator.js +43 -215
- package/v3/dist/domains/contract-testing/coordinator.js.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.js +5 -4
- package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/api-compatibility.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/api-compatibility.js +7 -5
- package/v3/dist/domains/contract-testing/services/api-compatibility.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.js +10 -8
- package/v3/dist/domains/contract-testing/services/contract-validator.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/schema-validator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/schema-validator.js +10 -8
- package/v3/dist/domains/contract-testing/services/schema-validator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/coordinator.d.ts +8 -59
- package/v3/dist/domains/coverage-analysis/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/coordinator.js +30 -138
- package/v3/dist/domains/coverage-analysis/coordinator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/index.js +7 -0
- package/v3/dist/domains/coverage-analysis/index.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.js +5 -3
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-parser.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-parser.js +2 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-parser.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/gap-detector.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/gap-detector.js +6 -4
- package/v3/dist/domains/coverage-analysis/services/gap-detector.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.js +5 -4
- package/v3/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/risk-scorer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/risk-scorer.js +3 -2
- package/v3/dist/domains/coverage-analysis/services/risk-scorer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/sublinear-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/sublinear-analyzer.js +4 -3
- package/v3/dist/domains/coverage-analysis/services/sublinear-analyzer.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts +10 -58
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.js +50 -171
- package/v3/dist/domains/defect-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.js +2 -1
- package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.js +4 -3
- package/v3/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js +6 -4
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/pattern-learner.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/pattern-learner.js +4 -3
- package/v3/dist/domains/defect-intelligence/services/pattern-learner.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.js +6 -4
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.js.map +1 -1
- package/v3/dist/domains/domain-interface.d.ts +6 -219
- package/v3/dist/domains/domain-interface.d.ts.map +1 -1
- package/v3/dist/domains/domain-interface.js +6 -312
- package/v3/dist/domains/domain-interface.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/coordinator.d.ts +11 -37
- package/v3/dist/domains/enterprise-integration/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/coordinator.js +39 -148
- package/v3/dist/domains/enterprise-integration/coordinator.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/plugin.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/plugin.js +2 -1
- package/v3/dist/domains/enterprise-integration/plugin.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/esb-middleware-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/esb-middleware-service.js +7 -5
- package/v3/dist/domains/enterprise-integration/services/esb-middleware-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/message-broker-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/message-broker-service.js +11 -9
- package/v3/dist/domains/enterprise-integration/services/message-broker-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/odata-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/odata-service.js +4 -3
- package/v3/dist/domains/enterprise-integration/services/odata-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sap-integration-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sap-integration-service.js +5 -3
- package/v3/dist/domains/enterprise-integration/services/sap-integration-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.js +4 -3
- package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sod-analysis-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sod-analysis-service.js +3 -2
- package/v3/dist/domains/enterprise-integration/services/sod-analysis-service.js.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator-consensus.d.ts +37 -0
- package/v3/dist/domains/learning-optimization/coordinator-consensus.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-consensus.js +82 -0
- package/v3/dist/domains/learning-optimization/coordinator-consensus.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.d.ts +32 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.js +43 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.d.ts +56 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.js +142 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.d.ts +64 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.js +73 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator.d.ts +17 -82
- package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.js +36 -320
- package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js +2 -1
- package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.js +11 -10
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/metrics-optimizer.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/metrics-optimizer.js +8 -7
- package/v3/dist/domains/learning-optimization/services/metrics-optimizer.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/production-intel.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/production-intel.js +11 -10
- package/v3/dist/domains/learning-optimization/services/production-intel.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/transfer-specialist.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/transfer-specialist.js +8 -7
- package/v3/dist/domains/learning-optimization/services/transfer-specialist.js.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.d.ts +41 -0
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.js +157 -0
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.d.ts +26 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.js +135 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.d.ts +90 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.js +265 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.d.ts +92 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.js +321 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator.d.ts +18 -127
- package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.js +58 -1022
- package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
- package/v3/dist/domains/quality-assessment/index.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/index.js +10 -0
- package/v3/dist/domains/quality-assessment/index.js.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.js +2 -1
- package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/coherence-gate.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/coherence-gate.js +2 -1
- package/v3/dist/domains/quality-assessment/services/coherence-gate.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.js +5 -3
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.js +6 -4
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-gate.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-gate.js +3 -2
- package/v3/dist/domains/quality-assessment/services/quality-gate.js.map +1 -1
- package/v3/dist/domains/requirements-validation/coordinator.d.ts +17 -61
- package/v3/dist/domains/requirements-validation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/coordinator.js +25 -175
- package/v3/dist/domains/requirements-validation/coordinator.js.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.js +2 -1
- package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js +12 -11
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-refinement-plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-refinement-plugin.js +11 -10
- package/v3/dist/domains/requirements-validation/qcsd-refinement-plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/bdd-scenario-writer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/bdd-scenario-writer.js +4 -3
- package/v3/dist/domains/requirements-validation/services/bdd-scenario-writer.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js +3 -2
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/requirements-validator.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/requirements-validator.js +7 -5
- package/v3/dist/domains/requirements-validation/services/requirements-validator.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/testability-scorer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/testability-scorer.js +4 -3
- package/v3/dist/domains/requirements-validation/services/testability-scorer.js.map +1 -1
- package/v3/dist/domains/security-compliance/coordinator.d.ts +12 -58
- package/v3/dist/domains/security-compliance/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/coordinator.js +22 -164
- package/v3/dist/domains/security-compliance/coordinator.js.map +1 -1
- package/v3/dist/domains/security-compliance/index.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/index.js +14 -0
- package/v3/dist/domains/security-compliance/index.js.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.js +2 -1
- package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/compliance-validator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/compliance-validator.js +6 -5
- package/v3/dist/domains/security-compliance/services/compliance-validator.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js +2 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js +4 -3
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js +7 -5
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts +2 -2
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js +6 -4
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts +2 -2
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +3 -2
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +2 -2
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.d.ts +11 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.js +284 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.d.ts +44 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.js +193 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.d.ts +27 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.js +279 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.d.ts +34 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.js +236 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.d.ts +93 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.js +50 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor.d.ts +12 -132
- package/v3/dist/domains/security-compliance/services/security-auditor.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-auditor.js +71 -1188
- package/v3/dist/domains/security-compliance/services/security-auditor.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/semgrep-integration.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/semgrep-integration.js +4 -2
- package/v3/dist/domains/security-compliance/services/semgrep-integration.js.map +1 -1
- package/v3/dist/domains/test-execution/coordinator.d.ts +8 -60
- package/v3/dist/domains/test-execution/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/coordinator.js +19 -132
- package/v3/dist/domains/test-execution/coordinator.js.map +1 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.js +2 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js +2 -1
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js +3 -2
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts +1 -1
- package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-executors.js +2 -1
- package/v3/dist/domains/test-execution/services/e2e/step-executors.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js +3 -2
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/types.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/types.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts +1 -1
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/flaky-detector.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/flaky-detector.js +7 -5
- package/v3/dist/domains/test-execution/services/flaky-detector.js.map +1 -1
- package/v3/dist/domains/test-execution/services/retry-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/retry-handler.js +8 -6
- package/v3/dist/domains/test-execution/services/retry-handler.js.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.js +8 -6
- package/v3/dist/domains/test-execution/services/test-executor.js.map +1 -1
- package/v3/dist/domains/test-execution/services/test-prioritizer.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/test-prioritizer.js +2 -1
- package/v3/dist/domains/test-execution/services/test-prioritizer.js.map +1 -1
- package/v3/dist/domains/test-execution/services/user-flow-generator.d.ts +28 -0
- package/v3/dist/domains/test-execution/services/user-flow-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/user-flow-generator.js +156 -189
- package/v3/dist/domains/test-execution/services/user-flow-generator.js.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts +14 -78
- package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.js +58 -202
- package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +10 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/generators/base-test-generator.js +37 -30
- package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -1
- package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/index.js +10 -0
- package/v3/dist/domains/test-generation/index.js.map +1 -1
- package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/plugin.js +2 -1
- package/v3/dist/domains/test-generation/plugin.js.map +1 -1
- package/v3/dist/domains/test-generation/services/code-transform-integration.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/code-transform-integration.js +2 -1
- package/v3/dist/domains/test-generation/services/code-transform-integration.js.map +1 -1
- package/v3/dist/domains/test-generation/services/pattern-matcher.d.ts +10 -0
- package/v3/dist/domains/test-generation/services/pattern-matcher.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/pattern-matcher.js +43 -41
- package/v3/dist/domains/test-generation/services/pattern-matcher.js.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.js +47 -17
- package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts +17 -60
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.js +32 -183
- package/v3/dist/domains/visual-accessibility/coordinator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.js +4 -3
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.d.ts +114 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.d.ts.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.js +578 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.js.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts +54 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js +403 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +1 -314
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +79 -1467
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-audit.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-audit.js +2 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-audit.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-integration.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-integration.js +5 -4
- package/v3/dist/domains/visual-accessibility/services/axe-core-integration.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js +5 -4
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-swarm-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-swarm-coordinator.js +8 -7
- package/v3/dist/domains/visual-accessibility/services/browser-swarm-coordinator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +2 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/responsive-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/responsive-tester.js +5 -4
- package/v3/dist/domains/visual-accessibility/services/responsive-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.js +7 -6
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-regression.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-regression.js +11 -10
- package/v3/dist/domains/visual-accessibility/services/visual-regression.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-tester.js +7 -6
- package/v3/dist/domains/visual-accessibility/services/visual-tester.js.map +1 -1
- package/v3/dist/early-exit/early-exit-controller.d.ts.map +1 -1
- package/v3/dist/early-exit/early-exit-controller.js +4 -3
- package/v3/dist/early-exit/early-exit-controller.js.map +1 -1
- package/v3/dist/feedback/coverage-learner.d.ts.map +1 -1
- package/v3/dist/feedback/coverage-learner.js +7 -5
- package/v3/dist/feedback/coverage-learner.js.map +1 -1
- package/v3/dist/feedback/test-outcome-tracker.d.ts.map +1 -1
- package/v3/dist/feedback/test-outcome-tracker.js +6 -4
- package/v3/dist/feedback/test-outcome-tracker.js.map +1 -1
- package/v3/dist/governance/adversarial-defense-integration.d.ts +0 -18
- package/v3/dist/governance/adversarial-defense-integration.d.ts.map +1 -1
- package/v3/dist/governance/adversarial-defense-integration.js +2 -1
- package/v3/dist/governance/adversarial-defense-integration.js.map +1 -1
- package/v3/dist/governance/compliance-reporter.d.ts +0 -16
- package/v3/dist/governance/compliance-reporter.d.ts.map +1 -1
- package/v3/dist/governance/compliance-reporter.js +6 -8
- package/v3/dist/governance/compliance-reporter.js.map +1 -1
- package/v3/dist/governance/continue-gate-integration.d.ts.map +1 -1
- package/v3/dist/governance/continue-gate-integration.js +3 -2
- package/v3/dist/governance/continue-gate-integration.js.map +1 -1
- package/v3/dist/governance/evolution-pipeline-integration.d.ts.map +1 -1
- package/v3/dist/governance/evolution-pipeline-integration.js +3 -2
- package/v3/dist/governance/evolution-pipeline-integration.js.map +1 -1
- package/v3/dist/governance/proof-envelope-integration.d.ts.map +1 -1
- package/v3/dist/governance/proof-envelope-integration.js +4 -4
- package/v3/dist/governance/proof-envelope-integration.js.map +1 -1
- package/v3/dist/governance/shard-embeddings.d.ts.map +1 -1
- package/v3/dist/governance/shard-embeddings.js +16 -2
- package/v3/dist/governance/shard-embeddings.js.map +1 -1
- package/v3/dist/governance/shard-retriever-integration.d.ts.map +1 -1
- package/v3/dist/governance/shard-retriever-integration.js +4 -3
- package/v3/dist/governance/shard-retriever-integration.js.map +1 -1
- package/v3/dist/governance/wasm-kernel-integration.d.ts.map +1 -1
- package/v3/dist/governance/wasm-kernel-integration.js +4 -2
- package/v3/dist/governance/wasm-kernel-integration.js.map +1 -1
- package/v3/dist/hooks/reasoning-bank-pattern-store.d.ts.map +1 -1
- package/v3/dist/hooks/reasoning-bank-pattern-store.js +3 -2
- package/v3/dist/hooks/reasoning-bank-pattern-store.js.map +1 -1
- package/v3/dist/hooks/task-completed-hook.d.ts.map +1 -1
- package/v3/dist/hooks/task-completed-hook.js +3 -2
- package/v3/dist/hooks/task-completed-hook.js.map +1 -1
- package/v3/dist/init/agents-installer.d.ts.map +1 -1
- package/v3/dist/init/agents-installer.js +2 -1
- package/v3/dist/init/agents-installer.js.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.js +3 -2
- package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -1
- package/v3/dist/init/fleet-integration.d.ts.map +1 -1
- package/v3/dist/init/fleet-integration.js +2 -1
- package/v3/dist/init/fleet-integration.js.map +1 -1
- package/v3/dist/init/governance-installer.d.ts.map +1 -1
- package/v3/dist/init/governance-installer.js +5 -4
- package/v3/dist/init/governance-installer.js.map +1 -1
- package/v3/dist/init/init-wizard-hooks.d.ts +26 -0
- package/v3/dist/init/init-wizard-hooks.d.ts.map +1 -0
- package/v3/dist/init/init-wizard-hooks.js +555 -0
- package/v3/dist/init/init-wizard-hooks.js.map +1 -0
- package/v3/dist/init/init-wizard-migration.d.ts +52 -0
- package/v3/dist/init/init-wizard-migration.d.ts.map +1 -0
- package/v3/dist/init/init-wizard-migration.js +349 -0
- package/v3/dist/init/init-wizard-migration.js.map +1 -0
- package/v3/dist/init/init-wizard-steps.d.ts +68 -0
- package/v3/dist/init/init-wizard-steps.d.ts.map +1 -0
- package/v3/dist/init/init-wizard-steps.js +457 -0
- package/v3/dist/init/init-wizard-steps.js.map +1 -0
- package/v3/dist/init/init-wizard.d.ts +8 -130
- package/v3/dist/init/init-wizard.d.ts.map +1 -1
- package/v3/dist/init/init-wizard.js +108 -1528
- package/v3/dist/init/init-wizard.js.map +1 -1
- package/v3/dist/init/migration/config-migrator.d.ts.map +1 -1
- package/v3/dist/init/migration/config-migrator.js +2 -1
- package/v3/dist/init/migration/config-migrator.js.map +1 -1
- package/v3/dist/init/migration/data-migrator.d.ts.map +1 -1
- package/v3/dist/init/migration/data-migrator.js +10 -9
- package/v3/dist/init/migration/data-migrator.js.map +1 -1
- package/v3/dist/init/migration/detector.d.ts.map +1 -1
- package/v3/dist/init/migration/detector.js +2 -1
- package/v3/dist/init/migration/detector.js.map +1 -1
- package/v3/dist/init/n8n-installer.d.ts.map +1 -1
- package/v3/dist/init/n8n-installer.js +4 -3
- package/v3/dist/init/n8n-installer.js.map +1 -1
- package/v3/dist/init/orchestrator.d.ts.map +1 -1
- package/v3/dist/init/orchestrator.js +2 -1
- package/v3/dist/init/orchestrator.js.map +1 -1
- package/v3/dist/init/phases/01-detection.d.ts.map +1 -1
- package/v3/dist/init/phases/01-detection.js +2 -1
- package/v3/dist/init/phases/01-detection.js.map +1 -1
- package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -1
- package/v3/dist/init/phases/06-code-intelligence.js +2 -1
- package/v3/dist/init/phases/06-code-intelligence.js.map +1 -1
- package/v3/dist/init/phases/07-hooks.d.ts.map +1 -1
- package/v3/dist/init/phases/07-hooks.js +2 -1
- package/v3/dist/init/phases/07-hooks.js.map +1 -1
- package/v3/dist/init/phases/08-mcp.d.ts.map +1 -1
- package/v3/dist/init/phases/08-mcp.js +3 -2
- package/v3/dist/init/phases/08-mcp.js.map +1 -1
- package/v3/dist/init/phases/phase-interface.d.ts.map +1 -1
- package/v3/dist/init/phases/phase-interface.js +3 -2
- package/v3/dist/init/phases/phase-interface.js.map +1 -1
- package/v3/dist/init/project-analyzer.d.ts.map +1 -1
- package/v3/dist/init/project-analyzer.js +3 -2
- package/v3/dist/init/project-analyzer.js.map +1 -1
- package/v3/dist/init/skills-installer.d.ts.map +1 -1
- package/v3/dist/init/skills-installer.js +2 -1
- package/v3/dist/init/skills-installer.js.map +1 -1
- package/v3/dist/integrations/agent-booster-wasm/index.d.ts.map +1 -1
- package/v3/dist/integrations/agent-booster-wasm/index.js +4 -1
- package/v3/dist/integrations/agent-booster-wasm/index.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/metrics/pattern-updater.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/metrics/pattern-updater.js +6 -4
- package/v3/dist/integrations/agentic-flow/metrics/pattern-updater.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/onnx-embeddings/adapter.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/onnx-embeddings/adapter.js +10 -0
- package/v3/dist/integrations/agentic-flow/onnx-embeddings/adapter.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/pattern-loader.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/pattern-loader.js +4 -2
- package/v3/dist/integrations/agentic-flow/pattern-loader.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +4 -2
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +70 -43
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/index.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/index.js +2 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/index.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js +6 -5
- package/v3/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js +7 -6
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/client.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/client.js +33 -31
- package/v3/dist/integrations/browser/agent-browser/client.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/command-executor.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/command-executor.js +42 -22
- package/v3/dist/integrations/browser/agent-browser/command-executor.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/snapshot-parser.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/snapshot-parser.js +2 -1
- package/v3/dist/integrations/browser/agent-browser/snapshot-parser.js.map +1 -1
- package/v3/dist/integrations/browser/web-content-fetcher.d.ts.map +1 -1
- package/v3/dist/integrations/browser/web-content-fetcher.js +4 -2
- package/v3/dist/integrations/browser/web-content-fetcher.js.map +1 -1
- package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/coherence-service.js +4 -3
- package/v3/dist/integrations/coherence/coherence-service.js.map +1 -1
- package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js +4 -3
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -1
- package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/wasm-loader.js +4 -3
- package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -1
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.d.ts +6 -0
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.d.ts.map +1 -1
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.js +35 -6
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.js.map +1 -1
- package/v3/dist/integrations/n8n/agent-factory.d.ts.map +1 -1
- package/v3/dist/integrations/n8n/agent-factory.js +2 -1
- package/v3/dist/integrations/n8n/agent-factory.js.map +1 -1
- package/v3/dist/integrations/rl-suite/base-algorithm.d.ts.map +1 -1
- package/v3/dist/integrations/rl-suite/base-algorithm.js +8 -3
- package/v3/dist/integrations/rl-suite/base-algorithm.js.map +1 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.d.ts.map +1 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.js +2 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.js.map +1 -1
- package/v3/dist/integrations/ruvector/ast-complexity.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/ast-complexity.js +3 -2
- package/v3/dist/integrations/ruvector/ast-complexity.js.map +1 -1
- package/v3/dist/integrations/ruvector/attention-wrapper.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/attention-wrapper.js +2 -1
- package/v3/dist/integrations/ruvector/attention-wrapper.js.map +1 -1
- package/v3/dist/integrations/ruvector/coverage-router.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/coverage-router.js +3 -2
- package/v3/dist/integrations/ruvector/coverage-router.js.map +1 -1
- package/v3/dist/integrations/ruvector/diff-risk-classifier.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/diff-risk-classifier.js +3 -2
- package/v3/dist/integrations/ruvector/diff-risk-classifier.js.map +1 -1
- package/v3/dist/integrations/ruvector/gnn-wrapper.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/gnn-wrapper.js +2 -1
- package/v3/dist/integrations/ruvector/gnn-wrapper.js.map +1 -1
- package/v3/dist/integrations/ruvector/graph-boundaries.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/graph-boundaries.js +3 -2
- package/v3/dist/integrations/ruvector/graph-boundaries.js.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-engine.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-engine.js +68 -67
- package/v3/dist/integrations/ruvector/hypergraph-engine.js.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-schema.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-schema.js +3 -2
- package/v3/dist/integrations/ruvector/hypergraph-schema.js.map +1 -1
- package/v3/dist/integrations/ruvector/persistent-q-router.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/persistent-q-router.js +35 -11
- package/v3/dist/integrations/ruvector/persistent-q-router.js.map +1 -1
- package/v3/dist/integrations/ruvector/q-learning-router.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/q-learning-router.js +3 -2
- package/v3/dist/integrations/ruvector/q-learning-router.js.map +1 -1
- package/v3/dist/integrations/ruvector/server-client.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/server-client.js +23 -10
- package/v3/dist/integrations/ruvector/server-client.js.map +1 -1
- package/v3/dist/integrations/ruvector/sona-persistence.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/sona-persistence.js +11 -6
- package/v3/dist/integrations/ruvector/sona-persistence.js.map +1 -1
- package/v3/dist/integrations/vibium/client.d.ts.map +1 -1
- package/v3/dist/integrations/vibium/client.js +11 -10
- package/v3/dist/integrations/vibium/client.js.map +1 -1
- package/v3/dist/kernel/anti-drift-middleware.d.ts.map +1 -1
- package/v3/dist/kernel/anti-drift-middleware.js +8 -3
- package/v3/dist/kernel/anti-drift-middleware.js.map +1 -1
- package/v3/dist/kernel/hybrid-backend.d.ts.map +1 -1
- package/v3/dist/kernel/hybrid-backend.js +4 -0
- package/v3/dist/kernel/hybrid-backend.js.map +1 -1
- package/v3/dist/kernel/index.d.ts +1 -1
- package/v3/dist/kernel/index.d.ts.map +1 -1
- package/v3/dist/kernel/index.js +1 -1
- package/v3/dist/kernel/index.js.map +1 -1
- package/v3/dist/kernel/kernel.d.ts +5 -0
- package/v3/dist/kernel/kernel.d.ts.map +1 -1
- package/v3/dist/kernel/kernel.js +43 -22
- package/v3/dist/kernel/kernel.js.map +1 -1
- package/v3/dist/kernel/memory-factory.d.ts.map +1 -1
- package/v3/dist/kernel/memory-factory.js +12 -4
- package/v3/dist/kernel/memory-factory.js.map +1 -1
- package/v3/dist/kernel/plugin-loader.d.ts.map +1 -1
- package/v3/dist/kernel/plugin-loader.js +4 -1
- package/v3/dist/kernel/plugin-loader.js.map +1 -1
- package/v3/dist/kernel/unified-memory-hnsw.d.ts +101 -0
- package/v3/dist/kernel/unified-memory-hnsw.d.ts.map +1 -0
- package/v3/dist/kernel/unified-memory-hnsw.js +411 -0
- package/v3/dist/kernel/unified-memory-hnsw.js.map +1 -0
- package/v3/dist/kernel/unified-memory-migration.d.ts.map +1 -1
- package/v3/dist/kernel/unified-memory-migration.js +14 -15
- package/v3/dist/kernel/unified-memory-migration.js.map +1 -1
- package/v3/dist/kernel/unified-memory-schemas.d.ts +21 -0
- package/v3/dist/kernel/unified-memory-schemas.d.ts.map +1 -0
- package/v3/dist/kernel/unified-memory-schemas.js +581 -0
- package/v3/dist/kernel/unified-memory-schemas.js.map +1 -0
- package/v3/dist/kernel/unified-memory.d.ts +13 -197
- package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
- package/v3/dist/kernel/unified-memory.js +117 -1379
- package/v3/dist/kernel/unified-memory.js.map +1 -1
- package/v3/dist/kernel/unified-persistence.d.ts.map +1 -1
- package/v3/dist/kernel/unified-persistence.js +6 -4
- package/v3/dist/kernel/unified-persistence.js.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.js +11 -9
- package/v3/dist/learning/aqe-learning-engine.js.map +1 -1
- package/v3/dist/learning/dream/concept-graph.d.ts.map +1 -1
- package/v3/dist/learning/dream/concept-graph.js +6 -4
- package/v3/dist/learning/dream/concept-graph.js.map +1 -1
- package/v3/dist/learning/dream/dream-engine.d.ts +8 -0
- package/v3/dist/learning/dream/dream-engine.d.ts.map +1 -1
- package/v3/dist/learning/dream/dream-engine.js +35 -5
- package/v3/dist/learning/dream/dream-engine.js.map +1 -1
- package/v3/dist/learning/dream/dream-scheduler.d.ts.map +1 -1
- package/v3/dist/learning/dream/dream-scheduler.js +34 -22
- package/v3/dist/learning/dream/dream-scheduler.js.map +1 -1
- package/v3/dist/learning/experience-capture-middleware.d.ts.map +1 -1
- package/v3/dist/learning/experience-capture-middleware.js +2 -1
- package/v3/dist/learning/experience-capture-middleware.js.map +1 -1
- package/v3/dist/learning/experience-capture.d.ts.map +1 -1
- package/v3/dist/learning/experience-capture.js +4 -1
- package/v3/dist/learning/experience-capture.js.map +1 -1
- package/v3/dist/learning/memory-auditor.d.ts.map +1 -1
- package/v3/dist/learning/memory-auditor.js +3 -2
- package/v3/dist/learning/memory-auditor.js.map +1 -1
- package/v3/dist/learning/metrics-tracker.d.ts.map +1 -1
- package/v3/dist/learning/metrics-tracker.js +6 -2
- package/v3/dist/learning/metrics-tracker.js.map +1 -1
- package/v3/dist/learning/pattern-lifecycle.d.ts.map +1 -1
- package/v3/dist/learning/pattern-lifecycle.js +11 -5
- package/v3/dist/learning/pattern-lifecycle.js.map +1 -1
- package/v3/dist/learning/pattern-store.d.ts +7 -0
- package/v3/dist/learning/pattern-store.d.ts.map +1 -1
- package/v3/dist/learning/pattern-store.js +32 -4
- package/v3/dist/learning/pattern-store.js.map +1 -1
- package/v3/dist/learning/qe-hooks.d.ts.map +1 -1
- package/v3/dist/learning/qe-hooks.js +55 -10
- package/v3/dist/learning/qe-hooks.js.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.d.ts +13 -0
- package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.js +64 -24
- package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
- package/v3/dist/learning/qe-unified-memory.d.ts.map +1 -1
- package/v3/dist/learning/qe-unified-memory.js +31 -21
- package/v3/dist/learning/qe-unified-memory.js.map +1 -1
- package/v3/dist/learning/real-embeddings.d.ts.map +1 -1
- package/v3/dist/learning/real-embeddings.js +2 -1
- package/v3/dist/learning/real-embeddings.js.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.js +47 -34
- package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
- package/v3/dist/learning/skill-validation-learner.d.ts.map +1 -1
- package/v3/dist/learning/skill-validation-learner.js +21 -12
- package/v3/dist/learning/skill-validation-learner.js.map +1 -1
- package/v3/dist/learning/sqlite-persistence.d.ts +9 -0
- package/v3/dist/learning/sqlite-persistence.d.ts.map +1 -1
- package/v3/dist/learning/sqlite-persistence.js +65 -6
- package/v3/dist/learning/sqlite-persistence.js.map +1 -1
- package/v3/dist/learning/token-tracker.d.ts.map +1 -1
- package/v3/dist/learning/token-tracker.js +4 -2
- package/v3/dist/learning/token-tracker.js.map +1 -1
- package/v3/dist/learning/v2-to-v3-migration.d.ts.map +1 -1
- package/v3/dist/learning/v2-to-v3-migration.js +9 -4
- package/v3/dist/learning/v2-to-v3-migration.js.map +1 -1
- package/v3/dist/mcp/bundle.js +15199 -13931
- package/v3/dist/mcp/entry.js +21 -1
- package/v3/dist/mcp/entry.js.map +1 -1
- package/v3/dist/mcp/handlers/agent-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/agent-handlers.js +5 -4
- package/v3/dist/mcp/handlers/agent-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.js +4 -3
- package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/handler-factory.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/handler-factory.js +12 -3
- package/v3/dist/mcp/handlers/handler-factory.js.map +1 -1
- package/v3/dist/mcp/handlers/memory-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/memory-handlers.js +8 -8
- package/v3/dist/mcp/handlers/memory-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.js +11 -10
- package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
- package/v3/dist/mcp/http-server.js +1 -1
- package/v3/dist/mcp/http-server.js.map +1 -1
- package/v3/dist/mcp/security/index.d.ts +2 -6
- package/v3/dist/mcp/security/index.d.ts.map +1 -1
- package/v3/dist/mcp/security/index.js +2 -2
- package/v3/dist/mcp/security/index.js.map +1 -1
- package/v3/dist/mcp/security/oauth21-provider.d.ts +7 -0
- package/v3/dist/mcp/security/oauth21-provider.d.ts.map +1 -1
- package/v3/dist/mcp/security/oauth21-provider.js +15 -3
- package/v3/dist/mcp/security/oauth21-provider.js.map +1 -1
- package/v3/dist/mcp/server.d.ts.map +1 -1
- package/v3/dist/mcp/server.js +10 -24
- package/v3/dist/mcp/server.js.map +1 -1
- package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
- package/v3/dist/mcp/tool-registry.js +2 -1
- package/v3/dist/mcp/tool-registry.js.map +1 -1
- package/v3/dist/mcp/tools/analysis/token-usage.d.ts.map +1 -1
- package/v3/dist/mcp/tools/analysis/token-usage.js +2 -1
- package/v3/dist/mcp/tools/analysis/token-usage.js.map +1 -1
- package/v3/dist/mcp/tools/base.d.ts.map +1 -1
- package/v3/dist/mcp/tools/base.js +2 -1
- package/v3/dist/mcp/tools/base.js.map +1 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.d.ts.map +1 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.js +2 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.js.map +1 -1
- package/v3/dist/mcp/tools/code-intelligence/analyze.d.ts.map +1 -1
- package/v3/dist/mcp/tools/code-intelligence/analyze.js +2 -1
- package/v3/dist/mcp/tools/code-intelligence/analyze.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/audit.js +2 -1
- package/v3/dist/mcp/tools/coherence/audit.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/check.js +2 -1
- package/v3/dist/mcp/tools/coherence/check.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/collapse.js +2 -1
- package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/consensus.js +2 -1
- package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -1
- package/v3/dist/mcp/tools/contract-testing/validate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/contract-testing/validate.js +4 -3
- package/v3/dist/mcp/tools/contract-testing/validate.js.map +1 -1
- package/v3/dist/mcp/tools/coverage-analysis/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coverage-analysis/index.js +7 -6
- package/v3/dist/mcp/tools/coverage-analysis/index.js.map +1 -1
- package/v3/dist/mcp/tools/defect-intelligence/predict.d.ts.map +1 -1
- package/v3/dist/mcp/tools/defect-intelligence/predict.js +2 -1
- package/v3/dist/mcp/tools/defect-intelligence/predict.js.map +1 -1
- package/v3/dist/mcp/tools/embeddings/embedding.d.ts.map +1 -1
- package/v3/dist/mcp/tools/embeddings/embedding.js +6 -5
- package/v3/dist/mcp/tools/embeddings/embedding.js.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/dream.d.ts.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/dream.js +3 -2
- package/v3/dist/mcp/tools/learning-optimization/dream.js.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.d.ts.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.js +2 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.js.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-execute.d.ts.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-execute.js +2 -1
- package/v3/dist/mcp/tools/planning/goap-execute.js.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-plan.d.ts.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-plan.js +2 -1
- package/v3/dist/mcp/tools/planning/goap-plan.js.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-status.d.ts.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-status.js +2 -1
- package/v3/dist/mcp/tools/planning/goap-status.js.map +1 -1
- package/v3/dist/mcp/tools/quality-assessment/evaluate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/quality-assessment/evaluate.js +2 -1
- package/v3/dist/mcp/tools/quality-assessment/evaluate.js.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/analyze.d.ts.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/analyze.js +2 -1
- package/v3/dist/mcp/tools/qx-analysis/analyze.js.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.d.ts +12 -0
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.d.ts.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.js +158 -109
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.js.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/quality-criteria.d.ts.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/quality-criteria.js +2 -1
- package/v3/dist/mcp/tools/requirements-validation/quality-criteria.js.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/validate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/validate.js +2 -1
- package/v3/dist/mcp/tools/requirements-validation/validate.js.map +1 -1
- package/v3/dist/mcp/tools/security-compliance/scan.d.ts.map +1 -1
- package/v3/dist/mcp/tools/security-compliance/scan.js +2 -1
- package/v3/dist/mcp/tools/security-compliance/scan.js.map +1 -1
- package/v3/dist/mcp/tools/test-execution/e2e-execute.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-execution/e2e-execute.js +2 -1
- package/v3/dist/mcp/tools/test-execution/e2e-execute.js.map +1 -1
- package/v3/dist/mcp/tools/test-execution/execute.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-execution/execute.js +2 -1
- package/v3/dist/mcp/tools/test-execution/execute.js.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.js +2 -1
- package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
- package/v3/dist/mcp/tools/visual-accessibility/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/visual-accessibility/index.js +3 -2
- package/v3/dist/mcp/tools/visual-accessibility/index.js.map +1 -1
- package/v3/dist/mcp/transport/sse/sse-transport.js +1 -1
- package/v3/dist/mcp/transport/sse/sse-transport.js.map +1 -1
- package/v3/dist/mcp/transport/stdio.js +1 -1
- package/v3/dist/mcp/transport/stdio.js.map +1 -1
- package/v3/dist/mcp/transport/websocket/websocket-transport.js +1 -1
- package/v3/dist/mcp/transport/websocket/websocket-transport.js.map +1 -1
- package/v3/dist/memory/crdt/or-set.d.ts.map +1 -1
- package/v3/dist/memory/crdt/or-set.js +2 -1
- package/v3/dist/memory/crdt/or-set.js.map +1 -1
- package/v3/dist/optimization/auto-tuner.d.ts.map +1 -1
- package/v3/dist/optimization/auto-tuner.js +2 -1
- package/v3/dist/optimization/auto-tuner.js.map +1 -1
- package/v3/dist/optimization/early-exit-token-optimizer.d.ts.map +1 -1
- package/v3/dist/optimization/early-exit-token-optimizer.js +2 -1
- package/v3/dist/optimization/early-exit-token-optimizer.js.map +1 -1
- package/v3/dist/optimization/qe-workers.d.ts.map +1 -1
- package/v3/dist/optimization/qe-workers.js +2 -1
- package/v3/dist/optimization/qe-workers.js.map +1 -1
- package/v3/dist/performance/benchmarks.d.ts.map +1 -1
- package/v3/dist/performance/benchmarks.js +2 -1
- package/v3/dist/performance/benchmarks.js.map +1 -1
- package/v3/dist/performance/optimizer.d.ts.map +1 -1
- package/v3/dist/performance/optimizer.js +119 -71
- package/v3/dist/performance/optimizer.js.map +1 -1
- package/v3/dist/performance/run-gates.js +2 -1
- package/v3/dist/performance/run-gates.js.map +1 -1
- package/v3/dist/planning/goap-planner.d.ts +4 -1
- package/v3/dist/planning/goap-planner.d.ts.map +1 -1
- package/v3/dist/planning/goap-planner.js +128 -46
- package/v3/dist/planning/goap-planner.js.map +1 -1
- package/v3/dist/planning/index.d.ts +1 -1
- package/v3/dist/planning/index.d.ts.map +1 -1
- package/v3/dist/planning/index.js.map +1 -1
- package/v3/dist/planning/plan-executor.d.ts.map +1 -1
- package/v3/dist/planning/plan-executor.js +7 -5
- package/v3/dist/planning/plan-executor.js.map +1 -1
- package/v3/dist/planning/types.d.ts +0 -16
- package/v3/dist/planning/types.d.ts.map +1 -1
- package/v3/dist/routing/routing-feedback.d.ts.map +1 -1
- package/v3/dist/routing/routing-feedback.js +7 -5
- package/v3/dist/routing/routing-feedback.js.map +1 -1
- package/v3/dist/shared/base-domain-plugin.d.ts +198 -0
- package/v3/dist/shared/base-domain-plugin.d.ts.map +1 -0
- package/v3/dist/shared/base-domain-plugin.js +292 -0
- package/v3/dist/shared/base-domain-plugin.js.map +1 -0
- package/v3/dist/shared/domain-service-registry.d.ts +70 -0
- package/v3/dist/shared/domain-service-registry.d.ts.map +1 -0
- package/v3/dist/shared/domain-service-registry.js +87 -0
- package/v3/dist/shared/domain-service-registry.js.map +1 -0
- package/v3/dist/shared/embeddings/nomic-embedder.d.ts.map +1 -1
- package/v3/dist/shared/embeddings/nomic-embedder.js +2 -1
- package/v3/dist/shared/embeddings/nomic-embedder.js.map +1 -1
- package/v3/dist/shared/embeddings/ollama-client.d.ts.map +1 -1
- package/v3/dist/shared/embeddings/ollama-client.js +2 -1
- package/v3/dist/shared/embeddings/ollama-client.js.map +1 -1
- package/v3/dist/shared/error-utils.d.ts +16 -0
- package/v3/dist/shared/error-utils.d.ts.map +1 -0
- package/v3/dist/shared/error-utils.js +20 -0
- package/v3/dist/shared/error-utils.js.map +1 -0
- package/v3/dist/shared/http/http-client.d.ts.map +1 -1
- package/v3/dist/shared/http/http-client.js +2 -1
- package/v3/dist/shared/http/http-client.js.map +1 -1
- package/v3/dist/shared/index.d.ts +3 -0
- package/v3/dist/shared/index.d.ts.map +1 -1
- package/v3/dist/shared/index.js +3 -0
- package/v3/dist/shared/index.js.map +1 -1
- package/v3/dist/shared/io/file-reader.d.ts.map +1 -1
- package/v3/dist/shared/io/file-reader.js +2 -1
- package/v3/dist/shared/io/file-reader.js.map +1 -1
- package/v3/dist/shared/llm/circuit-breaker.d.ts.map +1 -1
- package/v3/dist/shared/llm/circuit-breaker.js +2 -1
- package/v3/dist/shared/llm/circuit-breaker.js.map +1 -1
- package/v3/dist/shared/llm/metrics/cost-metrics.js.map +1 -1
- package/v3/dist/shared/llm/metrics/router-metrics.d.ts.map +1 -1
- package/v3/dist/shared/llm/metrics/router-metrics.js.map +1 -1
- package/v3/dist/shared/llm/provider-manager.d.ts.map +1 -1
- package/v3/dist/shared/llm/provider-manager.js +2 -1
- package/v3/dist/shared/llm/provider-manager.js.map +1 -1
- package/v3/dist/shared/llm/providers/azure-openai.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/azure-openai.js +2 -1
- package/v3/dist/shared/llm/providers/azure-openai.js.map +1 -1
- package/v3/dist/shared/llm/providers/bedrock.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/bedrock.js +2 -1
- package/v3/dist/shared/llm/providers/bedrock.js.map +1 -1
- package/v3/dist/shared/llm/providers/claude.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/claude.js +2 -1
- package/v3/dist/shared/llm/providers/claude.js.map +1 -1
- package/v3/dist/shared/llm/providers/gemini.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/gemini.js +4 -2
- package/v3/dist/shared/llm/providers/gemini.js.map +1 -1
- package/v3/dist/shared/llm/providers/openai.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/openai.js +2 -1
- package/v3/dist/shared/llm/providers/openai.js.map +1 -1
- package/v3/dist/shared/llm/providers/openrouter.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/openrouter.js +4 -2
- package/v3/dist/shared/llm/providers/openrouter.js.map +1 -1
- package/v3/dist/shared/llm/router/hybrid-router.d.ts.map +1 -1
- package/v3/dist/shared/llm/router/hybrid-router.js +2 -1
- package/v3/dist/shared/llm/router/hybrid-router.js.map +1 -1
- package/v3/dist/shared/llm/translation/prompt-translator.d.ts.map +1 -1
- package/v3/dist/shared/llm/translation/prompt-translator.js +2 -1
- package/v3/dist/shared/llm/translation/prompt-translator.js.map +1 -1
- package/v3/dist/shared/safe-json.d.ts +57 -0
- package/v3/dist/shared/safe-json.d.ts.map +1 -0
- package/v3/dist/shared/safe-json.js +78 -0
- package/v3/dist/shared/safe-json.js.map +1 -0
- package/v3/dist/shared/sql-safety.d.ts +9 -0
- package/v3/dist/shared/sql-safety.d.ts.map +1 -1
- package/v3/dist/shared/sql-safety.js +20 -1
- package/v3/dist/shared/sql-safety.js.map +1 -1
- package/v3/dist/shared/utils/circular-buffer.js +1 -1
- package/v3/dist/shared/utils/circular-buffer.js.map +1 -1
- package/v3/dist/skills/security-visual-testing/index.d.ts.map +1 -1
- package/v3/dist/skills/security-visual-testing/index.js +6 -5
- package/v3/dist/skills/security-visual-testing/index.js.map +1 -1
- package/v3/dist/strange-loop/strange-loop.d.ts +0 -9
- package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
- package/v3/dist/strange-loop/strange-loop.js +23 -15
- package/v3/dist/strange-loop/strange-loop.js.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.d.ts.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.js +2 -1
- package/v3/dist/sync/claude-flow-bridge.js.map +1 -1
- package/v3/dist/sync/cloud/index.d.ts +1 -1
- package/v3/dist/sync/cloud/index.d.ts.map +1 -1
- package/v3/dist/sync/cloud/index.js +1 -1
- package/v3/dist/sync/cloud/index.js.map +1 -1
- package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -1
- package/v3/dist/sync/cloud/postgres-writer.js +20 -9
- package/v3/dist/sync/cloud/postgres-writer.js.map +1 -1
- package/v3/dist/sync/cloud/tunnel-manager.d.ts +17 -1
- package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -1
- package/v3/dist/sync/cloud/tunnel-manager.js +36 -1
- package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -1
- package/v3/dist/sync/embeddings/sync-embedding-generator.d.ts.map +1 -1
- package/v3/dist/sync/embeddings/sync-embedding-generator.js +11 -5
- package/v3/dist/sync/embeddings/sync-embedding-generator.js.map +1 -1
- package/v3/dist/sync/readers/json-reader.d.ts.map +1 -1
- package/v3/dist/sync/readers/json-reader.js +2 -1
- package/v3/dist/sync/readers/json-reader.js.map +1 -1
- package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -1
- package/v3/dist/sync/readers/sqlite-reader.js +14 -6
- package/v3/dist/sync/readers/sqlite-reader.js.map +1 -1
- package/v3/dist/sync/sync-agent.d.ts.map +1 -1
- package/v3/dist/sync/sync-agent.js +10 -6
- package/v3/dist/sync/sync-agent.js.map +1 -1
- package/v3/dist/test-scheduling/executors/vitest-executor.d.ts.map +1 -1
- package/v3/dist/test-scheduling/executors/vitest-executor.js +3 -2
- package/v3/dist/test-scheduling/executors/vitest-executor.js.map +1 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.d.ts.map +1 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js +2 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js.map +1 -1
- package/v3/dist/testing/load/agent-load-tester.d.ts.map +1 -1
- package/v3/dist/testing/load/agent-load-tester.js +2 -1
- package/v3/dist/testing/load/agent-load-tester.js.map +1 -1
- package/v3/dist/validation/parallel-eval-runner.d.ts.map +1 -1
- package/v3/dist/validation/parallel-eval-runner.js +83 -37
- package/v3/dist/validation/parallel-eval-runner.js.map +1 -1
- package/v3/dist/validation/swarm-skill-validator.d.ts.map +1 -1
- package/v3/dist/validation/swarm-skill-validator.js +2 -1
- package/v3/dist/validation/swarm-skill-validator.js.map +1 -1
- package/v3/dist/validation/validation-result-aggregator.d.ts.map +1 -1
- package/v3/dist/validation/validation-result-aggregator.js +2 -1
- package/v3/dist/validation/validation-result-aggregator.js.map +1 -1
- package/v3/dist/workers/base-worker.d.ts.map +1 -1
- package/v3/dist/workers/base-worker.js +2 -1
- package/v3/dist/workers/base-worker.js.map +1 -1
- package/v3/dist/workers/workers/cloud-sync.d.ts.map +1 -1
- package/v3/dist/workers/workers/cloud-sync.js +2 -1
- package/v3/dist/workers/workers/cloud-sync.js.map +1 -1
- package/v3/dist/workers/workers/learning-consolidation.d.ts.map +1 -1
- package/v3/dist/workers/workers/learning-consolidation.js +4 -3
- package/v3/dist/workers/workers/learning-consolidation.js.map +1 -1
- package/v3/dist/workers/workers/test-health.d.ts.map +1 -1
- package/v3/dist/workers/workers/test-health.js +2 -1
- package/v3/dist/workers/workers/test-health.js.map +1 -1
- package/v3/package.json +3 -2
|
@@ -8,19 +8,24 @@
|
|
|
8
8
|
* - Coordinates 47 agents across 12 domains
|
|
9
9
|
* - Implements work stealing for load balancing
|
|
10
10
|
* - Orchestrates cross-domain protocols
|
|
11
|
+
*
|
|
12
|
+
* Implementation split across:
|
|
13
|
+
* - queen-types.ts: Types, interfaces, constants, config
|
|
14
|
+
* - queen-event-handlers.ts: Domain/task/agent event handling, pattern training
|
|
15
|
+
* - queen-task-management.ts: Task assignment, queue ops, domain routing
|
|
16
|
+
* - queen-work-stealing.ts: Work stealing algorithm
|
|
17
|
+
* - queen-lifecycle.ts: Initialize/dispose, state persistence, cleanup
|
|
11
18
|
*/
|
|
12
19
|
import { v4 as uuidv4 } from 'uuid';
|
|
13
20
|
import { ALL_DOMAINS, ok, err, } from '../shared/types';
|
|
14
|
-
import { CircularBuffer
|
|
21
|
+
import { CircularBuffer } from '../shared/utils/index.js';
|
|
15
22
|
import { createTaskAuditLogger } from './services';
|
|
16
23
|
import { createQueenMinCutBridge, } from './mincut/queen-integration';
|
|
17
24
|
import { getSharedMinCutGraph } from './mincut/shared-singleton';
|
|
18
25
|
// V3 Integration: TinyDancer intelligent model routing (TD-004, TD-005, TD-006)
|
|
19
26
|
import { QueenRouterAdapter, } from '../routing/queen-integration.js';
|
|
20
|
-
// V3 Integration: Cross-Phase Memory Hooks (QCSD feedback loops)
|
|
21
|
-
import { getCrossPhaseHookExecutor } from '../hooks/cross-phase-hooks.js';
|
|
22
27
|
// V3 Integration: @claude-flow/guidance governance (ADR-058)
|
|
23
|
-
import { queenGovernanceAdapter
|
|
28
|
+
import { queenGovernanceAdapter } from '../governance/index.js';
|
|
24
29
|
// ADR-064 Integration: Agent Teams, Circuit Breakers, Fleet Tiers
|
|
25
30
|
import { createAgentTeamsAdapter } from './agent-teams/index.js';
|
|
26
31
|
import { createDomainTeamManager } from './agent-teams/domain-team-manager.js';
|
|
@@ -34,80 +39,16 @@ import { createTraceCollector } from './agent-teams/tracing.js';
|
|
|
34
39
|
import { createHypothesisManager } from './competing-hypotheses/index.js';
|
|
35
40
|
import { createFederationMailbox } from './federation/index.js';
|
|
36
41
|
import { createDynamicScaler } from './dynamic-scaling/index.js';
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
export const DOMAIN_GROUPS = [
|
|
48
|
-
{
|
|
49
|
-
name: 'Core Testing',
|
|
50
|
-
domains: ['test-generation', 'test-execution', 'coverage-analysis', 'quality-assessment'],
|
|
51
|
-
priority: 'p0',
|
|
52
|
-
description: 'Core testing workflow domains',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'Intelligence',
|
|
56
|
-
domains: ['defect-intelligence', 'code-intelligence', 'requirements-validation', 'security-compliance'],
|
|
57
|
-
priority: 'p0',
|
|
58
|
-
description: 'Intelligence and analysis domains',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'Specialized',
|
|
62
|
-
domains: ['contract-testing', 'visual-accessibility', 'chaos-resilience', 'learning-optimization'],
|
|
63
|
-
priority: 'p1',
|
|
64
|
-
description: 'Specialized testing domains',
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
// Task type to domain mapping
|
|
68
|
-
const TASK_DOMAIN_MAP = {
|
|
69
|
-
'generate-tests': ['test-generation'],
|
|
70
|
-
'execute-tests': ['test-execution'],
|
|
71
|
-
'analyze-coverage': ['coverage-analysis'],
|
|
72
|
-
'assess-quality': ['quality-assessment'],
|
|
73
|
-
'predict-defects': ['defect-intelligence'],
|
|
74
|
-
'validate-requirements': ['requirements-validation'],
|
|
75
|
-
'index-code': ['code-intelligence'],
|
|
76
|
-
'scan-security': ['security-compliance'],
|
|
77
|
-
'validate-contracts': ['contract-testing'],
|
|
78
|
-
'test-accessibility': ['visual-accessibility'],
|
|
79
|
-
'run-chaos': ['chaos-resilience'],
|
|
80
|
-
'optimize-learning': ['learning-optimization'],
|
|
81
|
-
'cross-domain-workflow': ALL_DOMAINS,
|
|
82
|
-
'protocol-execution': ALL_DOMAINS,
|
|
83
|
-
// QCSD Ideation Swarm: requirements-validation is primary, with support from coverage-analysis and security-compliance
|
|
84
|
-
'ideation-assessment': ['requirements-validation', 'coverage-analysis', 'security-compliance'],
|
|
85
|
-
};
|
|
86
|
-
// ============================================================================
|
|
87
|
-
// Default Configuration
|
|
88
|
-
// ============================================================================
|
|
89
|
-
const DEFAULT_CONFIG = {
|
|
90
|
-
maxConcurrentTasks: 50,
|
|
91
|
-
defaultTaskTimeout: 300000, // 5 minutes
|
|
92
|
-
taskRetryLimit: 3,
|
|
93
|
-
workStealing: {
|
|
94
|
-
enabled: true,
|
|
95
|
-
idleThreshold: 5000, // 5 seconds
|
|
96
|
-
loadThreshold: 10,
|
|
97
|
-
stealBatchSize: 3,
|
|
98
|
-
checkInterval: 10000, // 10 seconds
|
|
99
|
-
},
|
|
100
|
-
enableMetrics: true,
|
|
101
|
-
metricsInterval: 60000, // 1 minute
|
|
102
|
-
priorityWeights: {
|
|
103
|
-
p0: 100,
|
|
104
|
-
p1: 50,
|
|
105
|
-
p2: 25,
|
|
106
|
-
p3: 10,
|
|
107
|
-
},
|
|
108
|
-
// V3 Integration: Enable intelligent model routing by default
|
|
109
|
-
enableRouting: true,
|
|
110
|
-
};
|
|
42
|
+
// Types, interfaces, constants, and config
|
|
43
|
+
import { DEFAULT_QUEEN_CONFIG, initializeTaskDomainMap, } from './queen-types.js';
|
|
44
|
+
export { DOMAIN_GROUPS, TASK_DOMAIN_MAP } from './queen-types.js';
|
|
45
|
+
// Extracted modules
|
|
46
|
+
import { subscribeToEvents, computeDomainHealthFromAgents } from './queen-event-handlers.js';
|
|
47
|
+
import { enqueueTask, removeFromQueues, getQueuePosition, processQueue, listTasks as listTasksImpl, assignTask, assignTaskToDomain, } from './queen-task-management.js';
|
|
48
|
+
import { triggerWorkStealing as triggerWorkStealingImpl, startWorkStealingTimer } from './queen-work-stealing.js';
|
|
49
|
+
import { isMinCutAwarePlugin, injectMinCutBridgeIntoPlugins, loadState, saveState, startMetricsCollectionTimer, cleanupCompletedTasks as cleanupCompletedTasksImpl, getEnabledDomains, } from './queen-lifecycle.js';
|
|
50
|
+
// Initialize TASK_DOMAIN_MAP entries that need ALL_DOMAINS
|
|
51
|
+
initializeTaskDomainMap(ALL_DOMAINS);
|
|
111
52
|
// ============================================================================
|
|
112
53
|
// Queen Coordinator Implementation
|
|
113
54
|
// ============================================================================
|
|
@@ -129,42 +70,32 @@ export class QueenCoordinator {
|
|
|
129
70
|
metricsTimer = null;
|
|
130
71
|
cleanupTimer = null;
|
|
131
72
|
startTime = new Date();
|
|
132
|
-
// Store subscription IDs for proper cleanup
|
|
133
|
-
// These IDs are used to unsubscribe from events during dispose()
|
|
73
|
+
// PAP-003: Store subscription IDs for proper cleanup
|
|
134
74
|
eventSubscriptionIds = [];
|
|
135
|
-
// Atomic counter for concurrent task tracking
|
|
136
|
-
// This counter is incremented/decremented atomically to prevent TOCTOU race conditions
|
|
75
|
+
// CC-002: Atomic counter for concurrent task tracking
|
|
137
76
|
runningTaskCounter = 0;
|
|
138
77
|
// Metrics counters
|
|
139
78
|
tasksReceived = 0;
|
|
140
79
|
tasksCompleted = 0;
|
|
141
80
|
tasksFailed = 0;
|
|
142
81
|
tasksStolen = 0;
|
|
143
|
-
// MEM-001 FIX: Use CircularBuffer instead of array to avoid O(n) shift() operations
|
|
144
|
-
// CircularBuffer provides O(1) push with automatic oldest-entry overwrite
|
|
145
82
|
taskDurations = new CircularBuffer(1000);
|
|
146
83
|
protocolsExecuted = 0;
|
|
147
84
|
workflowsExecuted = 0;
|
|
148
|
-
// SEC-003
|
|
85
|
+
// SEC-003: Lightweight audit logging
|
|
149
86
|
auditLogger;
|
|
150
87
|
// ADR-047: MinCut topology health monitoring
|
|
151
88
|
minCutBridge = null;
|
|
152
|
-
// V3
|
|
89
|
+
// V3: TinyDancer intelligent model routing
|
|
153
90
|
tinyDancerRouter = null;
|
|
154
|
-
// ADR-064
|
|
91
|
+
// ADR-064: Subsystems
|
|
155
92
|
domainBreakerRegistry = null;
|
|
156
|
-
// ADR-064 Integration: Domain team management
|
|
157
93
|
domainTeamManager = null;
|
|
158
94
|
agentTeamsAdapter = null;
|
|
159
|
-
// ADR-064 Integration: Fleet tier selector
|
|
160
95
|
tierSelector = null;
|
|
161
|
-
// ADR-064 Phase 3: TaskCompletedHook for pattern training
|
|
162
96
|
taskCompletedHook = null;
|
|
163
|
-
// ADR-064 Phase 3: Distributed Tracing
|
|
164
97
|
traceCollector = null;
|
|
165
|
-
// ADR-064 Phase 3: Track trace contexts for tasks
|
|
166
98
|
taskTraceContexts = new Map();
|
|
167
|
-
// ADR-064 Phase 4: Advanced Patterns
|
|
168
99
|
hypothesisManager = null;
|
|
169
100
|
federationMailbox = null;
|
|
170
101
|
dynamicScaler = null;
|
|
@@ -176,8 +107,7 @@ export class QueenCoordinator {
|
|
|
176
107
|
this.protocolExecutor = protocolExecutor;
|
|
177
108
|
this.workflowExecutor = workflowExecutor;
|
|
178
109
|
this.domainPlugins = domainPlugins;
|
|
179
|
-
this.config = { ...
|
|
180
|
-
// SEC-003 Simplified: Initialize lightweight audit logger
|
|
110
|
+
this.config = { ...DEFAULT_QUEEN_CONFIG, ...config };
|
|
181
111
|
this.auditLogger = createTaskAuditLogger({
|
|
182
112
|
enableConsoleLog: this.config.enableMetrics,
|
|
183
113
|
maxEntries: 1000,
|
|
@@ -187,8 +117,7 @@ export class QueenCoordinator {
|
|
|
187
117
|
['p0', 'p1', 'p2', 'p3'].forEach(p => {
|
|
188
118
|
this.taskQueue.set(p, []);
|
|
189
119
|
});
|
|
190
|
-
// V3
|
|
191
|
-
// Routes tasks to optimal agent tiers (haiku/sonnet/opus) based on complexity
|
|
120
|
+
// V3: Initialize TinyDancer routing
|
|
192
121
|
if (this.config.enableRouting !== false) {
|
|
193
122
|
this.tinyDancerRouter = new QueenRouterAdapter(this.config.routing);
|
|
194
123
|
}
|
|
@@ -205,45 +134,35 @@ export class QueenCoordinator {
|
|
|
205
134
|
if (this.initialized)
|
|
206
135
|
return;
|
|
207
136
|
this.startTime = new Date();
|
|
208
|
-
// Initialize cross-domain router
|
|
209
137
|
await this.router.initialize();
|
|
210
|
-
// Subscribe to domain events
|
|
138
|
+
// Subscribe to domain events
|
|
211
139
|
this.subscribeToEvents();
|
|
212
140
|
// Start work stealing if enabled
|
|
213
141
|
if (this.config.workStealing.enabled) {
|
|
214
|
-
this.
|
|
142
|
+
this.workStealingTimer = startWorkStealingTimer(this.config, () => this.triggerWorkStealing().then(() => { }));
|
|
215
143
|
}
|
|
216
144
|
// Start metrics collection if enabled
|
|
217
145
|
if (this.config.enableMetrics) {
|
|
218
|
-
this.
|
|
146
|
+
this.metricsTimer = startMetricsCollectionTimer(this.createMetricsContext());
|
|
219
147
|
}
|
|
220
|
-
// MEM-002 FIX:
|
|
221
|
-
// Tasks map accumulates indefinitely without cleanup - run every 5 minutes, retain for 1 hour
|
|
148
|
+
// MEM-002 FIX: Automatic cleanup of completed/failed tasks
|
|
222
149
|
this.cleanupTimer = setInterval(() => {
|
|
223
|
-
this.
|
|
224
|
-
}, 300000);
|
|
225
|
-
this.cleanupTimer.unref();
|
|
150
|
+
cleanupCompletedTasksImpl(this.tasks, this.taskTraceContexts, 3600000);
|
|
151
|
+
}, 300000);
|
|
152
|
+
this.cleanupTimer.unref();
|
|
226
153
|
// Load persisted state
|
|
227
|
-
await this.
|
|
154
|
+
await loadState(this.memory, this.tasks, (task) => this.enqueueTaskInternal(task));
|
|
228
155
|
// ADR-047: Initialize MinCut topology health monitoring
|
|
229
|
-
// Use shared graph singleton for proper MCP tools integration
|
|
230
156
|
this.minCutBridge = createQueenMinCutBridge(this.eventBus, this.agentCoordinator, {
|
|
231
157
|
autoUpdateFromEvents: true,
|
|
232
158
|
persistData: true,
|
|
233
159
|
includeInQueenHealth: true,
|
|
234
|
-
sharedGraph: getSharedMinCutGraph(),
|
|
160
|
+
sharedGraph: getSharedMinCutGraph(),
|
|
235
161
|
});
|
|
236
162
|
await this.minCutBridge.initialize();
|
|
237
|
-
//
|
|
238
|
-
// This enables domains to access topology health and participate in self-healing
|
|
163
|
+
// Inject MinCut bridge into domain plugins
|
|
239
164
|
if (this.domainPlugins) {
|
|
240
|
-
|
|
241
|
-
// Check if plugin supports MinCut integration (has setMinCutBridge method)
|
|
242
|
-
if (isMinCutAwarePlugin(plugin)) {
|
|
243
|
-
plugin.setMinCutBridge(this.minCutBridge);
|
|
244
|
-
console.log(`[QueenCoordinator] MinCut bridge injected into ${domainName}`);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
165
|
+
injectMinCutBridgeIntoPlugins(this.domainPlugins, this.minCutBridge);
|
|
247
166
|
}
|
|
248
167
|
// ADR-058: Initialize governance adapter
|
|
249
168
|
try {
|
|
@@ -251,59 +170,10 @@ export class QueenCoordinator {
|
|
|
251
170
|
console.log('[QueenCoordinator] Governance adapter initialized');
|
|
252
171
|
}
|
|
253
172
|
catch (govError) {
|
|
254
|
-
// Non-fatal: governance is optional but recommended
|
|
255
173
|
console.warn('[QueenCoordinator] Governance initialization failed (continuing):', govError);
|
|
256
174
|
}
|
|
257
|
-
// ADR-064: Initialize
|
|
258
|
-
|
|
259
|
-
try {
|
|
260
|
-
this.domainBreakerRegistry = createDomainBreakerRegistry();
|
|
261
|
-
console.log('[QueenCoordinator] Domain circuit breaker registry initialized');
|
|
262
|
-
}
|
|
263
|
-
catch (breakerError) {
|
|
264
|
-
console.warn('[QueenCoordinator] Circuit breaker initialization failed (continuing):', breakerError);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
// ADR-064: Initialize agent teams and domain team manager
|
|
268
|
-
if (this.config.enableDomainTeams !== false) {
|
|
269
|
-
try {
|
|
270
|
-
this.agentTeamsAdapter = createAgentTeamsAdapter();
|
|
271
|
-
this.agentTeamsAdapter.initialize();
|
|
272
|
-
this.domainTeamManager = createDomainTeamManager(this.agentTeamsAdapter);
|
|
273
|
-
console.log('[QueenCoordinator] Domain team manager initialized');
|
|
274
|
-
}
|
|
275
|
-
catch (teamError) {
|
|
276
|
-
console.warn('[QueenCoordinator] Domain team manager initialization failed (continuing):', teamError);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
// ADR-064: Initialize fleet tier selector
|
|
280
|
-
if (this.config.enableFleetTiers !== false) {
|
|
281
|
-
try {
|
|
282
|
-
this.tierSelector = createTierSelector();
|
|
283
|
-
console.log('[QueenCoordinator] Fleet tier selector initialized');
|
|
284
|
-
}
|
|
285
|
-
catch (tierError) {
|
|
286
|
-
console.warn('[QueenCoordinator] Tier selector initialization failed (continuing):', tierError);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
// ADR-064 Phase 3: Initialize distributed tracing
|
|
290
|
-
try {
|
|
291
|
-
this.traceCollector = createTraceCollector();
|
|
292
|
-
console.log('[QueenCoordinator] Trace collector initialized');
|
|
293
|
-
}
|
|
294
|
-
catch (traceError) {
|
|
295
|
-
console.warn('[QueenCoordinator] Trace collector initialization failed (continuing):', traceError);
|
|
296
|
-
}
|
|
297
|
-
// ADR-064 Phase 4: Initialize advanced patterns
|
|
298
|
-
try {
|
|
299
|
-
this.hypothesisManager = createHypothesisManager();
|
|
300
|
-
this.federationMailbox = createFederationMailbox();
|
|
301
|
-
this.dynamicScaler = createDynamicScaler();
|
|
302
|
-
console.log('[QueenCoordinator] Phase 4 modules initialized (hypotheses, federation, scaling)');
|
|
303
|
-
}
|
|
304
|
-
catch (phase4Error) {
|
|
305
|
-
console.warn('[QueenCoordinator] Phase 4 initialization failed (continuing):', phase4Error);
|
|
306
|
-
}
|
|
175
|
+
// ADR-064: Initialize subsystems (non-fatal failures)
|
|
176
|
+
this.initializeSubsystems();
|
|
307
177
|
// Publish initialization event
|
|
308
178
|
await this.publishEvent('QueenInitialized', {
|
|
309
179
|
timestamp: new Date(),
|
|
@@ -322,7 +192,6 @@ export class QueenCoordinator {
|
|
|
322
192
|
clearInterval(this.metricsTimer);
|
|
323
193
|
this.metricsTimer = null;
|
|
324
194
|
}
|
|
325
|
-
// MEM-002 FIX: Clear the cleanup timer to prevent memory leaks
|
|
326
195
|
if (this.cleanupTimer) {
|
|
327
196
|
clearInterval(this.cleanupTimer);
|
|
328
197
|
this.cleanupTimer = null;
|
|
@@ -332,7 +201,7 @@ export class QueenCoordinator {
|
|
|
332
201
|
await this.minCutBridge.dispose();
|
|
333
202
|
this.minCutBridge = null;
|
|
334
203
|
}
|
|
335
|
-
// ADR-064: Dispose
|
|
204
|
+
// ADR-064: Dispose subsystems
|
|
336
205
|
if (this.domainTeamManager) {
|
|
337
206
|
this.domainTeamManager.dispose();
|
|
338
207
|
this.domainTeamManager = null;
|
|
@@ -343,7 +212,6 @@ export class QueenCoordinator {
|
|
|
343
212
|
}
|
|
344
213
|
this.domainBreakerRegistry = null;
|
|
345
214
|
this.tierSelector = null;
|
|
346
|
-
// ADR-064 Phase 3+4: Dispose tracing and advanced patterns
|
|
347
215
|
if (this.traceCollector) {
|
|
348
216
|
this.traceCollector.dispose();
|
|
349
217
|
this.traceCollector = null;
|
|
@@ -360,26 +228,19 @@ export class QueenCoordinator {
|
|
|
360
228
|
this.dynamicScaler.dispose();
|
|
361
229
|
this.dynamicScaler = null;
|
|
362
230
|
}
|
|
363
|
-
|
|
364
|
-
await this.saveState();
|
|
231
|
+
await saveState(this.memory, this.tasks);
|
|
365
232
|
// Cancel all pending tasks
|
|
366
233
|
for (const [taskId, execution] of this.tasks) {
|
|
367
234
|
if (execution.status === 'queued' || execution.status === 'running') {
|
|
368
235
|
await this.cancelTask(taskId);
|
|
369
236
|
}
|
|
370
237
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
timestamp: new Date(),
|
|
374
|
-
metrics: this.getMetrics(),
|
|
375
|
-
});
|
|
376
|
-
// PAP-003 FIX: Unsubscribe from all events before disposing router
|
|
377
|
-
// This prevents memory leaks by removing all event handlers
|
|
238
|
+
await this.publishEvent('QueenShutdown', { timestamp: new Date(), metrics: this.getMetrics() });
|
|
239
|
+
// PAP-003: Unsubscribe from all events
|
|
378
240
|
for (const subscriptionId of this.eventSubscriptionIds) {
|
|
379
241
|
this.router.unsubscribe(subscriptionId);
|
|
380
242
|
}
|
|
381
243
|
this.eventSubscriptionIds = [];
|
|
382
|
-
// Dispose router
|
|
383
244
|
await this.router.dispose();
|
|
384
245
|
this.initialized = false;
|
|
385
246
|
}
|
|
@@ -397,8 +258,7 @@ export class QueenCoordinator {
|
|
|
397
258
|
createdAt: new Date(),
|
|
398
259
|
timeout: taskInput.timeout || this.config.defaultTaskTimeout,
|
|
399
260
|
};
|
|
400
|
-
// ADR-058: Governance check
|
|
401
|
-
// Check if task is allowed by governance gates (ContinueGate, TrustAccumulator, etc.)
|
|
261
|
+
// ADR-058: Governance check
|
|
402
262
|
const governanceContext = {
|
|
403
263
|
taskId: task.id,
|
|
404
264
|
taskType: task.type,
|
|
@@ -410,86 +270,31 @@ export class QueenCoordinator {
|
|
|
410
270
|
try {
|
|
411
271
|
const governanceDecision = await queenGovernanceAdapter.beforeTaskExecution(governanceContext);
|
|
412
272
|
if (!governanceDecision.allowed) {
|
|
413
|
-
// SEC-003: Log governance rejection
|
|
414
273
|
this.auditLogger.logFail(taskId, 'governance', governanceDecision.reason || 'Governance check failed');
|
|
415
274
|
await this.publishEvent('TaskRejected', {
|
|
416
|
-
taskId,
|
|
417
|
-
reason: governanceDecision.reason,
|
|
418
|
-
escalate: governanceDecision.escalate,
|
|
275
|
+
taskId, reason: governanceDecision.reason, escalate: governanceDecision.escalate,
|
|
419
276
|
});
|
|
420
277
|
return err(new Error(`Task blocked by governance: ${governanceDecision.reason}`));
|
|
421
278
|
}
|
|
422
279
|
}
|
|
423
280
|
catch (govError) {
|
|
424
|
-
// Non-fatal: log but continue if governance check fails
|
|
425
281
|
console.warn('[QueenCoordinator] Governance check error (continuing):', govError);
|
|
426
282
|
}
|
|
427
|
-
// CC-002
|
|
428
|
-
// Atomically reserve a slot by incrementing counter BEFORE the check
|
|
283
|
+
// CC-002: Atomic increment before capacity check
|
|
429
284
|
this.runningTaskCounter++;
|
|
430
285
|
try {
|
|
431
|
-
// Check if we exceeded the limit (counter was already incremented)
|
|
432
286
|
if (this.runningTaskCounter > this.config.maxConcurrentTasks) {
|
|
433
|
-
// Release the reserved slot
|
|
434
287
|
this.runningTaskCounter--;
|
|
435
|
-
|
|
436
|
-
this.enqueueTask(task);
|
|
437
|
-
const execution = {
|
|
438
|
-
taskId,
|
|
439
|
-
task,
|
|
440
|
-
status: 'queued',
|
|
441
|
-
assignedAgents: [],
|
|
442
|
-
retryCount: 0,
|
|
443
|
-
};
|
|
444
|
-
this.tasks.set(taskId, execution);
|
|
445
|
-
this.tasksReceived++;
|
|
446
|
-
// SEC-003 Simplified: Log task submission and queuing
|
|
447
|
-
this.auditLogger.logSubmit(taskId, { type: task.type, priority: task.priority });
|
|
448
|
-
this.auditLogger.logQueue(taskId, this.getQueuePosition(task));
|
|
449
|
-
await this.publishEvent('TaskQueued', { taskId, task, position: this.getQueuePosition(task) });
|
|
450
|
-
return ok(taskId);
|
|
288
|
+
return this.queueTask(task);
|
|
451
289
|
}
|
|
452
|
-
// SEC-003 Simplified: Log task submission
|
|
453
290
|
this.auditLogger.logSubmit(taskId, { type: task.type, priority: task.priority });
|
|
454
|
-
// ADR-064:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
changedFiles: task.payload?.changedFiles,
|
|
461
|
-
affectedDomains: task.targetDomains,
|
|
462
|
-
severity: task.priority === 'p0' ? 'critical' : task.priority === 'p1' ? 'high' : undefined,
|
|
463
|
-
isHotfix: task.payload?.isHotfix,
|
|
464
|
-
};
|
|
465
|
-
const tierResult = this.tierSelector.selectTier(tierContext);
|
|
466
|
-
selectedTier = tierResult.selectedTier;
|
|
467
|
-
console.log(`[Queen] Fleet tier: ${selectedTier} (${tierResult.reason})`);
|
|
468
|
-
}
|
|
469
|
-
catch (tierError) {
|
|
470
|
-
// Non-fatal: log but continue with default behavior
|
|
471
|
-
console.warn('[QueenCoordinator] Tier selection error (continuing):', tierError);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
// ADR-064 Phase 3: Start a trace for this task
|
|
475
|
-
if (this.traceCollector) {
|
|
476
|
-
try {
|
|
477
|
-
const { context } = this.traceCollector.startTrace({
|
|
478
|
-
operationName: task.type,
|
|
479
|
-
agentId: task.requester || 'queen',
|
|
480
|
-
domain: task.targetDomains[0] || 'test-generation',
|
|
481
|
-
tags: { taskId, priority: task.priority, tier: selectedTier || 'unknown' },
|
|
482
|
-
});
|
|
483
|
-
this.taskTraceContexts.set(taskId, context);
|
|
484
|
-
}
|
|
485
|
-
catch (traceError) {
|
|
486
|
-
console.warn('[QueenCoordinator] Trace start error (continuing):', traceError);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
// Assign task to appropriate domain(s)
|
|
490
|
-
const assignResult = await this.assignTask(task);
|
|
291
|
+
// ADR-064: Fleet tier selection
|
|
292
|
+
this.selectFleetTier(task);
|
|
293
|
+
// ADR-064 Phase 3: Start trace
|
|
294
|
+
this.startTaskTrace(task, taskId);
|
|
295
|
+
// Assign task to domain
|
|
296
|
+
const assignResult = await assignTask(this.createTaskContext(), task);
|
|
491
297
|
if (!assignResult.success) {
|
|
492
|
-
// Release the reserved slot on assignment failure
|
|
493
298
|
this.runningTaskCounter--;
|
|
494
299
|
return assignResult;
|
|
495
300
|
}
|
|
@@ -498,37 +303,25 @@ export class QueenCoordinator {
|
|
|
498
303
|
return ok(taskId);
|
|
499
304
|
}
|
|
500
305
|
catch (error) {
|
|
501
|
-
// Release the reserved slot on any exception
|
|
502
306
|
this.runningTaskCounter--;
|
|
503
307
|
throw error;
|
|
504
308
|
}
|
|
505
309
|
}
|
|
506
310
|
async cancelTask(taskId) {
|
|
507
311
|
const execution = this.tasks.get(taskId);
|
|
508
|
-
if (!execution)
|
|
312
|
+
if (!execution)
|
|
509
313
|
return err(new Error(`Task not found: ${taskId}`));
|
|
510
|
-
}
|
|
511
314
|
if (execution.status === 'completed' || execution.status === 'failed') {
|
|
512
315
|
return err(new Error(`Task already finished: ${taskId}`));
|
|
513
316
|
}
|
|
514
|
-
// CC-002 FIX: Decrement the atomic counter when cancelling a running task
|
|
515
317
|
if (execution.status === 'running' || execution.status === 'assigned') {
|
|
516
318
|
this.runningTaskCounter = Math.max(0, this.runningTaskCounter - 1);
|
|
517
319
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
...execution,
|
|
521
|
-
status: 'cancelled',
|
|
522
|
-
completedAt: new Date(),
|
|
523
|
-
};
|
|
524
|
-
this.tasks.set(taskId, updated);
|
|
525
|
-
// Remove from queues
|
|
526
|
-
this.removeFromQueues(execution.task);
|
|
527
|
-
// Stop assigned agents if any
|
|
320
|
+
this.tasks.set(taskId, { ...execution, status: 'cancelled', completedAt: new Date() });
|
|
321
|
+
removeFromQueues(this.taskQueue, this.domainQueues, execution.task);
|
|
528
322
|
for (const agentId of execution.assignedAgents) {
|
|
529
323
|
await this.agentCoordinator.stop(agentId);
|
|
530
324
|
}
|
|
531
|
-
// SEC-003 Simplified: Log task cancellation
|
|
532
325
|
this.auditLogger.logCancel(taskId);
|
|
533
326
|
await this.publishEvent('TaskCancelled', { taskId });
|
|
534
327
|
return ok(undefined);
|
|
@@ -537,28 +330,7 @@ export class QueenCoordinator {
|
|
|
537
330
|
return this.tasks.get(taskId);
|
|
538
331
|
}
|
|
539
332
|
listTasks(filter) {
|
|
540
|
-
|
|
541
|
-
if (filter) {
|
|
542
|
-
if (filter.status) {
|
|
543
|
-
tasks = tasks.filter(t => t.status === filter.status);
|
|
544
|
-
}
|
|
545
|
-
if (filter.domain) {
|
|
546
|
-
tasks = tasks.filter(t => t.assignedDomain === filter.domain);
|
|
547
|
-
}
|
|
548
|
-
if (filter.priority) {
|
|
549
|
-
tasks = tasks.filter(t => t.task.priority === filter.priority);
|
|
550
|
-
}
|
|
551
|
-
if (filter.type) {
|
|
552
|
-
tasks = tasks.filter(t => t.task.type === filter.type);
|
|
553
|
-
}
|
|
554
|
-
if (filter.fromDate) {
|
|
555
|
-
tasks = tasks.filter(t => t.task.createdAt >= filter.fromDate);
|
|
556
|
-
}
|
|
557
|
-
if (filter.toDate) {
|
|
558
|
-
tasks = tasks.filter(t => t.task.createdAt <= filter.toDate);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
return tasks;
|
|
333
|
+
return listTasksImpl(this.tasks, filter);
|
|
562
334
|
}
|
|
563
335
|
// ============================================================================
|
|
564
336
|
// Domain Coordination
|
|
@@ -566,40 +338,10 @@ export class QueenCoordinator {
|
|
|
566
338
|
getDomainHealth(domain) {
|
|
567
339
|
if (this.domainPlugins) {
|
|
568
340
|
const plugin = this.domainPlugins.get(domain);
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
// Fallback: compute from agent coordinator
|
|
572
|
-
const agents = this.agentCoordinator.listAgents({ domain });
|
|
573
|
-
const activeAgents = agents.filter(a => a.status === 'running').length;
|
|
574
|
-
const idleAgents = agents.filter(a => a.status === 'idle').length;
|
|
575
|
-
const failedAgents = agents.filter(a => a.status === 'failed').length;
|
|
576
|
-
// Issue #205 fix: Determine status based on agent state
|
|
577
|
-
// 'idle' is normal for ephemeral agent model (agents spawn on-demand)
|
|
578
|
-
let status;
|
|
579
|
-
if (failedAgents > 0 && failedAgents >= agents.length / 2) {
|
|
580
|
-
status = 'unhealthy';
|
|
581
|
-
}
|
|
582
|
-
else if (failedAgents > 0) {
|
|
583
|
-
status = 'degraded';
|
|
584
|
-
}
|
|
585
|
-
else if (activeAgents > 0) {
|
|
586
|
-
status = 'healthy';
|
|
587
|
-
}
|
|
588
|
-
else {
|
|
589
|
-
// No agents or all idle - normal for ephemeral agent model
|
|
590
|
-
status = 'idle';
|
|
341
|
+
if (plugin)
|
|
342
|
+
return plugin.getHealth();
|
|
591
343
|
}
|
|
592
|
-
return
|
|
593
|
-
status,
|
|
594
|
-
agents: {
|
|
595
|
-
total: agents.length,
|
|
596
|
-
active: activeAgents,
|
|
597
|
-
idle: idleAgents,
|
|
598
|
-
failed: failedAgents,
|
|
599
|
-
},
|
|
600
|
-
lastActivity: this.domainLastActivity.get(domain),
|
|
601
|
-
errors: [],
|
|
602
|
-
};
|
|
344
|
+
return computeDomainHealthFromAgents(this.agentCoordinator, domain, this.domainLastActivity.get(domain));
|
|
603
345
|
}
|
|
604
346
|
getDomainLoad(domain) {
|
|
605
347
|
const queue = this.domainQueues.get(domain) || [];
|
|
@@ -617,15 +359,14 @@ export class QueenCoordinator {
|
|
|
617
359
|
});
|
|
618
360
|
}
|
|
619
361
|
getBusyDomains() {
|
|
620
|
-
|
|
621
|
-
return ALL_DOMAINS.filter(domain => this.getDomainLoad(domain) > loadThreshold);
|
|
362
|
+
return ALL_DOMAINS.filter(domain => this.getDomainLoad(domain) > this.config.workStealing.loadThreshold);
|
|
622
363
|
}
|
|
623
364
|
// ============================================================================
|
|
624
|
-
// Work Stealing
|
|
365
|
+
// Work Stealing
|
|
625
366
|
// ============================================================================
|
|
626
367
|
enableWorkStealing() {
|
|
627
368
|
if (!this.workStealingTimer) {
|
|
628
|
-
this.
|
|
369
|
+
this.workStealingTimer = startWorkStealingTimer(this.config, () => this.triggerWorkStealing().then(() => { }));
|
|
629
370
|
}
|
|
630
371
|
}
|
|
631
372
|
disableWorkStealing() {
|
|
@@ -635,41 +376,7 @@ export class QueenCoordinator {
|
|
|
635
376
|
}
|
|
636
377
|
}
|
|
637
378
|
async triggerWorkStealing() {
|
|
638
|
-
|
|
639
|
-
const idleDomains = this.getIdleDomains();
|
|
640
|
-
const busyDomains = this.getBusyDomains();
|
|
641
|
-
if (idleDomains.length === 0 || busyDomains.length === 0) {
|
|
642
|
-
return 0;
|
|
643
|
-
}
|
|
644
|
-
// Sort busy domains by load (highest first)
|
|
645
|
-
busyDomains.sort((a, b) => this.getDomainLoad(b) - this.getDomainLoad(a));
|
|
646
|
-
for (const busyDomain of busyDomains) {
|
|
647
|
-
if (idleDomains.length === 0)
|
|
648
|
-
break;
|
|
649
|
-
const queue = this.domainQueues.get(busyDomain) || [];
|
|
650
|
-
const stealCount = Math.min(queue.length, this.config.workStealing.stealBatchSize);
|
|
651
|
-
for (let i = 0; i < stealCount && idleDomains.length > 0; i++) {
|
|
652
|
-
// Find a task that can be handled by an idle domain
|
|
653
|
-
const task = queue.find(t => this.canDomainHandleTask(idleDomains[0], t));
|
|
654
|
-
if (task) {
|
|
655
|
-
// Steal the task
|
|
656
|
-
const stealerDomain = idleDomains.shift();
|
|
657
|
-
this.removeFromQueues(task);
|
|
658
|
-
// SEC-003 Simplified: Log work stealing for observability
|
|
659
|
-
this.auditLogger.logSteal(task.id, busyDomain, stealerDomain);
|
|
660
|
-
// Reassign to idle domain
|
|
661
|
-
await this.assignTaskToDomain(task, stealerDomain);
|
|
662
|
-
stolenCount++;
|
|
663
|
-
this.tasksStolen++;
|
|
664
|
-
await this.publishEvent('TaskStolen', {
|
|
665
|
-
taskId: task.id,
|
|
666
|
-
fromDomain: busyDomain,
|
|
667
|
-
toDomain: stealerDomain,
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
return stolenCount;
|
|
379
|
+
return triggerWorkStealingImpl(this.createWorkStealingContext());
|
|
673
380
|
}
|
|
674
381
|
// ============================================================================
|
|
675
382
|
// Agent Management
|
|
@@ -685,19 +392,11 @@ export class QueenCoordinator {
|
|
|
685
392
|
return err(new Error('Maximum concurrent agents reached (15)'));
|
|
686
393
|
}
|
|
687
394
|
const result = await this.agentCoordinator.spawn({
|
|
688
|
-
name: `${domain}-${type}-${Date.now()}`,
|
|
689
|
-
domain,
|
|
690
|
-
type,
|
|
691
|
-
capabilities,
|
|
395
|
+
name: `${domain}-${type}-${Date.now()}`, domain, type, capabilities,
|
|
692
396
|
});
|
|
693
397
|
if (result.success) {
|
|
694
398
|
this.domainLastActivity.set(domain, new Date());
|
|
695
|
-
await this.publishEvent('AgentSpawned', {
|
|
696
|
-
agentId: result.value,
|
|
697
|
-
domain,
|
|
698
|
-
type,
|
|
699
|
-
capabilities,
|
|
700
|
-
});
|
|
399
|
+
await this.publishEvent('AgentSpawned', { agentId: result.value, domain, type, capabilities });
|
|
701
400
|
}
|
|
702
401
|
return result;
|
|
703
402
|
}
|
|
@@ -709,65 +408,36 @@ export class QueenCoordinator {
|
|
|
709
408
|
const issues = [];
|
|
710
409
|
let unhealthyCount = 0;
|
|
711
410
|
let degradedCount = 0;
|
|
712
|
-
|
|
713
|
-
// This prevents alarming warnings for domains that aren't configured
|
|
714
|
-
const enabledDomains = this.getEnabledDomains();
|
|
411
|
+
const enabledDomains = getEnabledDomains(this.domainPlugins, ALL_DOMAINS);
|
|
715
412
|
for (const domain of enabledDomains) {
|
|
716
413
|
const health = this.getDomainHealth(domain);
|
|
717
414
|
if (health) {
|
|
718
415
|
domainHealth.set(domain, health);
|
|
719
|
-
// Issue #205 fix: 'idle' status is normal - don't report as issue
|
|
720
416
|
if (health.status === 'unhealthy') {
|
|
721
417
|
unhealthyCount++;
|
|
722
|
-
issues.push({
|
|
723
|
-
domain,
|
|
724
|
-
severity: 'high',
|
|
725
|
-
message: `Domain ${domain} is unhealthy`,
|
|
726
|
-
timestamp: new Date(),
|
|
727
|
-
});
|
|
418
|
+
issues.push({ domain, severity: 'high', message: `Domain ${domain} is unhealthy`, timestamp: new Date() });
|
|
728
419
|
}
|
|
729
420
|
else if (health.status === 'degraded') {
|
|
730
421
|
degradedCount++;
|
|
731
|
-
issues.push({
|
|
732
|
-
domain,
|
|
733
|
-
severity: 'medium',
|
|
734
|
-
message: `Domain ${domain} is degraded`,
|
|
735
|
-
timestamp: new Date(),
|
|
736
|
-
});
|
|
422
|
+
issues.push({ domain, severity: 'medium', message: `Domain ${domain} is degraded`, timestamp: new Date() });
|
|
737
423
|
}
|
|
738
|
-
// Note: 'idle' and 'healthy' don't generate issues
|
|
739
424
|
}
|
|
740
425
|
}
|
|
741
426
|
const agents = this.agentCoordinator.listAgents();
|
|
742
427
|
const activeAgents = agents.filter(a => a.status === 'running').length;
|
|
743
|
-
const pendingTasks = this.getQueuedTaskCount();
|
|
744
|
-
const runningTasks = this.getRunningTaskCount();
|
|
745
|
-
// Issue #205 fix: Determine overall health
|
|
746
|
-
// An idle system (no agents, no tasks) should show 'healthy', not 'degraded'
|
|
747
428
|
let status = 'healthy';
|
|
748
|
-
if (unhealthyCount > 0)
|
|
429
|
+
if (unhealthyCount > 0)
|
|
749
430
|
status = 'unhealthy';
|
|
750
|
-
|
|
751
|
-
else if (degradedCount > enabledDomains.length / 2) {
|
|
431
|
+
else if (degradedCount > enabledDomains.length / 2)
|
|
752
432
|
status = 'degraded';
|
|
753
|
-
}
|
|
754
|
-
// Note: All domains being 'idle' means system is ready, not degraded
|
|
755
433
|
const baseHealth = {
|
|
756
|
-
status,
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
activeAgents,
|
|
760
|
-
pendingTasks,
|
|
761
|
-
runningTasks,
|
|
434
|
+
status, domainHealth,
|
|
435
|
+
totalAgents: agents.length, activeAgents,
|
|
436
|
+
pendingTasks: this.getQueuedTaskCount(), runningTasks: this.getRunningTaskCount(),
|
|
762
437
|
workStealingActive: this.workStealingTimer !== null,
|
|
763
|
-
lastHealthCheck: new Date(),
|
|
764
|
-
issues,
|
|
438
|
+
lastHealthCheck: new Date(), issues,
|
|
765
439
|
};
|
|
766
|
-
|
|
767
|
-
if (this.minCutBridge) {
|
|
768
|
-
return this.minCutBridge.extendQueenHealth(baseHealth);
|
|
769
|
-
}
|
|
770
|
-
return baseHealth;
|
|
440
|
+
return this.minCutBridge ? this.minCutBridge.extendQueenHealth(baseHealth) : baseHealth;
|
|
771
441
|
}
|
|
772
442
|
getMetrics() {
|
|
773
443
|
const domainUtilization = new Map();
|
|
@@ -780,41 +450,20 @@ export class QueenCoordinator {
|
|
|
780
450
|
const agents = this.agentCoordinator.listAgents();
|
|
781
451
|
const activeAgents = agents.filter(a => a.status === 'running').length;
|
|
782
452
|
const agentUtilization = agents.length > 0 ? activeAgents / agents.length : 0;
|
|
783
|
-
// MEM-001 FIX: Use CircularBuffer's average() method for O(n) calculation
|
|
784
|
-
// instead of array reduce which requires O(n) space for intermediate results
|
|
785
453
|
const avgDuration = this.taskDurations.average();
|
|
786
454
|
const baseMetrics = {
|
|
787
|
-
tasksReceived: this.tasksReceived,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
averageTaskDuration: avgDuration,
|
|
792
|
-
domainUtilization,
|
|
793
|
-
agentUtilization,
|
|
794
|
-
protocolsExecuted: this.protocolsExecuted,
|
|
795
|
-
workflowsExecuted: this.workflowsExecuted,
|
|
455
|
+
tasksReceived: this.tasksReceived, tasksCompleted: this.tasksCompleted,
|
|
456
|
+
tasksFailed: this.tasksFailed, tasksStolen: this.tasksStolen,
|
|
457
|
+
averageTaskDuration: avgDuration, domainUtilization, agentUtilization,
|
|
458
|
+
protocolsExecuted: this.protocolsExecuted, workflowsExecuted: this.workflowsExecuted,
|
|
796
459
|
uptime: Date.now() - this.startTime.getTime(),
|
|
797
460
|
};
|
|
798
|
-
|
|
799
|
-
if (this.minCutBridge) {
|
|
800
|
-
return this.minCutBridge.extendQueenMetrics(baseMetrics);
|
|
801
|
-
}
|
|
802
|
-
return baseMetrics;
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
* Get MinCut bridge for direct topology access
|
|
806
|
-
* ADR-047: Allows QE agents to access topology health directly
|
|
807
|
-
*/
|
|
808
|
-
getMinCutBridge() {
|
|
809
|
-
return this.minCutBridge;
|
|
461
|
+
return this.minCutBridge ? this.minCutBridge.extendQueenMetrics(baseMetrics) : baseMetrics;
|
|
810
462
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
* @param domainName - The domain to inject the bridge into
|
|
816
|
-
* @returns true if bridge was injected, false if domain not found or bridge unavailable
|
|
817
|
-
*/
|
|
463
|
+
// ============================================================================
|
|
464
|
+
// Subsystem Accessors
|
|
465
|
+
// ============================================================================
|
|
466
|
+
getMinCutBridge() { return this.minCutBridge; }
|
|
818
467
|
injectMinCutBridgeIntoDomain(domainName) {
|
|
819
468
|
if (!this.minCutBridge) {
|
|
820
469
|
console.warn(`[QueenCoordinator] Cannot inject MinCut bridge: bridge not initialized`);
|
|
@@ -837,799 +486,264 @@ export class QueenCoordinator {
|
|
|
837
486
|
console.warn(`[QueenCoordinator] Domain ${domainName} does not support MinCut integration`);
|
|
838
487
|
return false;
|
|
839
488
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
* Get domain circuit breaker registry
|
|
849
|
-
* ADR-064: Allows external components to query breaker state
|
|
850
|
-
*/
|
|
851
|
-
getDomainBreakerRegistry() {
|
|
852
|
-
return this.domainBreakerRegistry;
|
|
853
|
-
}
|
|
854
|
-
/**
|
|
855
|
-
* Get domain team manager
|
|
856
|
-
* ADR-064: Allows external components to manage domain teams
|
|
857
|
-
*/
|
|
858
|
-
getDomainTeamManager() {
|
|
859
|
-
return this.domainTeamManager;
|
|
860
|
-
}
|
|
861
|
-
/**
|
|
862
|
-
* Get fleet tier selector
|
|
863
|
-
* ADR-064: Allows external components to query/select fleet tiers
|
|
864
|
-
*/
|
|
865
|
-
getTierSelector() {
|
|
866
|
-
return this.tierSelector;
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* Connect a QEReasoningBank for automatic pattern training.
|
|
870
|
-
* ADR-064 Phase 3: Creates the adapter and TaskCompletedHook pipeline.
|
|
871
|
-
*
|
|
872
|
-
* @param bank - The QEReasoningBank to train patterns into
|
|
873
|
-
*/
|
|
489
|
+
getTinyDancerRouter() { return this.tinyDancerRouter; }
|
|
490
|
+
getDomainBreakerRegistry() { return this.domainBreakerRegistry; }
|
|
491
|
+
getDomainTeamManager() { return this.domainTeamManager; }
|
|
492
|
+
getTierSelector() { return this.tierSelector; }
|
|
493
|
+
getTraceCollector() { return this.traceCollector; }
|
|
494
|
+
getHypothesisManager() { return this.hypothesisManager; }
|
|
495
|
+
getFederationMailbox() { return this.federationMailbox; }
|
|
496
|
+
getDynamicScaler() { return this.dynamicScaler; }
|
|
874
497
|
connectReasoningBank(bank) {
|
|
875
498
|
const adapter = new ReasoningBankPatternStore(bank);
|
|
876
499
|
this.taskCompletedHook = new TaskCompletedHook({}, adapter);
|
|
877
500
|
console.log('[QueenCoordinator] ReasoningBank connected for pattern training');
|
|
878
501
|
}
|
|
879
|
-
/**
|
|
880
|
-
* Get the distributed trace collector
|
|
881
|
-
* ADR-064 Phase 3: Allows external components to trace agent operations
|
|
882
|
-
*/
|
|
883
|
-
getTraceCollector() {
|
|
884
|
-
return this.traceCollector;
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Get the competing hypotheses manager
|
|
888
|
-
* ADR-064 Phase 4A: Multi-agent investigation coordination
|
|
889
|
-
*/
|
|
890
|
-
getHypothesisManager() {
|
|
891
|
-
return this.hypothesisManager;
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* Get the cross-fleet federation mailbox
|
|
895
|
-
* ADR-064 Phase 4B: Multi-service communication
|
|
896
|
-
*/
|
|
897
|
-
getFederationMailbox() {
|
|
898
|
-
return this.federationMailbox;
|
|
899
|
-
}
|
|
900
|
-
/**
|
|
901
|
-
* Get the dynamic agent scaler
|
|
902
|
-
* ADR-064 Phase 4C: Workload-based auto-scaling
|
|
903
|
-
*/
|
|
904
|
-
getDynamicScaler() {
|
|
905
|
-
return this.dynamicScaler;
|
|
906
|
-
}
|
|
907
502
|
// ============================================================================
|
|
908
503
|
// Protocol & Workflow
|
|
909
504
|
// ============================================================================
|
|
910
505
|
async executeProtocol(protocolId, params) {
|
|
911
|
-
if (!this.protocolExecutor)
|
|
506
|
+
if (!this.protocolExecutor)
|
|
912
507
|
return err(new Error('Protocol executor not configured'));
|
|
913
|
-
}
|
|
914
508
|
const result = await this.protocolExecutor.execute(protocolId, params);
|
|
915
509
|
if (result.success) {
|
|
916
510
|
this.protocolsExecuted++;
|
|
917
|
-
await this.publishEvent('ProtocolExecuted', {
|
|
918
|
-
protocolId,
|
|
919
|
-
executionId: result.value.executionId,
|
|
920
|
-
});
|
|
511
|
+
await this.publishEvent('ProtocolExecuted', { protocolId, executionId: result.value.executionId });
|
|
921
512
|
return ok(result.value.executionId);
|
|
922
513
|
}
|
|
923
514
|
return result;
|
|
924
515
|
}
|
|
925
516
|
async executeWorkflow(workflowId, params) {
|
|
926
|
-
if (!this.workflowExecutor)
|
|
517
|
+
if (!this.workflowExecutor)
|
|
927
518
|
return err(new Error('Workflow executor not configured'));
|
|
928
|
-
}
|
|
929
519
|
const result = await this.workflowExecutor.execute(workflowId, params);
|
|
930
520
|
if (result.success) {
|
|
931
521
|
this.workflowsExecuted++;
|
|
932
|
-
await this.publishEvent('WorkflowExecuted', {
|
|
933
|
-
workflowId,
|
|
934
|
-
executionId: result.value.executionId,
|
|
935
|
-
});
|
|
522
|
+
await this.publishEvent('WorkflowExecuted', { workflowId, executionId: result.value.executionId });
|
|
936
523
|
return ok(result.value.executionId);
|
|
937
524
|
}
|
|
938
525
|
return result;
|
|
939
526
|
}
|
|
940
527
|
// ============================================================================
|
|
941
|
-
//
|
|
528
|
+
// Public cleanup (also exposed for tests)
|
|
942
529
|
// ============================================================================
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
* Issue #205 fix: Used to only check enabled domains in health reporting
|
|
946
|
-
*/
|
|
947
|
-
getEnabledDomains() {
|
|
948
|
-
// If we have domain plugins loaded, use those as the source of truth
|
|
949
|
-
if (this.domainPlugins && this.domainPlugins.size > 0) {
|
|
950
|
-
return Array.from(this.domainPlugins.keys());
|
|
951
|
-
}
|
|
952
|
-
// Fallback to ALL_DOMAINS if no plugins loaded yet
|
|
953
|
-
return [...ALL_DOMAINS];
|
|
530
|
+
cleanupCompletedTasks(retentionMs = 3600000) {
|
|
531
|
+
return cleanupCompletedTasksImpl(this.tasks, this.taskTraceContexts, retentionMs);
|
|
954
532
|
}
|
|
533
|
+
// ============================================================================
|
|
534
|
+
// Private Helpers
|
|
535
|
+
// ============================================================================
|
|
536
|
+
/** Kept as a method so tests that cast to `{ subscribeToEvents() }` still work. */
|
|
955
537
|
subscribeToEvents() {
|
|
956
|
-
|
|
957
|
-
// Clear any existing subscriptions first to prevent duplicates
|
|
958
|
-
this.eventSubscriptionIds = [];
|
|
959
|
-
// Listen for task completion events from domains
|
|
960
|
-
for (const domain of ALL_DOMAINS) {
|
|
961
|
-
const subscriptionId = this.router.subscribeToDoamin(domain, async (event) => {
|
|
962
|
-
await this.handleDomainEvent(event);
|
|
963
|
-
});
|
|
964
|
-
this.eventSubscriptionIds.push(subscriptionId);
|
|
965
|
-
}
|
|
966
|
-
// Listen for specific coordination events
|
|
967
|
-
const taskCompletedSubId = this.router.subscribeToEventType('TaskCompleted', async (event) => {
|
|
968
|
-
await this.handleTaskCompleted(event);
|
|
969
|
-
});
|
|
970
|
-
this.eventSubscriptionIds.push(taskCompletedSubId);
|
|
971
|
-
const taskFailedSubId = this.router.subscribeToEventType('TaskFailed', async (event) => {
|
|
972
|
-
await this.handleTaskFailed(event);
|
|
973
|
-
});
|
|
974
|
-
this.eventSubscriptionIds.push(taskFailedSubId);
|
|
975
|
-
const agentStatusSubId = this.router.subscribeToEventType('AgentStatusChanged', async (event) => {
|
|
976
|
-
await this.handleAgentStatusChanged(event);
|
|
977
|
-
});
|
|
978
|
-
this.eventSubscriptionIds.push(agentStatusSubId);
|
|
538
|
+
this.eventSubscriptionIds = subscribeToEvents(this.createEventHandlerContext(), ALL_DOMAINS);
|
|
979
539
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
this.domainLastActivity.set(event.source, new Date());
|
|
983
|
-
// Check if this frees up capacity for queued tasks
|
|
984
|
-
await this.processQueue();
|
|
540
|
+
enqueueTaskInternal(task) {
|
|
541
|
+
enqueueTask(this.taskQueue, this.domainQueues, task);
|
|
985
542
|
}
|
|
986
|
-
async
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
this.taskDurations.push(duration);
|
|
1008
|
-
// SEC-003 Simplified: Log task completion
|
|
1009
|
-
this.auditLogger.logComplete(taskId, execution.assignedAgents[0]);
|
|
1010
|
-
// QCSD: Invoke cross-phase hooks on agent completion
|
|
1011
|
-
// This enables feedback loops: Production→Ideation, CI/CD→Development, etc.
|
|
1012
|
-
try {
|
|
1013
|
-
const hookExecutor = getCrossPhaseHookExecutor();
|
|
1014
|
-
const agentName = execution.assignedAgents[0];
|
|
1015
|
-
if (agentName) {
|
|
1016
|
-
await hookExecutor.onAgentComplete(agentName, {
|
|
1017
|
-
taskId,
|
|
1018
|
-
taskType: execution.task.type,
|
|
1019
|
-
domain: execution.assignedDomain,
|
|
1020
|
-
result,
|
|
1021
|
-
duration,
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
catch (hookError) {
|
|
1026
|
-
// Non-fatal: log but don't fail the task completion
|
|
1027
|
-
console.warn('[QueenCoordinator] Cross-phase hook error:', hookError);
|
|
1028
|
-
}
|
|
1029
|
-
// ADR-058: Record successful task outcome with governance
|
|
1030
|
-
try {
|
|
1031
|
-
await queenGovernanceAdapter.afterTaskExecution({
|
|
1032
|
-
taskId,
|
|
1033
|
-
taskType: execution.task.type,
|
|
1034
|
-
agentId: execution.assignedAgents[0] || 'unknown',
|
|
1035
|
-
domain: execution.assignedDomain || 'test-generation',
|
|
1036
|
-
priority: execution.task.priority,
|
|
1037
|
-
}, true, // success
|
|
1038
|
-
0, // cost (not tracked at this level)
|
|
1039
|
-
0 // tokens (not tracked at this level)
|
|
1040
|
-
);
|
|
1041
|
-
}
|
|
1042
|
-
catch (govError) {
|
|
1043
|
-
console.warn('[QueenCoordinator] Governance tracking error:', govError);
|
|
1044
|
-
}
|
|
1045
|
-
// ADR-064: Record success in domain circuit breaker
|
|
1046
|
-
if (this.domainBreakerRegistry && execution.assignedDomain) {
|
|
1047
|
-
this.domainBreakerRegistry.getBreaker(execution.assignedDomain).recordSuccess();
|
|
1048
|
-
}
|
|
1049
|
-
// ADR-064 Phase 3: Complete the trace span for this task
|
|
1050
|
-
if (this.traceCollector) {
|
|
1051
|
-
const traceCtx = this.taskTraceContexts.get(taskId);
|
|
1052
|
-
if (traceCtx) {
|
|
1053
|
-
this.traceCollector.completeSpan(traceCtx.spanId);
|
|
1054
|
-
this.taskTraceContexts.delete(taskId);
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
// ADR-064 Phase 3: Train patterns from completed tasks
|
|
1058
|
-
if (this.taskCompletedHook) {
|
|
1059
|
-
try {
|
|
1060
|
-
const resultObj = (typeof result === 'object' && result !== null)
|
|
1061
|
-
? result
|
|
1062
|
-
: null;
|
|
1063
|
-
if (resultObj === null) {
|
|
1064
|
-
console.error(`[QueenCoordinator] Pattern training skipped for task ${taskId}: ` +
|
|
1065
|
-
`result is not an object (got ${typeof result})`);
|
|
1066
|
-
}
|
|
1067
|
-
else {
|
|
1068
|
-
const metrics = this.extractTaskMetrics(resultObj, taskId);
|
|
1069
|
-
if (metrics) {
|
|
1070
|
-
const taskResult = {
|
|
1071
|
-
taskId,
|
|
1072
|
-
agentId: execution.assignedAgents[0] || 'unknown',
|
|
1073
|
-
domain: execution.assignedDomain || 'test-generation',
|
|
1074
|
-
type: execution.task.type,
|
|
1075
|
-
status: 'completed',
|
|
1076
|
-
output: resultObj,
|
|
1077
|
-
metrics,
|
|
1078
|
-
duration,
|
|
1079
|
-
timestamp: Date.now(),
|
|
1080
|
-
};
|
|
1081
|
-
// Fire-and-forget: don't await to avoid blocking task completion
|
|
1082
|
-
this.taskCompletedHook.onTaskCompleted(taskResult).catch(hookErr => {
|
|
1083
|
-
console.warn('[QueenCoordinator] Pattern training error:', hookErr);
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
catch (hookError) {
|
|
1089
|
-
console.warn('[QueenCoordinator] Pattern training setup error:', hookError);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
// Process queue for next task
|
|
1094
|
-
await this.processQueue();
|
|
543
|
+
async publishEvent(type, payload) {
|
|
544
|
+
await this.eventBus.publish({
|
|
545
|
+
id: uuidv4(),
|
|
546
|
+
type: `Queen${type}`,
|
|
547
|
+
timestamp: new Date(),
|
|
548
|
+
source: 'queen-coordinator',
|
|
549
|
+
payload,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
queueTask(task) {
|
|
553
|
+
this.enqueueTaskInternal(task);
|
|
554
|
+
const execution = {
|
|
555
|
+
taskId: task.id, task, status: 'queued', assignedAgents: [], retryCount: 0,
|
|
556
|
+
};
|
|
557
|
+
this.tasks.set(task.id, execution);
|
|
558
|
+
this.tasksReceived++;
|
|
559
|
+
this.auditLogger.logSubmit(task.id, { type: task.type, priority: task.priority });
|
|
560
|
+
this.auditLogger.logQueue(task.id, getQueuePosition(this.taskQueue, task));
|
|
561
|
+
// Fire-and-forget event (queuing is sync from caller's perspective)
|
|
562
|
+
this.publishEvent('TaskQueued', { taskId: task.id, task, position: getQueuePosition(this.taskQueue, task) });
|
|
563
|
+
return ok(task.id);
|
|
1095
564
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
testsFailed: typeof m.testsFailed === 'number' ? m.testsFailed : undefined,
|
|
1107
|
-
coverageChange: typeof m.coverageChange === 'number' ? m.coverageChange : undefined,
|
|
1108
|
-
securityIssues: typeof m.securityIssues === 'number' ? m.securityIssues : undefined,
|
|
1109
|
-
performanceMs: typeof m.performanceMs === 'number' ? m.performanceMs : undefined,
|
|
1110
|
-
linesChanged: typeof m.linesChanged === 'number' ? m.linesChanged : undefined,
|
|
565
|
+
selectFleetTier(task) {
|
|
566
|
+
if (!this.tierSelector)
|
|
567
|
+
return undefined;
|
|
568
|
+
try {
|
|
569
|
+
const tierContext = {
|
|
570
|
+
trigger: task.payload?.trigger ?? 'manual',
|
|
571
|
+
changedFiles: task.payload?.changedFiles,
|
|
572
|
+
affectedDomains: task.targetDomains,
|
|
573
|
+
severity: task.priority === 'p0' ? 'critical' : task.priority === 'p1' ? 'high' : undefined,
|
|
574
|
+
isHotfix: task.payload?.isHotfix,
|
|
1111
575
|
};
|
|
576
|
+
const tierResult = this.tierSelector.selectTier(tierContext);
|
|
577
|
+
console.log(`[Queen] Fleet tier: ${tierResult.selectedTier} (${tierResult.reason})`);
|
|
578
|
+
return tierResult.selectedTier;
|
|
1112
579
|
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
return
|
|
1116
|
-
testsPassed: typeof resultObj.testsPassed === 'number' ? resultObj.testsPassed : undefined,
|
|
1117
|
-
testsFailed: typeof resultObj.testsFailed === 'number' ? resultObj.testsFailed : undefined,
|
|
1118
|
-
coverageChange: typeof resultObj.coverageChange === 'number' ? resultObj.coverageChange : undefined,
|
|
1119
|
-
securityIssues: typeof resultObj.securityIssues === 'number' ? resultObj.securityIssues : undefined,
|
|
1120
|
-
performanceMs: typeof resultObj.performanceMs === 'number' ? resultObj.performanceMs : undefined,
|
|
1121
|
-
linesChanged: typeof resultObj.linesChanged === 'number' ? resultObj.linesChanged : undefined,
|
|
1122
|
-
};
|
|
580
|
+
catch (tierError) {
|
|
581
|
+
console.warn('[QueenCoordinator] Tier selection error (continuing):', tierError);
|
|
582
|
+
return undefined;
|
|
1123
583
|
}
|
|
1124
|
-
console.error(`[QueenCoordinator] Pattern training skipped for task ${taskId}: ` +
|
|
1125
|
-
`result object has no recognizable metrics shape (keys: ${Object.keys(resultObj).join(', ')})`);
|
|
1126
|
-
return null;
|
|
1127
584
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
const traceCtx = this.taskTraceContexts.get(taskId);
|
|
1144
|
-
if (traceCtx) {
|
|
1145
|
-
this.traceCollector.failSpan(traceCtx.spanId, error || 'Task failed');
|
|
1146
|
-
this.taskTraceContexts.delete(taskId);
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
// Check if we should retry
|
|
1150
|
-
if (execution.retryCount < this.config.taskRetryLimit) {
|
|
1151
|
-
// SEC-003 Simplified: Log failure for observability
|
|
1152
|
-
this.auditLogger.logFail(taskId, execution.assignedAgents[0], error);
|
|
1153
|
-
// Retry the task
|
|
1154
|
-
const retried = {
|
|
1155
|
-
...execution,
|
|
1156
|
-
status: 'queued',
|
|
1157
|
-
retryCount: execution.retryCount + 1,
|
|
1158
|
-
error,
|
|
1159
|
-
};
|
|
1160
|
-
this.tasks.set(taskId, retried);
|
|
1161
|
-
this.enqueueTask(execution.task);
|
|
1162
|
-
await this.publishEvent('TaskRetrying', {
|
|
1163
|
-
taskId,
|
|
1164
|
-
retryCount: retried.retryCount,
|
|
1165
|
-
error,
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
else {
|
|
1169
|
-
// Mark as failed
|
|
1170
|
-
this.tasks.set(taskId, {
|
|
1171
|
-
...execution,
|
|
1172
|
-
status: 'failed',
|
|
1173
|
-
completedAt: new Date(),
|
|
1174
|
-
error,
|
|
1175
|
-
});
|
|
1176
|
-
this.tasksFailed++;
|
|
1177
|
-
// SEC-003 Simplified: Log permanent failure
|
|
1178
|
-
this.auditLogger.logFail(taskId, execution.assignedAgents[0], error);
|
|
1179
|
-
// ADR-058: Record failed task outcome with governance
|
|
1180
|
-
try {
|
|
1181
|
-
await queenGovernanceAdapter.afterTaskExecution({
|
|
1182
|
-
taskId,
|
|
1183
|
-
taskType: execution.task.type,
|
|
1184
|
-
agentId: execution.assignedAgents[0] || 'unknown',
|
|
1185
|
-
domain: execution.assignedDomain || 'test-generation',
|
|
1186
|
-
priority: execution.task.priority,
|
|
1187
|
-
}, false, // success = false
|
|
1188
|
-
0, // cost
|
|
1189
|
-
0 // tokens
|
|
1190
|
-
);
|
|
1191
|
-
}
|
|
1192
|
-
catch (govError) {
|
|
1193
|
-
console.warn('[QueenCoordinator] Governance tracking error:', govError);
|
|
1194
|
-
}
|
|
1195
|
-
// ADR-064 Phase 4A: Create competing hypotheses investigation for
|
|
1196
|
-
// permanent failures in critical domains (p0/p1 priority)
|
|
1197
|
-
if (this.hypothesisManager && (execution.task.priority === 'p0' || execution.task.priority === 'p1')) {
|
|
1198
|
-
try {
|
|
1199
|
-
const domain = execution.assignedDomain || 'test-generation';
|
|
1200
|
-
const investigation = this.hypothesisManager.createInvestigation(taskId, domain, `Root cause analysis for ${execution.task.type} failure: ${error}`);
|
|
1201
|
-
// Seed with two competing hypotheses
|
|
1202
|
-
this.hypothesisManager.addHypothesis(investigation.id, `Infrastructure failure in domain '${domain}' caused task ${taskId} to fail`, 'log-analysis', `${domain}-lead`);
|
|
1203
|
-
this.hypothesisManager.addHypothesis(investigation.id, `Logic/configuration error in task payload caused ${execution.task.type} to fail: ${error}`, 'code-analysis', execution.assignedAgents[0] || 'unknown');
|
|
1204
|
-
console.log(`[QueenCoordinator] Competing hypotheses investigation created: ${investigation.id}`);
|
|
1205
|
-
}
|
|
1206
|
-
catch (hypothesisError) {
|
|
1207
|
-
console.warn('[QueenCoordinator] Hypothesis creation error:', hypothesisError);
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
585
|
+
startTaskTrace(task, taskId) {
|
|
586
|
+
if (!this.traceCollector)
|
|
587
|
+
return;
|
|
588
|
+
try {
|
|
589
|
+
const { context } = this.traceCollector.startTrace({
|
|
590
|
+
operationName: task.type,
|
|
591
|
+
agentId: task.requester || 'queen',
|
|
592
|
+
domain: task.targetDomains[0] || 'test-generation',
|
|
593
|
+
tags: { taskId, priority: task.priority },
|
|
594
|
+
});
|
|
595
|
+
const MAX_TRACE_CONTEXTS = 10000;
|
|
596
|
+
if (this.taskTraceContexts.size >= MAX_TRACE_CONTEXTS) {
|
|
597
|
+
const oldest = this.taskTraceContexts.keys().next().value;
|
|
598
|
+
if (oldest !== undefined)
|
|
599
|
+
this.taskTraceContexts.delete(oldest);
|
|
1210
600
|
}
|
|
601
|
+
this.taskTraceContexts.set(taskId, context);
|
|
1211
602
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
async handleAgentStatusChanged(event) {
|
|
1215
|
-
const { agentId: _agentId, status, domain } = event.payload;
|
|
1216
|
-
this.domainLastActivity.set(domain, new Date());
|
|
1217
|
-
// If agent completed or failed, check for queued tasks
|
|
1218
|
-
if (status === 'completed' || status === 'failed') {
|
|
1219
|
-
await this.processQueue();
|
|
603
|
+
catch (traceError) {
|
|
604
|
+
console.warn('[QueenCoordinator] Trace start error (continuing):', traceError);
|
|
1220
605
|
}
|
|
1221
606
|
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
* Queen-Domain Integration Fix: Direct task execution callback handler
|
|
1225
|
-
*/
|
|
1226
|
-
async handleTaskCompletion(result) {
|
|
1227
|
-
const execution = this.tasks.get(result.taskId);
|
|
1228
|
-
if (!execution) {
|
|
1229
|
-
console.warn(`[Queen] Received completion for unknown task: ${result.taskId}`);
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
// Update task status
|
|
1233
|
-
const updated = {
|
|
1234
|
-
...execution,
|
|
1235
|
-
status: result.success ? 'completed' : 'failed',
|
|
1236
|
-
completedAt: new Date(),
|
|
1237
|
-
result: result.data,
|
|
1238
|
-
error: result.error,
|
|
1239
|
-
};
|
|
1240
|
-
this.tasks.set(result.taskId, updated);
|
|
1241
|
-
// Update counters
|
|
1242
|
-
if (result.success) {
|
|
1243
|
-
this.tasksCompleted++;
|
|
1244
|
-
this.taskDurations.push(result.duration);
|
|
1245
|
-
// SEC-003: Log task completion
|
|
1246
|
-
this.auditLogger.logComplete(result.taskId, execution.assignedAgents[0]);
|
|
1247
|
-
}
|
|
1248
|
-
else {
|
|
1249
|
-
this.tasksFailed++;
|
|
1250
|
-
// SEC-003: Log task failure
|
|
1251
|
-
this.auditLogger.logFail(result.taskId, execution.assignedAgents[0], result.error || 'Unknown error');
|
|
1252
|
-
}
|
|
1253
|
-
// CC-002: Decrement running task counter
|
|
1254
|
-
this.runningTaskCounter = Math.max(0, this.runningTaskCounter - 1);
|
|
1255
|
-
// Stop assigned agents
|
|
1256
|
-
for (const agentId of execution.assignedAgents) {
|
|
1257
|
-
await this.agentCoordinator.stop(agentId);
|
|
1258
|
-
}
|
|
1259
|
-
// Publish event
|
|
1260
|
-
await this.publishEvent(result.success ? 'TaskCompleted' : 'TaskFailed', {
|
|
1261
|
-
taskId: result.taskId,
|
|
1262
|
-
domain: execution.assignedDomain,
|
|
1263
|
-
result: result.data,
|
|
1264
|
-
error: result.error,
|
|
1265
|
-
duration: result.duration,
|
|
1266
|
-
});
|
|
1267
|
-
// Process queue for next task
|
|
1268
|
-
await this.processQueue();
|
|
607
|
+
getRunningTaskCount() {
|
|
608
|
+
return Array.from(this.tasks.values()).filter(t => t.status === 'running' || t.status === 'assigned').length;
|
|
1269
609
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
? task.targetDomains
|
|
1273
|
-
: TASK_DOMAIN_MAP[task.type] || [];
|
|
1274
|
-
if (targetDomains.length === 0) {
|
|
1275
|
-
return err(new Error(`No domains configured for task type: ${task.type}`));
|
|
1276
|
-
}
|
|
1277
|
-
// Find the least loaded domain that can handle this task
|
|
1278
|
-
let bestDomain;
|
|
1279
|
-
let lowestLoad = Infinity;
|
|
1280
|
-
for (const domain of targetDomains) {
|
|
1281
|
-
const load = this.getDomainLoad(domain);
|
|
1282
|
-
const health = this.getDomainHealth(domain);
|
|
1283
|
-
if (health?.status !== 'unhealthy' && load < lowestLoad) {
|
|
1284
|
-
lowestLoad = load;
|
|
1285
|
-
bestDomain = domain;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
if (!bestDomain) {
|
|
1289
|
-
return err(new Error('No healthy domain available for task'));
|
|
1290
|
-
}
|
|
1291
|
-
return this.assignTaskToDomain(task, bestDomain);
|
|
610
|
+
getQueuedTaskCount() {
|
|
611
|
+
return Array.from(this.tasks.values()).filter(t => t.status === 'queued').length;
|
|
1292
612
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
let routeDecision;
|
|
1297
|
-
if (this.tinyDancerRouter) {
|
|
1298
|
-
// Convert Priority to QETask priority format
|
|
1299
|
-
const priorityMap = {
|
|
1300
|
-
p0: 'critical',
|
|
1301
|
-
p1: 'high',
|
|
1302
|
-
p2: 'normal',
|
|
1303
|
-
p3: 'low',
|
|
1304
|
-
};
|
|
1305
|
-
const classifiableTask = {
|
|
1306
|
-
description: `${task.type}: ${JSON.stringify(task.payload).slice(0, 200)}`,
|
|
1307
|
-
type: task.type,
|
|
1308
|
-
domain: domain,
|
|
1309
|
-
priority: priorityMap[task.priority],
|
|
1310
|
-
};
|
|
1311
|
-
routeDecision = await this.tinyDancerRouter.route(classifiableTask);
|
|
1312
|
-
// Log routing decision for observability
|
|
1313
|
-
if (this.config.enableMetrics) {
|
|
1314
|
-
console.log(`[Queen] TinyDancer routing: ${task.type} → tier=${routeDecision.tier}, model=${routeDecision.model}, cost=$${routeDecision.estimatedCost.toFixed(4)}`);
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
// ADR-064: Check domain circuit breaker before assigning task
|
|
1318
|
-
if (this.domainBreakerRegistry) {
|
|
1319
|
-
if (!this.domainBreakerRegistry.canExecuteInDomain(domain)) {
|
|
1320
|
-
return err(new Error(`Domain '${domain}' circuit breaker is open — too many recent failures`));
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
// ADR-064: Ensure a domain team exists for this domain via DomainTeamManager
|
|
1324
|
-
if (this.domainTeamManager) {
|
|
613
|
+
/** Initialize ADR-064 subsystems (all non-fatal). */
|
|
614
|
+
initializeSubsystems() {
|
|
615
|
+
if (this.config.enableCircuitBreakers !== false) {
|
|
1325
616
|
try {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
// Auto-create a team with a lead agent for this domain
|
|
1329
|
-
const leadId = `${domain}-lead`;
|
|
1330
|
-
this.domainTeamManager.createDomainTeam(domain, leadId);
|
|
1331
|
-
}
|
|
617
|
+
this.domainBreakerRegistry = createDomainBreakerRegistry();
|
|
618
|
+
console.log('[QueenCoordinator] Domain circuit breaker registry initialized');
|
|
1332
619
|
}
|
|
1333
|
-
catch (
|
|
1334
|
-
|
|
1335
|
-
console.warn(`[Queen] Domain team setup for '${domain}' failed (continuing):`, teamError);
|
|
620
|
+
catch (e) {
|
|
621
|
+
console.warn('[QueenCoordinator] Circuit breaker initialization failed (continuing):', e);
|
|
1336
622
|
}
|
|
1337
623
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
}
|
|
1345
|
-
const execution = {
|
|
1346
|
-
taskId: task.id,
|
|
1347
|
-
task,
|
|
1348
|
-
status: 'running',
|
|
1349
|
-
assignedDomain: domain,
|
|
1350
|
-
assignedAgents: agentIds,
|
|
1351
|
-
startedAt: new Date(),
|
|
1352
|
-
retryCount: 0,
|
|
1353
|
-
};
|
|
1354
|
-
this.tasks.set(task.id, execution);
|
|
1355
|
-
this.domainLastActivity.set(domain, new Date());
|
|
1356
|
-
// SEC-003 Simplified: Log task assignment for observability
|
|
1357
|
-
for (const agentId of agentIds) {
|
|
1358
|
-
this.auditLogger.logAssign(task.id, agentId, domain);
|
|
1359
|
-
}
|
|
1360
|
-
await this.publishEvent('TaskAssigned', {
|
|
1361
|
-
taskId: task.id,
|
|
1362
|
-
domain,
|
|
1363
|
-
agentIds,
|
|
1364
|
-
});
|
|
1365
|
-
// INTEGRATION FIX: Invoke domain plugin directly for task execution
|
|
1366
|
-
if (this.domainPlugins) {
|
|
1367
|
-
const plugin = this.domainPlugins.get(domain);
|
|
1368
|
-
// Check if plugin supports direct task execution
|
|
1369
|
-
if (plugin?.executeTask && plugin.canHandleTask?.(task.type)) {
|
|
1370
|
-
// Build task request
|
|
1371
|
-
const request = {
|
|
1372
|
-
taskId: task.id,
|
|
1373
|
-
taskType: task.type,
|
|
1374
|
-
payload: task.payload,
|
|
1375
|
-
priority: task.priority,
|
|
1376
|
-
timeout: task.timeout,
|
|
1377
|
-
correlationId: task.correlationId,
|
|
1378
|
-
};
|
|
1379
|
-
// Execute task with callback to handleTaskCompletion
|
|
1380
|
-
const execResult = await plugin.executeTask(request, (result) => this.handleTaskCompletion(result));
|
|
1381
|
-
if (!execResult.success) {
|
|
1382
|
-
// Domain rejected task - update status and decrement counter
|
|
1383
|
-
this.tasks.set(task.id, {
|
|
1384
|
-
...execution,
|
|
1385
|
-
status: 'failed',
|
|
1386
|
-
error: execResult.error.message,
|
|
1387
|
-
completedAt: new Date(),
|
|
1388
|
-
});
|
|
1389
|
-
this.runningTaskCounter = Math.max(0, this.runningTaskCounter - 1);
|
|
1390
|
-
this.tasksFailed++;
|
|
1391
|
-
// SEC-003: Log rejection
|
|
1392
|
-
this.auditLogger.logFail(task.id, agentIds[0], execResult.error.message);
|
|
1393
|
-
return err(execResult.error);
|
|
1394
|
-
}
|
|
1395
|
-
// Task accepted and running - will complete via callback
|
|
1396
|
-
return ok(task.id);
|
|
1397
|
-
}
|
|
1398
|
-
// Fallback: Send event to plugin (for domains not yet updated)
|
|
1399
|
-
if (plugin) {
|
|
1400
|
-
try {
|
|
1401
|
-
await plugin.handleEvent({
|
|
1402
|
-
id: uuidv4(),
|
|
1403
|
-
type: 'TaskAssigned',
|
|
1404
|
-
timestamp: new Date(),
|
|
1405
|
-
source: 'queen-coordinator',
|
|
1406
|
-
correlationId: task.correlationId,
|
|
1407
|
-
payload: { task },
|
|
1408
|
-
});
|
|
1409
|
-
console.warn(`[Queen] Domain ${domain} has no executeTask handler, using event fallback`);
|
|
1410
|
-
}
|
|
1411
|
-
catch (error) {
|
|
1412
|
-
// Log but don't fail - domain will handle via event bus
|
|
1413
|
-
console.warn(`[Queen] Failed to invoke domain ${domain} event handler:`, error);
|
|
1414
|
-
}
|
|
624
|
+
if (this.config.enableDomainTeams !== false) {
|
|
625
|
+
try {
|
|
626
|
+
this.agentTeamsAdapter = createAgentTeamsAdapter();
|
|
627
|
+
this.agentTeamsAdapter.initialize();
|
|
628
|
+
this.domainTeamManager = createDomainTeamManager(this.agentTeamsAdapter);
|
|
629
|
+
console.log('[QueenCoordinator] Domain team manager initialized');
|
|
1415
630
|
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* PERF-001 FIX: Use binary insertion O(log n) instead of sort O(n log n)
|
|
1421
|
-
* Binary search finds the correct insertion point, then splice inserts at that position.
|
|
1422
|
-
* This is much more efficient for maintaining sorted order with frequent insertions.
|
|
1423
|
-
*
|
|
1424
|
-
* Comparator for tasks: sorted by createdAt ascending (oldest first / FIFO within priority)
|
|
1425
|
-
*/
|
|
1426
|
-
static taskComparator = createdAtComparator();
|
|
1427
|
-
enqueueTask(task) {
|
|
1428
|
-
const priorityQueue = this.taskQueue.get(task.priority);
|
|
1429
|
-
if (priorityQueue) {
|
|
1430
|
-
// PERF-001 FIX: O(log n) binary insertion instead of O(n log n) sort
|
|
1431
|
-
// Binary search finds insertion point in O(log n), splice is O(n) but with better
|
|
1432
|
-
// cache locality and lower constant factor than full sort
|
|
1433
|
-
binaryInsert(priorityQueue, task, QueenCoordinator.taskComparator);
|
|
1434
|
-
}
|
|
1435
|
-
// Also add to domain-specific queues (unsorted - just for load tracking)
|
|
1436
|
-
for (const domain of task.targetDomains) {
|
|
1437
|
-
const domainQueue = this.domainQueues.get(domain);
|
|
1438
|
-
if (domainQueue) {
|
|
1439
|
-
domainQueue.push(task);
|
|
631
|
+
catch (e) {
|
|
632
|
+
console.warn('[QueenCoordinator] Domain team manager initialization failed (continuing):', e);
|
|
1440
633
|
}
|
|
1441
634
|
}
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
if (priorityQueue) {
|
|
1447
|
-
const idx = priorityQueue.findIndex(t => t.id === task.id);
|
|
1448
|
-
if (idx !== -1) {
|
|
1449
|
-
priorityQueue.splice(idx, 1);
|
|
635
|
+
if (this.config.enableFleetTiers !== false) {
|
|
636
|
+
try {
|
|
637
|
+
this.tierSelector = createTierSelector();
|
|
638
|
+
console.log('[QueenCoordinator] Fleet tier selector initialized');
|
|
1450
639
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
for (const domain of ALL_DOMAINS) {
|
|
1454
|
-
const domainQueue = this.domainQueues.get(domain);
|
|
1455
|
-
if (domainQueue) {
|
|
1456
|
-
const idx = domainQueue.findIndex(t => t.id === task.id);
|
|
1457
|
-
if (idx !== -1) {
|
|
1458
|
-
domainQueue.splice(idx, 1);
|
|
1459
|
-
}
|
|
640
|
+
catch (e) {
|
|
641
|
+
console.warn('[QueenCoordinator] Tier selector initialization failed (continuing):', e);
|
|
1460
642
|
}
|
|
1461
643
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
if (this.runningTaskCounter >= this.config.maxConcurrentTasks) {
|
|
1466
|
-
return;
|
|
1467
|
-
}
|
|
1468
|
-
// Process by priority (p0 first)
|
|
1469
|
-
for (const priority of ['p0', 'p1', 'p2', 'p3']) {
|
|
1470
|
-
const queue = this.taskQueue.get(priority);
|
|
1471
|
-
if (!queue || queue.length === 0)
|
|
1472
|
-
continue;
|
|
1473
|
-
const task = queue.shift();
|
|
1474
|
-
if (task) {
|
|
1475
|
-
this.removeFromQueues(task);
|
|
1476
|
-
// CC-002 FIX: Increment counter before assigning queued task
|
|
1477
|
-
this.runningTaskCounter++;
|
|
1478
|
-
try {
|
|
1479
|
-
await this.assignTask(task);
|
|
1480
|
-
}
|
|
1481
|
-
catch (error) {
|
|
1482
|
-
// Decrement if assignment fails
|
|
1483
|
-
this.runningTaskCounter--;
|
|
1484
|
-
throw error;
|
|
1485
|
-
}
|
|
1486
|
-
// Check if we can process more using the atomic counter
|
|
1487
|
-
if (this.runningTaskCounter >= this.config.maxConcurrentTasks) {
|
|
1488
|
-
return;
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
644
|
+
try {
|
|
645
|
+
this.traceCollector = createTraceCollector();
|
|
646
|
+
console.log('[QueenCoordinator] Trace collector initialized');
|
|
1491
647
|
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
let position = 0;
|
|
1495
|
-
// Count tasks ahead in higher priority queues
|
|
1496
|
-
for (const p of ['p0', 'p1', 'p2', 'p3']) {
|
|
1497
|
-
const queue = this.taskQueue.get(p);
|
|
1498
|
-
if (queue) {
|
|
1499
|
-
if (p === task.priority) {
|
|
1500
|
-
position += queue.findIndex(t => t.id === task.id);
|
|
1501
|
-
break;
|
|
1502
|
-
}
|
|
1503
|
-
position += queue.length;
|
|
1504
|
-
}
|
|
648
|
+
catch (e) {
|
|
649
|
+
console.warn('[QueenCoordinator] Trace collector initialization failed (continuing):', e);
|
|
1505
650
|
}
|
|
1506
|
-
return position;
|
|
1507
|
-
}
|
|
1508
|
-
getRunningTaskCount() {
|
|
1509
|
-
return Array.from(this.tasks.values())
|
|
1510
|
-
.filter(t => t.status === 'running' || t.status === 'assigned')
|
|
1511
|
-
.length;
|
|
1512
|
-
}
|
|
1513
|
-
getQueuedTaskCount() {
|
|
1514
|
-
return Array.from(this.tasks.values())
|
|
1515
|
-
.filter(t => t.status === 'queued')
|
|
1516
|
-
.length;
|
|
1517
|
-
}
|
|
1518
|
-
canDomainHandleTask(domain, task) {
|
|
1519
|
-
const compatibleDomains = TASK_DOMAIN_MAP[task.type] || [];
|
|
1520
|
-
return compatibleDomains.includes(domain);
|
|
1521
|
-
}
|
|
1522
|
-
startWorkStealing() {
|
|
1523
|
-
this.workStealingTimer = setInterval(async () => {
|
|
1524
|
-
await this.triggerWorkStealing();
|
|
1525
|
-
}, this.config.workStealing.checkInterval);
|
|
1526
|
-
}
|
|
1527
|
-
startMetricsCollection() {
|
|
1528
|
-
this.metricsTimer = setInterval(async () => {
|
|
1529
|
-
const metrics = this.getMetrics();
|
|
1530
|
-
await this.publishEvent('MetricsCollected', { metrics });
|
|
1531
|
-
// Store metrics in memory for historical analysis
|
|
1532
|
-
await this.memory.set(`queen:metrics:${Date.now()}`, metrics, {
|
|
1533
|
-
ttl: 86400000, // 24 hours
|
|
1534
|
-
namespace: 'queen-coordinator',
|
|
1535
|
-
});
|
|
1536
|
-
// ADR-064 Phase 4C: Feed workload metrics to dynamic scaler
|
|
1537
|
-
if (this.dynamicScaler) {
|
|
1538
|
-
try {
|
|
1539
|
-
const agents = this.agentCoordinator.listAgents();
|
|
1540
|
-
const activeAgents = agents.filter(a => a.status === 'running').length;
|
|
1541
|
-
const idleAgents = agents.filter(a => a.status === 'idle').length;
|
|
1542
|
-
const avgDuration = this.taskDurations.average();
|
|
1543
|
-
const workloadMetrics = {
|
|
1544
|
-
queueDepth: this.getQueuedTaskCount(),
|
|
1545
|
-
activeAgents,
|
|
1546
|
-
idleAgents,
|
|
1547
|
-
avgTaskDurationMs: avgDuration,
|
|
1548
|
-
errorRate: this.tasksReceived > 0
|
|
1549
|
-
? this.tasksFailed / this.tasksReceived
|
|
1550
|
-
: 0,
|
|
1551
|
-
throughput: metrics.uptime > 0
|
|
1552
|
-
? (this.tasksCompleted / (metrics.uptime / 1000)) // tasks/sec
|
|
1553
|
-
: 0,
|
|
1554
|
-
timestamp: Date.now(),
|
|
1555
|
-
};
|
|
1556
|
-
this.dynamicScaler.recordMetrics(workloadMetrics);
|
|
1557
|
-
const decision = this.dynamicScaler.evaluate();
|
|
1558
|
-
if (decision && decision.action !== 'maintain') {
|
|
1559
|
-
console.log(`[QueenCoordinator] Dynamic scaler: ${decision.action} to ${decision.targetAgents} agents — ${decision.reason}`);
|
|
1560
|
-
this.dynamicScaler.execute(decision).catch(scaleErr => {
|
|
1561
|
-
console.warn('[QueenCoordinator] Dynamic scaling execution error:', scaleErr);
|
|
1562
|
-
});
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
catch (scaleError) {
|
|
1566
|
-
console.warn('[QueenCoordinator] Dynamic scaler metrics error:', scaleError);
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
}, this.config.metricsInterval);
|
|
1570
|
-
}
|
|
1571
|
-
async loadState() {
|
|
1572
651
|
try {
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
if (execution.status === 'queued') {
|
|
1578
|
-
this.tasks.set(id, execution);
|
|
1579
|
-
this.enqueueTask(execution.task);
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
652
|
+
this.hypothesisManager = createHypothesisManager();
|
|
653
|
+
this.federationMailbox = createFederationMailbox();
|
|
654
|
+
this.dynamicScaler = createDynamicScaler();
|
|
655
|
+
console.log('[QueenCoordinator] Phase 4 modules initialized (hypotheses, federation, scaling)');
|
|
1583
656
|
}
|
|
1584
|
-
catch (
|
|
1585
|
-
|
|
1586
|
-
console.debug('[QueenCoordinator] State loading failed:', error instanceof Error ? error.message : error);
|
|
657
|
+
catch (e) {
|
|
658
|
+
console.warn('[QueenCoordinator] Phase 4 initialization failed (continuing):', e);
|
|
1587
659
|
}
|
|
1588
660
|
}
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
661
|
+
// ============================================================================
|
|
662
|
+
// Context Factories (bridge between class state and extracted modules)
|
|
663
|
+
// Uses arrow-captured `self` to correctly proxy mutable counters.
|
|
664
|
+
// ============================================================================
|
|
665
|
+
createEventHandlerContext() {
|
|
666
|
+
const self = this;
|
|
667
|
+
return {
|
|
668
|
+
config: self.config, tasks: self.tasks,
|
|
669
|
+
domainLastActivity: self.domainLastActivity,
|
|
670
|
+
auditLogger: self.auditLogger, router: self.router,
|
|
671
|
+
agentCoordinator: self.agentCoordinator,
|
|
672
|
+
get runningTaskCounter() { return self.runningTaskCounter; },
|
|
673
|
+
set runningTaskCounter(v) { self.runningTaskCounter = v; },
|
|
674
|
+
get tasksCompleted() { return self.tasksCompleted; },
|
|
675
|
+
set tasksCompleted(v) { self.tasksCompleted = v; },
|
|
676
|
+
get tasksFailed() { return self.tasksFailed; },
|
|
677
|
+
set tasksFailed(v) { self.tasksFailed = v; },
|
|
678
|
+
taskDurations: self.taskDurations,
|
|
679
|
+
get domainBreakerRegistry() { return self.domainBreakerRegistry; },
|
|
680
|
+
get traceCollector() { return self.traceCollector; },
|
|
681
|
+
taskTraceContexts: self.taskTraceContexts,
|
|
682
|
+
get taskCompletedHook() { return self.taskCompletedHook; },
|
|
683
|
+
get hypothesisManager() { return self.hypothesisManager; },
|
|
684
|
+
processQueue: () => processQueue(self.createTaskContext()),
|
|
685
|
+
enqueueTask: (task) => self.enqueueTaskInternal(task),
|
|
686
|
+
};
|
|
1593
687
|
}
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
688
|
+
createTaskContext() {
|
|
689
|
+
const self = this;
|
|
690
|
+
return {
|
|
691
|
+
config: self.config, tasks: self.tasks,
|
|
692
|
+
taskQueue: self.taskQueue, domainQueues: self.domainQueues,
|
|
693
|
+
domainLastActivity: self.domainLastActivity,
|
|
694
|
+
auditLogger: self.auditLogger, agentCoordinator: self.agentCoordinator,
|
|
695
|
+
domainPlugins: self.domainPlugins,
|
|
696
|
+
get runningTaskCounter() { return self.runningTaskCounter; },
|
|
697
|
+
set runningTaskCounter(v) { self.runningTaskCounter = v; },
|
|
698
|
+
get tasksReceived() { return self.tasksReceived; },
|
|
699
|
+
set tasksReceived(v) { self.tasksReceived = v; },
|
|
700
|
+
get tasksCompleted() { return self.tasksCompleted; },
|
|
701
|
+
set tasksCompleted(v) { self.tasksCompleted = v; },
|
|
702
|
+
get tasksFailed() { return self.tasksFailed; },
|
|
703
|
+
set tasksFailed(v) { self.tasksFailed = v; },
|
|
704
|
+
taskDurations: self.taskDurations,
|
|
705
|
+
get tinyDancerRouter() { return self.tinyDancerRouter; },
|
|
706
|
+
get domainBreakerRegistry() { return self.domainBreakerRegistry; },
|
|
707
|
+
get domainTeamManager() { return self.domainTeamManager; },
|
|
708
|
+
get tierSelector() { return self.tierSelector; },
|
|
709
|
+
get traceCollector() { return self.traceCollector; },
|
|
710
|
+
taskTraceContexts: self.taskTraceContexts,
|
|
711
|
+
requestAgentSpawn: (d, t, c) => self.requestAgentSpawn(d, t, c),
|
|
712
|
+
publishEvent: (t, p) => self.publishEvent(t, p),
|
|
713
|
+
getDomainLoad: (d) => self.getDomainLoad(d),
|
|
714
|
+
getDomainHealth: (d) => self.getDomainHealth(d),
|
|
715
|
+
};
|
|
1602
716
|
}
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
717
|
+
createWorkStealingContext() {
|
|
718
|
+
const self = this;
|
|
719
|
+
return {
|
|
720
|
+
config: self.config, domainQueues: self.domainQueues,
|
|
721
|
+
auditLogger: self.auditLogger,
|
|
722
|
+
get tasksStolen() { return self.tasksStolen; },
|
|
723
|
+
set tasksStolen(v) { self.tasksStolen = v; },
|
|
724
|
+
getIdleDomains: () => self.getIdleDomains(),
|
|
725
|
+
getBusyDomains: () => self.getBusyDomains(),
|
|
726
|
+
getDomainLoad: (d) => self.getDomainLoad(d),
|
|
727
|
+
removeFromQueues: (t) => removeFromQueues(self.taskQueue, self.domainQueues, t),
|
|
728
|
+
assignTaskToDomain: (t, d) => assignTaskToDomain(self.createTaskContext(), t, d).then(() => { }),
|
|
729
|
+
publishEvent: (t, p) => self.publishEvent(t, p),
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
createMetricsContext() {
|
|
733
|
+
const self = this;
|
|
734
|
+
return {
|
|
735
|
+
config: self.config, memory: self.memory,
|
|
736
|
+
get dynamicScaler() { return self.dynamicScaler; },
|
|
737
|
+
getMetrics: () => self.getMetrics(),
|
|
738
|
+
publishEvent: (t, p) => self.publishEvent(t, p),
|
|
739
|
+
getQueuedTaskCount: () => self.getQueuedTaskCount(),
|
|
740
|
+
getActiveAgentCount: () => self.agentCoordinator.listAgents().filter(a => a.status === 'running').length,
|
|
741
|
+
getIdleAgentCount: () => self.agentCoordinator.listAgents().filter(a => a.status === 'idle').length,
|
|
742
|
+
getAverageTaskDuration: () => self.taskDurations.average(),
|
|
743
|
+
getTasksReceived: () => self.tasksReceived,
|
|
744
|
+
getTasksFailed: () => self.tasksFailed,
|
|
745
|
+
getTasksCompleted: () => self.tasksCompleted,
|
|
746
|
+
};
|
|
1633
747
|
}
|
|
1634
748
|
}
|
|
1635
749
|
// ============================================================================
|
|
@@ -1637,13 +751,6 @@ export class QueenCoordinator {
|
|
|
1637
751
|
// ============================================================================
|
|
1638
752
|
/**
|
|
1639
753
|
* Create a Queen Coordinator from a QE Kernel
|
|
1640
|
-
*
|
|
1641
|
-
* @param kernel - The QE Kernel instance
|
|
1642
|
-
* @param router - Cross-domain event router
|
|
1643
|
-
* @param protocolExecutor - Optional protocol executor for cross-domain protocols
|
|
1644
|
-
* @param workflowExecutor - Optional workflow executor
|
|
1645
|
-
* @param domainPlugins - Map of domain plugins for direct task execution (Integration Fix)
|
|
1646
|
-
* @param config - Optional configuration overrides
|
|
1647
754
|
*/
|
|
1648
755
|
export function createQueenCoordinator(kernel, router, protocolExecutor, workflowExecutor, domainPlugins, config) {
|
|
1649
756
|
return new QueenCoordinator(kernel.eventBus, kernel.coordinator, kernel.memory, router, protocolExecutor, workflowExecutor, domainPlugins, config);
|