@yasserkhanorg/e2e-agents 0.10.0 → 0.11.0
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/README.md +112 -584
- package/dist/agent/api_catalog.d.ts +11 -0
- package/dist/agent/api_catalog.d.ts.map +1 -0
- package/dist/agent/api_catalog.js +210 -0
- package/dist/agent/llm_agents_flow.d.ts +15 -0
- package/dist/agent/llm_agents_flow.d.ts.map +1 -0
- package/dist/agent/llm_agents_flow.js +434 -0
- package/dist/agent/native_flow.d.ts +6 -0
- package/dist/agent/native_flow.d.ts.map +1 -0
- package/dist/agent/native_flow.js +179 -0
- package/dist/agent/pipeline.d.ts +2 -25
- package/dist/agent/pipeline.d.ts.map +1 -1
- package/dist/agent/pipeline.js +30 -1329
- package/dist/agent/pipeline_types.d.ts +54 -0
- package/dist/agent/pipeline_types.d.ts.map +1 -0
- package/dist/agent/pipeline_types.js +4 -0
- package/dist/agent/pipeline_utils.d.ts +12 -0
- package/dist/agent/pipeline_utils.d.ts.map +1 -0
- package/dist/agent/pipeline_utils.js +156 -0
- package/dist/agent/process_runner.d.ts +10 -0
- package/dist/agent/process_runner.d.ts.map +1 -0
- package/dist/agent/process_runner.js +92 -0
- package/dist/agent/spec_generator.d.ts +5 -0
- package/dist/agent/spec_generator.d.ts.map +1 -0
- package/dist/agent/spec_generator.js +253 -0
- package/dist/agent/validation_runner.d.ts +5 -0
- package/dist/agent/validation_runner.d.ts.map +1 -0
- package/dist/agent/validation_runner.js +77 -0
- package/dist/agentic/playwright_runner.js +1 -1
- package/dist/cli/commands/analyze.d.ts +3 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +77 -0
- package/dist/cli/commands/feedback.d.ts +3 -0
- package/dist/cli/commands/feedback.d.ts.map +1 -0
- package/dist/cli/commands/feedback.js +39 -0
- package/dist/cli/commands/finalize.d.ts +3 -0
- package/dist/cli/commands/finalize.d.ts.map +1 -0
- package/dist/cli/commands/finalize.js +41 -0
- package/dist/cli/commands/generate.d.ts +4 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +108 -0
- package/dist/cli/commands/heal.d.ts +3 -0
- package/dist/cli/commands/heal.d.ts.map +1 -0
- package/dist/cli/commands/heal.js +60 -0
- package/dist/cli/commands/impact.d.ts +4 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +26 -0
- package/dist/cli/commands/llm_health.d.ts +2 -0
- package/dist/cli/commands/llm_health.d.ts.map +1 -0
- package/dist/cli/commands/llm_health.js +38 -0
- package/dist/cli/commands/plan.d.ts +4 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +83 -0
- package/dist/cli/commands/traceability.d.ts +4 -0
- package/dist/cli/commands/traceability.d.ts.map +1 -0
- package/dist/cli/commands/traceability.js +77 -0
- package/dist/cli/parse_args.d.ts +6 -0
- package/dist/cli/parse_args.d.ts.map +1 -0
- package/dist/cli/parse_args.js +216 -0
- package/dist/cli/types.d.ts +70 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +4 -0
- package/dist/cli/usage.d.ts +2 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +86 -0
- package/dist/cli.js +26 -1060
- package/dist/esm/agent/api_catalog.js +199 -0
- package/dist/esm/agent/llm_agents_flow.js +421 -0
- package/dist/esm/agent/native_flow.js +175 -0
- package/dist/esm/agent/pipeline.js +8 -1307
- package/dist/esm/agent/pipeline_types.js +3 -0
- package/dist/esm/agent/pipeline_utils.js +146 -0
- package/dist/esm/agent/process_runner.js +83 -0
- package/dist/esm/agent/spec_generator.js +249 -0
- package/dist/esm/agent/validation_runner.js +73 -0
- package/dist/esm/agentic/playwright_runner.js +1 -1
- package/dist/esm/cli/commands/analyze.js +74 -0
- package/dist/esm/cli/commands/feedback.js +36 -0
- package/dist/esm/cli/commands/finalize.js +38 -0
- package/dist/esm/cli/commands/generate.js +105 -0
- package/dist/esm/cli/commands/heal.js +57 -0
- package/dist/esm/cli/commands/impact.js +23 -0
- package/dist/esm/cli/commands/llm_health.js +35 -0
- package/dist/esm/cli/commands/plan.js +80 -0
- package/dist/esm/cli/commands/traceability.js +73 -0
- package/dist/esm/cli/parse_args.js +210 -0
- package/dist/esm/cli/types.js +3 -0
- package/dist/esm/cli/usage.js +83 -0
- package/dist/esm/cli.js +20 -1054
- package/dist/esm/mcp-server.js +18 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +17 -0
- package/package.json +2 -4
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runPlaywrightRuntimeValidation = runPlaywrightRuntimeValidation;
|
|
6
|
+
exports.runPlaywrightListValidation = runPlaywrightListValidation;
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const utils_js_1 = require("./utils.js");
|
|
9
|
+
const process_runner_js_1 = require("./process_runner.js");
|
|
10
|
+
function runPlaywrightRuntimeValidation(testsRoot, testFile, pipeline, playwrightBinary) {
|
|
11
|
+
if (!playwrightBinary) {
|
|
12
|
+
return {
|
|
13
|
+
status: 'failed',
|
|
14
|
+
detail: 'Playwright binary not found; cannot execute runtime validation.',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const relativeSpecPath = (0, utils_js_1.normalizePath)((0, path_1.relative)(testsRoot, testFile));
|
|
18
|
+
if (relativeSpecPath.startsWith('../') || relativeSpecPath.startsWith('..\\')) {
|
|
19
|
+
return {
|
|
20
|
+
status: 'failed',
|
|
21
|
+
detail: 'Generated spec path resolved outside testsRoot during runtime validation.',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const args = ['test', relativeSpecPath, '--workers', '1', '--retries', '0', '--max-failures', '1', '--reporter', 'line'];
|
|
25
|
+
if (pipeline.headless === false) {
|
|
26
|
+
args.push('--headed');
|
|
27
|
+
}
|
|
28
|
+
if (pipeline.project) {
|
|
29
|
+
args.push('--project', pipeline.project);
|
|
30
|
+
}
|
|
31
|
+
const commandResult = (0, process_runner_js_1.runCommand)(playwrightBinary, args, testsRoot, 10 * 60 * 1000);
|
|
32
|
+
if (commandResult.status === 0) {
|
|
33
|
+
return { status: 'passed' };
|
|
34
|
+
}
|
|
35
|
+
const summary = (0, process_runner_js_1.summarizeCommandOutput)(commandResult.stdout, commandResult.stderr);
|
|
36
|
+
return {
|
|
37
|
+
status: 'failed',
|
|
38
|
+
detail: summary || commandResult.error || `playwright test failed with status ${commandResult.status}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function runPlaywrightListValidation(testsRoot, testFile, pipeline, playwrightBinary) {
|
|
42
|
+
if (!playwrightBinary) {
|
|
43
|
+
return {
|
|
44
|
+
status: 'skipped',
|
|
45
|
+
detail: 'Playwright binary not found under testsRoot/node_modules/.bin; runtime compile validation skipped.',
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const relativeSpecPath = (0, utils_js_1.normalizePath)((0, path_1.relative)(testsRoot, testFile));
|
|
49
|
+
if (relativeSpecPath.startsWith('../') || relativeSpecPath.startsWith('..\\')) {
|
|
50
|
+
return {
|
|
51
|
+
status: 'failed',
|
|
52
|
+
detail: 'Generated spec path resolved outside testsRoot during validation.',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const args = ['test', '--list', relativeSpecPath];
|
|
56
|
+
if (pipeline.headless === false) {
|
|
57
|
+
args.push('--headed');
|
|
58
|
+
}
|
|
59
|
+
if (pipeline.project) {
|
|
60
|
+
args.push('--project', pipeline.project);
|
|
61
|
+
}
|
|
62
|
+
const commandResult = (0, process_runner_js_1.runCommand)(playwrightBinary, args, testsRoot);
|
|
63
|
+
if (commandResult.error && /ENOENT/.test(commandResult.error)) {
|
|
64
|
+
return {
|
|
65
|
+
status: 'skipped',
|
|
66
|
+
detail: 'Playwright binary was not executable; runtime compile validation skipped.',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (commandResult.status === 0) {
|
|
70
|
+
return { status: 'passed' };
|
|
71
|
+
}
|
|
72
|
+
const summary = (0, process_runner_js_1.summarizeCommandOutput)(commandResult.stdout, commandResult.stderr);
|
|
73
|
+
return {
|
|
74
|
+
status: 'failed',
|
|
75
|
+
detail: summary || commandResult.error || `playwright --list failed with status ${commandResult.status}`,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -77,7 +77,7 @@ function runPlaywrightSpec(specPath, testsRoot, options) {
|
|
|
77
77
|
if (!(0, fs_1.existsSync)(reportDir)) {
|
|
78
78
|
(0, fs_1.mkdirSync)(reportDir, { recursive: true });
|
|
79
79
|
}
|
|
80
|
-
const reportPath = (0, path_1.join)(reportDir, `report-${Date.now()}.json`);
|
|
80
|
+
const reportPath = (0, path_1.join)(reportDir, `report-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.json`);
|
|
81
81
|
const args = [
|
|
82
82
|
'playwright', 'test',
|
|
83
83
|
specPath,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/analyze.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAyEvG"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runAnalyzeCommand = runAnalyzeCommand;
|
|
6
|
+
const config_js_1 = require("../../agent/config.js");
|
|
7
|
+
const orchestrator_js_1 = require("../../pipeline/orchestrator.js");
|
|
8
|
+
async function runAnalyzeCommand(args, autoConfig) {
|
|
9
|
+
if (!args.path && !autoConfig) {
|
|
10
|
+
console.error('Error: --path is required for analyze command');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
const { config } = (0, config_js_1.resolveConfig)(process.cwd(), autoConfig, {
|
|
14
|
+
path: args.path,
|
|
15
|
+
profile: args.profile,
|
|
16
|
+
testsRoot: args.testsRoot,
|
|
17
|
+
mode: 'impact',
|
|
18
|
+
gitSince: args.gitSince,
|
|
19
|
+
llmProvider: args.llmProvider,
|
|
20
|
+
});
|
|
21
|
+
const testsRoot = config.testsRoot || config.path;
|
|
22
|
+
const analyzeStages = [
|
|
23
|
+
'preprocess', 'impact', 'coverage',
|
|
24
|
+
];
|
|
25
|
+
if (args.analyzeGenerate) {
|
|
26
|
+
analyzeStages.push('generation');
|
|
27
|
+
}
|
|
28
|
+
if (args.analyzeHeal || args.analyzeHealReport) {
|
|
29
|
+
analyzeStages.push('heal');
|
|
30
|
+
}
|
|
31
|
+
const result = await (0, orchestrator_js_1.runPipeline)({
|
|
32
|
+
appPath: config.path,
|
|
33
|
+
testsRoot,
|
|
34
|
+
gitSince: args.gitSince || config.git.since,
|
|
35
|
+
routeFamilies: config.routeFamilies,
|
|
36
|
+
apiSurface: config.apiSurface,
|
|
37
|
+
stages: analyzeStages,
|
|
38
|
+
generation: args.analyzeGenerate
|
|
39
|
+
? {
|
|
40
|
+
defaultOutputDir: args.analyzeGenerateOutputDir || 'specs/functional/ai-assisted',
|
|
41
|
+
dryRun: args.dryRun,
|
|
42
|
+
}
|
|
43
|
+
: undefined,
|
|
44
|
+
heal: (args.analyzeHeal || args.analyzeHealReport)
|
|
45
|
+
? {
|
|
46
|
+
mcp: args.pipelineMcp ?? true,
|
|
47
|
+
mcpAllowFallback: args.pipelineMcpAllowFallback ?? false,
|
|
48
|
+
mcpOnly: args.pipelineMcpOnly ?? false,
|
|
49
|
+
mcpCommandTimeoutMs: args.pipelineMcpTimeoutMs,
|
|
50
|
+
mcpRetries: args.pipelineMcpRetries ?? 1,
|
|
51
|
+
dryRun: args.dryRun,
|
|
52
|
+
}
|
|
53
|
+
: undefined,
|
|
54
|
+
playwrightReportPath: args.analyzeHealReport,
|
|
55
|
+
});
|
|
56
|
+
console.log(`Analyze report: ${result.reportPath}`);
|
|
57
|
+
console.log(`Analyze flows identified: ${result.report.summary.flowsIdentified}`);
|
|
58
|
+
console.log(`Analyze flows covered: ${result.report.summary.flowsCovered}`);
|
|
59
|
+
console.log(`Analyze flows uncovered: ${result.report.summary.flowsUncovered}`);
|
|
60
|
+
console.log(`Analyze overall confidence: ${result.report.summary.overallConfidence}`);
|
|
61
|
+
console.log(`Analyze route families: ${result.report.summary.routeFamiliesImpacted.join(', ') || 'none'}`);
|
|
62
|
+
if (result.generated && result.generated.length > 0) {
|
|
63
|
+
const written = result.generated.filter((g) => g.written).length;
|
|
64
|
+
console.log(`Analyze generated specs: ${result.generated.length} (written=${written})`);
|
|
65
|
+
for (const g of result.generated) {
|
|
66
|
+
console.log(` ${g.mode}: ${g.specPath}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (result.healResult) {
|
|
70
|
+
const healed = result.healResult.summary.results.filter((r) => r.healStatus === 'success').length;
|
|
71
|
+
const healFailed = result.healResult.summary.results.filter((r) => r.healStatus === 'failed').length;
|
|
72
|
+
console.log(`Analyze heal targets: ${result.healResult.targets.length} (healed=${healed}, failed=${healFailed})`);
|
|
73
|
+
}
|
|
74
|
+
if (result.warnings.length > 0) {
|
|
75
|
+
console.log(`Analyze warnings: ${result.warnings.join(' | ')}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/feedback.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAiCzF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runFeedbackCommand = runFeedbackCommand;
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const config_js_1 = require("../../agent/config.js");
|
|
8
|
+
const feedback_js_1 = require("../../agent/feedback.js");
|
|
9
|
+
function runFeedbackCommand(args, autoConfig) {
|
|
10
|
+
if (!args.path && !autoConfig) {
|
|
11
|
+
console.error('Error: --path is required for feedback command');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
if (!args.feedbackInputPath) {
|
|
15
|
+
console.error('Error: --feedback-input <path> is required for feedback command');
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const { config } = (0, config_js_1.resolveConfig)(process.cwd(), autoConfig, {
|
|
19
|
+
path: args.path,
|
|
20
|
+
profile: args.profile,
|
|
21
|
+
testsRoot: args.testsRoot,
|
|
22
|
+
mode: 'impact',
|
|
23
|
+
llmProvider: args.llmProvider,
|
|
24
|
+
});
|
|
25
|
+
const reportRoot = config.testsRoot || config.path;
|
|
26
|
+
const raw = JSON.parse((0, fs_1.readFileSync)(args.feedbackInputPath, 'utf-8'));
|
|
27
|
+
const payload = {
|
|
28
|
+
timestamp: raw.timestamp || new Date().toISOString(),
|
|
29
|
+
runSet: raw.runSet || 'targeted',
|
|
30
|
+
recommendedTests: raw.recommendedTests || [],
|
|
31
|
+
executedTests: raw.executedTests || [],
|
|
32
|
+
failedTests: raw.failedTests || [],
|
|
33
|
+
escapedFailures: raw.escapedFailures || [],
|
|
34
|
+
};
|
|
35
|
+
const output = (0, feedback_js_1.appendFeedbackAndRecompute)(reportRoot, payload);
|
|
36
|
+
console.log(`Feedback data: ${output.feedbackPath}`);
|
|
37
|
+
console.log(`Calibration data: ${output.calibrationPath}`);
|
|
38
|
+
console.log(`Calibration overall: precision=${output.calibration.overall.precision}, recall=${output.calibration.overall.recall}, fnr=${output.calibration.overall.falseNegativeRate}`);
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalize.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/finalize.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAiCzF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runFinalizeCommand = runFinalizeCommand;
|
|
6
|
+
const config_js_1 = require("../../agent/config.js");
|
|
7
|
+
const handoff_js_1 = require("../../agent/handoff.js");
|
|
8
|
+
function runFinalizeCommand(args, autoConfig) {
|
|
9
|
+
if (!args.path && !autoConfig) {
|
|
10
|
+
console.error('Error: --path is required for finalize-generated-tests command');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
const { config } = (0, config_js_1.resolveConfig)(process.cwd(), autoConfig, {
|
|
14
|
+
path: args.path,
|
|
15
|
+
profile: args.profile,
|
|
16
|
+
testsRoot: args.testsRoot,
|
|
17
|
+
mode: 'gap',
|
|
18
|
+
llmProvider: args.llmProvider,
|
|
19
|
+
});
|
|
20
|
+
const result = (0, handoff_js_1.finalizeGeneratedTests)({
|
|
21
|
+
appPath: config.path,
|
|
22
|
+
testsRoot: config.testsRoot || config.path,
|
|
23
|
+
branch: args.branch,
|
|
24
|
+
commitMessage: args.commitMessage,
|
|
25
|
+
createPr: args.createPr,
|
|
26
|
+
prTitle: args.prTitle,
|
|
27
|
+
prBody: args.prBody,
|
|
28
|
+
baseBranch: args.prBase,
|
|
29
|
+
dryRun: args.dryRun,
|
|
30
|
+
});
|
|
31
|
+
console.log(`Finalize repo root: ${result.repoRoot}`);
|
|
32
|
+
console.log(`Finalize branch: ${result.branch}`);
|
|
33
|
+
console.log(`Finalize staged paths: ${result.stagedPaths.join(', ') || 'none'}`);
|
|
34
|
+
console.log(`Finalize commit: ${result.committed ? 'created' : 'skipped'}`);
|
|
35
|
+
if (result.commitSha) {
|
|
36
|
+
console.log(`Finalize commit sha: ${result.commitSha}`);
|
|
37
|
+
}
|
|
38
|
+
if (result.prUrl) {
|
|
39
|
+
console.log(`Finalize PR: ${result.prUrl}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { resolveConfig } from '../../agent/config.js';
|
|
2
|
+
import type { ParsedArgs } from '../types.js';
|
|
3
|
+
export declare function runGenerateCommand(args: ParsedArgs, config: ReturnType<typeof resolveConfig>['config']): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAKzD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA0G5H"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runGenerateCommand = runGenerateCommand;
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const provider_factory_js_1 = require("../../provider_factory.js");
|
|
9
|
+
const runner_js_1 = require("../../agentic/runner.js");
|
|
10
|
+
const api_surface_js_1 = require("../../knowledge/api_surface.js");
|
|
11
|
+
async function runGenerateCommand(args, config) {
|
|
12
|
+
const reportRoot = config.testsRoot || config.path;
|
|
13
|
+
// Load scenarios from --scenarios flag or plan-report.json
|
|
14
|
+
let scenarios = [];
|
|
15
|
+
if (args.generateScenarios) {
|
|
16
|
+
let raw;
|
|
17
|
+
if ((0, fs_1.existsSync)(args.generateScenarios)) {
|
|
18
|
+
raw = JSON.parse((0, fs_1.readFileSync)(args.generateScenarios, 'utf-8'));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
raw = JSON.parse(args.generateScenarios);
|
|
22
|
+
}
|
|
23
|
+
if (!Array.isArray(raw)) {
|
|
24
|
+
console.error('--scenarios must be a JSON array of ScenarioInput objects.');
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
for (const item of raw) {
|
|
28
|
+
if (!item.id || !item.name || !Array.isArray(item.scenarios) || !item.routeFamily || !item.priority) {
|
|
29
|
+
console.error(`Invalid scenario: each must have id, name, scenarios[], routeFamily, priority.`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
scenarios = raw;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// Try plan.json first (written by plan/suggest command), then plan-report.json (legacy)
|
|
37
|
+
const planJsonPath = (0, path_1.join)(reportRoot, '.e2e-ai-agents', 'plan.json');
|
|
38
|
+
const planReportPath = (0, path_1.join)(reportRoot, '.e2e-ai-agents', 'plan-report.json');
|
|
39
|
+
const resolvedPlanPath = (0, fs_1.existsSync)(planJsonPath) ? planJsonPath : (0, fs_1.existsSync)(planReportPath) ? planReportPath : null;
|
|
40
|
+
if (!resolvedPlanPath) {
|
|
41
|
+
console.error('No plan report found. Run `plan` first or pass --scenarios.');
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const planReport = JSON.parse((0, fs_1.readFileSync)(resolvedPlanPath, 'utf-8'));
|
|
45
|
+
scenarios = (planReport.gapDetails || []).map((gap) => ({
|
|
46
|
+
id: gap.id,
|
|
47
|
+
name: gap.id,
|
|
48
|
+
scenarios: gap.missingScenarios || gap.reasons || ['Verify core user flow'],
|
|
49
|
+
routeFamily: gap.id.split('.')[0] || gap.id,
|
|
50
|
+
priority: 'P1',
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
if (scenarios.length === 0) {
|
|
54
|
+
console.log('No scenarios to generate tests for.');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
let apiSurface;
|
|
58
|
+
try {
|
|
59
|
+
apiSurface = (0, api_surface_js_1.loadOrBuildApiSurface)(reportRoot, config.apiSurface);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
console.warn('Could not load API surface catalog. Generation will use generic selectors.');
|
|
63
|
+
}
|
|
64
|
+
const provider = await provider_factory_js_1.LLMProviderFactory.createFromEnv();
|
|
65
|
+
console.log(`Generating tests for ${scenarios.length} scenario(s)...`);
|
|
66
|
+
const summary = await (0, runner_js_1.runAgenticGeneration)({
|
|
67
|
+
scenarios,
|
|
68
|
+
config: {
|
|
69
|
+
maxAttempts: args.maxAttempts || 3,
|
|
70
|
+
project: args.pipelineProject || 'chrome',
|
|
71
|
+
baseUrl: args.pipelineBaseUrl,
|
|
72
|
+
testTimeoutMs: 120000,
|
|
73
|
+
testsRoot: reportRoot,
|
|
74
|
+
dryRun: args.dryRun,
|
|
75
|
+
},
|
|
76
|
+
provider,
|
|
77
|
+
apiSurface,
|
|
78
|
+
});
|
|
79
|
+
console.log(`\nAgentic Generation Summary:`);
|
|
80
|
+
console.log(` Generated: ${summary.totalGenerated}`);
|
|
81
|
+
console.log(` Passed: ${summary.totalPassed}`);
|
|
82
|
+
console.log(` Failed: ${summary.totalFailed}`);
|
|
83
|
+
console.log(` Attempts: ${summary.totalAttempts}`);
|
|
84
|
+
console.log(` Duration: ${(summary.durationMs / 1000).toFixed(1)}s`);
|
|
85
|
+
for (const result of summary.results) {
|
|
86
|
+
const icon = result.status === 'passed' ? 'PASS' : result.status === 'skipped' ? 'SKIP' : 'FAIL';
|
|
87
|
+
console.log(` [${icon}] ${result.scenarioSource} (${result.attempts} attempts)`);
|
|
88
|
+
if (result.status === 'passed' || result.status === 'skipped') {
|
|
89
|
+
console.log(` ${result.specPath}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (summary.warnings.length > 0) {
|
|
93
|
+
console.log(`\nWarnings:`);
|
|
94
|
+
for (const w of summary.warnings) {
|
|
95
|
+
console.warn(` - ${w}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const summaryDir = (0, path_1.join)(reportRoot, '.e2e-ai-agents');
|
|
99
|
+
if (!(0, fs_1.existsSync)(summaryDir)) {
|
|
100
|
+
(0, fs_1.mkdirSync)(summaryDir, { recursive: true });
|
|
101
|
+
}
|
|
102
|
+
const summaryPath = (0, path_1.join)(summaryDir, 'agentic-summary.json');
|
|
103
|
+
(0, fs_1.writeFileSync)(summaryPath, JSON.stringify(summary, null, 2), 'utf-8');
|
|
104
|
+
console.log(`\nReport: ${summaryPath}`);
|
|
105
|
+
if (summary.totalFailed > 0) {
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heal.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/heal.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CA0DrF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runHealCommand = runHealCommand;
|
|
6
|
+
const config_js_1 = require("../../agent/config.js");
|
|
7
|
+
const pipeline_js_1 = require("../../agent/pipeline.js");
|
|
8
|
+
const playwright_report_js_1 = require("../../agent/playwright_report.js");
|
|
9
|
+
function runHealCommand(args, autoConfig) {
|
|
10
|
+
if (!args.path && !autoConfig) {
|
|
11
|
+
console.error('Error: --path is required for heal command');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
if (!args.traceabilityReportPath) {
|
|
15
|
+
console.error('Error: --traceability-report <path> is required for heal command');
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const { config } = (0, config_js_1.resolveConfig)(process.cwd(), autoConfig, {
|
|
19
|
+
path: args.path,
|
|
20
|
+
profile: args.profile,
|
|
21
|
+
testsRoot: args.testsRoot,
|
|
22
|
+
mode: 'gap',
|
|
23
|
+
framework: args.framework,
|
|
24
|
+
pipeline: {
|
|
25
|
+
enabled: true,
|
|
26
|
+
scenarios: args.pipelineScenarios,
|
|
27
|
+
outputDir: args.pipelineOutput,
|
|
28
|
+
baseUrl: args.pipelineBaseUrl,
|
|
29
|
+
browser: args.pipelineBrowser,
|
|
30
|
+
headless: args.pipelineHeadless,
|
|
31
|
+
project: args.pipelineProject,
|
|
32
|
+
parallel: args.pipelineParallel,
|
|
33
|
+
dryRun: args.pipelineDryRun,
|
|
34
|
+
mcp: args.pipelineMcp,
|
|
35
|
+
mcpAllowFallback: args.pipelineMcpAllowFallback,
|
|
36
|
+
mcpOnly: args.pipelineMcpOnly,
|
|
37
|
+
},
|
|
38
|
+
llmProvider: args.llmProvider,
|
|
39
|
+
});
|
|
40
|
+
const reportRoot = config.testsRoot || config.path;
|
|
41
|
+
const unstableSpecs = (0, playwright_report_js_1.extractPlaywrightUnstableSpecs)(args.traceabilityReportPath, [reportRoot, config.path]);
|
|
42
|
+
if (unstableSpecs.length === 0) {
|
|
43
|
+
console.log('Heal targeted unstable specs: 0');
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const targetedSummary = (0, pipeline_js_1.runTargetedSpecHeal)(reportRoot, unstableSpecs.map((spec) => ({
|
|
47
|
+
specPath: spec.specPath,
|
|
48
|
+
status: spec.status,
|
|
49
|
+
reason: `Playwright report: failingTests=${spec.failingTests}, flakyTests=${spec.flakyTests}`,
|
|
50
|
+
})), {
|
|
51
|
+
...config.pipeline,
|
|
52
|
+
enabled: true,
|
|
53
|
+
heal: true,
|
|
54
|
+
});
|
|
55
|
+
const healedCount = targetedSummary.results.filter((result) => result.healStatus === 'success').length;
|
|
56
|
+
console.log(`Heal targeted unstable specs: ${unstableSpecs.length} (healed=${healedCount})`);
|
|
57
|
+
if (targetedSummary.warnings.length > 0) {
|
|
58
|
+
console.log(`Heal warnings: ${targetedSummary.warnings.join(' | ')}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impact.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/impact.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAIzD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAI,CAkB3G"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runImpactCommand = runImpactCommand;
|
|
6
|
+
const git_js_1 = require("../../agent/git.js");
|
|
7
|
+
const impact_engine_js_1 = require("../../engine/impact_engine.js");
|
|
8
|
+
function runImpactCommand(args, config) {
|
|
9
|
+
const reportRoot = config.testsRoot || config.path;
|
|
10
|
+
const gitResult = (0, git_js_1.getChangedFiles)(config.path, config.git.since, { includeUncommitted: config.git.includeUncommitted });
|
|
11
|
+
const impactResult = (0, impact_engine_js_1.analyzeImpact)(gitResult.files, {
|
|
12
|
+
testsRoot: reportRoot,
|
|
13
|
+
routeFamilies: config.routeFamilies,
|
|
14
|
+
});
|
|
15
|
+
console.log(`Impact: ${impactResult.changedFiles.length} changed files → ${impactResult.impactedFeatures.length} features impacted`);
|
|
16
|
+
console.log(`Unbound files: ${impactResult.unboundFiles.length}`);
|
|
17
|
+
for (const f of impactResult.impactedFeatures) {
|
|
18
|
+
const label = f.featureId || f.familyId;
|
|
19
|
+
console.log(` [${f.priority}] ${label}: ${f.coverageStatus} (PW=${f.playwrightSpecs.length}, Cy=${f.cypressSpecs.length})`);
|
|
20
|
+
}
|
|
21
|
+
if (impactResult.warnings.length > 0) {
|
|
22
|
+
for (const w of impactResult.warnings) {
|
|
23
|
+
console.warn(` Warning: ${w}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm_health.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/llm_health.ts"],"names":[],"mappings":"AAMA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA6BlD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runLlmHealth = runLlmHealth;
|
|
6
|
+
const anthropic_provider_js_1 = require("../../anthropic_provider.js");
|
|
7
|
+
const provider_interface_js_1 = require("../../provider_interface.js");
|
|
8
|
+
async function runLlmHealth() {
|
|
9
|
+
if (!process.env.ANTHROPIC_API_KEY) {
|
|
10
|
+
console.error('ANTHROPIC_API_KEY is required for llm-health.');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
const model = process.env.ANTHROPIC_MODEL || 'claude-sonnet-4-5-20250929';
|
|
14
|
+
const provider = new anthropic_provider_js_1.AnthropicProvider({
|
|
15
|
+
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
16
|
+
model,
|
|
17
|
+
});
|
|
18
|
+
try {
|
|
19
|
+
const response = await provider.generateText('Reply with OK.', { maxTokens: 8, timeout: 15000 });
|
|
20
|
+
const text = response.text.trim();
|
|
21
|
+
console.log(`Anthropic OK (${model}) -> ${text}`);
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error instanceof provider_interface_js_1.LLMProviderError) {
|
|
25
|
+
console.error(`Anthropic failed: ${error.message}`);
|
|
26
|
+
if (error.cause instanceof Error) {
|
|
27
|
+
console.error(`Cause: ${error.cause.message}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else if (error instanceof Error) {
|
|
31
|
+
console.error(`Anthropic failed: ${error.message}`);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
console.error(`Anthropic failed: ${String(error)}`);
|
|
35
|
+
}
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { resolveConfig } from '../../agent/config.js';
|
|
2
|
+
import type { ParsedArgs } from '../types.js';
|
|
3
|
+
export declare function runPlanCommand(args: ParsedArgs, autoConfig: string | undefined, config: ReturnType<typeof resolveConfig>['config']): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAIzD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAsB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA4ExJ"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
|
+
// See LICENSE.txt for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runPlanCommand = runPlanCommand;
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const plan_builder_js_1 = require("../../engine/plan_builder.js");
|
|
9
|
+
const api_js_1 = require("../../api.js");
|
|
10
|
+
async function runPlanCommand(args, autoConfig, config) {
|
|
11
|
+
const reportRoot = config.testsRoot || config.path;
|
|
12
|
+
const apiOptions = {
|
|
13
|
+
cwd: process.cwd(),
|
|
14
|
+
configPath: autoConfig,
|
|
15
|
+
path: args.path,
|
|
16
|
+
profile: args.profile,
|
|
17
|
+
testsRoot: args.testsRoot,
|
|
18
|
+
gitSince: args.gitSince,
|
|
19
|
+
llmProvider: args.llmProvider,
|
|
20
|
+
policy: args.policyMinConfidence !== undefined ||
|
|
21
|
+
args.policySafeMergeConfidence !== undefined ||
|
|
22
|
+
args.policyWarningsThreshold !== undefined ||
|
|
23
|
+
(args.policyRiskyPatterns && args.policyRiskyPatterns.length > 0) ||
|
|
24
|
+
args.policyEnforcementMode !== undefined ||
|
|
25
|
+
(args.policyBlockActions && args.policyBlockActions.length > 0)
|
|
26
|
+
? {
|
|
27
|
+
minConfidenceForTargeted: args.policyMinConfidence,
|
|
28
|
+
safeMergeMinConfidence: args.policySafeMergeConfidence,
|
|
29
|
+
forceFullOnWarningsAtOrAbove: args.policyWarningsThreshold,
|
|
30
|
+
riskyFilePatterns: args.policyRiskyPatterns,
|
|
31
|
+
enforcementMode: args.policyEnforcementMode,
|
|
32
|
+
blockOnActions: args.policyBlockActions,
|
|
33
|
+
}
|
|
34
|
+
: undefined,
|
|
35
|
+
};
|
|
36
|
+
let result;
|
|
37
|
+
if (args.noAi) {
|
|
38
|
+
result = (0, api_js_1.recommendTestsDeterministic)(apiOptions);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
result = await (0, api_js_1.recommendTestsAI)(apiOptions);
|
|
42
|
+
if (result.aiEnrichment) {
|
|
43
|
+
const { aiEnrichment } = result;
|
|
44
|
+
console.log(`AI enrichment: ${aiEnrichment.enrichedFeatures.length} features enriched (${aiEnrichment.tokenUsage.input + aiEnrichment.tokenUsage.output} tokens)`);
|
|
45
|
+
}
|
|
46
|
+
else if (!process.env.ANTHROPIC_API_KEY) {
|
|
47
|
+
console.log('Tip: set ANTHROPIC_API_KEY to enable AI-powered enrichment');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const { plan, planPath, ciSummaryMarkdown, ciSummaryPath } = result;
|
|
51
|
+
// Write CI summary to an additional path if --ci-comment-path was specified
|
|
52
|
+
if (args.ciCommentPath) {
|
|
53
|
+
(0, plan_builder_js_1.writeCiSummary)(reportRoot, ciSummaryMarkdown, args.ciCommentPath);
|
|
54
|
+
}
|
|
55
|
+
const summaryPath = ciSummaryPath;
|
|
56
|
+
// Compute metrics paths (api already wrote metrics; derive paths for GHA output)
|
|
57
|
+
const metricsEventsPath = (0, path_1.join)(reportRoot, '.e2e-ai-agents/metrics.jsonl');
|
|
58
|
+
const metricsSummaryPath = (0, path_1.join)(reportRoot, '.e2e-ai-agents/metrics-summary.json');
|
|
59
|
+
const ghaOutput = args.githubOutputPath || process.env.GITHUB_OUTPUT;
|
|
60
|
+
if (ghaOutput) {
|
|
61
|
+
(0, fs_1.appendFileSync)(ghaOutput, `run_set=${plan.runSet}\n`);
|
|
62
|
+
(0, fs_1.appendFileSync)(ghaOutput, `action=${plan.decision.action}\n`);
|
|
63
|
+
(0, fs_1.appendFileSync)(ghaOutput, `confidence=${plan.confidence}\n`);
|
|
64
|
+
(0, fs_1.appendFileSync)(ghaOutput, `enforcement_mode=${plan.enforcement.mode}\n`);
|
|
65
|
+
(0, fs_1.appendFileSync)(ghaOutput, `enforcement_should_fail=${plan.enforcement.shouldFail}\n`);
|
|
66
|
+
(0, fs_1.appendFileSync)(ghaOutput, `recommended_tests_count=${plan.recommendedTests.length}\n`);
|
|
67
|
+
(0, fs_1.appendFileSync)(ghaOutput, `required_new_tests_count=${plan.requiredNewTests.length}\n`);
|
|
68
|
+
(0, fs_1.appendFileSync)(ghaOutput, `plan_path=${planPath}\n`);
|
|
69
|
+
(0, fs_1.appendFileSync)(ghaOutput, `summary_path=${summaryPath}\n`);
|
|
70
|
+
(0, fs_1.appendFileSync)(ghaOutput, `metrics_events_path=${metricsEventsPath}\n`);
|
|
71
|
+
(0, fs_1.appendFileSync)(ghaOutput, `metrics_summary_path=${metricsSummaryPath}\n`);
|
|
72
|
+
}
|
|
73
|
+
console.log(`Suggested run set: ${plan.runSet} (confidence ${plan.confidence})`);
|
|
74
|
+
console.log(`Decision: ${plan.decision.action} - ${plan.decision.summary}`);
|
|
75
|
+
console.log(`Enforcement: ${plan.enforcement.mode} (shouldFail=${plan.enforcement.shouldFail})`);
|
|
76
|
+
console.log(`Plan data: ${planPath}`);
|
|
77
|
+
console.log(`CI summary: ${summaryPath}`);
|
|
78
|
+
console.log(`Plan metrics: ${metricsSummaryPath}`);
|
|
79
|
+
const failOnLegacyFlag = args.failOnMustAddTests && plan.decision.action === 'must-add-tests';
|
|
80
|
+
if (failOnLegacyFlag || plan.enforcement.shouldFail) {
|
|
81
|
+
process.exit(2);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ParsedArgs } from '../types.js';
|
|
2
|
+
export declare function runTraceabilityCaptureCommand(args: ParsedArgs, autoConfig: string | undefined): void;
|
|
3
|
+
export declare function runTraceabilityIngestCommand(args: ParsedArgs, autoConfig: string | undefined): void;
|
|
4
|
+
//# sourceMappingURL=traceability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traceability.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/traceability.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAmCpG;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAqCnG"}
|