screw-bugs 0.0.0-stage → 0.1.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.
Files changed (125) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +906 -2
  3. package/bin/screw-bugs.js +29 -0
  4. package/dist/browser-playwright/annotate.d.ts +9 -0
  5. package/dist/browser-playwright/annotate.js +86 -0
  6. package/dist/browser-playwright/capture.d.ts +232 -0
  7. package/dist/browser-playwright/capture.js +1049 -0
  8. package/dist/browser-playwright/frames.d.ts +77 -0
  9. package/dist/browser-playwright/frames.js +191 -0
  10. package/dist/browser-playwright/index.d.ts +2 -0
  11. package/dist/browser-playwright/index.js +2 -0
  12. package/dist/browser-playwright/input.d.ts +44 -0
  13. package/dist/browser-playwright/input.js +116 -0
  14. package/dist/browser-playwright/launch.d.ts +21 -0
  15. package/dist/browser-playwright/launch.js +86 -0
  16. package/dist/browser-playwright/page.d.ts +387 -0
  17. package/dist/browser-playwright/page.js +1930 -0
  18. package/dist/build-info.json +5 -0
  19. package/dist/cli/app.d.ts +19 -0
  20. package/dist/cli/app.js +70 -0
  21. package/dist/cli/build-info.d.ts +52 -0
  22. package/dist/cli/build-info.js +82 -0
  23. package/dist/cli/commands.d.ts +14 -0
  24. package/dist/cli/commands.js +308 -0
  25. package/dist/cli/config.d.ts +16 -0
  26. package/dist/cli/config.js +71 -0
  27. package/dist/cli/doctor.d.ts +19 -0
  28. package/dist/cli/doctor.js +113 -0
  29. package/dist/cli/environment.d.ts +20 -0
  30. package/dist/cli/environment.js +34 -0
  31. package/dist/cli/exit-codes.d.ts +29 -0
  32. package/dist/cli/exit-codes.js +28 -0
  33. package/dist/cli/failure.d.ts +20 -0
  34. package/dist/cli/failure.js +15 -0
  35. package/dist/cli/index.d.ts +6 -0
  36. package/dist/cli/index.js +6 -0
  37. package/dist/cli/install-method.d.ts +96 -0
  38. package/dist/cli/install-method.js +148 -0
  39. package/dist/cli/main.d.ts +1 -0
  40. package/dist/cli/main.js +10 -0
  41. package/dist/cli/mcp.d.ts +30 -0
  42. package/dist/cli/mcp.js +309 -0
  43. package/dist/cli/node-version.d.ts +3 -0
  44. package/dist/cli/node-version.js +22 -0
  45. package/dist/cli/operations.d.ts +127 -0
  46. package/dist/cli/operations.js +337 -0
  47. package/dist/cli/package-info.d.ts +22 -0
  48. package/dist/cli/package-info.js +25 -0
  49. package/dist/cli/report-server.d.ts +170 -0
  50. package/dist/cli/report-server.js +387 -0
  51. package/dist/cli/signals.d.ts +37 -0
  52. package/dist/cli/signals.js +61 -0
  53. package/dist/cli/stamp-build.d.ts +1 -0
  54. package/dist/cli/stamp-build.js +9 -0
  55. package/dist/cli/update-check.d.ts +140 -0
  56. package/dist/cli/update-check.js +316 -0
  57. package/dist/cli/uploads.d.ts +16 -0
  58. package/dist/cli/uploads.js +80 -0
  59. package/dist/core/css.d.ts +95 -0
  60. package/dist/core/css.js +436 -0
  61. package/dist/core/engine.d.ts +65 -0
  62. package/dist/core/engine.js +436 -0
  63. package/dist/core/errors.d.ts +66 -0
  64. package/dist/core/errors.js +30 -0
  65. package/dist/core/evidence.d.ts +14 -0
  66. package/dist/core/evidence.js +127 -0
  67. package/dist/core/index.d.ts +12 -0
  68. package/dist/core/index.js +12 -0
  69. package/dist/core/labels.d.ts +47 -0
  70. package/dist/core/labels.js +199 -0
  71. package/dist/core/liveness.d.ts +45 -0
  72. package/dist/core/liveness.js +64 -0
  73. package/dist/core/marks.d.ts +63 -0
  74. package/dist/core/marks.js +410 -0
  75. package/dist/core/services.d.ts +444 -0
  76. package/dist/core/services.js +22 -0
  77. package/dist/core/steps.d.ts +96 -0
  78. package/dist/core/steps.js +656 -0
  79. package/dist/core/uploads.d.ts +49 -0
  80. package/dist/core/uploads.js +133 -0
  81. package/dist/core/video.d.ts +16 -0
  82. package/dist/core/video.js +101 -0
  83. package/dist/core/viewport.d.ts +28 -0
  84. package/dist/core/viewport.js +50 -0
  85. package/dist/report/html.d.ts +37 -0
  86. package/dist/report/html.js +762 -0
  87. package/dist/report/index.d.ts +5 -0
  88. package/dist/report/index.js +5 -0
  89. package/dist/report/markup.d.ts +27 -0
  90. package/dist/report/markup.js +75 -0
  91. package/dist/report/pr-summary.d.ts +11 -0
  92. package/dist/report/pr-summary.js +110 -0
  93. package/dist/report/sha256.d.ts +9 -0
  94. package/dist/report/sha256.js +97 -0
  95. package/dist/report/styles.d.ts +1 -0
  96. package/dist/report/styles.js +328 -0
  97. package/dist/report/view.d.ts +141 -0
  98. package/dist/report/view.js +368 -0
  99. package/dist/report/walkthrough.d.ts +75 -0
  100. package/dist/report/walkthrough.js +458 -0
  101. package/dist/schema/config.d.ts +7 -0
  102. package/dist/schema/config.js +6 -0
  103. package/dist/schema/doctor.d.ts +46 -0
  104. package/dist/schema/doctor.js +23 -0
  105. package/dist/schema/evidence.d.ts +994 -0
  106. package/dist/schema/evidence.js +521 -0
  107. package/dist/schema/findings.d.ts +159 -0
  108. package/dist/schema/findings.js +80 -0
  109. package/dist/schema/index.d.ts +7 -0
  110. package/dist/schema/index.js +7 -0
  111. package/dist/schema/job.d.ts +1724 -0
  112. package/dist/schema/job.js +505 -0
  113. package/dist/schema/ledger.d.ts +951 -0
  114. package/dist/schema/ledger.js +193 -0
  115. package/dist/schema/status.d.ts +7 -0
  116. package/dist/schema/status.js +11 -0
  117. package/dist/store-local/accounts.d.ts +7 -0
  118. package/dist/store-local/accounts.js +9 -0
  119. package/dist/store-local/index.d.ts +3 -0
  120. package/dist/store-local/index.js +3 -0
  121. package/dist/store-local/paths.d.ts +10 -0
  122. package/dist/store-local/paths.js +17 -0
  123. package/dist/store-local/storage.d.ts +20 -0
  124. package/dist/store-local/storage.js +170 -0
  125. package/package.json +73 -4
