@monkeytestai/monkeytester 0.7.0-beta.3 → 0.7.0-beta.5

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 (158) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +152 -133
  3. package/dist/automation/signatures.d.ts.map +1 -1
  4. package/dist/automation/signatures.js +10 -0
  5. package/dist/automation/signatures.js.map +1 -1
  6. package/dist/budget.d.ts +23 -0
  7. package/dist/budget.d.ts.map +1 -0
  8. package/dist/budget.js +30 -0
  9. package/dist/budget.js.map +1 -0
  10. package/dist/checks/axe.d.ts +6 -0
  11. package/dist/checks/axe.d.ts.map +1 -1
  12. package/dist/checks/axe.js +15 -0
  13. package/dist/checks/axe.js.map +1 -1
  14. package/dist/checks/console.d.ts +4 -0
  15. package/dist/checks/console.d.ts.map +1 -1
  16. package/dist/checks/console.js +16 -1
  17. package/dist/checks/console.js.map +1 -1
  18. package/dist/checks/execute.d.ts +17 -1
  19. package/dist/checks/execute.d.ts.map +1 -1
  20. package/dist/checks/execute.js +92 -36
  21. package/dist/checks/execute.js.map +1 -1
  22. package/dist/checks/meta.d.ts +7 -4
  23. package/dist/checks/meta.d.ts.map +1 -1
  24. package/dist/checks/meta.js +8 -6
  25. package/dist/checks/meta.js.map +1 -1
  26. package/dist/checks/mobile.d.ts +8 -0
  27. package/dist/checks/mobile.d.ts.map +1 -1
  28. package/dist/checks/mobile.js +10 -3
  29. package/dist/checks/mobile.js.map +1 -1
  30. package/dist/checks/party.d.ts +19 -0
  31. package/dist/checks/party.d.ts.map +1 -0
  32. package/dist/checks/party.js +56 -0
  33. package/dist/checks/party.js.map +1 -0
  34. package/dist/checks/plan.js +4 -4
  35. package/dist/checks/plan.js.map +1 -1
  36. package/dist/checks/ready.d.ts +10 -0
  37. package/dist/checks/ready.d.ts.map +1 -0
  38. package/dist/checks/ready.js +22 -0
  39. package/dist/checks/ready.js.map +1 -0
  40. package/dist/cli.js +26 -3
  41. package/dist/cli.js.map +1 -1
  42. package/dist/explorer/authRedirect.d.ts +41 -0
  43. package/dist/explorer/authRedirect.d.ts.map +1 -0
  44. package/dist/explorer/authRedirect.js +129 -0
  45. package/dist/explorer/authRedirect.js.map +1 -0
  46. package/dist/explorer/index.d.ts +3 -3
  47. package/dist/explorer/index.d.ts.map +1 -1
  48. package/dist/explorer/index.js +43 -8
  49. package/dist/explorer/index.js.map +1 -1
  50. package/dist/explorer/queue.d.ts +10 -3
  51. package/dist/explorer/queue.d.ts.map +1 -1
  52. package/dist/explorer/queue.js +12 -11
  53. package/dist/explorer/queue.js.map +1 -1
  54. package/dist/explorer/screens.d.ts +23 -0
  55. package/dist/explorer/screens.d.ts.map +1 -0
  56. package/dist/explorer/screens.js +41 -0
  57. package/dist/explorer/screens.js.map +1 -0
  58. package/dist/index.d.ts +3 -2
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +1 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/llm/index.d.ts.map +1 -1
  63. package/dist/llm/index.js +16 -13
  64. package/dist/llm/index.js.map +1 -1
  65. package/dist/llm/prices.d.ts +28 -4
  66. package/dist/llm/prices.d.ts.map +1 -1
  67. package/dist/llm/prices.js +39 -11
  68. package/dist/llm/prices.js.map +1 -1
  69. package/dist/llm/temperature.d.ts +20 -0
  70. package/dist/llm/temperature.d.ts.map +1 -0
  71. package/dist/llm/temperature.js +47 -0
  72. package/dist/llm/temperature.js.map +1 -0
  73. package/dist/monkey.d.ts +1 -0
  74. package/dist/monkey.d.ts.map +1 -1
  75. package/dist/monkey.js +66 -11
  76. package/dist/monkey.js.map +1 -1
  77. package/dist/outcome/check.d.ts.map +1 -1
  78. package/dist/outcome/check.js +27 -9
  79. package/dist/outcome/check.js.map +1 -1
  80. package/dist/outcome.d.ts +1 -0
  81. package/dist/outcome.d.ts.map +1 -1
  82. package/dist/outcome.js +31 -1
  83. package/dist/outcome.js.map +1 -1
  84. package/dist/planner/forms.js +11 -1
  85. package/dist/planner/forms.js.map +1 -1
  86. package/dist/planner/index.d.ts.map +1 -1
  87. package/dist/planner/index.js +48 -12
  88. package/dist/planner/index.js.map +1 -1
  89. package/dist/planner/inventory.d.ts +6 -0
  90. package/dist/planner/inventory.d.ts.map +1 -1
  91. package/dist/planner/inventory.js +59 -0
  92. package/dist/planner/inventory.js.map +1 -1
  93. package/dist/runner/actions.d.ts +2 -0
  94. package/dist/runner/actions.d.ts.map +1 -1
  95. package/dist/runner/actions.js +181 -7
  96. package/dist/runner/actions.js.map +1 -1
  97. package/dist/runner/authNegative.d.ts.map +1 -1
  98. package/dist/runner/authNegative.js +81 -21
  99. package/dist/runner/authNegative.js.map +1 -1
  100. package/dist/runner/evidence.d.ts +27 -6
  101. package/dist/runner/evidence.d.ts.map +1 -1
  102. package/dist/runner/evidence.js +86 -10
  103. package/dist/runner/evidence.js.map +1 -1
  104. package/dist/runner/http5xx.d.ts.map +1 -1
  105. package/dist/runner/http5xx.js +1 -0
  106. package/dist/runner/http5xx.js.map +1 -1
  107. package/dist/runner/index.d.ts +10 -0
  108. package/dist/runner/index.d.ts.map +1 -1
  109. package/dist/runner/index.js +205 -113
  110. package/dist/runner/index.js.map +1 -1
  111. package/dist/runner/locate.d.ts.map +1 -1
  112. package/dist/runner/locate.js +101 -11
  113. package/dist/runner/locate.js.map +1 -1
  114. package/dist/runner/replay.d.ts +3 -0
  115. package/dist/runner/replay.d.ts.map +1 -1
  116. package/dist/runner/replay.js +4 -0
  117. package/dist/runner/replay.js.map +1 -1
  118. package/dist/runner/sensitive.d.ts +72 -0
  119. package/dist/runner/sensitive.d.ts.map +1 -0
  120. package/dist/runner/sensitive.js +348 -0
  121. package/dist/runner/sensitive.js.map +1 -0
  122. package/dist/signup/detect.d.ts +2 -0
  123. package/dist/signup/detect.d.ts.map +1 -1
  124. package/dist/signup/detect.js +14 -2
  125. package/dist/signup/detect.js.map +1 -1
  126. package/dist/signup/guard.d.ts.map +1 -1
  127. package/dist/signup/guard.js +53 -4
  128. package/dist/signup/guard.js.map +1 -1
  129. package/dist/signup/ledger.d.ts +4 -0
  130. package/dist/signup/ledger.d.ts.map +1 -1
  131. package/dist/signup/ledger.js +16 -4
  132. package/dist/signup/ledger.js.map +1 -1
  133. package/dist/signup/run.d.ts +2 -0
  134. package/dist/signup/run.d.ts.map +1 -1
  135. package/dist/signup/run.js +224 -51
  136. package/dist/signup/run.js.map +1 -1
  137. package/dist/signup/submit.d.ts +13 -0
  138. package/dist/signup/submit.d.ts.map +1 -0
  139. package/dist/signup/submit.js +40 -0
  140. package/dist/signup/submit.js.map +1 -0
  141. package/dist/trace/httpIdentity.d.ts +17 -0
  142. package/dist/trace/httpIdentity.d.ts.map +1 -0
  143. package/dist/trace/httpIdentity.js +61 -0
  144. package/dist/trace/httpIdentity.js.map +1 -0
  145. package/dist/trace/serialize.d.ts.map +1 -1
  146. package/dist/trace/serialize.js +2 -0
  147. package/dist/trace/serialize.js.map +1 -1
  148. package/dist/trace/stepLabel.d.ts +11 -0
  149. package/dist/trace/stepLabel.d.ts.map +1 -0
  150. package/dist/trace/stepLabel.js +49 -0
  151. package/dist/trace/stepLabel.js.map +1 -0
  152. package/dist/triager/index.d.ts +5 -1
  153. package/dist/triager/index.d.ts.map +1 -1
  154. package/dist/triager/index.js +146 -15
  155. package/dist/triager/index.js.map +1 -1
  156. package/dist/types.d.ts +133 -3
  157. package/dist/types.d.ts.map +1 -1
  158. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.7.0-beta.5] — 2026-11-01
