agentic-qe 2.7.1 → 2.7.2
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/CHANGELOG.md +105 -0
- package/README.md +2 -2
- package/dist/agents/CodeIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/CodeIntelligenceAgent.js +7 -5
- package/dist/agents/CodeIntelligenceAgent.js.map +1 -1
- package/dist/cli/commands/knowledge-graph.d.ts.map +1 -1
- package/dist/cli/commands/knowledge-graph.js +4 -2
- package/dist/cli/commands/knowledge-graph.js.map +1 -1
- package/dist/cli/commands/migrate/index.d.ts +14 -0
- package/dist/cli/commands/migrate/index.d.ts.map +1 -0
- package/dist/cli/commands/migrate/index.js +283 -0
- package/dist/cli/commands/migrate/index.js.map +1 -0
- package/dist/cli/formatters/KGOutputFormatter.d.ts.map +1 -1
- package/dist/cli/formatters/KGOutputFormatter.js +15 -6
- package/dist/cli/formatters/KGOutputFormatter.js.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/database-init.d.ts.map +1 -1
- package/dist/cli/init/database-init.js +105 -0
- package/dist/cli/init/database-init.js.map +1 -1
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.d.ts +9 -3
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.d.ts.map +1 -1
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.js +41 -3
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.js.map +1 -1
- package/dist/code-intelligence/service/CodeIntelligenceService.js +1 -1
- package/dist/code-intelligence/service/CodeIntelligenceService.js.map +1 -1
- package/dist/core/memory/HNSWVectorMemory.js +1 -1
- package/dist/learning/QLearning.d.ts +9 -1
- package/dist/learning/QLearning.d.ts.map +1 -1
- package/dist/learning/QLearning.js +50 -1
- package/dist/learning/QLearning.js.map +1 -1
- package/dist/learning/metrics/LearningMetrics.d.ts +37 -0
- package/dist/learning/metrics/LearningMetrics.d.ts.map +1 -1
- package/dist/learning/metrics/LearningMetrics.js +73 -0
- package/dist/learning/metrics/LearningMetrics.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts +10 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +61 -0
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +13 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -1
- package/dist/mcp/handlers/learning/learning-store-pattern.js +38 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts +89 -0
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js +110 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts +27 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +188 -8
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/server-instructions.d.ts +1 -1
- package/dist/mcp/server-instructions.js +1 -1
- package/dist/mcp/server.d.ts +6 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +92 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.d.ts +13 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +66 -0
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts +55 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js +233 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/index.d.ts +5 -2
- package/dist/mcp/tools/qe/quality-gates/index.d.ts.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/index.js +10 -1
- package/dist/mcp/tools/qe/quality-gates/index.js.map +1 -1
- package/dist/mcp/tools.d.ts +1 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +156 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/persistence/migrations/all-migrations.d.ts +18 -0
- package/dist/persistence/migrations/all-migrations.d.ts.map +1 -0
- package/dist/persistence/migrations/all-migrations.js +624 -0
- package/dist/persistence/migrations/all-migrations.js.map +1 -0
- package/dist/persistence/migrations/index.d.ts +110 -0
- package/dist/persistence/migrations/index.d.ts.map +1 -0
- package/dist/persistence/migrations/index.js +303 -0
- package/dist/persistence/migrations/index.js.map +1 -0
- package/dist/planning/GOAPPlanner.d.ts +128 -0
- package/dist/planning/GOAPPlanner.d.ts.map +1 -0
- package/dist/planning/GOAPPlanner.js +630 -0
- package/dist/planning/GOAPPlanner.js.map +1 -0
- package/dist/planning/WorldStateBuilder.d.ts +150 -0
- package/dist/planning/WorldStateBuilder.d.ts.map +1 -0
- package/dist/planning/WorldStateBuilder.js +267 -0
- package/dist/planning/WorldStateBuilder.js.map +1 -0
- package/dist/planning/actions/fleet-actions.d.ts +78 -0
- package/dist/planning/actions/fleet-actions.d.ts.map +1 -0
- package/dist/planning/actions/fleet-actions.js +329 -0
- package/dist/planning/actions/fleet-actions.js.map +1 -0
- package/dist/planning/actions/index.d.ts +61 -0
- package/dist/planning/actions/index.d.ts.map +1 -0
- package/dist/planning/actions/index.js +159 -0
- package/dist/planning/actions/index.js.map +1 -0
- package/dist/planning/actions/orchestration-actions.d.ts +61 -0
- package/dist/planning/actions/orchestration-actions.d.ts.map +1 -0
- package/dist/planning/actions/orchestration-actions.js +395 -0
- package/dist/planning/actions/orchestration-actions.js.map +1 -0
- package/dist/planning/actions/quality-gate-actions.d.ts +160 -0
- package/dist/planning/actions/quality-gate-actions.d.ts.map +1 -0
- package/dist/planning/actions/quality-gate-actions.js +639 -0
- package/dist/planning/actions/quality-gate-actions.js.map +1 -0
- package/dist/planning/actions/test-strategy-actions.d.ts +70 -0
- package/dist/planning/actions/test-strategy-actions.d.ts.map +1 -0
- package/dist/planning/actions/test-strategy-actions.js +278 -0
- package/dist/planning/actions/test-strategy-actions.js.map +1 -0
- package/dist/planning/execution/PlanExecutor.d.ts +124 -0
- package/dist/planning/execution/PlanExecutor.d.ts.map +1 -0
- package/dist/planning/execution/PlanExecutor.js +405 -0
- package/dist/planning/execution/PlanExecutor.js.map +1 -0
- package/dist/planning/execution/index.d.ts +12 -0
- package/dist/planning/execution/index.d.ts.map +1 -0
- package/dist/planning/execution/index.js +18 -0
- package/dist/planning/execution/index.js.map +1 -0
- package/dist/planning/goals/TaskWorkflowGoals.d.ts +67 -0
- package/dist/planning/goals/TaskWorkflowGoals.d.ts.map +1 -0
- package/dist/planning/goals/TaskWorkflowGoals.js +208 -0
- package/dist/planning/goals/TaskWorkflowGoals.js.map +1 -0
- package/dist/planning/goals/index.d.ts +10 -0
- package/dist/planning/goals/index.d.ts.map +1 -0
- package/dist/planning/goals/index.js +19 -0
- package/dist/planning/goals/index.js.map +1 -0
- package/dist/planning/index.d.ts +34 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/index.js +176 -0
- package/dist/planning/index.js.map +1 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.d.ts +229 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.d.ts.map +1 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.js +582 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.js.map +1 -0
- package/dist/planning/integration/GOAPTaskOrchestration.d.ts +165 -0
- package/dist/planning/integration/GOAPTaskOrchestration.d.ts.map +1 -0
- package/dist/planning/integration/GOAPTaskOrchestration.js +490 -0
- package/dist/planning/integration/GOAPTaskOrchestration.js.map +1 -0
- package/dist/planning/integration/index.d.ts +14 -0
- package/dist/planning/integration/index.d.ts.map +1 -0
- package/dist/planning/integration/index.js +23 -0
- package/dist/planning/integration/index.js.map +1 -0
- package/dist/planning/types.d.ts +264 -0
- package/dist/planning/types.d.ts.map +1 -0
- package/dist/planning/types.js +63 -0
- package/dist/planning/types.js.map +1 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +81 -2
- package/dist/utils/Database.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Strategy GOAP Actions
|
|
3
|
+
*
|
|
4
|
+
* Actions for test strategy planning:
|
|
5
|
+
* - Impact analysis
|
|
6
|
+
* - Test prioritization
|
|
7
|
+
* - Coverage optimization
|
|
8
|
+
* - Risk-based test selection
|
|
9
|
+
*
|
|
10
|
+
* @module planning/actions/test-strategy-actions
|
|
11
|
+
* @version 1.0.0
|
|
12
|
+
*/
|
|
13
|
+
import { GOAPAction } from '../types';
|
|
14
|
+
/**
|
|
15
|
+
* Analyze change impact action
|
|
16
|
+
*/
|
|
17
|
+
export declare const analyzeChangeImpact: GOAPAction;
|
|
18
|
+
/**
|
|
19
|
+
* Prioritize tests by risk action
|
|
20
|
+
*/
|
|
21
|
+
export declare const prioritizeTestsByRisk: GOAPAction;
|
|
22
|
+
/**
|
|
23
|
+
* Select minimal test suite action
|
|
24
|
+
*/
|
|
25
|
+
export declare const selectMinimalTestSuite: GOAPAction;
|
|
26
|
+
/**
|
|
27
|
+
* Analyze coverage gaps action
|
|
28
|
+
*/
|
|
29
|
+
export declare const analyzeCoverageGaps: GOAPAction;
|
|
30
|
+
/**
|
|
31
|
+
* Generate targeted tests action
|
|
32
|
+
*/
|
|
33
|
+
export declare const generateTargetedTests: GOAPAction;
|
|
34
|
+
/**
|
|
35
|
+
* Run critical path tests action
|
|
36
|
+
*/
|
|
37
|
+
export declare const runCriticalPathTests: GOAPAction;
|
|
38
|
+
/**
|
|
39
|
+
* Detect flaky tests action
|
|
40
|
+
*/
|
|
41
|
+
export declare const detectFlakyTests: GOAPAction;
|
|
42
|
+
/**
|
|
43
|
+
* Stabilize flaky tests action
|
|
44
|
+
*/
|
|
45
|
+
export declare const stabilizeFlakyTests: GOAPAction;
|
|
46
|
+
/**
|
|
47
|
+
* Generate BDD scenarios action
|
|
48
|
+
*/
|
|
49
|
+
export declare const generateBDDScenarios: GOAPAction;
|
|
50
|
+
/**
|
|
51
|
+
* Optimize parallel execution action
|
|
52
|
+
*/
|
|
53
|
+
export declare const optimizeParallelExecution: GOAPAction;
|
|
54
|
+
/**
|
|
55
|
+
* All test strategy actions
|
|
56
|
+
*/
|
|
57
|
+
export declare const testStrategyActions: GOAPAction[];
|
|
58
|
+
/**
|
|
59
|
+
* Get test strategy action by ID
|
|
60
|
+
*/
|
|
61
|
+
export declare function getTestStrategyAction(id: string): GOAPAction | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Get actions suitable for time-constrained scenarios
|
|
64
|
+
*/
|
|
65
|
+
export declare function getQuickTestStrategyActions(): GOAPAction[];
|
|
66
|
+
/**
|
|
67
|
+
* Get actions for coverage improvement
|
|
68
|
+
*/
|
|
69
|
+
export declare function getCoverageImprovementActions(): GOAPAction[];
|
|
70
|
+
//# sourceMappingURL=test-strategy-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-strategy-actions.d.ts","sourceRoot":"","sources":["../../../src/planning/actions/test-strategy-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAkBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAkBnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAkBpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAkBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAqBnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAmBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAkB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAmBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAkBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,UAkBvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAW3C,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAExE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,UAAU,EAAE,CAE1D;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,UAAU,EAAE,CAK5D"}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Test Strategy GOAP Actions
|
|
4
|
+
*
|
|
5
|
+
* Actions for test strategy planning:
|
|
6
|
+
* - Impact analysis
|
|
7
|
+
* - Test prioritization
|
|
8
|
+
* - Coverage optimization
|
|
9
|
+
* - Risk-based test selection
|
|
10
|
+
*
|
|
11
|
+
* @module planning/actions/test-strategy-actions
|
|
12
|
+
* @version 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.testStrategyActions = exports.optimizeParallelExecution = exports.generateBDDScenarios = exports.stabilizeFlakyTests = exports.detectFlakyTests = exports.runCriticalPathTests = exports.generateTargetedTests = exports.analyzeCoverageGaps = exports.selectMinimalTestSuite = exports.prioritizeTestsByRisk = exports.analyzeChangeImpact = void 0;
|
|
16
|
+
exports.getTestStrategyAction = getTestStrategyAction;
|
|
17
|
+
exports.getQuickTestStrategyActions = getQuickTestStrategyActions;
|
|
18
|
+
exports.getCoverageImprovementActions = getCoverageImprovementActions;
|
|
19
|
+
/**
|
|
20
|
+
* Analyze change impact action
|
|
21
|
+
*/
|
|
22
|
+
exports.analyzeChangeImpact = {
|
|
23
|
+
id: 'ts-analyze-impact',
|
|
24
|
+
name: 'Analyze Change Impact',
|
|
25
|
+
description: 'Determine blast radius and affected test areas',
|
|
26
|
+
agentType: 'qe-regression-risk-analyzer',
|
|
27
|
+
preconditions: {
|
|
28
|
+
'context.impactedFiles': { exists: true },
|
|
29
|
+
'resources.timeRemaining': { gte: 30 }
|
|
30
|
+
},
|
|
31
|
+
effects: {
|
|
32
|
+
'context.impactAnalyzed': { set: true }, // Flag: impact has been analyzed
|
|
33
|
+
'resources.timeRemaining': { decrease: 60 }
|
|
34
|
+
},
|
|
35
|
+
cost: 0.5,
|
|
36
|
+
durationEstimate: 60000, // 1 minute
|
|
37
|
+
successRate: 0.95,
|
|
38
|
+
executionCount: 0,
|
|
39
|
+
category: 'analysis'
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Prioritize tests by risk action
|
|
43
|
+
*/
|
|
44
|
+
exports.prioritizeTestsByRisk = {
|
|
45
|
+
id: 'ts-prioritize-risk',
|
|
46
|
+
name: 'Prioritize Tests by Risk',
|
|
47
|
+
description: 'Rank tests based on failure probability and impact',
|
|
48
|
+
agentType: 'qe-regression-risk-analyzer',
|
|
49
|
+
preconditions: {
|
|
50
|
+
'context.suggestedTests': { exists: true },
|
|
51
|
+
'resources.timeRemaining': { gte: 20 }
|
|
52
|
+
},
|
|
53
|
+
effects: {
|
|
54
|
+
'context.testPriority': { set: 'ranked' },
|
|
55
|
+
'resources.timeRemaining': { decrease: 30 }
|
|
56
|
+
},
|
|
57
|
+
cost: 0.4,
|
|
58
|
+
durationEstimate: 30000,
|
|
59
|
+
successRate: 0.98,
|
|
60
|
+
executionCount: 0,
|
|
61
|
+
category: 'analysis'
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Select minimal test suite action
|
|
65
|
+
*/
|
|
66
|
+
exports.selectMinimalTestSuite = {
|
|
67
|
+
id: 'ts-select-minimal',
|
|
68
|
+
name: 'Select Minimal Test Suite',
|
|
69
|
+
description: 'Choose smallest test set covering all changed code',
|
|
70
|
+
agentType: 'qe-regression-risk-analyzer',
|
|
71
|
+
preconditions: {
|
|
72
|
+
'context.suggestedTests': { exists: true },
|
|
73
|
+
'resources.timeRemaining': { lt: 600 } // Only when time-constrained
|
|
74
|
+
},
|
|
75
|
+
effects: {
|
|
76
|
+
'context.testPriority': { set: 'ranked' },
|
|
77
|
+
'resources.timeRemaining': { decrease: 15 }
|
|
78
|
+
},
|
|
79
|
+
cost: 0.3,
|
|
80
|
+
durationEstimate: 15000,
|
|
81
|
+
successRate: 0.92,
|
|
82
|
+
executionCount: 0,
|
|
83
|
+
category: 'analysis'
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Analyze coverage gaps action
|
|
87
|
+
*/
|
|
88
|
+
exports.analyzeCoverageGaps = {
|
|
89
|
+
id: 'ts-coverage-gaps',
|
|
90
|
+
name: 'Analyze Coverage Gaps',
|
|
91
|
+
description: 'Identify untested code paths and missing coverage',
|
|
92
|
+
agentType: 'qe-coverage-analyzer',
|
|
93
|
+
preconditions: {
|
|
94
|
+
'coverage.line': { lt: 100 }, // Has room for improvement
|
|
95
|
+
'resources.timeRemaining': { gte: 60 }
|
|
96
|
+
},
|
|
97
|
+
effects: {
|
|
98
|
+
'context.coverageGapsAnalyzed': { set: true }, // Flag: coverage gaps analyzed
|
|
99
|
+
'resources.timeRemaining': { decrease: 90 }
|
|
100
|
+
},
|
|
101
|
+
cost: 0.8,
|
|
102
|
+
durationEstimate: 90000,
|
|
103
|
+
successRate: 0.95,
|
|
104
|
+
executionCount: 0,
|
|
105
|
+
category: 'analysis'
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Generate targeted tests action
|
|
109
|
+
*/
|
|
110
|
+
exports.generateTargetedTests = {
|
|
111
|
+
id: 'ts-generate-targeted',
|
|
112
|
+
name: 'Generate Targeted Tests',
|
|
113
|
+
description: 'Create tests specifically for uncovered changes',
|
|
114
|
+
agentType: 'qe-test-generator',
|
|
115
|
+
preconditions: {
|
|
116
|
+
'context.suggestedTests': { exists: true },
|
|
117
|
+
'coverage.line': { lt: 80 },
|
|
118
|
+
'resources.timeRemaining': { gte: 300 },
|
|
119
|
+
'fleet.availableAgents': { contains: 'qe-test-generator' }
|
|
120
|
+
},
|
|
121
|
+
effects: {
|
|
122
|
+
'coverage.line': { increase: 20 },
|
|
123
|
+
'coverage.branch': { increase: 15 },
|
|
124
|
+
'resources.timeRemaining': { decrease: 360 }
|
|
125
|
+
},
|
|
126
|
+
cost: 2.5,
|
|
127
|
+
durationEstimate: 360000, // 6 minutes
|
|
128
|
+
successRate: 0.80,
|
|
129
|
+
executionCount: 0,
|
|
130
|
+
category: 'test'
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Run critical path tests action
|
|
134
|
+
*/
|
|
135
|
+
exports.runCriticalPathTests = {
|
|
136
|
+
id: 'ts-critical-path',
|
|
137
|
+
name: 'Run Critical Path Tests',
|
|
138
|
+
description: 'Execute tests for high-risk code paths only',
|
|
139
|
+
agentType: 'qe-test-executor',
|
|
140
|
+
preconditions: {
|
|
141
|
+
'context.testPriority': { eq: 'ranked' },
|
|
142
|
+
'resources.timeRemaining': { gte: 60 }
|
|
143
|
+
},
|
|
144
|
+
effects: {
|
|
145
|
+
'quality.criticalPathTested': { set: true },
|
|
146
|
+
'quality.testsMeasured': { set: true }, // Flag: tests have been measured
|
|
147
|
+
'resources.timeRemaining': { decrease: 120 }
|
|
148
|
+
},
|
|
149
|
+
cost: 0.8,
|
|
150
|
+
durationEstimate: 120000,
|
|
151
|
+
successRate: 0.93,
|
|
152
|
+
executionCount: 0,
|
|
153
|
+
category: 'test'
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Detect flaky tests action
|
|
157
|
+
*/
|
|
158
|
+
exports.detectFlakyTests = {
|
|
159
|
+
id: 'ts-detect-flaky',
|
|
160
|
+
name: 'Detect Flaky Tests',
|
|
161
|
+
description: 'Identify and quarantine unreliable tests',
|
|
162
|
+
agentType: 'qe-flaky-test-hunter',
|
|
163
|
+
preconditions: {
|
|
164
|
+
'context.previousFailures': { gte: 1 }, // Has failure history
|
|
165
|
+
'resources.timeRemaining': { gte: 120 }
|
|
166
|
+
},
|
|
167
|
+
effects: {
|
|
168
|
+
'context.previousFailures': { decrease: 1 },
|
|
169
|
+
'resources.timeRemaining': { decrease: 180 }
|
|
170
|
+
},
|
|
171
|
+
cost: 1.5,
|
|
172
|
+
durationEstimate: 180000,
|
|
173
|
+
successRate: 0.88,
|
|
174
|
+
executionCount: 0,
|
|
175
|
+
category: 'test'
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Stabilize flaky tests action
|
|
179
|
+
*/
|
|
180
|
+
exports.stabilizeFlakyTests = {
|
|
181
|
+
id: 'ts-stabilize-flaky',
|
|
182
|
+
name: 'Stabilize Flaky Tests',
|
|
183
|
+
description: 'Auto-remediate detected flaky tests',
|
|
184
|
+
agentType: 'qe-flaky-test-hunter',
|
|
185
|
+
preconditions: {
|
|
186
|
+
'context.previousFailures': { gte: 2 }, // Multiple failures
|
|
187
|
+
'resources.timeRemaining': { gte: 300 }
|
|
188
|
+
},
|
|
189
|
+
effects: {
|
|
190
|
+
'context.previousFailures': { set: 0 },
|
|
191
|
+
'quality.testsPassing': { increase: 5 },
|
|
192
|
+
'resources.timeRemaining': { decrease: 360 }
|
|
193
|
+
},
|
|
194
|
+
cost: 2.0,
|
|
195
|
+
durationEstimate: 360000,
|
|
196
|
+
successRate: 0.70,
|
|
197
|
+
executionCount: 0,
|
|
198
|
+
category: 'test'
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Generate BDD scenarios action
|
|
202
|
+
*/
|
|
203
|
+
exports.generateBDDScenarios = {
|
|
204
|
+
id: 'ts-bdd-scenarios',
|
|
205
|
+
name: 'Generate BDD Scenarios',
|
|
206
|
+
description: 'Create behavior-driven test scenarios from requirements',
|
|
207
|
+
agentType: 'qe-requirements-validator',
|
|
208
|
+
preconditions: {
|
|
209
|
+
'resources.timeRemaining': { gte: 180 },
|
|
210
|
+
'fleet.availableAgents': { contains: 'qe-requirements-validator' }
|
|
211
|
+
},
|
|
212
|
+
effects: {
|
|
213
|
+
'context.bddGenerated': { set: true }, // Flag: BDD scenarios generated
|
|
214
|
+
'resources.timeRemaining': { decrease: 240 }
|
|
215
|
+
},
|
|
216
|
+
cost: 1.8,
|
|
217
|
+
durationEstimate: 240000,
|
|
218
|
+
successRate: 0.85,
|
|
219
|
+
executionCount: 0,
|
|
220
|
+
category: 'test'
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Optimize parallel execution action
|
|
224
|
+
*/
|
|
225
|
+
exports.optimizeParallelExecution = {
|
|
226
|
+
id: 'ts-optimize-parallel',
|
|
227
|
+
name: 'Optimize Parallel Execution',
|
|
228
|
+
description: 'Rebalance test distribution for parallel runners',
|
|
229
|
+
agentType: 'qe-test-executor',
|
|
230
|
+
preconditions: {
|
|
231
|
+
'resources.parallelSlots': { gte: 2 }, // Has parallelism available
|
|
232
|
+
'resources.timeRemaining': { lt: 300 } // Time pressure
|
|
233
|
+
},
|
|
234
|
+
effects: {
|
|
235
|
+
'resources.parallelSlots': { increase: 2 },
|
|
236
|
+
'resources.timeRemaining': { decrease: 30 }
|
|
237
|
+
},
|
|
238
|
+
cost: 0.6,
|
|
239
|
+
durationEstimate: 30000,
|
|
240
|
+
successRate: 0.95,
|
|
241
|
+
executionCount: 0,
|
|
242
|
+
category: 'process'
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* All test strategy actions
|
|
246
|
+
*/
|
|
247
|
+
exports.testStrategyActions = [
|
|
248
|
+
exports.analyzeChangeImpact,
|
|
249
|
+
exports.prioritizeTestsByRisk,
|
|
250
|
+
exports.selectMinimalTestSuite,
|
|
251
|
+
exports.analyzeCoverageGaps,
|
|
252
|
+
exports.generateTargetedTests,
|
|
253
|
+
exports.runCriticalPathTests,
|
|
254
|
+
exports.detectFlakyTests,
|
|
255
|
+
exports.stabilizeFlakyTests,
|
|
256
|
+
exports.generateBDDScenarios,
|
|
257
|
+
exports.optimizeParallelExecution
|
|
258
|
+
];
|
|
259
|
+
/**
|
|
260
|
+
* Get test strategy action by ID
|
|
261
|
+
*/
|
|
262
|
+
function getTestStrategyAction(id) {
|
|
263
|
+
return exports.testStrategyActions.find(a => a.id === id);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Get actions suitable for time-constrained scenarios
|
|
267
|
+
*/
|
|
268
|
+
function getQuickTestStrategyActions() {
|
|
269
|
+
return exports.testStrategyActions.filter(a => (a.durationEstimate ?? 0) < 120000);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Get actions for coverage improvement
|
|
273
|
+
*/
|
|
274
|
+
function getCoverageImprovementActions() {
|
|
275
|
+
return exports.testStrategyActions.filter(a => a.effects['coverage.line']?.increase ||
|
|
276
|
+
a.effects['coverage.branch']?.increase);
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=test-strategy-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-strategy-actions.js","sourceRoot":"","sources":["../../../src/planning/actions/test-strategy-actions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAkQH,sDAEC;AAKD,kEAEC;AAKD,sEAKC;AAjRD;;GAEG;AACU,QAAA,mBAAmB,GAAe;IAC7C,EAAE,EAAE,mBAAmB;IACvB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,gDAAgD;IAC7D,SAAS,EAAE,6BAA6B;IACxC,aAAa,EAAE;QACb,uBAAuB,EAAE,EA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AC,MAAM,CAAC,CAAC,CAAC,EAAE,CACpC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ;QACpC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CACvC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GOAP Plan Executor
|
|
3
|
+
*
|
|
4
|
+
* Executes remediation plans generated by GOAPQualityGateIntegration:
|
|
5
|
+
* - Spawns agents for each action
|
|
6
|
+
* - Executes actions in sequence with dependency ordering
|
|
7
|
+
* - Records outcomes for learning (wires recordActionOutcome)
|
|
8
|
+
* - Handles failures with automatic replanning
|
|
9
|
+
*
|
|
10
|
+
* @module planning/execution/PlanExecutor
|
|
11
|
+
* @version 1.0.0
|
|
12
|
+
*/
|
|
13
|
+
import Database from 'better-sqlite3';
|
|
14
|
+
import { GOAPQualityGateIntegration, RemediationPlan, QualityGateContext, QualityGateMetrics, QUALITY_GATE_GOALS } from '../integration/GOAPQualityGateIntegration';
|
|
15
|
+
/**
|
|
16
|
+
* Result of executing a single action
|
|
17
|
+
*/
|
|
18
|
+
export interface ActionExecutionResult {
|
|
19
|
+
actionId: string;
|
|
20
|
+
actionName: string;
|
|
21
|
+
success: boolean;
|
|
22
|
+
durationMs: number;
|
|
23
|
+
error?: string;
|
|
24
|
+
agentId?: string;
|
|
25
|
+
output?: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of executing a full plan
|
|
29
|
+
*/
|
|
30
|
+
export interface PlanExecutionResult {
|
|
31
|
+
planId: string;
|
|
32
|
+
success: boolean;
|
|
33
|
+
totalDurationMs: number;
|
|
34
|
+
actionsExecuted: number;
|
|
35
|
+
actionsSucceeded: number;
|
|
36
|
+
actionsFailed: number;
|
|
37
|
+
actionResults: ActionExecutionResult[];
|
|
38
|
+
replanned: boolean;
|
|
39
|
+
alternativePlanUsed?: string;
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Configuration for plan execution
|
|
44
|
+
*/
|
|
45
|
+
export interface PlanExecutionConfig {
|
|
46
|
+
/** Maximum retries per action (default: 1) */
|
|
47
|
+
maxRetries?: number;
|
|
48
|
+
/** Timeout per action in ms (default: 300000 = 5 min) */
|
|
49
|
+
actionTimeoutMs?: number;
|
|
50
|
+
/** Whether to continue on action failure (default: false - triggers replanning) */
|
|
51
|
+
continueOnFailure?: boolean;
|
|
52
|
+
/** Maximum replan attempts (default: 2) */
|
|
53
|
+
maxReplanAttempts?: number;
|
|
54
|
+
/** Dry run - don't actually execute, just validate (default: false) */
|
|
55
|
+
dryRun?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* GOAP Plan Executor
|
|
59
|
+
*
|
|
60
|
+
* Bridges plan generation with actual agent execution.
|
|
61
|
+
* Implements the OODA (Observe-Orient-Decide-Act) loop for plan execution.
|
|
62
|
+
*/
|
|
63
|
+
export declare class PlanExecutor {
|
|
64
|
+
private registry;
|
|
65
|
+
private integration;
|
|
66
|
+
private db;
|
|
67
|
+
private logger;
|
|
68
|
+
private config;
|
|
69
|
+
private ownsRegistry;
|
|
70
|
+
constructor(db: Database.Database, integration: GOAPQualityGateIntegration, config?: PlanExecutionConfig);
|
|
71
|
+
/**
|
|
72
|
+
* Initialize registry only when needed for actual execution
|
|
73
|
+
*/
|
|
74
|
+
private ensureRegistry;
|
|
75
|
+
/**
|
|
76
|
+
* Cleanup resources - call this when done with the executor
|
|
77
|
+
*/
|
|
78
|
+
cleanup(): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Execute a remediation plan
|
|
81
|
+
*
|
|
82
|
+
* @param plan - The remediation plan to execute
|
|
83
|
+
* @param context - Quality gate context for replanning
|
|
84
|
+
* @param metrics - Current metrics for replanning
|
|
85
|
+
*/
|
|
86
|
+
executePlan(plan: RemediationPlan, context: QualityGateContext, metrics: QualityGateMetrics): Promise<PlanExecutionResult>;
|
|
87
|
+
/**
|
|
88
|
+
* Execute a single remediation action
|
|
89
|
+
*/
|
|
90
|
+
private executeAction;
|
|
91
|
+
/**
|
|
92
|
+
* Map GOAP agent type to MCP agent type
|
|
93
|
+
*/
|
|
94
|
+
private mapAgentType;
|
|
95
|
+
/**
|
|
96
|
+
* Get capabilities for an action
|
|
97
|
+
*/
|
|
98
|
+
private getCapabilitiesForAction;
|
|
99
|
+
/**
|
|
100
|
+
* Create a task from a remediation action
|
|
101
|
+
*/
|
|
102
|
+
private createTaskFromAction;
|
|
103
|
+
/**
|
|
104
|
+
* Update plan status in database
|
|
105
|
+
*/
|
|
106
|
+
private updatePlanStatus;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Factory function to create a PlanExecutor
|
|
110
|
+
*/
|
|
111
|
+
export declare function createPlanExecutor(dbPath: string, config?: PlanExecutionConfig): {
|
|
112
|
+
executor: PlanExecutor;
|
|
113
|
+
integration: GOAPQualityGateIntegration;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Execute a quality gate remediation with GOAP planning
|
|
117
|
+
*
|
|
118
|
+
* High-level function that:
|
|
119
|
+
* 1. Generates a remediation plan
|
|
120
|
+
* 2. Executes the plan
|
|
121
|
+
* 3. Records outcomes for learning
|
|
122
|
+
*/
|
|
123
|
+
export declare function executeQualityGateRemediation(metrics: QualityGateMetrics, context: QualityGateContext, dbPath: string, targetGoal?: keyof typeof QUALITY_GATE_GOALS, config?: PlanExecutionConfig): Promise<PlanExecutionResult | null>;
|
|
124
|
+
//# sourceMappingURL=PlanExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanExecutor.d.ts","sourceRoot":"","sources":["../../../src/planning/execution/PlanExecutor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EACL,0BAA0B,EAC1B,eAAe,EAEf,kBAAkB,EAClB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