@monkeytestai/monkeytester 0.0.0-stage → 0.5.1

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 (113) hide show
  1. package/CHANGELOG.md +179 -0
  2. package/LICENSE +661 -0
  3. package/NOTICE +12 -0
  4. package/README.md +196 -2
  5. package/dist/cli.d.ts +43 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +774 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/diff/index.d.ts +78 -0
  10. package/dist/diff/index.d.ts.map +1 -0
  11. package/dist/diff/index.js +119 -0
  12. package/dist/diff/index.js.map +1 -0
  13. package/dist/events.d.ts +66 -0
  14. package/dist/events.d.ts.map +1 -0
  15. package/dist/events.js +77 -0
  16. package/dist/events.js.map +1 -0
  17. package/dist/explorer/index.d.ts +131 -0
  18. package/dist/explorer/index.d.ts.map +1 -0
  19. package/dist/explorer/index.js +675 -0
  20. package/dist/explorer/index.js.map +1 -0
  21. package/dist/explorer/queue.d.ts +94 -0
  22. package/dist/explorer/queue.d.ts.map +1 -0
  23. package/dist/explorer/queue.js +277 -0
  24. package/dist/explorer/queue.js.map +1 -0
  25. package/dist/index.d.ts +36 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +22 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/llm/coerce.d.ts +59 -0
  30. package/dist/llm/coerce.d.ts.map +1 -0
  31. package/dist/llm/coerce.js +246 -0
  32. package/dist/llm/coerce.js.map +1 -0
  33. package/dist/llm/index.d.ts +79 -0
  34. package/dist/llm/index.d.ts.map +1 -0
  35. package/dist/llm/index.js +392 -0
  36. package/dist/llm/index.js.map +1 -0
  37. package/dist/llm/presets.d.ts +61 -0
  38. package/dist/llm/presets.d.ts.map +1 -0
  39. package/dist/llm/presets.js +101 -0
  40. package/dist/llm/presets.js.map +1 -0
  41. package/dist/monkey.d.ts +151 -0
  42. package/dist/monkey.d.ts.map +1 -0
  43. package/dist/monkey.js +323 -0
  44. package/dist/monkey.js.map +1 -0
  45. package/dist/persistence/index.d.ts +118 -0
  46. package/dist/persistence/index.d.ts.map +1 -0
  47. package/dist/persistence/index.js +196 -0
  48. package/dist/persistence/index.js.map +1 -0
  49. package/dist/planner/faults.d.ts +24 -0
  50. package/dist/planner/faults.d.ts.map +1 -0
  51. package/dist/planner/faults.js +128 -0
  52. package/dist/planner/faults.js.map +1 -0
  53. package/dist/planner/forms.d.ts +33 -0
  54. package/dist/planner/forms.d.ts.map +1 -0
  55. package/dist/planner/forms.js +163 -0
  56. package/dist/planner/forms.js.map +1 -0
  57. package/dist/planner/index.d.ts +31 -0
  58. package/dist/planner/index.d.ts.map +1 -0
  59. package/dist/planner/index.js +252 -0
  60. package/dist/planner/index.js.map +1 -0
  61. package/dist/planner/salvage.d.ts +16 -0
  62. package/dist/planner/salvage.d.ts.map +1 -0
  63. package/dist/planner/salvage.js +107 -0
  64. package/dist/planner/salvage.js.map +1 -0
  65. package/dist/runner/actions.d.ts +91 -0
  66. package/dist/runner/actions.d.ts.map +1 -0
  67. package/dist/runner/actions.js +659 -0
  68. package/dist/runner/actions.js.map +1 -0
  69. package/dist/runner/evidence.d.ts +37 -0
  70. package/dist/runner/evidence.d.ts.map +1 -0
  71. package/dist/runner/evidence.js +122 -0
  72. package/dist/runner/evidence.js.map +1 -0
  73. package/dist/runner/http5xx.d.ts +40 -0
  74. package/dist/runner/http5xx.d.ts.map +1 -0
  75. package/dist/runner/http5xx.js +189 -0
  76. package/dist/runner/http5xx.js.map +1 -0
  77. package/dist/runner/index.d.ts +88 -0
  78. package/dist/runner/index.d.ts.map +1 -0
  79. package/dist/runner/index.js +600 -0
  80. package/dist/runner/index.js.map +1 -0
  81. package/dist/runner/replay.d.ts +42 -0
  82. package/dist/runner/replay.d.ts.map +1 -0
  83. package/dist/runner/replay.js +458 -0
  84. package/dist/runner/replay.js.map +1 -0
  85. package/dist/runner/timeout.d.ts +16 -0
  86. package/dist/runner/timeout.d.ts.map +1 -0
  87. package/dist/runner/timeout.js +38 -0
  88. package/dist/runner/timeout.js.map +1 -0
  89. package/dist/trace/fingerprint.d.ts +78 -0
  90. package/dist/trace/fingerprint.d.ts.map +1 -0
  91. package/dist/trace/fingerprint.js +273 -0
  92. package/dist/trace/fingerprint.js.map +1 -0
  93. package/dist/trace/serialize.d.ts +15 -0
  94. package/dist/trace/serialize.d.ts.map +1 -0
  95. package/dist/trace/serialize.js +86 -0
  96. package/dist/trace/serialize.js.map +1 -0
  97. package/dist/triager/index.d.ts +86 -0
  98. package/dist/triager/index.d.ts.map +1 -0
  99. package/dist/triager/index.js +322 -0
  100. package/dist/triager/index.js.map +1 -0
  101. package/dist/types.d.ts +497 -0
  102. package/dist/types.d.ts.map +1 -0
  103. package/dist/types.js +10 -0
  104. package/dist/types.js.map +1 -0
  105. package/dist/verify/index.d.ts +52 -0
  106. package/dist/verify/index.d.ts.map +1 -0
  107. package/dist/verify/index.js +140 -0
  108. package/dist/verify/index.js.map +1 -0
  109. package/dist/verify/verdict.d.ts +34 -0
  110. package/dist/verify/verdict.d.ts.map +1 -0
  111. package/dist/verify/verdict.js +89 -0
  112. package/dist/verify/verdict.js.map +1 -0
  113. package/package.json +90 -4
