@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.
- package/CHANGELOG.md +51 -0
- package/README.md +152 -133
- package/dist/automation/signatures.d.ts.map +1 -1
- package/dist/automation/signatures.js +10 -0
- package/dist/automation/signatures.js.map +1 -1
- package/dist/budget.d.ts +23 -0
- package/dist/budget.d.ts.map +1 -0
- package/dist/budget.js +30 -0
- package/dist/budget.js.map +1 -0
- package/dist/checks/axe.d.ts +6 -0
- package/dist/checks/axe.d.ts.map +1 -1
- package/dist/checks/axe.js +15 -0
- package/dist/checks/axe.js.map +1 -1
- package/dist/checks/console.d.ts +4 -0
- package/dist/checks/console.d.ts.map +1 -1
- package/dist/checks/console.js +16 -1
- package/dist/checks/console.js.map +1 -1
- package/dist/checks/execute.d.ts +17 -1
- package/dist/checks/execute.d.ts.map +1 -1
- package/dist/checks/execute.js +92 -36
- package/dist/checks/execute.js.map +1 -1
- package/dist/checks/meta.d.ts +7 -4
- package/dist/checks/meta.d.ts.map +1 -1
- package/dist/checks/meta.js +8 -6
- package/dist/checks/meta.js.map +1 -1
- package/dist/checks/mobile.d.ts +8 -0
- package/dist/checks/mobile.d.ts.map +1 -1
- package/dist/checks/mobile.js +10 -3
- package/dist/checks/mobile.js.map +1 -1
- package/dist/checks/party.d.ts +19 -0
- package/dist/checks/party.d.ts.map +1 -0
- package/dist/checks/party.js +56 -0
- package/dist/checks/party.js.map +1 -0
- package/dist/checks/plan.js +4 -4
- package/dist/checks/plan.js.map +1 -1
- package/dist/checks/ready.d.ts +10 -0
- package/dist/checks/ready.d.ts.map +1 -0
- package/dist/checks/ready.js +22 -0
- package/dist/checks/ready.js.map +1 -0
- package/dist/cli.js +26 -3
- package/dist/cli.js.map +1 -1
- package/dist/explorer/authRedirect.d.ts +41 -0
- package/dist/explorer/authRedirect.d.ts.map +1 -0
- package/dist/explorer/authRedirect.js +129 -0
- package/dist/explorer/authRedirect.js.map +1 -0
- package/dist/explorer/index.d.ts +3 -3
- package/dist/explorer/index.d.ts.map +1 -1
- package/dist/explorer/index.js +43 -8
- package/dist/explorer/index.js.map +1 -1
- package/dist/explorer/queue.d.ts +10 -3
- package/dist/explorer/queue.d.ts.map +1 -1
- package/dist/explorer/queue.js +12 -11
- package/dist/explorer/queue.js.map +1 -1
- package/dist/explorer/screens.d.ts +23 -0
- package/dist/explorer/screens.d.ts.map +1 -0
- package/dist/explorer/screens.js +41 -0
- package/dist/explorer/screens.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +16 -13
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/prices.d.ts +28 -4
- package/dist/llm/prices.d.ts.map +1 -1
- package/dist/llm/prices.js +39 -11
- package/dist/llm/prices.js.map +1 -1
- package/dist/llm/temperature.d.ts +20 -0
- package/dist/llm/temperature.d.ts.map +1 -0
- package/dist/llm/temperature.js +47 -0
- package/dist/llm/temperature.js.map +1 -0
- package/dist/monkey.d.ts +1 -0
- package/dist/monkey.d.ts.map +1 -1
- package/dist/monkey.js +66 -11
- package/dist/monkey.js.map +1 -1
- package/dist/outcome/check.d.ts.map +1 -1
- package/dist/outcome/check.js +27 -9
- package/dist/outcome/check.js.map +1 -1
- package/dist/outcome.d.ts +1 -0
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +31 -1
- package/dist/outcome.js.map +1 -1
- package/dist/planner/forms.js +11 -1
- package/dist/planner/forms.js.map +1 -1
- package/dist/planner/index.d.ts.map +1 -1
- package/dist/planner/index.js +48 -12
- package/dist/planner/index.js.map +1 -1
- package/dist/planner/inventory.d.ts +6 -0
- package/dist/planner/inventory.d.ts.map +1 -1
- package/dist/planner/inventory.js +59 -0
- package/dist/planner/inventory.js.map +1 -1
- package/dist/runner/actions.d.ts +2 -0
- package/dist/runner/actions.d.ts.map +1 -1
- package/dist/runner/actions.js +181 -7
- package/dist/runner/actions.js.map +1 -1
- package/dist/runner/authNegative.d.ts.map +1 -1
- package/dist/runner/authNegative.js +81 -21
- package/dist/runner/authNegative.js.map +1 -1
- package/dist/runner/evidence.d.ts +27 -6
- package/dist/runner/evidence.d.ts.map +1 -1
- package/dist/runner/evidence.js +86 -10
- package/dist/runner/evidence.js.map +1 -1
- package/dist/runner/http5xx.d.ts.map +1 -1
- package/dist/runner/http5xx.js +1 -0
- package/dist/runner/http5xx.js.map +1 -1
- package/dist/runner/index.d.ts +10 -0
- package/dist/runner/index.d.ts.map +1 -1
- package/dist/runner/index.js +205 -113
- package/dist/runner/index.js.map +1 -1
- package/dist/runner/locate.d.ts.map +1 -1
- package/dist/runner/locate.js +101 -11
- package/dist/runner/locate.js.map +1 -1
- package/dist/runner/replay.d.ts +3 -0
- package/dist/runner/replay.d.ts.map +1 -1
- package/dist/runner/replay.js +4 -0
- package/dist/runner/replay.js.map +1 -1
- package/dist/runner/sensitive.d.ts +72 -0
- package/dist/runner/sensitive.d.ts.map +1 -0
- package/dist/runner/sensitive.js +348 -0
- package/dist/runner/sensitive.js.map +1 -0
- package/dist/signup/detect.d.ts +2 -0
- package/dist/signup/detect.d.ts.map +1 -1
- package/dist/signup/detect.js +14 -2
- package/dist/signup/detect.js.map +1 -1
- package/dist/signup/guard.d.ts.map +1 -1
- package/dist/signup/guard.js +53 -4
- package/dist/signup/guard.js.map +1 -1
- package/dist/signup/ledger.d.ts +4 -0
- package/dist/signup/ledger.d.ts.map +1 -1
- package/dist/signup/ledger.js +16 -4
- package/dist/signup/ledger.js.map +1 -1
- package/dist/signup/run.d.ts +2 -0
- package/dist/signup/run.d.ts.map +1 -1
- package/dist/signup/run.js +224 -51
- package/dist/signup/run.js.map +1 -1
- package/dist/signup/submit.d.ts +13 -0
- package/dist/signup/submit.d.ts.map +1 -0
- package/dist/signup/submit.js +40 -0
- package/dist/signup/submit.js.map +1 -0
- package/dist/trace/httpIdentity.d.ts +17 -0
- package/dist/trace/httpIdentity.d.ts.map +1 -0
- package/dist/trace/httpIdentity.js +61 -0
- package/dist/trace/httpIdentity.js.map +1 -0
- package/dist/trace/serialize.d.ts.map +1 -1
- package/dist/trace/serialize.js +2 -0
- package/dist/trace/serialize.js.map +1 -1
- package/dist/trace/stepLabel.d.ts +11 -0
- package/dist/trace/stepLabel.d.ts.map +1 -0
- package/dist/trace/stepLabel.js +49 -0
- package/dist/trace/stepLabel.js.map +1 -0
- package/dist/triager/index.d.ts +5 -1
- package/dist/triager/index.d.ts.map +1 -1
- package/dist/triager/index.js +146 -15
- package/dist/triager/index.js.map +1 -1
- package/dist/types.d.ts +133 -3
- package/dist/types.d.ts.map +1 -1
- 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
|
-
<
|
|
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">
|
|
8
|
+
<h1 align="center">Bugs your tests didn't think to look for.</h1>
|
|
6
9
|
|
|
7
10
|
<p align="center">
|
|
8
|
-
|
|
9
|
-
Open source. Playwright
|
|
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/
|
|
22
|
-
<a href="https://docs.monkeytest.ai/
|
|
23
|
-
<a href="https://docs.monkeytest.ai/
|
|
24
|
-
<a href="https://docs.monkeytest.ai/
|
|
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
|
-
|
|
33
|
+
## Quick start
|
|
32
34
|
|
|
33
|
-
|
|
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
|
|
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
|
-
|
|
41
|
+
That prints the commands. It does not need an API key or a browser.
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
### 2. Install
|
|
47
44
|
|
|
48
|
-
```
|
|
49
|
-
|
|
45
|
+
```bash
|
|
46
|
+
npm install @monkeytestai/monkeytester
|
|
47
|
+
npx playwright install chromium
|
|
48
|
+
```
|
|
50
49
|
|
|
51
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
savePlan(plan, { dir: '.monkeytest' });
|
|
58
|
-
saveRun(a, { dir: '.monkeytest' });
|
|
52
|
+
```bash
|
|
53
|
+
npm install @monkeytestai/monkeytester@next
|
|
54
|
+
```
|
|
59
55
|
|
|
60
|
-
|
|
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
|
-
|
|
68
|
-
|
|
58
|
+
```bash
|
|
59
|
+
export OPENAI_API_KEY="sk-..."
|
|
60
|
+
npx monkeytest run https://example.com --depth basic
|
|
69
61
|
```
|
|
70
62
|
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
67
|
+
### 4. Read the report
|
|
76
68
|
|
|
77
69
|
```bash
|
|
78
|
-
|
|
79
|
-
npx playwright install chromium
|
|
70
|
+
npx monkeytest report
|
|
80
71
|
```
|
|
81
72
|
|
|
82
|
-
|
|
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
|
-
|
|
86
|
-
npx monkeytest run https://example.com --depth basic
|
|
96
|
+
node scripts/smoke.mjs
|
|
87
97
|
```
|
|
88
98
|
|
|
89
|
-
|
|
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
|
-
|
|
101
|
+
```text
|
|
102
|
+
· visited https://example.com/ — Static placeholder page used as the canonical example domain.
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
### From a clone (contributors)
|
|
116
|
+
OK — engine pipeline is wired correctly.
|
|
117
|
+
```
|
|
107
118
|
|
|
108
|
-
|
|
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
|
-
```
|
|
111
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
138
|
+
## Find, fix, rerun, diff
|
|
121
139
|
|
|
122
140
|
```bash
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
151
|
+
The same loop from the library:
|
|
138
152
|
|
|
139
153
|
```ts
|
|
140
|
-
import { Monkey,
|
|
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
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
162
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
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
|
-
|
|
210
|
+
## Docs
|
|
186
211
|
|
|
187
|
-
|
|
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
|
-
|
|
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
|
-
|
|
223
|
+
Hosted runs of the same engine: [monkeytest.ai](https://monkeytest.ai).
|
|
201
224
|
|
|
202
225
|
## Contributing
|
|
203
226
|
|
|
204
|
-
|
|
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
|
-
|
|
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,
|
|
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,EAyDjE,CAAC;AASX,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,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,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,kBAAkB;QACtB,OAAO,EAAE,gHAAgH;QACzH,WAAW,EAAE,iGAAiG;KAC/G;IACD;QACE,EAAE,EAAE,mBAAmB;QACvB,OAAO,EAAE,6FAA6F;QACtG,WAAW,EAAE,+EAA+E;KAC7F;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,OAAO,EAAE,8CAA8C;QACvD,WAAW,EAAE,wNAAwN;QACrO,KAAK,EAAE,QAAQ;KAChB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}
|
package/dist/budget.d.ts
ADDED
|
@@ -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"}
|
package/dist/checks/axe.d.ts
CHANGED
|
@@ -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;
|
package/dist/checks/axe.d.ts.map
CHANGED
|
@@ -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"}
|
package/dist/checks/axe.js
CHANGED
|
@@ -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 = [];
|
package/dist/checks/axe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axe.js","sourceRoot":"","sources":["../../src/checks/axe.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OA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