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
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agentic QE v3 - Base Domain Interface
|
|
3
3
|
* Template for all domain implementations
|
|
4
|
+
*
|
|
5
|
+
* Extended with optional integration support for:
|
|
6
|
+
* - MinCut topology awareness (ADR-047)
|
|
7
|
+
* - Multi-model consensus verification (MM-006)
|
|
4
8
|
*/
|
|
9
|
+
import { ok, err } from '../shared/types';
|
|
5
10
|
/**
|
|
6
11
|
* Abstract base class for domain plugins
|
|
12
|
+
*
|
|
13
|
+
* Provides common functionality for all domain implementations including:
|
|
14
|
+
* - Lifecycle management (initialize/dispose)
|
|
15
|
+
* - Health tracking
|
|
16
|
+
* - Event handling
|
|
17
|
+
* - Task execution (Queen-Domain integration)
|
|
18
|
+
* - Optional MinCut and Consensus integration (ADR-047, MM-006)
|
|
7
19
|
*/
|
|
8
20
|
export class BaseDomainPlugin {
|
|
9
21
|
eventBus;
|
|
@@ -16,6 +28,19 @@ export class BaseDomainPlugin {
|
|
|
16
28
|
agents: { total: 0, active: 0, idle: 0, failed: 0 },
|
|
17
29
|
errors: [],
|
|
18
30
|
};
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// Optional Integration Support (ADR-047, MM-006)
|
|
33
|
+
// ============================================================================
|
|
34
|
+
/**
|
|
35
|
+
* MinCut bridge for topology awareness
|
|
36
|
+
* @internal Set via setMinCutBridge() or setIntegrationConfig()
|
|
37
|
+
*/
|
|
38
|
+
_minCutBridge;
|
|
39
|
+
/**
|
|
40
|
+
* Consensus configuration for multi-model verification
|
|
41
|
+
* @internal Set via setConsensusConfig() or setIntegrationConfig()
|
|
42
|
+
*/
|
|
43
|
+
_consensusConfig;
|
|
19
44
|
constructor(eventBus, memory) {
|
|
20
45
|
this.eventBus = eventBus;
|
|
21
46
|
this.memory = memory;
|
|
@@ -59,5 +84,219 @@ export class BaseDomainPlugin {
|
|
|
59
84
|
updateHealth(updates) {
|
|
60
85
|
this._health = { ...this._health, ...updates };
|
|
61
86
|
}
|
|
87
|
+
// ============================================================================
|
|
88
|
+
// Integration Configuration (ADR-047, MM-006)
|
|
89
|
+
// ============================================================================
|
|
90
|
+
/**
|
|
91
|
+
* Set MinCut bridge for topology awareness after construction
|
|
92
|
+
* Alternative to constructor injection for domains that need late binding
|
|
93
|
+
*
|
|
94
|
+
* @param bridge - The QueenMinCutBridge instance to use
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const plugin = new MyDomainPlugin(eventBus, memory, coordinator);
|
|
99
|
+
* await plugin.initialize();
|
|
100
|
+
*
|
|
101
|
+
* // Later, when MinCut bridge is available:
|
|
102
|
+
* plugin.setMinCutBridge(minCutBridge);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
setMinCutBridge(bridge) {
|
|
106
|
+
this._minCutBridge = bridge;
|
|
107
|
+
this.onMinCutBridgeSet(bridge);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get the current MinCut bridge (if set)
|
|
111
|
+
* @returns The MinCut bridge or undefined if not configured
|
|
112
|
+
*/
|
|
113
|
+
getMinCutBridge() {
|
|
114
|
+
return this._minCutBridge;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Set consensus configuration for multi-model verification after construction
|
|
118
|
+
* Alternative to constructor injection for domains that need late binding
|
|
119
|
+
*
|
|
120
|
+
* @param config - The consensus configuration to use
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* const plugin = new SecurityCompliancePlugin(eventBus, memory, coordinator);
|
|
125
|
+
* plugin.setConsensusConfig({
|
|
126
|
+
* enabled: true,
|
|
127
|
+
* verifySeverities: ['critical', 'high'],
|
|
128
|
+
* autoApprovalThreshold: 0.9,
|
|
129
|
+
* });
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
setConsensusConfig(config) {
|
|
133
|
+
this._consensusConfig = config;
|
|
134
|
+
this.onConsensusConfigSet(config);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get the current consensus configuration (if set)
|
|
138
|
+
* @returns The consensus configuration or undefined if not configured
|
|
139
|
+
*/
|
|
140
|
+
getConsensusConfig() {
|
|
141
|
+
return this._consensusConfig;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Set both MinCut and Consensus configuration at once
|
|
145
|
+
* Convenience method for full integration setup
|
|
146
|
+
*
|
|
147
|
+
* @param config - Integration configuration containing optional MinCut and Consensus settings
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```typescript
|
|
151
|
+
* plugin.setIntegrationConfig({
|
|
152
|
+
* minCutBridge: queenMinCutBridge,
|
|
153
|
+
* consensusConfig: {
|
|
154
|
+
* enabled: true,
|
|
155
|
+
* verifySeverities: ['critical', 'high'],
|
|
156
|
+
* },
|
|
157
|
+
* });
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
setIntegrationConfig(config) {
|
|
161
|
+
if (config.minCutBridge) {
|
|
162
|
+
this.setMinCutBridge(config.minCutBridge);
|
|
163
|
+
}
|
|
164
|
+
if (config.consensusConfig) {
|
|
165
|
+
this.setConsensusConfig(config.consensusConfig);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Check if MinCut integration is configured and active
|
|
170
|
+
* @returns true if MinCut bridge is set
|
|
171
|
+
*/
|
|
172
|
+
hasMinCutIntegration() {
|
|
173
|
+
return this._minCutBridge !== undefined;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Check if consensus verification is enabled
|
|
177
|
+
* @returns true if consensus is configured and enabled
|
|
178
|
+
*/
|
|
179
|
+
hasConsensusEnabled() {
|
|
180
|
+
return this._consensusConfig?.enabled === true;
|
|
181
|
+
}
|
|
182
|
+
// ============================================================================
|
|
183
|
+
// Integration Hooks (Override in subclasses for custom behavior)
|
|
184
|
+
// ============================================================================
|
|
185
|
+
/**
|
|
186
|
+
* Called when MinCut bridge is set
|
|
187
|
+
* Override in subclasses to perform domain-specific setup
|
|
188
|
+
*
|
|
189
|
+
* @param _bridge - The MinCut bridge that was set
|
|
190
|
+
*/
|
|
191
|
+
onMinCutBridgeSet(_bridge) {
|
|
192
|
+
// Default: no-op - subclasses can override to register with the bridge
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Called when consensus configuration is set
|
|
196
|
+
* Override in subclasses to perform domain-specific setup
|
|
197
|
+
*
|
|
198
|
+
* @param _config - The consensus configuration that was set
|
|
199
|
+
*/
|
|
200
|
+
onConsensusConfigSet(_config) {
|
|
201
|
+
// Default: no-op - subclasses can override to configure consensus verification
|
|
202
|
+
}
|
|
203
|
+
// ============================================================================
|
|
204
|
+
// Task Execution (Queen-Domain Integration)
|
|
205
|
+
// ============================================================================
|
|
206
|
+
/**
|
|
207
|
+
* Get task type to handler mapping
|
|
208
|
+
* Override in subclasses to register domain-specific task handlers
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* protected override getTaskHandlers(): Map<string, TaskHandler> {
|
|
212
|
+
* return new Map([
|
|
213
|
+
* ['execute-tests', async (payload) => this.coordinator.execute(payload)],
|
|
214
|
+
* ['detect-flaky', async (payload) => this.coordinator.detectFlaky(payload)],
|
|
215
|
+
* ]);
|
|
216
|
+
* }
|
|
217
|
+
*/
|
|
218
|
+
getTaskHandlers() {
|
|
219
|
+
// Default: no handlers - subclasses override to provide domain-specific handlers
|
|
220
|
+
return new Map();
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Check if domain can handle a task type
|
|
224
|
+
* Based on registered task handlers
|
|
225
|
+
*/
|
|
226
|
+
canHandleTask(taskType) {
|
|
227
|
+
return this.getTaskHandlers().has(taskType);
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Execute a task assigned by Queen Coordinator
|
|
231
|
+
* Routes to the appropriate handler based on task type
|
|
232
|
+
*
|
|
233
|
+
* @param request - Task execution request from Queen
|
|
234
|
+
* @param onComplete - Callback to report task completion
|
|
235
|
+
* @returns Success if task was accepted, Error if no handler exists
|
|
236
|
+
*/
|
|
237
|
+
async executeTask(request, onComplete) {
|
|
238
|
+
const handlers = this.getTaskHandlers();
|
|
239
|
+
const handler = handlers.get(request.taskType);
|
|
240
|
+
if (!handler) {
|
|
241
|
+
return err(new Error(`Domain ${this.name} has no handler for task type: ${request.taskType}`));
|
|
242
|
+
}
|
|
243
|
+
// Execute asynchronously, report via callback
|
|
244
|
+
// Don't await - task runs in background and reports via callback
|
|
245
|
+
this.runTaskAsync(request, handler, onComplete);
|
|
246
|
+
// Return immediately - task was accepted
|
|
247
|
+
return ok(undefined);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Run task asynchronously and report completion via callback
|
|
251
|
+
* Handles timing, success/failure, and error capture
|
|
252
|
+
*/
|
|
253
|
+
async runTaskAsync(request, handler, onComplete) {
|
|
254
|
+
const startTime = Date.now();
|
|
255
|
+
try {
|
|
256
|
+
// Execute the handler
|
|
257
|
+
const result = await handler(request.payload);
|
|
258
|
+
const duration = Date.now() - startTime;
|
|
259
|
+
// Build result based on handler outcome
|
|
260
|
+
const taskResult = {
|
|
261
|
+
taskId: request.taskId,
|
|
262
|
+
success: result.success,
|
|
263
|
+
data: result.success ? result.value : undefined,
|
|
264
|
+
error: !result.success ? result.error?.message : undefined,
|
|
265
|
+
duration,
|
|
266
|
+
};
|
|
267
|
+
// Report completion via callback
|
|
268
|
+
await onComplete(taskResult);
|
|
269
|
+
// Update health tracking
|
|
270
|
+
this.updateHealth({
|
|
271
|
+
lastActivity: new Date(),
|
|
272
|
+
agents: {
|
|
273
|
+
...this._health.agents,
|
|
274
|
+
active: Math.max(0, this._health.agents.active - 1),
|
|
275
|
+
idle: this._health.agents.idle + 1,
|
|
276
|
+
},
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
catch (error) {
|
|
280
|
+
// Handler threw an exception
|
|
281
|
+
const duration = Date.now() - startTime;
|
|
282
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
283
|
+
await onComplete({
|
|
284
|
+
taskId: request.taskId,
|
|
285
|
+
success: false,
|
|
286
|
+
error: errorMessage,
|
|
287
|
+
duration,
|
|
288
|
+
});
|
|
289
|
+
// Track error in health
|
|
290
|
+
this.updateHealth({
|
|
291
|
+
lastActivity: new Date(),
|
|
292
|
+
errors: [...this._health.errors.slice(-9), errorMessage],
|
|
293
|
+
agents: {
|
|
294
|
+
...this._health.agents,
|
|
295
|
+
active: Math.max(0, this._health.agents.active - 1),
|
|
296
|
+
failed: this._health.agents.failed + 1,
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
62
301
|
}
|
|
63
302
|
//# sourceMappingURL=domain-interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-interface.js","sourceRoot":"","sources":["../../src/domains/domain-interface.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"domain-interface.js","sourceRoot":"","sources":["../../src/domains/domain-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAmC,EAAE,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AA8E3E;;;;;;;;;GASG;AACH,MAAM,OAAgB,gBAAgB;IA2Bf;IACA;IA3BX,YAAY,GAAG,KAAK,CAAC;IAC/B,yEAAyE;IACzE,+DAA+D;IACrD,OAAO,GAAiB;QAChC,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE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CAAC,YAAY,CAAC;gBAChB,YAAY,EAAE,IAAI,IAAI,EAAE;gBACxB,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;gBACxD,MAAM,EAAE;oBACN,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM;oBACtB,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;oBACnD,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;iBACvC;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -7,6 +7,8 @@ import { EventBus, MemoryBackend, AgentCoordinator } from '../../kernel/interfac
|
|
|
7
7
|
import { ILearningOptimizationCoordinator, LearningCycleReport, OptimizationReport, CrossDomainSharingReport, LearningDashboard, ModelExport, ImportReport } from './interfaces.js';
|
|
8
8
|
import { type QESONAPattern, type QEPatternType, type QESONAStats, type QESONAAdaptationResult } from '../../integrations/ruvector/wrappers.js';
|
|
9
9
|
import type { RLState, RLAction } from '../../integrations/rl-suite/interfaces.js';
|
|
10
|
+
import { type DreamSchedulerStatus, type EngineResult as DreamCycleResult } from '../../learning/dream/index.js';
|
|
11
|
+
import type { QueenMinCutBridge } from '../../coordination/mincut/queen-integration.js';
|
|
10
12
|
/**
|
|
11
13
|
* Workflow status tracking
|
|
12
14
|
*/
|
|
@@ -29,6 +31,27 @@ export interface LearningCoordinatorConfig {
|
|
|
29
31
|
enableAutoOptimization: boolean;
|
|
30
32
|
publishEvents: boolean;
|
|
31
33
|
learningCycleIntervalMs: number;
|
|
34
|
+
/** Enable dream scheduler for offline learning */
|
|
35
|
+
enableDreamScheduler: boolean;
|
|
36
|
+
/** Interval for automatic dream cycles in ms (default: same as learningCycleIntervalMs) */
|
|
37
|
+
dreamCycleIntervalMs: number;
|
|
38
|
+
/** Enable dream trigger after experience threshold */
|
|
39
|
+
enableExperienceTrigger: boolean;
|
|
40
|
+
/** Number of experiences to accumulate before triggering dream */
|
|
41
|
+
experienceThreshold: number;
|
|
42
|
+
/** Enable dream trigger on quality gate failure */
|
|
43
|
+
enableQualityGateFailureTrigger: boolean;
|
|
44
|
+
/** Automatically apply high-confidence insights from dreams */
|
|
45
|
+
autoApplyHighConfidenceInsights: boolean;
|
|
46
|
+
/** Minimum confidence threshold for auto-applying insights (0-1) */
|
|
47
|
+
autoApplyConfidenceThreshold: number;
|
|
48
|
+
enableMinCutAwareness: boolean;
|
|
49
|
+
topologyHealthThreshold: number;
|
|
50
|
+
pauseOnCriticalTopology: boolean;
|
|
51
|
+
enableConsensus: boolean;
|
|
52
|
+
consensusThreshold: number;
|
|
53
|
+
consensusStrategy: 'majority' | 'weighted' | 'unanimous';
|
|
54
|
+
consensusMinModels: number;
|
|
32
55
|
}
|
|
33
56
|
/**
|
|
34
57
|
* Learning & Optimization Coordinator
|
|
@@ -51,6 +74,14 @@ export declare class LearningOptimizationCoordinator implements ILearningOptimiz
|
|
|
51
74
|
* Now uses PersistentSONAEngine to survive restarts
|
|
52
75
|
*/
|
|
53
76
|
private sona;
|
|
77
|
+
/**
|
|
78
|
+
* DreamScheduler for offline pattern consolidation and insight generation
|
|
79
|
+
* Wraps DreamEngine with automatic scheduling and trigger support
|
|
80
|
+
*/
|
|
81
|
+
private dreamScheduler;
|
|
82
|
+
private readonly minCutMixin;
|
|
83
|
+
private readonly consensusMixin;
|
|
84
|
+
private readonly domainName;
|
|
54
85
|
constructor(eventBus: EventBus, memory: MemoryBackend, agentCoordinator: AgentCoordinator, config?: Partial<LearningCoordinatorConfig>);
|
|
55
86
|
/**
|
|
56
87
|
* Initialize the coordinator.
|
|
@@ -197,6 +228,47 @@ export declare class LearningOptimizationCoordinator implements ILearningOptimiz
|
|
|
197
228
|
timeMs: number;
|
|
198
229
|
}>;
|
|
199
230
|
}>;
|
|
231
|
+
/**
|
|
232
|
+
* Trigger a dream cycle manually.
|
|
233
|
+
* Dreams consolidate patterns and generate novel insights through spreading activation.
|
|
234
|
+
*
|
|
235
|
+
* @param durationMs - Optional duration override in ms
|
|
236
|
+
* @returns Dream cycle result with generated insights
|
|
237
|
+
* @throws Error if DreamScheduler is not initialized
|
|
238
|
+
*/
|
|
239
|
+
triggerDreamCycle(durationMs?: number): Promise<DreamCycleResult>;
|
|
240
|
+
/**
|
|
241
|
+
* Get the current status of the DreamScheduler.
|
|
242
|
+
*
|
|
243
|
+
* @returns DreamScheduler status or null if not initialized
|
|
244
|
+
*/
|
|
245
|
+
getDreamStatus(): DreamSchedulerStatus | null;
|
|
246
|
+
/**
|
|
247
|
+
* Check if the DreamScheduler is available and running.
|
|
248
|
+
*
|
|
249
|
+
* @returns True if DreamScheduler is initialized
|
|
250
|
+
*/
|
|
251
|
+
isDreamSchedulerAvailable(): boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Get the last dream cycle result from the scheduler.
|
|
254
|
+
*
|
|
255
|
+
* @returns Last dream result or null if no dreams have completed
|
|
256
|
+
*/
|
|
257
|
+
getLastDreamResult(): DreamCycleResult | null;
|
|
258
|
+
/**
|
|
259
|
+
* Trigger a quick dream cycle for rapid insight generation.
|
|
260
|
+
*
|
|
261
|
+
* @returns Dream cycle result
|
|
262
|
+
* @throws Error if DreamScheduler is not initialized
|
|
263
|
+
*/
|
|
264
|
+
triggerQuickDream(): Promise<DreamCycleResult>;
|
|
265
|
+
/**
|
|
266
|
+
* Trigger a full dream cycle for comprehensive pattern consolidation.
|
|
267
|
+
*
|
|
268
|
+
* @returns Dream cycle result
|
|
269
|
+
* @throws Error if DreamScheduler is not initialized
|
|
270
|
+
*/
|
|
271
|
+
triggerFullDream(): Promise<DreamCycleResult>;
|
|
200
272
|
/**
|
|
201
273
|
* Export learned models
|
|
202
274
|
*/
|
|
@@ -217,6 +289,28 @@ export declare class LearningOptimizationCoordinator implements ILearningOptimiz
|
|
|
217
289
|
private publishPatternConsolidated;
|
|
218
290
|
private publishTransferCompleted;
|
|
219
291
|
private publishOptimizationApplied;
|
|
292
|
+
/**
|
|
293
|
+
* Publish a dream cycle completion event.
|
|
294
|
+
* This broadcasts dream insights to all interested domain coordinators.
|
|
295
|
+
*
|
|
296
|
+
* Called by the DreamScheduler or DreamEngine after completing a dream cycle.
|
|
297
|
+
*
|
|
298
|
+
* @param cycleId - Unique identifier for the dream cycle
|
|
299
|
+
* @param durationMs - How long the dream cycle took
|
|
300
|
+
* @param conceptsProcessed - Number of concepts processed during dreaming
|
|
301
|
+
* @param insights - Array of insights generated during the dream cycle
|
|
302
|
+
* @param patternsCreated - Number of patterns created from insights
|
|
303
|
+
*/
|
|
304
|
+
publishDreamCycleCompleted(cycleId: string, durationMs: number, conceptsProcessed: number, insights: Array<{
|
|
305
|
+
id: string;
|
|
306
|
+
type: string;
|
|
307
|
+
description: string;
|
|
308
|
+
noveltyScore: number;
|
|
309
|
+
confidenceScore: number;
|
|
310
|
+
actionable: boolean;
|
|
311
|
+
suggestedAction?: string;
|
|
312
|
+
sourceConcepts: string[];
|
|
313
|
+
}>, patternsCreated: number): Promise<void>;
|
|
220
314
|
private spawnLearningAgent;
|
|
221
315
|
private startWorkflow;
|
|
222
316
|
private completeWorkflow;
|
|
@@ -233,5 +327,82 @@ export declare class LearningOptimizationCoordinator implements ILearningOptimiz
|
|
|
233
327
|
private findSimilarPatterns;
|
|
234
328
|
private contextsOverlap;
|
|
235
329
|
private calculateChecksum;
|
|
330
|
+
/**
|
|
331
|
+
* Set the MinCut bridge for topology awareness
|
|
332
|
+
*/
|
|
333
|
+
setMinCutBridge(bridge: QueenMinCutBridge): void;
|
|
334
|
+
/**
|
|
335
|
+
* Check if topology is healthy
|
|
336
|
+
*/
|
|
337
|
+
isTopologyHealthy(): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Get topology-based routing excluding weak domains
|
|
340
|
+
* Per ADR-047: Filters out domains that are currently weak points
|
|
341
|
+
*
|
|
342
|
+
* @param targetDomains - List of potential target domains
|
|
343
|
+
* @returns Filtered list of healthy domains for routing
|
|
344
|
+
*/
|
|
345
|
+
getTopologyBasedRouting(targetDomains: DomainName[]): DomainName[];
|
|
346
|
+
/**
|
|
347
|
+
* Get weak vertices belonging to this domain
|
|
348
|
+
* Per ADR-047: Identifies agents that are single points of failure
|
|
349
|
+
*/
|
|
350
|
+
getDomainWeakVertices(): import("../../index.js").WeakVertex[];
|
|
351
|
+
/**
|
|
352
|
+
* Check if this domain is a weak point in the topology
|
|
353
|
+
* Per ADR-047: Returns true if any weak vertex belongs to learning-optimization domain
|
|
354
|
+
*/
|
|
355
|
+
isDomainWeakPoint(): boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Check if consensus engine is available
|
|
358
|
+
*/
|
|
359
|
+
isConsensusAvailable(): boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Get consensus statistics
|
|
362
|
+
* Per MM-001: Returns metrics about consensus verification
|
|
363
|
+
*/
|
|
364
|
+
getConsensusStats(): import("../../index.js").ConsensusStats | undefined;
|
|
365
|
+
/**
|
|
366
|
+
* Verify a pattern recommendation using multi-model consensus
|
|
367
|
+
* Per MM-001: High-stakes pattern recommendations require verification
|
|
368
|
+
*
|
|
369
|
+
* @param pattern - The pattern being recommended
|
|
370
|
+
* @param confidence - Initial confidence in the recommendation
|
|
371
|
+
* @returns true if the recommendation is verified or doesn't require consensus
|
|
372
|
+
*/
|
|
373
|
+
verifyPatternRecommendation(pattern: {
|
|
374
|
+
id: string;
|
|
375
|
+
name: string;
|
|
376
|
+
type: string;
|
|
377
|
+
domain: DomainName;
|
|
378
|
+
}, confidence: number): Promise<boolean>;
|
|
379
|
+
/**
|
|
380
|
+
* Verify an optimization suggestion using multi-model consensus
|
|
381
|
+
* Per MM-001: Optimization suggestions can have significant impact
|
|
382
|
+
*
|
|
383
|
+
* @param suggestion - The optimization suggestion to verify
|
|
384
|
+
* @param confidence - Initial confidence in the suggestion
|
|
385
|
+
* @returns true if the suggestion is verified or doesn't require consensus
|
|
386
|
+
*/
|
|
387
|
+
verifyOptimizationSuggestion(suggestion: {
|
|
388
|
+
metric: string;
|
|
389
|
+
currentValue: number;
|
|
390
|
+
targetValue: number;
|
|
391
|
+
strategy: string;
|
|
392
|
+
}, confidence: number): Promise<boolean>;
|
|
393
|
+
/**
|
|
394
|
+
* Verify a cross-domain insight using multi-model consensus
|
|
395
|
+
* Per MM-001: Cross-domain insights require verification before propagation
|
|
396
|
+
*
|
|
397
|
+
* @param insight - The cross-domain insight to verify
|
|
398
|
+
* @param confidence - Initial confidence in the insight
|
|
399
|
+
* @returns true if the insight is verified or doesn't require consensus
|
|
400
|
+
*/
|
|
401
|
+
verifyCrossDomainInsight(insight: {
|
|
402
|
+
sourceDomain: DomainName;
|
|
403
|
+
targetDomains: DomainName[];
|
|
404
|
+
description: string;
|
|
405
|
+
impact: string;
|
|
406
|
+
}, confidence: number): Promise<boolean>;
|
|
236
407
|
}
|
|
237
408
|
//# sourceMappingURL=coordinator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/domains/learning-optimization/coordinator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,MAAM,EAGN,UAAU,EAEX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,QAAQ,EACR,aAAa,EACb,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/domains/learning-optimization/coordinator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,MAAM,EAGN,UAAU,EAEX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,QAAQ,EACR,aAAa,EACb,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AASpC,OAAO,EACL,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB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