@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.
Files changed (93) hide show
  1. package/README.md +112 -584
  2. package/dist/agent/api_catalog.d.ts +11 -0
  3. package/dist/agent/api_catalog.d.ts.map +1 -0
  4. package/dist/agent/api_catalog.js +210 -0
  5. package/dist/agent/llm_agents_flow.d.ts +15 -0
  6. package/dist/agent/llm_agents_flow.d.ts.map +1 -0
  7. package/dist/agent/llm_agents_flow.js +434 -0
  8. package/dist/agent/native_flow.d.ts +6 -0
  9. package/dist/agent/native_flow.d.ts.map +1 -0
  10. package/dist/agent/native_flow.js +179 -0
  11. package/dist/agent/pipeline.d.ts +2 -25
  12. package/dist/agent/pipeline.d.ts.map +1 -1
  13. package/dist/agent/pipeline.js +30 -1329
  14. package/dist/agent/pipeline_types.d.ts +54 -0
  15. package/dist/agent/pipeline_types.d.ts.map +1 -0
  16. package/dist/agent/pipeline_types.js +4 -0
  17. package/dist/agent/pipeline_utils.d.ts +12 -0
  18. package/dist/agent/pipeline_utils.d.ts.map +1 -0
  19. package/dist/agent/pipeline_utils.js +156 -0
  20. package/dist/agent/process_runner.d.ts +10 -0
  21. package/dist/agent/process_runner.d.ts.map +1 -0
  22. package/dist/agent/process_runner.js +92 -0
  23. package/dist/agent/spec_generator.d.ts +5 -0
  24. package/dist/agent/spec_generator.d.ts.map +1 -0
  25. package/dist/agent/spec_generator.js +253 -0
  26. package/dist/agent/validation_runner.d.ts +5 -0
  27. package/dist/agent/validation_runner.d.ts.map +1 -0
  28. package/dist/agent/validation_runner.js +77 -0
  29. package/dist/agentic/playwright_runner.js +1 -1
  30. package/dist/cli/commands/analyze.d.ts +3 -0
  31. package/dist/cli/commands/analyze.d.ts.map +1 -0
  32. package/dist/cli/commands/analyze.js +77 -0
  33. package/dist/cli/commands/feedback.d.ts +3 -0
  34. package/dist/cli/commands/feedback.d.ts.map +1 -0
  35. package/dist/cli/commands/feedback.js +39 -0
  36. package/dist/cli/commands/finalize.d.ts +3 -0
  37. package/dist/cli/commands/finalize.d.ts.map +1 -0
  38. package/dist/cli/commands/finalize.js +41 -0
  39. package/dist/cli/commands/generate.d.ts +4 -0
  40. package/dist/cli/commands/generate.d.ts.map +1 -0
  41. package/dist/cli/commands/generate.js +108 -0
  42. package/dist/cli/commands/heal.d.ts +3 -0
  43. package/dist/cli/commands/heal.d.ts.map +1 -0
  44. package/dist/cli/commands/heal.js +60 -0
  45. package/dist/cli/commands/impact.d.ts +4 -0
  46. package/dist/cli/commands/impact.d.ts.map +1 -0
  47. package/dist/cli/commands/impact.js +26 -0
  48. package/dist/cli/commands/llm_health.d.ts +2 -0
  49. package/dist/cli/commands/llm_health.d.ts.map +1 -0
  50. package/dist/cli/commands/llm_health.js +38 -0
  51. package/dist/cli/commands/plan.d.ts +4 -0
  52. package/dist/cli/commands/plan.d.ts.map +1 -0
  53. package/dist/cli/commands/plan.js +83 -0
  54. package/dist/cli/commands/traceability.d.ts +4 -0
  55. package/dist/cli/commands/traceability.d.ts.map +1 -0
  56. package/dist/cli/commands/traceability.js +77 -0
  57. package/dist/cli/parse_args.d.ts +6 -0
  58. package/dist/cli/parse_args.d.ts.map +1 -0
  59. package/dist/cli/parse_args.js +216 -0
  60. package/dist/cli/types.d.ts +70 -0
  61. package/dist/cli/types.d.ts.map +1 -0
  62. package/dist/cli/types.js +4 -0
  63. package/dist/cli/usage.d.ts +2 -0
  64. package/dist/cli/usage.d.ts.map +1 -0
  65. package/dist/cli/usage.js +86 -0
  66. package/dist/cli.js +26 -1060
  67. package/dist/esm/agent/api_catalog.js +199 -0
  68. package/dist/esm/agent/llm_agents_flow.js +421 -0
  69. package/dist/esm/agent/native_flow.js +175 -0
  70. package/dist/esm/agent/pipeline.js +8 -1307
  71. package/dist/esm/agent/pipeline_types.js +3 -0
  72. package/dist/esm/agent/pipeline_utils.js +146 -0
  73. package/dist/esm/agent/process_runner.js +83 -0
  74. package/dist/esm/agent/spec_generator.js +249 -0
  75. package/dist/esm/agent/validation_runner.js +73 -0
  76. package/dist/esm/agentic/playwright_runner.js +1 -1
  77. package/dist/esm/cli/commands/analyze.js +74 -0
  78. package/dist/esm/cli/commands/feedback.js +36 -0
  79. package/dist/esm/cli/commands/finalize.js +38 -0
  80. package/dist/esm/cli/commands/generate.js +105 -0
  81. package/dist/esm/cli/commands/heal.js +57 -0
  82. package/dist/esm/cli/commands/impact.js +23 -0
  83. package/dist/esm/cli/commands/llm_health.js +35 -0
  84. package/dist/esm/cli/commands/plan.js +80 -0
  85. package/dist/esm/cli/commands/traceability.js +73 -0
  86. package/dist/esm/cli/parse_args.js +210 -0
  87. package/dist/esm/cli/types.js +3 -0
  88. package/dist/esm/cli/usage.js +83 -0
  89. package/dist/esm/cli.js +20 -1054
  90. package/dist/esm/mcp-server.js +18 -1
  91. package/dist/mcp-server.d.ts.map +1 -1
  92. package/dist/mcp-server.js +17 -0
  93. 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.runTraceabilityCaptureCommand = runTraceabilityCaptureCommand;