@@ -0,0 +1,497 @@
1
+ /**
2
+ * Public, stable type contracts that flow between phases of the engine and
3
+ * out to consumers (the runner HTTP service, the SaaS server, the CLI).
4
+ *
5
+ * Anything exported from this file is part of the engine's public API — keep
6
+ * it small and intentional. Internal-only types live next to the code that
7
+ * uses them.
8
+ */
9
+ export type LLMProvider = 'openai' | 'gemini' | 'anthropic' | 'mistral' | 'groq' | 'openai_compatible';
10
+ /**
11
+ * Token accounting for a single completed LLM call, tagged with the model
12
+ * that served it. `LLM.lastUsage` only ever holds the most recent call, so
13
+ * hosts that need a per-run total should collect these instead.
14
+ */
15
+ export interface LLMUsageEvent {
16
+ /** Provider and model, eg "openai:gpt-4o-mini". */
17
+ provider: string;
18
+ /** Call site, eg "planner.designFlows". */
19
+ label?: string;
20
+ /** Total input tokens billed for this call (provider-reported). */
21
+ inputTokens?: number;
22
+ /** Of `inputTokens`, how many were served from the prompt cache. */
23
+ cachedInputTokens?: number;
24
+ /** Output / completion tokens. */
25
+ outputTokens?: number;
26
+ /** Whether this call wrote new content into the prompt cache. */
27
+ cacheWrite?: boolean;
28
+ }
29
+ /** Called once per completed LLM call. Must never throw. */
30
+ export type LLMUsageSink = (usage: LLMUsageEvent) => void;
31
+ export interface LLMConfig {
32
+ provider: LLMProvider;
33
+ model?: string;
34
+ apiKey?: string;
35
+ /**
36
+ * Optional base URL for self-hosted or OpenAI-compatible endpoints
37
+ * (Ollama, LM Studio, vLLM, OpenRouter, Groq, Together, …). Used by the
38
+ * `openai_compatible` provider; ignored by hosted providers.
39
+ */
40
+ baseURL?: string;
41
+ /** Sampling temperature override (default 0.2 — JSON tasks). */
42
+ temperature?: number;
43
+ /**
44
+ * Optional callback invoked after every successful call, so a host can sum
45
+ * token spend across a whole run. Pass the same sink to every phase's config
46
+ * to get a single run-wide total.
47
+ */
48
+ onUsage?: LLMUsageSink;
49
+ }
50
+ /**
51
+ * Tiered LLM configuration. Each phase can use a different provider/model so
52
+ * teams can mix a cheap model for the chatty crawl phase with a smarter model
53
+ * for planning, and a fast/cheap model again for per-step tool resolution.
54
+ *
55
+ * - `explorer` — per-page summaries (high call volume; cheap is fine)
56
+ * - `planner` — single high-stakes call to design the test flows (use the
57
+ * smartest tier you can afford)
58
+ * - `runner` — per-step "what tool should I call?" decisions (call volume
59
+ * scales with steps; cheap is fine)
60
+ * - `triager` — optional LLM polish pass that rewrites bug titles,
61
+ * observed/expected wording, and triage notes from the
62
+ * evidence the rule-based triager already collected. Cheap
63
+ * and resilient (per-bug try/catch with deterministic
64
+ * fallback). Set this when you want human-readable bug copy.
65
+ *
66
+ * Omit `runner` and the engine reuses `planner` (back-compat). Omit `triager`
67
+ * and the engine uses the rule-based triager only (zero extra LLM cost).
68
+ */
69
+ export interface MonkeyLLMConfig {
70
+ explorer: LLMConfig;
71
+ planner: LLMConfig;
72
+ runner?: LLMConfig;
73
+ triager?: LLMConfig;
74
+ }
75
+ /**
76
+ * One control inside a scraped form. Every property is optional because the
77
+ * DOM may only expose some of them. Hosts that only read `SiteMapForm.fields`
78
+ * can ignore this.
79
+ */
80
+ export interface SiteMapFormInput {
81
+ /** `name` attribute, when the control has one. */
82
+ name?: string;
83
+ /** Associated label, `aria-label`, or wrapping `<label>` text. */
84
+ label?: string;
85
+ placeholder?: string;
86
+ /** Input type, or `textarea` / `select` when the control has no type. */
87
+ type?: string;
88
+ }
89
+ /**
90
+ * A `<form>` scraped from the DOM. Absent fields mean the crawler did not
91
+ * see them. Hosts that do not know this type can ignore `SiteMapPage.forms`.
92
+ */
93
+ export interface SiteMapForm {
94
+ /** Resolved action URL when the browser provided one. */
95
+ action: string;
96
+ /** Lower-case method, usually `"get"` or `"post"`. */
97
+ method?: string;
98
+ /**
99
+ * Flat field tokens, unchanged for existing readers: `name`, then
100
+ * placeholder, then type. Prefer `inputs` when choosing a locator.
101
+ */
102
+ fields: string[];
103
+ /**
104
+ * Label, name, placeholder, and type for each entry in `fields`, when the
105
+ * crawler could read them. Omitted on older sitemaps. Additive.
106
+ */
107
+ inputs?: SiteMapFormInput[];
108
+ /** Visible label of the submit control, when the form had one. */
109
+ submitLabel?: string;
110
+ }
111
+ /**
112
+ * A button or link scraped from the DOM. Absent when the crawler did not
113
+ * see the attribute. Hosts that do not know this type can ignore
114
+ * `SiteMapPage.controls`.
115
+ */
116
+ export interface SiteMapControl {
117
+ kind: 'button' | 'link';
118
+ /** Visible label, trimmed. */
119
+ label: string;
120
+ /** Absolute href for a link, when the browser resolved one. */
121
+ href?: string;
122
+ /** True when the control is disabled. Omitted when it is enabled. */
123
+ disabled?: boolean;
124
+ }
125
+ export interface SiteMapPage {
126
+ url: string;
127
+ title: string;
128
+ /** What this page appears to do, in plain English. From the LLM. */
129
+ summary: string;
130
+ /** Salient interactive elements the LLM noticed. */
131
+ interactive: SiteMapInteractive[];
132
+ /** Outgoing in-domain links the explorer found on this page. */
133
+ outboundLinks: string[];
134
+ /**
135
+ * Forms scraped from the DOM. Omitted when the page has none.
136
+ * Additive: existing readers can ignore it.
137
+ */
138
+ forms?: SiteMapForm[];
139
+ /**
140
+ * Buttons and links scraped from the DOM. Omitted when the page has none.
141
+ * Additive: existing readers can ignore it. The planner uses this list to
142
+ * exercise fault surfaces without asking the model to invent controls.
143
+ */
144
+ controls?: SiteMapControl[];
145
+ /** Whether the page seems to require authentication. */
146
+ authGated: boolean;
147
+ /** Absolute path to the screenshot taken of this page, if requested. */
148
+ screenshotPath?: string;
149
+ }
150
+ export interface SiteMapInteractive {
151
+ kind: 'form' | 'button' | 'link' | 'input' | 'menu';
152
+ label: string;
153
+ /** A best-effort selector the runner can use later. Optional. */
154
+ selector?: string;
155
+ }
156
+ export interface SiteMap {
157
+ startUrl: string;
158
+ /** Inferred site type — e.g. "saas dashboard", "ecommerce", "blog". */
159
+ siteType: string;
160
+ /** One-paragraph plain-English description of the whole site. */
161
+ summary: string;
162
+ /** Brand / product name if the crawl made it obvious. */
163
+ productName?: string;
164
+ /** Real anonymous-visitor journeys the planner should prefer. */
165
+ publicJourneys?: string[];
166
+ /** Login / signup / OTP surfaces noticed but not entered. */
167
+ authSurfaces?: string[];
168
+ /**
169
+ * User-facing notes when a model response was incomplete and the crawl
170
+ * continued with a fallback. Omitted when every summary parsed. Hosts can
171
+ * show these strings as-is. Technical parser errors are not included.
172
+ */
173
+ warnings?: string[];
174
+ pages: SiteMapPage[];
175
+ /** Pages the explorer noticed but did not actually visit. */
176
+ pendingUrls: string[];
177
+ /** Pages where the crawler hit auth walls / errors. */
178
+ failedUrls: {
179
+ url: string;
180
+ reason: string;
181
+ }[];
182
+ }
183
+ export type FlowKind = 'happy_path' | 'edge_case' | 'auth_required' | 'destructive' | 'accessibility' | 'visual';
184
+ export interface TestStep {
185
+ /** Human-readable instruction the runner / agent should perform. */
186
+ action: string;
187
+ /** What the user expects to see / what the test is asserting. */
188
+ expectation?: string;
189
+ }
190
+ export interface TestFlow {
191
+ id: string;
192
+ name: string;
193
+ description: string;
194
+ kind: FlowKind;
195
+ /** Suggested starting URL — usually one from the SiteMap. */
196
+ startUrl: string;
197
+ steps: TestStep[];
198
+ /** Single-sentence success criterion for the whole flow. */
199
+ expectation: string;
200
+ /** Estimated risk if this fails for a real user. */
201
+ severityIfFails: 'critical' | 'major' | 'minor';
202
+ }
203
+ export interface TestPlan {
204
+ startUrl: string;
205
+ siteType: string;
206
+ flows: TestFlow[];
207
+ /** Free-form notes from the planner — caveats, scoping decisions, etc. */
208
+ notes?: string;
209
+ }
210
+ /**
211
+ * Outcome of a single step within a flow execution.
212
+ *
213
+ * `passed` — the step ran and the assertion (or implicit "didn't crash")
214
+ * succeeded.
215
+ * `failed` — the step ran but produced a clear bug — selector missing,
216
+ * page error, network failure on a critical request, etc.
217
+ * `blocked` — the step couldn't be attempted because a previous step failed
218
+ * (we still record it so the timeline reads cleanly).
219
+ * `skipped` — the planner asked us to do something we can't safely automate
220
+ * (real signups, payments, …).
221
+ */
222
+ export type StepStatus = 'passed' | 'failed' | 'blocked' | 'skipped';
223
+ export interface StepResult {
224
+ /** 1-indexed position of this step in the flow. */
225
+ index: number;
226
+ /** Verbatim instruction from the plan. */
227
+ action: string;
228
+ /** Optional expectation from the plan. */
229
+ expectation?: string;
230
+ status: StepStatus;
231
+ /** Plain-English description of what actually happened. */
232
+ observation: string;
233
+ /** Absolute path to the screenshot taken AFTER attempting this step. */
234
+ screenshotPath?: string;
235
+ /** Concrete tool the runner used: 'goto' | 'click' | 'fill' | … */
236
+ tool?: string;
237
+ /** Selector (or URL/value) the tool acted on, for the report timeline. */
238
+ target?: string;
239
+ /** Stable locator captured for replay (role, name, test id, CSS fallback). */
240
+ locator?: TraceLocator;
241
+ /**
242
+ * `recorded` — the action came from the trace (or the original LLM resolution).
243
+ * `healed` — the recorded locator missed and the LLM re-resolved the step.
244
+ */
245
+ resolution?: TraceResolution;
246
+ /** Wall-clock duration in milliseconds. */
247
+ durationMs?: number;
248
+ /** Console errors that fired while this step was executing. */
249
+ consoleErrors?: ConsoleErrorEvidence[];
250
+ /** Failed network requests recorded during this step. */
251
+ networkFailures?: NetworkFailureEvidence[];
252
+ /** Raw error message when status === 'failed'. */
253
+ error?: string;
254
+ }
255
+ export type FlowStatus = 'passed' | 'failed' | 'blocked' | 'error';
256
+ export interface FlowResult {
257
+ flowId: string;
258
+ name: string;
259
+ description: string;
260
+ kind: FlowKind;
261
+ startUrl: string;
262
+ status: FlowStatus;
263
+ /** Why the flow as a whole failed, if it did. */
264
+ failureReason?: string;
265
+ steps: StepResult[];
266
+ /** Wall-clock duration in milliseconds. */
267
+ durationMs: number;
268
+ /** BugReport ids that were produced from this flow. */
269
+ bugIds: string[];
270
+ /**
271
+ * Absolute path to the WebM screen recording for this flow. Playwright
272
+ * records the entire browser context from first navigation to context.close().
273
+ * The file is renamed to a predictable name after the flow finishes so the
274
+ * server can serve it without a manifest.
275
+ */
276
+ videoPath?: string;
277
+ /**
278
+ * Resolved actions for this flow, in order, including the opening navigation.
279
+ * `monkeytest rerun` replays this trace without calling the LLM.
280
+ * Absent on runs recorded before trace capture existed.
281
+ */
282
+ trace?: FlowTrace;
283
+ }
284
+ export interface RunResult {
285
+ startUrl: string;
286
+ startedAt: string;
287
+ finishedAt: string;
288
+ flows: FlowResult[];
289
+ bugs: BugReport[];
290
+ /** Aggregate stats for quick UI rendering. */
291
+ stats: {
292
+ flowsTotal: number;
293
+ flowsPassed: number;
294
+ flowsFailed: number;
295
+ /** Login / credential flows that were not executed. */
296
+ flowsBlocked: number;
297
+ stepsTotal: number;
298
+ stepsPassed: number;
299
+ stepsFailed: number;
300
+ bugsCritical: number;
301
+ bugsMajor: number;
302
+ bugsMinor: number;
303
+ };
304
+ }
305
+ export interface ConsoleErrorEvidence {
306
+ message: string;
307
+ level: 'error' | 'warning';
308
+ url?: string;
309
+ lineNumber?: number;
310
+ }
311
+ export interface NetworkFailureEvidence {
312
+ url: string;
313
+ method: string;
314
+ status?: number;
315
+ failureText?: string;
316
+ /** Playwright resource type (`document`, `xhr`, `fetch`, …) when the response was observed. */
317
+ resourceType?: string;
318
+ }
319
+ export type TraceTool = 'click' | 'fill' | 'goto' | 'wait' | 'assert_text' | 'press' | 'noop';
320
+ export type TraceLocatorStrategy = 'role' | 'text' | 'placeholder' | 'label' | 'testid' | 'css';
321
+ export type TraceResolution = 'recorded' | 'healed';
322
+ /**
323
+ * Everything replay needs to find the same element without asking the LLM.
324
+ * Strategies are tried in stability order: test id, role+name, label,
325
+ * placeholder, text, then the CSS fallback.
326
+ */
327
+ export interface TraceLocator {
328
+ strategy: TraceLocatorStrategy;
329
+ /** Primary target recorded with `strategy` (accessible name, text, selector, URL, test id). */
330
+ target: string;
331
+ role?: string;
332
+ name?: string;
333
+ text?: string;
334
+ testId?: string;
335
+ /** Last-resort CSS selector captured from the live element. */
336
+ css?: string;
337
+ placeholder?: string;
338
+ label?: string;
339
+ }
340
+ export interface TraceStep {
341
+ /** 0 is the opening navigation; planned steps start at 1. */
342
+ index: number;
343
+ /** Natural-language instruction from the plan, when this step came from one. */
344
+ action?: string;
345
+ expectation?: string;
346
+ tool: TraceTool;
347
+ locator?: TraceLocator;
348
+ /** Value typed (fill) or key pressed (press). */
349
+ value?: string;
350
+ /** Page URL before the action. */
351
+ urlBefore?: string;
352
+ /** Page URL after the action. */
353
+ urlAfter?: string;
354
+ /** ISO timestamp when the step started. */
355
+ startedAt?: string;
356
+ durationMs?: number;
357
+ status: StepStatus;
358
+ observation?: string;
359
+ error?: string;
360
+ screenshotPath?: string;
361
+ consoleErrors?: ConsoleErrorEvidence[];
362
+ networkFailures?: NetworkFailureEvidence[];
363
+ /** Absent or `recorded` on the original capture. `healed` is a replay annotation. */
364
+ resolution?: TraceResolution;
365
+ }
366
+ export interface FlowTrace {
367
+ version: 1;
368
+ flowId: string;
369
+ name: string;
370
+ description?: string;
371
+ kind?: FlowKind;
372
+ startUrl: string;
373
+ expectation?: string;
374
+ steps: TraceStep[];
375
+ }
376
+ /** Prefix of a flow trace through the failing step, stored on the bug itself. */
377
+ export interface BugTrace {
378
+ version: 1;
379
+ flowId: string;
380
+ startUrl: string;
381
+ steps: TraceStep[];
382
+ }
383
+ /**
384
+ * Inputs to a v2 fingerprint. Stored beside the hash so diff and verify can
385
+ * recompute it, and so a human can see why two bugs did or did not match.
386
+ */
387
+ export interface FingerprintParts {
388
+ version: 2;
389
+ /** Oracle that failed. Never an LLM tool name. */
390
+ category: string;
391
+ /** URL template; numeric ids, uuids, and timestamps replaced. */
392
+ location: string;
393
+ /** Accessible role, or empty when the failure is not element-scoped. */
394
+ role: string;
395
+ /** Normalised accessible name. */
396
+ name: string;
397
+ /** Coarse error class. Numbers, ids, and timestamps removed. */
398
+ errorSignal: string;
399
+ }
400
+ export interface BugEvidence {
401
+ screenshots: string[];
402
+ consoleErrors: ConsoleErrorEvidence[];
403
+ networkFailures: NetworkFailureEvidence[];
404
+ /** A trimmed DOM snapshot at the point of failure, if available. */
405
+ domSnapshot?: string;
406
+ }
407
+ export interface BugReport {
408
+ id: string;
409
+ /**
410
+ * Legacy identity. sha1 of action text + tool + a small error code, 16 hex
411
+ * chars. New triage still writes this exact algorithm so bugs already
412
+ * stored by a host (and compared as strings) keep matching. The stable
413
+ * identity is `fingerprintV2`.
414
+ */
415
+ fingerprint: string;
416
+ /**
417
+ * Stable identity: sha1 of `category | location | role | name | errorSignal`.
418
+ * The LLM tool name and raw error text are not inputs. Absent on bugs
419
+ * written before this field existed. See `fingerprintParts`.
420
+ */
421
+ fingerprintV2?: string;
422
+ /** Present on bugs triaged with the v2 scheme. */
423
+ fingerprintParts?: FingerprintParts;
424
+ /**
425
+ * Resolved actions from the start of the flow through the failing step,
426
+ * plus that step's screenshot / console / network evidence when captured.
427
+ */
428
+ trace?: BugTrace;
429
+ title: string;
430
+ severity: 'critical' | 'major' | 'minor';
431
+ affectedFlow: string;
432
+ reproSteps: string[];
433
+ observed: string;
434
+ expected: string;
435
+ evidence: BugEvidence;
436
+ /** 1–3 sentence explanation from the triager LLM. */
437
+ triageNotes: string;
438
+ }
439
+ export type MonkeyEvent = {
440
+ type: 'explore.start';
441
+ url: string;
442
+ } | {
443
+ type: 'explore.page';
444
+ page: SiteMapPage;
445
+ } | {
446
+ type: 'explore.complete';
447
+ siteMap: SiteMap;
448
+ } | {
449
+ type: 'plan.start';
450
+ } | {
451
+ type: 'plan.complete';
452
+ plan: TestPlan;
453
+ } | {
454
+ type: 'flow.start';
455
+ flow: TestFlow;
456
+ } | {
457
+ type: 'step.start';
458
+ flowId: string;
459
+ index: number;
460
+ step: TestStep;
461
+ } | {
462
+ type: 'step.screenshot';
463
+ flowId: string;
464
+ index: number;
465
+ path: string;
466
+ } | {
467
+ type: 'step.console_error';
468
+ flowId: string;
469
+ index: number;
470
+ error: ConsoleErrorEvidence;
471
+ } | {
472
+ type: 'step.network_failure';
473
+ flowId: string;
474
+ index: number;
475
+ failure: NetworkFailureEvidence;
476
+ } | {
477
+ type: 'step.complete';
478
+ flowId: string;
479
+ index: number;
480
+ ok: boolean;
481
+ details?: string;
482
+ } | {
483
+ type: 'flow.complete';
484
+ flowId: string;
485
+ ok: boolean;
486
+ } | {
487
+ type: 'bug.discovered';
488
+ bug: BugReport;
489
+ } | {
490
+ type: 'run.complete';
491
+ bugs: BugReport[];
492
+ } | {
493
+ type: 'error';
494
+ phase: string;
495
+ message: string;
496
+ };
497
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,SAAS,GACT,MAAM,GACN,mBAAmB,CAAC;AAExB;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;I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,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACvF;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,SAAS,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Public, stable type contracts that flow between phases of the engine and
3
+ * out to consumers (the runner HTTP service, the SaaS server, the CLI).
4
+ *
5
+ * Anything exported from this file is part of the engine's public API — keep
6
+ * it small and intentional. Internal-only types live next to the code that
7
+ * uses them.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Replay each known bug's trace and decide whether it is fixed.
3
+ *
4
+ * The default path never calls an LLM. Pass `heal: true` plus an `llm` to
5
+ * re-resolve a step whose recorded locator no longer matches; that attempt
6
+ * is marked `healed` when the original failure does not come back.
7
+ */
8
+ import type { BugReport, RunResult } from '../types.js';
9
+ import { type ReplayOptions } from '../runner/replay.js';
10
+ import { aggregateVerdict, classifyAttempt, verifyExitCode, type VerifyAttempt, type VerifyVerdict } from './verdict.js';
11
+ export interface VerifyOptions extends ReplayOptions {
12
+ /** How many times to replay each bug. Default 1. */
13
+ repeat?: number;
14
+ /** When set, only bugs with these fingerprints are checked. */
15
+ fingerprints?: string[];
16
+ /** Explicit bug list. Defaults to `run.bugs` (after the fingerprint filter). */
17
+ bugs?: BugReport[];
18
+ }
19
+ export interface BugVerdict {
20
+ /** Legacy v1 hash. Hosts that stored `bug.fingerprint` can keep comparing it. */
21
+ fingerprint: string;
22
+ /** Stable hash when the bug was triaged with v2. */
23
+ fingerprintV2?: string;
24
+ bugId: string;
25
+ title: string;
26
+ severity: BugReport['severity'];
27
+ verdict: VerifyVerdict;
28
+ attempts: VerifyAttempt[];
29
+ /** How many attempts reproduced the bug. */
30
+ fired: number;
31
+ repeat: number;
32
+ detail: string;
33
+ }
34
+ export interface VerifyReport {
35
+ repeat: number;
36
+ heal: boolean;
37
+ results: BugVerdict[];
38
+ stats: {
39
+ total: number;
40
+ fixed: number;
41
+ still_broken: number;
42
+ flaky: number;
43
+ healed: number;
44
+ blocked: number;
45
+ };
46
+ /** 1 when any bug is `still_broken` or `flaky`; otherwise 0. */
47
+ exitCode: 0 | 1;
48
+ }
49
+ export declare function verifyBugs(run: RunResult, opts: VerifyOptions): Promise<VerifyReport>;
50
+ export { aggregateVerdict, classifyAttempt, verifyExitCode };
51
+ export type { VerifyAttempt, VerifyVerdict };
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verify/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAuB,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,EA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