@yasserkhanorg/e2e-agents 0.3.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.
Files changed (221) hide show
  1. package/LICENSE +168 -0
  2. package/README.md +620 -0
  3. package/dist/agent/analysis.d.ts +62 -0
  4. package/dist/agent/analysis.d.ts.map +1 -0
  5. package/dist/agent/analysis.js +292 -0
  6. package/dist/agent/blast_radius.d.ts +4 -0
  7. package/dist/agent/blast_radius.d.ts.map +1 -0
  8. package/dist/agent/blast_radius.js +37 -0
  9. package/dist/agent/cache_utils.d.ts +38 -0
  10. package/dist/agent/cache_utils.d.ts.map +1 -0
  11. package/dist/agent/cache_utils.js +67 -0
  12. package/dist/agent/config.d.ts +148 -0
  13. package/dist/agent/config.d.ts.map +1 -0
  14. package/dist/agent/config.js +640 -0
  15. package/dist/agent/dependency_graph.d.ts +14 -0
  16. package/dist/agent/dependency_graph.d.ts.map +1 -0
  17. package/dist/agent/dependency_graph.js +227 -0
  18. package/dist/agent/feedback.d.ts +55 -0
  19. package/dist/agent/feedback.d.ts.map +1 -0
  20. package/dist/agent/feedback.js +257 -0
  21. package/dist/agent/flags.d.ts +23 -0
  22. package/dist/agent/flags.d.ts.map +1 -0
  23. package/dist/agent/flags.js +171 -0
  24. package/dist/agent/flow_catalog.d.ts +25 -0
  25. package/dist/agent/flow_catalog.d.ts.map +1 -0
  26. package/dist/agent/flow_catalog.js +106 -0
  27. package/dist/agent/flow_mapping.d.ts +10 -0
  28. package/dist/agent/flow_mapping.d.ts.map +1 -0
  29. package/dist/agent/flow_mapping.js +84 -0
  30. package/dist/agent/framework.d.ts +13 -0
  31. package/dist/agent/framework.d.ts.map +1 -0
  32. package/dist/agent/framework.js +149 -0
  33. package/dist/agent/gap_suggestions.d.ts +14 -0
  34. package/dist/agent/gap_suggestions.d.ts.map +1 -0
  35. package/dist/agent/gap_suggestions.js +101 -0
  36. package/dist/agent/generator.d.ts +10 -0
  37. package/dist/agent/generator.d.ts.map +1 -0
  38. package/dist/agent/generator.js +115 -0
  39. package/dist/agent/git.d.ts +11 -0
  40. package/dist/agent/git.d.ts.map +1 -0
  41. package/dist/agent/git.js +90 -0
  42. package/dist/agent/handoff.d.ts +22 -0
  43. package/dist/agent/handoff.d.ts.map +1 -0
  44. package/dist/agent/handoff.js +180 -0
  45. package/dist/agent/impact-analyzer.d.ts +114 -0
  46. package/dist/agent/impact-analyzer.d.ts.map +1 -0
  47. package/dist/agent/impact-analyzer.js +557 -0
  48. package/dist/agent/index.d.ts +21 -0
  49. package/dist/agent/index.d.ts.map +1 -0
  50. package/dist/agent/index.js +38 -0
  51. package/dist/agent/model-router.d.ts +57 -0
  52. package/dist/agent/model-router.d.ts.map +1 -0
  53. package/dist/agent/model-router.js +154 -0
  54. package/dist/agent/operational_insights.d.ts +41 -0
  55. package/dist/agent/operational_insights.d.ts.map +1 -0
  56. package/dist/agent/operational_insights.js +126 -0
  57. package/dist/agent/pipeline.d.ts +23 -0
  58. package/dist/agent/pipeline.d.ts.map +1 -0
  59. package/dist/agent/pipeline.js +609 -0
  60. package/dist/agent/plan.d.ts +91 -0
  61. package/dist/agent/plan.d.ts.map +1 -0
  62. package/dist/agent/plan.js +331 -0
  63. package/dist/agent/playwright_report.d.ts +8 -0
  64. package/dist/agent/playwright_report.d.ts.map +1 -0
  65. package/dist/agent/playwright_report.js +126 -0
  66. package/dist/agent/report-generator.d.ts +24 -0
  67. package/dist/agent/report-generator.d.ts.map +1 -0
  68. package/dist/agent/report-generator.js +250 -0
  69. package/dist/agent/report.d.ts +81 -0
  70. package/dist/agent/report.d.ts.map +1 -0
  71. package/dist/agent/report.js +147 -0
  72. package/dist/agent/runner.d.ts +7 -0
  73. package/dist/agent/runner.d.ts.map +1 -0
  74. package/dist/agent/runner.js +576 -0
  75. package/dist/agent/selectors.d.ts +10 -0
  76. package/dist/agent/selectors.d.ts.map +1 -0
  77. package/dist/agent/selectors.js +75 -0
  78. package/dist/agent/spec-bridge.d.ts +101 -0
  79. package/dist/agent/spec-bridge.d.ts.map +1 -0
  80. package/dist/agent/spec-bridge.js +273 -0
  81. package/dist/agent/spec-builder.d.ts +102 -0
  82. package/dist/agent/spec-builder.d.ts.map +1 -0
  83. package/dist/agent/spec-builder.js +273 -0
  84. package/dist/agent/subsystem_risk.d.ts +23 -0
  85. package/dist/agent/subsystem_risk.d.ts.map +1 -0
  86. package/dist/agent/subsystem_risk.js +207 -0
  87. package/dist/agent/telemetry.d.ts +84 -0
  88. package/dist/agent/telemetry.d.ts.map +1 -0
  89. package/dist/agent/telemetry.js +220 -0
  90. package/dist/agent/test_path.d.ts +2 -0
  91. package/dist/agent/test_path.d.ts.map +1 -0
  92. package/dist/agent/test_path.js +23 -0
  93. package/dist/agent/tests.d.ts +18 -0
  94. package/dist/agent/tests.d.ts.map +1 -0
  95. package/dist/agent/tests.js +106 -0
  96. package/dist/agent/traceability.d.ts +22 -0
  97. package/dist/agent/traceability.d.ts.map +1 -0
  98. package/dist/agent/traceability.js +183 -0
  99. package/dist/agent/traceability_capture.d.ts +18 -0
  100. package/dist/agent/traceability_capture.d.ts.map +1 -0
  101. package/dist/agent/traceability_capture.js +313 -0
  102. package/dist/agent/traceability_ingest.d.ts +21 -0
  103. package/dist/agent/traceability_ingest.d.ts.map +1 -0
  104. package/dist/agent/traceability_ingest.js +237 -0
  105. package/dist/agent/utils.d.ts +13 -0
  106. package/dist/agent/utils.d.ts.map +1 -0
  107. package/dist/agent/utils.js +152 -0
  108. package/dist/agent/validators/selector-validator.d.ts +74 -0
  109. package/dist/agent/validators/selector-validator.d.ts.map +1 -0
  110. package/dist/agent/validators/selector-validator.js +165 -0
  111. package/dist/anthropic_provider.d.ts +65 -0
  112. package/dist/anthropic_provider.d.ts.map +1 -0
  113. package/dist/anthropic_provider.js +332 -0
  114. package/dist/api.d.ts +48 -0
  115. package/dist/api.d.ts.map +1 -0
  116. package/dist/api.js +113 -0
  117. package/dist/base_provider.d.ts +53 -0
  118. package/dist/base_provider.d.ts.map +1 -0
  119. package/dist/base_provider.js +81 -0
  120. package/dist/cli.d.ts +3 -0
  121. package/dist/cli.d.ts.map +1 -0
  122. package/dist/cli.js +843 -0
  123. package/dist/custom_provider.d.ts +20 -0
  124. package/dist/custom_provider.d.ts.map +1 -0
  125. package/dist/custom_provider.js +276 -0
  126. package/dist/e2e-test-gen/index.d.ts +51 -0
  127. package/dist/e2e-test-gen/index.d.ts.map +1 -0
  128. package/dist/e2e-test-gen/index.js +57 -0
  129. package/dist/e2e-test-gen/spec_parser.d.ts +142 -0
  130. package/dist/e2e-test-gen/spec_parser.d.ts.map +1 -0
  131. package/dist/e2e-test-gen/spec_parser.js +786 -0
  132. package/dist/e2e-test-gen/types.d.ts +185 -0
  133. package/dist/e2e-test-gen/types.d.ts.map +1 -0
  134. package/dist/e2e-test-gen/types.js +4 -0
  135. package/dist/esm/agent/analysis.js +287 -0
  136. package/dist/esm/agent/blast_radius.js +34 -0
  137. package/dist/esm/agent/cache_utils.js +63 -0
  138. package/dist/esm/agent/config.js +637 -0
  139. package/dist/esm/agent/dependency_graph.js +224 -0
  140. package/dist/esm/agent/feedback.js +253 -0
  141. package/dist/esm/agent/flags.js +160 -0
  142. package/dist/esm/agent/flow_catalog.js +103 -0
  143. package/dist/esm/agent/flow_mapping.js +81 -0
  144. package/dist/esm/agent/framework.js +145 -0
  145. package/dist/esm/agent/gap_suggestions.js +98 -0
  146. package/dist/esm/agent/generator.js +112 -0
  147. package/dist/esm/agent/git.js +87 -0
  148. package/dist/esm/agent/handoff.js +177 -0
  149. package/dist/esm/agent/impact-analyzer.js +548 -0
  150. package/dist/esm/agent/index.js +22 -0
  151. package/dist/esm/agent/model-router.js +150 -0
  152. package/dist/esm/agent/operational_insights.js +123 -0
  153. package/dist/esm/agent/pipeline.js +605 -0
  154. package/dist/esm/agent/plan.js +324 -0
  155. package/dist/esm/agent/playwright_report.js +123 -0
  156. package/dist/esm/agent/report-generator.js +247 -0
  157. package/dist/esm/agent/report.js +144 -0
  158. package/dist/esm/agent/runner.js +572 -0
  159. package/dist/esm/agent/selectors.js +71 -0
  160. package/dist/esm/agent/spec-bridge.js +267 -0
  161. package/dist/esm/agent/spec-builder.js +267 -0
  162. package/dist/esm/agent/subsystem_risk.js +204 -0
  163. package/dist/esm/agent/telemetry.js +216 -0
  164. package/dist/esm/agent/test_path.js +20 -0
  165. package/dist/esm/agent/tests.js +101 -0
  166. package/dist/esm/agent/traceability.js +180 -0
  167. package/dist/esm/agent/traceability_capture.js +310 -0
  168. package/dist/esm/agent/traceability_ingest.js +234 -0
  169. package/dist/esm/agent/utils.js +138 -0
  170. package/dist/esm/agent/validators/selector-validator.js +160 -0
  171. package/dist/esm/anthropic_provider.js +324 -0
  172. package/dist/esm/api.js +105 -0
  173. package/dist/esm/base_provider.js +77 -0
  174. package/dist/esm/cli.js +841 -0
  175. package/dist/esm/custom_provider.js +272 -0
  176. package/dist/esm/e2e-test-gen/index.js +50 -0
  177. package/dist/esm/e2e-test-gen/spec_parser.js +782 -0
  178. package/dist/esm/e2e-test-gen/types.js +3 -0
  179. package/dist/esm/index.js +16 -0
  180. package/dist/esm/logger.js +89 -0
  181. package/dist/esm/mcp-server.js +465 -0
  182. package/dist/esm/ollama_provider.js +300 -0
  183. package/dist/esm/openai_provider.js +242 -0
  184. package/dist/esm/package.json +3 -0
  185. package/dist/esm/plan-and-test-constants.js +126 -0
  186. package/dist/esm/provider_factory.js +336 -0
  187. package/dist/esm/provider_interface.js +23 -0
  188. package/dist/esm/provider_utils.js +96 -0
  189. package/dist/index.d.ts +31 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/index.js +41 -0
  192. package/dist/logger.d.ts +23 -0
  193. package/dist/logger.d.ts.map +1 -0
  194. package/dist/logger.js +93 -0
  195. package/dist/mcp-server.d.ts +35 -0
  196. package/dist/mcp-server.d.ts.map +1 -0
  197. package/dist/mcp-server.js +469 -0
  198. package/dist/ollama_provider.d.ts +65 -0
  199. package/dist/ollama_provider.d.ts.map +1 -0
  200. package/dist/ollama_provider.js +308 -0
  201. package/dist/openai_provider.d.ts +23 -0
  202. package/dist/openai_provider.d.ts.map +1 -0
  203. package/dist/openai_provider.js +250 -0
  204. package/dist/plan-and-test-constants.d.ts +110 -0
  205. package/dist/plan-and-test-constants.d.ts.map +1 -0
  206. package/dist/plan-and-test-constants.js +132 -0
  207. package/dist/provider_factory.d.ts +99 -0
  208. package/dist/provider_factory.d.ts.map +1 -0
  209. package/dist/provider_factory.js +341 -0
  210. package/dist/provider_interface.d.ts +358 -0
  211. package/dist/provider_interface.d.ts.map +1 -0
  212. package/dist/provider_interface.js +28 -0
  213. package/dist/provider_utils.d.ts +39 -0
  214. package/dist/provider_utils.d.ts.map +1 -0
  215. package/dist/provider_utils.js +103 -0
  216. package/package.json +101 -0
  217. package/schemas/gap.schema.json +18 -0
  218. package/schemas/impact.schema.json +418 -0
  219. package/schemas/plan.schema.json +285 -0
  220. package/schemas/subsystem-risk-map.schema.json +62 -0
  221. package/schemas/traceability-input.schema.json +122 -0
