@browserflow-ai/core 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/config-schema.d.ts +354 -0
  2. package/dist/config-schema.d.ts.map +1 -0
  3. package/dist/config-schema.js +83 -0
  4. package/dist/config-schema.js.map +1 -0
  5. package/dist/config.d.ts +107 -0
  6. package/dist/config.d.ts.map +1 -0
  7. package/dist/config.js +5 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/duration.d.ts +39 -0
  10. package/dist/duration.d.ts.map +1 -0
  11. package/dist/duration.js +111 -0
  12. package/dist/duration.js.map +1 -0
  13. package/dist/index.d.ts +12 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +20 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/locator-object.d.ts +556 -0
  18. package/dist/locator-object.d.ts.map +1 -0
  19. package/dist/locator-object.js +114 -0
  20. package/dist/locator-object.js.map +1 -0
  21. package/dist/lockfile.d.ts +1501 -0
  22. package/dist/lockfile.d.ts.map +1 -0
  23. package/dist/lockfile.js +86 -0
  24. package/dist/lockfile.js.map +1 -0
  25. package/dist/run-store.d.ts +81 -0
  26. package/dist/run-store.d.ts.map +1 -0
  27. package/dist/run-store.js +181 -0
  28. package/dist/run-store.js.map +1 -0
  29. package/dist/spec-loader.d.ts +17 -0
  30. package/dist/spec-loader.d.ts.map +1 -0
  31. package/dist/spec-loader.js +37 -0
  32. package/dist/spec-loader.js.map +1 -0
  33. package/dist/spec-schema.d.ts +1411 -0
  34. package/dist/spec-schema.d.ts.map +1 -0
  35. package/dist/spec-schema.js +239 -0
  36. package/dist/spec-schema.js.map +1 -0
  37. package/package.json +45 -0
  38. package/schemas/browserflow.schema.json +220 -0
  39. package/schemas/lockfile.schema.json +568 -0
  40. package/schemas/spec-v2.schema.json +413 -0
  41. package/src/config-schema.test.ts +190 -0
  42. package/src/config-schema.ts +111 -0
  43. package/src/config.ts +112 -0
  44. package/src/duration.test.ts +175 -0
  45. package/src/duration.ts +128 -0
  46. package/src/index.ts +136 -0
  47. package/src/json-schemas.test.ts +374 -0
  48. package/src/locator-object.test.ts +323 -0
  49. package/src/locator-object.ts +250 -0
  50. package/src/lockfile.test.ts +345 -0
  51. package/src/lockfile.ts +209 -0
  52. package/src/run-store.test.ts +232 -0
  53. package/src/run-store.ts +240 -0
  54. package/src/spec-loader.test.ts +181 -0
  55. package/src/spec-loader.ts +47 -0
  56. package/src/spec-schema.test.ts +360 -0
  57. package/src/spec-schema.ts +347 -0
