@docsxai/engine 0.2.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 +202 -0
- package/README.md +130 -0
- package/dist/auth/api-login.d.ts +69 -0
- package/dist/auth/api-login.js +95 -0
- package/dist/auth/browser-session.d.ts +28 -0
- package/dist/auth/browser-session.js +43 -0
- package/dist/auth/cookie-jar.d.ts +58 -0
- package/dist/auth/cookie-jar.js +212 -0
- package/dist/auth/email-otp.d.ts +210 -0
- package/dist/auth/email-otp.js +166 -0
- package/dist/auth/http-basic.d.ts +5 -0
- package/dist/auth/http-basic.js +17 -0
- package/dist/auth/index.d.ts +47 -0
- package/dist/auth/index.js +137 -0
- package/dist/auth/jwt-injection.d.ts +153 -0
- package/dist/auth/jwt-injection.js +136 -0
- package/dist/auth/manual-capture.d.ts +35 -0
- package/dist/auth/manual-capture.js +30 -0
- package/dist/auth/mtls.d.ts +15 -0
- package/dist/auth/mtls.js +53 -0
- package/dist/auth/pat-header.d.ts +19 -0
- package/dist/auth/pat-header.js +34 -0
- package/dist/auth/storage-state-cache.d.ts +38 -0
- package/dist/auth/storage-state-cache.js +143 -0
- package/dist/auth/test-backdoor.d.ts +25 -0
- package/dist/auth/test-backdoor.js +51 -0
- package/dist/auth/totp.d.ts +39 -0
- package/dist/auth/totp.js +108 -0
- package/dist/auth/types.d.ts +86 -0
- package/dist/auth/types.js +57 -0
- package/dist/auth/ui-form.d.ts +204 -0
- package/dist/auth/ui-form.js +153 -0
- package/dist/auth/webauthn.d.ts +88 -0
- package/dist/auth/webauthn.js +67 -0
- package/dist/auth.d.ts +1 -0
- package/dist/auth.js +3 -0
- package/dist/backend-client-contracts.d.ts +88 -0
- package/dist/backend-client-contracts.js +19 -0
- package/dist/backend-client-oauth-login.d.ts +7 -0
- package/dist/backend-client-oauth-login.js +90 -0
- package/dist/backend-client-state-cache.d.ts +73 -0
- package/dist/backend-client-state-cache.js +185 -0
- package/dist/backend-client-token.d.ts +18 -0
- package/dist/backend-client-token.js +94 -0
- package/dist/backend-client-transport.d.ts +66 -0
- package/dist/backend-client-transport.js +181 -0
- package/dist/backend-client.d.ts +5 -0
- package/dist/backend-client.js +18 -0
- package/dist/calibrate.d.ts +31 -0
- package/dist/calibrate.js +68 -0
- package/dist/cli-commands-authoring.d.ts +5 -0
- package/dist/cli-commands-authoring.js +403 -0
- package/dist/cli-commands-backend.d.ts +5 -0
- package/dist/cli-commands-backend.js +211 -0
- package/dist/cli-commands-docpack.d.ts +5 -0
- package/dist/cli-commands-docpack.js +280 -0
- package/dist/cli-commands-session.d.ts +4 -0
- package/dist/cli-commands-session.js +398 -0
- package/dist/cli-shared.d.ts +5 -0
- package/dist/cli-shared.js +45 -0
- package/dist/cli-usage.d.ts +1 -0
- package/dist/cli-usage.js +137 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +77 -0
- package/dist/diagnose.d.ts +50 -0
- package/dist/diagnose.js +168 -0
- package/dist/diff-compute.d.ts +13 -0
- package/dist/diff-compute.js +378 -0
- package/dist/diff-report.d.ts +7 -0
- package/dist/diff-report.js +125 -0
- package/dist/diff-types.d.ts +125 -0
- package/dist/diff-types.js +15 -0
- package/dist/diff.d.ts +3 -0
- package/dist/diff.js +16 -0
- package/dist/doc-pack-io.d.ts +30 -0
- package/dist/doc-pack-io.js +182 -0
- package/dist/doc-pack.d.ts +1814 -0
- package/dist/doc-pack.js +328 -0
- package/dist/doctor-checks-plugins.d.ts +2 -0
- package/dist/doctor-checks-plugins.js +136 -0
- package/dist/doctor-checks.d.ts +56 -0
- package/dist/doctor-checks.js +367 -0
- package/dist/doctor.d.ts +7 -0
- package/dist/doctor.js +62 -0
- package/dist/export/adf.d.ts +57 -0
- package/dist/export/adf.js +323 -0
- package/dist/export/playwright-test.d.ts +26 -0
- package/dist/export/playwright-test.js +221 -0
- package/dist/flow-file.d.ts +21 -0
- package/dist/flow-file.js +180 -0
- package/dist/flow-lint.d.ts +24 -0
- package/dist/flow-lint.js +203 -0
- package/dist/flow-runtime.d.ts +113 -0
- package/dist/flow-runtime.js +273 -0
- package/dist/flow-tree.d.ts +19 -0
- package/dist/flow-tree.js +104 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +31 -0
- package/dist/playwright-driver.d.ts +105 -0
- package/dist/playwright-driver.js +363 -0
- package/dist/playwright-instrumented-browser.d.ts +51 -0
- package/dist/playwright-instrumented-browser.js +189 -0
- package/dist/plugins/load.d.ts +22 -0
- package/dist/plugins/load.js +99 -0
- package/dist/plugins/lock.d.ts +40 -0
- package/dist/plugins/lock.js +122 -0
- package/dist/plugins/manifest.d.ts +70 -0
- package/dist/plugins/manifest.js +115 -0
- package/dist/plugins/plan.d.ts +51 -0
- package/dist/plugins/plan.js +279 -0
- package/dist/plugins/registry.d.ts +59 -0
- package/dist/plugins/registry.js +71 -0
- package/dist/plugins/runtime.d.ts +7 -0
- package/dist/plugins/runtime.js +27 -0
- package/dist/plugins/types.d.ts +58 -0
- package/dist/plugins/types.js +4 -0
- package/dist/plugins-cli.d.ts +1 -0
- package/dist/plugins-cli.js +191 -0
- package/dist/redact.d.ts +16 -0
- package/dist/redact.js +72 -0
- package/dist/style.d.ts +46 -0
- package/dist/style.js +151 -0
- package/dist/viewer-bin.d.ts +20 -0
- package/dist/viewer-bin.js +97 -0
- package/dist/workspace.d.ts +60 -0
- package/dist/workspace.js +172 -0
- package/dist/zip.d.ts +17 -0
- package/dist/zip.js +113 -0
- package/package.json +64 -0
|
@@ -0,0 +1,1814 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ArrowStyle: z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>;
|
|
3
|
+
export type ArrowStyle = z.infer<typeof ArrowStyle>;
|
|
4
|
+
/** A locator reference (`$play_button`) resolved against a flow-file's `locators` map, or an inline selector. */
|
|
5
|
+
export declare const LocatorRef: z.ZodString;
|
|
6
|
+
export type LocatorRef = z.infer<typeof LocatorRef>;
|
|
7
|
+
export declare const ActionType: z.ZodEnum<["navigate", "click", "fill", "upload", "press", "hover", "select", "check", "uncheck", "wait"]>;
|
|
8
|
+
export type ActionType = z.infer<typeof ActionType>;
|
|
9
|
+
/**
|
|
10
|
+
* What to wait for after a step's action settles. `network_idle` / `element_stable` / `load` are named
|
|
11
|
+
* primitives; `{ selector }` waits for an element to appear (Playwright's default timeout, ~30s) — give it
|
|
12
|
+
* `timeout_ms` to override that (e.g. waiting on a multi-minute backend op that mounts a "done" element);
|
|
13
|
+
* `{ timeout_ms }` alone is a blind sleep (last resort — for animations, not state).
|
|
14
|
+
*/
|
|
15
|
+
export declare const WaitSpec: z.ZodUnion<[z.ZodEnum<["network_idle", "element_stable", "load"]>, z.ZodObject<{
|
|
16
|
+
timeout_ms: z.ZodNumber;
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
18
|
+
timeout_ms: number;
|
|
19
|
+
}, {
|
|
20
|
+
timeout_ms: number;
|
|
21
|
+
}>, z.ZodObject<{
|
|
22
|
+
selector: z.ZodString;
|
|
23
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
selector: string;
|
|
26
|
+
timeout_ms?: number | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
selector: string;
|
|
29
|
+
timeout_ms?: number | undefined;
|
|
30
|
+
}>]>;
|
|
31
|
+
export type WaitSpec = z.infer<typeof WaitSpec>;
|
|
32
|
+
/** Post-step success criterion. Execution halts if it fails (no selector fallbacks — drift is a signal). */
|
|
33
|
+
export declare const SuccessSpec: z.ZodUnion<[z.ZodObject<{
|
|
34
|
+
visible: z.ZodString;
|
|
35
|
+
}, "strict", z.ZodTypeAny, {
|
|
36
|
+
visible: string;
|
|
37
|
+
}, {
|
|
38
|
+
visible: string;
|
|
39
|
+
}>, z.ZodObject<{
|
|
40
|
+
hidden: z.ZodString;
|
|
41
|
+
}, "strict", z.ZodTypeAny, {
|
|
42
|
+
hidden: string;
|
|
43
|
+
}, {
|
|
44
|
+
hidden: string;
|
|
45
|
+
}>, z.ZodObject<{
|
|
46
|
+
url_matches: z.ZodString;
|
|
47
|
+
}, "strict", z.ZodTypeAny, {
|
|
48
|
+
url_matches: string;
|
|
49
|
+
}, {
|
|
50
|
+
url_matches: string;
|
|
51
|
+
}>, z.ZodObject<{
|
|
52
|
+
text_contains: z.ZodObject<{
|
|
53
|
+
selector: z.ZodString;
|
|
54
|
+
text: z.ZodString;
|
|
55
|
+
}, "strict", z.ZodTypeAny, {
|
|
56
|
+
selector: string;
|
|
57
|
+
text: string;
|
|
58
|
+
}, {
|
|
59
|
+
selector: string;
|
|
60
|
+
text: string;
|
|
61
|
+
}>;
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
|
+
text_contains: {
|
|
64
|
+
selector: string;
|
|
65
|
+
text: string;
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
text_contains: {
|
|
69
|
+
selector: string;
|
|
70
|
+
text: string;
|
|
71
|
+
};
|
|
72
|
+
}>]>;
|
|
73
|
+
export type SuccessSpec = z.infer<typeof SuccessSpec>;
|
|
74
|
+
export declare const NudgeOffset: z.ZodObject<{
|
|
75
|
+
x: z.ZodNumber;
|
|
76
|
+
y: z.ZodNumber;
|
|
77
|
+
}, "strict", z.ZodTypeAny, {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
}, {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
}>;
|
|
84
|
+
export type NudgeOffset = z.infer<typeof NudgeOffset>;
|
|
85
|
+
export declare const ViewportSize: z.ZodObject<{
|
|
86
|
+
width: z.ZodNumber;
|
|
87
|
+
height: z.ZodNumber;
|
|
88
|
+
}, "strict", z.ZodTypeAny, {
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
}, {
|
|
92
|
+
width: number;
|
|
93
|
+
height: number;
|
|
94
|
+
}>;
|
|
95
|
+
export type ViewportSize = z.infer<typeof ViewportSize>;
|
|
96
|
+
export declare const ViewportPreset: z.ZodEnum<["desktop", "tablet", "mobile"]>;
|
|
97
|
+
export type ViewportPreset = z.infer<typeof ViewportPreset>;
|
|
98
|
+
/** Named viewport presets — `desktop` 1440×900, `tablet` 834×1112, `mobile` 390×844. */
|
|
99
|
+
export declare const VIEWPORT_PRESETS: Record<ViewportPreset, ViewportSize>;
|
|
100
|
+
/**
|
|
101
|
+
* Deterministic execution environment for a flow. All fields optional; applied at browser-context
|
|
102
|
+
* creation (so the whole flow runs under them). With `extends`, the child flow's `environment`
|
|
103
|
+
* wins per-key over the parent's (a child can pin just `viewport` and inherit the parent's clock).
|
|
104
|
+
*/
|
|
105
|
+
export declare const EnvironmentSpec: z.ZodObject<{
|
|
106
|
+
/** ISO-8601 instant the page clock is frozen at — `new Date()` etc. return this for the whole run. */
|
|
107
|
+
clock: z.ZodOptional<z.ZodString>;
|
|
108
|
+
/** BCP-47 language tag (e.g. `en-GB`). */
|
|
109
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
110
|
+
/** IANA timezone (e.g. `Europe/Amsterdam`). */
|
|
111
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
112
|
+
/** `{ width, height }` in CSS pixels, or a named preset — see {@link VIEWPORT_PRESETS}. */
|
|
113
|
+
viewport: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["desktop", "tablet", "mobile"]>, z.ZodObject<{
|
|
114
|
+
width: z.ZodNumber;
|
|
115
|
+
height: z.ZodNumber;
|
|
116
|
+
}, "strict", z.ZodTypeAny, {
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
}, {
|
|
120
|
+
width: number;
|
|
121
|
+
height: number;
|
|
122
|
+
}>]>>;
|
|
123
|
+
color_scheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
124
|
+
reduced_motion: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
clock?: string | undefined;
|
|
127
|
+
locale?: string | undefined;
|
|
128
|
+
timezone?: string | undefined;
|
|
129
|
+
viewport?: {
|
|
130
|
+
width: number;
|
|
131
|
+
height: number;
|
|
132
|
+
} | "desktop" | "tablet" | "mobile" | undefined;
|
|
133
|
+
color_scheme?: "light" | "dark" | undefined;
|
|
134
|
+
reduced_motion?: boolean | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
clock?: string | undefined;
|
|
137
|
+
locale?: string | undefined;
|
|
138
|
+
timezone?: string | undefined;
|
|
139
|
+
viewport?: {
|
|
140
|
+
width: number;
|
|
141
|
+
height: number;
|
|
142
|
+
} | "desktop" | "tablet" | "mobile" | undefined;
|
|
143
|
+
color_scheme?: "light" | "dark" | undefined;
|
|
144
|
+
reduced_motion?: boolean | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
export type EnvironmentSpec = z.infer<typeof EnvironmentSpec>;
|
|
147
|
+
export declare const RedactionStyle: z.ZodEnum<["box", "pixelate"]>;
|
|
148
|
+
export type RedactionStyle = z.infer<typeof RedactionStyle>;
|
|
149
|
+
/** A fixed rectangle in CSS pixels (viewport coordinates), scaled to device pixels at capture time. */
|
|
150
|
+
export declare const RedactionRegion: z.ZodObject<{
|
|
151
|
+
x: z.ZodNumber;
|
|
152
|
+
y: z.ZodNumber;
|
|
153
|
+
width: z.ZodNumber;
|
|
154
|
+
height: z.ZodNumber;
|
|
155
|
+
}, "strict", z.ZodTypeAny, {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
width: number;
|
|
159
|
+
height: number;
|
|
160
|
+
}, {
|
|
161
|
+
x: number;
|
|
162
|
+
y: number;
|
|
163
|
+
width: number;
|
|
164
|
+
height: number;
|
|
165
|
+
}>;
|
|
166
|
+
export type RedactionRegion = z.infer<typeof RedactionRegion>;
|
|
167
|
+
/**
|
|
168
|
+
* One area to mask on every screenshot it applies to (step shots *and* halt shots): either an
|
|
169
|
+
* element (locator ref / inline selector, resolved to its bounding box at capture time) or a fixed
|
|
170
|
+
* `region`. Default `style` is `box` (solid #000 fill); `pixelate` is a 16-px mosaic. A selector
|
|
171
|
+
* that matches nothing at capture time is skipped with a stderr warning — redacting an absent
|
|
172
|
+
* element is vacuously satisfied, never a halt. Flow-level `redactions` apply to every step;
|
|
173
|
+
* per-step `redactions` are additive.
|
|
174
|
+
*/
|
|
175
|
+
export declare const RedactionSpec: z.ZodUnion<[z.ZodObject<{
|
|
176
|
+
selector: z.ZodString;
|
|
177
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
178
|
+
}, "strict", z.ZodTypeAny, {
|
|
179
|
+
selector: string;
|
|
180
|
+
style?: "box" | "pixelate" | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
selector: string;
|
|
183
|
+
style?: "box" | "pixelate" | undefined;
|
|
184
|
+
}>, z.ZodObject<{
|
|
185
|
+
region: z.ZodObject<{
|
|
186
|
+
x: z.ZodNumber;
|
|
187
|
+
y: z.ZodNumber;
|
|
188
|
+
width: z.ZodNumber;
|
|
189
|
+
height: z.ZodNumber;
|
|
190
|
+
}, "strict", z.ZodTypeAny, {
|
|
191
|
+
x: number;
|
|
192
|
+
y: number;
|
|
193
|
+
width: number;
|
|
194
|
+
height: number;
|
|
195
|
+
}, {
|
|
196
|
+
x: number;
|
|
197
|
+
y: number;
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
}>;
|
|
201
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
202
|
+
}, "strict", z.ZodTypeAny, {
|
|
203
|
+
region: {
|
|
204
|
+
x: number;
|
|
205
|
+
y: number;
|
|
206
|
+
width: number;
|
|
207
|
+
height: number;
|
|
208
|
+
};
|
|
209
|
+
style?: "box" | "pixelate" | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
region: {
|
|
212
|
+
x: number;
|
|
213
|
+
y: number;
|
|
214
|
+
width: number;
|
|
215
|
+
height: number;
|
|
216
|
+
};
|
|
217
|
+
style?: "box" | "pixelate" | undefined;
|
|
218
|
+
}>]>;
|
|
219
|
+
export type RedactionSpec = z.infer<typeof RedactionSpec>;
|
|
220
|
+
export declare const StepAnnotation: z.ZodObject<{
|
|
221
|
+
copy: z.ZodString;
|
|
222
|
+
arrow: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
223
|
+
/**
|
|
224
|
+
* Optional pixel offset applied to the callout + arrow after Popper-like placement. The halo (which
|
|
225
|
+
* highlights the target element) stays on the target. Use this when two annotations on the same
|
|
226
|
+
* screenshot would otherwise overlap each other — nudge one aside so both are readable.
|
|
227
|
+
* Image-space pixels; small values (5–40 px in either direction) typically suffice.
|
|
228
|
+
*/
|
|
229
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
x: z.ZodNumber;
|
|
231
|
+
y: z.ZodNumber;
|
|
232
|
+
}, "strict", z.ZodTypeAny, {
|
|
233
|
+
x: number;
|
|
234
|
+
y: number;
|
|
235
|
+
}, {
|
|
236
|
+
x: number;
|
|
237
|
+
y: number;
|
|
238
|
+
}>>;
|
|
239
|
+
/**
|
|
240
|
+
* Optional override: the locator to anchor the halo/arrow to. Default = the step's `target`. Use this on
|
|
241
|
+
* a step whose action *transitions the UI* — the action target vanishes (gets unmounted / replaced) and
|
|
242
|
+
* a *different* element is what you want to highlight in the resulting state. Point this at the
|
|
243
|
+
* surviving / appearing element.
|
|
244
|
+
*/
|
|
245
|
+
target: z.ZodOptional<z.ZodString>;
|
|
246
|
+
}, "strict", z.ZodTypeAny, {
|
|
247
|
+
copy: string;
|
|
248
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
249
|
+
nudge?: {
|
|
250
|
+
x: number;
|
|
251
|
+
y: number;
|
|
252
|
+
} | undefined;
|
|
253
|
+
target?: string | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
copy: string;
|
|
256
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
257
|
+
nudge?: {
|
|
258
|
+
x: number;
|
|
259
|
+
y: number;
|
|
260
|
+
} | undefined;
|
|
261
|
+
target?: string | undefined;
|
|
262
|
+
}>;
|
|
263
|
+
export type StepAnnotation = z.infer<typeof StepAnnotation>;
|
|
264
|
+
export declare const Step: z.ZodEffects<z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
action: z.ZodEnum<["navigate", "click", "fill", "upload", "press", "hover", "select", "check", "uncheck", "wait"]>;
|
|
267
|
+
/**
|
|
268
|
+
* Best-effort step: if the action / `wait_for` / `success` check throws (target absent, wait timed
|
|
269
|
+
* out, etc.), **skip this step and continue** instead of halting the flow. For conditionally-present
|
|
270
|
+
* UI — a confirmation modal that sometimes appears, a first-run tooltip, a cookie banner. A skipped
|
|
271
|
+
* optional step emits no screenshot / annotation (same as a step skipped by `--start-from`). Prefer
|
|
272
|
+
* this over a permissive comma-selector that no-ops on one branch.
|
|
273
|
+
*/
|
|
274
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
/** Locator ref (`$name`) or inline selector. Optional for actions like `navigate` (uses `value`) or `wait`. */
|
|
276
|
+
target: z.ZodOptional<z.ZodString>;
|
|
277
|
+
/** Action payload: text for `fill`, file path for `upload`, key for `press`, path/URL for `navigate`, option for `select`. */
|
|
278
|
+
value: z.ZodOptional<z.ZodString>;
|
|
279
|
+
wait_for: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["network_idle", "element_stable", "load"]>, z.ZodObject<{
|
|
280
|
+
timeout_ms: z.ZodNumber;
|
|
281
|
+
}, "strict", z.ZodTypeAny, {
|
|
282
|
+
timeout_ms: number;
|
|
283
|
+
}, {
|
|
284
|
+
timeout_ms: number;
|
|
285
|
+
}>, z.ZodObject<{
|
|
286
|
+
selector: z.ZodString;
|
|
287
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
288
|
+
}, "strict", z.ZodTypeAny, {
|
|
289
|
+
selector: string;
|
|
290
|
+
timeout_ms?: number | undefined;
|
|
291
|
+
}, {
|
|
292
|
+
selector: string;
|
|
293
|
+
timeout_ms?: number | undefined;
|
|
294
|
+
}>]>>;
|
|
295
|
+
success: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
296
|
+
visible: z.ZodString;
|
|
297
|
+
}, "strict", z.ZodTypeAny, {
|
|
298
|
+
visible: string;
|
|
299
|
+
}, {
|
|
300
|
+
visible: string;
|
|
301
|
+
}>, z.ZodObject<{
|
|
302
|
+
hidden: z.ZodString;
|
|
303
|
+
}, "strict", z.ZodTypeAny, {
|
|
304
|
+
hidden: string;
|
|
305
|
+
}, {
|
|
306
|
+
hidden: string;
|
|
307
|
+
}>, z.ZodObject<{
|
|
308
|
+
url_matches: z.ZodString;
|
|
309
|
+
}, "strict", z.ZodTypeAny, {
|
|
310
|
+
url_matches: string;
|
|
311
|
+
}, {
|
|
312
|
+
url_matches: string;
|
|
313
|
+
}>, z.ZodObject<{
|
|
314
|
+
text_contains: z.ZodObject<{
|
|
315
|
+
selector: z.ZodString;
|
|
316
|
+
text: z.ZodString;
|
|
317
|
+
}, "strict", z.ZodTypeAny, {
|
|
318
|
+
selector: string;
|
|
319
|
+
text: string;
|
|
320
|
+
}, {
|
|
321
|
+
selector: string;
|
|
322
|
+
text: string;
|
|
323
|
+
}>;
|
|
324
|
+
}, "strict", z.ZodTypeAny, {
|
|
325
|
+
text_contains: {
|
|
326
|
+
selector: string;
|
|
327
|
+
text: string;
|
|
328
|
+
};
|
|
329
|
+
}, {
|
|
330
|
+
text_contains: {
|
|
331
|
+
selector: string;
|
|
332
|
+
text: string;
|
|
333
|
+
};
|
|
334
|
+
}>]>>;
|
|
335
|
+
/** Single call-out on this step's screenshot. Shorthand for a one-element `annotations` array. */
|
|
336
|
+
annotation: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
copy: z.ZodString;
|
|
338
|
+
arrow: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
339
|
+
/**
|
|
340
|
+
* Optional pixel offset applied to the callout + arrow after Popper-like placement. The halo (which
|
|
341
|
+
* highlights the target element) stays on the target. Use this when two annotations on the same
|
|
342
|
+
* screenshot would otherwise overlap each other — nudge one aside so both are readable.
|
|
343
|
+
* Image-space pixels; small values (5–40 px in either direction) typically suffice.
|
|
344
|
+
*/
|
|
345
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
346
|
+
x: z.ZodNumber;
|
|
347
|
+
y: z.ZodNumber;
|
|
348
|
+
}, "strict", z.ZodTypeAny, {
|
|
349
|
+
x: number;
|
|
350
|
+
y: number;
|
|
351
|
+
}, {
|
|
352
|
+
x: number;
|
|
353
|
+
y: number;
|
|
354
|
+
}>>;
|
|
355
|
+
/**
|
|
356
|
+
* Optional override: the locator to anchor the halo/arrow to. Default = the step's `target`. Use this on
|
|
357
|
+
* a step whose action *transitions the UI* — the action target vanishes (gets unmounted / replaced) and
|
|
358
|
+
* a *different* element is what you want to highlight in the resulting state. Point this at the
|
|
359
|
+
* surviving / appearing element.
|
|
360
|
+
*/
|
|
361
|
+
target: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, "strict", z.ZodTypeAny, {
|
|
363
|
+
copy: string;
|
|
364
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
365
|
+
nudge?: {
|
|
366
|
+
x: number;
|
|
367
|
+
y: number;
|
|
368
|
+
} | undefined;
|
|
369
|
+
target?: string | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
copy: string;
|
|
372
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
373
|
+
nudge?: {
|
|
374
|
+
x: number;
|
|
375
|
+
y: number;
|
|
376
|
+
} | undefined;
|
|
377
|
+
target?: string | undefined;
|
|
378
|
+
}>>;
|
|
379
|
+
/**
|
|
380
|
+
* Multiple call-outs on the same screenshot — rendered as numbered badges (1, 2, …) so the reader sees
|
|
381
|
+
* up front that there's more than one thing to look at without having to hover everything. Each entry
|
|
382
|
+
* has its own `target` (defaults to the step's `target`) and `copy` / `arrow` — see {@link StepAnnotation}.
|
|
383
|
+
* Mutually exclusive with `annotation`.
|
|
384
|
+
*/
|
|
385
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
386
|
+
copy: z.ZodString;
|
|
387
|
+
arrow: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
388
|
+
/**
|
|
389
|
+
* Optional pixel offset applied to the callout + arrow after Popper-like placement. The halo (which
|
|
390
|
+
* highlights the target element) stays on the target. Use this when two annotations on the same
|
|
391
|
+
* screenshot would otherwise overlap each other — nudge one aside so both are readable.
|
|
392
|
+
* Image-space pixels; small values (5–40 px in either direction) typically suffice.
|
|
393
|
+
*/
|
|
394
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
x: z.ZodNumber;
|
|
396
|
+
y: z.ZodNumber;
|
|
397
|
+
}, "strict", z.ZodTypeAny, {
|
|
398
|
+
x: number;
|
|
399
|
+
y: number;
|
|
400
|
+
}, {
|
|
401
|
+
x: number;
|
|
402
|
+
y: number;
|
|
403
|
+
}>>;
|
|
404
|
+
/**
|
|
405
|
+
* Optional override: the locator to anchor the halo/arrow to. Default = the step's `target`. Use this on
|
|
406
|
+
* a step whose action *transitions the UI* — the action target vanishes (gets unmounted / replaced) and
|
|
407
|
+
* a *different* element is what you want to highlight in the resulting state. Point this at the
|
|
408
|
+
* surviving / appearing element.
|
|
409
|
+
*/
|
|
410
|
+
target: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, "strict", z.ZodTypeAny, {
|
|
412
|
+
copy: string;
|
|
413
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
414
|
+
nudge?: {
|
|
415
|
+
x: number;
|
|
416
|
+
y: number;
|
|
417
|
+
} | undefined;
|
|
418
|
+
target?: string | undefined;
|
|
419
|
+
}, {
|
|
420
|
+
copy: string;
|
|
421
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
422
|
+
nudge?: {
|
|
423
|
+
x: number;
|
|
424
|
+
y: number;
|
|
425
|
+
} | undefined;
|
|
426
|
+
target?: string | undefined;
|
|
427
|
+
}>, "many">>;
|
|
428
|
+
/** Extra redactions for this step's screenshots, additive on top of the flow-level list. */
|
|
429
|
+
redactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
430
|
+
selector: z.ZodString;
|
|
431
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
432
|
+
}, "strict", z.ZodTypeAny, {
|
|
433
|
+
selector: string;
|
|
434
|
+
style?: "box" | "pixelate" | undefined;
|
|
435
|
+
}, {
|
|
436
|
+
selector: string;
|
|
437
|
+
style?: "box" | "pixelate" | undefined;
|
|
438
|
+
}>, z.ZodObject<{
|
|
439
|
+
region: z.ZodObject<{
|
|
440
|
+
x: z.ZodNumber;
|
|
441
|
+
y: z.ZodNumber;
|
|
442
|
+
width: z.ZodNumber;
|
|
443
|
+
height: z.ZodNumber;
|
|
444
|
+
}, "strict", z.ZodTypeAny, {
|
|
445
|
+
x: number;
|
|
446
|
+
y: number;
|
|
447
|
+
width: number;
|
|
448
|
+
height: number;
|
|
449
|
+
}, {
|
|
450
|
+
x: number;
|
|
451
|
+
y: number;
|
|
452
|
+
width: number;
|
|
453
|
+
height: number;
|
|
454
|
+
}>;
|
|
455
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
456
|
+
}, "strict", z.ZodTypeAny, {
|
|
457
|
+
region: {
|
|
458
|
+
x: number;
|
|
459
|
+
y: number;
|
|
460
|
+
width: number;
|
|
461
|
+
height: number;
|
|
462
|
+
};
|
|
463
|
+
style?: "box" | "pixelate" | undefined;
|
|
464
|
+
}, {
|
|
465
|
+
region: {
|
|
466
|
+
x: number;
|
|
467
|
+
y: number;
|
|
468
|
+
width: number;
|
|
469
|
+
height: number;
|
|
470
|
+
};
|
|
471
|
+
style?: "box" | "pixelate" | undefined;
|
|
472
|
+
}>]>, "many">>;
|
|
473
|
+
}, "strict", z.ZodTypeAny, {
|
|
474
|
+
id: string;
|
|
475
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
476
|
+
value?: string | undefined;
|
|
477
|
+
target?: string | undefined;
|
|
478
|
+
optional?: boolean | undefined;
|
|
479
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
480
|
+
timeout_ms: number;
|
|
481
|
+
} | {
|
|
482
|
+
selector: string;
|
|
483
|
+
timeout_ms?: number | undefined;
|
|
484
|
+
} | undefined;
|
|
485
|
+
success?: {
|
|
486
|
+
visible: string;
|
|
487
|
+
} | {
|
|
488
|
+
hidden: string;
|
|
489
|
+
} | {
|
|
490
|
+
url_matches: string;
|
|
491
|
+
} | {
|
|
492
|
+
text_contains: {
|
|
493
|
+
selector: string;
|
|
494
|
+
text: string;
|
|
495
|
+
};
|
|
496
|
+
} | undefined;
|
|
497
|
+
annotation?: {
|
|
498
|
+
copy: string;
|
|
499
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
500
|
+
nudge?: {
|
|
501
|
+
x: number;
|
|
502
|
+
y: number;
|
|
503
|
+
} | undefined;
|
|
504
|
+
target?: string | undefined;
|
|
505
|
+
} | undefined;
|
|
506
|
+
annotations?: {
|
|
507
|
+
copy: string;
|
|
508
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
509
|
+
nudge?: {
|
|
510
|
+
x: number;
|
|
511
|
+
y: number;
|
|
512
|
+
} | undefined;
|
|
513
|
+
target?: string | undefined;
|
|
514
|
+
}[] | undefined;
|
|
515
|
+
redactions?: ({
|
|
516
|
+
selector: string;
|
|
517
|
+
style?: "box" | "pixelate" | undefined;
|
|
518
|
+
} | {
|
|
519
|
+
region: {
|
|
520
|
+
x: number;
|
|
521
|
+
y: number;
|
|
522
|
+
width: number;
|
|
523
|
+
height: number;
|
|
524
|
+
};
|
|
525
|
+
style?: "box" | "pixelate" | undefined;
|
|
526
|
+
})[] | undefined;
|
|
527
|
+
}, {
|
|
528
|
+
id: string;
|
|
529
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
530
|
+
value?: string | undefined;
|
|
531
|
+
target?: string | undefined;
|
|
532
|
+
optional?: boolean | undefined;
|
|
533
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
534
|
+
timeout_ms: number;
|
|
535
|
+
} | {
|
|
536
|
+
selector: string;
|
|
537
|
+
timeout_ms?: number | undefined;
|
|
538
|
+
} | undefined;
|
|
539
|
+
success?: {
|
|
540
|
+
visible: string;
|
|
541
|
+
} | {
|
|
542
|
+
hidden: string;
|
|
543
|
+
} | {
|
|
544
|
+
url_matches: string;
|
|
545
|
+
} | {
|
|
546
|
+
text_contains: {
|
|
547
|
+
selector: string;
|
|
548
|
+
text: string;
|
|
549
|
+
};
|
|
550
|
+
} | undefined;
|
|
551
|
+
annotation?: {
|
|
552
|
+
copy: string;
|
|
553
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
554
|
+
nudge?: {
|
|
555
|
+
x: number;
|
|
556
|
+
y: number;
|
|
557
|
+
} | undefined;
|
|
558
|
+
target?: string | undefined;
|
|
559
|
+
} | undefined;
|
|
560
|
+
annotations?: {
|
|
561
|
+
copy: string;
|
|
562
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
563
|
+
nudge?: {
|
|
564
|
+
x: number;
|
|
565
|
+
y: number;
|
|
566
|
+
} | undefined;
|
|
567
|
+
target?: string | undefined;
|
|
568
|
+
}[] | undefined;
|
|
569
|
+
redactions?: ({
|
|
570
|
+
selector: string;
|
|
571
|
+
style?: "box" | "pixelate" | undefined;
|
|
572
|
+
} | {
|
|
573
|
+
region: {
|
|
574
|
+
x: number;
|
|
575
|
+
y: number;
|
|
576
|
+
width: number;
|
|
577
|
+
height: number;
|
|
578
|
+
};
|
|
579
|
+
style?: "box" | "pixelate" | undefined;
|
|
580
|
+
})[] | undefined;
|
|
581
|
+
}>, {
|
|
582
|
+
id: string;
|
|
583
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
584
|
+
value?: string | undefined;
|
|
585
|
+
target?: string | undefined;
|
|
586
|
+
optional?: boolean | undefined;
|
|
587
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
588
|
+
timeout_ms: number;
|
|
589
|
+
} | {
|
|
590
|
+
selector: string;
|
|
591
|
+
timeout_ms?: number | undefined;
|
|
592
|
+
} | undefined;
|
|
593
|
+
success?: {
|
|
594
|
+
visible: string;
|
|
595
|
+
} | {
|
|
596
|
+
hidden: string;
|
|
597
|
+
} | {
|
|
598
|
+
url_matches: string;
|
|
599
|
+
} | {
|
|
600
|
+
text_contains: {
|
|
601
|
+
selector: string;
|
|
602
|
+
text: string;
|
|
603
|
+
};
|
|
604
|
+
} | undefined;
|
|
605
|
+
annotation?: {
|
|
606
|
+
copy: string;
|
|
607
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
608
|
+
nudge?: {
|
|
609
|
+
x: number;
|
|
610
|
+
y: number;
|
|
611
|
+
} | undefined;
|
|
612
|
+
target?: string | undefined;
|
|
613
|
+
} | undefined;
|
|
614
|
+
annotations?: {
|
|
615
|
+
copy: string;
|
|
616
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
617
|
+
nudge?: {
|
|
618
|
+
x: number;
|
|
619
|
+
y: number;
|
|
620
|
+
} | undefined;
|
|
621
|
+
target?: string | undefined;
|
|
622
|
+
}[] | undefined;
|
|
623
|
+
redactions?: ({
|
|
624
|
+
selector: string;
|
|
625
|
+
style?: "box" | "pixelate" | undefined;
|
|
626
|
+
} | {
|
|
627
|
+
region: {
|
|
628
|
+
x: number;
|
|
629
|
+
y: number;
|
|
630
|
+
width: number;
|
|
631
|
+
height: number;
|
|
632
|
+
};
|
|
633
|
+
style?: "box" | "pixelate" | undefined;
|
|
634
|
+
})[] | undefined;
|
|
635
|
+
}, {
|
|
636
|
+
id: string;
|
|
637
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
638
|
+
value?: string | undefined;
|
|
639
|
+
target?: string | undefined;
|
|
640
|
+
optional?: boolean | undefined;
|
|
641
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
642
|
+
timeout_ms: number;
|
|
643
|
+
} | {
|
|
644
|
+
selector: string;
|
|
645
|
+
timeout_ms?: number | undefined;
|
|
646
|
+
} | undefined;
|
|
647
|
+
success?: {
|
|
648
|
+
visible: string;
|
|
649
|
+
} | {
|
|
650
|
+
hidden: string;
|
|
651
|
+
} | {
|
|
652
|
+
url_matches: string;
|
|
653
|
+
} | {
|
|
654
|
+
text_contains: {
|
|
655
|
+
selector: string;
|
|
656
|
+
text: string;
|
|
657
|
+
};
|
|
658
|
+
} | undefined;
|
|
659
|
+
annotation?: {
|
|
660
|
+
copy: string;
|
|
661
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
662
|
+
nudge?: {
|
|
663
|
+
x: number;
|
|
664
|
+
y: number;
|
|
665
|
+
} | undefined;
|
|
666
|
+
target?: string | undefined;
|
|
667
|
+
} | undefined;
|
|
668
|
+
annotations?: {
|
|
669
|
+
copy: string;
|
|
670
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
671
|
+
nudge?: {
|
|
672
|
+
x: number;
|
|
673
|
+
y: number;
|
|
674
|
+
} | undefined;
|
|
675
|
+
target?: string | undefined;
|
|
676
|
+
}[] | undefined;
|
|
677
|
+
redactions?: ({
|
|
678
|
+
selector: string;
|
|
679
|
+
style?: "box" | "pixelate" | undefined;
|
|
680
|
+
} | {
|
|
681
|
+
region: {
|
|
682
|
+
x: number;
|
|
683
|
+
y: number;
|
|
684
|
+
width: number;
|
|
685
|
+
height: number;
|
|
686
|
+
};
|
|
687
|
+
style?: "box" | "pixelate" | undefined;
|
|
688
|
+
})[] | undefined;
|
|
689
|
+
}>;
|
|
690
|
+
export type Step = z.infer<typeof Step>;
|
|
691
|
+
/** A precondition the flow assumes (e.g. `{ logged_in_as: "editor" }`, `{ feature_flag: "recap.enabled" }`). */
|
|
692
|
+
export declare const Prerequisite: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
693
|
+
export type Prerequisite = z.infer<typeof Prerequisite>;
|
|
694
|
+
export declare const FlowFile: z.ZodObject<{
|
|
695
|
+
name: z.ZodString;
|
|
696
|
+
/**
|
|
697
|
+
* Name of another flow whose steps run *first* (composition). The parent's `locators` + `prerequisites`
|
|
698
|
+
* are merged in (this flow wins on collisions); step ids must be unique across the merge. Chains allowed
|
|
699
|
+
* (A extends B extends C); cycles are rejected. Resolved at run time against `flows/<name>.flow.yaml`.
|
|
700
|
+
* Typical use: factor out a shared preamble (Library → open a video → editor) so dependent flows don't
|
|
701
|
+
* re-walk it every run. (`run --stop-after` operates on the merged step list.)
|
|
702
|
+
*/
|
|
703
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
704
|
+
/**
|
|
705
|
+
* Deterministic execution environment (frozen clock, locale, timezone, viewport, color scheme,
|
|
706
|
+
* reduced motion). With `extends`, merged per-key — this flow's keys win over the parent's.
|
|
707
|
+
*/
|
|
708
|
+
environment: z.ZodOptional<z.ZodObject<{
|
|
709
|
+
/** ISO-8601 instant the page clock is frozen at — `new Date()` etc. return this for the whole run. */
|
|
710
|
+
clock: z.ZodOptional<z.ZodString>;
|
|
711
|
+
/** BCP-47 language tag (e.g. `en-GB`). */
|
|
712
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
713
|
+
/** IANA timezone (e.g. `Europe/Amsterdam`). */
|
|
714
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
715
|
+
/** `{ width, height }` in CSS pixels, or a named preset — see {@link VIEWPORT_PRESETS}. */
|
|
716
|
+
viewport: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["desktop", "tablet", "mobile"]>, z.ZodObject<{
|
|
717
|
+
width: z.ZodNumber;
|
|
718
|
+
height: z.ZodNumber;
|
|
719
|
+
}, "strict", z.ZodTypeAny, {
|
|
720
|
+
width: number;
|
|
721
|
+
height: number;
|
|
722
|
+
}, {
|
|
723
|
+
width: number;
|
|
724
|
+
height: number;
|
|
725
|
+
}>]>>;
|
|
726
|
+
color_scheme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
|
|
727
|
+
reduced_motion: z.ZodOptional<z.ZodBoolean>;
|
|
728
|
+
}, "strict", z.ZodTypeAny, {
|
|
729
|
+
clock?: string | undefined;
|
|
730
|
+
locale?: string | undefined;
|
|
731
|
+
timezone?: string | undefined;
|
|
732
|
+
viewport?: {
|
|
733
|
+
width: number;
|
|
734
|
+
height: number;
|
|
735
|
+
} | "desktop" | "tablet" | "mobile" | undefined;
|
|
736
|
+
color_scheme?: "light" | "dark" | undefined;
|
|
737
|
+
reduced_motion?: boolean | undefined;
|
|
738
|
+
}, {
|
|
739
|
+
clock?: string | undefined;
|
|
740
|
+
locale?: string | undefined;
|
|
741
|
+
timezone?: string | undefined;
|
|
742
|
+
viewport?: {
|
|
743
|
+
width: number;
|
|
744
|
+
height: number;
|
|
745
|
+
} | "desktop" | "tablet" | "mobile" | undefined;
|
|
746
|
+
color_scheme?: "light" | "dark" | undefined;
|
|
747
|
+
reduced_motion?: boolean | undefined;
|
|
748
|
+
}>>;
|
|
749
|
+
/** Areas masked on every screenshot this flow produces (incl. halt shots). See {@link RedactionSpec}. */
|
|
750
|
+
redactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
751
|
+
selector: z.ZodString;
|
|
752
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
753
|
+
}, "strict", z.ZodTypeAny, {
|
|
754
|
+
selector: string;
|
|
755
|
+
style?: "box" | "pixelate" | undefined;
|
|
756
|
+
}, {
|
|
757
|
+
selector: string;
|
|
758
|
+
style?: "box" | "pixelate" | undefined;
|
|
759
|
+
}>, z.ZodObject<{
|
|
760
|
+
region: z.ZodObject<{
|
|
761
|
+
x: z.ZodNumber;
|
|
762
|
+
y: z.ZodNumber;
|
|
763
|
+
width: z.ZodNumber;
|
|
764
|
+
height: z.ZodNumber;
|
|
765
|
+
}, "strict", z.ZodTypeAny, {
|
|
766
|
+
x: number;
|
|
767
|
+
y: number;
|
|
768
|
+
width: number;
|
|
769
|
+
height: number;
|
|
770
|
+
}, {
|
|
771
|
+
x: number;
|
|
772
|
+
y: number;
|
|
773
|
+
width: number;
|
|
774
|
+
height: number;
|
|
775
|
+
}>;
|
|
776
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
777
|
+
}, "strict", z.ZodTypeAny, {
|
|
778
|
+
region: {
|
|
779
|
+
x: number;
|
|
780
|
+
y: number;
|
|
781
|
+
width: number;
|
|
782
|
+
height: number;
|
|
783
|
+
};
|
|
784
|
+
style?: "box" | "pixelate" | undefined;
|
|
785
|
+
}, {
|
|
786
|
+
region: {
|
|
787
|
+
x: number;
|
|
788
|
+
y: number;
|
|
789
|
+
width: number;
|
|
790
|
+
height: number;
|
|
791
|
+
};
|
|
792
|
+
style?: "box" | "pixelate" | undefined;
|
|
793
|
+
}>]>, "many">>;
|
|
794
|
+
prerequisites: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>, "many">>;
|
|
795
|
+
/** Named canonical locators referenced from steps as `$name`. One per name; no fallback lists. */
|
|
796
|
+
locators: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
797
|
+
steps: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
798
|
+
id: z.ZodString;
|
|
799
|
+
action: z.ZodEnum<["navigate", "click", "fill", "upload", "press", "hover", "select", "check", "uncheck", "wait"]>;
|
|
800
|
+
/**
|
|
801
|
+
* Best-effort step: if the action / `wait_for` / `success` check throws (target absent, wait timed
|
|
802
|
+
* out, etc.), **skip this step and continue** instead of halting the flow. For conditionally-present
|
|
803
|
+
* UI — a confirmation modal that sometimes appears, a first-run tooltip, a cookie banner. A skipped
|
|
804
|
+
* optional step emits no screenshot / annotation (same as a step skipped by `--start-from`). Prefer
|
|
805
|
+
* this over a permissive comma-selector that no-ops on one branch.
|
|
806
|
+
*/
|
|
807
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
808
|
+
/** Locator ref (`$name`) or inline selector. Optional for actions like `navigate` (uses `value`) or `wait`. */
|
|
809
|
+
target: z.ZodOptional<z.ZodString>;
|
|
810
|
+
/** Action payload: text for `fill`, file path for `upload`, key for `press`, path/URL for `navigate`, option for `select`. */
|
|
811
|
+
value: z.ZodOptional<z.ZodString>;
|
|
812
|
+
wait_for: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["network_idle", "element_stable", "load"]>, z.ZodObject<{
|
|
813
|
+
timeout_ms: z.ZodNumber;
|
|
814
|
+
}, "strict", z.ZodTypeAny, {
|
|
815
|
+
timeout_ms: number;
|
|
816
|
+
}, {
|
|
817
|
+
timeout_ms: number;
|
|
818
|
+
}>, z.ZodObject<{
|
|
819
|
+
selector: z.ZodString;
|
|
820
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
821
|
+
}, "strict", z.ZodTypeAny, {
|
|
822
|
+
selector: string;
|
|
823
|
+
timeout_ms?: number | undefined;
|
|
824
|
+
}, {
|
|
825
|
+
selector: string;
|
|
826
|
+
timeout_ms?: number | undefined;
|
|
827
|
+
}>]>>;
|
|
828
|
+
success: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
829
|
+
visible: z.ZodString;
|
|
830
|
+
}, "strict", z.ZodTypeAny, {
|
|
831
|
+
visible: string;
|
|
832
|
+
}, {
|
|
833
|
+
visible: string;
|
|
834
|
+
}>, z.ZodObject<{
|
|
835
|
+
hidden: z.ZodString;
|
|
836
|
+
}, "strict", z.ZodTypeAny, {
|
|
837
|
+
hidden: string;
|
|
838
|
+
}, {
|
|
839
|
+
hidden: string;
|
|
840
|
+
}>, z.ZodObject<{
|
|
841
|
+
url_matches: z.ZodString;
|
|
842
|
+
}, "strict", z.ZodTypeAny, {
|
|
843
|
+
url_matches: string;
|
|
844
|
+
}, {
|
|
845
|
+
url_matches: string;
|
|
846
|
+
}>, z.ZodObject<{
|
|
847
|
+
text_contains: z.ZodObject<{
|
|
848
|
+
selector: z.ZodString;
|
|
849
|
+
text: z.ZodString;
|
|
850
|
+
}, "strict", z.ZodTypeAny, {
|
|
851
|
+
selector: string;
|
|
852
|
+
text: string;
|
|
853
|
+
}, {
|
|
854
|
+
selector: string;
|
|
855
|
+
text: string;
|
|
856
|
+
}>;
|
|
857
|
+
}, "strict", z.ZodTypeAny, {
|
|
858
|
+
text_contains: {
|
|
859
|
+
selector: string;
|
|
860
|
+
text: string;
|
|
861
|
+
};
|
|
862
|
+
}, {
|
|
863
|
+
text_contains: {
|
|
864
|
+
selector: string;
|
|
865
|
+
text: string;
|
|
866
|
+
};
|
|
867
|
+
}>]>>;
|
|
868
|
+
/** Single call-out on this step's screenshot. Shorthand for a one-element `annotations` array. */
|
|
869
|
+
annotation: z.ZodOptional<z.ZodObject<{
|
|
870
|
+
copy: z.ZodString;
|
|
871
|
+
arrow: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
872
|
+
/**
|
|
873
|
+
* Optional pixel offset applied to the callout + arrow after Popper-like placement. The halo (which
|
|
874
|
+
* highlights the target element) stays on the target. Use this when two annotations on the same
|
|
875
|
+
* screenshot would otherwise overlap each other — nudge one aside so both are readable.
|
|
876
|
+
* Image-space pixels; small values (5–40 px in either direction) typically suffice.
|
|
877
|
+
*/
|
|
878
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
879
|
+
x: z.ZodNumber;
|
|
880
|
+
y: z.ZodNumber;
|
|
881
|
+
}, "strict", z.ZodTypeAny, {
|
|
882
|
+
x: number;
|
|
883
|
+
y: number;
|
|
884
|
+
}, {
|
|
885
|
+
x: number;
|
|
886
|
+
y: number;
|
|
887
|
+
}>>;
|
|
888
|
+
/**
|
|
889
|
+
* Optional override: the locator to anchor the halo/arrow to. Default = the step's `target`. Use this on
|
|
890
|
+
* a step whose action *transitions the UI* — the action target vanishes (gets unmounted / replaced) and
|
|
891
|
+
* a *different* element is what you want to highlight in the resulting state. Point this at the
|
|
892
|
+
* surviving / appearing element.
|
|
893
|
+
*/
|
|
894
|
+
target: z.ZodOptional<z.ZodString>;
|
|
895
|
+
}, "strict", z.ZodTypeAny, {
|
|
896
|
+
copy: string;
|
|
897
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
898
|
+
nudge?: {
|
|
899
|
+
x: number;
|
|
900
|
+
y: number;
|
|
901
|
+
} | undefined;
|
|
902
|
+
target?: string | undefined;
|
|
903
|
+
}, {
|
|
904
|
+
copy: string;
|
|
905
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
906
|
+
nudge?: {
|
|
907
|
+
x: number;
|
|
908
|
+
y: number;
|
|
909
|
+
} | undefined;
|
|
910
|
+
target?: string | undefined;
|
|
911
|
+
}>>;
|
|
912
|
+
/**
|
|
913
|
+
* Multiple call-outs on the same screenshot — rendered as numbered badges (1, 2, …) so the reader sees
|
|
914
|
+
* up front that there's more than one thing to look at without having to hover everything. Each entry
|
|
915
|
+
* has its own `target` (defaults to the step's `target`) and `copy` / `arrow` — see {@link StepAnnotation}.
|
|
916
|
+
* Mutually exclusive with `annotation`.
|
|
917
|
+
*/
|
|
918
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
919
|
+
copy: z.ZodString;
|
|
920
|
+
arrow: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
921
|
+
/**
|
|
922
|
+
* Optional pixel offset applied to the callout + arrow after Popper-like placement. The halo (which
|
|
923
|
+
* highlights the target element) stays on the target. Use this when two annotations on the same
|
|
924
|
+
* screenshot would otherwise overlap each other — nudge one aside so both are readable.
|
|
925
|
+
* Image-space pixels; small values (5–40 px in either direction) typically suffice.
|
|
926
|
+
*/
|
|
927
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
928
|
+
x: z.ZodNumber;
|
|
929
|
+
y: z.ZodNumber;
|
|
930
|
+
}, "strict", z.ZodTypeAny, {
|
|
931
|
+
x: number;
|
|
932
|
+
y: number;
|
|
933
|
+
}, {
|
|
934
|
+
x: number;
|
|
935
|
+
y: number;
|
|
936
|
+
}>>;
|
|
937
|
+
/**
|
|
938
|
+
* Optional override: the locator to anchor the halo/arrow to. Default = the step's `target`. Use this on
|
|
939
|
+
* a step whose action *transitions the UI* — the action target vanishes (gets unmounted / replaced) and
|
|
940
|
+
* a *different* element is what you want to highlight in the resulting state. Point this at the
|
|
941
|
+
* surviving / appearing element.
|
|
942
|
+
*/
|
|
943
|
+
target: z.ZodOptional<z.ZodString>;
|
|
944
|
+
}, "strict", z.ZodTypeAny, {
|
|
945
|
+
copy: string;
|
|
946
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
947
|
+
nudge?: {
|
|
948
|
+
x: number;
|
|
949
|
+
y: number;
|
|
950
|
+
} | undefined;
|
|
951
|
+
target?: string | undefined;
|
|
952
|
+
}, {
|
|
953
|
+
copy: string;
|
|
954
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
955
|
+
nudge?: {
|
|
956
|
+
x: number;
|
|
957
|
+
y: number;
|
|
958
|
+
} | undefined;
|
|
959
|
+
target?: string | undefined;
|
|
960
|
+
}>, "many">>;
|
|
961
|
+
/** Extra redactions for this step's screenshots, additive on top of the flow-level list. */
|
|
962
|
+
redactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
963
|
+
selector: z.ZodString;
|
|
964
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
965
|
+
}, "strict", z.ZodTypeAny, {
|
|
966
|
+
selector: string;
|
|
967
|
+
style?: "box" | "pixelate" | undefined;
|
|
968
|
+
}, {
|
|
969
|
+
selector: string;
|
|
970
|
+
style?: "box" | "pixelate" | undefined;
|
|
971
|
+
}>, z.ZodObject<{
|
|
972
|
+
region: z.ZodObject<{
|
|
973
|
+
x: z.ZodNumber;
|
|
974
|
+
y: z.ZodNumber;
|
|
975
|
+
width: z.ZodNumber;
|
|
976
|
+
height: z.ZodNumber;
|
|
977
|
+
}, "strict", z.ZodTypeAny, {
|
|
978
|
+
x: number;
|
|
979
|
+
y: number;
|
|
980
|
+
width: number;
|
|
981
|
+
height: number;
|
|
982
|
+
}, {
|
|
983
|
+
x: number;
|
|
984
|
+
y: number;
|
|
985
|
+
width: number;
|
|
986
|
+
height: number;
|
|
987
|
+
}>;
|
|
988
|
+
style: z.ZodOptional<z.ZodEnum<["box", "pixelate"]>>;
|
|
989
|
+
}, "strict", z.ZodTypeAny, {
|
|
990
|
+
region: {
|
|
991
|
+
x: number;
|
|
992
|
+
y: number;
|
|
993
|
+
width: number;
|
|
994
|
+
height: number;
|
|
995
|
+
};
|
|
996
|
+
style?: "box" | "pixelate" | undefined;
|
|
997
|
+
}, {
|
|
998
|
+
region: {
|
|
999
|
+
x: number;
|
|
1000
|
+
y: number;
|
|
1001
|
+
width: number;
|
|
1002
|
+
height: number;
|
|
1003
|
+
};
|
|
1004
|
+
style?: "box" | "pixelate" | undefined;
|
|
1005
|
+
}>]>, "many">>;
|
|
1006
|
+
}, "strict", z.ZodTypeAny, {
|
|
1007
|
+
id: string;
|
|
1008
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
1009
|
+
value?: string | undefined;
|
|
1010
|
+
target?: string | undefined;
|
|
1011
|
+
optional?: boolean | undefined;
|
|
1012
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
1013
|
+
timeout_ms: number;
|
|
1014
|
+
} | {
|
|
1015
|
+
selector: string;
|
|
1016
|
+
timeout_ms?: number | undefined;
|
|
1017
|
+
} | undefined;
|
|
1018
|
+
success?: {
|
|
1019
|
+
visible: string;
|
|
1020
|
+
} | {
|
|
1021
|
+
hidden: string;
|
|
1022
|
+
} | {
|
|
1023
|
+
url_matches: string;
|
|
1024
|
+
} | {
|
|
1025
|
+
text_contains: {
|
|
1026
|
+
selector: string;
|
|
1027
|
+
text: string;
|
|
1028
|
+
};
|
|
1029
|
+
} | undefined;
|
|
1030
|
+
annotation?: {
|
|
1031
|
+
copy: string;
|
|
1032
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1033
|
+
nudge?: {
|
|
1034
|
+
x: number;
|
|
1035
|
+
y: number;
|
|
1036
|
+
} | undefined;
|
|
1037
|
+
target?: string | undefined;
|
|
1038
|
+
} | undefined;
|
|
1039
|
+
annotations?: {
|
|
1040
|
+
copy: string;
|
|
1041
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1042
|
+
nudge?: {
|
|
1043
|
+
x: number;
|
|
1044
|
+
y: number;
|
|
1045
|
+
} | undefined;
|
|
1046
|
+
target?: string | undefined;
|
|
1047
|
+
}[] | undefined;
|
|
1048
|
+
redactions?: ({
|
|
1049
|
+
selector: string;
|
|
1050
|
+
style?: "box" | "pixelate" | undefined;
|
|
1051
|
+
} | {
|
|
1052
|
+
region: {
|
|
1053
|
+
x: number;
|
|
1054
|
+
y: number;
|
|
1055
|
+
width: number;
|
|
1056
|
+
height: number;
|
|
1057
|
+
};
|
|
1058
|
+
style?: "box" | "pixelate" | undefined;
|
|
1059
|
+
})[] | undefined;
|
|
1060
|
+
}, {
|
|
1061
|
+
id: string;
|
|
1062
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
1063
|
+
value?: string | undefined;
|
|
1064
|
+
target?: string | undefined;
|
|
1065
|
+
optional?: boolean | undefined;
|
|
1066
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
1067
|
+
timeout_ms: number;
|
|
1068
|
+
} | {
|
|
1069
|
+
selector: string;
|
|
1070
|
+
timeout_ms?: number | undefined;
|
|
1071
|
+
} | undefined;
|
|
1072
|
+
success?: {
|
|
1073
|
+
visible: string;
|
|
1074
|
+
} | {
|
|
1075
|
+
hidden: string;
|
|
1076
|
+
} | {
|
|
1077
|
+
url_matches: string;
|
|
1078
|
+
} | {
|
|
1079
|
+
text_contains: {
|
|
1080
|
+
selector: string;
|
|
1081
|
+
text: string;
|
|
1082
|
+
};
|
|
1083
|
+
} | undefined;
|
|
1084
|
+
annotation?: {
|
|
1085
|
+
copy: string;
|
|
1086
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1087
|
+
nudge?: {
|
|
1088
|
+
x: number;
|
|
1089
|
+
y: number;
|
|
1090
|
+
} | undefined;
|
|
1091
|
+
target?: string | undefined;
|
|
1092
|
+
} | undefined;
|
|
1093
|
+
annotations?: {
|
|
1094
|
+
copy: string;
|
|
1095
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1096
|
+
nudge?: {
|
|
1097
|
+
x: number;
|
|
1098
|
+
y: number;
|
|
1099
|
+
} | undefined;
|
|
1100
|
+
target?: string | undefined;
|
|
1101
|
+
}[] | undefined;
|
|
1102
|
+
redactions?: ({
|
|
1103
|
+
selector: string;
|
|
1104
|
+
style?: "box" | "pixelate" | undefined;
|
|
1105
|
+
} | {
|
|
1106
|
+
region: {
|
|
1107
|
+
x: number;
|
|
1108
|
+
y: number;
|
|
1109
|
+
width: number;
|
|
1110
|
+
height: number;
|
|
1111
|
+
};
|
|
1112
|
+
style?: "box" | "pixelate" | undefined;
|
|
1113
|
+
})[] | undefined;
|
|
1114
|
+
}>, {
|
|
1115
|
+
id: string;
|
|
1116
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
1117
|
+
value?: string | undefined;
|
|
1118
|
+
target?: string | undefined;
|
|
1119
|
+
optional?: boolean | undefined;
|
|
1120
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
1121
|
+
timeout_ms: number;
|
|
1122
|
+
} | {
|
|
1123
|
+
selector: string;
|
|
1124
|
+
timeout_ms?: number | undefined;
|
|
1125
|
+
} | undefined;
|
|
1126
|
+
success?: {
|
|
1127
|
+
visible: string;
|
|
1128
|
+
} | {
|
|
1129
|
+
hidden: string;
|
|
1130
|
+
} | {
|
|
1131
|
+
url_matches: string;
|
|
1132
|
+
} | {
|
|
1133
|
+
text_contains: {
|
|
1134
|
+
selector: string;
|
|
1135
|
+
text: string;
|
|
1136
|
+
};
|
|
1137
|
+
} | undefined;
|
|
1138
|
+
annotation?: {
|
|
1139
|
+
copy: string;
|
|
1140
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1141
|
+
nudge?: {
|
|
1142
|
+
x: number;
|
|
1143
|
+
y: number;
|
|
1144
|
+
} | undefined;
|
|
1145
|
+
target?: string | undefined;
|
|
1146
|
+
} | undefined;
|
|
1147
|
+
annotations?: {
|
|
1148
|
+
copy: string;
|
|
1149
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1150
|
+
nudge?: {
|
|
1151
|
+
x: number;
|
|
1152
|
+
y: number;
|
|
1153
|
+
} | undefined;
|
|
1154
|
+
target?: string | undefined;
|
|
1155
|
+
}[] | undefined;
|
|
1156
|
+
redactions?: ({
|
|
1157
|
+
selector: string;
|
|
1158
|
+
style?: "box" | "pixelate" | undefined;
|
|
1159
|
+
} | {
|
|
1160
|
+
region: {
|
|
1161
|
+
x: number;
|
|
1162
|
+
y: number;
|
|
1163
|
+
width: number;
|
|
1164
|
+
height: number;
|
|
1165
|
+
};
|
|
1166
|
+
style?: "box" | "pixelate" | undefined;
|
|
1167
|
+
})[] | undefined;
|
|
1168
|
+
}, {
|
|
1169
|
+
id: string;
|
|
1170
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
1171
|
+
value?: string | undefined;
|
|
1172
|
+
target?: string | undefined;
|
|
1173
|
+
optional?: boolean | undefined;
|
|
1174
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
1175
|
+
timeout_ms: number;
|
|
1176
|
+
} | {
|
|
1177
|
+
selector: string;
|
|
1178
|
+
timeout_ms?: number | undefined;
|
|
1179
|
+
} | undefined;
|
|
1180
|
+
success?: {
|
|
1181
|
+
visible: string;
|
|
1182
|
+
} | {
|
|
1183
|
+
hidden: string;
|
|
1184
|
+
} | {
|
|
1185
|
+
url_matches: string;
|
|
1186
|
+
} | {
|
|
1187
|
+
text_contains: {
|
|
1188
|
+
selector: string;
|
|
1189
|
+
text: string;
|
|
1190
|
+
};
|
|
1191
|
+
} | undefined;
|
|
1192
|
+
annotation?: {
|
|
1193
|
+
copy: string;
|
|
1194
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1195
|
+
nudge?: {
|
|
1196
|
+
x: number;
|
|
1197
|
+
y: number;
|
|
1198
|
+
} | undefined;
|
|
1199
|
+
target?: string | undefined;
|
|
1200
|
+
} | undefined;
|
|
1201
|
+
annotations?: {
|
|
1202
|
+
copy: string;
|
|
1203
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1204
|
+
nudge?: {
|
|
1205
|
+
x: number;
|
|
1206
|
+
y: number;
|
|
1207
|
+
} | undefined;
|
|
1208
|
+
target?: string | undefined;
|
|
1209
|
+
}[] | undefined;
|
|
1210
|
+
redactions?: ({
|
|
1211
|
+
selector: string;
|
|
1212
|
+
style?: "box" | "pixelate" | undefined;
|
|
1213
|
+
} | {
|
|
1214
|
+
region: {
|
|
1215
|
+
x: number;
|
|
1216
|
+
y: number;
|
|
1217
|
+
width: number;
|
|
1218
|
+
height: number;
|
|
1219
|
+
};
|
|
1220
|
+
style?: "box" | "pixelate" | undefined;
|
|
1221
|
+
})[] | undefined;
|
|
1222
|
+
}>, "many">;
|
|
1223
|
+
}, "strict", z.ZodTypeAny, {
|
|
1224
|
+
name: string;
|
|
1225
|
+
prerequisites: Record<string, string | boolean>[];
|
|
1226
|
+
locators: Record<string, string>;
|
|
1227
|
+
steps: {
|
|
1228
|
+
id: string;
|
|
1229
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
1230
|
+
value?: string | undefined;
|
|
1231
|
+
target?: string | undefined;
|
|
1232
|
+
optional?: boolean | undefined;
|
|
1233
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
1234
|
+
timeout_ms: number;
|
|
1235
|
+
} | {
|
|
1236
|
+
selector: string;
|
|
1237
|
+
timeout_ms?: number | undefined;
|
|
1238
|
+
} | undefined;
|
|
1239
|
+
success?: {
|
|
1240
|
+
visible: string;
|
|
1241
|
+
} | {
|
|
1242
|
+
hidden: string;
|
|
1243
|
+
} | {
|
|
1244
|
+
url_matches: string;
|
|
1245
|
+
} | {
|
|
1246
|
+
text_contains: {
|
|
1247
|
+
selector: string;
|
|
1248
|
+
text: string;
|
|
1249
|
+
};
|
|
1250
|
+
} | undefined;
|
|
1251
|
+
annotation?: {
|
|
1252
|
+
copy: string;
|
|
1253
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1254
|
+
nudge?: {
|
|
1255
|
+
x: number;
|
|
1256
|
+
y: number;
|
|
1257
|
+
} | undefined;
|
|
1258
|
+
target?: string | undefined;
|
|
1259
|
+
} | undefined;
|
|
1260
|
+
annotations?: {
|
|
1261
|
+
copy: string;
|
|
1262
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1263
|
+
nudge?: {
|
|
1264
|
+
x: number;
|
|
1265
|
+
y: number;
|
|
1266
|
+
} | undefined;
|
|
1267
|
+
target?: string | undefined;
|
|
1268
|
+
}[] | undefined;
|
|
1269
|
+
redactions?: ({
|
|
1270
|
+
selector: string;
|
|
1271
|
+
style?: "box" | "pixelate" | undefined;
|
|
1272
|
+
} | {
|
|
1273
|
+
region: {
|
|
1274
|
+
x: number;
|
|
1275
|
+
y: number;
|
|
1276
|
+
width: number;
|
|
1277
|
+
height: number;
|
|
1278
|
+
};
|
|
1279
|
+
style?: "box" | "pixelate" | undefined;
|
|
1280
|
+
})[] | undefined;
|
|
1281
|
+
}[];
|
|
1282
|
+
redactions?: ({
|
|
1283
|
+
selector: string;
|
|
1284
|
+
style?: "box" | "pixelate" | undefined;
|
|
1285
|
+
} | {
|
|
1286
|
+
region: {
|
|
1287
|
+
x: number;
|
|
1288
|
+
y: number;
|
|
1289
|
+
width: number;
|
|
1290
|
+
height: number;
|
|
1291
|
+
};
|
|
1292
|
+
style?: "box" | "pixelate" | undefined;
|
|
1293
|
+
})[] | undefined;
|
|
1294
|
+
extends?: string | undefined;
|
|
1295
|
+
environment?: {
|
|
1296
|
+
clock?: string | undefined;
|
|
1297
|
+
locale?: string | undefined;
|
|
1298
|
+
timezone?: string | undefined;
|
|
1299
|
+
viewport?: {
|
|
1300
|
+
width: number;
|
|
1301
|
+
height: number;
|
|
1302
|
+
} | "desktop" | "tablet" | "mobile" | undefined;
|
|
1303
|
+
color_scheme?: "light" | "dark" | undefined;
|
|
1304
|
+
reduced_motion?: boolean | undefined;
|
|
1305
|
+
} | undefined;
|
|
1306
|
+
}, {
|
|
1307
|
+
name: string;
|
|
1308
|
+
steps: {
|
|
1309
|
+
id: string;
|
|
1310
|
+
action: "fill" | "navigate" | "click" | "upload" | "press" | "hover" | "select" | "check" | "uncheck" | "wait";
|
|
1311
|
+
value?: string | undefined;
|
|
1312
|
+
target?: string | undefined;
|
|
1313
|
+
optional?: boolean | undefined;
|
|
1314
|
+
wait_for?: "network_idle" | "element_stable" | "load" | {
|
|
1315
|
+
timeout_ms: number;
|
|
1316
|
+
} | {
|
|
1317
|
+
selector: string;
|
|
1318
|
+
timeout_ms?: number | undefined;
|
|
1319
|
+
} | undefined;
|
|
1320
|
+
success?: {
|
|
1321
|
+
visible: string;
|
|
1322
|
+
} | {
|
|
1323
|
+
hidden: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
url_matches: string;
|
|
1326
|
+
} | {
|
|
1327
|
+
text_contains: {
|
|
1328
|
+
selector: string;
|
|
1329
|
+
text: string;
|
|
1330
|
+
};
|
|
1331
|
+
} | undefined;
|
|
1332
|
+
annotation?: {
|
|
1333
|
+
copy: string;
|
|
1334
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1335
|
+
nudge?: {
|
|
1336
|
+
x: number;
|
|
1337
|
+
y: number;
|
|
1338
|
+
} | undefined;
|
|
1339
|
+
target?: string | undefined;
|
|
1340
|
+
} | undefined;
|
|
1341
|
+
annotations?: {
|
|
1342
|
+
copy: string;
|
|
1343
|
+
arrow?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1344
|
+
nudge?: {
|
|
1345
|
+
x: number;
|
|
1346
|
+
y: number;
|
|
1347
|
+
} | undefined;
|
|
1348
|
+
target?: string | undefined;
|
|
1349
|
+
}[] | undefined;
|
|
1350
|
+
redactions?: ({
|
|
1351
|
+
selector: string;
|
|
1352
|
+
style?: "box" | "pixelate" | undefined;
|
|
1353
|
+
} | {
|
|
1354
|
+
region: {
|
|
1355
|
+
x: number;
|
|
1356
|
+
y: number;
|
|
1357
|
+
width: number;
|
|
1358
|
+
height: number;
|
|
1359
|
+
};
|
|
1360
|
+
style?: "box" | "pixelate" | undefined;
|
|
1361
|
+
})[] | undefined;
|
|
1362
|
+
}[];
|
|
1363
|
+
redactions?: ({
|
|
1364
|
+
selector: string;
|
|
1365
|
+
style?: "box" | "pixelate" | undefined;
|
|
1366
|
+
} | {
|
|
1367
|
+
region: {
|
|
1368
|
+
x: number;
|
|
1369
|
+
y: number;
|
|
1370
|
+
width: number;
|
|
1371
|
+
height: number;
|
|
1372
|
+
};
|
|
1373
|
+
style?: "box" | "pixelate" | undefined;
|
|
1374
|
+
})[] | undefined;
|
|
1375
|
+
extends?: string | undefined;
|
|
1376
|
+
environment?: {
|
|
1377
|
+
clock?: string | undefined;
|
|
1378
|
+
locale?: string | undefined;
|
|
1379
|
+
timezone?: string | undefined;
|
|
1380
|
+
viewport?: {
|
|
1381
|
+
width: number;
|
|
1382
|
+
height: number;
|
|
1383
|
+
} | "desktop" | "tablet" | "mobile" | undefined;
|
|
1384
|
+
color_scheme?: "light" | "dark" | undefined;
|
|
1385
|
+
reduced_motion?: boolean | undefined;
|
|
1386
|
+
} | undefined;
|
|
1387
|
+
prerequisites?: Record<string, string | boolean>[] | undefined;
|
|
1388
|
+
locators?: Record<string, string> | undefined;
|
|
1389
|
+
}>;
|
|
1390
|
+
export type FlowFile = z.infer<typeof FlowFile>;
|
|
1391
|
+
export declare const BoundingBox: z.ZodObject<{
|
|
1392
|
+
x: z.ZodNumber;
|
|
1393
|
+
y: z.ZodNumber;
|
|
1394
|
+
width: z.ZodNumber;
|
|
1395
|
+
height: z.ZodNumber;
|
|
1396
|
+
}, "strict", z.ZodTypeAny, {
|
|
1397
|
+
x: number;
|
|
1398
|
+
y: number;
|
|
1399
|
+
width: number;
|
|
1400
|
+
height: number;
|
|
1401
|
+
}, {
|
|
1402
|
+
x: number;
|
|
1403
|
+
y: number;
|
|
1404
|
+
width: number;
|
|
1405
|
+
height: number;
|
|
1406
|
+
}>;
|
|
1407
|
+
export type BoundingBox = z.infer<typeof BoundingBox>;
|
|
1408
|
+
export declare const AnnotationRecord: z.ZodObject<{
|
|
1409
|
+
step: z.ZodString;
|
|
1410
|
+
selector: z.ZodString;
|
|
1411
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
1412
|
+
x: z.ZodNumber;
|
|
1413
|
+
y: z.ZodNumber;
|
|
1414
|
+
width: z.ZodNumber;
|
|
1415
|
+
height: z.ZodNumber;
|
|
1416
|
+
}, "strict", z.ZodTypeAny, {
|
|
1417
|
+
x: number;
|
|
1418
|
+
y: number;
|
|
1419
|
+
width: number;
|
|
1420
|
+
height: number;
|
|
1421
|
+
}, {
|
|
1422
|
+
x: number;
|
|
1423
|
+
y: number;
|
|
1424
|
+
width: number;
|
|
1425
|
+
height: number;
|
|
1426
|
+
}>>;
|
|
1427
|
+
copy: z.ZodString;
|
|
1428
|
+
arrow_style: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
1429
|
+
/** Optional pixel offset applied to the callout + arrow at render time — see {@link NudgeOffset}. */
|
|
1430
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
1431
|
+
x: z.ZodNumber;
|
|
1432
|
+
y: z.ZodNumber;
|
|
1433
|
+
}, "strict", z.ZodTypeAny, {
|
|
1434
|
+
x: number;
|
|
1435
|
+
y: number;
|
|
1436
|
+
}, {
|
|
1437
|
+
x: number;
|
|
1438
|
+
y: number;
|
|
1439
|
+
}>>;
|
|
1440
|
+
/** 1-based index of this annotation *within its step's screenshot* — set only when the step has > 1 annotation, so the viewer can render a numbered badge. Absent → render as a plain (un-numbered) halo. */
|
|
1441
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
1442
|
+
}, "strict", z.ZodTypeAny, {
|
|
1443
|
+
selector: string;
|
|
1444
|
+
copy: string;
|
|
1445
|
+
step: string;
|
|
1446
|
+
nudge?: {
|
|
1447
|
+
x: number;
|
|
1448
|
+
y: number;
|
|
1449
|
+
} | undefined;
|
|
1450
|
+
bounding_box?: {
|
|
1451
|
+
x: number;
|
|
1452
|
+
y: number;
|
|
1453
|
+
width: number;
|
|
1454
|
+
height: number;
|
|
1455
|
+
} | undefined;
|
|
1456
|
+
arrow_style?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1457
|
+
index?: number | undefined;
|
|
1458
|
+
}, {
|
|
1459
|
+
selector: string;
|
|
1460
|
+
copy: string;
|
|
1461
|
+
step: string;
|
|
1462
|
+
nudge?: {
|
|
1463
|
+
x: number;
|
|
1464
|
+
y: number;
|
|
1465
|
+
} | undefined;
|
|
1466
|
+
bounding_box?: {
|
|
1467
|
+
x: number;
|
|
1468
|
+
y: number;
|
|
1469
|
+
width: number;
|
|
1470
|
+
height: number;
|
|
1471
|
+
} | undefined;
|
|
1472
|
+
arrow_style?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1473
|
+
index?: number | undefined;
|
|
1474
|
+
}>;
|
|
1475
|
+
export type AnnotationRecord = z.infer<typeof AnnotationRecord>;
|
|
1476
|
+
export declare const AnnotationsFile: z.ZodObject<{
|
|
1477
|
+
schema: z.ZodLiteral<"docsxai/annotations@1">;
|
|
1478
|
+
flow: z.ZodString;
|
|
1479
|
+
annotations: z.ZodArray<z.ZodObject<{
|
|
1480
|
+
step: z.ZodString;
|
|
1481
|
+
selector: z.ZodString;
|
|
1482
|
+
bounding_box: z.ZodOptional<z.ZodObject<{
|
|
1483
|
+
x: z.ZodNumber;
|
|
1484
|
+
y: z.ZodNumber;
|
|
1485
|
+
width: z.ZodNumber;
|
|
1486
|
+
height: z.ZodNumber;
|
|
1487
|
+
}, "strict", z.ZodTypeAny, {
|
|
1488
|
+
x: number;
|
|
1489
|
+
y: number;
|
|
1490
|
+
width: number;
|
|
1491
|
+
height: number;
|
|
1492
|
+
}, {
|
|
1493
|
+
x: number;
|
|
1494
|
+
y: number;
|
|
1495
|
+
width: number;
|
|
1496
|
+
height: number;
|
|
1497
|
+
}>>;
|
|
1498
|
+
copy: z.ZodString;
|
|
1499
|
+
arrow_style: z.ZodOptional<z.ZodEnum<["top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"]>>;
|
|
1500
|
+
/** Optional pixel offset applied to the callout + arrow at render time — see {@link NudgeOffset}. */
|
|
1501
|
+
nudge: z.ZodOptional<z.ZodObject<{
|
|
1502
|
+
x: z.ZodNumber;
|
|
1503
|
+
y: z.ZodNumber;
|
|
1504
|
+
}, "strict", z.ZodTypeAny, {
|
|
1505
|
+
x: number;
|
|
1506
|
+
y: number;
|
|
1507
|
+
}, {
|
|
1508
|
+
x: number;
|
|
1509
|
+
y: number;
|
|
1510
|
+
}>>;
|
|
1511
|
+
/** 1-based index of this annotation *within its step's screenshot* — set only when the step has > 1 annotation, so the viewer can render a numbered badge. Absent → render as a plain (un-numbered) halo. */
|
|
1512
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
1513
|
+
}, "strict", z.ZodTypeAny, {
|
|
1514
|
+
selector: string;
|
|
1515
|
+
copy: string;
|
|
1516
|
+
step: string;
|
|
1517
|
+
nudge?: {
|
|
1518
|
+
x: number;
|
|
1519
|
+
y: number;
|
|
1520
|
+
} | undefined;
|
|
1521
|
+
bounding_box?: {
|
|
1522
|
+
x: number;
|
|
1523
|
+
y: number;
|
|
1524
|
+
width: number;
|
|
1525
|
+
height: number;
|
|
1526
|
+
} | undefined;
|
|
1527
|
+
arrow_style?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1528
|
+
index?: number | undefined;
|
|
1529
|
+
}, {
|
|
1530
|
+
selector: string;
|
|
1531
|
+
copy: string;
|
|
1532
|
+
step: string;
|
|
1533
|
+
nudge?: {
|
|
1534
|
+
x: number;
|
|
1535
|
+
y: number;
|
|
1536
|
+
} | undefined;
|
|
1537
|
+
bounding_box?: {
|
|
1538
|
+
x: number;
|
|
1539
|
+
y: number;
|
|
1540
|
+
width: number;
|
|
1541
|
+
height: number;
|
|
1542
|
+
} | undefined;
|
|
1543
|
+
arrow_style?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1544
|
+
index?: number | undefined;
|
|
1545
|
+
}>, "many">;
|
|
1546
|
+
}, "strict", z.ZodTypeAny, {
|
|
1547
|
+
annotations: {
|
|
1548
|
+
selector: string;
|
|
1549
|
+
copy: string;
|
|
1550
|
+
step: string;
|
|
1551
|
+
nudge?: {
|
|
1552
|
+
x: number;
|
|
1553
|
+
y: number;
|
|
1554
|
+
} | undefined;
|
|
1555
|
+
bounding_box?: {
|
|
1556
|
+
x: number;
|
|
1557
|
+
y: number;
|
|
1558
|
+
width: number;
|
|
1559
|
+
height: number;
|
|
1560
|
+
} | undefined;
|
|
1561
|
+
arrow_style?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1562
|
+
index?: number | undefined;
|
|
1563
|
+
}[];
|
|
1564
|
+
schema: "docsxai/annotations@1";
|
|
1565
|
+
flow: string;
|
|
1566
|
+
}, {
|
|
1567
|
+
annotations: {
|
|
1568
|
+
selector: string;
|
|
1569
|
+
copy: string;
|
|
1570
|
+
step: string;
|
|
1571
|
+
nudge?: {
|
|
1572
|
+
x: number;
|
|
1573
|
+
y: number;
|
|
1574
|
+
} | undefined;
|
|
1575
|
+
bounding_box?: {
|
|
1576
|
+
x: number;
|
|
1577
|
+
y: number;
|
|
1578
|
+
width: number;
|
|
1579
|
+
height: number;
|
|
1580
|
+
} | undefined;
|
|
1581
|
+
arrow_style?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | undefined;
|
|
1582
|
+
index?: number | undefined;
|
|
1583
|
+
}[];
|
|
1584
|
+
schema: "docsxai/annotations@1";
|
|
1585
|
+
flow: string;
|
|
1586
|
+
}>;
|
|
1587
|
+
export type AnnotationsFile = z.infer<typeof AnnotationsFile>;
|
|
1588
|
+
export declare const StyleArtifact: z.ZodObject<{
|
|
1589
|
+
schema: z.ZodLiteral<"docsxai/style@1">;
|
|
1590
|
+
voice: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1591
|
+
structure: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1592
|
+
terminology: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1593
|
+
visual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1594
|
+
localisation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1595
|
+
/** Categories of testing-jargon the commit stage must strip from user-facing prose. */
|
|
1596
|
+
pruning_rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1597
|
+
}, "strict", z.ZodTypeAny, {
|
|
1598
|
+
schema: "docsxai/style@1";
|
|
1599
|
+
voice?: Record<string, unknown> | undefined;
|
|
1600
|
+
structure?: Record<string, unknown> | undefined;
|
|
1601
|
+
terminology?: Record<string, string> | undefined;
|
|
1602
|
+
visual?: Record<string, unknown> | undefined;
|
|
1603
|
+
localisation?: Record<string, unknown> | undefined;
|
|
1604
|
+
pruning_rules?: string[] | undefined;
|
|
1605
|
+
}, {
|
|
1606
|
+
schema: "docsxai/style@1";
|
|
1607
|
+
voice?: Record<string, unknown> | undefined;
|
|
1608
|
+
structure?: Record<string, unknown> | undefined;
|
|
1609
|
+
terminology?: Record<string, string> | undefined;
|
|
1610
|
+
visual?: Record<string, unknown> | undefined;
|
|
1611
|
+
localisation?: Record<string, unknown> | undefined;
|
|
1612
|
+
pruning_rules?: string[] | undefined;
|
|
1613
|
+
}>;
|
|
1614
|
+
export type StyleArtifact = z.infer<typeof StyleArtifact>;
|
|
1615
|
+
export declare const LocatorManifest: z.ZodObject<{
|
|
1616
|
+
schema: z.ZodLiteral<"docsxai/locators@1">;
|
|
1617
|
+
/** flow name → locator name → canonical selector. One per name; no fallbacks. */
|
|
1618
|
+
flows: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1619
|
+
}, "strict", z.ZodTypeAny, {
|
|
1620
|
+
schema: "docsxai/locators@1";
|
|
1621
|
+
flows: Record<string, Record<string, string>>;
|
|
1622
|
+
}, {
|
|
1623
|
+
schema: "docsxai/locators@1";
|
|
1624
|
+
flows: Record<string, Record<string, string>>;
|
|
1625
|
+
}>;
|
|
1626
|
+
export type LocatorManifest = z.infer<typeof LocatorManifest>;
|
|
1627
|
+
export declare const StrategyName: z.ZodEnum<["api-login", "jwt-injection", "ui-form", "http-basic", "mtls", "pat-header", "email-otp", "totp", "webauthn", "manual-capture", "test-backdoor"]>;
|
|
1628
|
+
export type StrategyName = z.infer<typeof StrategyName>;
|
|
1629
|
+
/** `session` = use the captured session's own lifetime; otherwise a duration string (`30m`, `1h`) or ms number. */
|
|
1630
|
+
export declare const CacheTtl: z.ZodUnion<[z.ZodLiteral<"session">, z.ZodString, z.ZodNumber]>;
|
|
1631
|
+
export type CacheTtl = z.infer<typeof CacheTtl>;
|
|
1632
|
+
export declare const RoleAuth: z.ZodObject<{
|
|
1633
|
+
strategy: z.ZodEnum<["api-login", "jwt-injection", "ui-form", "http-basic", "mtls", "pat-header", "email-otp", "totp", "webauthn", "manual-capture", "test-backdoor"]>;
|
|
1634
|
+
/** Env-var *names* holding credentials — never the values. May be `{}` (e.g. `manual-capture` needs none). */
|
|
1635
|
+
creds_env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1636
|
+
options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1637
|
+
cache: z.ZodDefault<z.ZodObject<{
|
|
1638
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1639
|
+
store: z.ZodDefault<z.ZodEnum<["local", "backend"]>>;
|
|
1640
|
+
/** Fallback expiry when no `auth_cookie` is set/found: a duration, or `session` (→ a 1h default). */
|
|
1641
|
+
ttl: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"session">, z.ZodString, z.ZodNumber]>>;
|
|
1642
|
+
/**
|
|
1643
|
+
* Name of the app's actual auth/session cookie. When set, the cached session's `expiresAt` is *that*
|
|
1644
|
+
* cookie's expiry — the real bound — rather than the `ttl` guess. Identify it from the captured jar
|
|
1645
|
+
* (`capture-auth` prints it): it's on the app's domain, long-lived (not an ephemeral IdP scratch
|
|
1646
|
+
* cookie), e.g. `AppSession.Production` / `.AspNetCore.Cookies` / `session`. Optional.
|
|
1647
|
+
*/
|
|
1648
|
+
auth_cookie: z.ZodOptional<z.ZodString>;
|
|
1649
|
+
}, "strict", z.ZodTypeAny, {
|
|
1650
|
+
enabled: boolean;
|
|
1651
|
+
store: "local" | "backend";
|
|
1652
|
+
ttl: string | number;
|
|
1653
|
+
auth_cookie?: string | undefined;
|
|
1654
|
+
}, {
|
|
1655
|
+
enabled?: boolean | undefined;
|
|
1656
|
+
store?: "local" | "backend" | undefined;
|
|
1657
|
+
ttl?: string | number | undefined;
|
|
1658
|
+
auth_cookie?: string | undefined;
|
|
1659
|
+
}>>;
|
|
1660
|
+
}, "strict", z.ZodTypeAny, {
|
|
1661
|
+
options: Record<string, unknown>;
|
|
1662
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1663
|
+
creds_env: Record<string, string>;
|
|
1664
|
+
cache: {
|
|
1665
|
+
enabled: boolean;
|
|
1666
|
+
store: "local" | "backend";
|
|
1667
|
+
ttl: string | number;
|
|
1668
|
+
auth_cookie?: string | undefined;
|
|
1669
|
+
};
|
|
1670
|
+
}, {
|
|
1671
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1672
|
+
options?: Record<string, unknown> | undefined;
|
|
1673
|
+
creds_env?: Record<string, string> | undefined;
|
|
1674
|
+
cache?: {
|
|
1675
|
+
enabled?: boolean | undefined;
|
|
1676
|
+
store?: "local" | "backend" | undefined;
|
|
1677
|
+
ttl?: string | number | undefined;
|
|
1678
|
+
auth_cookie?: string | undefined;
|
|
1679
|
+
} | undefined;
|
|
1680
|
+
}>;
|
|
1681
|
+
export type RoleAuth = z.infer<typeof RoleAuth>;
|
|
1682
|
+
export declare const AuthStrategyDescriptor: z.ZodEffects<z.ZodObject<{
|
|
1683
|
+
schema: z.ZodLiteral<"docsxai/auth-strategy@1">;
|
|
1684
|
+
default_role: z.ZodString;
|
|
1685
|
+
roles: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1686
|
+
strategy: z.ZodEnum<["api-login", "jwt-injection", "ui-form", "http-basic", "mtls", "pat-header", "email-otp", "totp", "webauthn", "manual-capture", "test-backdoor"]>;
|
|
1687
|
+
/** Env-var *names* holding credentials — never the values. May be `{}` (e.g. `manual-capture` needs none). */
|
|
1688
|
+
creds_env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1689
|
+
options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1690
|
+
cache: z.ZodDefault<z.ZodObject<{
|
|
1691
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1692
|
+
store: z.ZodDefault<z.ZodEnum<["local", "backend"]>>;
|
|
1693
|
+
/** Fallback expiry when no `auth_cookie` is set/found: a duration, or `session` (→ a 1h default). */
|
|
1694
|
+
ttl: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"session">, z.ZodString, z.ZodNumber]>>;
|
|
1695
|
+
/**
|
|
1696
|
+
* Name of the app's actual auth/session cookie. When set, the cached session's `expiresAt` is *that*
|
|
1697
|
+
* cookie's expiry — the real bound — rather than the `ttl` guess. Identify it from the captured jar
|
|
1698
|
+
* (`capture-auth` prints it): it's on the app's domain, long-lived (not an ephemeral IdP scratch
|
|
1699
|
+
* cookie), e.g. `AppSession.Production` / `.AspNetCore.Cookies` / `session`. Optional.
|
|
1700
|
+
*/
|
|
1701
|
+
auth_cookie: z.ZodOptional<z.ZodString>;
|
|
1702
|
+
}, "strict", z.ZodTypeAny, {
|
|
1703
|
+
enabled: boolean;
|
|
1704
|
+
store: "local" | "backend";
|
|
1705
|
+
ttl: string | number;
|
|
1706
|
+
auth_cookie?: string | undefined;
|
|
1707
|
+
}, {
|
|
1708
|
+
enabled?: boolean | undefined;
|
|
1709
|
+
store?: "local" | "backend" | undefined;
|
|
1710
|
+
ttl?: string | number | undefined;
|
|
1711
|
+
auth_cookie?: string | undefined;
|
|
1712
|
+
}>>;
|
|
1713
|
+
}, "strict", z.ZodTypeAny, {
|
|
1714
|
+
options: Record<string, unknown>;
|
|
1715
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1716
|
+
creds_env: Record<string, string>;
|
|
1717
|
+
cache: {
|
|
1718
|
+
enabled: boolean;
|
|
1719
|
+
store: "local" | "backend";
|
|
1720
|
+
ttl: string | number;
|
|
1721
|
+
auth_cookie?: string | undefined;
|
|
1722
|
+
};
|
|
1723
|
+
}, {
|
|
1724
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1725
|
+
options?: Record<string, unknown> | undefined;
|
|
1726
|
+
creds_env?: Record<string, string> | undefined;
|
|
1727
|
+
cache?: {
|
|
1728
|
+
enabled?: boolean | undefined;
|
|
1729
|
+
store?: "local" | "backend" | undefined;
|
|
1730
|
+
ttl?: string | number | undefined;
|
|
1731
|
+
auth_cookie?: string | undefined;
|
|
1732
|
+
} | undefined;
|
|
1733
|
+
}>>;
|
|
1734
|
+
}, "strict", z.ZodTypeAny, {
|
|
1735
|
+
schema: "docsxai/auth-strategy@1";
|
|
1736
|
+
default_role: string;
|
|
1737
|
+
roles: Record<string, {
|
|
1738
|
+
options: Record<string, unknown>;
|
|
1739
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1740
|
+
creds_env: Record<string, string>;
|
|
1741
|
+
cache: {
|
|
1742
|
+
enabled: boolean;
|
|
1743
|
+
store: "local" | "backend";
|
|
1744
|
+
ttl: string | number;
|
|
1745
|
+
auth_cookie?: string | undefined;
|
|
1746
|
+
};
|
|
1747
|
+
}>;
|
|
1748
|
+
}, {
|
|
1749
|
+
schema: "docsxai/auth-strategy@1";
|
|
1750
|
+
default_role: string;
|
|
1751
|
+
roles: Record<string, {
|
|
1752
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1753
|
+
options?: Record<string, unknown> | undefined;
|
|
1754
|
+
creds_env?: Record<string, string> | undefined;
|
|
1755
|
+
cache?: {
|
|
1756
|
+
enabled?: boolean | undefined;
|
|
1757
|
+
store?: "local" | "backend" | undefined;
|
|
1758
|
+
ttl?: string | number | undefined;
|
|
1759
|
+
auth_cookie?: string | undefined;
|
|
1760
|
+
} | undefined;
|
|
1761
|
+
}>;
|
|
1762
|
+
}>, {
|
|
1763
|
+
schema: "docsxai/auth-strategy@1";
|
|
1764
|
+
default_role: string;
|
|
1765
|
+
roles: Record<string, {
|
|
1766
|
+
options: Record<string, unknown>;
|
|
1767
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1768
|
+
creds_env: Record<string, string>;
|
|
1769
|
+
cache: {
|
|
1770
|
+
enabled: boolean;
|
|
1771
|
+
store: "local" | "backend";
|
|
1772
|
+
ttl: string | number;
|
|
1773
|
+
auth_cookie?: string | undefined;
|
|
1774
|
+
};
|
|
1775
|
+
}>;
|
|
1776
|
+
}, {
|
|
1777
|
+
schema: "docsxai/auth-strategy@1";
|
|
1778
|
+
default_role: string;
|
|
1779
|
+
roles: Record<string, {
|
|
1780
|
+
strategy: "api-login" | "jwt-injection" | "ui-form" | "http-basic" | "mtls" | "pat-header" | "email-otp" | "totp" | "webauthn" | "manual-capture" | "test-backdoor";
|
|
1781
|
+
options?: Record<string, unknown> | undefined;
|
|
1782
|
+
creds_env?: Record<string, string> | undefined;
|
|
1783
|
+
cache?: {
|
|
1784
|
+
enabled?: boolean | undefined;
|
|
1785
|
+
store?: "local" | "backend" | undefined;
|
|
1786
|
+
ttl?: string | number | undefined;
|
|
1787
|
+
auth_cookie?: string | undefined;
|
|
1788
|
+
} | undefined;
|
|
1789
|
+
}>;
|
|
1790
|
+
}>;
|
|
1791
|
+
export type AuthStrategyDescriptor = z.infer<typeof AuthStrategyDescriptor>;
|
|
1792
|
+
export declare const RevisionKind: z.ZodEnum<["calibrate", "run", "edit"]>;
|
|
1793
|
+
export type RevisionKind = z.infer<typeof RevisionKind>;
|
|
1794
|
+
export declare const RevisionMeta: z.ZodObject<{
|
|
1795
|
+
rev_id: z.ZodString;
|
|
1796
|
+
parent_rev_id: z.ZodNullable<z.ZodString>;
|
|
1797
|
+
kind: z.ZodEnum<["calibrate", "run", "edit"]>;
|
|
1798
|
+
author: z.ZodString;
|
|
1799
|
+
/** ISO-8601 timestamp. */
|
|
1800
|
+
timestamp: z.ZodString;
|
|
1801
|
+
}, "strict", z.ZodTypeAny, {
|
|
1802
|
+
rev_id: string;
|
|
1803
|
+
parent_rev_id: string | null;
|
|
1804
|
+
kind: "calibrate" | "run" | "edit";
|
|
1805
|
+
author: string;
|
|
1806
|
+
timestamp: string;
|
|
1807
|
+
}, {
|
|
1808
|
+
rev_id: string;
|
|
1809
|
+
parent_rev_id: string | null;
|
|
1810
|
+
kind: "calibrate" | "run" | "edit";
|
|
1811
|
+
author: string;
|
|
1812
|
+
timestamp: string;
|
|
1813
|
+
}>;
|
|
1814
|
+
export type RevisionMeta = z.infer<typeof RevisionMeta>;
|