agentic-qe 3.3.1 → 3.3.3
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/helpers/statusline-v3.cjs +96 -27
- package/README.md +6 -3
- package/package.json +1 -1
- package/scripts/sync-claude-flow.cjs +99 -0
- package/v3/CHANGELOG.md +133 -0
- package/v3/README.md +9 -5
- package/v3/dist/cli/bundle.js +60879 -51811
- package/v3/dist/coordination/consensus/domain-findings.d.ts +202 -0
- package/v3/dist/coordination/consensus/domain-findings.d.ts.map +1 -0
- package/v3/dist/coordination/consensus/domain-findings.js +66 -0
- package/v3/dist/coordination/consensus/domain-findings.js.map +1 -0
- package/v3/dist/coordination/consensus/index.d.ts +2 -0
- package/v3/dist/coordination/consensus/index.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/index.js +4 -0
- package/v3/dist/coordination/consensus/index.js.map +1 -1
- package/v3/dist/coordination/index.d.ts +1 -0
- package/v3/dist/coordination/index.d.ts.map +1 -1
- package/v3/dist/coordination/index.js +4 -0
- package/v3/dist/coordination/index.js.map +1 -1
- package/v3/dist/coordination/mixins/consensus-enabled-domain.d.ts +225 -0
- package/v3/dist/coordination/mixins/consensus-enabled-domain.d.ts.map +1 -0
- package/v3/dist/coordination/mixins/consensus-enabled-domain.js +466 -0
- package/v3/dist/coordination/mixins/consensus-enabled-domain.js.map +1 -0
- package/v3/dist/coordination/mixins/index.d.ts +14 -0
- package/v3/dist/coordination/mixins/index.d.ts.map +1 -0
- package/v3/dist/coordination/mixins/index.js +28 -0
- package/v3/dist/coordination/mixins/index.js.map +1 -0
- package/v3/dist/coordination/mixins/mincut-aware-domain.d.ts +227 -0
- package/v3/dist/coordination/mixins/mincut-aware-domain.d.ts.map +1 -0
- package/v3/dist/coordination/mixins/mincut-aware-domain.js +368 -0
- package/v3/dist/coordination/mixins/mincut-aware-domain.js.map +1 -0
- package/v3/dist/coordination/queen-coordinator.d.ts +23 -1
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +131 -3
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/coordination/task-executor.d.ts +21 -1
- package/v3/dist/coordination/task-executor.d.ts.map +1 -1
- package/v3/dist/coordination/task-executor.js +222 -5
- package/v3/dist/coordination/task-executor.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/coordinator.d.ts +92 -0
- package/v3/dist/domains/chaos-resilience/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/coordinator.js +241 -1
- package/v3/dist/domains/chaos-resilience/coordinator.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.d.ts +29 -2
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.js +62 -3
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.js.map +1 -1
- package/v3/dist/domains/code-intelligence/coordinator.d.ts +112 -0
- package/v3/dist/domains/code-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/coordinator.js +221 -0
- package/v3/dist/domains/code-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.d.ts +66 -2
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.js +253 -3
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.js.map +1 -1
- package/v3/dist/domains/contract-testing/coordinator.d.ts +89 -1
- package/v3/dist/domains/contract-testing/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/coordinator.js +222 -1
- package/v3/dist/domains/contract-testing/coordinator.js.map +1 -1
- package/v3/dist/domains/contract-testing/interfaces.d.ts +29 -1
- package/v3/dist/domains/contract-testing/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.js +1 -1
- package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.d.ts +29 -2
- package/v3/dist/domains/contract-testing/services/contract-validator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.js +58 -3
- package/v3/dist/domains/contract-testing/services/contract-validator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/coordinator.d.ts +95 -2
- package/v3/dist/domains/coverage-analysis/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/coordinator.js +274 -6
- package/v3/dist/domains/coverage-analysis/coordinator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/plugin.d.ts +6 -1
- package/v3/dist/domains/coverage-analysis/plugin.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/plugin.js +73 -0
- package/v3/dist/domains/coverage-analysis/plugin.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.d.ts +119 -3
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.js +267 -5
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/gap-detector.d.ts +111 -2
- package/v3/dist/domains/coverage-analysis/services/gap-detector.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/gap-detector.js +231 -3
- package/v3/dist/domains/coverage-analysis/services/gap-detector.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts +80 -1
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.js +262 -7
- package/v3/dist/domains/defect-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/interfaces.d.ts +17 -0
- package/v3/dist/domains/defect-intelligence/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts +91 -2
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js +274 -7
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.d.ts +79 -2
- 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 +259 -3
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.js.map +1 -1
- package/v3/dist/domains/domain-interface.d.ts +194 -2
- package/v3/dist/domains/domain-interface.d.ts.map +1 -1
- package/v3/dist/domains/domain-interface.js +239 -0
- package/v3/dist/domains/domain-interface.js.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.d.ts +171 -0
- package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.js +401 -1
- package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/index.d.ts +1 -1
- package/v3/dist/domains/learning-optimization/index.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/index.js.map +1 -1
- package/v3/dist/domains/learning-optimization/interfaces.d.ts +18 -0
- package/v3/dist/domains/learning-optimization/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.d.ts +54 -2
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.js +90 -3
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.js.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.d.ts +127 -0
- package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.js +493 -7
- package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
- package/v3/dist/domains/quality-assessment/interfaces.d.ts +22 -0
- package/v3/dist/domains/quality-assessment/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.d.ts +6 -1
- package/v3/dist/domains/quality-assessment/plugin.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.js +67 -0
- package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.d.ts +61 -2
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.js +213 -5
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.d.ts +59 -4
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.js +195 -3
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.js.map +1 -1
- package/v3/dist/domains/requirements-validation/coordinator.d.ts +78 -0
- package/v3/dist/domains/requirements-validation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/coordinator.js +189 -0
- package/v3/dist/domains/requirements-validation/coordinator.js.map +1 -1
- package/v3/dist/domains/requirements-validation/interfaces.d.ts +4 -0
- package/v3/dist/domains/requirements-validation/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/requirements-validator.d.ts +106 -2
- package/v3/dist/domains/requirements-validation/services/requirements-validator.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/requirements-validator.js +263 -3
- package/v3/dist/domains/requirements-validation/services/requirements-validator.js.map +1 -1
- package/v3/dist/domains/security-compliance/coordinator.d.ts +56 -1
- package/v3/dist/domains/security-compliance/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/coordinator.js +241 -17
- package/v3/dist/domains/security-compliance/coordinator.js.map +1 -1
- package/v3/dist/domains/security-compliance/interfaces.d.ts +2 -0
- package/v3/dist/domains/security-compliance/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-scanner.d.ts +33 -2
- package/v3/dist/domains/security-compliance/services/security-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-scanner.js +107 -3
- package/v3/dist/domains/security-compliance/services/security-scanner.js.map +1 -1
- package/v3/dist/domains/test-execution/coordinator.d.ts +89 -0
- package/v3/dist/domains/test-execution/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/coordinator.js +259 -2
- package/v3/dist/domains/test-execution/coordinator.js.map +1 -1
- package/v3/dist/domains/test-execution/plugin.d.ts +6 -1
- package/v3/dist/domains/test-execution/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/plugin.js +77 -0
- package/v3/dist/domains/test-execution/plugin.js.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.d.ts +30 -2
- package/v3/dist/domains/test-execution/services/test-executor.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.js +64 -3
- package/v3/dist/domains/test-execution/services/test-executor.js.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts +137 -0
- package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.js +421 -1
- package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/interfaces.d.ts +2 -0
- package/v3/dist/domains/test-generation/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/plugin.d.ts +6 -1
- package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/plugin.js +84 -0
- package/v3/dist/domains/test-generation/plugin.js.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.d.ts +32 -0
- package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.js +158 -3
- package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts +77 -0
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.js +210 -2
- 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 +3 -3
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-tester.d.ts +47 -2
- package/v3/dist/domains/visual-accessibility/services/visual-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-tester.js +87 -3
- package/v3/dist/domains/visual-accessibility/services/visual-tester.js.map +1 -1
- package/v3/dist/kernel/interfaces.d.ts +54 -1
- package/v3/dist/kernel/interfaces.d.ts.map +1 -1
- package/v3/dist/learning/dream/dream-scheduler.d.ts +302 -0
- package/v3/dist/learning/dream/dream-scheduler.d.ts.map +1 -0
- package/v3/dist/learning/dream/dream-scheduler.js +551 -0
- package/v3/dist/learning/dream/dream-scheduler.js.map +1 -0
- package/v3/dist/learning/dream/index.d.ts +1 -0
- package/v3/dist/learning/dream/index.d.ts.map +1 -1
- package/v3/dist/learning/dream/index.js +4 -0
- package/v3/dist/learning/dream/index.js.map +1 -1
- package/v3/dist/learning/experience-capture-middleware.d.ts +119 -0
- package/v3/dist/learning/experience-capture-middleware.d.ts.map +1 -0
- package/v3/dist/learning/experience-capture-middleware.js +416 -0
- package/v3/dist/learning/experience-capture-middleware.js.map +1 -0
- package/v3/dist/mcp/bundle.js +83142 -70580
- package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.js +16 -2
- package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/domain-handlers.d.ts +12 -13
- package/v3/dist/mcp/handlers/domain-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/index.d.ts +1 -1
- package/v3/dist/mcp/handlers/index.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/index.js +2 -2
- package/v3/dist/mcp/handlers/index.js.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.d.ts +1 -0
- package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.js +46 -12
- package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/wrapped-domain-handlers.d.ts +30 -0
- package/v3/dist/mcp/handlers/wrapped-domain-handlers.d.ts.map +1 -0
- package/v3/dist/mcp/handlers/wrapped-domain-handlers.js +75 -0
- package/v3/dist/mcp/handlers/wrapped-domain-handlers.js.map +1 -0
- package/v3/dist/mcp/services/reasoning-bank-service.d.ts +87 -13
- package/v3/dist/mcp/services/reasoning-bank-service.d.ts.map +1 -1
- package/v3/dist/mcp/services/reasoning-bank-service.js +291 -31
- package/v3/dist/mcp/services/reasoning-bank-service.js.map +1 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.js +1 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.js.map +1 -1
- package/v3/dist/mcp/tools/contract-testing/validate.js +1 -1
- package/v3/dist/mcp/tools/contract-testing/validate.js.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.js +1 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.js.map +1 -1
- package/v3/dist/mcp/tools/visual-accessibility/index.js +2 -2
- package/v3/dist/mcp/tools/visual-accessibility/index.js.map +1 -1
- package/v3/dist/routing/qe-agent-registry.d.ts +28 -1
- package/v3/dist/routing/qe-agent-registry.d.ts.map +1 -1
- package/v3/dist/routing/qe-agent-registry.js +116 -1
- package/v3/dist/routing/qe-agent-registry.js.map +1 -1
- package/v3/dist/shared/events/domain-events.d.ts +27 -0
- package/v3/dist/shared/events/domain-events.d.ts.map +1 -1
- package/v3/dist/shared/events/domain-events.js +1 -0
- package/v3/dist/shared/events/domain-events.js.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.d.ts +63 -0
- package/v3/dist/sync/claude-flow-bridge.d.ts.map +1 -0
- package/v3/dist/sync/claude-flow-bridge.js +320 -0
- package/v3/dist/sync/claude-flow-bridge.js.map +1 -0
- package/v3/package.json +1 -1
|
@@ -8,12 +8,36 @@ import { TimeRange } from '../../shared/value-objects/index.js';
|
|
|
8
8
|
import { LearningOptimizationEvents, createEvent, } from '../../shared/events/domain-events.js';
|
|
9
9
|
import { LearningCoordinatorService, TransferSpecialistService, MetricsOptimizerService, ProductionIntelService, } from './services/index.js';
|
|
10
10
|
import { createPersistentSONAEngine, } from '../../integrations/ruvector/sona-persistence.js';
|
|
11
|
+
import { createDreamScheduler, createDreamEngine, } from '../../learning/dream/index.js';
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// MinCut & Consensus Mixin Imports (ADR-047, MM-001)
|
|
14
|
+
// ============================================================================
|
|
15
|
+
import { createMinCutAwareMixin, } from '../../coordination/mixins/mincut-aware-domain.js';
|
|
16
|
+
import { createConsensusEnabledMixin, } from '../../coordination/mixins/consensus-enabled-domain.js';
|
|
17
|
+
import { createDomainFinding, } from '../../coordination/consensus/domain-findings.js';
|
|
11
18
|
const DEFAULT_CONFIG = {
|
|
12
19
|
maxConcurrentWorkflows: 3,
|
|
13
20
|
defaultTimeout: 120000, // 2 minutes
|
|
14
21
|
enableAutoOptimization: true,
|
|
15
22
|
publishEvents: true,
|
|
16
23
|
learningCycleIntervalMs: 3600000, // 1 hour
|
|
24
|
+
// Dream Scheduler defaults
|
|
25
|
+
enableDreamScheduler: true,
|
|
26
|
+
dreamCycleIntervalMs: 3600000, // 1 hour
|
|
27
|
+
enableExperienceTrigger: true,
|
|
28
|
+
experienceThreshold: 50,
|
|
29
|
+
enableQualityGateFailureTrigger: true,
|
|
30
|
+
autoApplyHighConfidenceInsights: false,
|
|
31
|
+
autoApplyConfidenceThreshold: 0.8,
|
|
32
|
+
// MinCut integration defaults (ADR-047)
|
|
33
|
+
enableMinCutAwareness: true,
|
|
34
|
+
topologyHealthThreshold: 0.5,
|
|
35
|
+
pauseOnCriticalTopology: false,
|
|
36
|
+
// Consensus integration defaults (MM-001)
|
|
37
|
+
enableConsensus: true,
|
|
38
|
+
consensusThreshold: 0.7,
|
|
39
|
+
consensusStrategy: 'weighted',
|
|
40
|
+
consensusMinModels: 2,
|
|
17
41
|
};
|
|
18
42
|
/**
|
|
19
43
|
* Learning & Optimization Coordinator
|
|
@@ -36,12 +60,40 @@ export class LearningOptimizationCoordinator {
|
|
|
36
60
|
* Now uses PersistentSONAEngine to survive restarts
|
|
37
61
|
*/
|
|
38
62
|
sona;
|
|
63
|
+
/**
|
|
64
|
+
* DreamScheduler for offline pattern consolidation and insight generation
|
|
65
|
+
* Wraps DreamEngine with automatic scheduling and trigger support
|
|
66
|
+
*/
|
|
67
|
+
dreamScheduler = null;
|
|
68
|
+
// MinCut topology awareness mixin (ADR-047)
|
|
69
|
+
minCutMixin;
|
|
70
|
+
// Consensus verification mixin (MM-001)
|
|
71
|
+
consensusMixin;
|
|
72
|
+
// Domain identifier for mixin initialization
|
|
73
|
+
domainName = 'learning-optimization';
|
|
39
74
|
constructor(eventBus, memory, agentCoordinator, config = {}) {
|
|
40
75
|
this.eventBus = eventBus;
|
|
41
76
|
this.memory = memory;
|
|
42
77
|
this.agentCoordinator = agentCoordinator;
|
|
43
78
|
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
44
|
-
|
|
79
|
+
// Initialize MinCut-aware mixin (ADR-047)
|
|
80
|
+
this.minCutMixin = createMinCutAwareMixin(this.domainName, {
|
|
81
|
+
enableMinCutAwareness: this.config.enableMinCutAwareness,
|
|
82
|
+
topologyHealthThreshold: this.config.topologyHealthThreshold,
|
|
83
|
+
pauseOnCriticalTopology: this.config.pauseOnCriticalTopology,
|
|
84
|
+
});
|
|
85
|
+
// Initialize Consensus-enabled mixin (MM-001)
|
|
86
|
+
this.consensusMixin = createConsensusEnabledMixin({
|
|
87
|
+
enableConsensus: this.config.enableConsensus,
|
|
88
|
+
consensusThreshold: this.config.consensusThreshold,
|
|
89
|
+
verifyFindingTypes: ['pattern-recommendation', 'optimization-suggestion', 'cross-domain-insight'],
|
|
90
|
+
strategy: this.config.consensusStrategy,
|
|
91
|
+
minModels: this.config.consensusMinModels,
|
|
92
|
+
modelTimeout: 60000,
|
|
93
|
+
verifySeverities: ['critical', 'high'],
|
|
94
|
+
enableLogging: false,
|
|
95
|
+
});
|
|
96
|
+
this.learningService = new LearningCoordinatorService({ memory });
|
|
45
97
|
this.transferService = new TransferSpecialistService(memory);
|
|
46
98
|
this.optimizerService = new MetricsOptimizerService(memory);
|
|
47
99
|
this.productionIntel = new ProductionIntelService(memory);
|
|
@@ -68,20 +120,77 @@ export class LearningOptimizationCoordinator {
|
|
|
68
120
|
console.error('[LearningOptimizationCoordinator] Failed to initialize PersistentSONAEngine:', error);
|
|
69
121
|
throw error; // Learning optimization requires SONA
|
|
70
122
|
}
|
|
123
|
+
// Initialize DreamScheduler if enabled
|
|
124
|
+
if (this.config.enableDreamScheduler) {
|
|
125
|
+
try {
|
|
126
|
+
const dreamEngine = await createDreamEngine();
|
|
127
|
+
await dreamEngine.initialize();
|
|
128
|
+
this.dreamScheduler = createDreamScheduler({
|
|
129
|
+
dreamEngine,
|
|
130
|
+
eventBus: this.eventBus,
|
|
131
|
+
memoryBackend: this.memory,
|
|
132
|
+
}, {
|
|
133
|
+
autoScheduleIntervalMs: this.config.dreamCycleIntervalMs,
|
|
134
|
+
enableExperienceTrigger: this.config.enableExperienceTrigger,
|
|
135
|
+
experienceThreshold: this.config.experienceThreshold,
|
|
136
|
+
enableQualityGateFailureTrigger: this.config.enableQualityGateFailureTrigger,
|
|
137
|
+
autoApplyHighConfidenceInsights: this.config.autoApplyHighConfidenceInsights,
|
|
138
|
+
insightConfidenceThreshold: this.config.autoApplyConfidenceThreshold,
|
|
139
|
+
});
|
|
140
|
+
await this.dreamScheduler.initialize();
|
|
141
|
+
this.dreamScheduler.start();
|
|
142
|
+
console.log('[LearningOptimizationCoordinator] DreamScheduler initialized and started');
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
console.warn('[LearningOptimizationCoordinator] Failed to initialize DreamScheduler:', error);
|
|
146
|
+
// DreamScheduler is optional - continue without it
|
|
147
|
+
}
|
|
148
|
+
}
|
|
71
149
|
// Subscribe to relevant events
|
|
72
150
|
this.subscribeToEvents();
|
|
73
151
|
// Load any persisted workflow state
|
|
74
152
|
await this.loadWorkflowState();
|
|
153
|
+
// Initialize Consensus engine if enabled (MM-001)
|
|
154
|
+
if (this.config.enableConsensus) {
|
|
155
|
+
try {
|
|
156
|
+
await this.consensusMixin.initializeConsensus();
|
|
157
|
+
console.log(`[${this.domainName}] Consensus engine initialized`);
|
|
158
|
+
}
|
|
159
|
+
catch (error) {
|
|
160
|
+
console.error(`[${this.domainName}] Failed to initialize consensus engine:`, error);
|
|
161
|
+
console.warn(`[${this.domainName}] Continuing without consensus verification`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
75
164
|
this.initialized = true;
|
|
76
165
|
}
|
|
77
166
|
/**
|
|
78
167
|
* Dispose and cleanup
|
|
79
168
|
*/
|
|
80
169
|
async dispose() {
|
|
170
|
+
// Dispose Consensus engine (MM-001)
|
|
171
|
+
try {
|
|
172
|
+
await this.consensusMixin.disposeConsensus();
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
console.error(`[${this.domainName}] Error disposing consensus engine:`, error);
|
|
176
|
+
}
|
|
177
|
+
// Dispose MinCut mixin (ADR-047)
|
|
178
|
+
this.minCutMixin.dispose();
|
|
81
179
|
// Save workflow state
|
|
82
180
|
await this.saveWorkflowState();
|
|
83
181
|
// Clear active workflows
|
|
84
182
|
this.workflows.clear();
|
|
183
|
+
// Dispose DreamScheduler
|
|
184
|
+
if (this.dreamScheduler) {
|
|
185
|
+
try {
|
|
186
|
+
await this.dreamScheduler.dispose();
|
|
187
|
+
console.log('[LearningOptimizationCoordinator] DreamScheduler disposed');
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
console.error('[LearningOptimizationCoordinator] Error disposing DreamScheduler:', error);
|
|
191
|
+
}
|
|
192
|
+
this.dreamScheduler = null;
|
|
193
|
+
}
|
|
85
194
|
// V3: Clean up SONA engine (persistent patterns)
|
|
86
195
|
if (this.initialized && this.sona) {
|
|
87
196
|
try {
|
|
@@ -109,6 +218,15 @@ export class LearningOptimizationCoordinator {
|
|
|
109
218
|
const workflowId = uuidv4();
|
|
110
219
|
try {
|
|
111
220
|
this.startWorkflow(workflowId, 'learning-cycle');
|
|
221
|
+
// ADR-047: Check topology health before expensive operations
|
|
222
|
+
if (this.config.enableMinCutAwareness && !this.isTopologyHealthy()) {
|
|
223
|
+
console.warn(`[${this.domainName}] Topology degraded, using conservative strategy for learning cycle`);
|
|
224
|
+
// Continue with reduced scope when topology is unhealthy
|
|
225
|
+
}
|
|
226
|
+
// ADR-047: Check if operations should be paused due to critical topology
|
|
227
|
+
if (this.minCutMixin.shouldPauseOperations()) {
|
|
228
|
+
return err(new Error('Learning cycle paused: topology is in critical state'));
|
|
229
|
+
}
|
|
112
230
|
// Spawn learning agent
|
|
113
231
|
const agentResult = await this.spawnLearningAgent(workflowId, domain);
|
|
114
232
|
if (!agentResult.success) {
|
|
@@ -191,6 +309,14 @@ export class LearningOptimizationCoordinator {
|
|
|
191
309
|
const workflowId = uuidv4();
|
|
192
310
|
try {
|
|
193
311
|
this.startWorkflow(workflowId, 'optimization');
|
|
312
|
+
// ADR-047: Check topology health before expensive operations
|
|
313
|
+
if (this.config.enableMinCutAwareness && !this.isTopologyHealthy()) {
|
|
314
|
+
console.warn(`[${this.domainName}] Topology degraded, using conservative optimization strategy`);
|
|
315
|
+
}
|
|
316
|
+
// ADR-047: Check if operations should be paused due to critical topology
|
|
317
|
+
if (this.minCutMixin.shouldPauseOperations()) {
|
|
318
|
+
return err(new Error('Optimization paused: topology is in critical state'));
|
|
319
|
+
}
|
|
194
320
|
const byDomain = {};
|
|
195
321
|
let totalStrategies = 0;
|
|
196
322
|
let totalImprovement = 0;
|
|
@@ -250,6 +376,14 @@ export class LearningOptimizationCoordinator {
|
|
|
250
376
|
const workflowId = uuidv4();
|
|
251
377
|
try {
|
|
252
378
|
this.startWorkflow(workflowId, 'transfer');
|
|
379
|
+
// ADR-047: Check topology health before cross-domain operations
|
|
380
|
+
if (this.config.enableMinCutAwareness && !this.isTopologyHealthy()) {
|
|
381
|
+
console.warn(`[${this.domainName}] Topology degraded, limiting cross-domain transfer scope`);
|
|
382
|
+
}
|
|
383
|
+
// ADR-047: Check if operations should be paused due to critical topology
|
|
384
|
+
if (this.minCutMixin.shouldPauseOperations()) {
|
|
385
|
+
return err(new Error('Cross-domain sharing paused: topology is in critical state'));
|
|
386
|
+
}
|
|
253
387
|
let knowledgeShared = 0;
|
|
254
388
|
const domainsUpdated = [];
|
|
255
389
|
let newPatternsCreated = 0;
|
|
@@ -528,6 +662,85 @@ export class LearningOptimizationCoordinator {
|
|
|
528
662
|
this.ensureInitialized();
|
|
529
663
|
return this.sona.verifyPerformance(iterations);
|
|
530
664
|
}
|
|
665
|
+
// ============================================================================
|
|
666
|
+
// Dream Scheduler Methods
|
|
667
|
+
// ============================================================================
|
|
668
|
+
/**
|
|
669
|
+
* Trigger a dream cycle manually.
|
|
670
|
+
* Dreams consolidate patterns and generate novel insights through spreading activation.
|
|
671
|
+
*
|
|
672
|
+
* @param durationMs - Optional duration override in ms
|
|
673
|
+
* @returns Dream cycle result with generated insights
|
|
674
|
+
* @throws Error if DreamScheduler is not initialized
|
|
675
|
+
*/
|
|
676
|
+
async triggerDreamCycle(durationMs) {
|
|
677
|
+
if (!this.dreamScheduler) {
|
|
678
|
+
throw new Error('[LearningOptimizationCoordinator] DreamScheduler not initialized');
|
|
679
|
+
}
|
|
680
|
+
const result = await this.dreamScheduler.triggerDream(durationMs);
|
|
681
|
+
// Publish event for other domains to consume
|
|
682
|
+
if (this.config.publishEvents) {
|
|
683
|
+
await this.publishDreamCycleCompleted(result.cycle.id, result.cycle.durationMs ?? 0, result.cycle.conceptsProcessed, result.insights.map((i) => ({
|
|
684
|
+
id: i.id,
|
|
685
|
+
type: i.type,
|
|
686
|
+
description: i.description,
|
|
687
|
+
noveltyScore: i.noveltyScore,
|
|
688
|
+
confidenceScore: i.confidenceScore,
|
|
689
|
+
actionable: i.actionable,
|
|
690
|
+
suggestedAction: i.suggestedAction,
|
|
691
|
+
sourceConcepts: i.sourceConcepts,
|
|
692
|
+
})), result.patternsCreated);
|
|
693
|
+
}
|
|
694
|
+
return result;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Get the current status of the DreamScheduler.
|
|
698
|
+
*
|
|
699
|
+
* @returns DreamScheduler status or null if not initialized
|
|
700
|
+
*/
|
|
701
|
+
getDreamStatus() {
|
|
702
|
+
return this.dreamScheduler?.getStatus() ?? null;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Check if the DreamScheduler is available and running.
|
|
706
|
+
*
|
|
707
|
+
* @returns True if DreamScheduler is initialized
|
|
708
|
+
*/
|
|
709
|
+
isDreamSchedulerAvailable() {
|
|
710
|
+
return this.dreamScheduler !== null;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Get the last dream cycle result from the scheduler.
|
|
714
|
+
*
|
|
715
|
+
* @returns Last dream result or null if no dreams have completed
|
|
716
|
+
*/
|
|
717
|
+
getLastDreamResult() {
|
|
718
|
+
return this.dreamScheduler?.getLastDreamResult() ?? null;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Trigger a quick dream cycle for rapid insight generation.
|
|
722
|
+
*
|
|
723
|
+
* @returns Dream cycle result
|
|
724
|
+
* @throws Error if DreamScheduler is not initialized
|
|
725
|
+
*/
|
|
726
|
+
async triggerQuickDream() {
|
|
727
|
+
if (!this.dreamScheduler) {
|
|
728
|
+
throw new Error('[LearningOptimizationCoordinator] DreamScheduler not initialized');
|
|
729
|
+
}
|
|
730
|
+
return this.dreamScheduler.triggerQuickDream();
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Trigger a full dream cycle for comprehensive pattern consolidation.
|
|
734
|
+
*
|
|
735
|
+
* @returns Dream cycle result
|
|
736
|
+
* @throws Error if DreamScheduler is not initialized
|
|
737
|
+
*/
|
|
738
|
+
async triggerFullDream() {
|
|
739
|
+
if (!this.dreamScheduler) {
|
|
740
|
+
throw new Error('[LearningOptimizationCoordinator] DreamScheduler not initialized');
|
|
741
|
+
}
|
|
742
|
+
return this.dreamScheduler.triggerFullDream();
|
|
743
|
+
}
|
|
531
744
|
/**
|
|
532
745
|
* Export learned models
|
|
533
746
|
*/
|
|
@@ -879,6 +1092,23 @@ export class LearningOptimizationCoordinator {
|
|
|
879
1092
|
}
|
|
880
1093
|
console.log(`[LearningOptimizationCoordinator] Experience ${experience.id} transferred to ${relatedDomains.length} related domains`);
|
|
881
1094
|
}
|
|
1095
|
+
// Record experience for dream scheduler to trigger insight generation
|
|
1096
|
+
if (this.dreamScheduler) {
|
|
1097
|
+
this.dreamScheduler.recordExperience({
|
|
1098
|
+
id: experience.id,
|
|
1099
|
+
agentType: experience.agent || 'unknown',
|
|
1100
|
+
domain: domain,
|
|
1101
|
+
taskType: experience.task,
|
|
1102
|
+
success: experience.success,
|
|
1103
|
+
duration: experience.durationMs,
|
|
1104
|
+
context: {
|
|
1105
|
+
quality: experience.quality,
|
|
1106
|
+
steps: experience.steps.length,
|
|
1107
|
+
patterns: experience.patterns?.length || 0,
|
|
1108
|
+
},
|
|
1109
|
+
timestamp: new Date(experience.startedAt),
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
882
1112
|
}
|
|
883
1113
|
// ============================================================================
|
|
884
1114
|
// Event Publishing
|
|
@@ -909,6 +1139,33 @@ export class LearningOptimizationCoordinator {
|
|
|
909
1139
|
});
|
|
910
1140
|
await this.eventBus.publish(event);
|
|
911
1141
|
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Publish a dream cycle completion event.
|
|
1144
|
+
* This broadcasts dream insights to all interested domain coordinators.
|
|
1145
|
+
*
|
|
1146
|
+
* Called by the DreamScheduler or DreamEngine after completing a dream cycle.
|
|
1147
|
+
*
|
|
1148
|
+
* @param cycleId - Unique identifier for the dream cycle
|
|
1149
|
+
* @param durationMs - How long the dream cycle took
|
|
1150
|
+
* @param conceptsProcessed - Number of concepts processed during dreaming
|
|
1151
|
+
* @param insights - Array of insights generated during the dream cycle
|
|
1152
|
+
* @param patternsCreated - Number of patterns created from insights
|
|
1153
|
+
*/
|
|
1154
|
+
async publishDreamCycleCompleted(cycleId, durationMs, conceptsProcessed, insights, patternsCreated) {
|
|
1155
|
+
if (!this.config.publishEvents) {
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
const payload = {
|
|
1159
|
+
cycleId,
|
|
1160
|
+
durationMs,
|
|
1161
|
+
conceptsProcessed,
|
|
1162
|
+
insights,
|
|
1163
|
+
patternsCreated,
|
|
1164
|
+
};
|
|
1165
|
+
const event = createEvent(LearningOptimizationEvents.DreamCycleCompleted, 'learning-optimization', payload);
|
|
1166
|
+
await this.eventBus.publish(event);
|
|
1167
|
+
console.log(`[LearningOptimizationCoordinator] Published dream cycle completion: ${insights.length} insights for ${conceptsProcessed} concepts`);
|
|
1168
|
+
}
|
|
912
1169
|
// ============================================================================
|
|
913
1170
|
// Agent Management
|
|
914
1171
|
// ============================================================================
|
|
@@ -1106,5 +1363,148 @@ export class LearningOptimizationCoordinator {
|
|
|
1106
1363
|
}
|
|
1107
1364
|
return Math.abs(hash).toString(16);
|
|
1108
1365
|
}
|
|
1366
|
+
// ============================================================================
|
|
1367
|
+
// MinCut Integration Methods (ADR-047)
|
|
1368
|
+
// ============================================================================
|
|
1369
|
+
/**
|
|
1370
|
+
* Set the MinCut bridge for topology awareness
|
|
1371
|
+
*/
|
|
1372
|
+
setMinCutBridge(bridge) {
|
|
1373
|
+
this.minCutMixin.setMinCutBridge(bridge);
|
|
1374
|
+
console.log(`[${this.domainName}] MinCut bridge connected for topology awareness`);
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Check if topology is healthy
|
|
1378
|
+
*/
|
|
1379
|
+
isTopologyHealthy() {
|
|
1380
|
+
return this.minCutMixin.isTopologyHealthy();
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Get topology-based routing excluding weak domains
|
|
1384
|
+
* Per ADR-047: Filters out domains that are currently weak points
|
|
1385
|
+
*
|
|
1386
|
+
* @param targetDomains - List of potential target domains
|
|
1387
|
+
* @returns Filtered list of healthy domains for routing
|
|
1388
|
+
*/
|
|
1389
|
+
getTopologyBasedRouting(targetDomains) {
|
|
1390
|
+
return this.minCutMixin.getTopologyBasedRouting(targetDomains);
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Get weak vertices belonging to this domain
|
|
1394
|
+
* Per ADR-047: Identifies agents that are single points of failure
|
|
1395
|
+
*/
|
|
1396
|
+
getDomainWeakVertices() {
|
|
1397
|
+
return this.minCutMixin.getDomainWeakVertices();
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Check if this domain is a weak point in the topology
|
|
1401
|
+
* Per ADR-047: Returns true if any weak vertex belongs to learning-optimization domain
|
|
1402
|
+
*/
|
|
1403
|
+
isDomainWeakPoint() {
|
|
1404
|
+
return this.minCutMixin.isDomainWeakPoint();
|
|
1405
|
+
}
|
|
1406
|
+
// ============================================================================
|
|
1407
|
+
// Consensus Integration Methods (MM-001)
|
|
1408
|
+
// ============================================================================
|
|
1409
|
+
/**
|
|
1410
|
+
* Check if consensus engine is available
|
|
1411
|
+
*/
|
|
1412
|
+
isConsensusAvailable() {
|
|
1413
|
+
return this.consensusMixin.isConsensusAvailable?.() ?? false;
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Get consensus statistics
|
|
1417
|
+
* Per MM-001: Returns metrics about consensus verification
|
|
1418
|
+
*/
|
|
1419
|
+
getConsensusStats() {
|
|
1420
|
+
return this.consensusMixin.getConsensusStats();
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Verify a pattern recommendation using multi-model consensus
|
|
1424
|
+
* Per MM-001: High-stakes pattern recommendations require verification
|
|
1425
|
+
*
|
|
1426
|
+
* @param pattern - The pattern being recommended
|
|
1427
|
+
* @param confidence - Initial confidence in the recommendation
|
|
1428
|
+
* @returns true if the recommendation is verified or doesn't require consensus
|
|
1429
|
+
*/
|
|
1430
|
+
async verifyPatternRecommendation(pattern, confidence) {
|
|
1431
|
+
const finding = createDomainFinding({
|
|
1432
|
+
id: uuidv4(),
|
|
1433
|
+
type: 'pattern-recommendation',
|
|
1434
|
+
confidence,
|
|
1435
|
+
description: `Verify pattern recommendation: ${pattern.name} (${pattern.type}) for domain ${pattern.domain}`,
|
|
1436
|
+
payload: pattern,
|
|
1437
|
+
detectedBy: 'learning-optimization-coordinator',
|
|
1438
|
+
severity: confidence > 0.9 ? 'high' : 'medium',
|
|
1439
|
+
});
|
|
1440
|
+
if (this.consensusMixin.requiresConsensus(finding)) {
|
|
1441
|
+
const result = await this.consensusMixin.verifyFinding(finding);
|
|
1442
|
+
if (result.success && result.value.verdict === 'verified') {
|
|
1443
|
+
console.log(`[${this.domainName}] Pattern recommendation '${pattern.name}' verified by consensus`);
|
|
1444
|
+
return true;
|
|
1445
|
+
}
|
|
1446
|
+
console.warn(`[${this.domainName}] Pattern recommendation '${pattern.name}' NOT verified: ${result.success ? result.value.verdict : result.error.message}`);
|
|
1447
|
+
return false;
|
|
1448
|
+
}
|
|
1449
|
+
return true; // No consensus needed
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Verify an optimization suggestion using multi-model consensus
|
|
1453
|
+
* Per MM-001: Optimization suggestions can have significant impact
|
|
1454
|
+
*
|
|
1455
|
+
* @param suggestion - The optimization suggestion to verify
|
|
1456
|
+
* @param confidence - Initial confidence in the suggestion
|
|
1457
|
+
* @returns true if the suggestion is verified or doesn't require consensus
|
|
1458
|
+
*/
|
|
1459
|
+
async verifyOptimizationSuggestion(suggestion, confidence) {
|
|
1460
|
+
const finding = createDomainFinding({
|
|
1461
|
+
id: uuidv4(),
|
|
1462
|
+
type: 'optimization-suggestion',
|
|
1463
|
+
confidence,
|
|
1464
|
+
description: `Verify optimization: ${suggestion.metric} from ${suggestion.currentValue} to ${suggestion.targetValue} via ${suggestion.strategy}`,
|
|
1465
|
+
payload: suggestion,
|
|
1466
|
+
detectedBy: 'learning-optimization-coordinator',
|
|
1467
|
+
severity: confidence > 0.85 ? 'high' : 'medium',
|
|
1468
|
+
});
|
|
1469
|
+
if (this.consensusMixin.requiresConsensus(finding)) {
|
|
1470
|
+
const result = await this.consensusMixin.verifyFinding(finding);
|
|
1471
|
+
if (result.success && result.value.verdict === 'verified') {
|
|
1472
|
+
console.log(`[${this.domainName}] Optimization suggestion for '${suggestion.metric}' verified by consensus`);
|
|
1473
|
+
return true;
|
|
1474
|
+
}
|
|
1475
|
+
console.warn(`[${this.domainName}] Optimization suggestion for '${suggestion.metric}' NOT verified`);
|
|
1476
|
+
return false;
|
|
1477
|
+
}
|
|
1478
|
+
return true; // No consensus needed
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Verify a cross-domain insight using multi-model consensus
|
|
1482
|
+
* Per MM-001: Cross-domain insights require verification before propagation
|
|
1483
|
+
*
|
|
1484
|
+
* @param insight - The cross-domain insight to verify
|
|
1485
|
+
* @param confidence - Initial confidence in the insight
|
|
1486
|
+
* @returns true if the insight is verified or doesn't require consensus
|
|
1487
|
+
*/
|
|
1488
|
+
async verifyCrossDomainInsight(insight, confidence) {
|
|
1489
|
+
const finding = createDomainFinding({
|
|
1490
|
+
id: uuidv4(),
|
|
1491
|
+
type: 'cross-domain-insight',
|
|
1492
|
+
confidence,
|
|
1493
|
+
description: `Verify cross-domain insight: ${insight.description}`,
|
|
1494
|
+
payload: insight,
|
|
1495
|
+
detectedBy: 'learning-optimization-coordinator',
|
|
1496
|
+
severity: 'high', // Cross-domain insights always have high impact
|
|
1497
|
+
});
|
|
1498
|
+
if (this.consensusMixin.requiresConsensus(finding)) {
|
|
1499
|
+
const result = await this.consensusMixin.verifyFinding(finding);
|
|
1500
|
+
if (result.success && result.value.verdict === 'verified') {
|
|
1501
|
+
console.log(`[${this.domainName}] Cross-domain insight verified by consensus for ${insight.targetDomains.length} target domains`);
|
|
1502
|
+
return true;
|
|
1503
|
+
}
|
|
1504
|
+
console.warn(`[${this.domainName}] Cross-domain insight NOT verified: ${result.success ? result.value.verdict : result.error.message}`);
|
|
1505
|
+
return false;
|
|
1506
|
+
}
|
|
1507
|
+
return true; // No consensus needed
|
|
1508
|
+
}
|
|
1109
1509
|
}
|
|
1110
1510
|
//# sourceMappingURL=coordinator.js.map
|