11
+
12
+ ### Fixed
13
+
14
+ - Analytics and RUM beacons are not sensitive submits. `sendBeacon` and keepalive requests, including `clarity.ms`, `google-analytics.com`, `googletagmanager.com`, `/cdn-cgi/rum`, Segment, Mixpanel, Hotjar, Plausible, PostHog, and Sentry ingest, no longer match words such as payment or reset. A homepage visit or a "Forgot your password?" link is not inconclusive because a third-party body contained those words. Same-origin and form-action `POST`, `PUT`, and `PATCH` submits are still blocked unless `allowSensitive` or an inbox allows them. OAuth navigations are still aborted.
15
+ - The demo fixture's fixed pages set `lang="en"`. axe-core `html-has-lang` was still broken after the fixture flipped to fixed, so Live e2e exited 1 with `lingering=1` while the four seeded bugs were fixed. The buggy pages still omit `lang`, and verify clears that finding.
16
+ - A page visit that lands on a same-origin login, sign-in, or sign-up URL is a pass. HTTP 3xx and client-side redirects both count. The note is an info suggestion (`auth-redirect`), and the landing page is a public screen. Cross-origin redirects, error pages, redirect loops, and HTTP 4xx/5xx are unchanged.
17
+
18
+ ### Added
19
+
20
+ - `SuggestionKind` `auth-redirect`.
21
+
22
+ ## [0.7.0-beta.4] — 2026-11-01
23
+
24
+ ### Fixed
25
+
26
+ - OpenAI, Anthropic, and Mistral calls omit `temperature` for models that reject it (`gpt-5*`, o-series). A 400 that says temperature is unsupported is retried once without the field. Other models still default to 0.2.
27
+ - A planner failure is visible. `TestPlan.plannerFallback` and `plannerFallbackReason` are set, and the process logs `planner fallback`. A model that correctly returns no journeys on a login wall is not a failure. The run stays `login_required`.
28
+ - Planning has its own budget. On a timed run the checks keep a reserve (45s of the 120s Quick pass, or 40% of a shorter budget). A planner that would eat that reserve is skipped and the grounded plan runs, so the checks are not starved.
29
+ - The crawler keeps the trailing slash on the URL it visits. Dedup still ignores the slash. `https://the-internet.herokuapp.com/add_remove_elements/` is no longer requested without the slash (that URL 404s).
30
+ - The crawl does not invent the origin root. A root 404 is reported only when the start URL is the root or a page links to it.
31
+ - An uncaught page error from a script on a different registrable domain (ads, analytics, tag managers) is a suggestion, not a major or critical bug, and it does not fail navigation. A first-party page error keeps its current severity.
32
+ - Missing autocomplete, a missing viewport or meta description, and horizontal overflow on a page with no viewport meta are suggestions. They are not bugs, not failures, and not part of the verdict. Serious accessibility failures (missing labels, contrast, and the rest of axe) stay bugs. A missing title stays a bug. Tiny tap targets stay bugs.
33
+ - The planner drops a journey that navigates to any URL the crawl did not see, including a URL on another host.
34
+ - `estimateCostUsd` prices each step at that step's model. `gpt-5-mini` and `gpt-5-nano` have price rows. `gpt-4.1-nano` is marked deprecated.
35
+ - Explorer model errors are on `SiteMap.warnings` and on the page (`SiteMapPage.warnings`), as well as in the server log. `RunResult.warnings` copies them, plus a line when the planner used the grounded fallback.
36
+ - axe-core findings roll up by rule id across pages into one bug with `affectedPages`. `color-contrast` and `scrollable-region-focusable` are minor at most. Other serious or critical rules stay bugs, also one per rule.
37
+ - The same HTTP failure (method + path + status) from two flows is one bug. `seenInFlows` lists the flows. Every step gets a `label`, taken from the action and target when the planner omits one.
38
+ - A configured inbox (`MonkeyConfig.inbox`, `run.inbox`, or `plan.signupInbox: true`) plans exactly one account sign-up for a detected sign-up form. The "do not create an account" instruction applies only when no inbox is configured. `exploreAndPlan` and `executeAndTriage` pass the flag through.
39
+ - A click aimed at `text:Search` prefers `getByRole(button | link | searchbox)`, then label, placeholder, and aria-label, and uses a stored CSS selector first. Hidden and duplicate matches are skipped. Text is the fallback. The recorded role is the element's role, so a link is not replayed as a button.
40
+ - Sign-up validation clicks the form's own submit (`type="submit"` or a create-account / sign-up / register label). It does not click the first button, and it does not click OAuth controls (`Use Facebook`, `Continue with`, `Sign in with`, and `/auth/<provider>`). A hidden honeypot is not filled. A fill that fails before submit is `signup_reason` `automation_error` with `signup_started: true`, not a site bug. No sign-up form reports `signup_reason` `no_signup_form`.
41
+ - Password-reset, OTP / magic-link / send-code, newsletter, checkout/payment, and account-deletion submits are blocked in the runner and at the network (the POST is aborted) unless the host allows them. An inbox allows OTP, reset, and the one sign-up. Empty validation still runs. `RunnerOptions.allowSensitive` names any extra kinds.
42
+ - Navigation to `/auth/<provider>` or a known OAuth host is aborted. The flow is inconclusive.
43
+ - Invented success copy is not a failing check. `text_visible` and `text_absent` misses are inconclusive. The planner is told to prefer a URL change, a form that leaves, a `role=alert` / `role=status` region, or the form request's HTTP status. A fill that leaves the field empty is an automation error. A confirm dialog is accepted only when the remaining steps ask for it.
44
+ - A page error with no script URL in the stack or the message is a suggestion (`unattributed-error`), not a major bug. When the message names a script, that script decides first-party vs third-party.
45
+ - Page checks run before sign-up and model flows, and each check records its own `durationMs`. A check skipped because the run is out of time has `outcome_reason` `budget_exhausted`, not a 0ms couldn't-confirm.
46
+ - Sign-in, sign-up, register, and password-reset URLs are public screens, not auth-gated. Two URLs that render the same title, heading, and fields (for example `/` and `/signin`) are one page.
47
+ - An input placeholder is not visible text. A placeholder of "Success" does not satisfy a text assertion.
48
+ - A wrong-password check passes when the page shows a sign-in error (including "correct login details", "not recognised", or an alert) or the auth request returns 400, 401, 403, or 422 and the URL stays on the login page. An empty field after the fill is an automation error, not a missing error message.
49
+ - A sign-in or sign-up URL counts as a public screen even if an older flag still says it is auth-gated. A sign-in form rendered at `/` is a public screen too.
50
+ - Page-check `durationMs` is the measured time. A check that finished in under a millisecond is 0.
51
+
52
+ ### Added
53
+
54
+ - `RunResult.suggestions` and `Suggestion` (`pageUrl`, `title`, `detail`, `kind`, `severity: 'info'`). Group by `pageUrl` for a per-page list. Omitted when empty.
55
+ - `BugReport.affectedPages` for a rolled-up axe rule, and `BugReport.seenInFlows` (`{ flowId, name }`) when more than one flow hit the same HTTP failure.
56
+ - `TestStep.label`, `StepResult.label`, and `TraceStep.label`.
57
+ - `SuggestionKind` `unattributed-error`. `SignupReason` `automation_error`. `OutcomeReason` `budget_exhausted`. `RunResult.signup_started` and `RunResult.pagesExplored`.
58
+ - `RunnerOptions.allowSensitive` (`signup`, `reset`, `otp`, `newsletter`, `payment`, `deletion`). An inbox already allows `signup`, `reset`, and `otp`.
59
+ - `scripts/bakeoff.ts --runs N`. Each row reports suggestions separately from real bugs, records `plannerFallback`, and prices tokens per step.
60
+
10
61
  ## [0.7.0-beta.3] — 2026-11-01
