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.
- package/LICENSE +21 -0
- package/README.md +906 -2
- package/bin/screw-bugs.js +29 -0
- package/dist/browser-playwright/annotate.d.ts +9 -0
- package/dist/browser-playwright/annotate.js +86 -0
- package/dist/browser-playwright/capture.d.ts +232 -0
- package/dist/browser-playwright/capture.js +1049 -0
- package/dist/browser-playwright/frames.d.ts +77 -0
- package/dist/browser-playwright/frames.js +191 -0
- package/dist/browser-playwright/index.d.ts +2 -0
- package/dist/browser-playwright/index.js +2 -0
- package/dist/browser-playwright/input.d.ts +44 -0
- package/dist/browser-playwright/input.js +116 -0
- package/dist/browser-playwright/launch.d.ts +21 -0
- package/dist/browser-playwright/launch.js +86 -0
- package/dist/browser-playwright/page.d.ts +387 -0
- package/dist/browser-playwright/page.js +1930 -0
- package/dist/build-info.json +5 -0
- package/dist/cli/app.d.ts +19 -0
- package/dist/cli/app.js +70 -0
- package/dist/cli/build-info.d.ts +52 -0
- package/dist/cli/build-info.js +82 -0
- package/dist/cli/commands.d.ts +14 -0
- package/dist/cli/commands.js +308 -0
- package/dist/cli/config.d.ts +16 -0
- package/dist/cli/config.js +71 -0
- package/dist/cli/doctor.d.ts +19 -0
- package/dist/cli/doctor.js +113 -0
- package/dist/cli/environment.d.ts +20 -0
- package/dist/cli/environment.js +34 -0
- package/dist/cli/exit-codes.d.ts +29 -0
- package/dist/cli/exit-codes.js +28 -0
- package/dist/cli/failure.d.ts +20 -0
- package/dist/cli/failure.js +15 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.js +6 -0
- package/dist/cli/install-method.d.ts +96 -0
- package/dist/cli/install-method.js +148 -0
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +10 -0
- package/dist/cli/mcp.d.ts +30 -0
- package/dist/cli/mcp.js +309 -0
- package/dist/cli/node-version.d.ts +3 -0
- package/dist/cli/node-version.js +22 -0
- package/dist/cli/operations.d.ts +127 -0
- package/dist/cli/operations.js +337 -0
- package/dist/cli/package-info.d.ts +22 -0
- package/dist/cli/package-info.js +25 -0
- package/dist/cli/report-server.d.ts +170 -0
- package/dist/cli/report-server.js +387 -0
- package/dist/cli/signals.d.ts +37 -0
- package/dist/cli/signals.js +61 -0
- package/dist/cli/stamp-build.d.ts +1 -0
- package/dist/cli/stamp-build.js +9 -0
- package/dist/cli/update-check.d.ts +140 -0
- package/dist/cli/update-check.js +316 -0
- package/dist/cli/uploads.d.ts +16 -0
- package/dist/cli/uploads.js +80 -0
- package/dist/core/css.d.ts +95 -0
- package/dist/core/css.js +436 -0
- package/dist/core/engine.d.ts +65 -0
- package/dist/core/engine.js +436 -0
- package/dist/core/errors.d.ts +66 -0
- package/dist/core/errors.js +30 -0
- package/dist/core/evidence.d.ts +14 -0
- package/dist/core/evidence.js +127 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.js +12 -0
- package/dist/core/labels.d.ts +47 -0
- package/dist/core/labels.js +199 -0
- package/dist/core/liveness.d.ts +45 -0
- package/dist/core/liveness.js +64 -0
- package/dist/core/marks.d.ts +63 -0
- package/dist/core/marks.js +410 -0
- package/dist/core/services.d.ts +444 -0
- package/dist/core/services.js +22 -0
- package/dist/core/steps.d.ts +96 -0
- package/dist/core/steps.js +656 -0
- package/dist/core/uploads.d.ts +49 -0
- package/dist/core/uploads.js +133 -0
- package/dist/core/video.d.ts +16 -0
- package/dist/core/video.js +101 -0
- package/dist/core/viewport.d.ts +28 -0
- package/dist/core/viewport.js +50 -0
- package/dist/report/html.d.ts +37 -0
- package/dist/report/html.js +762 -0
- package/dist/report/index.d.ts +5 -0
- package/dist/report/index.js +5 -0
- package/dist/report/markup.d.ts +27 -0
- package/dist/report/markup.js +75 -0
- package/dist/report/pr-summary.d.ts +11 -0
- package/dist/report/pr-summary.js +110 -0
- package/dist/report/sha256.d.ts +9 -0
- package/dist/report/sha256.js +97 -0
- package/dist/report/styles.d.ts +1 -0
- package/dist/report/styles.js +328 -0
- package/dist/report/view.d.ts +141 -0
- package/dist/report/view.js +368 -0
- package/dist/report/walkthrough.d.ts +75 -0
- package/dist/report/walkthrough.js +458 -0
- package/dist/schema/config.d.ts +7 -0
- package/dist/schema/config.js +6 -0
- package/dist/schema/doctor.d.ts +46 -0
- package/dist/schema/doctor.js +23 -0
- package/dist/schema/evidence.d.ts +994 -0
- package/dist/schema/evidence.js +521 -0
- package/dist/schema/findings.d.ts +159 -0
- package/dist/schema/findings.js +80 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/index.js +7 -0
- package/dist/schema/job.d.ts +1724 -0
- package/dist/schema/job.js +505 -0
- package/dist/schema/ledger.d.ts +951 -0
- package/dist/schema/ledger.js +193 -0
- package/dist/schema/status.d.ts +7 -0
- package/dist/schema/status.js +11 -0
- package/dist/store-local/accounts.d.ts +7 -0
- package/dist/store-local/accounts.js +9 -0
- package/dist/store-local/index.d.ts +3 -0
- package/dist/store-local/index.js +3 -0
- package/dist/store-local/paths.d.ts +10 -0
- package/dist/store-local/paths.js +17 -0
- package/dist/store-local/storage.d.ts +20 -0
- package/dist/store-local/storage.js +170 -0
- package/package.json +73 -4
|
@@ -0,0 +1,994 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
/** A rectangle on a screenshot, in image pixels (CSS pixels times the device pixel ratio). */
|
|
3
|
+
export declare const Box: Schema.Struct<{
|
|
4
|
+
readonly x: Schema.Number;
|
|
5
|
+
readonly y: Schema.Number;
|
|
6
|
+
readonly width: Schema.Number;
|
|
7
|
+
readonly height: Schema.Number;
|
|
8
|
+
}>;
|
|
9
|
+
export type Box = typeof Box.Type;
|
|
10
|
+
/**
|
|
11
|
+
* The page's visual viewport when boxes were measured: what of the page's layout a phone's screen
|
|
12
|
+
* (and so a screenshot of the viewport, and the video) shows. `scale` is how many CSS pixels of
|
|
13
|
+
* the viewport Playwright set one CSS pixel of the layout is shown as (0.41 for a page without a
|
|
14
|
+
* viewport meta tag laid out 980 wide on a 402 wide phone, 2 for one zoomed in twice), and `x` and
|
|
15
|
+
* `y` are where its top left is in the layout viewport, in layout CSS pixels (moved by pinch zoom).
|
|
16
|
+
* Boxes saved with it already account for it; on a desktop it is `{ scale: 1, x: 0, y: 0 }`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const VisualViewport: Schema.Struct<{
|
|
19
|
+
readonly scale: Schema.Number;
|
|
20
|
+
readonly x: Schema.Number;
|
|
21
|
+
readonly y: Schema.Number;
|
|
22
|
+
}>;
|
|
23
|
+
export type VisualViewport = typeof VisualViewport.Type;
|
|
24
|
+
/**
|
|
25
|
+
* Why a screenshot was taken: `step` at a step that acts on or finds an element (click, fill,
|
|
26
|
+
* expectText), `named` by a screenshot step, `failure` when the case stopped.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ShotKind: Schema.Literals<readonly ["step", "named", "failure"]>;
|
|
29
|
+
export type ShotKind = typeof ShotKind.Type;
|
|
30
|
+
/** One screenshot of a case, as the ledger records it. */
|
|
31
|
+
export declare const Shot: Schema.Struct<{
|
|
32
|
+
/** Such as `01-03`: case and screenshot number. What agents name a screenshot by. */
|
|
33
|
+
readonly id: Schema.String;
|
|
34
|
+
/** Relative to the run folder, such as `evidence/01/03-step2-click.png`. */
|
|
35
|
+
readonly path: Schema.String;
|
|
36
|
+
/** The name it was saved under: the job's own for `named`, else such as `step2-click`. */
|
|
37
|
+
readonly name: Schema.String;
|
|
38
|
+
readonly kind: Schema.Literals<readonly ["step", "named", "failure"]>;
|
|
39
|
+
/** The step it belongs to, numbered as `CaseEntry.step`. */
|
|
40
|
+
readonly step: Schema.Int;
|
|
41
|
+
/** The whole page (`true`), or what was in the viewport. */
|
|
42
|
+
readonly fullPage: Schema.Boolean;
|
|
43
|
+
/** Image size in pixels. */
|
|
44
|
+
readonly width: Schema.Int;
|
|
45
|
+
readonly height: Schema.Int;
|
|
46
|
+
/** Where the element the step acted on was, when it had one and it could be measured. */
|
|
47
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
48
|
+
readonly x: Schema.Number;
|
|
49
|
+
readonly y: Schema.Number;
|
|
50
|
+
readonly width: Schema.Number;
|
|
51
|
+
readonly height: Schema.Number;
|
|
52
|
+
}>>;
|
|
53
|
+
/** Where its text and images were inside `target` (see `Candidate.content`), when measured. */
|
|
54
|
+
readonly targetContent: Schema.optionalKey<Schema.Struct<{
|
|
55
|
+
readonly x: Schema.Number;
|
|
56
|
+
readonly y: Schema.Number;
|
|
57
|
+
readonly width: Schema.Number;
|
|
58
|
+
readonly height: Schema.Number;
|
|
59
|
+
}>>;
|
|
60
|
+
/** Why the element the step acted on has no box here although it was measured, in words. */
|
|
61
|
+
readonly targetProblem: Schema.optionalKey<Schema.String>;
|
|
62
|
+
/** The page state saved with it (a {@link ShotPage}), relative to the run folder. */
|
|
63
|
+
readonly page: Schema.optionalKey<Schema.String>;
|
|
64
|
+
/** When it was taken, in ms from the start of the session's video. */
|
|
65
|
+
readonly atMs: Schema.optionalKey<Schema.Number>;
|
|
66
|
+
/**
|
|
67
|
+
* When `target` was measured, in ms from the start of the session's video: what the video
|
|
68
|
+
* shows the box at, before the image was taken. Missing in older ledgers.
|
|
69
|
+
*/
|
|
70
|
+
readonly targetAtMs: Schema.optionalKey<Schema.Number>;
|
|
71
|
+
/**
|
|
72
|
+
* The visual viewport `target` and the saved page state were measured in, which their boxes
|
|
73
|
+
* account for (see `VisualViewport`). Missing in older ledgers, whose boxes are in the page's
|
|
74
|
+
* layout: right on a desktop, but possibly scaled or moved on a phone (see `boxesDrawable`); and
|
|
75
|
+
* when it could not be told for sure, with the boxes as older runs measured them.
|
|
76
|
+
*/
|
|
77
|
+
readonly visual: Schema.optionalKey<Schema.Struct<{
|
|
78
|
+
readonly scale: Schema.Number;
|
|
79
|
+
readonly x: Schema.Number;
|
|
80
|
+
readonly y: Schema.Number;
|
|
81
|
+
}>>;
|
|
82
|
+
}>;
|
|
83
|
+
export type Shot = typeof Shot.Type;
|
|
84
|
+
/**
|
|
85
|
+
* What a step did to the page, by its action: `click` (and an `upload` through a file chooser)
|
|
86
|
+
* moved the mouse and pressed it; `fill` typed into a field; `press` pressed a key; `scroll`,
|
|
87
|
+
* `goto` and `reload` moved or loaded the page.
|
|
88
|
+
*/
|
|
89
|
+
export declare const ActionKind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
|
|
90
|
+
export type ActionKind = typeof ActionKind.Type;
|
|
91
|
+
/** A point in the viewport, in CSS pixels. */
|
|
92
|
+
export declare const Point: Schema.Struct<{
|
|
93
|
+
readonly x: Schema.Number;
|
|
94
|
+
readonly y: Schema.Number;
|
|
95
|
+
}>;
|
|
96
|
+
export type Point = typeof Point.Type;
|
|
97
|
+
/**
|
|
98
|
+
* The action a step performed, as it happened, for drawing it over the video: when, and for one
|
|
99
|
+
* that acted on an element, where. Never what was typed: the job's own step says that.
|
|
100
|
+
*/
|
|
101
|
+
export declare const StepAction: Schema.Struct<{
|
|
102
|
+
readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
|
|
103
|
+
/**
|
|
104
|
+
* When it happened, in ms from the start of the session's video (as `StepTiming`): for a click
|
|
105
|
+
* or a key, when the browser dispatched its input event to the page (the mouse press, the key
|
|
106
|
+
* going down), not when the page's handlers for it were done. Missing when that event was not
|
|
107
|
+
* seen (see `point`), and always for a fill and for files set on a file input directly: a page
|
|
108
|
+
* can make their edits itself, so an edit is no proof of when they acted.
|
|
109
|
+
*/
|
|
110
|
+
readonly atMs: Schema.optionalKey<Schema.Number>;
|
|
111
|
+
/**
|
|
112
|
+
* Where the mouse pressed, in the viewport as the video shows it (`viewport`, in its CSS pixels):
|
|
113
|
+
* the point of the trusted mouse event the browser dispatched to the page's main frame for it,
|
|
114
|
+
* where it was on the screen, so a page laid out wider than the viewport or zoomed in is
|
|
115
|
+
* accounted for. Only for actions that pressed the mouse, and only when that event was seen
|
|
116
|
+
* (not in a child frame, nor one stopped before it reached its element) and where it showed was
|
|
117
|
+
* certain.
|
|
118
|
+
*/
|
|
119
|
+
readonly point: Schema.optionalKey<Schema.Struct<{
|
|
120
|
+
readonly x: Schema.Number;
|
|
121
|
+
readonly y: Schema.Number;
|
|
122
|
+
}>>;
|
|
123
|
+
/**
|
|
124
|
+
* The element acted on, in the viewport in CSS pixels: for a scroll, measured after it. Older
|
|
125
|
+
* runs may have one for a click, a fill or a key too.
|
|
126
|
+
*/
|
|
127
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
128
|
+
readonly x: Schema.Number;
|
|
129
|
+
readonly y: Schema.Number;
|
|
130
|
+
readonly width: Schema.Number;
|
|
131
|
+
readonly height: Schema.Number;
|
|
132
|
+
}>>;
|
|
133
|
+
/**
|
|
134
|
+
* The visual viewport's scale when `target` was measured, which it accounts for: it is where the
|
|
135
|
+
* element showed in the viewport, not where it was in the page's layout. Missing in older runs,
|
|
136
|
+
* whose `target` is in the layout (see `boxesDrawable`).
|
|
137
|
+
*/
|
|
138
|
+
readonly scale: Schema.optionalKey<Schema.Number>;
|
|
139
|
+
/** The viewport's size in CSS pixels then, which `point` and `target` are measured against. */
|
|
140
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
141
|
+
readonly width: Schema.Number;
|
|
142
|
+
readonly height: Schema.Number;
|
|
143
|
+
}>>;
|
|
144
|
+
}>;
|
|
145
|
+
export type StepAction = typeof StepAction.Type;
|
|
146
|
+
/** When one step ran, in ms from the start of the session's video. Numbered as `CaseEntry.step`. */
|
|
147
|
+
export declare const StepTiming: Schema.Struct<{
|
|
148
|
+
readonly index: Schema.Int;
|
|
149
|
+
readonly startMs: Schema.Number;
|
|
150
|
+
readonly endMs: Schema.Number;
|
|
151
|
+
/** For an upload step: the files it sent, by name and size in bytes (never their contents). */
|
|
152
|
+
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
153
|
+
readonly name: Schema.String;
|
|
154
|
+
readonly size: Schema.Number;
|
|
155
|
+
}>>>;
|
|
156
|
+
/** What it did to the page, when it acted. Missing in older ledgers and for checks. */
|
|
157
|
+
readonly action: Schema.optionalKey<Schema.Struct<{
|
|
158
|
+
readonly kind: Schema.Literals<readonly ["click", "fill", "upload", "press", "scroll", "goto", "reload"]>;
|
|
159
|
+
/**
|
|
160
|
+
* When it happened, in ms from the start of the session's video (as `StepTiming`): for a click
|
|
161
|
+
* or a key, when the browser dispatched its input event to the page (the mouse press, the key
|
|
162
|
+
* going down), not when the page's handlers for it were done. Missing when that event was not
|
|
163
|
+
* seen (see `point`), and always for a fill and for files set on a file input directly: a page
|
|
164
|
+
* can make their edits itself, so an edit is no proof of when they acted.
|
|
165
|
+
*/
|
|
166
|
+
readonly atMs: Schema.optionalKey<Schema.Number>;
|
|
167
|
+
/**
|
|
168
|
+
* Where the mouse pressed, in the viewport as the video shows it (`viewport`, in its CSS pixels):
|
|
169
|
+
* the point of the trusted mouse event the browser dispatched to the page's main frame for it,
|
|
170
|
+
* where it was on the screen, so a page laid out wider than the viewport or zoomed in is
|
|
171
|
+
* accounted for. Only for actions that pressed the mouse, and only when that event was seen
|
|
172
|
+
* (not in a child frame, nor one stopped before it reached its element) and where it showed was
|
|
173
|
+
* certain.
|
|
174
|
+
*/
|
|
175
|
+
readonly point: Schema.optionalKey<Schema.Struct<{
|
|
176
|
+
readonly x: Schema.Number;
|
|
177
|
+
readonly y: Schema.Number;
|
|
178
|
+
}>>;
|
|
179
|
+
/**
|
|
180
|
+
* The element acted on, in the viewport in CSS pixels: for a scroll, measured after it. Older
|
|
181
|
+
* runs may have one for a click, a fill or a key too.
|
|
182
|
+
*/
|
|
183
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
184
|
+
readonly x: Schema.Number;
|
|
185
|
+
readonly y: Schema.Number;
|
|
186
|
+
readonly width: Schema.Number;
|
|
187
|
+
readonly height: Schema.Number;
|
|
188
|
+
}>>;
|
|
189
|
+
/**
|
|
190
|
+
* The visual viewport's scale when `target` was measured, which it accounts for: it is where the
|
|
191
|
+
* element showed in the viewport, not where it was in the page's layout. Missing in older runs,
|
|
192
|
+
* whose `target` is in the layout (see `boxesDrawable`).
|
|
193
|
+
*/
|
|
194
|
+
readonly scale: Schema.optionalKey<Schema.Number>;
|
|
195
|
+
/** The viewport's size in CSS pixels then, which `point` and `target` are measured against. */
|
|
196
|
+
readonly viewport: Schema.optionalKey<Schema.Struct<{
|
|
197
|
+
readonly width: Schema.Number;
|
|
198
|
+
readonly height: Schema.Number;
|
|
199
|
+
}>>;
|
|
200
|
+
}>>;
|
|
201
|
+
}>;
|
|
202
|
+
export type StepTiming = typeof StepTiming.Type;
|
|
203
|
+
/**
|
|
204
|
+
* An image visible in a page when the case ended: its alternative text (the `alt` of an `<img>`,
|
|
205
|
+
* or the ARIA label of an element with role img, such as an `<svg>` logo), where it comes from
|
|
206
|
+
* (`data:` URLs shortened) and its size on the page in CSS pixels.
|
|
207
|
+
*/
|
|
208
|
+
export declare const ImageFact: Schema.Struct<{
|
|
209
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
210
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
211
|
+
readonly width: Schema.Number;
|
|
212
|
+
readonly height: Schema.Number;
|
|
213
|
+
}>;
|
|
214
|
+
export type ImageFact = typeof ImageFact.Type;
|
|
215
|
+
/** A link visible in a page when the case ended: its text and its absolute address. */
|
|
216
|
+
export declare const LinkFact: Schema.Struct<{
|
|
217
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
218
|
+
readonly href: Schema.String;
|
|
219
|
+
}>;
|
|
220
|
+
export type LinkFact = typeof LinkFact.Type;
|
|
221
|
+
/** A response with an HTTP error status that the case's pages got, documents or not. */
|
|
222
|
+
export declare const HttpErrorFact: Schema.Struct<{
|
|
223
|
+
readonly url: Schema.String;
|
|
224
|
+
readonly status: Schema.Int;
|
|
225
|
+
}>;
|
|
226
|
+
export type HttpErrorFact = typeof HttpErrorFact.Type;
|
|
227
|
+
/**
|
|
228
|
+
* A few short facts about the page when the case ended, for an agent writing it up. One line
|
|
229
|
+
* each and capped; never DOM or logs. Nothing is recorded from a page that went off the web.
|
|
230
|
+
*/
|
|
231
|
+
export declare const PageFacts: Schema.Struct<{
|
|
232
|
+
readonly url: Schema.String;
|
|
233
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
234
|
+
/**
|
|
235
|
+
* Visible text near the element of the step that decided the case, or the start of the page's
|
|
236
|
+
* visible text when it had none or it was not found. At most `FACT_TEXT_MAX` characters.
|
|
237
|
+
*/
|
|
238
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
239
|
+
/** At most `HTTP_ERRORS_MAX`, in the order they came. */
|
|
240
|
+
readonly httpErrors: Schema.$Array<Schema.Struct<{
|
|
241
|
+
readonly url: Schema.String;
|
|
242
|
+
readonly status: Schema.Int;
|
|
243
|
+
}>>;
|
|
244
|
+
/** Images visible in the page, at most `FACT_IMAGES_MAX`, in page order. */
|
|
245
|
+
readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
246
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
247
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
248
|
+
readonly width: Schema.Number;
|
|
249
|
+
readonly height: Schema.Number;
|
|
250
|
+
}>>>;
|
|
251
|
+
/** Links visible in the page, at most `FACT_LINKS_MAX`, in page order. */
|
|
252
|
+
readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
253
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
254
|
+
readonly href: Schema.String;
|
|
255
|
+
}>>>;
|
|
256
|
+
/**
|
|
257
|
+
* The start of the visible text of each frame visible in the page (an `<iframe>` preview), at
|
|
258
|
+
* most `FACT_FRAMES_MAX`, in page order, each cut to `FACT_TEXT_MAX` characters; with its
|
|
259
|
+
* images and links, as for the page.
|
|
260
|
+
*/
|
|
261
|
+
readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
262
|
+
readonly url: Schema.String;
|
|
263
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
264
|
+
readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
265
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
266
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
267
|
+
readonly width: Schema.Number;
|
|
268
|
+
readonly height: Schema.Number;
|
|
269
|
+
}>>>;
|
|
270
|
+
readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
271
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
272
|
+
readonly href: Schema.String;
|
|
273
|
+
}>>>;
|
|
274
|
+
}>>>;
|
|
275
|
+
}>;
|
|
276
|
+
export type PageFacts = typeof PageFacts.Type;
|
|
277
|
+
export declare const FACT_TEXT_MAX = 200;
|
|
278
|
+
export declare const HTTP_ERRORS_MAX = 5;
|
|
279
|
+
export declare const FACT_FRAMES_MAX = 3;
|
|
280
|
+
export declare const FACT_IMAGES_MAX = 12;
|
|
281
|
+
export declare const FACT_LINKS_MAX = 12;
|
|
282
|
+
/** Image sources and link addresses are cut to this many characters. */
|
|
283
|
+
export declare const URL_MAX = 300;
|
|
284
|
+
/**
|
|
285
|
+
* One test user in one browser, start to end, recorded as one continuous video. A run without a
|
|
286
|
+
* login is one session; jobs have at most one account today, so a run has one session.
|
|
287
|
+
*/
|
|
288
|
+
export declare const Session: Schema.Struct<{
|
|
289
|
+
/** 1-based. */
|
|
290
|
+
readonly number: Schema.Int;
|
|
291
|
+
/** The account it logged in with, when it did. */
|
|
292
|
+
readonly account: Schema.optionalKey<Schema.String>;
|
|
293
|
+
readonly startedAt: Schema.String;
|
|
294
|
+
readonly endedAt: Schema.optionalKey<Schema.String>;
|
|
295
|
+
/** How long the session ran, from the start of its video to its end, in ms. */
|
|
296
|
+
readonly durationMs: Schema.optionalKey<Schema.Number>;
|
|
297
|
+
/** Relative to the run folder, such as `video/session-1.webm`, once it was saved. */
|
|
298
|
+
readonly video: Schema.optionalKey<Schema.String>;
|
|
299
|
+
/** The length the video file itself gives, in ms. */
|
|
300
|
+
readonly videoDurationMs: Schema.optionalKey<Schema.Number>;
|
|
301
|
+
/** Why the video is missing or incomplete, in plain language. Never changes a status. */
|
|
302
|
+
readonly videoProblem: Schema.optionalKey<Schema.String>;
|
|
303
|
+
}>;
|
|
304
|
+
export type Session = typeof Session.Type;
|
|
305
|
+
/**
|
|
306
|
+
* Attributes of an element that a CSS selector may name, such as `data-test`, `title`, `href` or
|
|
307
|
+
* `aria-label`, as they are in the page: at most `ATTRS_MAX`, values cut to `ATTR_VALUE_MAX`
|
|
308
|
+
* characters. Never `id`, `class` or `data-testid` (saved as such), `style`, event handlers or
|
|
309
|
+
* `value`, which may hold what was typed.
|
|
310
|
+
*/
|
|
311
|
+
export declare const Attributes: Schema.$Record<Schema.String, Schema.String>;
|
|
312
|
+
export type Attributes = typeof Attributes.Type;
|
|
313
|
+
export declare const ATTRS_MAX = 12;
|
|
314
|
+
export declare const ATTR_VALUE_MAX = 120;
|
|
315
|
+
/** An element around an `<iframe>`, as `ShotFrame.ancestors` lists them. */
|
|
316
|
+
export declare const AncestorNode: Schema.Struct<{
|
|
317
|
+
tag: Schema.String;
|
|
318
|
+
id: Schema.optionalKey<Schema.String>;
|
|
319
|
+
classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
320
|
+
testId: Schema.optionalKey<Schema.String>;
|
|
321
|
+
attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
322
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
323
|
+
cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
324
|
+
/**
|
|
325
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
326
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
327
|
+
*/
|
|
328
|
+
omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
329
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
330
|
+
moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
331
|
+
/** It had more classes than `classes` holds. */
|
|
332
|
+
moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
333
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
334
|
+
foreign: Schema.optionalKey<Schema.Boolean>;
|
|
335
|
+
}>;
|
|
336
|
+
export type AncestorNode = typeof AncestorNode.Type;
|
|
337
|
+
/**
|
|
338
|
+
* An element that holds a saved one, for selectors that name what an element is in, such as
|
|
339
|
+
* `.clients img`: its tag, ID, classes, test ID and attributes, and the element it is in.
|
|
340
|
+
*/
|
|
341
|
+
export declare const PageNode: Schema.Struct<{
|
|
342
|
+
readonly tag: Schema.String;
|
|
343
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
344
|
+
readonly classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
345
|
+
readonly testId: Schema.optionalKey<Schema.String>;
|
|
346
|
+
readonly attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
347
|
+
readonly cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
348
|
+
readonly omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
349
|
+
readonly moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
350
|
+
readonly moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
351
|
+
readonly foreign: Schema.optionalKey<Schema.Boolean>;
|
|
352
|
+
/** The element it is in, as an index into `ShotPage.nodes`; missing at the top of its document. */
|
|
353
|
+
readonly parent: Schema.optionalKey<Schema.Int>;
|
|
354
|
+
}>;
|
|
355
|
+
export type PageNode = typeof PageNode.Type;
|
|
356
|
+
/** At most this many elements that hold saved ones are saved per document. */
|
|
357
|
+
export declare const NODES_MAX = 800;
|
|
358
|
+
/** An element on the page when a screenshot was taken, as a highlight can name it. */
|
|
359
|
+
export declare const Candidate: Schema.Struct<{
|
|
360
|
+
readonly tag: Schema.String;
|
|
361
|
+
readonly role: Schema.optionalKey<Schema.String>;
|
|
362
|
+
/** Accessible name, as far as the page gives one. */
|
|
363
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
364
|
+
/** Visible text, cut short. */
|
|
365
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
366
|
+
/** For form fields: the text of their label. */
|
|
367
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
368
|
+
/**
|
|
369
|
+
* For images: their alternative text, the `alt` of an `<img>` or the ARIA label of an element
|
|
370
|
+
* with role img, such as an `<svg>` logo. Missing in older sidecars, as are `src` and `href`.
|
|
371
|
+
*/
|
|
372
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
373
|
+
/** For images: where they come from, cut to `URL_MAX` characters; `data:` URLs shortened. */
|
|
374
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
375
|
+
/** For links: their absolute address, cut to `URL_MAX` characters. */
|
|
376
|
+
readonly href: Schema.optionalKey<Schema.String>;
|
|
377
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
378
|
+
readonly classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
379
|
+
readonly testId: Schema.optionalKey<Schema.String>;
|
|
380
|
+
/** Its other attributes a CSS selector may name (see `Attributes`); missing in older sidecars. */
|
|
381
|
+
readonly attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
382
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
383
|
+
readonly cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
384
|
+
/**
|
|
385
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
386
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
387
|
+
*/
|
|
388
|
+
readonly omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
389
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
390
|
+
readonly moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
391
|
+
/** It had more classes than `classes` holds. */
|
|
392
|
+
readonly moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
393
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
394
|
+
readonly foreign: Schema.optionalKey<Schema.Boolean>;
|
|
395
|
+
/**
|
|
396
|
+
* The element it is in, as an index into `ShotPage.nodes`, for selectors that name it. Missing
|
|
397
|
+
* at the top of its document, when there was no room to save it, and in older sidecars.
|
|
398
|
+
*/
|
|
399
|
+
readonly up: Schema.optionalKey<Schema.Int>;
|
|
400
|
+
/** It is in an element that was not saved, as there was no room (see `NODES_MAX`). */
|
|
401
|
+
readonly upCut: Schema.optionalKey<Schema.Boolean>;
|
|
402
|
+
/** On the screenshot, in image pixels. */
|
|
403
|
+
readonly box: Schema.Struct<{
|
|
404
|
+
readonly x: Schema.Number;
|
|
405
|
+
readonly y: Schema.Number;
|
|
406
|
+
readonly width: Schema.Number;
|
|
407
|
+
readonly height: Schema.Number;
|
|
408
|
+
}>;
|
|
409
|
+
/**
|
|
410
|
+
* The part of `box` its visible text and images take up, in image pixels: a wide element's text
|
|
411
|
+
* may be centred, right-aligned or right-to-left. Missing when it has none, and in older sidecars.
|
|
412
|
+
*/
|
|
413
|
+
readonly content: Schema.optionalKey<Schema.Struct<{
|
|
414
|
+
readonly x: Schema.Number;
|
|
415
|
+
readonly y: Schema.Number;
|
|
416
|
+
readonly width: Schema.Number;
|
|
417
|
+
readonly height: Schema.Number;
|
|
418
|
+
}>>;
|
|
419
|
+
/** Index of the nearest candidate that contains this one in the page. */
|
|
420
|
+
readonly parent: Schema.optionalKey<Schema.Int>;
|
|
421
|
+
/**
|
|
422
|
+
* False when the element was in the page but not visible when the screenshot was taken: almost
|
|
423
|
+
* transparent (such as a section that fades in on scroll), or cut away by an ancestor's
|
|
424
|
+
* overflow. Missing when it was visible, and in older sidecars.
|
|
425
|
+
*/
|
|
426
|
+
readonly visible: Schema.optionalKey<Schema.Boolean>;
|
|
427
|
+
/**
|
|
428
|
+
* The frame it is in, as an index into `ShotPage.frames`; missing for the page itself. Its box
|
|
429
|
+
* is on the image like any other, and may reach past the part of the frame that shows.
|
|
430
|
+
*/
|
|
431
|
+
readonly frame: Schema.optionalKey<Schema.Int>;
|
|
432
|
+
}>;
|
|
433
|
+
export type Candidate = typeof Candidate.Type;
|
|
434
|
+
/**
|
|
435
|
+
* What a page held beyond the candidates saved with its screenshot, when it held more than
|
|
436
|
+
* `CANDIDATES_MAX`: enough to tell whether a highlight that matches one saved element could match
|
|
437
|
+
* one that was not saved too. Keys are made by `candidateKeys`.
|
|
438
|
+
*/
|
|
439
|
+
export declare const Truncated: Schema.Struct<{
|
|
440
|
+
/** Elements a highlight could name that were found, saved or not. */
|
|
441
|
+
readonly found: Schema.Int;
|
|
442
|
+
/** False when the page was too big to look at whole, so no match can be called unique. */
|
|
443
|
+
readonly complete: Schema.Boolean;
|
|
444
|
+
/**
|
|
445
|
+
* For each key a saved candidate has, how many elements that were not saved have it too. Keys
|
|
446
|
+
* no unsaved element has are left out.
|
|
447
|
+
*/
|
|
448
|
+
readonly unsaved: Schema.$Record<Schema.String, Schema.Int>;
|
|
449
|
+
/** Saved candidates with a role that hold an unsaved element of the same role. */
|
|
450
|
+
readonly nested: Schema.$Array<Schema.Int>;
|
|
451
|
+
}>;
|
|
452
|
+
export type Truncated = typeof Truncated.Type;
|
|
453
|
+
/**
|
|
454
|
+
* A frame visible on a screenshot (an `<iframe>` showing a preview): its `<iframe>` element, as a
|
|
455
|
+
* highlight's `frame` names it, and where its document shows on the image. Elements inside it
|
|
456
|
+
* are candidates with this frame's index.
|
|
457
|
+
*/
|
|
458
|
+
export declare const ShotFrame: Schema.Struct<{
|
|
459
|
+
/** The `<iframe>` element, matched like a candidate. */
|
|
460
|
+
readonly tag: Schema.String;
|
|
461
|
+
readonly role: Schema.optionalKey<Schema.String>;
|
|
462
|
+
/** Its `title` or ARIA label. */
|
|
463
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
464
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
465
|
+
readonly classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
466
|
+
readonly testId: Schema.optionalKey<Schema.String>;
|
|
467
|
+
/** Its other attributes, as a candidate's (see `Attributes`); missing in older sidecars. */
|
|
468
|
+
readonly attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
469
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
470
|
+
readonly cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
471
|
+
/**
|
|
472
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
473
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
474
|
+
*/
|
|
475
|
+
readonly omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
476
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
477
|
+
readonly moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
478
|
+
/** It had more classes than `classes` holds. */
|
|
479
|
+
readonly moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
480
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
481
|
+
readonly foreign: Schema.optionalKey<Schema.Boolean>;
|
|
482
|
+
/**
|
|
483
|
+
* The elements it is in, in the document it is in, innermost first (at most `FRAME_ANCESTORS_MAX`),
|
|
484
|
+
* for selectors such as `.preview-pane iframe`. Missing in older sidecars.
|
|
485
|
+
*/
|
|
486
|
+
readonly ancestors: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
487
|
+
tag: Schema.String;
|
|
488
|
+
id: Schema.optionalKey<Schema.String>;
|
|
489
|
+
classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
490
|
+
testId: Schema.optionalKey<Schema.String>;
|
|
491
|
+
attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
492
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
493
|
+
cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
494
|
+
/**
|
|
495
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
496
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
497
|
+
*/
|
|
498
|
+
omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
499
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
500
|
+
moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
501
|
+
/** It had more classes than `classes` holds. */
|
|
502
|
+
moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
503
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
504
|
+
foreign: Schema.optionalKey<Schema.Boolean>;
|
|
505
|
+
}>>>;
|
|
506
|
+
/** It is in more elements than `ancestors` holds. */
|
|
507
|
+
readonly moreAncestors: Schema.optionalKey<Schema.Boolean>;
|
|
508
|
+
/** The frame it is in, as an index into `ShotPage.frames`; missing for the page itself. */
|
|
509
|
+
readonly parent: Schema.optionalKey<Schema.Int>;
|
|
510
|
+
/**
|
|
511
|
+
* The part of its document that shows on the image, in image pixels: inside the `<iframe>`'s
|
|
512
|
+
* border and padding, and inside the frame it is in and the image.
|
|
513
|
+
*/
|
|
514
|
+
readonly box: Schema.Struct<{
|
|
515
|
+
readonly x: Schema.Number;
|
|
516
|
+
readonly y: Schema.Number;
|
|
517
|
+
readonly width: Schema.Number;
|
|
518
|
+
readonly height: Schema.Number;
|
|
519
|
+
}>;
|
|
520
|
+
readonly url: Schema.String;
|
|
521
|
+
/**
|
|
522
|
+
* Set when not every element of its document was saved (see `Truncated`); `nested` counts
|
|
523
|
+
* among this frame's own candidates, in the order they are saved.
|
|
524
|
+
*/
|
|
525
|
+
readonly truncated: Schema.optionalKey<Schema.Struct<{
|
|
526
|
+
/** Elements a highlight could name that were found, saved or not. */
|
|
527
|
+
readonly found: Schema.Int;
|
|
528
|
+
/** False when the page was too big to look at whole, so no match can be called unique. */
|
|
529
|
+
readonly complete: Schema.Boolean;
|
|
530
|
+
/**
|
|
531
|
+
* For each key a saved candidate has, how many elements that were not saved have it too. Keys
|
|
532
|
+
* no unsaved element has are left out.
|
|
533
|
+
*/
|
|
534
|
+
readonly unsaved: Schema.$Record<Schema.String, Schema.Int>;
|
|
535
|
+
/** Saved candidates with a role that hold an unsaved element of the same role. */
|
|
536
|
+
readonly nested: Schema.$Array<Schema.Int>;
|
|
537
|
+
}>>;
|
|
538
|
+
/** Why none of its elements were saved, such as a frame that did not answer in time. */
|
|
539
|
+
readonly unread: Schema.optionalKey<Schema.String>;
|
|
540
|
+
/**
|
|
541
|
+
* How many frames in its document could not be described (see `ShotPage.framesUnread`).
|
|
542
|
+
* Missing when none, and in older sidecars.
|
|
543
|
+
*/
|
|
544
|
+
readonly framesUnread: Schema.optionalKey<Schema.Int>;
|
|
545
|
+
}>;
|
|
546
|
+
export type ShotFrame = typeof ShotFrame.Type;
|
|
547
|
+
/** At most this many frames are saved per screenshot, and this many elements of each one. */
|
|
548
|
+
export declare const FRAMES_MAX = 8;
|
|
549
|
+
export declare const FRAME_CANDIDATES_MAX = 150;
|
|
550
|
+
/** At most this many elements of all frames together, on top of the page's own. */
|
|
551
|
+
export declare const FRAME_CANDIDATES_TOTAL = 400;
|
|
552
|
+
/** At most this many elements around an `<iframe>` are saved with it. */
|
|
553
|
+
export declare const FRAME_ANCESTORS_MAX = 12;
|
|
554
|
+
/**
|
|
555
|
+
* The page state saved next to a screenshot (`<shot>.json`): the elements a highlight may name,
|
|
556
|
+
* so it can be placed after the browser is gone.
|
|
557
|
+
*/
|
|
558
|
+
export declare const ShotPage: Schema.Struct<{
|
|
559
|
+
readonly version: Schema.Literal<1>;
|
|
560
|
+
readonly url: Schema.String;
|
|
561
|
+
/** Image size in pixels, and image pixels per CSS pixel. */
|
|
562
|
+
readonly width: Schema.Int;
|
|
563
|
+
readonly height: Schema.Int;
|
|
564
|
+
readonly scale: Schema.Number;
|
|
565
|
+
/** The page's own elements first, then those of each frame. */
|
|
566
|
+
readonly candidates: Schema.$Array<Schema.Struct<{
|
|
567
|
+
readonly tag: Schema.String;
|
|
568
|
+
readonly role: Schema.optionalKey<Schema.String>;
|
|
569
|
+
/** Accessible name, as far as the page gives one. */
|
|
570
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
571
|
+
/** Visible text, cut short. */
|
|
572
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
573
|
+
/** For form fields: the text of their label. */
|
|
574
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
575
|
+
/**
|
|
576
|
+
* For images: their alternative text, the `alt` of an `<img>` or the ARIA label of an element
|
|
577
|
+
* with role img, such as an `<svg>` logo. Missing in older sidecars, as are `src` and `href`.
|
|
578
|
+
*/
|
|
579
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
580
|
+
/** For images: where they come from, cut to `URL_MAX` characters; `data:` URLs shortened. */
|
|
581
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
582
|
+
/** For links: their absolute address, cut to `URL_MAX` characters. */
|
|
583
|
+
readonly href: Schema.optionalKey<Schema.String>;
|
|
584
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
585
|
+
readonly classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
586
|
+
readonly testId: Schema.optionalKey<Schema.String>;
|
|
587
|
+
/** Its other attributes a CSS selector may name (see `Attributes`); missing in older sidecars. */
|
|
588
|
+
readonly attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
589
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
590
|
+
readonly cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
591
|
+
/**
|
|
592
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
593
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
594
|
+
*/
|
|
595
|
+
readonly omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
596
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
597
|
+
readonly moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
598
|
+
/** It had more classes than `classes` holds. */
|
|
599
|
+
readonly moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
600
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
601
|
+
readonly foreign: Schema.optionalKey<Schema.Boolean>;
|
|
602
|
+
/**
|
|
603
|
+
* The element it is in, as an index into `ShotPage.nodes`, for selectors that name it. Missing
|
|
604
|
+
* at the top of its document, when there was no room to save it, and in older sidecars.
|
|
605
|
+
*/
|
|
606
|
+
readonly up: Schema.optionalKey<Schema.Int>;
|
|
607
|
+
/** It is in an element that was not saved, as there was no room (see `NODES_MAX`). */
|
|
608
|
+
readonly upCut: Schema.optionalKey<Schema.Boolean>;
|
|
609
|
+
/** On the screenshot, in image pixels. */
|
|
610
|
+
readonly box: Schema.Struct<{
|
|
611
|
+
readonly x: Schema.Number;
|
|
612
|
+
readonly y: Schema.Number;
|
|
613
|
+
readonly width: Schema.Number;
|
|
614
|
+
readonly height: Schema.Number;
|
|
615
|
+
}>;
|
|
616
|
+
/**
|
|
617
|
+
* The part of `box` its visible text and images take up, in image pixels: a wide element's text
|
|
618
|
+
* may be centred, right-aligned or right-to-left. Missing when it has none, and in older sidecars.
|
|
619
|
+
*/
|
|
620
|
+
readonly content: Schema.optionalKey<Schema.Struct<{
|
|
621
|
+
readonly x: Schema.Number;
|
|
622
|
+
readonly y: Schema.Number;
|
|
623
|
+
readonly width: Schema.Number;
|
|
624
|
+
readonly height: Schema.Number;
|
|
625
|
+
}>>;
|
|
626
|
+
/** Index of the nearest candidate that contains this one in the page. */
|
|
627
|
+
readonly parent: Schema.optionalKey<Schema.Int>;
|
|
628
|
+
/**
|
|
629
|
+
* False when the element was in the page but not visible when the screenshot was taken: almost
|
|
630
|
+
* transparent (such as a section that fades in on scroll), or cut away by an ancestor's
|
|
631
|
+
* overflow. Missing when it was visible, and in older sidecars.
|
|
632
|
+
*/
|
|
633
|
+
readonly visible: Schema.optionalKey<Schema.Boolean>;
|
|
634
|
+
/**
|
|
635
|
+
* The frame it is in, as an index into `ShotPage.frames`; missing for the page itself. Its box
|
|
636
|
+
* is on the image like any other, and may reach past the part of the frame that shows.
|
|
637
|
+
*/
|
|
638
|
+
readonly frame: Schema.optionalKey<Schema.Int>;
|
|
639
|
+
}>>;
|
|
640
|
+
/** Set when not every element was saved; sidecars from before it was recorded lack it. */
|
|
641
|
+
readonly truncated: Schema.optionalKey<Schema.Struct<{
|
|
642
|
+
/** Elements a highlight could name that were found, saved or not. */
|
|
643
|
+
readonly found: Schema.Int;
|
|
644
|
+
/** False when the page was too big to look at whole, so no match can be called unique. */
|
|
645
|
+
readonly complete: Schema.Boolean;
|
|
646
|
+
/**
|
|
647
|
+
* For each key a saved candidate has, how many elements that were not saved have it too. Keys
|
|
648
|
+
* no unsaved element has are left out.
|
|
649
|
+
*/
|
|
650
|
+
readonly unsaved: Schema.$Record<Schema.String, Schema.Int>;
|
|
651
|
+
/** Saved candidates with a role that hold an unsaved element of the same role. */
|
|
652
|
+
readonly nested: Schema.$Array<Schema.Int>;
|
|
653
|
+
}>>;
|
|
654
|
+
/** Frames visible on the image, at most `FRAMES_MAX`, outer ones before those inside them. */
|
|
655
|
+
readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
656
|
+
/** The `<iframe>` element, matched like a candidate. */
|
|
657
|
+
readonly tag: Schema.String;
|
|
658
|
+
readonly role: Schema.optionalKey<Schema.String>;
|
|
659
|
+
/** Its `title` or ARIA label. */
|
|
660
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
661
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
662
|
+
readonly classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
663
|
+
readonly testId: Schema.optionalKey<Schema.String>;
|
|
664
|
+
/** Its other attributes, as a candidate's (see `Attributes`); missing in older sidecars. */
|
|
665
|
+
readonly attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
666
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
667
|
+
readonly cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
668
|
+
/**
|
|
669
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
670
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
671
|
+
*/
|
|
672
|
+
readonly omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
673
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
674
|
+
readonly moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
675
|
+
/** It had more classes than `classes` holds. */
|
|
676
|
+
readonly moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
677
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
678
|
+
readonly foreign: Schema.optionalKey<Schema.Boolean>;
|
|
679
|
+
/**
|
|
680
|
+
* The elements it is in, in the document it is in, innermost first (at most `FRAME_ANCESTORS_MAX`),
|
|
681
|
+
* for selectors such as `.preview-pane iframe`. Missing in older sidecars.
|
|
682
|
+
*/
|
|
683
|
+
readonly ancestors: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
684
|
+
tag: Schema.String;
|
|
685
|
+
id: Schema.optionalKey<Schema.String>;
|
|
686
|
+
classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
687
|
+
testId: Schema.optionalKey<Schema.String>;
|
|
688
|
+
attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
689
|
+
/** Attributes in `attrs` whose values were cut to `ATTR_VALUE_MAX` characters. */
|
|
690
|
+
cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
691
|
+
/**
|
|
692
|
+
* Attributes it has whose values are not saved (such as `style` or `value`), at most
|
|
693
|
+
* `ATTRS_MAX` names; a selector that names one cannot be checked.
|
|
694
|
+
*/
|
|
695
|
+
omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
696
|
+
/** It had more attributes than `attrs` and `omittedAttrs` name. */
|
|
697
|
+
moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
698
|
+
/** It had more classes than `classes` holds. */
|
|
699
|
+
moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
700
|
+
/** Not an HTML element, such as an `<svg>`: HTML never folds the case of its attributes. */
|
|
701
|
+
foreign: Schema.optionalKey<Schema.Boolean>;
|
|
702
|
+
}>>>;
|
|
703
|
+
/** It is in more elements than `ancestors` holds. */
|
|
704
|
+
readonly moreAncestors: Schema.optionalKey<Schema.Boolean>;
|
|
705
|
+
/** The frame it is in, as an index into `ShotPage.frames`; missing for the page itself. */
|
|
706
|
+
readonly parent: Schema.optionalKey<Schema.Int>;
|
|
707
|
+
/**
|
|
708
|
+
* The part of its document that shows on the image, in image pixels: inside the `<iframe>`'s
|
|
709
|
+
* border and padding, and inside the frame it is in and the image.
|
|
710
|
+
*/
|
|
711
|
+
readonly box: 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 url: Schema.String;
|
|
718
|
+
/**
|
|
719
|
+
* Set when not every element of its document was saved (see `Truncated`); `nested` counts
|
|
720
|
+
* among this frame's own candidates, in the order they are saved.
|
|
721
|
+
*/
|
|
722
|
+
readonly truncated: Schema.optionalKey<Schema.Struct<{
|
|
723
|
+
/** Elements a highlight could name that were found, saved or not. */
|
|
724
|
+
readonly found: Schema.Int;
|
|
725
|
+
/** False when the page was too big to look at whole, so no match can be called unique. */
|
|
726
|
+
readonly complete: Schema.Boolean;
|
|
727
|
+
/**
|
|
728
|
+
* For each key a saved candidate has, how many elements that were not saved have it too. Keys
|
|
729
|
+
* no unsaved element has are left out.
|
|
730
|
+
*/
|
|
731
|
+
readonly unsaved: Schema.$Record<Schema.String, Schema.Int>;
|
|
732
|
+
/** Saved candidates with a role that hold an unsaved element of the same role. */
|
|
733
|
+
readonly nested: Schema.$Array<Schema.Int>;
|
|
734
|
+
}>>;
|
|
735
|
+
/** Why none of its elements were saved, such as a frame that did not answer in time. */
|
|
736
|
+
readonly unread: Schema.optionalKey<Schema.String>;
|
|
737
|
+
/**
|
|
738
|
+
* How many frames in its document could not be described (see `ShotPage.framesUnread`).
|
|
739
|
+
* Missing when none, and in older sidecars.
|
|
740
|
+
*/
|
|
741
|
+
readonly framesUnread: Schema.optionalKey<Schema.Int>;
|
|
742
|
+
}>>>;
|
|
743
|
+
/** How many frames were visible, when more than `frames` holds. */
|
|
744
|
+
readonly framesFound: Schema.optionalKey<Schema.Int>;
|
|
745
|
+
/**
|
|
746
|
+
* How many frames in the page itself could not be described, so whether they showed or what
|
|
747
|
+
* they are is unknown: a frame a highlight names cannot be told apart from them. Frames inside
|
|
748
|
+
* a frame are counted in that frame's `framesUnread`. Missing when none, and in older sidecars.
|
|
749
|
+
*/
|
|
750
|
+
readonly framesUnread: Schema.optionalKey<Schema.Int>;
|
|
751
|
+
/**
|
|
752
|
+
* The elements that hold candidates, of the page and then of each frame, which candidates'
|
|
753
|
+
* `up` point into. Missing in older sidecars.
|
|
754
|
+
*/
|
|
755
|
+
readonly nodes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
756
|
+
readonly tag: Schema.String;
|
|
757
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
758
|
+
readonly classes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
759
|
+
readonly testId: Schema.optionalKey<Schema.String>;
|
|
760
|
+
readonly attrs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
761
|
+
readonly cutAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
762
|
+
readonly omittedAttrs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
763
|
+
readonly moreAttrs: Schema.optionalKey<Schema.Boolean>;
|
|
764
|
+
readonly moreClasses: Schema.optionalKey<Schema.Boolean>;
|
|
765
|
+
readonly foreign: Schema.optionalKey<Schema.Boolean>;
|
|
766
|
+
/** The element it is in, as an index into `ShotPage.nodes`; missing at the top of its document. */
|
|
767
|
+
readonly parent: Schema.optionalKey<Schema.Int>;
|
|
768
|
+
}>>>;
|
|
769
|
+
/**
|
|
770
|
+
* The visual viewport the boxes were measured in, which they account for (see `Shot.visual`).
|
|
771
|
+
* Missing in older sidecars, and when it could not be told for sure.
|
|
772
|
+
*/
|
|
773
|
+
readonly visual: Schema.optionalKey<Schema.Struct<{
|
|
774
|
+
readonly scale: Schema.Number;
|
|
775
|
+
readonly x: Schema.Number;
|
|
776
|
+
readonly y: Schema.Number;
|
|
777
|
+
}>>;
|
|
778
|
+
}>;
|
|
779
|
+
export type ShotPage = typeof ShotPage.Type;
|
|
780
|
+
/**
|
|
781
|
+
* The exact-match keys of a candidate, as `Truncated.unsaved` counts them: its role, its role
|
|
782
|
+
* with its name, its text, its label, its alt text (each whitespace-collapsed and lower case, as highlights
|
|
783
|
+
* match them), its ID and its test ID. `captureState` makes the same keys inside the page.
|
|
784
|
+
*/
|
|
785
|
+
export declare const candidateKey: {
|
|
786
|
+
readonly role: (role: string) => string;
|
|
787
|
+
readonly roleName: (role: string, name: string) => string;
|
|
788
|
+
readonly text: (text: string) => string;
|
|
789
|
+
readonly label: (label: string) => string;
|
|
790
|
+
readonly alt: (alt: string) => string;
|
|
791
|
+
readonly id: (id: string) => string;
|
|
792
|
+
readonly testId: (testId: string) => string;
|
|
793
|
+
};
|
|
794
|
+
/** Text the way highlights compare it: whitespace collapsed, trimmed, lower case. */
|
|
795
|
+
export declare const matchText: (text: string | undefined) => string;
|
|
796
|
+
/** Every key of `candidateKey` that `c` has. */
|
|
797
|
+
export declare const candidateKeys: (c: Candidate) => ReadonlyArray<string>;
|
|
798
|
+
/** At most this many candidates are saved per screenshot. */
|
|
799
|
+
export declare const CANDIDATES_MAX = 400;
|
|
800
|
+
/** A step of a case as the evidence pack gives it. */
|
|
801
|
+
export declare const EvidenceStep: Schema.Struct<{
|
|
802
|
+
readonly index: Schema.Int;
|
|
803
|
+
/** Such as `click button "Sign in"`. */
|
|
804
|
+
readonly text: Schema.String;
|
|
805
|
+
readonly state: Schema.Literals<readonly ["ran", "decided", "not-run"]>;
|
|
806
|
+
readonly startMs: Schema.optionalKey<Schema.Number>;
|
|
807
|
+
readonly endMs: Schema.optionalKey<Schema.Number>;
|
|
808
|
+
/** For an upload step: the names of the files it sends. */
|
|
809
|
+
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
810
|
+
}>;
|
|
811
|
+
export type EvidenceStep = typeof EvidenceStep.Type;
|
|
812
|
+
/** What an agent needs to write up one case, and the IDs its findings may refer to. */
|
|
813
|
+
export declare const EvidenceCase: Schema.Struct<{
|
|
814
|
+
readonly id: Schema.String;
|
|
815
|
+
readonly title: Schema.String;
|
|
816
|
+
readonly status: Schema.Literals<readonly ["passed", "failed", "blocked", "not_verified"]>;
|
|
817
|
+
readonly step: Schema.optionalKey<Schema.Int>;
|
|
818
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
819
|
+
/** What the job said success looks like. */
|
|
820
|
+
readonly success: Schema.optionalKey<Schema.String>;
|
|
821
|
+
/** The case before it, on whose page it started (`CaseSpec.continue`). */
|
|
822
|
+
readonly continuedFrom: Schema.optionalKey<Schema.String>;
|
|
823
|
+
readonly session: Schema.optionalKey<Schema.Int>;
|
|
824
|
+
readonly startMs: Schema.optionalKey<Schema.Number>;
|
|
825
|
+
readonly endMs: Schema.optionalKey<Schema.Number>;
|
|
826
|
+
readonly steps: Schema.$Array<Schema.Struct<{
|
|
827
|
+
readonly index: Schema.Int;
|
|
828
|
+
/** Such as `click button "Sign in"`. */
|
|
829
|
+
readonly text: Schema.String;
|
|
830
|
+
readonly state: Schema.Literals<readonly ["ran", "decided", "not-run"]>;
|
|
831
|
+
readonly startMs: Schema.optionalKey<Schema.Number>;
|
|
832
|
+
readonly endMs: Schema.optionalKey<Schema.Number>;
|
|
833
|
+
/** For an upload step: the names of the files it sends. */
|
|
834
|
+
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
835
|
+
}>>;
|
|
836
|
+
/** The only timecodes key moments may use for this case, in ms, ascending. */
|
|
837
|
+
readonly timecodes: Schema.$Array<Schema.Number>;
|
|
838
|
+
readonly shots: Schema.$Array<Schema.Struct<{
|
|
839
|
+
readonly id: Schema.String;
|
|
840
|
+
readonly name: Schema.String;
|
|
841
|
+
readonly kind: Schema.Literals<readonly ["step", "named", "failure"]>;
|
|
842
|
+
readonly step: Schema.Int;
|
|
843
|
+
readonly path: Schema.String;
|
|
844
|
+
/**
|
|
845
|
+
* The page state saved with it (a `ShotPage`): every element a highlight may name, with
|
|
846
|
+
* images' alt text and source and links' addresses.
|
|
847
|
+
*/
|
|
848
|
+
readonly page: Schema.optionalKey<Schema.String>;
|
|
849
|
+
}>>;
|
|
850
|
+
readonly facts: Schema.optionalKey<Schema.Struct<{
|
|
851
|
+
readonly url: Schema.String;
|
|
852
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
853
|
+
/**
|
|
854
|
+
* Visible text near the element of the step that decided the case, or the start of the page's
|
|
855
|
+
* visible text when it had none or it was not found. At most `FACT_TEXT_MAX` characters.
|
|
856
|
+
*/
|
|
857
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
858
|
+
/** At most `HTTP_ERRORS_MAX`, in the order they came. */
|
|
859
|
+
readonly httpErrors: Schema.$Array<Schema.Struct<{
|
|
860
|
+
readonly url: Schema.String;
|
|
861
|
+
readonly status: Schema.Int;
|
|
862
|
+
}>>;
|
|
863
|
+
/** Images visible in the page, at most `FACT_IMAGES_MAX`, in page order. */
|
|
864
|
+
readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
865
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
866
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
867
|
+
readonly width: Schema.Number;
|
|
868
|
+
readonly height: Schema.Number;
|
|
869
|
+
}>>>;
|
|
870
|
+
/** Links visible in the page, at most `FACT_LINKS_MAX`, in page order. */
|
|
871
|
+
readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
872
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
873
|
+
readonly href: Schema.String;
|
|
874
|
+
}>>>;
|
|
875
|
+
/**
|
|
876
|
+
* The start of the visible text of each frame visible in the page (an `<iframe>` preview), at
|
|
877
|
+
* most `FACT_FRAMES_MAX`, in page order, each cut to `FACT_TEXT_MAX` characters; with its
|
|
878
|
+
* images and links, as for the page.
|
|
879
|
+
*/
|
|
880
|
+
readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
881
|
+
readonly url: Schema.String;
|
|
882
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
883
|
+
readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
884
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
885
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
886
|
+
readonly width: Schema.Number;
|
|
887
|
+
readonly height: Schema.Number;
|
|
888
|
+
}>>>;
|
|
889
|
+
readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
890
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
891
|
+
readonly href: Schema.String;
|
|
892
|
+
}>>>;
|
|
893
|
+
}>>>;
|
|
894
|
+
}>>;
|
|
895
|
+
}>;
|
|
896
|
+
export type EvidenceCase = typeof EvidenceCase.Type;
|
|
897
|
+
/** `evidence.json`: the full evidence pack of an ended run. `run_status` replies with a digest. */
|
|
898
|
+
export declare const EvidencePack: Schema.Struct<{
|
|
899
|
+
readonly version: Schema.Literal<1>;
|
|
900
|
+
readonly jobId: Schema.String;
|
|
901
|
+
readonly state: Schema.String;
|
|
902
|
+
/** The note every report carries: cases ran in order, in one browser session. */
|
|
903
|
+
readonly sessionNote: Schema.String;
|
|
904
|
+
readonly videos: Schema.$Array<Schema.Struct<{
|
|
905
|
+
readonly session: Schema.Int;
|
|
906
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
907
|
+
readonly durationMs: Schema.optionalKey<Schema.Number>;
|
|
908
|
+
readonly problem: Schema.optionalKey<Schema.String>;
|
|
909
|
+
}>>;
|
|
910
|
+
readonly cases: Schema.$Array<Schema.Struct<{
|
|
911
|
+
readonly id: Schema.String;
|
|
912
|
+
readonly title: Schema.String;
|
|
913
|
+
readonly status: Schema.Literals<readonly ["passed", "failed", "blocked", "not_verified"]>;
|
|
914
|
+
readonly step: Schema.optionalKey<Schema.Int>;
|
|
915
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
916
|
+
/** What the job said success looks like. */
|
|
917
|
+
readonly success: Schema.optionalKey<Schema.String>;
|
|
918
|
+
/** The case before it, on whose page it started (`CaseSpec.continue`). */
|
|
919
|
+
readonly continuedFrom: Schema.optionalKey<Schema.String>;
|
|
920
|
+
readonly session: Schema.optionalKey<Schema.Int>;
|
|
921
|
+
readonly startMs: Schema.optionalKey<Schema.Number>;
|
|
922
|
+
readonly endMs: Schema.optionalKey<Schema.Number>;
|
|
923
|
+
readonly steps: Schema.$Array<Schema.Struct<{
|
|
924
|
+
readonly index: Schema.Int;
|
|
925
|
+
/** Such as `click button "Sign in"`. */
|
|
926
|
+
readonly text: Schema.String;
|
|
927
|
+
readonly state: Schema.Literals<readonly ["ran", "decided", "not-run"]>;
|
|
928
|
+
readonly startMs: Schema.optionalKey<Schema.Number>;
|
|
929
|
+
readonly endMs: Schema.optionalKey<Schema.Number>;
|
|
930
|
+
/** For an upload step: the names of the files it sends. */
|
|
931
|
+
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
932
|
+
}>>;
|
|
933
|
+
/** The only timecodes key moments may use for this case, in ms, ascending. */
|
|
934
|
+
readonly timecodes: Schema.$Array<Schema.Number>;
|
|
935
|
+
readonly shots: Schema.$Array<Schema.Struct<{
|
|
936
|
+
readonly id: Schema.String;
|
|
937
|
+
readonly name: Schema.String;
|
|
938
|
+
readonly kind: Schema.Literals<readonly ["step", "named", "failure"]>;
|
|
939
|
+
readonly step: Schema.Int;
|
|
940
|
+
readonly path: Schema.String;
|
|
941
|
+
/**
|
|
942
|
+
* The page state saved with it (a `ShotPage`): every element a highlight may name, with
|
|
943
|
+
* images' alt text and source and links' addresses.
|
|
944
|
+
*/
|
|
945
|
+
readonly page: Schema.optionalKey<Schema.String>;
|
|
946
|
+
}>>;
|
|
947
|
+
readonly facts: Schema.optionalKey<Schema.Struct<{
|
|
948
|
+
readonly url: Schema.String;
|
|
949
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
950
|
+
/**
|
|
951
|
+
* Visible text near the element of the step that decided the case, or the start of the page's
|
|
952
|
+
* visible text when it had none or it was not found. At most `FACT_TEXT_MAX` characters.
|
|
953
|
+
*/
|
|
954
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
955
|
+
/** At most `HTTP_ERRORS_MAX`, in the order they came. */
|
|
956
|
+
readonly httpErrors: Schema.$Array<Schema.Struct<{
|
|
957
|
+
readonly url: Schema.String;
|
|
958
|
+
readonly status: Schema.Int;
|
|
959
|
+
}>>;
|
|
960
|
+
/** Images visible in the page, at most `FACT_IMAGES_MAX`, in page order. */
|
|
961
|
+
readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
962
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
963
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
964
|
+
readonly width: Schema.Number;
|
|
965
|
+
readonly height: Schema.Number;
|
|
966
|
+
}>>>;
|
|
967
|
+
/** Links visible in the page, at most `FACT_LINKS_MAX`, in page order. */
|
|
968
|
+
readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
969
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
970
|
+
readonly href: Schema.String;
|
|
971
|
+
}>>>;
|
|
972
|
+
/**
|
|
973
|
+
* The start of the visible text of each frame visible in the page (an `<iframe>` preview), at
|
|
974
|
+
* most `FACT_FRAMES_MAX`, in page order, each cut to `FACT_TEXT_MAX` characters; with its
|
|
975
|
+
* images and links, as for the page.
|
|
976
|
+
*/
|
|
977
|
+
readonly frames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
978
|
+
readonly url: Schema.String;
|
|
979
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
980
|
+
readonly images: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
981
|
+
readonly alt: Schema.optionalKey<Schema.String>;
|
|
982
|
+
readonly src: Schema.optionalKey<Schema.String>;
|
|
983
|
+
readonly width: Schema.Number;
|
|
984
|
+
readonly height: Schema.Number;
|
|
985
|
+
}>>>;
|
|
986
|
+
readonly links: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
987
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
988
|
+
readonly href: Schema.String;
|
|
989
|
+
}>>>;
|
|
990
|
+
}>>>;
|
|
991
|
+
}>>;
|
|
992
|
+
}>>;
|
|
993
|
+
}>;
|
|
994
|
+
export type EvidencePack = typeof EvidencePack.Type;
|