@yasserkhanorg/e2e-agents 1.3.0 → 1.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @yasserkhanorg/e2e-agents
2
2
 
3
- AI-powered E2E test impact analysis, generation, and healing for frontend repositories.
3
+ AI-powered E2E test impact analysis, generation, healing, and autonomous QA for frontend repositories.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/%40yasserkhanorg%2Fe2e-agents)](https://www.npmjs.com/package/@yasserkhanorg/e2e-agents)
6
6
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
@@ -8,7 +8,7 @@ AI-powered E2E test impact analysis, generation, and healing for frontend reposi
8
8
 
9
9
  ## What It Does
10
10
 
11
- Given a git diff, `e2e-ai-agents` determines which E2E test flows are impacted, identifies coverage gaps, and can generate or heal Playwright tests — all from the CLI.
11
+ Given a git diff, `e2e-ai-agents` determines which E2E test flows are impacted, identifies coverage gaps, and can generate or heal Playwright tests — all from the CLI. The companion `e2e-qa-agent` goes further: it opens a real browser, explores your app autonomously, and produces a QA report with findings and a release-readiness verdict.
12
12
 
13
13
  **Pipeline:** `impact` → `plan` → `generate` → `heal` → `finalize`
14
14
 
@@ -23,6 +23,9 @@ Requires Node.js >= 20. Ships both CommonJS and ESM builds.
23
23
  ## CLI Commands
24
24
 
25
25
  ```bash
26
+ # All-in-one: impact + plan + optional generate/heal
27
+ npx e2e-ai-agents analyze --path /path/to/webapp [--generate] [--heal]
28
+
26
29
  # Analyze which flows are impacted by code changes
27
30
  npx e2e-ai-agents impact --path /path/to/webapp
28
31
 
@@ -49,7 +52,7 @@ npx e2e-ai-agents feedback --path /path/to/webapp --feedback-input ./feedback.js
49
52
  npx e2e-ai-agents llm-health
50
53
  ```
51
54
 
52
- `plan` and `suggest` are aliases. Use `--help` for all available flags.
55
+ `plan` and `suggest` are aliases. `analyze` is a convenience wrapper that runs impact + plan and optionally generation/healing in one invocation. Use `--help` for all available flags.
53
56
 
54
57
  ## Configuration
55
58
 
@@ -114,7 +117,7 @@ The `plan` command writes:
114
117
 
115
118
  Use `--fail-on-must-add-tests` to exit non-zero when uncovered P0/P1 gaps exist. Use `--github-output` to expose outputs to subsequent workflow steps.
116
119
 
117
- See [examples/github-actions/](examples/github-actions/) for a complete workflow template.
120
+ See [examples/github-actions/pr-impact.yml](examples/github-actions/pr-impact.yml) for a complete workflow template.
118
121
 
119
122
  ## Pipeline Modes
120
123
 
@@ -206,6 +209,46 @@ Schemas: [schemas/traceability-input.schema.json](schemas/traceability-input.sch
206
209
 
207
210
  All written under `<testsRoot>/.e2e-ai-agents/`.
208
211
 
212
+ ## Autonomous QA Agent (`e2e-qa-agent`)
213
+
214
+ An autonomous QA engineer that opens a real browser, navigates to changed features, tries edge cases, and produces a findings report — all unsupervised. Built on top of `agent-browser` and the Anthropic tool-use API.
215
+
216
+ ### Quick Start
217
+
218
+ ```bash
219
+ # PR mode — test features changed since origin/main
220
+ npx e2e-qa-agent pr --since origin/main --base-url http://localhost:8065
221
+
222
+ # Hunt mode — deep-test a specific area
223
+ npx e2e-qa-agent hunt "channel settings" --base-url http://localhost:8065
224
+
225
+ # Release mode — systematic exploration of all critical flows
226
+ npx e2e-qa-agent release --base-url http://localhost:8065 --time 30
227
+
228
+ # Fix mode — verify healed specs
229
+ npx e2e-qa-agent fix --base-url http://localhost:8065
230
+ ```
231
+
232
+ ### Architecture
233
+
234
+ 1. **Phase 1 (Script)** — Runs `e2e-ai-agents impact/plan` to determine scope, then executes matched Playwright specs.
235
+ 2. **Phase 2 (Explore)** — LLM-driven browser loop: observe (accessibility snapshot) → think → act (click/fill/navigate) → record findings. Includes stuck detection, multi-user testing, console error capture, and vision-based analysis.
236
+ 3. **Phase 3 (Report)** — Generates a structured report with findings, per-flow sign-off, and a release-readiness verdict (go/no-go/conditional).
237
+
238
+ ### Options
239
+
240
+ | Flag | Default | Description |
241
+ |------|---------|-------------|
242
+ | `--base-url` | `http://localhost:8065` | Application URL |
243
+ | `--time` | `15` | Time limit in minutes |
244
+ | `--budget` | `2.00` | Max LLM spend in USD |
245
+ | `--phase` | `all` | Run only `1`, `2`, or `3` |
246
+ | `--headed` | off | Keep browser visible |
247
+ | `--since` | — | Git ref for diff-based scoping |
248
+ | `--tests-root` | — | Path to Playwright tests directory |
249
+
250
+ Requires `agent-browser` CLI (`npm install -g agent-browser`) and `ANTHROPIC_API_KEY`.
251
+
209
252
  ## Production Usage
210
253
 
211
254
  Used by [Mattermost](https://github.com/mattermost/mattermost) for CI-integrated E2E coverage gating, test generation, and spec healing. See the [Mattermost Playwright integration](https://github.com/mattermost/mattermost/tree/master/e2e-tests/playwright) for a real-world example.
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/agent/git.ts"],"names":[],"mappings":"AAyGA,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;CAC1C;AAED,MAAM,WAAW,gBAAgB;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AA8CD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe,CA2C3G"}
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/agent/git.ts"],"names":[],"mappings":"AAkHA,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;CAC1C;AAED,MAAM,WAAW,gBAAgB;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AA8CD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe,CA2C3G"}
package/dist/agent/git.js CHANGED
@@ -16,6 +16,7 @@ const IGNORED_DIR_SEGMENTS = [
16
16
  '__tests__',
17
17
  '__mocks__',
18
18
  'testlib',
19
+ 'scripts',
19
20
  ];
20
21
  // Exact filenames (basename) that are never relevant.
21
22
  const IGNORED_BASENAMES = new Set([
@@ -38,6 +39,11 @@ const IGNORED_BASENAMES = new Set([
38
39
  'jest.config.js',
39
40
  'jest.config.ts',
40
41
  'babel.config.js',
42
+ 'webpack.config.js',
43
+ 'Makefile',
44
+ 'config.mk',
45
+ 'go.mod',
46
+ 'go.sum',
41
47
  ]);
42
48
  // Extensions that are never source code.
43
49
  const IGNORED_EXTENSIONS = new Set([
@@ -46,6 +52,8 @@ const IGNORED_EXTENSIONS = new Set([
46
52
  '.lock',
47
53
  '.png', '.jpg', '.jpeg', '.gif', '.svg', '.ico',
48
54
  '.woff', '.woff2', '.ttf', '.eot',
55
+ '.yml', '.yaml',
56
+ '.sh',
49
57
  ]);
50
58
  // File patterns that indicate test/spec files (not production code).
51
59
  const TEST_FILE_PATTERNS = [
@@ -53,6 +61,7 @@ const TEST_FILE_PATTERNS = [
53
61
  /\.test\.[tj]sx?$/,
54
62
  /_test\.go$/,
55
63
  /\.stories\.[tj]sx?$/,
64
+ /\.d\.ts$/,
56
65
  ];
57
66
  // Config file patterns that are not production source code.
58
67
  const CONFIG_FILE_PATTERNS = [
@@ -13,6 +13,7 @@ const IGNORED_DIR_SEGMENTS = [
13
13
  '__tests__',
14
14
  '__mocks__',
15
15
  'testlib',
16
+ 'scripts',
16
17
  ];
17
18
  // Exact filenames (basename) that are never relevant.
18
19
  const IGNORED_BASENAMES = new Set([
@@ -35,6 +36,11 @@ const IGNORED_BASENAMES = new Set([
35
36
  'jest.config.js',
36
37
  'jest.config.ts',
37
38
  'babel.config.js',
39
+ 'webpack.config.js',
40
+ 'Makefile',
41
+ 'config.mk',
42
+ 'go.mod',
43
+ 'go.sum',
38
44
  ]);
39
45
  // Extensions that are never source code.
40
46
  const IGNORED_EXTENSIONS = new Set([
@@ -43,6 +49,8 @@ const IGNORED_EXTENSIONS = new Set([
43
49
  '.lock',
44
50
  '.png', '.jpg', '.jpeg', '.gif', '.svg', '.ico',
45
51
  '.woff', '.woff2', '.ttf', '.eot',
52
+ '.yml', '.yaml',
53
+ '.sh',
46
54
  ]);
47
55
  // File patterns that indicate test/spec files (not production code).
48
56
  const TEST_FILE_PATTERNS = [
@@ -50,6 +58,7 @@ const TEST_FILE_PATTERNS = [
50
58
  /\.test\.[tj]sx?$/,
51
59
  /_test\.go$/,
52
60
  /\.stories\.[tj]sx?$/,
61
+ /\.d\.ts$/,
53
62
  ];
54
63
  // Config file patterns that are not production source code.
55
64
  const CONFIG_FILE_PATTERNS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yasserkhanorg/e2e-agents",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "AI-powered E2E test impact analysis, generation, and healing. Analyzes code changes to identify affected Playwright tests, detects coverage gaps, and generates or repairs specs using pluggable LLM providers (Claude, OpenAI, Ollama). Includes MCP server, traceability, and CI/CD integration.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",