11
62
 
12
63
  ### Fixed
package/README.md CHANGED
@@ -1,212 +1,231 @@
1
1
  <p align="center">
2
- <img src="docs/public/hero.jpg" alt="monkeytester — an AI agent that uses your site like a real user and reports the bugs" width="820" />
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/public/banner-dark.svg" />
4
+ <img alt="monkeytester. Bugs your tests didn't think to look for. Point it at a URL. It finds the bugs, then proves you fixed them." src="docs/public/banner-light.svg" width="1280" />
5
+ </picture>
3
6
  </p>
4
7
 
5
- <h1 align="center">monkeytester</h1>
8
+ <h1 align="center">Bugs your tests didn't think to look for.</h1>
6
9
 
7
10
  <p align="center">
8
- <strong>An AI agent that uses your site like a real user — and reports the bugs.</strong><br />
9
- Open source. Playwright + your favourite LLM. First result in about a minute, no API key.
11
+ Point it at a URL. It finds the bugs, then proves you fixed them.<br />
12
+ Open source. Playwright and your LLM. Node.js 20+.
10
13
  </p>
11
14
 
12
15
  <p align="center">
13
16
  <a href="https://www.npmjs.com/package/@monkeytestai/monkeytester"><img src="https://img.shields.io/npm/v/@monkeytestai/monkeytester" alt="npm @monkeytestai/monkeytester" /></a>
14
- <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node 20+" /></a>
17
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node.js 20+" /></a>
15
18
  <a href="https://docs.monkeytest.ai"><img src="https://img.shields.io/badge/docs-docs.monkeytest.ai-7c3aed" alt="Documentation" /></a>
16
19
  <a href="https://github.com/monkeytestai/monkeytester/actions/workflows/ci.yml"><img src="https://github.com/monkeytestai/monkeytester/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
17
20
  <a href="https://github.com/monkeytestai/monkeytester/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-64748b" alt="AGPL-3.0" /></a>
18
21
  </p>
19
22
 
20
23
  <p align="center">
21
- <a href="https://docs.monkeytest.ai/guide/quick-start">Quick start</a> ·
22
- <a href="https://docs.monkeytest.ai/guide/why-monkeytest">Why monkeytest</a> ·
23
- <a href="https://docs.monkeytest.ai/guide/llm-providers">LLM providers</a> ·
24
- <a href="https://docs.monkeytest.ai/guide/cost-and-depth">Cost & depth</a> ·
25
- <a href="https://docs.monkeytest.ai/reference/overview">API</a> ·
24
+ <a href="https://docs.monkeytest.ai/getting-started/quick-start">Quick start</a> ·
25
+ <a href="https://docs.monkeytest.ai/guides/how-is-this-different">How is this different?</a> ·
26
+ <a href="https://docs.monkeytest.ai/reference/cli">CLI</a> ·
27
+ <a href="https://docs.monkeytest.ai/guides/llm-providers">LLM providers</a> ·
26
28
  <a href="https://monkeytest.ai">Cloud</a>