@@ -0,0 +1,418 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mattermost.com/schemas/e2e-agents/impact.schema.json",
4
+ "title": "ImpactReport",
5
+ "type": "object",
6
+ "required": [
7
+ "mode",
8
+ "changedFiles",
9
+ "flows",
10
+ "coverage",
11
+ "gaps",
12
+ "dataTestIds",
13
+ "framework",
14
+ "testPatterns",
15
+ "warnings"
16
+ ],
17
+ "properties": {
18
+ "mode": {
19
+ "const": "impact"
20
+ },
21
+ "changedFiles": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "flows": {
28
+ "type": "array",
29
+ "items": {
30
+ "$ref": "#/$defs/flowImpact"
31
+ }
32
+ },
33
+ "coverage": {
34
+ "type": "array",
35
+ "items": {
36
+ "$ref": "#/$defs/flowCoverage"
37
+ }
38
+ },
39
+ "gaps": {
40
+ "type": "array",
41
+ "items": {
42
+ "$ref": "#/$defs/flowImpact"
43
+ }
44
+ },
45
+ "dataTestIds": {
46
+ "type": "array",
47
+ "items": {
48
+ "$ref": "#/$defs/dataTestIdSuggestion"
49
+ }
50
+ },
51
+ "framework": {
52
+ "type": "string"
53
+ },
54
+ "testPatterns": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "specPDF": {
61
+ "type": "string"
62
+ },
63
+ "warnings": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string"
67
+ }
68
+ },
69
+ "flowCatalog": {
70
+ "type": "string"
71
+ },
72
+ "recommendedTests": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "impactModel": {
79
+ "type": "object",
80
+ "required": [
81
+ "schemaVersion",
82
+ "flowMapping",
83
+ "testMapping",
84
+ "confidenceClass"
85
+ ],
86
+ "properties": {
87
+ "schemaVersion": {
88
+ "const": "1.0.0"
89
+ },
90
+ "flowMapping": {
91
+ "enum": ["catalog", "heuristic"]
92
+ },
93
+ "testMapping": {
94
+ "enum": ["catalog", "traceability", "heuristic"]
95
+ },
96
+ "confidenceClass": {
97
+ "enum": ["high", "medium", "low"]
98
+ },
99
+ "traceability": {
100
+ "type": "object",
101
+ "required": [
102
+ "source",
103
+ "enabled",
104
+ "manifestPath",
105
+ "manifestFound",
106
+ "manifestTests",
107
+ "manifestEdges",
108
+ "matchedFlows",
109
+ "totalFlows",
110
+ "matchedTests",
111
+ "coverageRatio"
112
+ ],
113
+ "properties": {
114
+ "source": {"const": "manifest"},
115
+ "enabled": {"type": "boolean"},
116
+ "manifestPath": {"type": "string"},
117
+ "manifestFound": {"type": "boolean"},
118
+ "manifestTests": {"type": "number"},
119
+ "manifestEdges": {"type": "number"},
120
+ "matchedFlows": {"type": "number"},
121
+ "totalFlows": {"type": "number"},
122
+ "matchedTests": {"type": "number"},
123
+ "coverageRatio": {"type": "number"}
124
+ },
125
+ "additionalProperties": false
126
+ },
127
+ "dependencyGraph": {
128
+ "type": "object",
129
+ "required": [
130
+ "source",
131
+ "enabled",
132
+ "seedFiles",
133
+ "expandedFiles",
134
+ "analyzedFiles",
135
+ "analyzedEdges",
136
+ "maxDepth",
137
+ "truncated"
138
+ ],
139
+ "properties": {
140
+ "source": {
141
+ "const": "static-dependency-graph"
142
+ },
143
+ "enabled": {"type": "boolean"},
144
+ "seedFiles": {"type": "number"},
145
+ "expandedFiles": {"type": "number"},
146
+ "analyzedFiles": {"type": "number"},
147
+ "analyzedEdges": {"type": "number"},
148
+ "maxDepth": {"type": "number"},
149
+ "truncated": {"type": "boolean"}
150
+ },
151
+ "additionalProperties": false
152
+ },
153
+ "subsystemRisk": {
154
+ "type": "object",
155
+ "required": [
156
+ "source",
157
+ "enabled",
158
+ "mapPath",
159
+ "mapFound",
160
+ "rulesLoaded",
161
+ "filesMatched",
162
+ "ruleMatches",
163
+ "boostedFlows"
164
+ ],
165
+ "properties": {
166
+ "source": {
167
+ "const": "map"
168
+ },
169
+ "enabled": {"type": "boolean"},
170
+ "mapPath": {"type": "string"},
171
+ "mapFound": {"type": "boolean"},
172
+ "rulesLoaded": {"type": "number"},
173
+ "filesMatched": {"type": "number"},
174
+ "ruleMatches": {"type": "number"},
175
+ "boostedFlows": {"type": "number"}
176
+ },
177
+ "additionalProperties": false
178
+ }
179
+ },
180
+ "additionalProperties": false
181
+ },
182
+ "testSuggestions": {
183
+ "type": "array",
184
+ "items": {
185
+ "$ref": "#/$defs/gapTestSuggestion"
186
+ }
187
+ },
188
+ "pipeline": {
189
+ "$ref": "#/$defs/pipelineSummary"
190
+ },
191
+ "applied": {
192
+ "$ref": "#/$defs/appliedSummary"
193
+ }
194
+ },
195
+ "$defs": {
196
+ "flowImpact": {
197
+ "type": "object",
198
+ "required": [
199
+ "id",
200
+ "name",
201
+ "kind",
202
+ "score",
203
+ "priority",
204
+ "reasons",
205
+ "keywords",
206
+ "files"
207
+ ],
208
+ "properties": {
209
+ "id": {
210
+ "type": "string"
211
+ },
212
+ "name": {
213
+ "type": "string"
214
+ },
215
+ "kind": {
216
+ "enum": [
217
+ "screen",
218
+ "flow"
219
+ ]
220
+ },
221
+ "score": {
222
+ "type": "number"
223
+ },
224
+ "priority": {
225
+ "enum": [
226
+ "P0",
227
+ "P1",
228
+ "P2"
229
+ ]
230
+ },
231
+ "reasons": {
232
+ "type": "array",
233
+ "items": {
234
+ "type": "string"
235
+ }
236
+ },
237
+ "keywords": {
238
+ "type": "array",
239
+ "items": {
240
+ "type": "string"
241
+ }
242
+ },
243
+ "files": {
244
+ "type": "array",
245
+ "items": {
246
+ "type": "string"
247
+ }
248
+ }
249
+ },
250
+ "additionalProperties": true
251
+ },
252
+ "flowCoverage": {
253
+ "type": "object",
254
+ "required": [
255
+ "flowId",
256
+ "flowName",
257
+ "priority",
258
+ "coveredBy"
259
+ ],
260
+ "properties": {
261
+ "flowId": {
262
+ "type": "string"
263
+ },
264
+ "flowName": {
265
+ "type": "string"
266
+ },
267
+ "priority": {
268
+ "enum": [
269
+ "P0",
270
+ "P1",
271
+ "P2"
272
+ ]
273
+ },
274
+ "coveredBy": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "string"
278
+ }
279
+ },
280
+ "source": {
281
+ "enum": ["catalog", "traceability", "heuristic"]
282
+ }
283
+ },
284
+ "additionalProperties": true
285
+ },
286
+ "dataTestIdSuggestion": {
287
+ "type": "object",
288
+ "required": [
289
+ "file",
290
+ "line",
291
+ "testId",
292
+ "snippet"
293
+ ],
294
+ "properties": {
295
+ "file": {
296
+ "type": "string"
297
+ },
298
+ "line": {
299
+ "type": "number"
300
+ },
301
+ "testId": {
302
+ "type": "string"
303
+ },
304
+ "snippet": {
305
+ "type": "string"
306
+ }
307
+ },
308
+ "additionalProperties": false
309
+ },
310
+ "gapTestSuggestion": {
311
+ "type": "object",
312
+ "required": [
313
+ "flowId",
314
+ "flowName",
315
+ "priority",
316
+ "rationale",
317
+ "sourceFiles",
318
+ "suggestedTestPath",
319
+ "framework",
320
+ "skeleton"
321
+ ],
322
+ "properties": {
323
+ "flowId": {"type": "string"},
324
+ "flowName": {"type": "string"},
325
+ "priority": {"enum": ["P0", "P1", "P2"]},
326
+ "rationale": {"type": "string"},
327
+ "sourceFiles": {"type": "array", "items": {"type": "string"}},
328
+ "suggestedTestPath": {"type": "string"},
329
+ "framework": {"type": "string"},
330
+ "skeleton": {"type": "string"}
331
+ },
332
+ "additionalProperties": false
333
+ },
334
+ "pipelineSummary": {
335
+ "type": "object",
336
+ "required": [
337
+ "runner",
338
+ "results",
339
+ "warnings"
340
+ ],
341
+ "properties": {
342
+ "runner": {
343
+ "type": "string"
344
+ },
345
+ "results": {
346
+ "type": "array",
347
+ "items": {
348
+ "type": "object",
349
+ "required": [
350
+ "flowId",
351
+ "flowName",
352
+ "generatedDir",
353
+ "generateStatus"
354
+ ],
355
+ "properties": {
356
+ "flowId": {
357
+ "type": "string"
358
+ },
359
+ "flowName": {
360
+ "type": "string"
361
+ },
362
+ "generatedDir": {
363
+ "type": "string"
364
+ },
365
+ "generateStatus": {
366
+ "type": "string"
367
+ },
368
+ "healStatus": {
369
+ "type": "string"
370
+ },
371
+ "error": {
372
+ "type": "string"
373
+ }
374
+ },
375
+ "additionalProperties": false
376
+ }
377
+ },
378
+ "warnings": {
379
+ "type": "array",
380
+ "items": {
381
+ "type": "string"
382
+ }
383
+ }
384
+ },
385
+ "additionalProperties": false
386
+ },
387
+ "appliedSummary": {
388
+ "type": "object",
389
+ "required": [
390
+ "patchedFiles",
391
+ "generatedTests",
392
+ "skippedTests"
393
+ ],
394
+ "properties": {
395
+ "patchedFiles": {
396
+ "type": "array",
397
+ "items": {
398
+ "type": "string"
399
+ }
400
+ },
401
+ "generatedTests": {
402
+ "type": "array",
403
+ "items": {
404
+ "type": "string"
405
+ }
406
+ },
407
+ "skippedTests": {
408
+ "type": "array",
409
+ "items": {
410
+ "type": "string"
411
+ }
412
+ }
413
+ },
414
+ "additionalProperties": false
415
+ }
416
+ },
417
+ "additionalProperties": false
418
+ }
@@ -0,0 +1,285 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mattermost.com/schemas/e2e-agents/plan.schema.json",
4
+ "title": "PlanReport",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "generatedAt",
9
+ "source",
10
+ "runSet",
11
+ "confidence",
12
+ "reasons",
13
+ "recommendedTests",
14
+ "requiredNewTests",
15
+ "policy",
16
+ "decision",
17
+ "metrics"
18
+ ],
19
+ "properties": {
20
+ "schemaVersion": {
21
+ "const": "1.0.0"
22
+ },
23
+ "generatedAt": {
24
+ "type": "string",
25
+ "format": "date-time"
26
+ },
27
+ "source": {
28
+ "const": "impact"
29
+ },
30
+ "runSet": {
31
+ "enum": [
32
+ "smoke",
33
+ "targeted",
34
+ "full"
35
+ ]
36
+ },
37
+ "confidence": {
38
+ "type": "number",
39
+ "minimum": 0,
40
+ "maximum": 100
41
+ },
42
+ "reasons": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "recommendedTests": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ }
53
+ },
54
+ "requiredNewTests": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "policy": {
61
+ "type": "object",
62
+ "required": [
63
+ "riskyFiles",
64
+ "triggeredRules",
65
+ "applied"
66
+ ],
67
+ "properties": {
68
+ "riskyFiles": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ "triggeredRules": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "string"
78
+ }
79
+ },
80
+ "applied": {
81
+ "type": "object",
82
+ "required": [
83
+ "minConfidenceForTargeted",
84
+ "safeMergeMinConfidence",
85
+ "forceFullOnWarningsAtOrAbove",
86
+ "forceFullOnP0WithGaps",
87
+ "forceFullOnRiskyFiles",
88
+ "riskyFilePatterns"
89
+ ],
90
+ "properties": {
91
+ "minConfidenceForTargeted": {
92
+ "type": "number"
93
+ },
94
+ "safeMergeMinConfidence": {
95
+ "type": "number"
96
+ },
97
+ "forceFullOnWarningsAtOrAbove": {
98
+ "type": "number"
99
+ },
100
+ "forceFullOnP0WithGaps": {
101
+ "type": "boolean"
102
+ },
103
+ "forceFullOnRiskyFiles": {
104
+ "type": "boolean"
105
+ },
106
+ "riskyFilePatterns": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "string"
110
+ }
111
+ }
112
+ },
113
+ "additionalProperties": false
114
+ }
115
+ },
116
+ "additionalProperties": false
117
+ },
118
+ "decision": {
119
+ "type": "object",
120
+ "required": [
121
+ "action",
122
+ "title",
123
+ "summary"
124
+ ],
125
+ "properties": {
126
+ "action": {
127
+ "enum": [
128
+ "run-now",
129
+ "must-add-tests",
130
+ "safe-to-merge"
131
+ ]
132
+ },
133
+ "title": {
134
+ "type": "string"
135
+ },
136
+ "summary": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "additionalProperties": false
141
+ },
142
+ "insights": {
143
+ "type": "object",
144
+ "properties": {
145
+ "flaky": {
146
+ "type": "object",
147
+ "required": [
148
+ "highRiskRecommendedTests",
149
+ "quarantinedRecommendedTests"
150
+ ],
151
+ "properties": {
152
+ "highRiskRecommendedTests": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "object",
156
+ "required": [
157
+ "test",
158
+ "flakeRate"
159
+ ],
160
+ "properties": {
161
+ "test": {"type": "string"},
162
+ "flakeRate": {"type": "number"},
163
+ "flakeRate7d": {"type": "number"},
164
+ "flakeRate30d": {"type": "number"},
165
+ "trend": {"enum": ["up", "down", "stable"]},
166
+ "subsystem": {"type": "string"},
167
+ "owners": {
168
+ "type": "array",
169
+ "items": {"type": "string"}
170
+ },
171
+ "quarantine": {"type": "boolean"},
172
+ "quarantineState": {"enum": ["none", "active", "retire-candidate"]},
173
+ "lastFailureAt": {"type": "string"}
174
+ },
175
+ "additionalProperties": false
176
+ }
177
+ },
178
+ "quarantinedRecommendedTests": {
179
+ "type": "array",
180
+ "items": {"type": "string"}
181
+ },
182
+ "ownerMentions": {
183
+ "type": "array",
184
+ "items": {"type": "string"}
185
+ }
186
+ },
187
+ "additionalProperties": false
188
+ },
189
+ "qualityGates": {
190
+ "type": "object",
191
+ "required": ["failed", "warnings"],
192
+ "properties": {
193
+ "failed": {
194
+ "type": "array",
195
+ "items": {"$ref": "#/$defs/gate"}
196
+ },
197
+ "warnings": {
198
+ "type": "array",
199
+ "items": {"$ref": "#/$defs/gate"}
200
+ }
201
+ },
202
+ "additionalProperties": false
203
+ },
204
+ "calibration": {
205
+ "type": "object",
206
+ "required": ["precision", "recall", "falseNegativeRate"],
207
+ "properties": {
208
+ "precision": {"type": "number"},
209
+ "recall": {"type": "number"},
210
+ "falseNegativeRate": {"type": "number"}
211
+ },
212
+ "additionalProperties": false
213
+ }
214
+ },
215
+ "additionalProperties": false
216
+ },
217
+ "nextActions": {
218
+ "type": "object",
219
+ "required": [
220
+ "requiresUserApprovalForGeneration"
221
+ ],
222
+ "properties": {
223
+ "requiresUserApprovalForGeneration": {"type": "boolean"},
224
+ "runRecommendedTests": {"type": "string"},
225
+ "runSmokeSuite": {"type": "string"},
226
+ "runFullSuite": {"type": "string"},
227
+ "approveAndGenerate": {"type": "string"},
228
+ "generateMissingTests": {"type": "string"},
229
+ "healGeneratedTests": {"type": "string"},
230
+ "commitGeneratedTests": {"type": "string"},
231
+ "openPullRequest": {"type": "string"}
232
+ },
233
+ "additionalProperties": false
234
+ },
235
+ "metrics": {
236
+ "type": "object",
237
+ "required": [
238
+ "changedFiles",
239
+ "impactedFlows",
240
+ "p0Flows",
241
+ "p1Flows",
242
+ "p2Flows",
243
+ "uncoveredP0P1Flows",
244
+ "warnings"
245
+ ],
246
+ "properties": {
247
+ "changedFiles": {
248
+ "type": "number"
249
+ },
250
+ "impactedFlows": {
251
+ "type": "number"
252
+ },
253
+ "p0Flows": {
254
+ "type": "number"
255
+ },
256
+ "p1Flows": {
257
+ "type": "number"
258
+ },
259
+ "p2Flows": {
260
+ "type": "number"
261
+ },
262
+ "uncoveredP0P1Flows": {
263
+ "type": "number"
264
+ },
265
+ "warnings": {
266
+ "type": "number"
267
+ }
268
+ },
269
+ "additionalProperties": false
270
+ }
271
+ },
272
+ "$defs": {
273
+ "gate": {
274
+ "type": "object",
275
+ "required": ["name", "status"],
276
+ "properties": {
277
+ "name": {"type": "string"},
278
+ "status": {"enum": ["pass", "warn", "fail"]},
279
+ "details": {"type": "string"}
280
+ },
281
+ "additionalProperties": false
282
+ }
283
+ },
284
+ "additionalProperties": false
285
+ }