6
+ exports.runTraceabilityIngestCommand = runTraceabilityIngestCommand;
7
+ const fs_1 = require("fs");
8
+ const config_js_1 = require("../../agent/config.js");
9
+ const traceability_capture_js_1 = require("../../agent/traceability_capture.js");
10
+ const traceability_ingest_js_1 = require("../../agent/traceability_ingest.js");
11
+ function runTraceabilityCaptureCommand(args, autoConfig) {
12
+ if (!args.path && !autoConfig) {
13
+ console.error('Error: --path is required for traceability-capture command');
14
+ process.exit(1);
15
+ }
16
+ if (!args.traceabilityReportPath) {
17
+ console.error('Error: --traceability-report <path> is required for traceability-capture command');
18
+ process.exit(1);
19
+ }
20
+ const { config } = (0, config_js_1.resolveConfig)(process.cwd(), autoConfig, {
21
+ path: args.path,
22
+ profile: args.profile,
23
+ testsRoot: args.testsRoot,
24
+ mode: 'impact',
25
+ gitSince: args.gitSince,
26
+ llmProvider: args.llmProvider,
27
+ });
28
+ const reportRoot = config.testsRoot || config.path;
29
+ const output = (0, traceability_capture_js_1.captureTraceabilityInput)({
30
+ appPath: config.path,
31
+ testsRoot: reportRoot,
32
+ reportPath: args.traceabilityReportPath,
33
+ sinceRef: args.gitSince || config.git.since,
34
+ outputPath: args.traceabilityCaptureOutputPath,
35
+ coverageMapPath: args.traceabilityCoverageMapPath,
36
+ changedFilesPath: args.traceabilityChangedFilesPath,
37
+ });
38
+ console.log(`Traceability input: ${output.outputPath}`);
39
+ console.log(`Traceability tests seen: ${output.testsSeen}`);
40
+ console.log(`Traceability runs generated: ${output.runsGenerated}`);
41
+ console.log(`Traceability changed files used: ${output.changedFilesUsed}`);
42
+ if (output.warnings.length > 0) {
43
+ console.log(`Traceability warnings: ${output.warnings.join(' | ')}`);
44
+ }
45
+ }
46
+ function runTraceabilityIngestCommand(args, autoConfig) {
47
+ if (!args.path && !autoConfig) {
48
+ console.error('Error: --path is required for traceability-ingest command');
49
+ process.exit(1);
50
+ }
51
+ if (!args.traceabilityInputPath) {
52
+ console.error('Error: --traceability-input <path> is required for traceability-ingest command');
53
+ process.exit(1);
54
+ }
55
+ const { config } = (0, config_js_1.resolveConfig)(process.cwd(), autoConfig, {
56
+ path: args.path,
57
+ profile: args.profile,
58
+ testsRoot: args.testsRoot,
59
+ mode: 'impact',
60
+ llmProvider: args.llmProvider,
61
+ });
62
+ const reportRoot = config.testsRoot || config.path;
63
+ const raw = JSON.parse((0, fs_1.readFileSync)(args.traceabilityInputPath, 'utf-8'));
64
+ const output = (0, traceability_ingest_js_1.ingestTraceabilityInput)(reportRoot, config.impact.traceability, raw, {
65
+ minHits: args.traceabilityMinHits,
66
+ maxFilesPerTest: args.traceabilityMaxFilesPerTest,
67
+ maxAgeDays: args.traceabilityMaxAgeDays,
68
+ });
69
+ console.log(`Traceability manifest: ${output.manifestPath}`);
70
+ console.log(`Traceability state: ${output.statePath}`);
71
+ console.log(`Traceability ingested entries: ${output.entriesIngested}`);
72
+ console.log(`Traceability tracked tests: ${output.testsTracked}`);
73
+ console.log(`Traceability tracked edges: ${output.edgesTracked}`);
74
+ if (output.warnings.length > 0) {
75
+ console.log(`Traceability warnings: ${output.warnings.join(' | ')}`);
76
+ }
77
+ }
@@ -0,0 +1,6 @@
1
+ import type { ParsedArgs } from './types.js';
2
+ export declare const CONFIG_CANDIDATES: string[];
3
+ export declare function findConfigUpwards(startDir: string | undefined): string | undefined;
4
+ export declare function resolveAutoConfig(args: ParsedArgs): string | undefined;
5
+ export declare function parseArgs(argv: string[]): ParsedArgs;
6
+ //# sourceMappingURL=parse_args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse_args.d.ts","sourceRoot":"","sources":["../../src/cli/parse_args.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAU,UAAU,EAAC,MAAM,YAAY,CAAC;AAEpD,eAAO,MAAM,iBAAiB,UAA8D,CAAC;AAE7F,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAmBlF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAmBtE;AAqID,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA4EpD"}
@@ -0,0 +1,216 @@
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.CONFIG_CANDIDATES = void 0;
6
+ exports.findConfigUpwards = findConfigUpwards;
7
+ exports.resolveAutoConfig = resolveAutoConfig;
8
+ exports.parseArgs = parseArgs;
9
+ const fs_1 = require("fs");
10
+ const path_1 = require("path");
11
+ exports.CONFIG_CANDIDATES = ['e2e-ai-agents.config.json', '.e2e-ai-agents.config.json'];
12
+ function findConfigUpwards(startDir) {
13
+ if (!startDir) {
14
+ return undefined;
15
+ }
16
+ let current = (0, path_1.resolve)(startDir);
17
+ while (true) {
18
+ for (const candidate of exports.CONFIG_CANDIDATES) {
19
+ const fullPath = (0, path_1.join)(current, candidate);
20
+ if ((0, fs_1.existsSync)(fullPath)) {
21
+ return fullPath;
22
+ }
23
+ }
24
+ const parent = (0, path_1.dirname)(current);
25
+ if (parent === current) {
26
+ break;
27
+ }
28
+ current = parent;
29
+ }
30
+ return undefined;
31
+ }
32
+ function resolveAutoConfig(args) {
33
+ if (args.configPath) {
34
+ return args.configPath;
35
+ }
36
+ const searchRoots = [
37
+ process.cwd(),
38
+ args.testsRoot,
39
+ args.path,
40
+ ].filter(Boolean);
41
+ for (const root of searchRoots) {
42
+ const found = findConfigUpwards(root);
43
+ if (found) {
44
+ return found;
45
+ }
46
+ }
47
+ return undefined;
48
+ }
49
+ const csvSplit = (v) => v.split(',').map((s) => s.trim()).filter(Boolean);
50
+ // prettier-ignore
51
+ const FLAGS = {
52
+ // -- boolean flags --
53
+ '--help': { key: 'help', type: 'boolean', aliases: ['-h'] },
54
+ '--apply': { key: 'apply', type: 'boolean' },
55
+ '--allow-fallback': { key: 'allowFallback', type: 'boolean' },
56
+ '--pipeline': { key: 'pipeline', type: 'boolean' },
57
+ '--pipeline-mcp': { key: 'pipelineMcp', type: 'boolean' },
58
+ '--pipeline-mcp-allow-fallback': { key: 'pipelineMcpAllowFallback', type: 'boolean' },
59
+ '--pipeline-mcp-only': { key: 'pipelineMcpOnly', type: 'boolean' },
60
+ '--pipeline-headless': { key: 'pipelineHeadless', type: 'boolean' },
61
+ '--pipeline-headed': { key: 'pipelineHeadless', type: 'boolean-false' },
62
+ '--pipeline-parallel': { key: 'pipelineParallel', type: 'boolean' },
63
+ '--pipeline-dry-run': { key: 'pipelineDryRun', type: 'boolean' },
64
+ '--fail-on-must-add-tests': { key: 'failOnMustAddTests', type: 'boolean' },
65
+ '--create-pr': { key: 'createPr', type: 'boolean' },
66
+ '--dry-run': { key: 'dryRun', type: 'boolean' },
67
+ '--generate': { key: 'analyzeGenerate', type: 'boolean' },
68
+ '--heal': { key: 'analyzeHeal', type: 'boolean' },
69
+ '--no-ai': { key: 'noAi', type: 'boolean' },
70
+ '--mattermost': { key: 'profile', type: 'boolean', transform: () => 'mattermost' },
71
+ // -- string flags --
72
+ '--config': { key: 'configPath', type: 'string' },
73
+ '--path': { key: 'path', type: 'string' },
74
+ '--tests-root': { key: 'testsRoot', type: 'string' },
75
+ '--framework': { key: 'framework', type: 'string', transform: (v) => v },
76
+ '--scenarios': { key: 'generateScenarios', type: 'string' },
77
+ '--pipeline-output': { key: 'pipelineOutput', type: 'string' },
78
+ '--pipeline-base-url': { key: 'pipelineBaseUrl', type: 'string' },
79
+ '--pipeline-project': { key: 'pipelineProject', type: 'string' },
80
+ '--spec': { key: 'specPDF', type: 'string' },
81
+ '--since': { key: 'gitSince', type: 'string' },
82
+ '--llm-provider': { key: 'llmProvider', type: 'string' },
83
+ '--ci-comment-path': { key: 'ciCommentPath', type: 'string' },
84
+ '--github-output': { key: 'githubOutputPath', type: 'string' },
85
+ '--feedback-input': { key: 'feedbackInputPath', type: 'string' },
86
+ '--traceability-report': { key: 'traceabilityReportPath', type: 'string' },
87
+ '--traceability-capture-output': { key: 'traceabilityCaptureOutputPath', type: 'string' },
88
+ '--traceability-coverage-map': { key: 'traceabilityCoverageMapPath', type: 'string' },
89
+ '--traceability-changed-files': { key: 'traceabilityChangedFilesPath', type: 'string' },
90
+ '--traceability-input': { key: 'traceabilityInputPath', type: 'string' },
91
+ '--branch': { key: 'branch', type: 'string' },
92
+ '--commit-message': { key: 'commitMessage', type: 'string' },
93
+ '--pr-title': { key: 'prTitle', type: 'string' },
94
+ '--pr-body': { key: 'prBody', type: 'string' },
95
+ '--pr-base': { key: 'prBase', type: 'string' },
96
+ '--generate-output': { key: 'analyzeGenerateOutputDir', type: 'string' },
97
+ '--heal-report': { key: 'analyzeHealReport', type: 'string' },
98
+ '--flow-catalog': { key: 'flowCatalogPath', type: 'string' },
99
+ // -- number flags (with isFinite guard) --
100
+ '--pipeline-scenarios': { key: 'pipelineScenarios', type: 'number' },
101
+ '--time': { key: 'timeLimitMinutes', type: 'number' },
102
+ '--budget-usd': { key: 'budgetUSD', type: 'number' },
103
+ '--budget-tokens': { key: 'budgetTokens', type: 'number' },
104
+ '--policy-min-confidence': { key: 'policyMinConfidence', type: 'number' },
105
+ '--policy-safe-merge-confidence': { key: 'policySafeMergeConfidence', type: 'number' },
106
+ '--policy-force-full-on-warnings': { key: 'policyWarningsThreshold', type: 'number' },
107
+ '--traceability-min-hits': { key: 'traceabilityMinHits', type: 'number' },
108
+ '--traceability-max-files-per-test': { key: 'traceabilityMaxFilesPerTest', type: 'number' },
109
+ '--traceability-max-age-days': { key: 'traceabilityMaxAgeDays', type: 'number' },
110
+ // -- number-raw flags (no isFinite guard, assigned directly via Number()) --
111
+ '--max-attempts': { key: 'maxAttempts', type: 'number-raw', transform: (v) => parseInt(v, 10) },
112
+ '--pipeline-mcp-timeout-ms': { key: 'pipelineMcpTimeoutMs', type: 'number-raw' },
113
+ '--pipeline-mcp-retries': { key: 'pipelineMcpRetries', type: 'number-raw' },
114
+ // -- enum flags --
115
+ '--profile': { key: 'profile', type: 'enum', enumValues: ['default', 'mattermost'] },
116
+ '--pipeline-browser': { key: 'pipelineBrowser', type: 'enum', enumValues: ['chrome', 'chromium', 'firefox', 'webkit'] },
117
+ '--policy-enforcement-mode': { key: 'policyEnforcementMode', type: 'enum', enumValues: ['advisory', 'warn', 'block'] },
118
+ // -- csv flags --
119
+ '--patterns': { key: 'testPatterns', type: 'csv' },
120
+ '--flow-patterns': { key: 'flowPatterns', type: 'csv' },
121
+ '--flow-exclude': { key: 'flowExclude', type: 'csv' },
122
+ '--policy-risky-patterns': { key: 'policyRiskyPatterns', type: 'csv' },
123
+ '--policy-block-actions': {
124
+ key: 'policyBlockActions',
125
+ type: 'csv',
126
+ transform: (v) => csvSplit(v).filter((s) => s === 'run-now' || s === 'must-add-tests' || s === 'safe-to-merge'),
127
+ },
128
+ };
129
+ // Build a lookup from alias -> canonical flag name
130
+ const ALIAS_MAP = {};
131
+ for (const [flag, def] of Object.entries(FLAGS)) {
132
+ ALIAS_MAP[flag] = flag;
133
+ if (def.aliases) {
134
+ for (const alias of def.aliases) {
135
+ ALIAS_MAP[alias] = flag;
136
+ }
137
+ }
138
+ }
139
+ const COMMANDS = new Set([
140
+ 'impact', 'plan', 'heal', 'suggest', 'generate',
141
+ 'finalize-generated-tests', 'feedback',
142
+ 'traceability-capture', 'traceability-ingest',
143
+ 'analyze', 'llm-health',
144
+ ]);
145
+ // ---------------------------------------------------------------------------
146
+ // Parser
147
+ // ---------------------------------------------------------------------------
148
+ function setField(obj, key, value) {
149
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
+ obj[key] = value;
151
+ }
152
+ function parseArgs(argv) {
153
+ const parsed = { apply: false, help: false };
154
+ if (argv.length === 0) {
155
+ return parsed;
156
+ }
157
+ const command = argv[0];
158
+ if (COMMANDS.has(command)) {
159
+ parsed.command = command;
160
+ }
161
+ for (let i = 1; i < argv.length; i += 1) {
162
+ const arg = argv[i];
163
+ const canonical = ALIAS_MAP[arg];
164
+ if (!canonical) {
165
+ continue;
166
+ }
167
+ const def = FLAGS[canonical];
168
+ const next = argv[i + 1];
169
+ switch (def.type) {
170
+ case 'boolean':
171
+ setField(parsed, def.key, def.transform ? def.transform('') : true);
172
+ break;
173
+ case 'boolean-false':
174
+ setField(parsed, def.key, false);
175
+ break;
176
+ case 'string':
177
+ if (next) {
178
+ setField(parsed, def.key, def.transform ? def.transform(next) : next);
179
+ i += 1;
180
+ }
181
+ break;
182
+ case 'number':
183
+ if (next) {
184
+ const value = Number(next);
185
+ if (Number.isFinite(value)) {
186
+ setField(parsed, def.key, value);
187
+ }
188
+ i += 1;
189
+ }
190
+ break;
191
+ case 'number-raw':
192
+ if (next) {
193
+ setField(parsed, def.key, def.transform ? def.transform(next) : Number(next));
194
+ i += 1;
195
+ }
196
+ break;
197
+ case 'csv':
198
+ if (next) {
199
+ setField(parsed, def.key, def.transform ? def.transform(next) : csvSplit(next));
200
+ i += 1;
201
+ }
202
+ break;
203
+ case 'enum':
204
+ if (next) {
205
+ if (def.enumValues.includes(next)) {
206
+ setField(parsed, def.key, next);
207
+ }
208
+ i += 1;
209
+ }
210
+ break;
211
+ default:
212
+ break;
213
+ }
214
+ }
215
+ return parsed;
216
+ }
@@ -0,0 +1,70 @@
1
+ import type { AnalysisProfile, FrameworkType } from '../agent/config.js';
2
+ export type Command = 'impact' | 'plan' | 'heal' | 'suggest' | 'generate' | 'finalize-generated-tests' | 'feedback' | 'traceability-capture' | 'traceability-ingest' | 'analyze' | 'llm-health';
3
+ export interface ParsedArgs {
4
+ command?: Command;
5
+ configPath?: string;
6
+ path?: string;
7
+ profile?: AnalysisProfile;
8
+ testsRoot?: string;
9
+ framework?: FrameworkType;
10
+ timeLimitMinutes?: number;
11
+ budgetUSD?: number;
12
+ budgetTokens?: number;
13
+ llmProvider?: string;
14
+ testPatterns?: string[];
15
+ flowPatterns?: string[];
16
+ flowExclude?: string[];
17
+ flowCatalogPath?: string;
18
+ specPDF?: string;
19
+ gitSince?: string;
20
+ allowFallback?: boolean;
21
+ pipeline?: boolean;
22
+ pipelineScenarios?: number;
23
+ pipelineOutput?: string;
24
+ pipelineBaseUrl?: string;
25
+ pipelineBrowser?: 'chrome' | 'chromium' | 'firefox' | 'webkit';
26
+ pipelineHeadless?: boolean;
27
+ pipelineProject?: string;
28
+ pipelineParallel?: boolean;
29
+ pipelineDryRun?: boolean;
30
+ pipelineMcp?: boolean;
31
+ pipelineMcpAllowFallback?: boolean;
32
+ pipelineMcpOnly?: boolean;
33
+ pipelineMcpTimeoutMs?: number;
34
+ pipelineMcpRetries?: number;
35
+ policyMinConfidence?: number;
36
+ policySafeMergeConfidence?: number;
37
+ policyWarningsThreshold?: number;
38
+ policyRiskyPatterns?: string[];
39
+ policyEnforcementMode?: 'advisory' | 'warn' | 'block';
40
+ policyBlockActions?: Array<'run-now' | 'must-add-tests' | 'safe-to-merge'>;
41
+ ciCommentPath?: string;
42
+ githubOutputPath?: string;
43
+ failOnMustAddTests?: boolean;
44
+ feedbackInputPath?: string;
45
+ traceabilityReportPath?: string;
46
+ traceabilityCaptureOutputPath?: string;
47
+ traceabilityCoverageMapPath?: string;
48
+ traceabilityChangedFilesPath?: string;
49
+ traceabilityInputPath?: string;
50
+ traceabilityMinHits?: number;
51
+ traceabilityMaxFilesPerTest?: number;
52
+ traceabilityMaxAgeDays?: number;
53
+ branch?: string;
54
+ commitMessage?: string;
55
+ createPr?: boolean;
56
+ prTitle?: string;
57
+ prBody?: string;
58
+ prBase?: string;
59
+ dryRun?: boolean;
60
+ apply: boolean;
61
+ help: boolean;
62
+ analyzeGenerate?: boolean;
63
+ analyzeGenerateOutputDir?: string;
64
+ analyzeHeal?: boolean;
65
+ analyzeHealReport?: string;
66
+ noAi?: boolean;
67
+ maxAttempts?: number;
68
+ generateScenarios?: string;
69
+ }
70
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cli/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEvE,MAAM,MAAM,OAAO,GACf,QAAQ,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,0BAA0B,GAC1B,UAAU,GACV,sBAAsB,GACtB,qBAAqB,GACrB,SAAS,GACT,YAAY,CAAC;AAEnB,MAAM,WAAW,UAAU;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAA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c. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export declare function printUsage(): void;
2
+ //# sourceMappingURL=usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/cli/usage.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,IAAI,IAAI,CAkFjC"}
@@ -0,0 +1,86 @@
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.printUsage = printUsage;
6
+ function printUsage() {
7
+ console.log([
8
+ 'Usage:',
9
+ ' e2e-ai-agents impact --path <app-root> [options]',
10
+ ' e2e-ai-agents plan --path <app-root> [options]',
11
+ ' e2e-ai-agents suggest --path <app-root> [options]',
12
+ ' e2e-ai-agents heal --path <app-root> --traceability-report <json> [options]',
13
+ ' e2e-ai-agents finalize-generated-tests --path <app-root> [options]',
14
+ ' e2e-ai-agents feedback --path <app-root> --feedback-input <json>',
15
+ ' e2e-ai-agents traceability-capture --path <app-root> --traceability-report <json>',
16
+ ' e2e-ai-agents traceability-ingest --path <app-root> --traceability-input <json>',
17
+ ' e2e-ai-agents generate [--scenarios <path|json>] [--max-attempts <n>] [--dry-run]',
18
+ ' e2e-ai-agents analyze --path <app-root> [--tests-root <path>] [--since <ref>] [--generate] [--generate-output <dir>] [--heal] [--heal-report <json>]',
19
+ ' e2e-ai-agents llm-health',
20
+ '',
21
+ 'Options:',
22
+ ' --config <path> Path to e2e-ai-agents.config.json (auto-discovered if present)',
23
+ ' --path <app-root> Path to the web app (required)',
24
+ ' --profile <name> default | mattermost',
25
+ ' --mattermost Shortcut for --profile mattermost',
26
+ ' --tests-root <path> Path to tests root (optional)',
27
+ ' --framework <name> auto | playwright | cypress | selenium',
28
+ ' --patterns <globs> Comma-separated test patterns',
29
+ ' --flow-patterns <g> Comma-separated flow discovery patterns',
30
+ ' --flow-exclude <g> Comma-separated flow exclude patterns',
31
+ ' --flow-catalog <path> Path to flow catalog JSON',
32
+ ' --allow-fallback Allow impact analysis without diff',
33
+ ' --pipeline Run Playwright AI pipeline for missing P0/P1 flows',
34
+ ' --pipeline-scenarios Number of scenarios per flow (default 3)',
35
+ ' --pipeline-output Output directory for generated tests',
36
+ ' --pipeline-base-url Base URL for Playwright runs',
37
+ ' --pipeline-browser Browser: chrome|chromium|firefox|webkit',
38
+ ' --pipeline-headless Run in headless mode',
39
+ ' --pipeline-headed Run in headed mode',
40
+ ' --pipeline-project Playwright project name',
41
+ ' --pipeline-parallel Enable parallel mode in generator',
42
+ ' --pipeline-dry-run Do not execute pipeline (report only)',
43
+ ' --pipeline-mcp Use Playwright MCP server for exploration/healing',
44
+ ' --pipeline-mcp-allow-fallback Allow non-MCP fallback if official MCP setup fails',
45
+ ' --pipeline-mcp-only Require MCP for UI exploration (fail if unavailable)',
46
+ ' --pipeline-mcp-timeout-ms <n> Timeout per MCP CLI invocation in milliseconds',
47
+ ' --pipeline-mcp-retries <n> Retry count for retryable MCP CLI failures',
48
+ ' --spec <path> Optional spec PDF for context',
49
+ ' --since <git-ref> Git ref for impact analysis (default HEAD~1)',
50
+ ' --time <minutes> Time limit in minutes',
51
+ ' --budget-usd <amount> Max LLM budget in USD',
52
+ ' --budget-tokens <n> Max LLM tokens',
53
+ ' --llm-provider <name> LLM provider: auto | anthropic | openai | ollama',
54
+ ' --policy-min-confidence <n> Minimum confidence for targeted suite',
55
+ ' --policy-safe-merge-confidence <n> Confidence needed for safe-to-merge',
56
+ ' --policy-force-full-on-warnings <n> Escalate to full at warning count',
57
+ ' --policy-risky-patterns <globs> Comma-separated risky file globs',
58
+ ' --policy-enforcement-mode <mode> advisory | warn | block',
59
+ ' --policy-block-actions <actions> Comma-separated CI actions to block/warn',
60
+ ' --ci-comment-path <path> Write CI markdown summary',
61
+ ' --github-output <path> Write GitHub Actions outputs',
62
+ ' --fail-on-must-add-tests Exit non-zero on must-add-tests decision',
63
+ ' --feedback-input <path> Path to recommendation feedback JSON',
64
+ ' --traceability-report <path> Path to Playwright JSON report for traceability capture',
65
+ ' --traceability-capture-output <path> Output path for generated traceability ingest JSON',
66
+ ' --traceability-coverage-map <path> Optional coverage map (test<->files) to enrich traceability capture',
67
+ ' --traceability-changed-files <path> Optional changed-files list/JSON fallback for traceability capture',
68
+ ' --traceability-input <path> Path to traceability ingest JSON payload',
69
+ ' --traceability-min-hits <n> Minimum signal hits required per file mapping',
70
+ ' --traceability-max-files-per-test <n> Cap max mapped files per test',
71
+ ' --traceability-max-age-days <n> Drop stale mappings older than N days',
72
+ ' --branch <name> Optional handoff branch (prefixed with codex/)',
73
+ ' --commit-message <m> Commit message for finalize-generated-tests',
74
+ ' --create-pr Open PR with gh after commit',
75
+ ' --pr-title <title> PR title for finalize-generated-tests',
76
+ ' --pr-body <body> PR body for finalize-generated-tests',
77
+ ' --pr-base <branch> PR base branch for finalize-generated-tests',
78
+ ' (auto-heal-pr defaults to base=master)',
79
+ ' --dry-run Preview actions without mutating git state',
80
+ ' --max-attempts <n> Max fix attempts per scenario (default: 3)',
81
+ ' --scenarios <path|json> Scenarios file/JSON for generate command',
82
+ ' --apply Apply data-testid patches and generate tests',
83
+ ' (legacy shortcut; prefer approve-and-generate)',
84
+ ' --help Show help',
85
+ ].join('\n'));
86
+ }