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
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - MinCut-Aware Domain Mixin
|
|
3
|
+
* ADR-047: MinCut Self-Organizing QE Integration
|
|
4
|
+
*
|
|
5
|
+
* Provides a reusable mixin that allows any domain coordinator to become
|
|
6
|
+
* MinCut-aware, enabling topology-based routing and health monitoring.
|
|
7
|
+
*
|
|
8
|
+
* This mixin implements the IMinCutAwareDomain interface and can be applied
|
|
9
|
+
* to any domain coordinator class via the factory function.
|
|
10
|
+
*/
|
|
11
|
+
import { DomainName } from '../../shared/types';
|
|
12
|
+
import { MinCutHealth, WeakVertex } from '../mincut/interfaces';
|
|
13
|
+
import { QueenMinCutBridge } from '../mincut/queen-integration';
|
|
14
|
+
/**
|
|
15
|
+
* Interface for MinCut-aware domain capabilities
|
|
16
|
+
*/
|
|
17
|
+
export interface IMinCutAwareDomain {
|
|
18
|
+
/**
|
|
19
|
+
* Set the MinCut bridge for topology awareness
|
|
20
|
+
* Uses dependency injection pattern for testability
|
|
21
|
+
*/
|
|
22
|
+
setMinCutBridge(bridge: QueenMinCutBridge): void;
|
|
23
|
+
/**
|
|
24
|
+
* Check if the overall topology is healthy
|
|
25
|
+
* Returns true if status is not 'critical'
|
|
26
|
+
*/
|
|
27
|
+
isTopologyHealthy(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get weak vertices that belong to this domain
|
|
30
|
+
* Filters the global weak vertices by domain name
|
|
31
|
+
*/
|
|
32
|
+
getDomainWeakVertices(): WeakVertex[];
|
|
33
|
+
/**
|
|
34
|
+
* Check if this domain itself is a weak point in the topology
|
|
35
|
+
* Returns true if any weak vertex belongs to this domain
|
|
36
|
+
*/
|
|
37
|
+
isDomainWeakPoint(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Get routing candidates excluding weak domains
|
|
40
|
+
* Filters out domains that are currently weak points
|
|
41
|
+
* @param targetDomains - List of potential target domains
|
|
42
|
+
* @returns Filtered list of healthy domains for routing
|
|
43
|
+
*/
|
|
44
|
+
getTopologyBasedRouting(targetDomains: DomainName[]): DomainName[];
|
|
45
|
+
/**
|
|
46
|
+
* Subscribe to topology health changes
|
|
47
|
+
* @param callback - Function called when health status changes
|
|
48
|
+
* @returns Unsubscribe function
|
|
49
|
+
*/
|
|
50
|
+
onTopologyHealthChange(callback: (health: MinCutHealth) => void): () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Configuration for MinCut-aware domain behavior
|
|
54
|
+
*/
|
|
55
|
+
export interface MinCutAwareConfig {
|
|
56
|
+
/**
|
|
57
|
+
* Whether MinCut awareness is enabled
|
|
58
|
+
* When false, the mixin operates in pass-through mode
|
|
59
|
+
*/
|
|
60
|
+
enableMinCutAwareness: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Threshold (0-1) for considering topology healthy
|
|
63
|
+
* Based on normalized MinCut value relative to healthy threshold
|
|
64
|
+
*/
|
|
65
|
+
topologyHealthThreshold: number;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to pause domain operations when topology is critical
|
|
68
|
+
*/
|
|
69
|
+
pauseOnCriticalTopology: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* List of domains this coordinator monitors for health
|
|
72
|
+
* Empty array means monitor all domains
|
|
73
|
+
*/
|
|
74
|
+
monitoredDomains: DomainName[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Default configuration for MinCut-aware domains
|
|
78
|
+
*/
|
|
79
|
+
export declare const DEFAULT_MINCUT_AWARE_CONFIG: MinCutAwareConfig;
|
|
80
|
+
/**
|
|
81
|
+
* Mixin class that adds MinCut awareness to any domain coordinator
|
|
82
|
+
*
|
|
83
|
+
* Usage:
|
|
84
|
+
* ```typescript
|
|
85
|
+
* class MyDomainCoordinator {
|
|
86
|
+
* private readonly minCutMixin: MinCutAwareDomainMixin;
|
|
87
|
+
*
|
|
88
|
+
* constructor(domainName: DomainName) {
|
|
89
|
+
* this.minCutMixin = createMinCutAwareMixin(domainName);
|
|
90
|
+
* }
|
|
91
|
+
*
|
|
92
|
+
* isTopologyHealthy() {
|
|
93
|
+
* return this.minCutMixin.isTopologyHealthy();
|
|
94
|
+
* }
|
|
95
|
+
* }
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare class MinCutAwareDomainMixin implements IMinCutAwareDomain {
|
|
99
|
+
private bridge;
|
|
100
|
+
private readonly config;
|
|
101
|
+
private readonly domainName;
|
|
102
|
+
private healthListeners;
|
|
103
|
+
private lastHealthStatus;
|
|
104
|
+
private healthCheckInterval;
|
|
105
|
+
constructor(domainName: DomainName, config?: Partial<MinCutAwareConfig>);
|
|
106
|
+
/**
|
|
107
|
+
* Set the MinCut bridge via dependency injection
|
|
108
|
+
*/
|
|
109
|
+
setMinCutBridge(bridge: QueenMinCutBridge): void;
|
|
110
|
+
/**
|
|
111
|
+
* Get the current MinCut bridge
|
|
112
|
+
*/
|
|
113
|
+
getMinCutBridge(): QueenMinCutBridge | null;
|
|
114
|
+
/**
|
|
115
|
+
* Check if a MinCut bridge is connected
|
|
116
|
+
*/
|
|
117
|
+
hasBridge(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Get the domain name this mixin is associated with
|
|
120
|
+
*/
|
|
121
|
+
getDomainName(): DomainName;
|
|
122
|
+
/**
|
|
123
|
+
* Get current configuration
|
|
124
|
+
*/
|
|
125
|
+
getConfig(): MinCutAwareConfig;
|
|
126
|
+
/**
|
|
127
|
+
* Update configuration
|
|
128
|
+
*/
|
|
129
|
+
updateConfig(config: Partial<MinCutAwareConfig>): void;
|
|
130
|
+
/**
|
|
131
|
+
* Dispose the mixin and clean up resources
|
|
132
|
+
*/
|
|
133
|
+
dispose(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Check if topology is healthy
|
|
136
|
+
* Returns true if MinCut awareness is disabled or status is not 'critical'
|
|
137
|
+
*/
|
|
138
|
+
isTopologyHealthy(): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Get weak vertices belonging to this domain
|
|
141
|
+
*/
|
|
142
|
+
getDomainWeakVertices(): WeakVertex[];
|
|
143
|
+
/**
|
|
144
|
+
* Check if this domain is a weak point in the topology
|
|
145
|
+
*/
|
|
146
|
+
isDomainWeakPoint(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Get topology-based routing excluding weak domains
|
|
149
|
+
*/
|
|
150
|
+
getTopologyBasedRouting(targetDomains: DomainName[]): DomainName[];
|
|
151
|
+
/**
|
|
152
|
+
* Subscribe to topology health changes
|
|
153
|
+
* @throws Error if max listeners limit is reached
|
|
154
|
+
*/
|
|
155
|
+
onTopologyHealthChange(callback: (health: MinCutHealth) => void): () => void;
|
|
156
|
+
/**
|
|
157
|
+
* Get the current MinCut health snapshot
|
|
158
|
+
*/
|
|
159
|
+
getCurrentHealth(): MinCutHealth | null;
|
|
160
|
+
/**
|
|
161
|
+
* Get the current MinCut value
|
|
162
|
+
*/
|
|
163
|
+
getMinCutValue(): number | null;
|
|
164
|
+
/**
|
|
165
|
+
* Check if operations should be paused due to critical topology
|
|
166
|
+
*/
|
|
167
|
+
shouldPauseOperations(): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Get domains that are healthy for routing
|
|
170
|
+
* Convenience method that considers monitored domains
|
|
171
|
+
*/
|
|
172
|
+
getHealthyRoutingDomains(): DomainName[];
|
|
173
|
+
/**
|
|
174
|
+
* Get normalized health score (0-1)
|
|
175
|
+
* Based on MinCut value relative to healthy threshold
|
|
176
|
+
*/
|
|
177
|
+
getNormalizedHealthScore(): number;
|
|
178
|
+
/**
|
|
179
|
+
* Check if health score meets threshold
|
|
180
|
+
*/
|
|
181
|
+
meetsHealthThreshold(): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Start monitoring health changes
|
|
184
|
+
*/
|
|
185
|
+
private startHealthMonitoring;
|
|
186
|
+
/**
|
|
187
|
+
* Stop monitoring health changes
|
|
188
|
+
*/
|
|
189
|
+
private stopHealthMonitoring;
|
|
190
|
+
/**
|
|
191
|
+
* Check health and notify listeners if status changed
|
|
192
|
+
*/
|
|
193
|
+
private checkAndNotifyHealthChange;
|
|
194
|
+
/**
|
|
195
|
+
* Get all domain names
|
|
196
|
+
*/
|
|
197
|
+
private getAllDomains;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Create a MinCut-aware domain mixin instance
|
|
201
|
+
*
|
|
202
|
+
* @param domainName - The domain this mixin is associated with
|
|
203
|
+
* @param config - Optional configuration overrides
|
|
204
|
+
* @returns MinCutAwareDomainMixin instance
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* const mixin = createMinCutAwareMixin('test-generation', {
|
|
209
|
+
* pauseOnCriticalTopology: true,
|
|
210
|
+
* topologyHealthThreshold: 0.8,
|
|
211
|
+
* });
|
|
212
|
+
*
|
|
213
|
+
* // Later, inject the bridge
|
|
214
|
+
* mixin.setMinCutBridge(queenMinCutBridge);
|
|
215
|
+
*
|
|
216
|
+
* // Use the mixin
|
|
217
|
+
* if (mixin.isTopologyHealthy()) {
|
|
218
|
+
* // Proceed with normal operations
|
|
219
|
+
* }
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
export declare function createMinCutAwareMixin(domainName: DomainName, config?: Partial<MinCutAwareConfig>): MinCutAwareDomainMixin;
|
|
223
|
+
/**
|
|
224
|
+
* Check if an object implements IMinCutAwareDomain
|
|
225
|
+
*/
|
|
226
|
+
export declare function isMinCutAwareDomain(obj: unknown): obj is IMinCutAwareDomain;
|
|
227
|
+
//# sourceMappingURL=mincut-aware-domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mincut-aware-domain.d.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;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClC,sBAAsB,CAExB;AAMD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAe3E"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - MinCut-Aware Domain Mixin
|
|
3
|
+
* ADR-047: MinCut Self-Organizing QE Integration
|
|
4
|
+
*
|
|
5
|
+
* Provides a reusable mixin that allows any domain coordinator to become
|
|
6
|
+
* MinCut-aware, enabling topology-based routing and health monitoring.
|
|
7
|
+
*
|
|
8
|
+
* This mixin implements the IMinCutAwareDomain interface and can be applied
|
|
9
|
+
* to any domain coordinator class via the factory function.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Default configuration for MinCut-aware domains
|
|
13
|
+
*/
|
|
14
|
+
export const DEFAULT_MINCUT_AWARE_CONFIG = {
|
|
15
|
+
enableMinCutAwareness: true,
|
|
16
|
+
topologyHealthThreshold: 0.7,
|
|
17
|
+
pauseOnCriticalTopology: false,
|
|
18
|
+
monitoredDomains: [],
|
|
19
|
+
};
|
|
20
|
+
/** Maximum number of health listeners to prevent memory leaks */
|
|
21
|
+
const MAX_HEALTH_LISTENERS = 100;
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// MinCut-Aware Domain Mixin
|
|
24
|
+
// ============================================================================
|
|
25
|
+
/**
|
|
26
|
+
* Mixin class that adds MinCut awareness to any domain coordinator
|
|
27
|
+
*
|
|
28
|
+
* Usage:
|
|
29
|
+
* ```typescript
|
|
30
|
+
* class MyDomainCoordinator {
|
|
31
|
+
* private readonly minCutMixin: MinCutAwareDomainMixin;
|
|
32
|
+
*
|
|
33
|
+
* constructor(domainName: DomainName) {
|
|
34
|
+
* this.minCutMixin = createMinCutAwareMixin(domainName);
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* isTopologyHealthy() {
|
|
38
|
+
* return this.minCutMixin.isTopologyHealthy();
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export class MinCutAwareDomainMixin {
|
|
44
|
+
bridge = null;
|
|
45
|
+
config;
|
|
46
|
+
domainName;
|
|
47
|
+
healthListeners = new Set();
|
|
48
|
+
lastHealthStatus = null;
|
|
49
|
+
healthCheckInterval = null;
|
|
50
|
+
constructor(domainName, config = {}) {
|
|
51
|
+
this.domainName = domainName;
|
|
52
|
+
this.config = { ...DEFAULT_MINCUT_AWARE_CONFIG, ...config };
|
|
53
|
+
}
|
|
54
|
+
// ==========================================================================
|
|
55
|
+
// Lifecycle
|
|
56
|
+
// ==========================================================================
|
|
57
|
+
/**
|
|
58
|
+
* Set the MinCut bridge via dependency injection
|
|
59
|
+
*/
|
|
60
|
+
setMinCutBridge(bridge) {
|
|
61
|
+
if (this.bridge) {
|
|
62
|
+
this.stopHealthMonitoring();
|
|
63
|
+
}
|
|
64
|
+
this.bridge = bridge;
|
|
65
|
+
if (this.config.enableMinCutAwareness && this.healthListeners.size > 0) {
|
|
66
|
+
this.startHealthMonitoring();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get the current MinCut bridge
|
|
71
|
+
*/
|
|
72
|
+
getMinCutBridge() {
|
|
73
|
+
return this.bridge;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Check if a MinCut bridge is connected
|
|
77
|
+
*/
|
|
78
|
+
hasBridge() {
|
|
79
|
+
return this.bridge !== null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the domain name this mixin is associated with
|
|
83
|
+
*/
|
|
84
|
+
getDomainName() {
|
|
85
|
+
return this.domainName;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get current configuration
|
|
89
|
+
*/
|
|
90
|
+
getConfig() {
|
|
91
|
+
return { ...this.config };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Update configuration
|
|
95
|
+
*/
|
|
96
|
+
updateConfig(config) {
|
|
97
|
+
Object.assign(this.config, config);
|
|
98
|
+
// Restart health monitoring if awareness was toggled
|
|
99
|
+
if ('enableMinCutAwareness' in config) {
|
|
100
|
+
if (config.enableMinCutAwareness && this.bridge && this.healthListeners.size > 0) {
|
|
101
|
+
this.startHealthMonitoring();
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
this.stopHealthMonitoring();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Dispose the mixin and clean up resources
|
|
110
|
+
*/
|
|
111
|
+
dispose() {
|
|
112
|
+
this.stopHealthMonitoring();
|
|
113
|
+
this.healthListeners.clear();
|
|
114
|
+
this.bridge = null;
|
|
115
|
+
this.lastHealthStatus = null;
|
|
116
|
+
}
|
|
117
|
+
// ==========================================================================
|
|
118
|
+
// IMinCutAwareDomain Implementation
|
|
119
|
+
// ==========================================================================
|
|
120
|
+
/**
|
|
121
|
+
* Check if topology is healthy
|
|
122
|
+
* Returns true if MinCut awareness is disabled or status is not 'critical'
|
|
123
|
+
*/
|
|
124
|
+
isTopologyHealthy() {
|
|
125
|
+
if (!this.config.enableMinCutAwareness || !this.bridge) {
|
|
126
|
+
return true; // Assume healthy when awareness is disabled or no bridge
|
|
127
|
+
}
|
|
128
|
+
const health = this.bridge.getMinCutHealth();
|
|
129
|
+
return health.status !== 'critical';
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Get weak vertices belonging to this domain
|
|
133
|
+
*/
|
|
134
|
+
getDomainWeakVertices() {
|
|
135
|
+
if (!this.bridge) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
const allWeakVertices = this.bridge.getWeakVertices();
|
|
139
|
+
return allWeakVertices.filter(vertex => vertex.vertex.domain === this.domainName);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Check if this domain is a weak point in the topology
|
|
143
|
+
*/
|
|
144
|
+
isDomainWeakPoint() {
|
|
145
|
+
const domainWeakVertices = this.getDomainWeakVertices();
|
|
146
|
+
return domainWeakVertices.length > 0;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get topology-based routing excluding weak domains
|
|
150
|
+
*/
|
|
151
|
+
getTopologyBasedRouting(targetDomains) {
|
|
152
|
+
if (!this.config.enableMinCutAwareness || !this.bridge) {
|
|
153
|
+
return targetDomains; // Return all when awareness is disabled
|
|
154
|
+
}
|
|
155
|
+
const weakVertices = this.bridge.getWeakVertices();
|
|
156
|
+
// Extract domains that are weak
|
|
157
|
+
const weakDomains = new Set();
|
|
158
|
+
for (const vertex of weakVertices) {
|
|
159
|
+
if (vertex.vertex.domain) {
|
|
160
|
+
weakDomains.add(vertex.vertex.domain);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// Filter out weak domains from routing candidates
|
|
164
|
+
return targetDomains.filter(domain => !weakDomains.has(domain));
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Subscribe to topology health changes
|
|
168
|
+
* @throws Error if max listeners limit is reached
|
|
169
|
+
*/
|
|
170
|
+
onTopologyHealthChange(callback) {
|
|
171
|
+
// Prevent memory leaks from unbounded listener growth
|
|
172
|
+
if (this.healthListeners.size >= MAX_HEALTH_LISTENERS) {
|
|
173
|
+
console.error(`[MinCutAwareDomain] Max health listeners (${MAX_HEALTH_LISTENERS}) reached for ${this.domainName}. ` +
|
|
174
|
+
`Ensure listeners are properly unsubscribed.`);
|
|
175
|
+
throw new Error(`Max health listeners (${MAX_HEALTH_LISTENERS}) exceeded`);
|
|
176
|
+
}
|
|
177
|
+
this.healthListeners.add(callback);
|
|
178
|
+
// Start monitoring if this is the first listener and we have a bridge
|
|
179
|
+
if (this.healthListeners.size === 1 && this.bridge && this.config.enableMinCutAwareness) {
|
|
180
|
+
this.startHealthMonitoring();
|
|
181
|
+
}
|
|
182
|
+
// Return unsubscribe function
|
|
183
|
+
return () => {
|
|
184
|
+
this.healthListeners.delete(callback);
|
|
185
|
+
// Stop monitoring if no more listeners
|
|
186
|
+
if (this.healthListeners.size === 0) {
|
|
187
|
+
this.stopHealthMonitoring();
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
// ==========================================================================
|
|
192
|
+
// Extended Methods
|
|
193
|
+
// ==========================================================================
|
|
194
|
+
/**
|
|
195
|
+
* Get the current MinCut health snapshot
|
|
196
|
+
*/
|
|
197
|
+
getCurrentHealth() {
|
|
198
|
+
if (!this.bridge) {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
return this.bridge.getMinCutHealth();
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Get the current MinCut value
|
|
205
|
+
*/
|
|
206
|
+
getMinCutValue() {
|
|
207
|
+
if (!this.bridge) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
return this.bridge.getMinCutValue();
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Check if operations should be paused due to critical topology
|
|
214
|
+
*/
|
|
215
|
+
shouldPauseOperations() {
|
|
216
|
+
if (!this.config.pauseOnCriticalTopology) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
return !this.isTopologyHealthy();
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Get domains that are healthy for routing
|
|
223
|
+
* Convenience method that considers monitored domains
|
|
224
|
+
*/
|
|
225
|
+
getHealthyRoutingDomains() {
|
|
226
|
+
const domainsToCheck = this.config.monitoredDomains.length > 0
|
|
227
|
+
? this.config.monitoredDomains
|
|
228
|
+
: this.getAllDomains();
|
|
229
|
+
return this.getTopologyBasedRouting(domainsToCheck);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Get normalized health score (0-1)
|
|
233
|
+
* Based on MinCut value relative to healthy threshold
|
|
234
|
+
*/
|
|
235
|
+
getNormalizedHealthScore() {
|
|
236
|
+
if (!this.bridge) {
|
|
237
|
+
return 1.0; // Assume healthy when no bridge
|
|
238
|
+
}
|
|
239
|
+
const health = this.bridge.getMinCutHealth();
|
|
240
|
+
if (health.healthyThreshold <= 0) {
|
|
241
|
+
return health.minCutValue > 0 ? 1.0 : 0.0;
|
|
242
|
+
}
|
|
243
|
+
// Normalize: minCutValue / healthyThreshold, capped at 1.0
|
|
244
|
+
return Math.min(1.0, health.minCutValue / health.healthyThreshold);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Check if health score meets threshold
|
|
248
|
+
*/
|
|
249
|
+
meetsHealthThreshold() {
|
|
250
|
+
return this.getNormalizedHealthScore() >= this.config.topologyHealthThreshold;
|
|
251
|
+
}
|
|
252
|
+
// ==========================================================================
|
|
253
|
+
// Private Methods
|
|
254
|
+
// ==========================================================================
|
|
255
|
+
/**
|
|
256
|
+
* Start monitoring health changes
|
|
257
|
+
*/
|
|
258
|
+
startHealthMonitoring() {
|
|
259
|
+
if (this.healthCheckInterval) {
|
|
260
|
+
return; // Already monitoring
|
|
261
|
+
}
|
|
262
|
+
// Check health periodically and notify listeners on change
|
|
263
|
+
this.healthCheckInterval = setInterval(() => {
|
|
264
|
+
this.checkAndNotifyHealthChange();
|
|
265
|
+
}, 5000); // Check every 5 seconds
|
|
266
|
+
// Immediate first check
|
|
267
|
+
this.checkAndNotifyHealthChange();
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Stop monitoring health changes
|
|
271
|
+
*/
|
|
272
|
+
stopHealthMonitoring() {
|
|
273
|
+
if (this.healthCheckInterval) {
|
|
274
|
+
clearInterval(this.healthCheckInterval);
|
|
275
|
+
this.healthCheckInterval = null;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Check health and notify listeners if status changed
|
|
280
|
+
*/
|
|
281
|
+
checkAndNotifyHealthChange() {
|
|
282
|
+
if (!this.bridge) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const health = this.bridge.getMinCutHealth();
|
|
286
|
+
// Only notify if status changed
|
|
287
|
+
if (health.status !== this.lastHealthStatus) {
|
|
288
|
+
this.lastHealthStatus = health.status;
|
|
289
|
+
// Notify all listeners
|
|
290
|
+
for (const listener of this.healthListeners) {
|
|
291
|
+
try {
|
|
292
|
+
listener(health);
|
|
293
|
+
}
|
|
294
|
+
catch (error) {
|
|
295
|
+
console.error('Error in health change listener:', error);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Get all domain names
|
|
302
|
+
*/
|
|
303
|
+
getAllDomains() {
|
|
304
|
+
return [
|
|
305
|
+
'test-generation',
|
|
306
|
+
'test-execution',
|
|
307
|
+
'coverage-analysis',
|
|
308
|
+
'quality-assessment',
|
|
309
|
+
'defect-intelligence',
|
|
310
|
+
'requirements-validation',
|
|
311
|
+
'code-intelligence',
|
|
312
|
+
'security-compliance',
|
|
313
|
+
'contract-testing',
|
|
314
|
+
'visual-accessibility',
|
|
315
|
+
'chaos-resilience',
|
|
316
|
+
'learning-optimization',
|
|
317
|
+
'coordination',
|
|
318
|
+
];
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// ============================================================================
|
|
322
|
+
// Factory Function
|
|
323
|
+
// ============================================================================
|
|
324
|
+
/**
|
|
325
|
+
* Create a MinCut-aware domain mixin instance
|
|
326
|
+
*
|
|
327
|
+
* @param domainName - The domain this mixin is associated with
|
|
328
|
+
* @param config - Optional configuration overrides
|
|
329
|
+
* @returns MinCutAwareDomainMixin instance
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* const mixin = createMinCutAwareMixin('test-generation', {
|
|
334
|
+
* pauseOnCriticalTopology: true,
|
|
335
|
+
* topologyHealthThreshold: 0.8,
|
|
336
|
+
* });
|
|
337
|
+
*
|
|
338
|
+
* // Later, inject the bridge
|
|
339
|
+
* mixin.setMinCutBridge(queenMinCutBridge);
|
|
340
|
+
*
|
|
341
|
+
* // Use the mixin
|
|
342
|
+
* if (mixin.isTopologyHealthy()) {
|
|
343
|
+
* // Proceed with normal operations
|
|
344
|
+
* }
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
export function createMinCutAwareMixin(domainName, config) {
|
|
348
|
+
return new MinCutAwareDomainMixin(domainName, config);
|
|
349
|
+
}
|
|
350
|
+
// ============================================================================
|
|
351
|
+
// Type Guard
|
|
352
|
+
// ============================================================================
|
|
353
|
+
/**
|
|
354
|
+
* Check if an object implements IMinCutAwareDomain
|
|
355
|
+
*/
|
|
356
|
+
export function isMinCutAwareDomain(obj) {
|
|
357
|
+
if (!obj || typeof obj !== 'object') {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
const domain = obj;
|
|
361
|
+
return (typeof domain.setMinCutBridge === 'function' &&
|
|
362
|
+
typeof domain.isTopologyHealthy === 'function' &&
|
|
363
|
+
typeof domain.getDomainWeakVertices === 'function' &&
|
|
364
|
+
typeof domain.isDomainWeakPoint === 'function' &&
|
|
365
|
+
typeof domain.getTopologyBasedRouting === 'function' &&
|
|
366
|
+
typeof domain.onTopologyHealthChange === 'function');
|
|
367
|
+
}
|
|
368
|
+
//# sourceMappingURL=mincut-aware-domain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mincut-aware-domain.js","sourceRoot":"","sources":["../../../src/coordination/mixins/mincut-aware-domain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqFH;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,qBAAqB,EAAE,IAAI;IAC3B,uBAAuB,EAAE,GAAG;IAC5B,uBAAuB,EAAE,KAAK;IAC9B,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAEF,iEAAiE;AACjE,MAAM,oBAAoB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AA8B,CAAC;IAE9C,OAAO,CACL,OAAO,MAAM,CAAC,eAAe,KAAK,UAAU;QAC5C,OAAO,MAAM,CAAC,iBAAiB,KAAK,UAAU;QAC9C,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;QAClD,OAAO,MAAM,CAAC,iBAAiB,KAAK,UAAU;QAC9C,OAAO,MAAM,CAAC,uBAAuB,KAAK,UAAU;QACpD,OAAO,MAAM,CAAC,sBAAsB,KAAK,UAAU,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -138,6 +138,8 @@ export interface IQueenCoordinator {
|
|
|
138
138
|
getMetrics(): QueenMetrics;
|
|
139
139
|
executeProtocol(protocolId: string, params?: Record<string, unknown>): Promise<Result<string, Error>>;
|
|
140
140
|
executeWorkflow(workflowId: string, params?: Record<string, unknown>): Promise<Result<string, Error>>;
|
|
141
|
+
getMinCutBridge(): QueenMinCutBridge | null;
|
|
142
|
+
injectMinCutBridgeIntoDomain(domainName: DomainName): boolean;
|
|
141
143
|
}
|
|
142
144
|
export interface TaskFilter {
|
|
143
145
|
status?: TaskExecution['status'];
|
|
@@ -202,6 +204,14 @@ export declare class QueenCoordinator implements IQueenCoordinator {
|
|
|
202
204
|
* ADR-047: Allows QE agents to access topology health directly
|
|
203
205
|
*/
|
|
204
206
|
getMinCutBridge(): QueenMinCutBridge | null;
|
|
207
|
+
/**
|
|
208
|
+
* Inject MinCut bridge into a specific domain plugin
|
|
209
|
+
* ADR-047: Enables late-binding for domains registered after Queen initialization
|
|
210
|
+
*
|
|
211
|
+
* @param domainName - The domain to inject the bridge into
|
|
212
|
+
* @returns true if bridge was injected, false if domain not found or bridge unavailable
|
|
213
|
+
*/
|
|
214
|
+
injectMinCutBridgeIntoDomain(domainName: DomainName): boolean;
|
|
205
215
|
/**
|
|
206
216
|
* Get TinyDancer router for direct routing access
|
|
207
217
|
* TD-004/TD-005/TD-006: Allows QE agents to query routing decisions directly
|
|
@@ -219,6 +229,11 @@ export declare class QueenCoordinator implements IQueenCoordinator {
|
|
|
219
229
|
private handleTaskCompleted;
|
|
220
230
|
private handleTaskFailed;
|
|
221
231
|
private handleAgentStatusChanged;
|
|
232
|
+
/**
|
|
233
|
+
* Handle task completion callback from domain plugin
|
|
234
|
+
* Queen-Domain Integration Fix: Direct task execution callback handler
|
|
235
|
+
*/
|
|
236
|
+
private handleTaskCompletion;
|
|
222
237
|
private assignTask;
|
|
223
238
|
private assignTaskToDomain;
|
|
224
239
|
private enqueueTask;
|
|
@@ -245,6 +260,13 @@ export declare class QueenCoordinator implements IQueenCoordinator {
|
|
|
245
260
|
}
|
|
246
261
|
/**
|
|
247
262
|
* Create a Queen Coordinator from a QE Kernel
|
|
263
|
+
*
|
|
264
|
+
* @param kernel - The QE Kernel instance
|
|
265
|
+
* @param router - Cross-domain event router
|
|
266
|
+
* @param protocolExecutor - Optional protocol executor for cross-domain protocols
|
|
267
|
+
* @param workflowExecutor - Optional workflow executor
|
|
268
|
+
* @param domainPlugins - Map of domain plugins for direct task execution (Integration Fix)
|
|
269
|
+
* @param config - Optional configuration overrides
|
|
248
270
|
*/
|
|
249
|
-
export declare function createQueenCoordinator(kernel: QEKernel, router: CrossDomainRouter, protocolExecutor?: ProtocolExecutor, workflowExecutor?: WorkflowExecutor, config?: Partial<QueenConfig>): QueenCoordinator;
|
|
271
|
+
export declare function createQueenCoordinator(kernel: QEKernel, router: CrossDomainRouter, protocolExecutor?: ProtocolExecutor, workflowExecutor?: WorkflowExecutor, domainPlugins?: Map<DomainName, DomainPlugin>, config?: Partial<QueenConfig>): QueenCoordinator;
|
|
250
272
|
//# sourceMappingURL=queen-coordinator.d.ts.map
|