27
29
  </p>
28
30
 
29
- ---
31
+ `@monkeytestai/monkeytester` is an AGPL-3.0 TypeScript engine. The CLI is `monkeytest`. npm `latest` is **0.6.1**. Pre-release builds, including the tree on `main`, publish under the **`next`** tag.
30
32
 
31
- Most "AI testing" tools stop at *finding* bugs. monkeytester is built around the **full loop**:
33
+ ## Quick start
32
34
 
33
- > **find → fix → re-run the same plan → diff what changed.**
34
-
35
- Point it at a URL. It crawls a few pages, asks an LLM *"what would a real user try here?"*, runs those flows step by step, and writes a stable, versioned `plan.json` you can commit to git. Tomorrow, after you ship a fix, **`monkeytest rerun`** re-executes the *exact same* plan — no LLM cost for re-planning, no plan drift between runs — and **`monkeytest diff`** tells you what's new, what's fixed, what regressed.
35
+ ### 1. npx
36
36
 
37
37
  ```bash
38
- npx monkeytest run https://example.com # first run: explore + plan + execute, exit 1 if bugs
39
- # ...you ship a fix...
40
- npx monkeytest rerun # re-runs the same plan, exit 1 if any blocking bug remains
41
- npx monkeytest diff prev latest # 2 fixed, 0 new, 1 still broken, 0 regressed (net -2)
38
+ npx --yes @monkeytestai/monkeytester@latest --help
42
39
  ```
43
40
 
44
- Those subcommands come from `npm install @monkeytestai/monkeytester`. A clone runs them with `node dist/cli.js`.
41
+ That prints the commands. It does not need an API key or a browser.
45
42
 
46
- Or programmatically — same primitives:
43
+ ### 2. Install
47
44
 
48
- ```ts
49
- import { Monkey, autoLLMConfig, savePlan, loadPlan, diffRuns, saveRun } from '@monkeytestai/monkeytester';
45
+ ```bash
46
+ npm install @monkeytestai/monkeytester
47
+ npx playwright install chromium
48
+ ```
50
49
 
51
- const monkey = new Monkey({ llm: autoLLMConfig({ quality: 'balanced' }) });
50
+ pnpm, yarn, and bun install the same package (`pnpm add`, `yarn add`, `bun add`). Playwright downloads its own Chromium. These docs match `main`. For that build:
52
51
 
53
- // Day 1 — discover
54
- const { plan, run: a } = await monkey.executeAndTriage('https://example.com', {
55
- run: { screenshotsDir: '.monkeytest/shots' },
56
- });
57
- savePlan(plan, { dir: '.monkeytest' });
58
- saveRun(a, { dir: '.monkeytest' });
52
+ ```bash
53
+ npm install @monkeytestai/monkeytester@next
54
+ ```
59
55
 
60
- // Day 2 — verify after fixing
61
- const stored = loadPlan('.monkeytest');
62
- const { run: b } = await monkey.runFromPlan(stored.plan, {
63
- run: { screenshotsDir: '.monkeytest/shots' },
64
- });
65
- saveRun(b, { dir: '.monkeytest' });
56
+ ### 3. First run
66
57
 
67
- const diff = diffRuns(a, b);
68
- console.log(`${diff.stats.fixed} fixed, ${diff.stats.regressed} regressed`);
58
+ ```bash
59
+ export OPENAI_API_KEY="sk-..."
60
+ npx monkeytest run https://example.com --depth basic
69
61
  ```
70
62
 
71
- No fixtures, no page objects, no recorders. Read [the bug-finding loop](https://docs.monkeytest.ai/guide/the-bug-finding-loop) for the full story. The import above resolves from [`@monkeytestai/monkeytester`](https://www.npmjs.com/package/@monkeytestai/monkeytester) on npm. See [why monkeytest](https://docs.monkeytest.ai/guide/why-monkeytest) for how it sits next to similar tools.
63
+ With an OpenAI key, the default model is `gpt-4o-mini`. If several keys are set, auto-detect uses the first of: `GEMINI_API_KEY` or `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `MISTRAL_API_KEY`, `GROQ_API_KEY`, then `OPENAI_COMPATIBLE_BASE_URL`.
72
64
 
73
- ## Install
65
+ `--depth basic` is Quick pass: 6 pages, 5 LLM flows, page checks outside that budget, and a 120 second cap. About 10 cases, usually 1–2 minutes. `--max` and `--flows` override the page and flow caps.
74
66
 
75
- Node.js 20 or newer.
67
+ ### 4. Read the report
76
68
 
77
69
  ```bash
78
- npm install @monkeytestai/monkeytester
79
- npx playwright install chromium
70
+ npx monkeytest report
80
71
  ```
81
72
 
