@pcamarajr/scout 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -14
- package/dist/cli.js +63 -21
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +6 -1
- package/dist/config.js +4 -1
- package/dist/config.js.map +1 -1
- package/dist/engine.d.ts +11 -0
- package/dist/engine.js +46 -21
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +22 -12
- package/dist/mcp/server.js.map +1 -1
- package/dist/report.d.ts +4 -2
- package/dist/report.js +26 -17
- package/dist/report.js.map +1 -1
- package/dist/runner/ai-runner.d.ts +25 -0
- package/dist/runner/ai-runner.js +106 -28
- package/dist/runner/ai-runner.js.map +1 -1
- package/dist/specs.d.ts +33 -0
- package/dist/specs.js +198 -0
- package/dist/specs.js.map +1 -0
- package/dist/store.d.ts +6 -15
- package/dist/store.js +50 -54
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +20 -5
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🔭 Scout
|
|
2
2
|
|
|
3
|
-
Self-healing browser QA. Scenarios written in **natural language
|
|
3
|
+
Self-healing browser QA. Scenarios written in **natural language** as versioned `.scout.md` files, verified by an **AI agent** in a real browser (Playwright), and recorded as a **deterministic script** that runs cheaply and quickly in CI — AI only kicks in when the script breaks.
|
|
4
4
|
|
|
5
5
|
> Status: functional POC.
|
|
6
6
|
|
|
@@ -16,11 +16,11 @@ Self-healing browser QA. Scenarios written in **natural language**, verified by
|
|
|
16
16
|
**Scenario lifecycle:**
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
scout create "Paywall free" -c "Open ep 3 of series X without login; paywall should appear with signup CTA"
|
|
20
|
-
│
|
|
19
|
+
scout create "Paywall free" -f paywall -c "Open ep 3 of series X without login; paywall should appear with signup CTA"
|
|
20
|
+
│ (writes a `## Paywall free` section into .scout/specs/paywall.scout.md)
|
|
21
21
|
▼
|
|
22
22
|
scout go ──── 1st run: AI agent runs in browser, judges (verified/failed/partial/blocked)
|
|
23
|
-
│ and records .scout/scripts/paywall-free.json (deterministic steps + assertions)
|
|
23
|
+
│ and records .scout/scripts/paywall/paywall-free.json (deterministic steps + assertions)
|
|
24
24
|
▼
|
|
25
25
|
CI / subsequent runs: pure Playwright replay, no LLM, seconds per scenario
|
|
26
26
|
│
|
|
@@ -35,8 +35,9 @@ UI changed and replay broke? ── AI re-runs, re-judges, re-records the script
|
|
|
35
35
|
npm install @pcamarajr/scout # or npm link during POC
|
|
36
36
|
npx playwright install chromium # browser engine
|
|
37
37
|
|
|
38
|
-
scout init # creates scout.config.json + .scout/
|
|
38
|
+
scout init # creates scout.config.json + .scout/specs/
|
|
39
39
|
scout create "Login with Google" \
|
|
40
|
+
-f auth \
|
|
40
41
|
-c "On logged-out home, click Sign In; login page should show Google and email/password options" \
|
|
41
42
|
-p anon
|
|
42
43
|
scout go # 1st run = AI (requires Anthropic credentials)
|
|
@@ -50,6 +51,40 @@ scout report # markdown ready to embed in PR body
|
|
|
50
51
|
- **CI/headless:** export `ANTHROPIC_API_KEY`. The SDK is self-contained (Claude Code CLI not required).
|
|
51
52
|
- Deterministic replay **does not use LLM** — in CI without a key, use `scout go --no-heal` (failure becomes ❌ in the report instead of healing).
|
|
52
53
|
|
|
54
|
+
## Scenarios are files (`.scout.md`)
|
|
55
|
+
|
|
56
|
+
Scenarios live as markdown under `.scout/specs/**/*.scout.md` — **one file per feature/component**, versioned and reviewed like the rest of your tests. The markdown is the **source of truth and a pure input**: a run never writes back to it. Status and last-run derive from `.scout/runs/` instead, so the spec diff only ever reflects an intent change, never run noise. The layout mirrors the Playwright Agents test-plan format, with YAML frontmatter as a scout superset.
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
---
|
|
60
|
+
feature: Paywall # optional; defaults to the filename
|
|
61
|
+
profile: anon # default auth profile for scenarios below
|
|
62
|
+
tags: [monetization] # optional
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Free user hits paywall on ep 3
|
|
66
|
+
Open ep 3 of series X without login; paywall appears with a signup CTA.
|
|
67
|
+
|
|
68
|
+
## Subscriber bypasses paywall
|
|
69
|
+
profile: qa # per-scenario override (also: notes, tags)
|
|
70
|
+
|
|
71
|
+
Logged-in subscriber opens ep 3; plays with no paywall.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- Each `##` heading is one scenario; its **logical slug** is `<file>/<scenario>` (e.g. `paywall/free-user-hits-paywall-on-ep-3`), unique across the suite.
|
|
75
|
+
- Optional `profile`/`notes`/`tags` lines right after a heading override the file-level defaults.
|
|
76
|
+
- Author by hand, or via `scout create <name> -f <feature> -c <text>` / the `scout_create_scenario` MCP tool.
|
|
77
|
+
|
|
78
|
+
### Migrating from a legacy `scenarios.json`
|
|
79
|
+
|
|
80
|
+
Older scouts kept a single `.scout/scenarios.json`. Convert it once:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
scout migrate # → one .scout/specs/<slug>.scout.md per scenario, relocates cached scripts, backs up the JSON
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
It's idempotent and preserves cached scripts (so replay still works without re-recording). Re-run `scout go` once afterward to repopulate run status. Review the generated `feature:` frontmatter and delete the `.scout/scenarios.json.bak` when happy.
|
|
87
|
+
|
|
53
88
|
## Auth profiles (storageState)
|
|
54
89
|
|
|
55
90
|
Authenticated flows use sessions captured once per environment:
|
|
@@ -75,14 +110,17 @@ In CI, generate the storageState in a setup step (login via script) or let the a
|
|
|
75
110
|
|
|
76
111
|
## Worktrees and environments
|
|
77
112
|
|
|
78
|
-
Everything is relative to the project directory and the target
|
|
113
|
+
Everything is relative to the project directory and the target can be overridden per run — two worktrees run in parallel without colliding:
|
|
79
114
|
|
|
80
115
|
```bash
|
|
81
|
-
|
|
116
|
+
scout go --base-url http://localhost:3001 # worktree B pointing to its ephemeral server
|
|
117
|
+
SCOUT_BASE_URL=http://localhost:3001 scout go # same, via env
|
|
82
118
|
SCOUT_BASE_URL=https://staging.myapp.com scout go --no-heal # against staging
|
|
83
119
|
```
|
|
84
120
|
|
|
85
|
-
-
|
|
121
|
+
Precedence: `--base-url` flag (or the `baseUrl` param of the `scout_run` MCP tool) > `SCOUT_BASE_URL` > `baseUrl` in `scout.config.json`. Recorded scripts store navigation **relative to the baseUrl in effect at recording time**, so a script recorded against `:3000` replays unchanged against `:3001` or staging.
|
|
122
|
+
|
|
123
|
+
- `.scout/specs/` (the `.scout.md` suite) and `.scout/scripts/` are **committed** — the suite travels with the branch.
|
|
86
124
|
- `.scout/runs/` and `.scout/state/` are **gitignored** — artifacts and sessions are per-machine.
|
|
87
125
|
|
|
88
126
|
## Per-run artifacts
|
|
@@ -137,12 +175,13 @@ With heal in CI: add `ANTHROPIC_API_KEY` and switch to `npx scout go` — when t
|
|
|
137
175
|
## Full CLI
|
|
138
176
|
|
|
139
177
|
```
|
|
140
|
-
scout init # bootstrap in the project
|
|
141
|
-
scout create <name> -c <scenario> [-p profile] [-n notes]
|
|
178
|
+
scout init # bootstrap in the project (.scout/specs/ + config)
|
|
179
|
+
scout create <name> -f <feature> -c <scenario> [-p profile] [-n notes]
|
|
142
180
|
scout list # scenarios + status + 📜 if cached script exists
|
|
143
|
-
scout go [-s
|
|
181
|
+
scout go [-s slug|name] [--ai] [--no-heal] [--headed] [--base-url <url>]
|
|
144
182
|
scout report [--json] [--check] # suite summary (markdown default)
|
|
145
|
-
scout
|
|
183
|
+
scout migrate # legacy scenarios.json → .scout.md specs
|
|
184
|
+
scout login <profile> [--base-url <url>] # capture storageState in headed browser
|
|
146
185
|
scout mcp # MCP server stdio
|
|
147
186
|
```
|
|
148
187
|
|
|
@@ -162,7 +201,7 @@ scout report --json --check # prints the JSON AND sets the exit code
|
|
|
162
201
|
```jsonc
|
|
163
202
|
{
|
|
164
203
|
"scenarios": [
|
|
165
|
-
{ "
|
|
204
|
+
{ "slug": "paywall/paywall-free", "name": "Paywall free", "feature": "Paywall", "profile": "anon", "status": "verified", "lastRun": "2026-06-10T12:00:00.000Z" }
|
|
166
205
|
],
|
|
167
206
|
"summary": { "total": 4, "verified": 3, "failed": 1, "partial": 0, "blocked": 0, "pending": 0 }
|
|
168
207
|
}
|
|
@@ -184,6 +223,16 @@ npx scout report --check || { echo "Scout gate: non-verified scenarios"; exit 1;
|
|
|
184
223
|
| ⚠️ `partial` | Partially verified |
|
|
185
224
|
| 🚫 `blocked` | Couldn't reach the flow (app down, login broken) |
|
|
186
225
|
|
|
226
|
+
### Runner failure ≠ UI verdict
|
|
227
|
+
|
|
228
|
+
An AI run can also die without any verdict — agent ran out of turns, SDK error, dead subprocess. Scout treats that as an **infrastructure failure**, never as a judgment about the app:
|
|
229
|
+
|
|
230
|
+
1. **Forced verdict:** when the agent ends without calling `scout_verdict` (typically `maxTurns` exhausted), Scout resumes the same session with a tiny turn budget and demands a verdict based on what was already observed — a `partial` with context beats a silent death.
|
|
231
|
+
2. **Automatic retry:** if the rescue also fails, the whole AI run is retried once with a fresh browser and agent.
|
|
232
|
+
3. **Honest reporting:** if it still fails, the result is `blocked` with `runnerFailure` set in `result.json` (and flagged in `report.md` and the CLI output: 💥 *runner failure — not a UI judgment*), naming the cause (e.g. "agent exhausted the 40-turn limit") and pointing at the run artifacts. Rerun it instead of debugging the app.
|
|
233
|
+
|
|
234
|
+
Every AI run aborts its Agent SDK query on completion (success or failure), so no `claude` subprocess outlives the run.
|
|
235
|
+
|
|
187
236
|
## Architecture
|
|
188
237
|
|
|
189
238
|
```
|
|
@@ -191,7 +240,8 @@ src/
|
|
|
191
240
|
├── cli.ts # commander CLI
|
|
192
241
|
├── engine.ts # orchestrates: replay → (failed?) → AI heal → re-record
|
|
193
242
|
├── config.ts # scout.config.json + env overrides
|
|
194
|
-
├──
|
|
243
|
+
├── specs.ts # .scout.md parser + slug model + scenario writer
|
|
244
|
+
├── store.ts # .scout/ (specs, scripts, runs)
|
|
195
245
|
├── report.ts # per-run markdown + suite summary
|
|
196
246
|
├── runner/
|
|
197
247
|
│ ├── browser.ts # Playwright wrapper: snapshot with refs, trace, screenshots,
|
|
@@ -207,6 +257,7 @@ Design decisions:
|
|
|
207
257
|
- **Assertions are tools.** The agent registers each expectation via `browser_assert` — that's what makes the replay a real test, not just a click macro.
|
|
208
258
|
- **Recorded scripts are pruned before caching.** Agent retries (e.g. re-filling the same field) are deduplicated conservatively: an earlier `fill`/`select` is dropped only when a later one targets the same element and nothing in between (click/press/navigate) could have consumed the value. Clicks are never deduplicated.
|
|
209
259
|
- **Trace > video.** Playwright's trace.zip gives per-action screenshots, DOM, network, and console in a single navigable artifact. Raw video stays as an optional enhancement.
|
|
260
|
+
- **Scenarios are versioned source, not database rows.** One `.scout.md` per feature, reviewed in PRs like a `.test.ts`; the spec is a pure input that a run never mutates (status derives from `.scout/runs/`). The recorded JSON script is a derived sidecar — clean diffs, no run noise in history.
|
|
210
261
|
- **No server/dashboard.** State is the filesystem in the target repo; report is markdown. Pluggable into any project with `npm i` + 2 files.
|
|
211
262
|
|
|
212
263
|
## Known POC limitations
|
package/dist/cli.js
CHANGED
|
@@ -6,18 +6,20 @@ import { Command } from "commander";
|
|
|
6
6
|
import { chromium } from "playwright";
|
|
7
7
|
import { CONFIG_FILE, SCOUT_DIR, loadConfig } from "./config.js";
|
|
8
8
|
import { runScenario } from "./engine.js";
|
|
9
|
-
import { buildReport, renderSummary } from "./report.js";
|
|
9
|
+
import { buildReport, renderSummary, scenarioStatus } from "./report.js";
|
|
10
|
+
import { addScenario, slugify } from "./specs.js";
|
|
10
11
|
import { Store } from "./store.js";
|
|
11
12
|
// Rejeições fora da cadeia de await (SDK/Playwright em subprocesso) não podem
|
|
12
13
|
// derrubar a suíte inteira — logar e deixar o cenário corrente falhar sozinho.
|
|
13
14
|
process.on("unhandledRejection", (reason) => {
|
|
14
15
|
console.error(`\n⚠ unhandled rejection: ${reason instanceof Error ? reason.message : String(reason)}`);
|
|
15
16
|
});
|
|
17
|
+
const pkg = JSON.parse(fs.readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
16
18
|
const program = new Command();
|
|
17
19
|
program
|
|
18
20
|
.name("scout")
|
|
19
21
|
.description("Self-healing browser QA — natural-language scenarios, deterministic replay in CI")
|
|
20
|
-
.version(
|
|
22
|
+
.version(pkg.version);
|
|
21
23
|
program
|
|
22
24
|
.command("init")
|
|
23
25
|
.description("Creates scout.config.json and .scout/ in the current project")
|
|
@@ -42,32 +44,31 @@ program
|
|
|
42
44
|
});
|
|
43
45
|
program
|
|
44
46
|
.command("create <name>")
|
|
45
|
-
.description("
|
|
47
|
+
.description("Adds a scenario to a feature spec (.scout/specs/<feature>.scout.md)")
|
|
48
|
+
.requiredOption("-f, --feature <feature>", "Feature/component — the spec file this scenario goes into")
|
|
46
49
|
.requiredOption("-c, --scenario <text>", "Scenario in natural language: flow + expected behavior")
|
|
47
50
|
.option("-p, --profile <profile>", "Auth profile (from scout.config.json)")
|
|
48
51
|
.option("-n, --notes <notes>", "Extra notes for the agent")
|
|
49
52
|
.action((name, opts) => {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
console.error("Run `scout init` first.");
|
|
53
|
-
process.exit(1);
|
|
54
|
-
}
|
|
55
|
-
const scenario = store.addScenario({
|
|
53
|
+
const scenario = addScenario({
|
|
54
|
+
feature: opts.feature,
|
|
56
55
|
name,
|
|
57
56
|
scenario: opts.scenario,
|
|
58
57
|
profile: opts.profile,
|
|
59
58
|
notes: opts.notes,
|
|
60
59
|
});
|
|
61
|
-
console.log(`✓ Scenario
|
|
60
|
+
console.log(`✓ Scenario created: ${scenario.slug} (${scenario.file})`);
|
|
62
61
|
});
|
|
63
62
|
program
|
|
64
63
|
.command("list")
|
|
65
64
|
.description("Lists scenarios and status")
|
|
66
65
|
.action(() => {
|
|
67
66
|
const store = new Store();
|
|
67
|
+
const latest = store.latestRuns();
|
|
68
68
|
for (const s of store.listScenarios()) {
|
|
69
69
|
const script = store.loadSteps(s.slug) ? "📜" : " ";
|
|
70
|
-
|
|
70
|
+
const status = scenarioStatus(s.slug, latest);
|
|
71
|
+
console.log(`${script} [${status.padEnd(8)}] ${s.slug} — ${s.name} (${s.profile ?? "anonymous"})`);
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
program
|
|
@@ -77,12 +78,13 @@ program
|
|
|
77
78
|
.option("--ai", "Force AI-driven run (re-records the script)", false)
|
|
78
79
|
.option("--no-heal", "Do not fall back to AI when replay fails (cheap CI)")
|
|
79
80
|
.option("--headed", "Visible browser (local debug)", false)
|
|
81
|
+
.option("--base-url <url>", "Target app URL for this run (precedence: flag > SCOUT_BASE_URL > scout.config.json)")
|
|
80
82
|
.action(async (opts) => {
|
|
81
83
|
const store = new Store();
|
|
82
|
-
const config = loadConfig();
|
|
84
|
+
const config = loadConfig(process.cwd(), { baseUrl: opts.baseUrl });
|
|
83
85
|
const all = store.listScenarios();
|
|
84
86
|
const targets = opts.scenario
|
|
85
|
-
? all.filter((s) => s.
|
|
87
|
+
? all.filter((s) => s.slug === opts.scenario || s.name === opts.scenario)
|
|
86
88
|
: all;
|
|
87
89
|
if (!targets.length) {
|
|
88
90
|
console.error(opts.scenario ? `Scenario "${opts.scenario}" not found.` : "No scenarios. Use `scout create`.");
|
|
@@ -90,15 +92,16 @@ program
|
|
|
90
92
|
}
|
|
91
93
|
let failed = 0;
|
|
92
94
|
for (const scenario of targets) {
|
|
93
|
-
process.stdout.write(`▶
|
|
95
|
+
process.stdout.write(`▶ ${scenario.slug} ... `);
|
|
94
96
|
try {
|
|
95
97
|
const result = await runScenario(store, scenario, config, {
|
|
96
98
|
forceAi: opts.ai,
|
|
97
99
|
heal: opts.heal,
|
|
98
100
|
headed: opts.headed,
|
|
99
101
|
});
|
|
100
|
-
const icon = result.verdict === "verified" ? "✅" : result.verdict === "partial" ? "⚠️" : "❌";
|
|
101
|
-
|
|
102
|
+
const icon = result.runnerFailure ? "💥" : result.verdict === "verified" ? "✅" : result.verdict === "partial" ? "⚠️" : "❌";
|
|
103
|
+
const tag = result.runnerFailure ? " (runner failure — re-rode, não é veredito de UI)" : "";
|
|
104
|
+
console.log(`${icon} ${result.verdict}${tag} [${result.mode}${result.healed ? "+heal" : ""}] ${(result.durationMs / 1000).toFixed(1)}s`);
|
|
102
105
|
if (result.verdict !== "verified") {
|
|
103
106
|
console.log(` ↳ ${result.reason}`);
|
|
104
107
|
failed++;
|
|
@@ -120,21 +123,60 @@ program
|
|
|
120
123
|
.action((opts) => {
|
|
121
124
|
const store = new Store();
|
|
122
125
|
const scenarios = store.listScenarios();
|
|
126
|
+
const latest = store.latestRuns();
|
|
123
127
|
if (opts.json) {
|
|
124
|
-
console.log(JSON.stringify(buildReport(scenarios), null, 2));
|
|
128
|
+
console.log(JSON.stringify(buildReport(scenarios, latest), null, 2));
|
|
125
129
|
}
|
|
126
130
|
else {
|
|
127
|
-
console.log(renderSummary(scenarios,
|
|
131
|
+
console.log(renderSummary(scenarios, latest));
|
|
128
132
|
}
|
|
129
133
|
if (opts.check) {
|
|
130
|
-
process.exit(scenarios.every((s) => s.
|
|
134
|
+
process.exit(scenarios.every((s) => scenarioStatus(s.slug, latest) === "verified") ? 0 : 1);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
program
|
|
138
|
+
.command("migrate")
|
|
139
|
+
.description("Converts a legacy .scout/scenarios.json into .scout/specs/*.scout.md and relocates cached scripts")
|
|
140
|
+
.action(() => {
|
|
141
|
+
const store = new Store();
|
|
142
|
+
const legacy = path.join(process.cwd(), SCOUT_DIR, "scenarios.json");
|
|
143
|
+
if (!fs.existsSync(legacy)) {
|
|
144
|
+
console.log("Nothing to migrate — no .scout/scenarios.json found.");
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const old = JSON.parse(fs.readFileSync(legacy, "utf8"));
|
|
148
|
+
const existing = new Set(store.listScenarios().map((s) => s.slug));
|
|
149
|
+
let created = 0;
|
|
150
|
+
let scripts = 0;
|
|
151
|
+
let skipped = 0;
|
|
152
|
+
for (const s of old) {
|
|
153
|
+
const slug = `${slugify(s.slug)}/${slugify(s.name)}`;
|
|
154
|
+
if (existing.has(slug)) {
|
|
155
|
+
skipped++;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
// feature = old slug keeps the spec filename == old slug, so the cached
|
|
159
|
+
// script can be relocated deterministically under the new nested path.
|
|
160
|
+
addScenario({ feature: s.slug, name: s.name, scenario: s.scenario, profile: s.profile, notes: s.notes });
|
|
161
|
+
created++;
|
|
162
|
+
const oldScript = path.join(process.cwd(), SCOUT_DIR, "scripts", `${s.slug}.json`);
|
|
163
|
+
if (fs.existsSync(oldScript)) {
|
|
164
|
+
const newScript = store.scriptPath(slug);
|
|
165
|
+
fs.mkdirSync(path.dirname(newScript), { recursive: true });
|
|
166
|
+
fs.renameSync(oldScript, newScript);
|
|
167
|
+
scripts++;
|
|
168
|
+
}
|
|
131
169
|
}
|
|
170
|
+
fs.renameSync(legacy, legacy + ".bak");
|
|
171
|
+
console.log(`✓ Migrated ${created} scenario(s), relocated ${scripts} cached script(s)${skipped ? `, skipped ${skipped} already present` : ""}.`);
|
|
172
|
+
console.log(" Legacy file moved to .scout/scenarios.json.bak — review .scout/specs/ (and the `feature:` frontmatter) then delete the .bak.");
|
|
132
173
|
});
|
|
133
174
|
program
|
|
134
175
|
.command("login <profile>")
|
|
135
176
|
.description("Opens headed browser to capture a profile session (storageState)")
|
|
136
|
-
.
|
|
137
|
-
|
|
177
|
+
.option("--base-url <url>", "Target app URL (precedence: flag > SCOUT_BASE_URL > scout.config.json)")
|
|
178
|
+
.action(async (profileName, opts) => {
|
|
179
|
+
const config = loadConfig(process.cwd(), { baseUrl: opts.baseUrl });
|
|
138
180
|
if (!config.profiles[profileName]) {
|
|
139
181
|
console.error(`Profile "${profileName}" does not exist in ${CONFIG_FILE}. Add it first.`);
|
|
140
182
|
process.exit(1);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,8EAA8E;AAC9E,+EAA+E;AAC/E,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE;IAC1C,OAAO,CAAC,KAAK,CAAC,4BAA4B,MAAM,YAAY,K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AO,CAAC,MAAM,EAAE,CAAC,CAAC;QACtF,EAAE,CAAC,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;YAC5C,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;IAChD,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACtB,OAAO,CAAC,GAAG,CAAC,sBAAsB,SAAS,gBAAgB,CAAC,CAAC;AAC/D,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,2EAA2E,CAAC;KACxF,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC3D,MAAM,cAAc,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,UAAU,EAAE,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -27,5 +27,10 @@ export interface ScoutConfig {
|
|
|
27
27
|
}
|
|
28
28
|
export declare const CONFIG_FILE = "scout.config.json";
|
|
29
29
|
export declare const SCOUT_DIR = ".scout";
|
|
30
|
-
|
|
30
|
+
/** Per-invocation overrides (CLI flags, MCP tool params). Highest precedence. */
|
|
31
|
+
export interface ConfigOverrides {
|
|
32
|
+
baseUrl?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Precedence: overrides (flag) > env (SCOUT_*) > scout.config.json > defaults. */
|
|
35
|
+
export declare function loadConfig(cwd?: string, overrides?: ConfigOverrides): ScoutConfig;
|
|
31
36
|
export declare function resolveStorageState(profileName: string | undefined, config: ScoutConfig, cwd?: string): string | undefined;
|
package/dist/config.js
CHANGED
|
@@ -10,7 +10,8 @@ const DEFAULTS = {
|
|
|
10
10
|
locale: "pt-BR",
|
|
11
11
|
profiles: {},
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
/** Precedence: overrides (flag) > env (SCOUT_*) > scout.config.json > defaults. */
|
|
14
|
+
export function loadConfig(cwd = process.cwd(), overrides = {}) {
|
|
14
15
|
const file = path.join(cwd, CONFIG_FILE);
|
|
15
16
|
let fromFile = {};
|
|
16
17
|
if (fs.existsSync(file)) {
|
|
@@ -23,6 +24,8 @@ export function loadConfig(cwd = process.cwd()) {
|
|
|
23
24
|
merged.model = process.env.SCOUT_MODEL;
|
|
24
25
|
if (process.env.SCOUT_HEADED === "1")
|
|
25
26
|
merged.headless = false;
|
|
27
|
+
if (overrides.baseUrl)
|
|
28
|
+
merged.baseUrl = overrides.baseUrl;
|
|
26
29
|
return merged;
|
|
27
30
|
}
|
|
28
31
|
export function resolveStorageState(profileName, config, cwd = process.cwd()) {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA+B7B,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAC/C,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC,MAAM,QAAQ,GAAgB;IAC5B,OAAO,EAAE,uBAAuB;IAChC,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,EAAE;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA+B7B,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAC/C,MAAM,CAA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IAAI,CAAC,WAAW;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,YAAY,WAAW,mBAAmB,WAAW,eAAe,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU,EAAE,CAC5H,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAC5B,GAAG,EACH,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,WAAW,OAAO,CAAC,CAC7E,CAAC;IACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,6DAA6D;QAC7D,uEAAuE;QACvE,mDAAmD;QACnD,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CACb,4BAA4B,WAAW,uBAAuB,SAAS,4BAA4B,WAAW,wBAAwB,WAAW,EAAE,CACpJ,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -17,6 +17,17 @@ export interface RunOptions {
|
|
|
17
17
|
* no script / --ai → AI run; if verified, record the script
|
|
18
18
|
*/
|
|
19
19
|
export declare function runScenario(store: Store, scenario: Scenario, config?: ScoutConfig, opts?: RunOptions): Promise<RunResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Runs `attempt` until it produces a real verdict, retrying runner failures
|
|
22
|
+
* (agent died without calling scout_verdict) up to maxAttempts total runs.
|
|
23
|
+
* A verdict — even failed/blocked — is the agent's judgment and is never retried.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runAiWithRetry<T extends {
|
|
26
|
+
runnerFailure?: string;
|
|
27
|
+
}>(attempt: (attemptNo: number) => Promise<T>, maxAttempts?: number): Promise<{
|
|
28
|
+
outcome: T;
|
|
29
|
+
attempts: number;
|
|
30
|
+
}>;
|
|
20
31
|
/**
|
|
21
32
|
* Cleans the recorded trace before caching. The agent sometimes retries an
|
|
22
33
|
* input (e.g. re-fills the password field) — the earlier fill is redundant
|
package/dist/engine.js
CHANGED
|
@@ -38,7 +38,6 @@ export async function runScenario(store, scenario, config = loadConfig(), opts =
|
|
|
38
38
|
const trace = await session.close();
|
|
39
39
|
if (replay.passed) {
|
|
40
40
|
result = {
|
|
41
|
-
scenarioId: scenario.id,
|
|
42
41
|
slug: scenario.slug,
|
|
43
42
|
mode: "replay",
|
|
44
43
|
verdict: "verified",
|
|
@@ -64,7 +63,6 @@ export async function runScenario(store, scenario, config = loadConfig(), opts =
|
|
|
64
63
|
}
|
|
65
64
|
else {
|
|
66
65
|
result = {
|
|
67
|
-
scenarioId: scenario.id,
|
|
68
66
|
slug: scenario.slug,
|
|
69
67
|
mode: "replay",
|
|
70
68
|
verdict: "failed",
|
|
@@ -87,44 +85,71 @@ export async function runScenario(store, scenario, config = loadConfig(), opts =
|
|
|
87
85
|
result = { ...aiResult, startedAt, durationMs: Date.now() - start };
|
|
88
86
|
}
|
|
89
87
|
store.saveRunResult(result);
|
|
90
|
-
store.updateScenario(scenario.id, { status: result.verdict, lastRun: result.startedAt });
|
|
91
88
|
fs.writeFileSync(path.join(runDir, "report.md"), renderRunReport(result, scenario, store.loadSteps(scenario.slug)));
|
|
92
89
|
return result;
|
|
93
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Runs `attempt` until it produces a real verdict, retrying runner failures
|
|
93
|
+
* (agent died without calling scout_verdict) up to maxAttempts total runs.
|
|
94
|
+
* A verdict — even failed/blocked — is the agent's judgment and is never retried.
|
|
95
|
+
*/
|
|
96
|
+
export async function runAiWithRetry(attempt, maxAttempts = 2) {
|
|
97
|
+
let outcome;
|
|
98
|
+
for (let i = 1; i <= maxAttempts; i++) {
|
|
99
|
+
outcome = await attempt(i);
|
|
100
|
+
if (!outcome.runnerFailure)
|
|
101
|
+
return { outcome, attempts: i };
|
|
102
|
+
}
|
|
103
|
+
return { outcome, attempts: maxAttempts };
|
|
104
|
+
}
|
|
94
105
|
async function runAi(scenario, config, store, runDir, storageState, opts) {
|
|
95
106
|
const startedAt = new Date().toISOString();
|
|
96
107
|
const start = Date.now();
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
const transcript = [];
|
|
109
|
+
const screenshots = [];
|
|
110
|
+
let trace;
|
|
111
|
+
const { outcome, attempts } = await runAiWithRetry(async (attemptNo) => {
|
|
112
|
+
if (attemptNo > 1)
|
|
113
|
+
transcript.push(`[scout] Tentativa ${attemptNo}: run anterior falhou no runner — browser novo, agente novo.`);
|
|
114
|
+
const session = await BrowserSession.launch({
|
|
115
|
+
baseUrl: config.baseUrl,
|
|
116
|
+
headless: opts.headed ? false : config.headless,
|
|
117
|
+
storageState,
|
|
118
|
+
locale: config.locale,
|
|
119
|
+
runDir,
|
|
120
|
+
});
|
|
121
|
+
let result;
|
|
122
|
+
try {
|
|
123
|
+
result = await runWithAgent(session, scenario, config);
|
|
124
|
+
}
|
|
125
|
+
finally {
|
|
126
|
+
await session.screenshot("final-state").catch(() => { });
|
|
127
|
+
}
|
|
128
|
+
trace = await session.close();
|
|
129
|
+
transcript.push(...result.transcript);
|
|
130
|
+
for (const shot of session.screenshots)
|
|
131
|
+
if (!screenshots.includes(shot))
|
|
132
|
+
screenshots.push(shot);
|
|
133
|
+
return result;
|
|
103
134
|
});
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
outcome = await runWithAgent(session, scenario, config);
|
|
107
|
-
}
|
|
108
|
-
finally {
|
|
109
|
-
await session.screenshot("final-state").catch(() => { });
|
|
110
|
-
}
|
|
111
|
-
const trace = await session.close();
|
|
112
|
-
fs.writeFileSync(path.join(runDir, "transcript.md"), outcome.transcript.join("\n\n---\n\n"));
|
|
135
|
+
fs.writeFileSync(path.join(runDir, "transcript.md"), transcript.join("\n\n---\n\n"));
|
|
113
136
|
if (outcome.verdict === "verified" && outcome.steps.length) {
|
|
114
137
|
store.saveSteps(scenario.slug, pruneSteps(outcome.steps));
|
|
115
138
|
}
|
|
116
139
|
return {
|
|
117
|
-
scenarioId: scenario.id,
|
|
118
140
|
slug: scenario.slug,
|
|
119
141
|
mode: "ai",
|
|
120
142
|
verdict: outcome.verdict,
|
|
121
|
-
reason: outcome.
|
|
143
|
+
reason: outcome.runnerFailure
|
|
144
|
+
? `${outcome.reason} (${attempts} tentativas de AI run — investigue os artifacts em ${runDir})`
|
|
145
|
+
: outcome.reason,
|
|
122
146
|
stepCount: outcome.steps.length,
|
|
123
147
|
runDir,
|
|
124
148
|
startedAt,
|
|
125
149
|
durationMs: Date.now() - start,
|
|
126
|
-
screenshots
|
|
150
|
+
screenshots,
|
|
127
151
|
trace,
|
|
152
|
+
runnerFailure: outcome.runnerFailure,
|
|
128
153
|
};
|
|
129
154
|
}
|
|
130
155
|
/** Steps that can sit between two fills of the same field without consuming its value. */
|
package/dist/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAoB,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAWtE,SAAS,WAAW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AI,KAAK,QAAQ;YAAE,SAAS;QAC7D,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnF,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,8BAA8B;gBAC3C,MAAM;YACR,CAAC;YACD,6DAA6D;YAC7D,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;gBAAE,SAAS;YACpC,IAAI,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YAClD,MAAM,CAAC,sEAAsE;QAC/E,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAClE,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { loadConfig, type ScoutConfig, type ScoutProfile } from "./config.js";
|
|
2
|
-
export { pruneSteps, runScenario, type RunOptions } from "./engine.js";
|
|
3
|
-
export { buildReport, renderRunReport, renderSummary, type ReportData, type ReportScenario } from "./report.js";
|
|
1
|
+
export { loadConfig, type ConfigOverrides, type ScoutConfig, type ScoutProfile } from "./config.js";
|
|
2
|
+
export { pruneSteps, runAiWithRetry, runScenario, type RunOptions } from "./engine.js";
|
|
3
|
+
export { buildReport, renderRunReport, renderSummary, scenarioStatus, type ReportData, type ReportScenario } from "./report.js";
|
|
4
|
+
export { describeNoVerdict, relativizeUrl, type QueryEndInfo } from "./runner/ai-runner.js";
|
|
5
|
+
export { addScenario, loadScenarios, parseSpec, slugify, slugToToken, type NewScenarioInput } from "./specs.js";
|
|
4
6
|
export { Store } from "./store.js";
|
|
5
|
-
export type { RunResult, Scenario, Step, Target, Verdict } from "./types.js";
|
|
7
|
+
export type { RunResult, Scenario, ScenarioStatus, Step, Target, Verdict } from "./types.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { loadConfig } from "./config.js";
|
|
2
|
-
export { pruneSteps, runScenario } from "./engine.js";
|
|
3
|
-
export { buildReport, renderRunReport, renderSummary } from "./report.js";
|
|
2
|
+
export { pruneSteps, runAiWithRetry, runScenario } from "./engine.js";
|
|
3
|
+
export { buildReport, renderRunReport, renderSummary, scenarioStatus } from "./report.js";
|
|
4
|
+
export { describeNoVerdict, relativizeUrl } from "./runner/ai-runner.js";
|
|
5
|
+
export { addScenario, loadScenarios, parseSpec, slugify, slugToToken } from "./specs.js";
|
|
4
6
|
export { Store } from "./store.js";
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6D,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAmB,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAwC,MAAM,aAAa,CAAC;AAChI,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAqB,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAyB,MAAM,YAAY,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|