@nativemason/contracts 0.0.0-stage → 0.3.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.
@@ -0,0 +1,580 @@
1
+ import { z } from 'zod';
2
+ /** Browser trials across explicit device profiles; native acceptance remains separate. */
3
+ export declare const SuggestionProfileSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ profile: z.ZodObject<{
6
+ window: z.ZodObject<{
7
+ width: z.ZodNumber;
8
+ height: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ pixelRatio: z.ZodNumber;
11
+ fontScale: z.ZodNumber;
12
+ insets: z.ZodObject<{
13
+ top: z.ZodNumber;
14
+ right: z.ZodNumber;
15
+ bottom: z.ZodNumber;
16
+ left: z.ZodNumber;
17
+ }, z.core.$strict>;
18
+ root: z.ZodObject<{
19
+ x: z.ZodNumber;
20
+ y: z.ZodNumber;
21
+ width: z.ZodNumber;
22
+ height: z.ZodNumber;
23
+ }, z.core.$strict>;
24
+ orientation: z.ZodEnum<{
25
+ portrait: "portrait";
26
+ landscape: "landscape";
27
+ }>;
28
+ }, z.core.$strict>;
29
+ script: z.ZodOptional<z.ZodObject<{
30
+ scenarioId: z.ZodString;
31
+ reset: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ type: z.ZodLiteral<"navigate">;
33
+ url: z.ZodString;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ type: z.ZodLiteral<"tap">;
36
+ elementId: z.ZodString;
37
+ }, z.core.$strip>, z.ZodObject<{
38
+ type: z.ZodLiteral<"press">;
39
+ elementId: z.ZodString;
40
+ phase: z.ZodEnum<{
41
+ down: "down";
42
+ up: "up";
43
+ }>;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ type: z.ZodLiteral<"input">;
46
+ elementId: z.ZodString;
47
+ text: z.ZodString;
48
+ mode: z.ZodDefault<z.ZodEnum<{
49
+ replace: "replace";
50
+ append: "append";
51
+ }>>;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ type: z.ZodLiteral<"swipe">;
54
+ elementId: z.ZodString;
55
+ direction: z.ZodEnum<{
56
+ UP: "UP";
57
+ DOWN: "DOWN";
58
+ LEFT: "LEFT";
59
+ RIGHT: "RIGHT";
60
+ }>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ type: z.ZodLiteral<"scroll">;
63
+ elementId: z.ZodString;
64
+ x: z.ZodNumber;
65
+ y: z.ZodNumber;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ type: z.ZodLiteral<"keyboard">;
68
+ visible: z.ZodBoolean;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ type: z.ZodLiteral<"wait">;
71
+ elementId: z.ZodString;
72
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<"hook">;
75
+ name: z.ZodString;
76
+ value: z.ZodOptional<z.ZodUnknown>;
77
+ }, z.core.$strip>], "type">>;
78
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
79
+ type: z.ZodLiteral<"navigate">;
80
+ url: z.ZodString;
81
+ }, z.core.$strip>, z.ZodObject<{
82
+ type: z.ZodLiteral<"tap">;
83
+ elementId: z.ZodString;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ type: z.ZodLiteral<"press">;
86
+ elementId: z.ZodString;
87
+ phase: z.ZodEnum<{
88
+ down: "down";
89
+ up: "up";
90
+ }>;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ type: z.ZodLiteral<"input">;
93
+ elementId: z.ZodString;
94
+ text: z.ZodString;
95
+ mode: z.ZodDefault<z.ZodEnum<{
96
+ replace: "replace";
97
+ append: "append";
98
+ }>>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ type: z.ZodLiteral<"swipe">;
101
+ elementId: z.ZodString;
102
+ direction: z.ZodEnum<{
103
+ UP: "UP";
104
+ DOWN: "DOWN";
105
+ LEFT: "LEFT";
106
+ RIGHT: "RIGHT";
107
+ }>;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ type: z.ZodLiteral<"scroll">;
110
+ elementId: z.ZodString;
111
+ x: z.ZodNumber;
112
+ y: z.ZodNumber;
113
+ }, z.core.$strip>, z.ZodObject<{
114
+ type: z.ZodLiteral<"keyboard">;
115
+ visible: z.ZodBoolean;
116
+ }, z.core.$strip>, z.ZodObject<{
117
+ type: z.ZodLiteral<"wait">;
118
+ elementId: z.ZodString;
119
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<"hook">;
122
+ name: z.ZodString;
123
+ value: z.ZodOptional<z.ZodUnknown>;
124
+ }, z.core.$strip>], "type">>;
125
+ }, z.core.$strict>>;
126
+ }, z.core.$strict>;
127
+ export type SuggestionProfile = z.infer<typeof SuggestionProfileSchema>;
128
+ export declare const SuggestionProfilesSchema: z.ZodArray<z.ZodObject<{
129
+ id: z.ZodString;
130
+ profile: z.ZodObject<{
131
+ window: z.ZodObject<{
132
+ width: z.ZodNumber;
133
+ height: z.ZodNumber;
134
+ }, z.core.$strict>;
135
+ pixelRatio: z.ZodNumber;
136
+ fontScale: z.ZodNumber;
137
+ insets: z.ZodObject<{
138
+ top: z.ZodNumber;
139
+ right: z.ZodNumber;
140
+ bottom: z.ZodNumber;
141
+ left: z.ZodNumber;
142
+ }, z.core.$strict>;
143
+ root: z.ZodObject<{
144
+ x: z.ZodNumber;
145
+ y: z.ZodNumber;
146
+ width: z.ZodNumber;
147
+ height: z.ZodNumber;
148
+ }, z.core.$strict>;
149
+ orientation: z.ZodEnum<{
150
+ portrait: "portrait";
151
+ landscape: "landscape";
152
+ }>;
153
+ }, z.core.$strict>;
154
+ script: z.ZodOptional<z.ZodObject<{
155
+ scenarioId: z.ZodString;
156
+ reset: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
157
+ type: z.ZodLiteral<"navigate">;
158
+ url: z.ZodString;
159
+ }, z.core.$strip>, z.ZodObject<{
160
+ type: z.ZodLiteral<"tap">;
161
+ elementId: z.ZodString;
162
+ }, z.core.$strip>, z.ZodObject<{
163
+ type: z.ZodLiteral<"press">;
164
+ elementId: z.ZodString;
165
+ phase: z.ZodEnum<{
166
+ down: "down";
167
+ up: "up";
168
+ }>;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ type: z.ZodLiteral<"input">;
171
+ elementId: z.ZodString;
172
+ text: z.ZodString;
173
+ mode: z.ZodDefault<z.ZodEnum<{
174
+ replace: "replace";
175
+ append: "append";
176
+ }>>;
177
+ }, z.core.$strip>, z.ZodObject<{
178
+ type: z.ZodLiteral<"swipe">;
179
+ elementId: z.ZodString;
180
+ direction: z.ZodEnum<{
181
+ UP: "UP";
182
+ DOWN: "DOWN";
183
+ LEFT: "LEFT";
184
+ RIGHT: "RIGHT";
185
+ }>;
186
+ }, z.core.$strip>, z.ZodObject<{
187
+ type: z.ZodLiteral<"scroll">;
188
+ elementId: z.ZodString;
189
+ x: z.ZodNumber;
190
+ y: z.ZodNumber;
191
+ }, z.core.$strip>, z.ZodObject<{
192
+ type: z.ZodLiteral<"keyboard">;
193
+ visible: z.ZodBoolean;
194
+ }, z.core.$strip>, z.ZodObject<{
195
+ type: z.ZodLiteral<"wait">;
196
+ elementId: z.ZodString;
197
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
198
+ }, z.core.$strip>, z.ZodObject<{
199
+ type: z.ZodLiteral<"hook">;
200
+ name: z.ZodString;
201
+ value: z.ZodOptional<z.ZodUnknown>;
202
+ }, z.core.$strip>], "type">>;
203
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
204
+ type: z.ZodLiteral<"navigate">;
205
+ url: z.ZodString;
206
+ }, z.core.$strip>, z.ZodObject<{
207
+ type: z.ZodLiteral<"tap">;
208
+ elementId: z.ZodString;
209
+ }, z.core.$strip>, z.ZodObject<{
210
+ type: z.ZodLiteral<"press">;
211
+ elementId: z.ZodString;
212
+ phase: z.ZodEnum<{
213
+ down: "down";
214
+ up: "up";
215
+ }>;
216
+ }, z.core.$strip>, z.ZodObject<{
217
+ type: z.ZodLiteral<"input">;
218
+ elementId: z.ZodString;
219
+ text: z.ZodString;
220
+ mode: z.ZodDefault<z.ZodEnum<{
221
+ replace: "replace";
222
+ append: "append";
223
+ }>>;
224
+ }, z.core.$strip>, z.ZodObject<{
225
+ type: z.ZodLiteral<"swipe">;
226
+ elementId: z.ZodString;
227
+ direction: z.ZodEnum<{
228
+ UP: "UP";
229
+ DOWN: "DOWN";
230
+ LEFT: "LEFT";
231
+ RIGHT: "RIGHT";
232
+ }>;
233
+ }, z.core.$strip>, z.ZodObject<{
234
+ type: z.ZodLiteral<"scroll">;
235
+ elementId: z.ZodString;
236
+ x: z.ZodNumber;
237
+ y: z.ZodNumber;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ type: z.ZodLiteral<"keyboard">;
240
+ visible: z.ZodBoolean;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ type: z.ZodLiteral<"wait">;
243
+ elementId: z.ZodString;
244
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
245
+ }, z.core.$strip>, z.ZodObject<{
246
+ type: z.ZodLiteral<"hook">;
247
+ name: z.ZodString;
248
+ value: z.ZodOptional<z.ZodUnknown>;
249
+ }, z.core.$strip>], "type">>;
250
+ }, z.core.$strict>>;
251
+ }, z.core.$strict>>;
252
+ export declare const SuggestionProfileEvidenceSchema: z.ZodObject<{
253
+ profileId: z.ZodString;
254
+ platform: z.ZodLiteral<"web">;
255
+ profile: z.ZodObject<{
256
+ window: z.ZodObject<{
257
+ width: z.ZodNumber;
258
+ height: z.ZodNumber;
259
+ }, z.core.$strict>;
260
+ pixelRatio: z.ZodNumber;
261
+ fontScale: z.ZodNumber;
262
+ insets: z.ZodObject<{
263
+ top: z.ZodNumber;
264
+ right: z.ZodNumber;
265
+ bottom: z.ZodNumber;
266
+ left: z.ZodNumber;
267
+ }, z.core.$strict>;
268
+ root: z.ZodObject<{
269
+ x: z.ZodNumber;
270
+ y: z.ZodNumber;
271
+ width: z.ZodNumber;
272
+ height: z.ZodNumber;
273
+ }, z.core.$strict>;
274
+ orientation: z.ZodEnum<{
275
+ portrait: "portrait";
276
+ landscape: "landscape";
277
+ }>;
278
+ }, z.core.$strict>;
279
+ scenarioState: z.ZodOptional<z.ZodEnum<{
280
+ baseline: "baseline";
281
+ scripted: "scripted";
282
+ initial: "initial";
283
+ }>>;
284
+ status: z.ZodEnum<{
285
+ unavailable: "unavailable";
286
+ passed: "passed";
287
+ failed: "failed";
288
+ unsupported: "unsupported";
289
+ }>;
290
+ snapshotId: z.ZodOptional<z.ZodString>;
291
+ results: z.ZodArray<z.ZodObject<{
292
+ constraintId: z.ZodString;
293
+ status: z.ZodEnum<{
294
+ unavailable: "unavailable";
295
+ pass: "pass";
296
+ fail: "fail";
297
+ }>;
298
+ elementIds: z.ZodArray<z.ZodString>;
299
+ deviation: z.ZodNullable<z.ZodNumber>;
300
+ tolerance: z.ZodNumber;
301
+ message: z.ZodString;
302
+ }, z.core.$strict>>;
303
+ regressions: z.ZodNumber;
304
+ warnings: z.ZodNumber;
305
+ error: z.ZodOptional<z.ZodObject<{
306
+ code: z.ZodEnum<{
307
+ INVALID_INPUT: "INVALID_INPUT";
308
+ MISSING_ELEMENT: "MISSING_ELEMENT";
309
+ DUPLICATE_ELEMENT: "DUPLICATE_ELEMENT";
310
+ STALE_SNAPSHOT: "STALE_SNAPSHOT";
311
+ STALE_SOURCE: "STALE_SOURCE";
312
+ UNSUPPORTED_EDIT: "UNSUPPORTED_EDIT";
313
+ UNSUPPORTED_PROFILE: "UNSUPPORTED_PROFILE";
314
+ UNSTABLE_LAYOUT: "UNSTABLE_LAYOUT";
315
+ NATIVE_DISCONNECTED: "NATIVE_DISCONNECTED";
316
+ TIMEOUT: "TIMEOUT";
317
+ VERIFICATION_FAILED: "VERIFICATION_FAILED";
318
+ SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
319
+ TRIAL_NOT_FOUND: "TRIAL_NOT_FOUND";
320
+ SOURCE_OUTSIDE_PROJECT: "SOURCE_OUTSIDE_PROJECT";
321
+ INTERNAL_ERROR: "INTERNAL_ERROR";
322
+ RECOVERY_CONFLICT: "RECOVERY_CONFLICT";
323
+ TRANSACTION_CONFLICT: "TRANSACTION_CONFLICT";
324
+ UNSUPPORTED_ACTION: "UNSUPPORTED_ACTION";
325
+ PROTOCOL_MISMATCH: "PROTOCOL_MISMATCH";
326
+ }>;
327
+ message: z.ZodString;
328
+ details: z.ZodOptional<z.ZodUnknown>;
329
+ }, z.core.$strict>>;
330
+ }, z.core.$strict>;
331
+ export type SuggestionProfileEvidence = z.infer<typeof SuggestionProfileEvidenceSchema>;
332
+ /** Fresh native baseline seeds proposals only; candidates are still browser trials. */
333
+ export declare const NativeSuggestionEvidenceSchema: z.ZodObject<{
334
+ status: z.ZodEnum<{
335
+ unavailable: "unavailable";
336
+ unsupported: "unsupported";
337
+ captured: "captured";
338
+ }>;
339
+ snapshot: z.ZodOptional<z.ZodObject<{
340
+ schemaVersion: z.ZodLiteral<1>;
341
+ sessionId: z.ZodString;
342
+ snapshotId: z.ZodString;
343
+ platform: z.ZodEnum<{
344
+ web: "web";
345
+ android: "android";
346
+ ios: "ios";
347
+ }>;
348
+ scenarioId: z.ZodString;
349
+ profile: z.ZodObject<{
350
+ window: z.ZodObject<{
351
+ width: z.ZodNumber;
352
+ height: z.ZodNumber;
353
+ }, z.core.$strict>;
354
+ pixelRatio: z.ZodNumber;
355
+ fontScale: z.ZodNumber;
356
+ insets: z.ZodObject<{
357
+ top: z.ZodNumber;
358
+ right: z.ZodNumber;
359
+ bottom: z.ZodNumber;
360
+ left: z.ZodNumber;
361
+ }, z.core.$strict>;
362
+ root: z.ZodObject<{
363
+ x: z.ZodNumber;
364
+ y: z.ZodNumber;
365
+ width: z.ZodNumber;
366
+ height: z.ZodNumber;
367
+ }, z.core.$strict>;
368
+ orientation: z.ZodEnum<{
369
+ portrait: "portrait";
370
+ landscape: "landscape";
371
+ }>;
372
+ }, z.core.$strict>;
373
+ revisions: z.ZodRecord<z.ZodString, z.ZodString>;
374
+ nodes: z.ZodArray<z.ZodObject<{
375
+ id: z.ZodString;
376
+ parentId: z.ZodNullable<z.ZodString>;
377
+ kind: z.ZodEnum<{
378
+ View: "View";
379
+ Text: "Text";
380
+ Pressable: "Pressable";
381
+ TextInput: "TextInput";
382
+ ScrollView: "ScrollView";
383
+ Image: "Image";
384
+ }>;
385
+ role: z.ZodNullable<z.ZodString>;
386
+ rect: z.ZodObject<{
387
+ x: z.ZodNumber;
388
+ y: z.ZodNumber;
389
+ width: z.ZodNumber;
390
+ height: z.ZodNumber;
391
+ }, z.core.$strict>;
392
+ styles: z.ZodRecord<z.ZodString, z.ZodUnknown>;
393
+ source: z.ZodNullable<z.ZodObject<{
394
+ path: z.ZodString;
395
+ styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
396
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
397
+ hash: z.ZodString;
398
+ start: z.ZodNumber;
399
+ end: z.ZodNumber;
400
+ line: z.ZodNumber;
401
+ column: z.ZodNumber;
402
+ }, z.core.$strict>>;
403
+ editable: z.ZodBoolean;
404
+ editReason: z.ZodNullable<z.ZodString>;
405
+ pressableState: z.ZodOptional<z.ZodEnum<{
406
+ pressed: "pressed";
407
+ rest: "rest";
408
+ }>>;
409
+ accessibility: z.ZodOptional<z.ZodObject<{
410
+ authoredLabel: z.ZodOptional<z.ZodString>;
411
+ authoredHint: z.ZodOptional<z.ZodString>;
412
+ accessible: z.ZodOptional<z.ZodBoolean>;
413
+ focusable: z.ZodOptional<z.ZodBoolean>;
414
+ hidden: z.ZodOptional<z.ZodBoolean>;
415
+ disabled: z.ZodOptional<z.ZodBoolean>;
416
+ direction: z.ZodEnum<{
417
+ unknown: "unknown";
418
+ ltr: "ltr";
419
+ rtl: "rtl";
420
+ }>;
421
+ directionSource: z.ZodOptional<z.ZodEnum<{
422
+ unknown: "unknown";
423
+ authored: "authored";
424
+ "native-global": "native-global";
425
+ "browser-computed": "browser-computed";
426
+ }>>;
427
+ browser: z.ZodOptional<z.ZodObject<{
428
+ name: z.ZodNullable<z.ZodString>;
429
+ focusOrder: z.ZodNullable<z.ZodNumber>;
430
+ focusOrderSource: z.ZodLiteral<"dom-sequential-estimate">;
431
+ contrast: z.ZodObject<{
432
+ status: z.ZodEnum<{
433
+ measured: "measured";
434
+ unavailable: "unavailable";
435
+ }>;
436
+ ratio: z.ZodOptional<z.ZodNumber>;
437
+ requiredRatio: z.ZodOptional<z.ZodNumber>;
438
+ reason: z.ZodOptional<z.ZodString>;
439
+ }, z.core.$strict>;
440
+ }, z.core.$strict>>;
441
+ }, z.core.$strict>>;
442
+ textFit: z.ZodOptional<z.ZodObject<{
443
+ status: z.ZodEnum<{
444
+ unavailable: "unavailable";
445
+ supported: "supported";
446
+ }>;
447
+ fullLineCount: z.ZodOptional<z.ZodNumber>;
448
+ limitedLineCount: z.ZodOptional<z.ZodNumber>;
449
+ fullHeight: z.ZodOptional<z.ZodNumber>;
450
+ availableHeight: z.ZodOptional<z.ZodNumber>;
451
+ reason: z.ZodOptional<z.ZodString>;
452
+ }, z.core.$strict>>;
453
+ authoredTextProps: z.ZodOptional<z.ZodObject<{
454
+ fontSize: z.ZodOptional<z.ZodNumber>;
455
+ lineHeight: z.ZodOptional<z.ZodNumber>;
456
+ numberOfLines: z.ZodOptional<z.ZodNumber>;
457
+ allowFontScaling: z.ZodOptional<z.ZodBoolean>;
458
+ ellipsizeMode: z.ZodOptional<z.ZodEnum<{
459
+ head: "head";
460
+ middle: "middle";
461
+ tail: "tail";
462
+ clip: "clip";
463
+ }>>;
464
+ }, z.core.$strict>>;
465
+ measuredLineCount: z.ZodOptional<z.ZodNumber>;
466
+ }, z.core.$strict>>;
467
+ status: z.ZodEnum<{
468
+ stable: "stable";
469
+ unstable: "unstable";
470
+ }>;
471
+ generation: z.ZodNumber;
472
+ nativeTarget: z.ZodOptional<z.ZodObject<{
473
+ targetId: z.ZodString;
474
+ platform: z.ZodEnum<{
475
+ android: "android";
476
+ ios: "ios";
477
+ }>;
478
+ kind: z.ZodEnum<{
479
+ physical: "physical";
480
+ emulator: "emulator";
481
+ simulator: "simulator";
482
+ }>;
483
+ }, z.core.$strict>>;
484
+ webDiagnostics: z.ZodOptional<z.ZodObject<{
485
+ nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
486
+ clipping: z.ZodEnum<{
487
+ unknown: "unknown";
488
+ confirmed: "confirmed";
489
+ clear: "clear";
490
+ }>;
491
+ centerHitTest: z.ZodEnum<{
492
+ unknown: "unknown";
493
+ confirmed: "confirmed";
494
+ clear: "clear";
495
+ }>;
496
+ scrollOverflow: z.ZodObject<{
497
+ horizontal: z.ZodBoolean;
498
+ vertical: z.ZodBoolean;
499
+ }, z.core.$strict>;
500
+ paintOrder: z.ZodNullable<z.ZodNumber>;
501
+ fonts: z.ZodArray<z.ZodObject<{
502
+ family: z.ZodString;
503
+ glyphCount: z.ZodNumber;
504
+ isCustom: z.ZodNullable<z.ZodBoolean>;
505
+ }, z.core.$strict>>;
506
+ lineBoxCount: z.ZodNullable<z.ZodNumber>;
507
+ }, z.core.$strict>>;
508
+ warnings: z.ZodArray<z.ZodObject<{
509
+ elementId: z.ZodString;
510
+ code: z.ZodEnum<{
511
+ CLIPPED: "CLIPPED";
512
+ OCCLUDED: "OCCLUDED";
513
+ FONT_LOAD_FAILED: "FONT_LOAD_FAILED";
514
+ EVIDENCE_UNAVAILABLE: "EVIDENCE_UNAVAILABLE";
515
+ }>;
516
+ severity: z.ZodEnum<{
517
+ confirmed: "confirmed";
518
+ uncertain: "uncertain";
519
+ }>;
520
+ message: z.ZodString;
521
+ }, z.core.$strict>>;
522
+ }, z.core.$strict>>;
523
+ }, z.core.$strict>>;
524
+ results: z.ZodArray<z.ZodObject<{
525
+ constraintId: z.ZodString;
526
+ status: z.ZodEnum<{
527
+ unavailable: "unavailable";
528
+ pass: "pass";
529
+ fail: "fail";
530
+ }>;
531
+ elementIds: z.ZodArray<z.ZodString>;
532
+ deviation: z.ZodNullable<z.ZodNumber>;
533
+ tolerance: z.ZodNumber;
534
+ message: z.ZodString;
535
+ }, z.core.$strict>>;
536
+ error: z.ZodOptional<z.ZodObject<{
537
+ code: z.ZodEnum<{
538
+ INVALID_INPUT: "INVALID_INPUT";
539
+ MISSING_ELEMENT: "MISSING_ELEMENT";
540
+ DUPLICATE_ELEMENT: "DUPLICATE_ELEMENT";
541
+ STALE_SNAPSHOT: "STALE_SNAPSHOT";
542
+ STALE_SOURCE: "STALE_SOURCE";
543
+ UNSUPPORTED_EDIT: "UNSUPPORTED_EDIT";
544
+ UNSUPPORTED_PROFILE: "UNSUPPORTED_PROFILE";
545
+ UNSTABLE_LAYOUT: "UNSTABLE_LAYOUT";
546
+ NATIVE_DISCONNECTED: "NATIVE_DISCONNECTED";
547
+ TIMEOUT: "TIMEOUT";
548
+ VERIFICATION_FAILED: "VERIFICATION_FAILED";
549
+ SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
550
+ TRIAL_NOT_FOUND: "TRIAL_NOT_FOUND";
551
+ SOURCE_OUTSIDE_PROJECT: "SOURCE_OUTSIDE_PROJECT";
552
+ INTERNAL_ERROR: "INTERNAL_ERROR";
553
+ RECOVERY_CONFLICT: "RECOVERY_CONFLICT";
554
+ TRANSACTION_CONFLICT: "TRANSACTION_CONFLICT";
555
+ UNSUPPORTED_ACTION: "UNSUPPORTED_ACTION";
556
+ PROTOCOL_MISMATCH: "PROTOCOL_MISMATCH";
557
+ }>;
558
+ message: z.ZodString;
559
+ details: z.ZodOptional<z.ZodUnknown>;
560
+ }, z.core.$strict>>;
561
+ }, z.core.$strict>;
562
+ export type NativeSuggestionEvidence = z.infer<typeof NativeSuggestionEvidenceSchema>;
563
+ /** Required callback interaction evidence, checked again after reload and on native. */
564
+ export declare const InteractionRequirementSchema: z.ZodObject<{
565
+ elementId: z.ZodString;
566
+ pressed: z.ZodBoolean;
567
+ }, z.core.$strict>;
568
+ export type InteractionRequirement = z.infer<typeof InteractionRequirementSchema>;
569
+ /** Bounded native-driver failure output; a failed process is never acceptance evidence. */
570
+ export declare const NativeScenarioFailureEvidenceSchema: z.ZodObject<{
571
+ driver: z.ZodLiteral<"maestro">;
572
+ message: z.ZodString;
573
+ exitCode: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>;
574
+ signal: z.ZodNullable<z.ZodString>;
575
+ terminated: z.ZodBoolean;
576
+ stdout: z.ZodString;
577
+ stderr: z.ZodString;
578
+ outputTruncated: z.ZodBoolean;
579
+ }, z.core.$strict>;
580
+ export type NativeScenarioFailureEvidence = z.infer<typeof NativeScenarioFailureEvidenceSchema>;
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ import { DeviceProfileSchema } from './geometry.js';
3
+ import { ConstraintResultSchema } from './constraints.js';
4
+ import { BridgeErrorSchema } from './source.js';
5
+ import { SpatialSnapshotSchema } from './graph.js';
6
+ import { ScenarioScriptSchema } from './workflow.js';
7
+ /** Browser trials across explicit device profiles; native acceptance remains separate. */
8
+ export const SuggestionProfileSchema = z.object({ id: z.string().min(1), profile: DeviceProfileSchema, script: ScenarioScriptSchema.optional() }).strict();
9
+ export const SuggestionProfilesSchema = z.array(SuggestionProfileSchema).min(1).max(6).refine(profiles => new Set(profiles.map(profile => profile.id)).size === profiles.length && !profiles.some(profile => profile.id === 'baseline'), 'Profile IDs must be unique; baseline is reserved');
10
+ export const SuggestionProfileEvidenceSchema = z.object({
11
+ profileId: z.string(), platform: z.literal('web'), profile: DeviceProfileSchema, scenarioState: z.enum(['baseline', 'scripted', 'initial']).optional(),
12
+ status: z.enum(['passed', 'failed', 'unsupported', 'unavailable']),
13
+ snapshotId: z.string().optional(), results: z.array(ConstraintResultSchema),
14
+ regressions: z.number().int().nonnegative(), warnings: z.number().int().nonnegative(),
15
+ error: BridgeErrorSchema.optional(),
16
+ }).strict();
17
+ /** Fresh native baseline seeds proposals only; candidates are still browser trials. */
18
+ export const NativeSuggestionEvidenceSchema = z.object({
19
+ status: z.enum(['captured', 'unsupported', 'unavailable']), snapshot: SpatialSnapshotSchema.optional(),
20
+ results: z.array(ConstraintResultSchema), error: BridgeErrorSchema.optional(),
21
+ }).strict().superRefine((value, ctx) => {
22
+ if (value.status === 'captured' && (!value.snapshot || value.snapshot.platform === 'web'))
23
+ ctx.addIssue({ code: 'custom', message: 'Captured native evidence requires a native snapshot' });
24
+ if (value.status !== 'captured' && value.snapshot)
25
+ ctx.addIssue({ code: 'custom', message: 'Unavailable native evidence cannot contain a snapshot' });
26
+ });
27
+ /** Required callback interaction evidence, checked again after reload and on native. */
28
+ export const InteractionRequirementSchema = z.object({ elementId: z.string().min(1), pressed: z.boolean() }).strict();
29
+ /** Bounded native-driver failure output; a failed process is never acceptance evidence. */
30
+ export const NativeScenarioFailureEvidenceSchema = z.object({
31
+ driver: z.literal('maestro'), message: z.string().max(2048),
32
+ exitCode: z.union([z.number().int(), z.string().min(1).max(64), z.null()]),
33
+ signal: z.string().max(64).nullable(), terminated: z.boolean(),
34
+ stdout: z.string().max(16384), stderr: z.string().max(16384), outputTruncated: z.boolean(),
35
+ }).strict();