@@ -0,0 +1,951 @@
1
+ import { Schema } from 'effect';
2
+ import { type JobRecord } from './job.js';
3
+ /**
4
+ * `run_status` cuts each listed reason to this many characters. A reason with a hint about where
5
+ * else its text or element is (see `withHint` in core) is kept within it, so the hint shows.
6
+ */
7
+ export declare const REASON_MAX = 150;
8
+ /** One row of the case ledger. Evidence entries are paths relative to the run directory. */
9
+ export declare const CaseEntry: Schema.Struct<{
10
+ readonly id: Schema.NonEmptyString;
11
+ readonly title: Schema.NonEmptyString;
12
+ readonly status: Schema.Literals<readonly ["passed", "failed", "blocked", "not_verified"]>;
13
+ /**
14
+ * For a case that continued (`CaseSpec.continue`): the ID of the case before it, on whose page
15
+ * it started rather than at the job URL.
16
+ */
17
+ readonly continuedFrom: Schema.optionalKey<Schema.String>;
18
+ /** Why the case did not pass, in plain language. Never DOM or browser logs. */
19
+ readonly reason: Schema.optionalKey<Schema.String>;
20
+ /**
21
+ * 1-based index of the step that decided a failed or blocked status; 0 is the opening
22
+ * navigation to the job URL that a case gets when its first step is not goto.
23
+ */
24
+ readonly step: Schema.optionalKey<Schema.Int>;
25
+ /**
26
+ * Paths such as `evidence/01/02-after-login.png`: case and screenshot numbers, so they never
27
+ * collide on any file system. Runs from older versions have `evidence/<case>/<name>.png` or
28
+ * `evidence/<case>-<name>.png`.
29
+ */
30
+ readonly evidence: Schema.$Array<Schema.String>;
31
+ /**
32
+ * The name each evidence path was saved under, as the job gave it (`after-login`), or
33
+ * `step3-failed` for the screenshot taken when the case stopped. Missing in older runs.
34
+ */
35
+ readonly evidenceNames: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
36
+ /** The session it ran in (`Session.number`). Missing in older runs, as are the fields below. */
37
+ readonly session: Schema.optionalKey<Schema.Int>;
38
+ /** When the case started and ended, in ms from the start of its session's video. */
39
+ readonly startMs: Schema.optionalKey<Schema.Number>;
40
+ readonly endMs: Schema.optionalKey<Schema.Number>;
41
+ /** When each step that ran started and ended. */
42
+ readonly steps: Schema.optionalKey<Schema.$Array<Schema.Struct<{
43
+ readonly index: Schema.Int;
44
+ readonly startMs: Schema.Number;
45
+ readonly endMs: Schema.Number;
46
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
47
+ readonly name: Schema.String;
48
+ readonly size: Schema.Number;
49
+ }>>>;
50
+ readonly action: Schema.optionalKey<Schema.Struct<{
51
+ readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
52
+ readonly atMs: Schema.optionalKey<Schema.Number>;
53
+ readonly point: Schema.optionalKey<Schema.Struct<{
54
+ readonly x: Schema.Number;
55
+ readonly y: Schema.Number;
56
+ }>>;
57
+ readonly target: Schema.optionalKey<Schema.Struct<{
58
+ readonly x: Schema.Number;
59
+ readonly y: Schema.Number;
60
+ readonly width: Schema.Number;
61
+ readonly height: Schema.Number;
62
+ }>>;
63
+ readonly scale: Schema.optionalKey<Schema.Number>;
64
+ readonly viewport: Schema.optionalKey<Schema.Struct<{
65
+ readonly width: Schema.Number;
66
+ readonly height: Schema.Number;
67
+ }>>;
68
+ }>>;
69
+ }>>>;
70
+ /** Every screenshot of `evidence`, with what it shows. */
71
+ readonly shots: Schema.optionalKey<Schema.$Array<Schema.Struct<{
72
+ readonly id: Schema.String;
73
+ readonly path: Schema.String;
74
+ readonly name: Schema.String;
75
+ readonly kind: Schema.Literals<readonly ["step", "named", "failure"]>;
76
+ readonly step: Schema.Int;
77
+ readonly fullPage: Schema.Boolean;
78
+ readonly width: Schema.Int;
79
+ readonly height: Schema.Int;
80
+ readonly target: Schema.optionalKey<Schema.Struct<{
81
+ readonly x: Schema.Number;
82
+ readonly y: Schema.Number;
83
+ readonly width: Schema.Number;
84
+ readonly height: Schema.Number;
85
+ }>>;
86
+ readonly targetContent: Schema.optionalKey<Schema.Struct<{
87
+ readonly x: Schema.Number;
88
+ readonly y: Schema.Number;
89
+ readonly width: Schema.Number;
90
+ readonly height: Schema.Number;
91
+ }>>;
92
+ readonly targetProblem: Schema.optionalKey<Schema.String>;
93
+ readonly page: Schema.optionalKey<Schema.String>;
94
+ readonly atMs: Schema.optionalKey<Schema.Number>;
95
+ readonly targetAtMs: Schema.optionalKey<Schema.Number>;
96
+ readonly visual: Schema.optionalKey<Schema.Struct<{
97
+ readonly scale: Schema.Number;
98
+ readonly x: Schema.Number;
99
+ readonly y: Schema.Number;
100
+ }>>;
101
+ }>>>;
102
+ /** Short facts about the page when the case ended. */
103
+ readonly facts: Schema.optionalKey<Schema.Struct<{
104
+ readonly url: Schema.String;
105
+ readonly title: Schema.optionalKey<Schema.String>;
106
+ readonly text: Schema.optionalKey<Schema.String>;
107
+ readonly httpErrors: Schema.$Array<Schema.Struct<{
108
+ readonly url: Schema.String;
109
+ readonly status: Schema.Int;
110
+ }>>;
111
+ readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
112
+ readonly alt: Schema.optionalKey<Schema.String>;
113
+ readonly src: Schema.optionalKey<Schema.String>;
114
+ readonly width: Schema.Number;
115
+ readonly height: Schema.Number;
116
+ }>>>;
117
+ readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
118
+ readonly text: Schema.optionalKey<Schema.String>;
119
+ readonly href: Schema.String;
120
+ }>>>;
121
+ readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
122
+ readonly url: Schema.String;
123
+ readonly text: Schema.optionalKey<Schema.String>;
124
+ readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
125
+ readonly alt: Schema.optionalKey<Schema.String>;
126
+ readonly src: Schema.optionalKey<Schema.String>;
127
+ readonly width: Schema.Number;
128
+ readonly height: Schema.Number;
129
+ }>>>;
130
+ readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
131
+ readonly text: Schema.optionalKey<Schema.String>;
132
+ readonly href: Schema.String;
133
+ }>>>;
134
+ }>>>;
135
+ }>>;
136
+ }>;
137
+ export type CaseEntry = typeof CaseEntry.Type;
138
+ /** The running record of every case in a job; the source of truth for status and reports. */
139
+ export declare const CaseLedger: Schema.Struct<{
140
+ readonly jobId: Schema.brand<Schema.String, "JobId">;
141
+ readonly state: Schema.Literals<readonly ["queued", "running", "waiting_for_answer", "finished", "errored"]>;
142
+ readonly cases: Schema.$Array<Schema.Struct<{
143
+ readonly id: Schema.NonEmptyString;
144
+ readonly title: Schema.NonEmptyString;
145
+ readonly status: Schema.Literals<readonly ["passed", "failed", "blocked", "not_verified"]>;
146
+ /**
147
+ * For a case that continued (`CaseSpec.continue`): the ID of the case before it, on whose page
148
+ * it started rather than at the job URL.
149
+ */
150
+ readonly continuedFrom: Schema.optionalKey<Schema.String>;
151
+ /** Why the case did not pass, in plain language. Never DOM or browser logs. */
152
+ readonly reason: Schema.optionalKey<Schema.String>;
153
+ /**
154
+ * 1-based index of the step that decided a failed or blocked status; 0 is the opening
155
+ * navigation to the job URL that a case gets when its first step is not goto.
156
+ */
157
+ readonly step: Schema.optionalKey<Schema.Int>;
158
+ /**
159
+ * Paths such as `evidence/01/02-after-login.png`: case and screenshot numbers, so they never
160
+ * collide on any file system. Runs from older versions have `evidence/<case>/<name>.png` or
161
+ * `evidence/<case>-<name>.png`.
162
+ */
163
+ readonly evidence: Schema.$Array<Schema.String>;
164
+ /**
165
+ * The name each evidence path was saved under, as the job gave it (`after-login`), or
166
+ * `step3-failed` for the screenshot taken when the case stopped. Missing in older runs.
167
+ */
168
+ readonly evidenceNames: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
169
+ /** The session it ran in (`Session.number`). Missing in older runs, as are the fields below. */
170
+ readonly session: Schema.optionalKey<Schema.Int>;
171
+ /** When the case started and ended, in ms from the start of its session's video. */
172
+ readonly startMs: Schema.optionalKey<Schema.Number>;
173
+ readonly endMs: Schema.optionalKey<Schema.Number>;
174
+ /** When each step that ran started and ended. */
175
+ readonly steps: Schema.optionalKey<Schema.$Array<Schema.Struct<{
176
+ readonly index: Schema.Int;
177
+ readonly startMs: Schema.Number;
178
+ readonly endMs: Schema.Number;
179
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
180
+ readonly name: Schema.String;
181
+ readonly size: Schema.Number;
182
+ }>>>;
183
+ readonly action: Schema.optionalKey<Schema.Struct<{
184
+ readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
185
+ readonly atMs: Schema.optionalKey<Schema.Number>;
186
+ readonly point: Schema.optionalKey<Schema.Struct<{
187
+ readonly x: Schema.Number;
188
+ readonly y: Schema.Number;
189
+ }>>;
190
+ readonly target: Schema.optionalKey<Schema.Struct<{
191
+ readonly x: Schema.Number;
192
+ readonly y: Schema.Number;
193
+ readonly width: Schema.Number;
194
+ readonly height: Schema.Number;
195
+ }>>;
196
+ readonly scale: Schema.optionalKey<Schema.Number>;
197
+ readonly viewport: Schema.optionalKey<Schema.Struct<{
198
+ readonly width: Schema.Number;
199
+ readonly height: Schema.Number;
200
+ }>>;
201
+ }>>;
202
+ }>>>;
203
+ /** Every screenshot of `evidence`, with what it shows. */
204
+ readonly shots: Schema.optionalKey<Schema.$Array<Schema.Struct<{
205
+ readonly id: Schema.String;
206
+ readonly path: Schema.String;
207
+ readonly name: Schema.String;
208
+ readonly kind: Schema.Literals<readonly ["step", "named", "failure"]>;
209
+ readonly step: Schema.Int;
210
+ readonly fullPage: Schema.Boolean;
211
+ readonly width: Schema.Int;
212
+ readonly height: Schema.Int;
213
+ readonly target: Schema.optionalKey<Schema.Struct<{
214
+ readonly x: Schema.Number;
215
+ readonly y: Schema.Number;
216
+ readonly width: Schema.Number;
217
+ readonly height: Schema.Number;
218
+ }>>;
219
+ readonly targetContent: Schema.optionalKey<Schema.Struct<{
220
+ readonly x: Schema.Number;
221
+ readonly y: Schema.Number;
222
+ readonly width: Schema.Number;
223
+ readonly height: Schema.Number;
224
+ }>>;
225
+ readonly targetProblem: Schema.optionalKey<Schema.String>;
226
+ readonly page: Schema.optionalKey<Schema.String>;
227
+ readonly atMs: Schema.optionalKey<Schema.Number>;
228
+ readonly targetAtMs: Schema.optionalKey<Schema.Number>;
229
+ readonly visual: Schema.optionalKey<Schema.Struct<{
230
+ readonly scale: Schema.Number;
231
+ readonly x: Schema.Number;
232
+ readonly y: Schema.Number;
233
+ }>>;
234
+ }>>>;
235
+ /** Short facts about the page when the case ended. */
236
+ readonly facts: Schema.optionalKey<Schema.Struct<{
237
+ readonly url: Schema.String;
238
+ readonly title: Schema.optionalKey<Schema.String>;
239
+ readonly text: Schema.optionalKey<Schema.String>;
240
+ readonly httpErrors: Schema.$Array<Schema.Struct<{
241
+ readonly url: Schema.String;
242
+ readonly status: Schema.Int;
243
+ }>>;
244
+ readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
245
+ readonly alt: Schema.optionalKey<Schema.String>;
246
+ readonly src: Schema.optionalKey<Schema.String>;
247
+ readonly width: Schema.Number;
248
+ readonly height: Schema.Number;
249
+ }>>>;
250
+ readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
251
+ readonly text: Schema.optionalKey<Schema.String>;
252
+ readonly href: Schema.String;
253
+ }>>>;
254
+ readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
255
+ readonly url: Schema.String;
256
+ readonly text: Schema.optionalKey<Schema.String>;
257
+ readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
258
+ readonly alt: Schema.optionalKey<Schema.String>;
259
+ readonly src: Schema.optionalKey<Schema.String>;
260
+ readonly width: Schema.Number;
261
+ readonly height: Schema.Number;
262
+ }>>>;
263
+ readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
264
+ readonly text: Schema.optionalKey<Schema.String>;
265
+ readonly href: Schema.String;
266
+ }>>>;
267
+ }>>>;
268
+ }>>;
269
+ }>>;
270
+ readonly startedAt: Schema.optionalKey<Schema.String>;
271
+ readonly finishedAt: Schema.optionalKey<Schema.String>;
272
+ /** Why the job stopped early, when `state` is `errored`. */
273
+ readonly error: Schema.optionalKey<Schema.String>;
274
+ /**
275
+ * When the process running the job last rewrote the ledger. Refreshed every few seconds while
276
+ * the job is queued or running; a stale one means that process is gone.
277
+ */
278
+ readonly heartbeatAt: Schema.optionalKey<Schema.String>;
279
+ /** ID of the operating-system process running the job, when known. */
280
+ readonly pid: Schema.optionalKey<Schema.Int>;
281
+ /** The device the browser emulated, as people read it, such as `iPhone 17 (Chromium)`. */
282
+ readonly deviceLabel: Schema.optionalKey<Schema.String>;
283
+ /** The browser sessions of the run, each with its video. Missing in older runs. */
284
+ readonly sessions: Schema.optionalKey<Schema.$Array<Schema.Struct<{
285
+ readonly number: Schema.Int;
286
+ readonly account: Schema.optionalKey<Schema.String>;
287
+ readonly startedAt: Schema.String;
288
+ readonly endedAt: Schema.optionalKey<Schema.String>;
289
+ readonly durationMs: Schema.optionalKey<Schema.Number>;
290
+ readonly video: Schema.optionalKey<Schema.String>;
291
+ readonly videoDurationMs: Schema.optionalKey<Schema.Number>;
292
+ readonly videoProblem: Schema.optionalKey<Schema.String>;
293
+ }>>>;
294
+ /** The screw-bugs version that ran the job. */
295
+ readonly version: Schema.optionalKey<Schema.String>;
296
+ }>;
297
+ export type CaseLedger = typeof CaseLedger.Type;
298
+ /**
299
+ * A highlight of the agent's findings as the report draws it: its box on the screenshot, or in
300
+ * words why it has none (the element was not found, or more than one matched). Never a guess.
301
+ */
302
+ export declare const PlacedMark: Schema.Struct<{
303
+ readonly mark: Schema.Literals<readonly ["red", "green"]>;
304
+ /** The element as the agent named it, such as `button "Sign in"`. */
305
+ readonly target: Schema.String;
306
+ readonly note: Schema.optionalKey<Schema.String>;
307
+ readonly box: Schema.optionalKey<Schema.Struct<{
308
+ readonly x: Schema.Number;
309
+ readonly y: Schema.Number;
310
+ readonly width: Schema.Number;
311
+ readonly height: Schema.Number;
312
+ }>>;
313
+ /** Where the element's text and images are inside `box` (`Candidate.content`), when known. */
314
+ readonly content: Schema.optionalKey<Schema.Struct<{
315
+ readonly x: Schema.Number;
316
+ readonly y: Schema.Number;
317
+ readonly width: Schema.Number;
318
+ readonly height: Schema.Number;
319
+ }>>;
320
+ readonly problem: Schema.optionalKey<Schema.String>;
321
+ /**
322
+ * Other matches that were left out because they were not on the screenshot, in words, such as
323
+ * `1 more match outside this screenshot was ignored`.
324
+ */
325
+ readonly ignored: Schema.optionalKey<Schema.String>;
326
+ }>;
327
+ export type PlacedMark = typeof PlacedMark.Type;
328
+ /**
329
+ * Everything a finished run leaves on disk. `files` paths are relative to the bundle directory,
330
+ * so a bundle can be zipped, moved or uploaded as is.
331
+ */
332
+ export declare const ReportBundle: Schema.Struct<{
333
+ readonly formatVersion: Schema.Literal<1>;
334
+ readonly jobId: Schema.brand<Schema.String, "JobId">;
335
+ readonly spec: Schema.Struct<{
336
+ readonly version: Schema.Literal<1>;
337
+ readonly url: Schema.NonEmptyString;
338
+ readonly instructions: Schema.optionalKey<Schema.String>;
339
+ readonly summary: Schema.optionalKey<Schema.String>;
340
+ readonly cases: Schema.optionalKey<Schema.$Array<Schema.Struct<{
341
+ readonly id: Schema.String;
342
+ readonly title: Schema.NonEmptyString;
343
+ readonly steps: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
344
+ readonly action: Schema.Literal<"goto">;
345
+ readonly url: Schema.NonEmptyString;
346
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
347
+ }>, Schema.Struct<{
348
+ readonly action: Schema.Literal<"reload">;
349
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
350
+ }>, Schema.Struct<{
351
+ readonly action: Schema.Literal<"click">;
352
+ readonly target: Schema.Struct<{
353
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
354
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
355
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
356
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
357
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
358
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
359
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
360
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
361
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
362
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
363
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
364
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
365
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
366
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
367
+ }>, Schema.$Array<Schema.Struct<{
368
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
369
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
370
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
371
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
372
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
373
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
374
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
375
+ }>>]>>;
376
+ }>;
377
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
378
+ }>, Schema.Struct<{
379
+ readonly action: Schema.Literal<"fill">;
380
+ readonly target: Schema.Struct<{
381
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
382
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
383
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
384
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
385
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
386
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
387
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
388
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
389
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
390
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
391
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
392
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
393
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
394
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
395
+ }>, Schema.$Array<Schema.Struct<{
396
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
397
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
398
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
399
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
400
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
401
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
402
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
403
+ }>>]>>;
404
+ }>;
405
+ readonly value: Schema.String;
406
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
407
+ }>, Schema.Struct<{
408
+ readonly action: Schema.Literal<"upload">;
409
+ readonly target: Schema.Struct<{
410
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
411
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
412
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
413
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
414
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
415
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
416
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
417
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
418
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
419
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
420
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
421
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
422
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
423
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
424
+ }>, Schema.$Array<Schema.Struct<{
425
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
426
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
427
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
428
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
429
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
430
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
431
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
432
+ }>>]>>;
433
+ }>;
434
+ readonly files: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.Struct<{
435
+ readonly path: Schema.NonEmptyString;
436
+ readonly about: Schema.optionalKey<Schema.String>;
437
+ readonly allowMismatch: Schema.optionalKey<Schema.Boolean>;
438
+ }>]>>;
439
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
440
+ }>, Schema.Struct<{
441
+ readonly action: Schema.Literal<"press">;
442
+ readonly key: Schema.NonEmptyString;
443
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
444
+ }>, Schema.Struct<{
445
+ readonly action: Schema.Literal<"expectText">;
446
+ readonly text: Schema.NonEmptyString;
447
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
448
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
449
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
450
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
451
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
452
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
453
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
454
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
455
+ }>, Schema.$Array<Schema.Struct<{
456
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
457
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
458
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
459
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
460
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
461
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
462
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
463
+ }>>]>>;
464
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
465
+ }>, Schema.Struct<{
466
+ readonly action: Schema.Literal<"expectNoText">;
467
+ readonly text: Schema.NonEmptyString;
468
+ readonly target: Schema.optionalKey<Schema.Struct<{
469
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
470
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
471
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
472
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
473
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
474
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
475
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
476
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
477
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
478
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
479
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
480
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
481
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
482
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
483
+ }>, Schema.$Array<Schema.Struct<{
484
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
485
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
486
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
487
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
488
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
489
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
490
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
491
+ }>>]>>;
492
+ }>>;
493
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
494
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
495
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
496
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
497
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
498
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
499
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
500
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
501
+ }>, Schema.$Array<Schema.Struct<{
502
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
503
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
504
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
505
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
506
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
507
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
508
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
509
+ }>>]>>;
510
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
511
+ }>, Schema.Struct<{
512
+ readonly action: Schema.Literal<"waitFor">;
513
+ readonly target: Schema.Struct<{
514
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
515
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
516
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
517
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
518
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
519
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
520
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
521
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
522
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
523
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
524
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
525
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
526
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
527
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
528
+ }>, Schema.$Array<Schema.Struct<{
529
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
530
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
531
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
532
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
533
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
534
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
535
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
536
+ }>>]>>;
537
+ }>;
538
+ readonly state: Schema.optionalKey<Schema.Literals<readonly ["visible", "hidden", "attached", "detached"]>>;
539
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
540
+ }>, Schema.Struct<{
541
+ readonly action: Schema.Literal<"scroll">;
542
+ readonly target: Schema.optionalKey<Schema.Struct<{
543
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
544
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
545
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
546
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
547
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
548
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
549
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
550
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
551
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
552
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
553
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
554
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
555
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
556
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
557
+ }>, Schema.$Array<Schema.Struct<{
558
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
559
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
560
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
561
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
562
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
563
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
564
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
565
+ }>>]>>;
566
+ }>>;
567
+ readonly to: Schema.optionalKey<Schema.Literals<readonly ["top", "bottom"]>>;
568
+ readonly by: Schema.optionalKey<Schema.Number>;
569
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
570
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
571
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
572
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
573
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
574
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
575
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
576
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
577
+ }>, Schema.$Array<Schema.Struct<{
578
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
579
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
580
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
581
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
582
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
583
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
584
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
585
+ }>>]>>;
586
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
587
+ }>, Schema.Struct<{
588
+ readonly action: Schema.Literal<"expectUrl">;
589
+ readonly includes: Schema.NonEmptyString;
590
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
591
+ }>, Schema.Struct<{
592
+ readonly action: Schema.Literal<"expectLink">;
593
+ readonly target: Schema.Struct<{
594
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
595
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
596
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
597
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
598
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
599
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
600
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
601
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
602
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
603
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
604
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
605
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
606
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
607
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
608
+ }>, Schema.$Array<Schema.Struct<{
609
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
610
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
611
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
612
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
613
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
614
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
615
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
616
+ }>>]>>;
617
+ }>;
618
+ readonly href: Schema.NonEmptyString;
619
+ readonly match: Schema.optionalKey<Schema.Literals<readonly ["contains", "exact"]>>;
620
+ readonly timeoutMs: Schema.optionalKey<Schema.Number>;
621
+ }>, Schema.Struct<{
622
+ readonly action: Schema.Literal<"screenshot">;
623
+ readonly name: Schema.String;
624
+ }>]>>;
625
+ readonly continue: Schema.optionalKey<Schema.Boolean>;
626
+ readonly success: Schema.optionalKey<Schema.String>;
627
+ }>>>;
628
+ readonly device: Schema.optionalKey<Schema.Literals<readonly ["desktop", "mobile"]>>;
629
+ readonly account: Schema.optionalKey<Schema.NonEmptyString>;
630
+ }>;
631
+ readonly ledger: Schema.Struct<{
632
+ readonly jobId: Schema.brand<Schema.String, "JobId">;
633
+ readonly state: Schema.Literals<readonly ["queued", "running", "waiting_for_answer", "finished", "errored"]>;
634
+ readonly cases: Schema.$Array<Schema.Struct<{
635
+ readonly id: Schema.NonEmptyString;
636
+ readonly title: Schema.NonEmptyString;
637
+ readonly status: Schema.Literals<readonly ["passed", "failed", "blocked", "not_verified"]>;
638
+ /**
639
+ * For a case that continued (`CaseSpec.continue`): the ID of the case before it, on whose page
640
+ * it started rather than at the job URL.
641
+ */
642
+ readonly continuedFrom: Schema.optionalKey<Schema.String>;
643
+ /** Why the case did not pass, in plain language. Never DOM or browser logs. */
644
+ readonly reason: Schema.optionalKey<Schema.String>;
645
+ /**
646
+ * 1-based index of the step that decided a failed or blocked status; 0 is the opening
647
+ * navigation to the job URL that a case gets when its first step is not goto.
648
+ */
649
+ readonly step: Schema.optionalKey<Schema.Int>;
650
+ /**
651
+ * Paths such as `evidence/01/02-after-login.png`: case and screenshot numbers, so they never
652
+ * collide on any file system. Runs from older versions have `evidence/<case>/<name>.png` or
653
+ * `evidence/<case>-<name>.png`.
654
+ */
655
+ readonly evidence: Schema.$Array<Schema.String>;
656
+ /**
657
+ * The name each evidence path was saved under, as the job gave it (`after-login`), or
658
+ * `step3-failed` for the screenshot taken when the case stopped. Missing in older runs.
659
+ */
660
+ readonly evidenceNames: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
661
+ /** The session it ran in (`Session.number`). Missing in older runs, as are the fields below. */
662
+ readonly session: Schema.optionalKey<Schema.Int>;
663
+ /** When the case started and ended, in ms from the start of its session's video. */
664
+ readonly startMs: Schema.optionalKey<Schema.Number>;
665
+ readonly endMs: Schema.optionalKey<Schema.Number>;
666
+ /** When each step that ran started and ended. */
667
+ readonly steps: Schema.optionalKey<Schema.$Array<Schema.Struct<{
668
+ readonly index: Schema.Int;
669
+ readonly startMs: Schema.Number;
670
+ readonly endMs: Schema.Number;
671
+ readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
672
+ readonly name: Schema.String;
673
+ readonly size: Schema.Number;
674
+ }>>>;
675
+ readonly action: Schema.optionalKey<Schema.Struct<{
676
+ readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
677
+ readonly atMs: Schema.optionalKey<Schema.Number>;
678
+ readonly point: Schema.optionalKey<Schema.Struct<{
679
+ readonly x: Schema.Number;
680
+ readonly y: Schema.Number;
681
+ }>>;
682
+ readonly target: Schema.optionalKey<Schema.Struct<{
683
+ readonly x: Schema.Number;
684
+ readonly y: Schema.Number;
685
+ readonly width: Schema.Number;
686
+ readonly height: Schema.Number;
687
+ }>>;
688
+ readonly scale: Schema.optionalKey<Schema.Number>;
689
+ readonly viewport: Schema.optionalKey<Schema.Struct<{
690
+ readonly width: Schema.Number;
691
+ readonly height: Schema.Number;
692
+ }>>;
693
+ }>>;
694
+ }>>>;
695
+ /** Every screenshot of `evidence`, with what it shows. */
696
+ readonly shots: Schema.optionalKey<Schema.$Array<Schema.Struct<{
697
+ readonly id: Schema.String;
698
+ readonly path: Schema.String;
699
+ readonly name: Schema.String;
700
+ readonly kind: Schema.Literals<readonly ["step", "named", "failure"]>;
701
+ readonly step: Schema.Int;
702
+ readonly fullPage: Schema.Boolean;
703
+ readonly width: Schema.Int;
704
+ readonly height: Schema.Int;
705
+ readonly target: Schema.optionalKey<Schema.Struct<{
706
+ readonly x: Schema.Number;
707
+ readonly y: Schema.Number;
708
+ readonly width: Schema.Number;
709
+ readonly height: Schema.Number;
710
+ }>>;
711
+ readonly targetContent: Schema.optionalKey<Schema.Struct<{
712
+ readonly x: Schema.Number;
713
+ readonly y: Schema.Number;
714
+ readonly width: Schema.Number;
715
+ readonly height: Schema.Number;
716
+ }>>;
717
+ readonly targetProblem: Schema.optionalKey<Schema.String>;
718
+ readonly page: Schema.optionalKey<Schema.String>;
719
+ readonly atMs: Schema.optionalKey<Schema.Number>;
720
+ readonly targetAtMs: Schema.optionalKey<Schema.Number>;
721
+ readonly visual: Schema.optionalKey<Schema.Struct<{
722
+ readonly scale: Schema.Number;
723
+ readonly x: Schema.Number;
724
+ readonly y: Schema.Number;
725
+ }>>;
726
+ }>>>;
727
+ /** Short facts about the page when the case ended. */
728
+ readonly facts: Schema.optionalKey<Schema.Struct<{
729
+ readonly url: Schema.String;
730
+ readonly title: Schema.optionalKey<Schema.String>;
731
+ readonly text: Schema.optionalKey<Schema.String>;
732
+ readonly httpErrors: Schema.$Array<Schema.Struct<{
733
+ readonly url: Schema.String;
734
+ readonly status: Schema.Int;
735
+ }>>;
736
+ readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
737
+ readonly alt: Schema.optionalKey<Schema.String>;
738
+ readonly src: Schema.optionalKey<Schema.String>;
739
+ readonly width: Schema.Number;
740
+ readonly height: Schema.Number;
741
+ }>>>;
742
+ readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
743
+ readonly text: Schema.optionalKey<Schema.String>;
744
+ readonly href: Schema.String;
745
+ }>>>;
746
+ readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
747
+ readonly url: Schema.String;
748
+ readonly text: Schema.optionalKey<Schema.String>;
749
+ readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
750
+ readonly alt: Schema.optionalKey<Schema.String>;
751
+ readonly src: Schema.optionalKey<Schema.String>;
752
+ readonly width: Schema.Number;
753
+ readonly height: Schema.Number;
754
+ }>>>;
755
+ readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
756
+ readonly text: Schema.optionalKey<Schema.String>;
757
+ readonly href: Schema.String;
758
+ }>>>;
759
+ }>>>;
760
+ }>>;
761
+ }>>;
762
+ readonly startedAt: Schema.optionalKey<Schema.String>;
763
+ readonly finishedAt: Schema.optionalKey<Schema.String>;
764
+ /** Why the job stopped early, when `state` is `errored`. */
765
+ readonly error: Schema.optionalKey<Schema.String>;
766
+ /**
767
+ * When the process running the job last rewrote the ledger. Refreshed every few seconds while
768
+ * the job is queued or running; a stale one means that process is gone.
769
+ */
770
+ readonly heartbeatAt: Schema.optionalKey<Schema.String>;
771
+ /** ID of the operating-system process running the job, when known. */
772
+ readonly pid: Schema.optionalKey<Schema.Int>;
773
+ /** The device the browser emulated, as people read it, such as `iPhone 17 (Chromium)`. */
774
+ readonly deviceLabel: Schema.optionalKey<Schema.String>;
775
+ /** The browser sessions of the run, each with its video. Missing in older runs. */
776
+ readonly sessions: Schema.optionalKey<Schema.$Array<Schema.Struct<{
777
+ readonly number: Schema.Int;
778
+ readonly account: Schema.optionalKey<Schema.String>;
779
+ readonly startedAt: Schema.String;
780
+ readonly endedAt: Schema.optionalKey<Schema.String>;
781
+ readonly durationMs: Schema.optionalKey<Schema.Number>;
782
+ readonly video: Schema.optionalKey<Schema.String>;
783
+ readonly videoDurationMs: Schema.optionalKey<Schema.Number>;
784
+ readonly videoProblem: Schema.optionalKey<Schema.String>;
785
+ }>>>;
786
+ /** The screw-bugs version that ran the job. */
787
+ readonly version: Schema.optionalKey<Schema.String>;
788
+ }>;
789
+ readonly startedAt: Schema.String;
790
+ readonly finishedAt: Schema.optionalKey<Schema.String>;
791
+ /**
792
+ * What the run tests, from `summaryOf(spec)`: the caller's summary, or one derived from the case
793
+ * titles when `derived` is true. The caller's own text, if any, is also in `spec.summary`.
794
+ */
795
+ readonly summary: Schema.Struct<{
796
+ readonly text: Schema.String;
797
+ readonly derived: Schema.Boolean;
798
+ }>;
799
+ /**
800
+ * The device the run used: `spec.device` (desktop by default) and its label from the ledger,
801
+ * or a generic one for runs recorded before ledgers kept it.
802
+ */
803
+ readonly device: Schema.Struct<{
804
+ readonly kind: Schema.Literals<readonly ["desktop", "mobile"]>;
805
+ readonly label: Schema.String;
806
+ }>;
807
+ readonly files: Schema.Struct<{
808
+ readonly ledger: Schema.String;
809
+ readonly html: Schema.optionalKey<Schema.String>;
810
+ /** The walkthrough (`runFiles.walkthrough`), when one was written with this report. */
811
+ readonly walkthrough: Schema.optionalKey<Schema.String>;
812
+ readonly evidenceDir: Schema.String;
813
+ }>;
814
+ /** The agent's write-up, once it submitted one. */
815
+ readonly findings: Schema.optionalKey<Schema.Struct<{
816
+ readonly version: Schema.optionalKey<Schema.Literal<1>>;
817
+ readonly headline: Schema.String;
818
+ readonly fixes: Schema.$Array<Schema.Struct<{
819
+ readonly title: Schema.String;
820
+ readonly severity: Schema.Literals<readonly ["high", "medium", "low"]>;
821
+ readonly caseIds: Schema.$Array<Schema.NonEmptyString>;
822
+ readonly why: Schema.String;
823
+ }>>;
824
+ readonly cases: Schema.$Array<Schema.Struct<{
825
+ readonly id: Schema.NonEmptyString;
826
+ readonly did: Schema.optionalKey<Schema.$Array<Schema.String>>;
827
+ readonly worked: Schema.optionalKey<Schema.$Array<Schema.String>>;
828
+ readonly didnt: Schema.optionalKey<Schema.$Array<Schema.String>>;
829
+ readonly highlights: Schema.optionalKey<Schema.$Array<Schema.Struct<{
830
+ readonly shot: Schema.NonEmptyString;
831
+ readonly target: Schema.Struct<{
832
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
833
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
834
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
835
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
836
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
837
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
838
+ readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
839
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
840
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
841
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
842
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
843
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
844
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
845
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
846
+ }>, Schema.$Array<Schema.Struct<{
847
+ readonly role: Schema.optionalKey<Schema.NonEmptyString>;
848
+ readonly name: Schema.optionalKey<Schema.NonEmptyString>;
849
+ readonly text: Schema.optionalKey<Schema.NonEmptyString>;
850
+ readonly label: Schema.optionalKey<Schema.NonEmptyString>;
851
+ readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
852
+ readonly css: Schema.optionalKey<Schema.NonEmptyString>;
853
+ readonly frame: Schema.optionalKey<Schema.Unknown>;
854
+ }>>]>>;
855
+ }>;
856
+ readonly mark: Schema.Literals<readonly ["red", "green"]>;
857
+ readonly note: Schema.optionalKey<Schema.String>;
858
+ }>>>;
859
+ readonly keyMoments: Schema.optionalKey<Schema.$Array<Schema.Struct<{
860
+ readonly ms: Schema.Int;
861
+ readonly label: Schema.String;
862
+ }>>>;
863
+ readonly observed: Schema.optionalKey<Schema.$Array<Schema.String>>;
864
+ }>>;
865
+ readonly notTested: Schema.optionalKey<Schema.$Array<Schema.Struct<{
866
+ readonly what: Schema.String;
867
+ readonly why: Schema.String;
868
+ }>>>;
869
+ readonly nextTests: Schema.optionalKey<Schema.$Array<Schema.String>>;
870
+ }>>;
871
+ /** The agent's highlights, placed on their screenshots by code, by screenshot ID. */
872
+ readonly marks: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.Struct<{
873
+ readonly mark: Schema.Literals<readonly ["red", "green"]>;
874
+ /** The element as the agent named it, such as `button "Sign in"`. */
875
+ readonly target: Schema.String;
876
+ readonly note: Schema.optionalKey<Schema.String>;
877
+ readonly box: Schema.optionalKey<Schema.Struct<{
878
+ readonly x: Schema.Number;
879
+ readonly y: Schema.Number;
880
+ readonly width: Schema.Number;
881
+ readonly height: Schema.Number;
882
+ }>>;
883
+ /** Where the element's text and images are inside `box` (`Candidate.content`), when known. */
884
+ readonly content: Schema.optionalKey<Schema.Struct<{
885
+ readonly x: Schema.Number;
886
+ readonly y: Schema.Number;
887
+ readonly width: Schema.Number;
888
+ readonly height: Schema.Number;
889
+ }>>;
890
+ readonly problem: Schema.optionalKey<Schema.String>;
891
+ /**
892
+ * Other matches that were left out because they were not on the screenshot, in words, such as
893
+ * `1 more match outside this screenshot was ignored`.
894
+ */
895
+ readonly ignored: Schema.optionalKey<Schema.String>;
896
+ }>>>>;
897
+ /** Copies of screenshots with the highlights drawn in, by screenshot ID; relative paths. */
898
+ readonly annotated: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
899
+ /**
900
+ * The boxes of the page's elements on screenshots that get boxes drawn on them, by screenshot
901
+ * ID, from their saved page state: labels keep off them where they can.
902
+ */
903
+ readonly elements: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.Struct<{
904
+ readonly x: Schema.Number;
905
+ readonly y: Schema.Number;
906
+ readonly width: Schema.Number;
907
+ readonly height: Schema.Number;
908
+ }>>>>;
909
+ }>;
910
+ export type ReportBundle = typeof ReportBundle.Type;
911
+ /** Where things are inside a run folder, relative to it. */
912
+ export declare const runFiles: {
913
+ readonly job: 'job.json';
914
+ readonly ledger: 'ledger.json';
915
+ /** The run's own report; only the run, or `screw-bugs report` once it has ended, writes it. */
916
+ readonly html: 'report.html';
917
+ /** The report of a run whose process is gone, written by whoever reads its status. */
918
+ readonly interruptedHtml: 'report-interrupted.html';
919
+ /**
920
+ * The run's walkthrough: its video with every step as a clickable script. Written with
921
+ * `report.html`, by whoever writes that, never by itself or with `report-interrupted.html`.
922
+ */
923
+ readonly walkthrough: 'walkthrough.html';
924
+ readonly evidenceDir: 'evidence';
925
+ /** The evidence pack of an ended run, written by the run. */
926
+ readonly evidence: 'evidence.json';
927
+ /** The agent's write-up, written by `submit_findings` and `screw-bugs findings`. */
928
+ readonly findings: 'findings.json';
929
+ /** One video per session, `video/session-<n>.webm`. */
930
+ readonly videoDir: 'video';
931
+ /**
932
+ * Screenshots with the agent's highlights drawn in, `annotated/<shot ID>-<revision>.png`, where
933
+ * the revision is that of the `findings.json` they were drawn for. Copies for older findings
934
+ * may be left there; nothing shows them.
935
+ */
936
+ readonly annotatedDir: 'annotated';
937
+ };
938
+ /** Where the video of session `number` goes, relative to the run folder. */
939
+ export declare const videoFile: (number: number) => string;
940
+ /**
941
+ * Where the annotated copy of a screenshot goes, relative to the run folder, for the findings of
942
+ * `revision` (see `findingsRevision`).
943
+ */
944
+ export declare const annotatedFile: (shotId: string, revision: string) => string;
945
+ /**
946
+ * A short fingerprint of the text of a `findings.json` (FNV-1a, 64 bits, in hex), so annotated
947
+ * copies drawn for other findings are never taken for this one's. Not a security measure.
948
+ */
949
+ export declare const findingsRevision: (text: string) => string;
950
+ /** The report bundle of a run, from its job record and (current or final) ledger. */
951
+ export declare const reportBundleOf: (job: JobRecord, ledger: CaseLedger, writeUp?: Pick<ReportBundle, 'findings' | 'marks' | 'annotated' | 'elements'>) => ReportBundle;