@@ -0,0 +1,1501 @@
1
+ /**
2
+ * Lockfile types for exploration results
3
+ *
4
+ * @see bf-aak for implementation task
5
+ */
6
+ import { z } from 'zod';
7
+ import { type LocatorObject, type LegacyLocatorObject } from './locator-object.js';
8
+ import type { LegacySpecStep } from './spec-schema.js';
9
+ export type AssertionType = 'visible' | 'hidden' | 'text_contains' | 'text_equals' | 'url_contains' | 'url_matches' | 'count' | 'attribute' | 'checked' | 'screenshot';
10
+ export declare const assertionTypeSchema: z.ZodEnum<["visible", "hidden", "text_contains", "text_equals", "url_contains", "url_matches", "count", "attribute", "checked", "screenshot"]>;
11
+ export interface Mask {
12
+ x: number;
13
+ y: number;
14
+ width: number;
15
+ height: number;
16
+ reason: string;
17
+ locator?: string;
18
+ }
19
+ export declare const maskSchema: z.ZodObject<{
20
+ x: z.ZodNumber;
21
+ y: z.ZodNumber;
22
+ width: z.ZodNumber;
23
+ height: z.ZodNumber;
24
+ reason: z.ZodString;
25
+ locator: z.ZodOptional<z.ZodString>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ x: number;
28
+ y: number;
29
+ width: number;
30
+ height: number;
31
+ reason: string;
32
+ locator?: string | undefined;
33
+ }, {
34
+ x: number;
35
+ y: number;
36
+ width: number;
37
+ height: number;
38
+ reason: string;
39
+ locator?: string | undefined;
40
+ }>;
41
+ export interface Assertion {
42
+ id: string;
43
+ type: AssertionType;
44
+ target?: LocatorObject;
45
+ expected?: string | number | boolean;
46
+ step_id?: string;
47
+ }
48
+ export declare const assertionSchema: z.ZodObject<{
49
+ id: z.ZodString;
50
+ type: z.ZodEnum<["visible", "hidden", "text_contains", "text_equals", "url_contains", "url_matches", "count", "attribute", "checked", "screenshot"]>;
51
+ target: z.ZodOptional<z.ZodObject<{
52
+ locator_id: z.ZodString;
53
+ preferred: z.ZodObject<{
54
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
55
+ value: z.ZodOptional<z.ZodString>;
56
+ attribute: z.ZodOptional<z.ZodString>;
57
+ role: z.ZodOptional<z.ZodString>;
58
+ name: z.ZodOptional<z.ZodString>;
59
+ exact: z.ZodOptional<z.ZodBoolean>;
60
+ text: z.ZodOptional<z.ZodString>;
61
+ selector: z.ZodOptional<z.ZodString>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
64
+ value?: string | undefined;
65
+ exact?: boolean | undefined;
66
+ role?: string | undefined;
67
+ name?: string | undefined;
68
+ text?: string | undefined;
69
+ selector?: string | undefined;
70
+ attribute?: string | undefined;
71
+ }, {
72
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
73
+ value?: string | undefined;
74
+ exact?: boolean | undefined;
75
+ role?: string | undefined;
76
+ name?: string | undefined;
77
+ text?: string | undefined;
78
+ selector?: string | undefined;
79
+ attribute?: string | undefined;
80
+ }>;
81
+ fallbacks: z.ZodArray<z.ZodObject<{
82
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
83
+ value: z.ZodOptional<z.ZodString>;
84
+ attribute: z.ZodOptional<z.ZodString>;
85
+ role: z.ZodOptional<z.ZodString>;
86
+ name: z.ZodOptional<z.ZodString>;
87
+ exact: z.ZodOptional<z.ZodBoolean>;
88
+ text: z.ZodOptional<z.ZodString>;
89
+ selector: z.ZodOptional<z.ZodString>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
92
+ value?: string | undefined;
93
+ exact?: boolean | undefined;
94
+ role?: string | undefined;
95
+ name?: string | undefined;
96
+ text?: string | undefined;
97
+ selector?: string | undefined;
98
+ attribute?: string | undefined;
99
+ }, {
100
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
101
+ value?: string | undefined;
102
+ exact?: boolean | undefined;
103
+ role?: string | undefined;
104
+ name?: string | undefined;
105
+ text?: string | undefined;
106
+ selector?: string | undefined;
107
+ attribute?: string | undefined;
108
+ }>, "many">;
109
+ scoping: z.ZodOptional<z.ZodObject<{
110
+ within: z.ZodOptional<z.ZodArray<z.ZodObject<{
111
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
112
+ value: z.ZodOptional<z.ZodString>;
113
+ attribute: z.ZodOptional<z.ZodString>;
114
+ role: z.ZodOptional<z.ZodString>;
115
+ name: z.ZodOptional<z.ZodString>;
116
+ exact: z.ZodOptional<z.ZodBoolean>;
117
+ text: z.ZodOptional<z.ZodString>;
118
+ selector: z.ZodOptional<z.ZodString>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
121
+ value?: string | undefined;
122
+ exact?: boolean | undefined;
123
+ role?: string | undefined;
124
+ name?: string | undefined;
125
+ text?: string | undefined;
126
+ selector?: string | undefined;
127
+ attribute?: string | undefined;
128
+ }, {
129
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
130
+ value?: string | undefined;
131
+ exact?: boolean | undefined;
132
+ role?: string | undefined;
133
+ name?: string | undefined;
134
+ text?: string | undefined;
135
+ selector?: string | undefined;
136
+ attribute?: string | undefined;
137
+ }>, "many">>;
138
+ nth: z.ZodOptional<z.ZodNumber>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ within?: {
141
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
142
+ value?: string | undefined;
143
+ exact?: boolean | undefined;
144
+ role?: string | undefined;
145
+ name?: string | undefined;
146
+ text?: string | undefined;
147
+ selector?: string | undefined;
148
+ attribute?: string | undefined;
149
+ }[] | undefined;
150
+ nth?: number | undefined;
151
+ }, {
152
+ within?: {
153
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
154
+ value?: string | undefined;
155
+ exact?: boolean | undefined;
156
+ role?: string | undefined;
157
+ name?: string | undefined;
158
+ text?: string | undefined;
159
+ selector?: string | undefined;
160
+ attribute?: string | undefined;
161
+ }[] | undefined;
162
+ nth?: number | undefined;
163
+ }>>;
164
+ proof: z.ZodObject<{
165
+ a11y_role: z.ZodOptional<z.ZodString>;
166
+ a11y_name: z.ZodOptional<z.ZodString>;
167
+ dom_fingerprint: z.ZodOptional<z.ZodObject<{
168
+ tag: z.ZodString;
169
+ classes: z.ZodArray<z.ZodString, "many">;
170
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
171
+ }, "strip", z.ZodTypeAny, {
172
+ tag: string;
173
+ classes: string[];
174
+ attributes?: Record<string, string> | undefined;
175
+ }, {
176
+ tag: string;
177
+ classes: string[];
178
+ attributes?: Record<string, string> | undefined;
179
+ }>>;
180
+ bounding_box: z.ZodOptional<z.ZodObject<{
181
+ x: z.ZodNumber;
182
+ y: z.ZodNumber;
183
+ width: z.ZodNumber;
184
+ height: z.ZodNumber;
185
+ }, "strip", z.ZodTypeAny, {
186
+ x: number;
187
+ y: number;
188
+ width: number;
189
+ height: number;
190
+ }, {
191
+ x: number;
192
+ y: number;
193
+ width: number;
194
+ height: number;
195
+ }>>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ a11y_role?: string | undefined;
198
+ a11y_name?: string | undefined;
199
+ dom_fingerprint?: {
200
+ tag: string;
201
+ classes: string[];
202
+ attributes?: Record<string, string> | undefined;
203
+ } | undefined;
204
+ bounding_box?: {
205
+ x: number;
206
+ y: number;
207
+ width: number;
208
+ height: number;
209
+ } | undefined;
210
+ }, {
211
+ a11y_role?: string | undefined;
212
+ a11y_name?: string | undefined;
213
+ dom_fingerprint?: {
214
+ tag: string;
215
+ classes: string[];
216
+ attributes?: Record<string, string> | undefined;
217
+ } | undefined;
218
+ bounding_box?: {
219
+ x: number;
220
+ y: number;
221
+ width: number;
222
+ height: number;
223
+ } | undefined;
224
+ }>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ locator_id: string;
227
+ preferred: {
228
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
229
+ value?: string | undefined;
230
+ exact?: boolean | undefined;
231
+ role?: string | undefined;
232
+ name?: string | undefined;
233
+ text?: string | undefined;
234
+ selector?: string | undefined;
235
+ attribute?: string | undefined;
236
+ };
237
+ fallbacks: {
238
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
239
+ value?: string | undefined;
240
+ exact?: boolean | undefined;
241
+ role?: string | undefined;
242
+ name?: string | undefined;
243
+ text?: string | undefined;
244
+ selector?: string | undefined;
245
+ attribute?: string | undefined;
246
+ }[];
247
+ proof: {
248
+ a11y_role?: string | undefined;
249
+ a11y_name?: string | undefined;
250
+ dom_fingerprint?: {
251
+ tag: string;
252
+ classes: string[];
253
+ attributes?: Record<string, string> | undefined;
254
+ } | undefined;
255
+ bounding_box?: {
256
+ x: number;
257
+ y: number;
258
+ width: number;
259
+ height: number;
260
+ } | undefined;
261
+ };
262
+ scoping?: {
263
+ within?: {
264
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
265
+ value?: string | undefined;
266
+ exact?: boolean | undefined;
267
+ role?: string | undefined;
268
+ name?: string | undefined;
269
+ text?: string | undefined;
270
+ selector?: string | undefined;
271
+ attribute?: string | undefined;
272
+ }[] | undefined;
273
+ nth?: number | undefined;
274
+ } | undefined;
275
+ }, {
276
+ locator_id: string;
277
+ preferred: {
278
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
279
+ value?: string | undefined;
280
+ exact?: boolean | undefined;
281
+ role?: string | undefined;
282
+ name?: string | undefined;
283
+ text?: string | undefined;
284
+ selector?: string | undefined;
285
+ attribute?: string | undefined;
286
+ };
287
+ fallbacks: {
288
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
289
+ value?: string | undefined;
290
+ exact?: boolean | undefined;
291
+ role?: string | undefined;
292
+ name?: string | undefined;
293
+ text?: string | undefined;
294
+ selector?: string | undefined;
295
+ attribute?: string | undefined;
296
+ }[];
297
+ proof: {
298
+ a11y_role?: string | undefined;
299
+ a11y_name?: string | undefined;
300
+ dom_fingerprint?: {
301
+ tag: string;
302
+ classes: string[];
303
+ attributes?: Record<string, string> | undefined;
304
+ } | undefined;
305
+ bounding_box?: {
306
+ x: number;
307
+ y: number;
308
+ width: number;
309
+ height: number;
310
+ } | undefined;
311
+ };
312
+ scoping?: {
313
+ within?: {
314
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
315
+ value?: string | undefined;
316
+ exact?: boolean | undefined;
317
+ role?: string | undefined;
318
+ name?: string | undefined;
319
+ text?: string | undefined;
320
+ selector?: string | undefined;
321
+ attribute?: string | undefined;
322
+ }[] | undefined;
323
+ nth?: number | undefined;
324
+ } | undefined;
325
+ }>>;
326
+ expected: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
327
+ step_id: z.ZodOptional<z.ZodString>;
328
+ }, "strip", z.ZodTypeAny, {
329
+ type: "screenshot" | "visible" | "hidden" | "checked" | "text_contains" | "url_contains" | "attribute" | "text_equals" | "url_matches" | "count";
330
+ id: string;
331
+ expected?: string | number | boolean | undefined;
332
+ target?: {
333
+ locator_id: string;
334
+ preferred: {
335
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
336
+ value?: string | undefined;
337
+ exact?: boolean | undefined;
338
+ role?: string | undefined;
339
+ name?: string | undefined;
340
+ text?: string | undefined;
341
+ selector?: string | undefined;
342
+ attribute?: string | undefined;
343
+ };
344
+ fallbacks: {
345
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
346
+ value?: string | undefined;
347
+ exact?: boolean | undefined;
348
+ role?: string | undefined;
349
+ name?: string | undefined;
350
+ text?: string | undefined;
351
+ selector?: string | undefined;
352
+ attribute?: string | undefined;
353
+ }[];
354
+ proof: {
355
+ a11y_role?: string | undefined;
356
+ a11y_name?: string | undefined;
357
+ dom_fingerprint?: {
358
+ tag: string;
359
+ classes: string[];
360
+ attributes?: Record<string, string> | undefined;
361
+ } | undefined;
362
+ bounding_box?: {
363
+ x: number;
364
+ y: number;
365
+ width: number;
366
+ height: number;
367
+ } | undefined;
368
+ };
369
+ scoping?: {
370
+ within?: {
371
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
372
+ value?: string | undefined;
373
+ exact?: boolean | undefined;
374
+ role?: string | undefined;
375
+ name?: string | undefined;
376
+ text?: string | undefined;
377
+ selector?: string | undefined;
378
+ attribute?: string | undefined;
379
+ }[] | undefined;
380
+ nth?: number | undefined;
381
+ } | undefined;
382
+ } | undefined;
383
+ step_id?: string | undefined;
384
+ }, {
385
+ type: "screenshot" | "visible" | "hidden" | "checked" | "text_contains" | "url_contains" | "attribute" | "text_equals" | "url_matches" | "count";
386
+ id: string;
387
+ expected?: string | number | boolean | undefined;
388
+ target?: {
389
+ locator_id: string;
390
+ preferred: {
391
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
392
+ value?: string | undefined;
393
+ exact?: boolean | undefined;
394
+ role?: string | undefined;
395
+ name?: string | undefined;
396
+ text?: string | undefined;
397
+ selector?: string | undefined;
398
+ attribute?: string | undefined;
399
+ };
400
+ fallbacks: {
401
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
402
+ value?: string | undefined;
403
+ exact?: boolean | undefined;
404
+ role?: string | undefined;
405
+ name?: string | undefined;
406
+ text?: string | undefined;
407
+ selector?: string | undefined;
408
+ attribute?: string | undefined;
409
+ }[];
410
+ proof: {
411
+ a11y_role?: string | undefined;
412
+ a11y_name?: string | undefined;
413
+ dom_fingerprint?: {
414
+ tag: string;
415
+ classes: string[];
416
+ attributes?: Record<string, string> | undefined;
417
+ } | undefined;
418
+ bounding_box?: {
419
+ x: number;
420
+ y: number;
421
+ width: number;
422
+ height: number;
423
+ } | undefined;
424
+ };
425
+ scoping?: {
426
+ within?: {
427
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
428
+ value?: string | undefined;
429
+ exact?: boolean | undefined;
430
+ role?: string | undefined;
431
+ name?: string | undefined;
432
+ text?: string | undefined;
433
+ selector?: string | undefined;
434
+ attribute?: string | undefined;
435
+ }[] | undefined;
436
+ nth?: number | undefined;
437
+ } | undefined;
438
+ } | undefined;
439
+ step_id?: string | undefined;
440
+ }>;
441
+ export interface GenerationMetadata {
442
+ format: 'playwright-ts';
443
+ output_path: string;
444
+ generated_at?: string;
445
+ }
446
+ export declare const generationMetadataSchema: z.ZodObject<{
447
+ format: z.ZodLiteral<"playwright-ts">;
448
+ output_path: z.ZodString;
449
+ generated_at: z.ZodOptional<z.ZodString>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ format: "playwright-ts";
452
+ output_path: string;
453
+ generated_at?: string | undefined;
454
+ }, {
455
+ format: "playwright-ts";
456
+ output_path: string;
457
+ generated_at?: string | undefined;
458
+ }>;
459
+ export interface Lockfile {
460
+ run_id: string;
461
+ spec_name: string;
462
+ spec_hash: string;
463
+ created_at: string;
464
+ locators: Record<string, LocatorObject>;
465
+ masks: Record<string, Mask[]>;
466
+ assertions: Assertion[];
467
+ generation: GenerationMetadata;
468
+ }
469
+ export declare const lockfileSchema: z.ZodObject<{
470
+ run_id: z.ZodString;
471
+ spec_name: z.ZodString;
472
+ spec_hash: z.ZodString;
473
+ created_at: z.ZodString;
474
+ locators: z.ZodRecord<z.ZodString, z.ZodObject<{
475
+ locator_id: z.ZodString;
476
+ preferred: z.ZodObject<{
477
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
478
+ value: z.ZodOptional<z.ZodString>;
479
+ attribute: z.ZodOptional<z.ZodString>;
480
+ role: z.ZodOptional<z.ZodString>;
481
+ name: z.ZodOptional<z.ZodString>;
482
+ exact: z.ZodOptional<z.ZodBoolean>;
483
+ text: z.ZodOptional<z.ZodString>;
484
+ selector: z.ZodOptional<z.ZodString>;
485
+ }, "strip", z.ZodTypeAny, {
486
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
487
+ value?: string | undefined;
488
+ exact?: boolean | undefined;
489
+ role?: string | undefined;
490
+ name?: string | undefined;
491
+ text?: string | undefined;
492
+ selector?: string | undefined;
493
+ attribute?: string | undefined;
494
+ }, {
495
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
496
+ value?: string | undefined;
497
+ exact?: boolean | undefined;
498
+ role?: string | undefined;
499
+ name?: string | undefined;
500
+ text?: string | undefined;
501
+ selector?: string | undefined;
502
+ attribute?: string | undefined;
503
+ }>;
504
+ fallbacks: z.ZodArray<z.ZodObject<{
505
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
506
+ value: z.ZodOptional<z.ZodString>;
507
+ attribute: z.ZodOptional<z.ZodString>;
508
+ role: z.ZodOptional<z.ZodString>;
509
+ name: z.ZodOptional<z.ZodString>;
510
+ exact: z.ZodOptional<z.ZodBoolean>;
511
+ text: z.ZodOptional<z.ZodString>;
512
+ selector: z.ZodOptional<z.ZodString>;
513
+ }, "strip", z.ZodTypeAny, {
514
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
515
+ value?: string | undefined;
516
+ exact?: boolean | undefined;
517
+ role?: string | undefined;
518
+ name?: string | undefined;
519
+ text?: string | undefined;
520
+ selector?: string | undefined;
521
+ attribute?: string | undefined;
522
+ }, {
523
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
524
+ value?: string | undefined;
525
+ exact?: boolean | undefined;
526
+ role?: string | undefined;
527
+ name?: string | undefined;
528
+ text?: string | undefined;
529
+ selector?: string | undefined;
530
+ attribute?: string | undefined;
531
+ }>, "many">;
532
+ scoping: z.ZodOptional<z.ZodObject<{
533
+ within: z.ZodOptional<z.ZodArray<z.ZodObject<{
534
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
535
+ value: z.ZodOptional<z.ZodString>;
536
+ attribute: z.ZodOptional<z.ZodString>;
537
+ role: z.ZodOptional<z.ZodString>;
538
+ name: z.ZodOptional<z.ZodString>;
539
+ exact: z.ZodOptional<z.ZodBoolean>;
540
+ text: z.ZodOptional<z.ZodString>;
541
+ selector: z.ZodOptional<z.ZodString>;
542
+ }, "strip", z.ZodTypeAny, {
543
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
544
+ value?: string | undefined;
545
+ exact?: boolean | undefined;
546
+ role?: string | undefined;
547
+ name?: string | undefined;
548
+ text?: string | undefined;
549
+ selector?: string | undefined;
550
+ attribute?: string | undefined;
551
+ }, {
552
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
553
+ value?: string | undefined;
554
+ exact?: boolean | undefined;
555
+ role?: string | undefined;
556
+ name?: string | undefined;
557
+ text?: string | undefined;
558
+ selector?: string | undefined;
559
+ attribute?: string | undefined;
560
+ }>, "many">>;
561
+ nth: z.ZodOptional<z.ZodNumber>;
562
+ }, "strip", z.ZodTypeAny, {
563
+ within?: {
564
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
565
+ value?: string | undefined;
566
+ exact?: boolean | undefined;
567
+ role?: string | undefined;
568
+ name?: string | undefined;
569
+ text?: string | undefined;
570
+ selector?: string | undefined;
571
+ attribute?: string | undefined;
572
+ }[] | undefined;
573
+ nth?: number | undefined;
574
+ }, {
575
+ within?: {
576
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
577
+ value?: string | undefined;
578
+ exact?: boolean | undefined;
579
+ role?: string | undefined;
580
+ name?: string | undefined;
581
+ text?: string | undefined;
582
+ selector?: string | undefined;
583
+ attribute?: string | undefined;
584
+ }[] | undefined;
585
+ nth?: number | undefined;
586
+ }>>;
587
+ proof: z.ZodObject<{
588
+ a11y_role: z.ZodOptional<z.ZodString>;
589
+ a11y_name: z.ZodOptional<z.ZodString>;
590
+ dom_fingerprint: z.ZodOptional<z.ZodObject<{
591
+ tag: z.ZodString;
592
+ classes: z.ZodArray<z.ZodString, "many">;
593
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
594
+ }, "strip", z.ZodTypeAny, {
595
+ tag: string;
596
+ classes: string[];
597
+ attributes?: Record<string, string> | undefined;
598
+ }, {
599
+ tag: string;
600
+ classes: string[];
601
+ attributes?: Record<string, string> | undefined;
602
+ }>>;
603
+ bounding_box: z.ZodOptional<z.ZodObject<{
604
+ x: z.ZodNumber;
605
+ y: z.ZodNumber;
606
+ width: z.ZodNumber;
607
+ height: z.ZodNumber;
608
+ }, "strip", z.ZodTypeAny, {
609
+ x: number;
610
+ y: number;
611
+ width: number;
612
+ height: number;
613
+ }, {
614
+ x: number;
615
+ y: number;
616
+ width: number;
617
+ height: number;
618
+ }>>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ a11y_role?: string | undefined;
621
+ a11y_name?: string | undefined;
622
+ dom_fingerprint?: {
623
+ tag: string;
624
+ classes: string[];
625
+ attributes?: Record<string, string> | undefined;
626
+ } | undefined;
627
+ bounding_box?: {
628
+ x: number;
629
+ y: number;
630
+ width: number;
631
+ height: number;
632
+ } | undefined;
633
+ }, {
634
+ a11y_role?: string | undefined;
635
+ a11y_name?: string | undefined;
636
+ dom_fingerprint?: {
637
+ tag: string;
638
+ classes: string[];
639
+ attributes?: Record<string, string> | undefined;
640
+ } | undefined;
641
+ bounding_box?: {
642
+ x: number;
643
+ y: number;
644
+ width: number;
645
+ height: number;
646
+ } | undefined;
647
+ }>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ locator_id: string;
650
+ preferred: {
651
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
652
+ value?: string | undefined;
653
+ exact?: boolean | undefined;
654
+ role?: string | undefined;
655
+ name?: string | undefined;
656
+ text?: string | undefined;
657
+ selector?: string | undefined;
658
+ attribute?: string | undefined;
659
+ };
660
+ fallbacks: {
661
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
662
+ value?: string | undefined;
663
+ exact?: boolean | undefined;
664
+ role?: string | undefined;
665
+ name?: string | undefined;
666
+ text?: string | undefined;
667
+ selector?: string | undefined;
668
+ attribute?: string | undefined;
669
+ }[];
670
+ proof: {
671
+ a11y_role?: string | undefined;
672
+ a11y_name?: string | undefined;
673
+ dom_fingerprint?: {
674
+ tag: string;
675
+ classes: string[];
676
+ attributes?: Record<string, string> | undefined;
677
+ } | undefined;
678
+ bounding_box?: {
679
+ x: number;
680
+ y: number;
681
+ width: number;
682
+ height: number;
683
+ } | undefined;
684
+ };
685
+ scoping?: {
686
+ within?: {
687
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
688
+ value?: string | undefined;
689
+ exact?: boolean | undefined;
690
+ role?: string | undefined;
691
+ name?: string | undefined;
692
+ text?: string | undefined;
693
+ selector?: string | undefined;
694
+ attribute?: string | undefined;
695
+ }[] | undefined;
696
+ nth?: number | undefined;
697
+ } | undefined;
698
+ }, {
699
+ locator_id: string;
700
+ preferred: {
701
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
702
+ value?: string | undefined;
703
+ exact?: boolean | undefined;
704
+ role?: string | undefined;
705
+ name?: string | undefined;
706
+ text?: string | undefined;
707
+ selector?: string | undefined;
708
+ attribute?: string | undefined;
709
+ };
710
+ fallbacks: {
711
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
712
+ value?: string | undefined;
713
+ exact?: boolean | undefined;
714
+ role?: string | undefined;
715
+ name?: string | undefined;
716
+ text?: string | undefined;
717
+ selector?: string | undefined;
718
+ attribute?: string | undefined;
719
+ }[];
720
+ proof: {
721
+ a11y_role?: string | undefined;
722
+ a11y_name?: string | undefined;
723
+ dom_fingerprint?: {
724
+ tag: string;
725
+ classes: string[];
726
+ attributes?: Record<string, string> | undefined;
727
+ } | undefined;
728
+ bounding_box?: {
729
+ x: number;
730
+ y: number;
731
+ width: number;
732
+ height: number;
733
+ } | undefined;
734
+ };
735
+ scoping?: {
736
+ within?: {
737
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
738
+ value?: string | undefined;
739
+ exact?: boolean | undefined;
740
+ role?: string | undefined;
741
+ name?: string | undefined;
742
+ text?: string | undefined;
743
+ selector?: string | undefined;
744
+ attribute?: string | undefined;
745
+ }[] | undefined;
746
+ nth?: number | undefined;
747
+ } | undefined;
748
+ }>>;
749
+ masks: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
750
+ x: z.ZodNumber;
751
+ y: z.ZodNumber;
752
+ width: z.ZodNumber;
753
+ height: z.ZodNumber;
754
+ reason: z.ZodString;
755
+ locator: z.ZodOptional<z.ZodString>;
756
+ }, "strip", z.ZodTypeAny, {
757
+ x: number;
758
+ y: number;
759
+ width: number;
760
+ height: number;
761
+ reason: string;
762
+ locator?: string | undefined;
763
+ }, {
764
+ x: number;
765
+ y: number;
766
+ width: number;
767
+ height: number;
768
+ reason: string;
769
+ locator?: string | undefined;
770
+ }>, "many">>;
771
+ assertions: z.ZodArray<z.ZodObject<{
772
+ id: z.ZodString;
773
+ type: z.ZodEnum<["visible", "hidden", "text_contains", "text_equals", "url_contains", "url_matches", "count", "attribute", "checked", "screenshot"]>;
774
+ target: z.ZodOptional<z.ZodObject<{
775
+ locator_id: z.ZodString;
776
+ preferred: z.ZodObject<{
777
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
778
+ value: z.ZodOptional<z.ZodString>;
779
+ attribute: z.ZodOptional<z.ZodString>;
780
+ role: z.ZodOptional<z.ZodString>;
781
+ name: z.ZodOptional<z.ZodString>;
782
+ exact: z.ZodOptional<z.ZodBoolean>;
783
+ text: z.ZodOptional<z.ZodString>;
784
+ selector: z.ZodOptional<z.ZodString>;
785
+ }, "strip", z.ZodTypeAny, {
786
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
787
+ value?: string | undefined;
788
+ exact?: boolean | undefined;
789
+ role?: string | undefined;
790
+ name?: string | undefined;
791
+ text?: string | undefined;
792
+ selector?: string | undefined;
793
+ attribute?: string | undefined;
794
+ }, {
795
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
796
+ value?: string | undefined;
797
+ exact?: boolean | undefined;
798
+ role?: string | undefined;
799
+ name?: string | undefined;
800
+ text?: string | undefined;
801
+ selector?: string | undefined;
802
+ attribute?: string | undefined;
803
+ }>;
804
+ fallbacks: z.ZodArray<z.ZodObject<{
805
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
806
+ value: z.ZodOptional<z.ZodString>;
807
+ attribute: z.ZodOptional<z.ZodString>;
808
+ role: z.ZodOptional<z.ZodString>;
809
+ name: z.ZodOptional<z.ZodString>;
810
+ exact: z.ZodOptional<z.ZodBoolean>;
811
+ text: z.ZodOptional<z.ZodString>;
812
+ selector: z.ZodOptional<z.ZodString>;
813
+ }, "strip", z.ZodTypeAny, {
814
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
815
+ value?: string | undefined;
816
+ exact?: boolean | undefined;
817
+ role?: string | undefined;
818
+ name?: string | undefined;
819
+ text?: string | undefined;
820
+ selector?: string | undefined;
821
+ attribute?: string | undefined;
822
+ }, {
823
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
824
+ value?: string | undefined;
825
+ exact?: boolean | undefined;
826
+ role?: string | undefined;
827
+ name?: string | undefined;
828
+ text?: string | undefined;
829
+ selector?: string | undefined;
830
+ attribute?: string | undefined;
831
+ }>, "many">;
832
+ scoping: z.ZodOptional<z.ZodObject<{
833
+ within: z.ZodOptional<z.ZodArray<z.ZodObject<{
834
+ type: z.ZodEnum<["testid", "role", "label", "placeholder", "text", "css"]>;
835
+ value: z.ZodOptional<z.ZodString>;
836
+ attribute: z.ZodOptional<z.ZodString>;
837
+ role: z.ZodOptional<z.ZodString>;
838
+ name: z.ZodOptional<z.ZodString>;
839
+ exact: z.ZodOptional<z.ZodBoolean>;
840
+ text: z.ZodOptional<z.ZodString>;
841
+ selector: z.ZodOptional<z.ZodString>;
842
+ }, "strip", z.ZodTypeAny, {
843
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
844
+ value?: string | undefined;
845
+ exact?: boolean | undefined;
846
+ role?: string | undefined;
847
+ name?: string | undefined;
848
+ text?: string | undefined;
849
+ selector?: string | undefined;
850
+ attribute?: string | undefined;
851
+ }, {
852
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
853
+ value?: string | undefined;
854
+ exact?: boolean | undefined;
855
+ role?: string | undefined;
856
+ name?: string | undefined;
857
+ text?: string | undefined;
858
+ selector?: string | undefined;
859
+ attribute?: string | undefined;
860
+ }>, "many">>;
861
+ nth: z.ZodOptional<z.ZodNumber>;
862
+ }, "strip", z.ZodTypeAny, {
863
+ within?: {
864
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
865
+ value?: string | undefined;
866
+ exact?: boolean | undefined;
867
+ role?: string | undefined;
868
+ name?: string | undefined;
869
+ text?: string | undefined;
870
+ selector?: string | undefined;
871
+ attribute?: string | undefined;
872
+ }[] | undefined;
873
+ nth?: number | undefined;
874
+ }, {
875
+ within?: {
876
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
877
+ value?: string | undefined;
878
+ exact?: boolean | undefined;
879
+ role?: string | undefined;
880
+ name?: string | undefined;
881
+ text?: string | undefined;
882
+ selector?: string | undefined;
883
+ attribute?: string | undefined;
884
+ }[] | undefined;
885
+ nth?: number | undefined;
886
+ }>>;
887
+ proof: z.ZodObject<{
888
+ a11y_role: z.ZodOptional<z.ZodString>;
889
+ a11y_name: z.ZodOptional<z.ZodString>;
890
+ dom_fingerprint: z.ZodOptional<z.ZodObject<{
891
+ tag: z.ZodString;
892
+ classes: z.ZodArray<z.ZodString, "many">;
893
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
894
+ }, "strip", z.ZodTypeAny, {
895
+ tag: string;
896
+ classes: string[];
897
+ attributes?: Record<string, string> | undefined;
898
+ }, {
899
+ tag: string;
900
+ classes: string[];
901
+ attributes?: Record<string, string> | undefined;
902
+ }>>;
903
+ bounding_box: z.ZodOptional<z.ZodObject<{
904
+ x: z.ZodNumber;
905
+ y: z.ZodNumber;
906
+ width: z.ZodNumber;
907
+ height: z.ZodNumber;
908
+ }, "strip", z.ZodTypeAny, {
909
+ x: number;
910
+ y: number;
911
+ width: number;
912
+ height: number;
913
+ }, {
914
+ x: number;
915
+ y: number;
916
+ width: number;
917
+ height: number;
918
+ }>>;
919
+ }, "strip", z.ZodTypeAny, {
920
+ a11y_role?: string | undefined;
921
+ a11y_name?: string | undefined;
922
+ dom_fingerprint?: {
923
+ tag: string;
924
+ classes: string[];
925
+ attributes?: Record<string, string> | undefined;
926
+ } | undefined;
927
+ bounding_box?: {
928
+ x: number;
929
+ y: number;
930
+ width: number;
931
+ height: number;
932
+ } | undefined;
933
+ }, {
934
+ a11y_role?: string | undefined;
935
+ a11y_name?: string | undefined;
936
+ dom_fingerprint?: {
937
+ tag: string;
938
+ classes: string[];
939
+ attributes?: Record<string, string> | undefined;
940
+ } | undefined;
941
+ bounding_box?: {
942
+ x: number;
943
+ y: number;
944
+ width: number;
945
+ height: number;
946
+ } | undefined;
947
+ }>;
948
+ }, "strip", z.ZodTypeAny, {
949
+ locator_id: string;
950
+ preferred: {
951
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
952
+ value?: string | undefined;
953
+ exact?: boolean | undefined;
954
+ role?: string | undefined;
955
+ name?: string | undefined;
956
+ text?: string | undefined;
957
+ selector?: string | undefined;
958
+ attribute?: string | undefined;
959
+ };
960
+ fallbacks: {
961
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
962
+ value?: string | undefined;
963
+ exact?: boolean | undefined;
964
+ role?: string | undefined;
965
+ name?: string | undefined;
966
+ text?: string | undefined;
967
+ selector?: string | undefined;
968
+ attribute?: string | undefined;
969
+ }[];
970
+ proof: {
971
+ a11y_role?: string | undefined;
972
+ a11y_name?: string | undefined;
973
+ dom_fingerprint?: {
974
+ tag: string;
975
+ classes: string[];
976
+ attributes?: Record<string, string> | undefined;
977
+ } | undefined;
978
+ bounding_box?: {
979
+ x: number;
980
+ y: number;
981
+ width: number;
982
+ height: number;
983
+ } | undefined;
984
+ };
985
+ scoping?: {
986
+ within?: {
987
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
988
+ value?: string | undefined;
989
+ exact?: boolean | undefined;
990
+ role?: string | undefined;
991
+ name?: string | undefined;
992
+ text?: string | undefined;
993
+ selector?: string | undefined;
994
+ attribute?: string | undefined;
995
+ }[] | undefined;
996
+ nth?: number | undefined;
997
+ } | undefined;
998
+ }, {
999
+ locator_id: string;
1000
+ preferred: {
1001
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1002
+ value?: string | undefined;
1003
+ exact?: boolean | undefined;
1004
+ role?: string | undefined;
1005
+ name?: string | undefined;
1006
+ text?: string | undefined;
1007
+ selector?: string | undefined;
1008
+ attribute?: string | undefined;
1009
+ };
1010
+ fallbacks: {
1011
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1012
+ value?: string | undefined;
1013
+ exact?: boolean | undefined;
1014
+ role?: string | undefined;
1015
+ name?: string | undefined;
1016
+ text?: string | undefined;
1017
+ selector?: string | undefined;
1018
+ attribute?: string | undefined;
1019
+ }[];
1020
+ proof: {
1021
+ a11y_role?: string | undefined;
1022
+ a11y_name?: string | undefined;
1023
+ dom_fingerprint?: {
1024
+ tag: string;
1025
+ classes: string[];
1026
+ attributes?: Record<string, string> | undefined;
1027
+ } | undefined;
1028
+ bounding_box?: {
1029
+ x: number;
1030
+ y: number;
1031
+ width: number;
1032
+ height: number;
1033
+ } | undefined;
1034
+ };
1035
+ scoping?: {
1036
+ within?: {
1037
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1038
+ value?: string | undefined;
1039
+ exact?: boolean | undefined;
1040
+ role?: string | undefined;
1041
+ name?: string | undefined;
1042
+ text?: string | undefined;
1043
+ selector?: string | undefined;
1044
+ attribute?: string | undefined;
1045
+ }[] | undefined;
1046
+ nth?: number | undefined;
1047
+ } | undefined;
1048
+ }>>;
1049
+ expected: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1050
+ step_id: z.ZodOptional<z.ZodString>;
1051
+ }, "strip", z.ZodTypeAny, {
1052
+ type: "screenshot" | "visible" | "hidden" | "checked" | "text_contains" | "url_contains" | "attribute" | "text_equals" | "url_matches" | "count";
1053
+ id: string;
1054
+ expected?: string | number | boolean | undefined;
1055
+ target?: {
1056
+ locator_id: string;
1057
+ preferred: {
1058
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1059
+ value?: string | undefined;
1060
+ exact?: boolean | undefined;
1061
+ role?: string | undefined;
1062
+ name?: string | undefined;
1063
+ text?: string | undefined;
1064
+ selector?: string | undefined;
1065
+ attribute?: string | undefined;
1066
+ };
1067
+ fallbacks: {
1068
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1069
+ value?: string | undefined;
1070
+ exact?: boolean | undefined;
1071
+ role?: string | undefined;
1072
+ name?: string | undefined;
1073
+ text?: string | undefined;
1074
+ selector?: string | undefined;
1075
+ attribute?: string | undefined;
1076
+ }[];
1077
+ proof: {
1078
+ a11y_role?: string | undefined;
1079
+ a11y_name?: string | undefined;
1080
+ dom_fingerprint?: {
1081
+ tag: string;
1082
+ classes: string[];
1083
+ attributes?: Record<string, string> | undefined;
1084
+ } | undefined;
1085
+ bounding_box?: {
1086
+ x: number;
1087
+ y: number;
1088
+ width: number;
1089
+ height: number;
1090
+ } | undefined;
1091
+ };
1092
+ scoping?: {
1093
+ within?: {
1094
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1095
+ value?: string | undefined;
1096
+ exact?: boolean | undefined;
1097
+ role?: string | undefined;
1098
+ name?: string | undefined;
1099
+ text?: string | undefined;
1100
+ selector?: string | undefined;
1101
+ attribute?: string | undefined;
1102
+ }[] | undefined;
1103
+ nth?: number | undefined;
1104
+ } | undefined;
1105
+ } | undefined;
1106
+ step_id?: string | undefined;
1107
+ }, {
1108
+ type: "screenshot" | "visible" | "hidden" | "checked" | "text_contains" | "url_contains" | "attribute" | "text_equals" | "url_matches" | "count";
1109
+ id: string;
1110
+ expected?: string | number | boolean | undefined;
1111
+ target?: {
1112
+ locator_id: string;
1113
+ preferred: {
1114
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1115
+ value?: string | undefined;
1116
+ exact?: boolean | undefined;
1117
+ role?: string | undefined;
1118
+ name?: string | undefined;
1119
+ text?: string | undefined;
1120
+ selector?: string | undefined;
1121
+ attribute?: string | undefined;
1122
+ };
1123
+ fallbacks: {
1124
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1125
+ value?: string | undefined;
1126
+ exact?: boolean | undefined;
1127
+ role?: string | undefined;
1128
+ name?: string | undefined;
1129
+ text?: string | undefined;
1130
+ selector?: string | undefined;
1131
+ attribute?: string | undefined;
1132
+ }[];
1133
+ proof: {
1134
+ a11y_role?: string | undefined;
1135
+ a11y_name?: string | undefined;
1136
+ dom_fingerprint?: {
1137
+ tag: string;
1138
+ classes: string[];
1139
+ attributes?: Record<string, string> | undefined;
1140
+ } | undefined;
1141
+ bounding_box?: {
1142
+ x: number;
1143
+ y: number;
1144
+ width: number;
1145
+ height: number;
1146
+ } | undefined;
1147
+ };
1148
+ scoping?: {
1149
+ within?: {
1150
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1151
+ value?: string | undefined;
1152
+ exact?: boolean | undefined;
1153
+ role?: string | undefined;
1154
+ name?: string | undefined;
1155
+ text?: string | undefined;
1156
+ selector?: string | undefined;
1157
+ attribute?: string | undefined;
1158
+ }[] | undefined;
1159
+ nth?: number | undefined;
1160
+ } | undefined;
1161
+ } | undefined;
1162
+ step_id?: string | undefined;
1163
+ }>, "many">;
1164
+ generation: z.ZodObject<{
1165
+ format: z.ZodLiteral<"playwright-ts">;
1166
+ output_path: z.ZodString;
1167
+ generated_at: z.ZodOptional<z.ZodString>;
1168
+ }, "strip", z.ZodTypeAny, {
1169
+ format: "playwright-ts";
1170
+ output_path: string;
1171
+ generated_at?: string | undefined;
1172
+ }, {
1173
+ format: "playwright-ts";
1174
+ output_path: string;
1175
+ generated_at?: string | undefined;
1176
+ }>;
1177
+ }, "strip", z.ZodTypeAny, {
1178
+ locators: Record<string, {
1179
+ locator_id: string;
1180
+ preferred: {
1181
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1182
+ value?: string | undefined;
1183
+ exact?: boolean | undefined;
1184
+ role?: string | undefined;
1185
+ name?: string | undefined;
1186
+ text?: string | undefined;
1187
+ selector?: string | undefined;
1188
+ attribute?: string | undefined;
1189
+ };
1190
+ fallbacks: {
1191
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1192
+ value?: string | undefined;
1193
+ exact?: boolean | undefined;
1194
+ role?: string | undefined;
1195
+ name?: string | undefined;
1196
+ text?: string | undefined;
1197
+ selector?: string | undefined;
1198
+ attribute?: string | undefined;
1199
+ }[];
1200
+ proof: {
1201
+ a11y_role?: string | undefined;
1202
+ a11y_name?: string | undefined;
1203
+ dom_fingerprint?: {
1204
+ tag: string;
1205
+ classes: string[];
1206
+ attributes?: Record<string, string> | undefined;
1207
+ } | undefined;
1208
+ bounding_box?: {
1209
+ x: number;
1210
+ y: number;
1211
+ width: number;
1212
+ height: number;
1213
+ } | undefined;
1214
+ };
1215
+ scoping?: {
1216
+ within?: {
1217
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1218
+ value?: string | undefined;
1219
+ exact?: boolean | undefined;
1220
+ role?: string | undefined;
1221
+ name?: string | undefined;
1222
+ text?: string | undefined;
1223
+ selector?: string | undefined;
1224
+ attribute?: string | undefined;
1225
+ }[] | undefined;
1226
+ nth?: number | undefined;
1227
+ } | undefined;
1228
+ }>;
1229
+ run_id: string;
1230
+ spec_name: string;
1231
+ spec_hash: string;
1232
+ created_at: string;
1233
+ masks: Record<string, {
1234
+ x: number;
1235
+ y: number;
1236
+ width: number;
1237
+ height: number;
1238
+ reason: string;
1239
+ locator?: string | undefined;
1240
+ }[]>;
1241
+ assertions: {
1242
+ type: "screenshot" | "visible" | "hidden" | "checked" | "text_contains" | "url_contains" | "attribute" | "text_equals" | "url_matches" | "count";
1243
+ id: string;
1244
+ expected?: string | number | boolean | undefined;
1245
+ target?: {
1246
+ locator_id: string;
1247
+ preferred: {
1248
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1249
+ value?: string | undefined;
1250
+ exact?: boolean | undefined;
1251
+ role?: string | undefined;
1252
+ name?: string | undefined;
1253
+ text?: string | undefined;
1254
+ selector?: string | undefined;
1255
+ attribute?: string | undefined;
1256
+ };
1257
+ fallbacks: {
1258
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1259
+ value?: string | undefined;
1260
+ exact?: boolean | undefined;
1261
+ role?: string | undefined;
1262
+ name?: string | undefined;
1263
+ text?: string | undefined;
1264
+ selector?: string | undefined;
1265
+ attribute?: string | undefined;
1266
+ }[];
1267
+ proof: {
1268
+ a11y_role?: string | undefined;
1269
+ a11y_name?: string | undefined;
1270
+ dom_fingerprint?: {
1271
+ tag: string;
1272
+ classes: string[];
1273
+ attributes?: Record<string, string> | undefined;
1274
+ } | undefined;
1275
+ bounding_box?: {
1276
+ x: number;
1277
+ y: number;
1278
+ width: number;
1279
+ height: number;
1280
+ } | undefined;
1281
+ };
1282
+ scoping?: {
1283
+ within?: {
1284
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1285
+ value?: string | undefined;
1286
+ exact?: boolean | undefined;
1287
+ role?: string | undefined;
1288
+ name?: string | undefined;
1289
+ text?: string | undefined;
1290
+ selector?: string | undefined;
1291
+ attribute?: string | undefined;
1292
+ }[] | undefined;
1293
+ nth?: number | undefined;
1294
+ } | undefined;
1295
+ } | undefined;
1296
+ step_id?: string | undefined;
1297
+ }[];
1298
+ generation: {
1299
+ format: "playwright-ts";
1300
+ output_path: string;
1301
+ generated_at?: string | undefined;
1302
+ };
1303
+ }, {
1304
+ locators: Record<string, {
1305
+ locator_id: string;
1306
+ preferred: {
1307
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1308
+ value?: string | undefined;
1309
+ exact?: boolean | undefined;
1310
+ role?: string | undefined;
1311
+ name?: string | undefined;
1312
+ text?: string | undefined;
1313
+ selector?: string | undefined;
1314
+ attribute?: string | undefined;
1315
+ };
1316
+ fallbacks: {
1317
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1318
+ value?: string | undefined;
1319
+ exact?: boolean | undefined;
1320
+ role?: string | undefined;
1321
+ name?: string | undefined;
1322
+ text?: string | undefined;
1323
+ selector?: string | undefined;
1324
+ attribute?: string | undefined;
1325
+ }[];
1326
+ proof: {
1327
+ a11y_role?: string | undefined;
1328
+ a11y_name?: string | undefined;
1329
+ dom_fingerprint?: {
1330
+ tag: string;
1331
+ classes: string[];
1332
+ attributes?: Record<string, string> | undefined;
1333
+ } | undefined;
1334
+ bounding_box?: {
1335
+ x: number;
1336
+ y: number;
1337
+ width: number;
1338
+ height: number;
1339
+ } | undefined;
1340
+ };
1341
+ scoping?: {
1342
+ within?: {
1343
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1344
+ value?: string | undefined;
1345
+ exact?: boolean | undefined;
1346
+ role?: string | undefined;
1347
+ name?: string | undefined;
1348
+ text?: string | undefined;
1349
+ selector?: string | undefined;
1350
+ attribute?: string | undefined;
1351
+ }[] | undefined;
1352
+ nth?: number | undefined;
1353
+ } | undefined;
1354
+ }>;
1355
+ run_id: string;
1356
+ spec_name: string;
1357
+ spec_hash: string;
1358
+ created_at: string;
1359
+ masks: Record<string, {
1360
+ x: number;
1361
+ y: number;
1362
+ width: number;
1363
+ height: number;
1364
+ reason: string;
1365
+ locator?: string | undefined;
1366
+ }[]>;
1367
+ assertions: {
1368
+ type: "screenshot" | "visible" | "hidden" | "checked" | "text_contains" | "url_contains" | "attribute" | "text_equals" | "url_matches" | "count";
1369
+ id: string;
1370
+ expected?: string | number | boolean | undefined;
1371
+ target?: {
1372
+ locator_id: string;
1373
+ preferred: {
1374
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1375
+ value?: string | undefined;
1376
+ exact?: boolean | undefined;
1377
+ role?: string | undefined;
1378
+ name?: string | undefined;
1379
+ text?: string | undefined;
1380
+ selector?: string | undefined;
1381
+ attribute?: string | undefined;
1382
+ };
1383
+ fallbacks: {
1384
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1385
+ value?: string | undefined;
1386
+ exact?: boolean | undefined;
1387
+ role?: string | undefined;
1388
+ name?: string | undefined;
1389
+ text?: string | undefined;
1390
+ selector?: string | undefined;
1391
+ attribute?: string | undefined;
1392
+ }[];
1393
+ proof: {
1394
+ a11y_role?: string | undefined;
1395
+ a11y_name?: string | undefined;
1396
+ dom_fingerprint?: {
1397
+ tag: string;
1398
+ classes: string[];
1399
+ attributes?: Record<string, string> | undefined;
1400
+ } | undefined;
1401
+ bounding_box?: {
1402
+ x: number;
1403
+ y: number;
1404
+ width: number;
1405
+ height: number;
1406
+ } | undefined;
1407
+ };
1408
+ scoping?: {
1409
+ within?: {
1410
+ type: "testid" | "role" | "label" | "placeholder" | "text" | "css";
1411
+ value?: string | undefined;
1412
+ exact?: boolean | undefined;
1413
+ role?: string | undefined;
1414
+ name?: string | undefined;
1415
+ text?: string | undefined;
1416
+ selector?: string | undefined;
1417
+ attribute?: string | undefined;
1418
+ }[] | undefined;
1419
+ nth?: number | undefined;
1420
+ } | undefined;
1421
+ } | undefined;
1422
+ step_id?: string | undefined;
1423
+ }[];
1424
+ generation: {
1425
+ format: "playwright-ts";
1426
+ output_path: string;
1427
+ generated_at?: string | undefined;
1428
+ };
1429
+ }>;
1430
+ /**
1431
+ * Validates if an object is a valid Lockfile
1432
+ */
1433
+ export declare function validateLockfile(lockfile: unknown): lockfile is Lockfile;
1434
+ /**
1435
+ * Computes SHA256 hash of spec file content
1436
+ */
1437
+ export declare function computeSpecHash(content: string): string;
1438
+ /**
1439
+ * Reads a lockfile from a run directory
1440
+ */
1441
+ export declare function readLockfile(runDir: string): Promise<Lockfile>;
1442
+ /**
1443
+ * Writes a lockfile to a run directory
1444
+ */
1445
+ export declare function writeLockfile(runDir: string, lockfile: Lockfile): Promise<void>;
1446
+ export interface ExplorationReport {
1447
+ spec: string;
1448
+ spec_path: string;
1449
+ spec_description?: string;
1450
+ exploration_id: string;
1451
+ timestamp: string;
1452
+ duration_ms: number;
1453
+ browser: 'chromium' | 'firefox' | 'webkit';
1454
+ viewport: {
1455
+ width: number;
1456
+ height: number;
1457
+ };
1458
+ base_url: string;
1459
+ steps: ExplorationStep[];
1460
+ outcome_checks: OutcomeCheck[];
1461
+ overall_status: 'completed' | 'failed' | 'timeout';
1462
+ errors: ExplorationError[];
1463
+ }
1464
+ /**
1465
+ * @deprecated Use ExplorationReport instead - this is exploration output, not the deterministic lockfile
1466
+ */
1467
+ export type ExplorationLockfile = ExplorationReport;
1468
+ export interface ExplorationStep {
1469
+ step_index: number;
1470
+ spec_action: LegacySpecStep;
1471
+ execution: StepExecution;
1472
+ screenshots: {
1473
+ before?: string;
1474
+ after?: string;
1475
+ };
1476
+ snapshot_before?: Record<string, unknown>;
1477
+ snapshot_after?: Record<string, unknown>;
1478
+ }
1479
+ export interface StepExecution {
1480
+ status: 'completed' | 'failed' | 'skipped';
1481
+ method?: string;
1482
+ element_ref?: string;
1483
+ selector_used?: string;
1484
+ locator?: LegacyLocatorObject;
1485
+ duration_ms: number;
1486
+ error?: string;
1487
+ value_used?: string;
1488
+ url_used?: string;
1489
+ }
1490
+ export interface OutcomeCheck {
1491
+ check: string;
1492
+ expected: unknown;
1493
+ actual: unknown;
1494
+ passed: boolean;
1495
+ }
1496
+ export interface ExplorationError {
1497
+ step_index?: number;
1498
+ message: string;
1499
+ stack?: string;
1500
+ }
1501
+ //# sourceMappingURL=lockfile.d.ts.map