82
- [@monkeytestai/monkeytester](https://www.npmjs.com/package/@monkeytestai/monkeytester) **0.6.1** is the published package. The CLI is `npx monkeytest`.
73
+ | Path | What it is |
74
+ | --- | --- |
75
+ | `.monkeytest/plan.json` | The plan. `rerun` replays its trace. |
76
+ | `.monkeytest/runs/<id>.json` | The run: flows, bugs, outcome. |
77
+ | `.monkeytest/shots/` | Page and step PNGs, and one WebM per flow. |
78
+
79
+ Exit `0` when no blocking bug remains (`minor` does not fail the process). Exit `1` when `run` or `rerun` found a blocking bug, when `diff` found a new or more severe bug, or when `verify` still sees a bug firing. Exit `2` is bad arguments or no provider. Exit `3` is an engine error, including a crawl that opened no pages.
80
+
81
+ ## Demo
82
+
83
+ > **Not a recording.** A capture of a real `monkeytest run` is not in this repository yet. When it is added, it will be a real run (for example against [bananabeings.com](https://bananabeings.com)). The figure below is a diagram of the loop.
84
+
85
+ <p align="center">
86
+ <img alt="Diagram: monkeytest run, you fix the site, monkeytest rerun replays the same trace, monkeytest diff reports what changed. Not a captured session." src="docs/public/loop.svg" width="720" />
87
+ </p>
88
+
89
+ ## What you get
90
+
91
+ Page checks run without a model call. The five are console errors, same-site failed requests and broken links, axe-core WCAG A/AA, mobile overflow and tap targets at 375px, and title / description / lang / viewport / h1. Serious or critical axe violations are bugs. A flow is `passed` only when its outcome check verifies. No check is `inconclusive` with reason `no_assertion`. A check that cannot be decided is `assertion_unverifiable`.
92
+
93
+ The contributor smoke script stubs the LLM and crawls `https://example.com`. It does not call a provider. From a clone, after `npm run build` and `npx playwright install chromium`:
83
94
 
84
95
  ```bash
85
- export GEMINI_API_KEY="paste-your-key"
86
- npx monkeytest run https://example.com --depth basic
96
+ node scripts/smoke.mjs
87
97
  ```
88
98
 
89
- `--depth basic` is the free **Quick pass**: 6 pages, 5 LLM flows, and deterministic page checks outside that budget, with a 120 second cap. `standard` and `deep` are the broader presets. `--max` and `--flows` still override the page and flow caps. Import `BASIC_PRESET` from the package for the same numbers.
99
+ This is the output of `node scripts/smoke.mjs` on this repository after `npm run build`. The duration is from that run.
90
100
 
91
- A finished run includes:
101
+ ```text
102
+ · visited https://example.com/ — Static placeholder page used as the canonical example domain.
92
103
 
93
- | Field | Values |
94
- | ----- | ------ |
95
- | `outcome` | `bugs_found`, `clean`, `inconclusive`, `could_not_test` |
96
- | `outcome_reason` | Short code such as `automation_error`, `all_flows_skipped`, `site_unreachable`, `login_required`, `no_assertion`, `assertion_unverifiable`. `login_required` is also set on `clean` and `bugs_found` when `public_screens` is `0`. `no_assertion` means the journey had no outcome to verify |
97
- | `outcome_detail` | A sentence that matches the confirmed bug count, plus a next step. On a login-only site it says deeper journeys need an account |
98
- | `public_screens` | Number of crawled pages that are not auth-gated. `0` is a login-only site |
99
- | `engine_version` | Engine that produced the run, for example `0.7.0-beta.3` (`ENGINE_VERSION`) |
100
- | `signup_attempted`, `signup_verified`, `signup_status`, `signup_reason` | Set when a sign-up form was seen. Without your inbox, status is `not_tested` and reason is `no_inbox`. The package does not include an inbox |
104
+ [explore] done in 1.1 s
105
+ pages: 1 failures: 0
106
+ siteType: placeholder
101
107
 
102
- `could_not_test` means nothing was tested. Playwright errors from the runner are `inconclusive`, not bugs. Map these three fields straight onto `audit_run`.
108
+ [plan] flows: 6
109
+ - [happy_path] Visit the example.com homepage (2 steps)
110
+ - [visual] Console errors on load (1 steps)
111
+ - [visual] Broken requests and links (1 steps)
112
+ - [accessibility] WCAG A and AA (1 steps)
113
+ - [visual] Mobile layout (1 steps)
114
+ - [accessibility] Page metadata (1 steps)
103
115
 
104
- Screenshots are written to `.monkeytest/shots/`. A free Gemini key, or Ollama on localhost, is in the [quick start](https://docs.monkeytest.ai/guide/quick-start), including where `plan.json`, `runs/`, and `shots/` show up, and how `rerun` / `diff` work.
105
-
106
- ### From a clone (contributors)
116
+ OK — engine pipeline is wired correctly.
117
+ ```
107
118
 
108
- The no-key smoke script lives in the repository. It stubs the LLM, crawls `https://example.com`, and prints `OK — engine pipeline is wired correctly.`
119
+ When one confirmed bug is filed, the engine's `outcome_detail` is this sentence (asserted by the outcome tests, not a sample report):
109
120
 
110
- ```bash
111
- git clone https://github.com/monkeytestai/monkeytester.git && cd monkeytester
112
- npm install && npm run build
113
- npx playwright install chromium && node scripts/smoke.mjs
121
+ ```text
122
+ Found 1 confirmed bug. Open the top one and confirm it on the site before treating this run as healthy.
114
123
  ```
115
124
 
116
- `npm run build` writes `dist/cli.js`. The same subcommands are `node dist/cli.js run ...`.
125
+ On a login-only crawl (`public_screens` is `0`) the same case says deeper journeys need an account, and `outcome_reason` is `login_required`.
126
+
127
+ ## How is this different?
128
+
129
+ | | Who chooses the cases | What comes back |
130
+ | --- | --- | --- |
131
+ | **monkeytester** | The engine, from the pages it crawled | A stored plan, an honest outcome, then `rerun` and `diff` |
132
+ | **[Playwright](https://playwright.dev/docs/intro)** | You do. Playwright Test is an end-to-end framework for the tests you write. | A report for those scripts |
133
+ | **[browser-use](https://github.com/browser-use/browser-use)** | You do. Its README describes an open-source browser agent that carries out a task you give it. | The result of that task |
134
+ | **Recorders and other scripted QA tools** | You do, by recording a session or writing the steps | A replay of those steps |
117
135
 
118
- ## Docker
136
+ monkeytester decides what to try. A pass requires a verified outcome check, otherwise the result is `inconclusive`. `monkeytest rerun` replays the stored trace, and `monkeytest diff` compares fingerprints. More on the [comparison page](https://docs.monkeytest.ai/guides/how-is-this-different).
119
137
 
120
- A multi-stage image compiles this package and leaves it at `/opt/monkeytester` (`dist/`, `package.json`, and production dependencies) so another image can copy it, or so a sibling checkout can satisfy `file:../monkeytester`. `mtaiserver` still uses `file:../monkeytest-core` until that repo is updated. API keys and Playwright browsers are not in the image. Build, the sibling layout, and the pinned hosted SHA are in [DOCKER.md](./DOCKER.md).
138
+ ## Find, fix, rerun, diff
121
139
 
122
140
  ```bash
123
- docker build -t monkeytester:local .
124
- docker run --rm monkeytester:local --help
141
+ npx monkeytest run https://example.com --depth basic
142
+ # you ship a fix
143
+ npx monkeytest rerun
144
+ npx monkeytest diff prev latest
125
145
  ```
126
146
 
127
- ## Why monkeytester?
147
+ `rerun` replays the action trace and does not call the LLM. `--heal` may call the model when a stored locator misses. Runs saved before traces existed fall back to re-executing the plan with the LLM. `diff prev latest` compares the previous run to the newest one. The printer's line is `N new, N fixed, N still broken, N regressed (net ±N)`. It exits 1 when a bug is new or more severe.
128
148
 
129
- - **Closed loop, not just discovery.** Stable JSON plans + bug fingerprints + a real `rerun` and `diff` — built in, not bolted on.
130
- - **Drop-in, not framework.** One library, one constructor. No DSL.
131
- - **Bring your own LLM.** OpenAI, Gemini, Anthropic, Mistral, Groq, or any OpenAI-compatible endpoint (Ollama, vLLM, OpenRouter). Pick a different model **per phase**.
132
- - **Real evidence.** Per-step screenshots, optional WebM video, console + network failures, and bug reports with stable fingerprints across runs.
133
- - **Live activity stream.** Subscribe to a typed `EventBus` and pipe explorer / planner / runner / triager events into your own dashboard.
134
- - **Resilient.** If the planner fails, you still get explorer screenshots. If a flow blows up, you still get the steps that ran. Nothing is all-or-nothing.
135
- - **Hackable, typed, observable.** Pure TypeScript, zod-validated LLM output, structured `RunResult` you can serialise.
149
+ `monkeytest verify` replays each known bug and prints `fixed`, `still_broken`, `flaky`, `healed`, or `blocked`.
136
150
 
137
- ## A comprehensive example
151
+ The same loop from the library:
138
152
 
139
153
  ```ts
140
- import { Monkey, EventBus } from '@monkeytestai/monkeytester';
141
-
142
- const events = new EventBus();
143
- events.on(e => console.log(`[${e.phase}] ${e.type}: ${e.message}`));
144
-
145
- // Mix providers per phase: cheap explorer + smart planner + fast runner
146
- const monkey = new Monkey({
147
- llm: {
148
- explorer: { provider: 'gemini', model: 'gemini-flash-lite-latest' },
149
- planner: { provider: 'anthropic', model: 'claude-sonnet-4-5' },
150
- runner: { provider: 'groq', model: 'llama-3.3-70b-versatile' },
151
- },
152
- });
154
+ import { Monkey, autoLLMConfig, savePlan, saveRun, loadPlan, diffRuns } from '@monkeytestai/monkeytester';
153
155
 
154
- const { siteMap, plan, run } = await monkey.executeAndTriage('https://app.example.com', {
155
- events,
156
- explore: { maxPages: 12, screenshotsDir: '.monkeytest/shots' },
157
- plan: { maxFlows: 6, includeAuthFlows: false },
158
- run: { screenshotsDir: '.monkeytest/shots', headless: true, stepTimeoutMs: 20_000 },
156
+ const monkey = new Monkey({ llm: autoLLMConfig({ quality: 'balanced' }) });
157
+ const { plan, run: first } = await monkey.executeAndTriage('https://example.com', {
158
+ run: { screenshotsDir: '.monkeytest/shots' },
159
159
  });
160
+ savePlan(plan, { dir: '.monkeytest' });
161
+ saveRun(first, { dir: '.monkeytest' });
160
162
 
161
- console.log(`Visited ${siteMap.pages.length} pages, planned ${plan.flows.length} flows.`);
162
- console.log(`${run.outcome}: ${run.outcome_detail}`);
163
+ const stored = loadPlan('.monkeytest');
164
+ const { run: second } = await monkey.runFromPlan(stored.plan, {
165
+ run: { screenshotsDir: '.monkeytest/shots' },
166
+ });
167
+ saveRun(second, { dir: '.monkeytest' });
168
+ console.log(diffRuns(first, second).stats);
169
+ ```
163
170
 
164
- for (const bug of run.bugs.filter(b => b.severity !== 'minor')){
165
- console.error(`- [${bug.severity}] ${bug.title}\n ${bug.observed}`);
166
- console.error(` evidence: ${bug.evidence.screenshots.length} screenshot(s)`);
167
- }
171
+ ## CI
172
+
173
+ `run` already exits 1 on a blocking bug, so the job fails without a wrapper. Pass your preview URL in. The step below does not wait on a host for you.
174
+
175
+ ```yaml
176
+ name: monkeytest
177
+ on: [workflow_dispatch]
178
+ jobs:
179
+ monkeytest:
180
+ runs-on: ubuntu-latest
181
+ steps:
182
+ - uses: actions/setup-node@v4
183
+ with:
184
+ node-version: 20
185
+ - run: npm install @monkeytestai/monkeytester
186
+ - run: npx playwright install --with-deps chromium
187
+ - run: npx monkeytest run "$PREVIEW_URL" --depth basic
188
+ env:
189
+ PREVIEW_URL: https://example.com
190
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
168
191
  ```
169
192
 
170
- ## Where it shines
193
+ Upload `.monkeytest/shots/` and `.monkeytest/runs/` as artifacts when you want the evidence. The longer recipe is in the [CI guide](https://docs.monkeytest.ai/guides/ci).
171
194
 
172
- - **Pre-release sanity checks** on staging.
173
- - **PR previews** — run on Vercel/Netlify preview URLs in CI ([recipe](https://docs.monkeytest.ai/guide/ci)).
174
- - **Daily smoke runs** against prod with cheap models.
175
- - **Embedding in your own product** — the engine is a library, not a CLI.
195
+ ## LLM providers
176
196
 
177
- ## What it isn't
197
+ One provider per phase, or the same one everywhere. `autoLLMConfig({ quality: 'balanced' })` uses the cheap model for explore and run, and the smart model for the single planning call.
178
198
 
179
- - Not a replacement for **deterministic critical-path E2E tests** — it's a complement.
180
- - Not a **load tester** or **a11y auditor**.
181
- - Not magic — quality of bug reports tracks the quality of the LLM you give it.
199
+ | Provider | Flag | Key | Cheap model | Smart model |
200
+ | --- | --- | --- | --- | --- |
201
+ | OpenAI | `openai` | `OPENAI_API_KEY` | `gpt-4o-mini` | `gpt-4o` |
202
+ | Gemini | `gemini` | `GEMINI_API_KEY` or `GOOGLE_API_KEY` | `gemini-flash-lite-latest` | `gemini-flash-latest` |
203
+ | Anthropic | `anthropic` | `ANTHROPIC_API_KEY` | `claude-haiku-4-5` | `claude-sonnet-4-5` |
204
+ | Mistral | `mistral` | `MISTRAL_API_KEY` | `mistral-small-latest` | `mistral-large-latest` |
205
+ | Groq | `groq` | `GROQ_API_KEY` | `llama-3.3-70b-versatile` | `llama-3.3-70b-versatile` |
206
+ | OpenAI-compatible | `openai_compatible` | `OPENAI_COMPATIBLE_BASE_URL` | `gpt-4o-mini` | `gpt-4o` |
182
207
 
183
- ## Documentation
208
+ Ollama, vLLM, LM Studio, and OpenRouter use `openai_compatible` and `--base-url`. Model ids are the defaults in `CHEAP_FAST_MODEL` and `SMART_MODEL`. Details, including a local Ollama command: [LLM providers](https://docs.monkeytest.ai/guides/llm-providers).
184
209
 
185
- Everything lives at **[docs.monkeytest.ai](https://docs.monkeytest.ai)**:
210
+ ## Docs
186
211
 
187
- - [Quick start](https://docs.monkeytest.ai/guide/quick-start) — npm install, or a clone for the no-key smoke run, then Gemini or Ollama
188
- - [Why monkeytest](https://docs.monkeytest.ai/guide/why-monkeytest) — how it compares with nearby tools
189
- - [The bug-finding loop](https://docs.monkeytest.ai/guide/the-bug-finding-loop) — explore once, run repeatedly, diff
190
- - [CLI reference](https://docs.monkeytest.ai/reference/cli) — every subcommand and flag
191
- - [How it works](https://docs.monkeytest.ai/guide/architecture) — the four phases
192
- - [LLM providers](https://docs.monkeytest.ai/guide/llm-providers) — model picks per provider
193
- - [Cost & depth](https://docs.monkeytest.ai/guide/cost-and-depth) — what each run costs
194
- - [Recipes](https://docs.monkeytest.ai/guide/recipes) — battle-tested patterns
195
- - [Use in CI](https://docs.monkeytest.ai/guide/ci) — GitHub Actions setup
196
- - [Troubleshooting](https://docs.monkeytest.ai/guide/troubleshooting) — common errors
212
+ [docs.monkeytest.ai](https://docs.monkeytest.ai)
197
213
 
198
- ## MonkeyTest Cloud
214
+ - [Quick start](https://docs.monkeytest.ai/getting-started/quick-start)
215
+ - [Your first run](https://docs.monkeytest.ai/getting-started/first-run) and [reading the report](https://docs.monkeytest.ai/getting-started/reading-the-report)
216
+ - [How is this different?](https://docs.monkeytest.ai/guides/how-is-this-different)
217
+ - [Rerun and diff](https://docs.monkeytest.ai/guides/rerun-and-diff)
218
+ - [Auth and login-only sites](https://docs.monkeytest.ai/guides/auth)
219
+ - [Sign-up testing with your own inbox](https://docs.monkeytest.ai/guides/signup)
220
+ - [Cost and depth](https://docs.monkeytest.ai/guides/cost-and-depth)
221
+ - [CLI](https://docs.monkeytest.ai/reference/cli), [config](https://docs.monkeytest.ai/reference/config), [API](https://docs.monkeytest.ai/reference/api), [report fields](https://docs.monkeytest.ai/reference/report)
199
222
 
200
- Don't want to run it yourself? **[MonkeyTest Cloud](https://monkeytest.ai)** is the same engine, fully managed: hosted browsers, history, dashboards, team accounts.
223
+ Hosted runs of the same engine: [monkeytest.ai](https://monkeytest.ai).
201
224
 
202
225
  ## Contributing
203
226
 
204
- PRs and issues welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
205
-
206
- ## Security
207
-
208
- Report vulnerabilities privately — see [SECURITY.md](./SECURITY.md).
227
+ Issues and pull requests are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md). Report vulnerabilities in private using [SECURITY.md](./SECURITY.md).
209
228
 
210
- ---
229
+ ## License
211
230
 
212
- <sub>AGPL-3.0 · `SPDX-License-Identifier: AGPL-3.0-only` · See [LICENSE](./LICENSE) for the full text and the [license summary](https://docs.monkeytest.ai/guide/license).</sub>
231
+ [AGPL-3.0-only](./LICENSE). `SPDX-License-Identifier: AGPL-3.0-only`. You can run and self-host it. If you modify the engine and serve that modification as a network service, the Affero terms apply. Summary: [License](https://docs.monkeytest.ai/guides/license).
@@ -1 +1 @@
1
- {"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/automation/signatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,wBAAwB;IACvC,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,wBAAwB,EA+CjE,CAAC;AASX,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,C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AC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,oDAAoD;AACpD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAI9E;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAYlE;AAED,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAUvE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAMxD"}
@@ -49,6 +49,16 @@ export const AUTOMATION_FAULT_SIGNATURES = [
49
49
  pattern: 'waiting for locator|resolved to \\d+ elements|no element|no node',
50
50
  description: 'A selector the runner built matched nothing, or the wait was for that selector.',
51
51
  },
52
+ {
53
+ id: 'non-interactable-field',
54
+ pattern: 'non-interactable sign-up field|honeypot',
55
+ description: 'The runner tried to fill a hidden or non-interactable field before submit. Not a site bug.',
56
+ },
57
+ {
58
+ id: 'fill-did-not-stick',
59
+ pattern: 'field is still empty|fill did not change',
60
+ description: 'The runner filled a control and the value did not change. That is an automation error, not a site bug.',
61
+ },
52
62
  {
53
63
  id: 'selector-timeout',
54
64
  pattern: 'locator\\.(fill|click|press|waitfor)|timeout \\d+ms exceeded[\\s\\S]{0,160}locator|waiting for (getby|locator)',
@@ -1 +1 @@
1
- {"version":3,"file":"signatures.js","sourceRoot":"","sources":["../../src/automation/signatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsBH;;;;;;GAMG;AACH,MAAM,CAAC,M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,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,qBAAqB,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,IAAI,4BAA4B,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,iBAAiB,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"signatures.js","sourceRoot":"","sources":["../../src/automation/signatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsBH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAwC;IAC9E;QACE,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,6BAA6B;QACtC,WAAW,EAAE,2GAA2G;KACzH;IACD;QACE,EAAE,EAAE,cAAc;QAClB,OAAO,EAAE,uFAAuF;QAChG,WAAW,EAAE,iEAAiE;KAC/E;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,iFAAiF;QAC1F,WAAW,EAAE,6EAA6E;KAC3F;IACD;QACE,EAAE,EAAE,aAAa;QACjB,OAAO,EAAE,uBAAuB;QAChC,WAAW,EAAE,6CAA6C;KAC3D;IACD;QACE,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,2EAA2E;QACpF,WAAW,EAAE,8CAA8C;KAC5D;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,kEAAkE;QAC3E,WAAW,EAAE,iFAAiF;KAC/F;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,OAAO,EAAE,yCAAyC;QAClD,WAAW,EAAE,4FAA4F;KAC1G;IACD;QACE,EAAE,EAAE,oBAAoB;QACxB,OAAO,EAAE,0CAA0C;QACnD,WAAW,EAAE,wGAAwG;KACtH;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,gHAAgH;QACzH,WAAW,EAAE,iGAAiG;KAC/G;IACD;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,IAAI,GAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAAE,OAAO,IAAI,CAAC;IACvD,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QAAE,OAAO,IAAI,CAAC;IAClF,IAAI,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QAAE,OAAO,IAAI,CAAC;IACzF,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnH,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,qBAAqB,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,IAAI,4BAA4B,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,iBAAiB,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * How the Quick pass splits its wall clock.
3
+ *
4
+ * The runner deadline used to start before explore, so a slow planner spent
5
+ * the time the page checks need. Planning gets whatever is left after the
6
+ * crawl, minus a reserve for those checks. A planner that would eat the
7
+ * reserve is skipped and the grounded plan runs instead.
8
+ */
9
+ /** Time kept for the guaranteed checks after planning, on a 120s run. */
10
+ export declare const CHECK_EXECUTION_RESERVE_MS = 45000;
11
+ export declare function executionReserveMs(totalBudgetMs: number): number;
12
+ /**
13
+ * Milliseconds the planner may run. `undefined` means the run has no wall
14
+ * clock, so planning is not capped. `0` means skip the model and use the
15
+ * grounded plan so the checks still have their reserve.
16
+ */
17
+ export declare function plannerBudgetMs(opts: {
18
+ totalBudgetMs?: number;
19
+ /** Absolute deadline already chosen for the run, including explore time. */
20
+ deadlineAt?: number;
21
+ now?: number;
22
+ }): number | undefined;
23
+ //# sourceMappingURL=budget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../src/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,MAAM,GAAG,SAAS,CASrB"}
package/dist/budget.js ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * How the Quick pass splits its wall clock.
3
+ *
4
+ * The runner deadline used to start before explore, so a slow planner spent
5
+ * the time the page checks need. Planning gets whatever is left after the
6
+ * crawl, minus a reserve for those checks. A planner that would eat the
7
+ * reserve is skipped and the grounded plan runs instead.
8
+ */
9
+ /** Time kept for the guaranteed checks after planning, on a 120s run. */
10
+ export const CHECK_EXECUTION_RESERVE_MS = 45_000;
11
+ export function executionReserveMs(totalBudgetMs) {
12
+ if (!Number.isFinite(totalBudgetMs) || totalBudgetMs <= 0)
13
+ return 0;
14
+ return Math.min(CHECK_EXECUTION_RESERVE_MS, Math.floor(totalBudgetMs * 0.4));
15
+ }
16
+ /**
17
+ * Milliseconds the planner may run. `undefined` means the run has no wall
18
+ * clock, so planning is not capped. `0` means skip the model and use the
19
+ * grounded plan so the checks still have their reserve.
20
+ */
21
+ export function plannerBudgetMs(opts) {
22
+ const now = opts.now ?? Date.now();
23
+ const deadline = opts.deadlineAt ?? (opts.totalBudgetMs ? now + opts.totalBudgetMs : undefined);
24
+ if (deadline === undefined)
25
+ return undefined;
26
+ const total = opts.totalBudgetMs ?? Math.max(0, deadline - now);
27
+ const reserve = executionReserveMs(total);
28
+ return Math.max(0, deadline - now - reserve);
29
+ }
30
+ //# sourceMappingURL=budget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budget.js","sourceRoot":"","sources":["../src/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEjD,MAAM,UAAU,kBAAkB,CAAC,aAAqB;IACtD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,aAAa,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACpE,OAAO,IAAI,CAAC,GAAG,CAAC,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAK/B;IACC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,IAAI,CAClC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAC1D,CAAC;IACF,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,GAAG,OAAO,CAAC,CAAC;AAC/C,CAAC"}
@@ -7,6 +7,12 @@
7
7
  */
8
8
  import type { Page } from 'playwright';
9
9
  import type { Result } from 'axe-core';
10
+ /**
11
+ * Common, noisy WCAG hits. They stay bugs, but never above minor, and
12
+ * triage rolls every page into one item per rule.
13
+ */
14
+ export declare const AXE_MINOR_RULES: Set<string>;
15
+ export declare function axeBugSeverity(ruleId: string, impact: string): 'critical' | 'major' | 'minor';
10
16
  export interface AxeJudgement {
11
17
  serious: {
12
18
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"axe.d.ts","sourceRoot":"","sources":["../../src/checks/axe.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,gEAAgE;IAChE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAyBrE;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAG9D;AAED,yFAAyF;AACzF,wBAAgB,4BAA4B,IAAI,MAAM,EAAE,CAavD"}
1
+ {"version":3,"file":"axe.d.ts","sourceRoot":"","sources":["../../src/checks/axe.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC;;;GAGG;AACH,eAAO,MAAM,eAAe,aAG1B,CAAC;AAEH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAI7F;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxD,gEAAgE;IAChE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAyBrE;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAG9D;AAED,yFAAyF;AACzF,wBAAgB,4BAA4B,IAAI,MAAM,EAAE,CAavD"}
@@ -7,6 +7,21 @@
7
7
  */
8
8
  import AxeBuilder from '@axe-core/playwright';
9
9
  const TAGS = ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'];
10
+ /**
11
+ * Common, noisy WCAG hits. They stay bugs, but never above minor, and
12
+ * triage rolls every page into one item per rule.
13
+ */
14
+ export const AXE_MINOR_RULES = new Set([
15
+ 'color-contrast',
16
+ 'scrollable-region-focusable',
17
+ ]);
18
+ export function axeBugSeverity(ruleId, impact) {
19
+ if (AXE_MINOR_RULES.has(ruleId))
20
+ return 'minor';
21
+ if (impact === 'critical')
22
+ return 'critical';
23
+ return 'major';
24
+ }
10
25
  const LOGIN_FIELD = /type=["']?(?:password|email)|name=["']?(?:email|user|login|password)|autocomplete=["']?(?:username|email|current-password|new-password)/i;
11
26
  export function splitAxeViolations(violations) {
12
27
  const serious = [];
@@ -1 +1 @@
1
- {"version":3,"file":"axe.js","sourceRoot":"","sources":["../../src/checks/axe.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;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