@reticlehq/core 3.8.0 → 3.8.2

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 (97) hide show
  1. package/dist/artifacts/drive-script.d.ts +84 -1217
  2. package/dist/artifacts/drive-script.js +1 -1
  3. package/dist/artifacts/flow-expect-flat.d.ts +8 -192
  4. package/dist/artifacts/flow-expect-flat.js +2 -2
  5. package/dist/artifacts/flow-results.d.ts +15 -0
  6. package/dist/artifacts/flow-types.d.ts +202 -2331
  7. package/dist/artifacts/flow-types.js +2 -2
  8. package/dist/artifacts/harness-map.d.ts +8 -69
  9. package/dist/artifacts/harness-map.js +1 -1
  10. package/dist/artifacts/hud-notices.d.ts +8 -82
  11. package/dist/artifacts/hud-notices.js +1 -1
  12. package/dist/artifacts/impact.d.ts +80 -1638
  13. package/dist/artifacts/impact.js +4 -4
  14. package/dist/artifacts/journal.d.ts +12 -247
  15. package/dist/artifacts/journal.js +2 -2
  16. package/dist/artifacts/prompt-context.d.ts +5 -43
  17. package/dist/artifacts/prompt-context.js +1 -1
  18. package/dist/artifacts/screenshot-upload.d.ts +3 -26
  19. package/dist/artifacts/screenshot-upload.js +1 -1
  20. package/dist/hooks/hook-events.d.ts +15 -171
  21. package/dist/hooks/hook-events.js +1 -1
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +1 -0
  24. package/dist/onboarding.d.ts +8 -58
  25. package/dist/onboarding.js +1 -1
  26. package/dist/registry/daemon-registry.d.ts +2 -14
  27. package/dist/registry/daemon-registry.js +1 -1
  28. package/dist/registry/dev-server-registry.d.ts +2 -31
  29. package/dist/registry/dev-server-registry.js +1 -1
  30. package/dist/registry/project-registry.d.ts +4 -32
  31. package/dist/registry/project-registry.js +1 -1
  32. package/dist/schema/command-message.json +65 -68
  33. package/dist/schema/command-name.json +29 -33
  34. package/dist/schema/command-result.json +25 -30
  35. package/dist/schema/event-message.json +104 -103
  36. package/dist/schema/event-payloads.json +142 -119
  37. package/dist/schema/event-type.json +47 -50
  38. package/dist/schema/hello-message.json +150 -154
  39. package/dist/schema/reticle-event.json +98 -96
  40. package/dist/schema/reticle-message.json +338 -333
  41. package/dist/telemetry-bug.d.ts +4 -75
  42. package/dist/telemetry-bug.js +1 -1
  43. package/dist/telemetry-feedback.d.ts +11 -99
  44. package/dist/telemetry-feedback.js +1 -1
  45. package/dist/telemetry-refusal.d.ts +4 -31
  46. package/dist/telemetry-refusal.js +1 -1
  47. package/dist/telemetry-session.d.ts +39 -633
  48. package/dist/telemetry-session.js +10 -8
  49. package/dist/telemetry-signals.d.ts +58 -151
  50. package/dist/telemetry-signals.js +12 -1
  51. package/dist/telemetry.d.ts +137 -1814
  52. package/dist/telemetry.js +1 -1
  53. package/dist/verdict/compare-source.d.ts +1 -1
  54. package/dist/verdict/compare-source.js +1 -1
  55. package/dist/verdict/disparity.d.ts +8 -56
  56. package/dist/verdict/disparity.js +1 -1
  57. package/dist/verdict/instrumentation-coverage.d.ts +3 -3
  58. package/dist/verdict/instrumentation-coverage.js +1 -1
  59. package/dist/verdict/instrumentation-gap.d.ts +3 -10
  60. package/dist/verdict/instrumentation-gap.js +1 -1
  61. package/dist/verdict/intent.d.ts +25 -224
  62. package/dist/verdict/intent.js +1 -1
  63. package/dist/verdict/predicate.d.ts +1 -1
  64. package/dist/verdict/predicate.js +5 -5
  65. package/dist/verdict/property-assertion.d.ts +23 -101
  66. package/dist/verdict/property-assertion.js +1 -1
  67. package/dist/verdict/run-report.d.ts +13 -108
  68. package/dist/verdict/run-report.js +1 -1
  69. package/dist/verdict/security.d.ts +12 -0
  70. package/dist/verdict/security.js +94 -7
  71. package/dist/verdict/verification-run.d.ts +112 -1668
  72. package/dist/verdict/verification-run.js +4 -4
  73. package/dist/verdict/verify-progress.d.ts +22 -64
  74. package/dist/verdict/verify-progress.js +1 -1
  75. package/dist/wire/click-input.d.ts +15 -0
  76. package/dist/wire/click-input.js +42 -0
  77. package/dist/wire/constants/event-types.d.ts +2 -0
  78. package/dist/wire/constants/event-types.js +2 -0
  79. package/dist/wire/constants/response-body-reason.d.ts +4 -4
  80. package/dist/wire/constants/response-body-reason.js +4 -4
  81. package/dist/wire/constants/reticle-env.d.ts +2 -0
  82. package/dist/wire/constants/reticle-env.js +2 -0
  83. package/dist/wire/event-payloads.d.ts +108 -678
  84. package/dist/wire/event-payloads.js +24 -7
  85. package/dist/wire/event-priority.js +1 -0
  86. package/dist/wire/messages.d.ts +66 -755
  87. package/dist/wire/messages.js +3 -3
  88. package/dist/wire/next-step.d.ts +11 -51
  89. package/dist/wire/next-step.js +1 -1
  90. package/dist/wire/platform-link.js +2 -2
  91. package/dist/wire/production/production-policy.d.ts +37 -83
  92. package/dist/wire/production/production-policy.js +1 -1
  93. package/dist/wire/types.d.ts +75 -698
  94. package/dist/wire/types.js +5 -5
  95. package/dist/words/upgrade.d.ts +3 -13
  96. package/dist/words/upgrade.js +1 -1
  97. package/package.json +4 -5
@@ -9,7 +9,7 @@
9
9
  * `z.nativeEnum`, timestamps are epoch-ms NUMBERS (the clock is injected — never read inside pure
10
10
  * logic), no `any` (opaque evidence is `z.unknown`), and every domain string is a named constant.
11
11
  */
12
- import { z } from 'zod';
12
+ import * as z from 'zod';
13
13
  import { PredicateKind } from './consequence.js';
14
14
  import { Verified } from './verified-constants.js';
15
15
  /** Schema version stamped into every run file so a reader can reject/upgrade old artifacts. */
@@ -18,7 +18,7 @@ export declare const RUN_FILE_VERSION = 3;
18
18
  * A run's identity, branded so it can't be confused with another id (e.g. a flow name) that also feeds
19
19
  * path helpers. The schema brands on parse; mint a fresh one with asRunId at a trusted/validated point.
20
20
  */
21
- export declare const RunIdSchema: z.ZodBranded<z.ZodString, "RunId">;
21
+ export declare const RunIdSchema: z.core.$ZodBranded<z.ZodString, "RunId", "out">;
22
22
  export type RunId = z.infer<typeof RunIdSchema>;
23
23
  /** Mint a RunId from a raw string — call only at a validated boundary (e.g. behind isValidRunId). */
24
24
  export declare const asRunId: (value: string) => RunId;
@@ -170,25 +170,17 @@ export declare const SourceLocationSchema: z.ZodObject<{
170
170
  file: z.ZodString;
171
171
  line: z.ZodOptional<z.ZodNumber>;
172
172
  component: z.ZodOptional<z.ZodString>;
173
- }, "strip", z.ZodTypeAny, {
174
- file: string;
175
- component?: string | undefined;
176
- line?: number | undefined;
177
- }, {
178
- file: string;
179
- component?: string | undefined;
180
- line?: number | undefined;
181
- }>;
173
+ }, z.core.$strip>;
182
174
  export type SourceLocation = z.infer<typeof SourceLocationSchema>;
183
175
  /** A file the change set touched, with the risk surfaces it implicates. */
184
176
  export declare const RunChangedFileSchema: z.ZodObject<{
185
177
  path: z.ZodString;
186
- changeKind: z.ZodNativeEnum<{
178
+ changeKind: z.ZodEnum<{
187
179
  readonly ADDED: "added";
188
180
  readonly MODIFIED: "modified";
189
181
  readonly DELETED: "deleted";
190
182
  }>;
191
- risk: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<{
183
+ risk: z.ZodDefault<z.ZodArray<z.ZodEnum<{
192
184
  readonly AUTH: "auth";
193
185
  readonly PAYMENT: "payment";
194
186
  readonly DB: "db";
@@ -197,16 +189,8 @@ export declare const RunChangedFileSchema: z.ZodObject<{
197
189
  readonly SECRETS: "secrets";
198
190
  readonly DESTRUCTIVE: "destructive";
199
191
  readonly EXTERNAL: "external";
200
- }>, "many">>;
201
- }, "strip", z.ZodTypeAny, {
202
- path: string;
203
- changeKind: "added" | "modified" | "deleted";
204
- risk: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[];
205
- }, {
206
- path: string;
207
- changeKind: "added" | "modified" | "deleted";
208
- risk?: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[] | undefined;
209
- }>;
192
+ }>>>;
193
+ }, z.core.$strip>;
210
194
  export type RunChangedFile = z.infer<typeof RunChangedFileSchema>;
211
195
  /**
212
196
  * How much of a replay a synced run carries, so a teammate can replay it from the cloud without the
@@ -247,73 +231,32 @@ export declare const STEP_SCREENSHOT: {
247
231
  /** One step's screenshot as a run artifact records it. `file` is relative to the run's directory. */
248
232
  export declare const StepScreenshotSchema: z.ZodObject<{
249
233
  file: z.ZodString;
250
- source: z.ZodNativeEnum<{
234
+ source: z.ZodEnum<{
251
235
  readonly BROWSER: "browser";
252
236
  readonly RENDERED: "rendered";
253
237
  }>;
254
238
  width: z.ZodNumber;
255
239
  height: z.ZodNumber;
256
240
  sha256: z.ZodString;
257
- }, "strip", z.ZodTypeAny, {
258
- file: string;
259
- source: "browser" | "rendered";
260
- width: number;
261
- height: number;
262
- sha256: string;
263
- }, {
264
- file: string;
265
- source: "browser" | "rendered";
266
- width: number;
267
- height: number;
268
- sha256: string;
269
- }>;
241
+ }, z.core.$strip>;
270
242
  export type StepScreenshot = z.infer<typeof StepScreenshotSchema>;
271
243
  /** Every screenshot a run took, in order — including the actions that produced no verdict. */
272
244
  export declare const RunScreenshotSchema: z.ZodObject<{
273
245
  file: z.ZodString;
274
- source: z.ZodNativeEnum<{
246
+ source: z.ZodEnum<{
275
247
  readonly BROWSER: "browser";
276
248
  readonly RENDERED: "rendered";
277
249
  }>;
278
250
  width: z.ZodNumber;
279
251
  height: z.ZodNumber;
280
252
  sha256: z.ZodString;
281
- } & {
282
253
  seq: z.ZodNumber;
283
254
  tool: z.ZodString;
284
- /** The flow step it belongs to, as `<flow>#<step>`, when it was taken during a replay. */
285
255
  step: z.ZodOptional<z.ZodString>;
286
- /** Taken for a call that produced a verdict — what lets the run pair it with its check. */
287
256
  verdict: z.ZodOptional<z.ZodBoolean>;
288
- /** The check this picture is of (see `RunCheck.checkId`), when it could be paired with one. */
289
257
  checkId: z.ZodOptional<z.ZodString>;
290
- /** The journal action it was taken for: how a run pairs it with its check (`RunCheck.actionId`). */
291
258
  actionId: z.ZodOptional<z.ZodString>;
292
- }, "strip", z.ZodTypeAny, {
293
- file: string;
294
- source: "browser" | "rendered";
295
- width: number;
296
- height: number;
297
- sha256: string;
298
- seq: number;
299
- tool: string;
300
- step?: string | undefined;
301
- verdict?: boolean | undefined;
302
- checkId?: string | undefined;
303
- actionId?: string | undefined;
304
- }, {
305
- file: string;
306
- source: "browser" | "rendered";
307
- width: number;
308
- height: number;
309
- sha256: string;
310
- seq: number;
311
- tool: string;
312
- step?: string | undefined;
313
- verdict?: boolean | undefined;
314
- checkId?: string | undefined;
315
- actionId?: string | undefined;
316
- }>;
259
+ }, z.core.$strip>;
317
260
  export type RunScreenshot = z.infer<typeof RunScreenshotSchema>;
318
261
  /** One step of a replayed flow, as synced: its outcome and the pages it ran on and led to. */
319
262
  export declare const RunStepResultSchema: z.ZodObject<{
@@ -324,64 +267,18 @@ export declare const RunStepResultSchema: z.ZodObject<{
324
267
  endPage: z.ZodOptional<z.ZodString>;
325
268
  consequence: z.ZodOptional<z.ZodString>;
326
269
  error: z.ZodOptional<z.ZodString>;
327
- /** The drift's reason kind, when the step drifted. */
328
270
  drift: z.ZodOptional<z.ZodString>;
329
- /** What the page looked like when this step's outcome was decided. */
330
271
  screenshot: z.ZodOptional<z.ZodObject<{
331
272
  file: z.ZodString;
332
- source: z.ZodNativeEnum<{
273
+ source: z.ZodEnum<{
333
274
  readonly BROWSER: "browser";
334
275
  readonly RENDERED: "rendered";
335
276
  }>;
336
277
  width: z.ZodNumber;
337
278
  height: z.ZodNumber;
338
279
  sha256: z.ZodString;
339
- }, "strip", z.ZodTypeAny, {
340
- file: string;
341
- source: "browser" | "rendered";
342
- width: number;
343
- height: number;
344
- sha256: string;
345
- }, {
346
- file: string;
347
- source: "browser" | "rendered";
348
- width: number;
349
- height: number;
350
- sha256: string;
351
- }>>;
352
- }, "strip", z.ZodTypeAny, {
353
- anchor: string;
354
- ok: boolean;
355
- step: number;
356
- drift?: string | undefined;
357
- error?: string | undefined;
358
- page?: string | undefined;
359
- endPage?: string | undefined;
360
- consequence?: string | undefined;
361
- screenshot?: {
362
- file: string;
363
- source: "browser" | "rendered";
364
- width: number;
365
- height: number;
366
- sha256: string;
367
- } | undefined;
368
- }, {
369
- anchor: string;
370
- ok: boolean;
371
- step: number;
372
- drift?: string | undefined;
373
- error?: string | undefined;
374
- page?: string | undefined;
375
- endPage?: string | undefined;
376
- consequence?: string | undefined;
377
- screenshot?: {
378
- file: string;
379
- source: "browser" | "rendered";
380
- width: number;
381
- height: number;
382
- sha256: string;
383
- } | undefined;
384
- }>;
280
+ }, z.core.$strip>>;
281
+ }, z.core.$strip>;
385
282
  export type RunStepResult = z.infer<typeof RunStepResultSchema>;
386
283
  /**
387
284
  * The flow a run replayed, as recorded: enough to replay it again somewhere else.
@@ -391,20 +288,13 @@ export type RunStepResult = z.infer<typeof RunStepResultSchema>;
391
288
  */
392
289
  export declare const RunFlowRecordingSchema: z.ZodObject<{
393
290
  startPath: z.ZodOptional<z.ZodString>;
394
- steps: z.ZodArray<z.ZodUnknown, "many">;
395
- }, "strip", z.ZodTypeAny, {
396
- steps: unknown[];
397
- startPath?: string | undefined;
398
- }, {
399
- steps: unknown[];
400
- startPath?: string | undefined;
401
- }>;
291
+ steps: z.ZodArray<z.ZodUnknown>;
292
+ }, z.core.$strip>;
402
293
  /** A flow that was replayed as part of the run. */
403
294
  export declare const RunFlowResultSchema: z.ZodObject<{
404
295
  name: z.ZodString;
405
- /** The saved flow this replayed copy was generated from — see the flow file's `template`. */
406
296
  template: z.ZodOptional<z.ZodString>;
407
- status: z.ZodNativeEnum<{
297
+ status: z.ZodEnum<{
408
298
  readonly PASS: "pass";
409
299
  readonly FAIL: "fail";
410
300
  readonly SKIPPED: "skipped";
@@ -417,18 +307,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
417
307
  from: z.ZodString;
418
308
  to: z.ZodString;
419
309
  consequenceVerified: z.ZodBoolean;
420
- }, "strip", z.ZodTypeAny, {
421
- from: string;
422
- to: string;
423
- consequenceVerified: boolean;
424
- }, {
425
- from: string;
426
- to: string;
427
- consequenceVerified: boolean;
428
- }>>;
310
+ }, z.core.$strip>>;
429
311
  evidenceRef: z.ZodOptional<z.ZodString>;
430
312
  failureReason: z.ZodOptional<z.ZodString>;
431
- /** Each step's result and page — see RUN_STEP_RESULTS_MAX. */
432
313
  stepResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
433
314
  step: z.ZodNumber;
434
315
  anchor: z.ZodString;
@@ -437,161 +318,28 @@ export declare const RunFlowResultSchema: z.ZodObject<{
437
318
  endPage: z.ZodOptional<z.ZodString>;
438
319
  consequence: z.ZodOptional<z.ZodString>;
439
320
  error: z.ZodOptional<z.ZodString>;
440
- /** The drift's reason kind, when the step drifted. */
441
321
  drift: z.ZodOptional<z.ZodString>;
442
- /** What the page looked like when this step's outcome was decided. */
443
322
  screenshot: z.ZodOptional<z.ZodObject<{
444
323
  file: z.ZodString;
445
- source: z.ZodNativeEnum<{
324
+ source: z.ZodEnum<{
446
325
  readonly BROWSER: "browser";
447
326
  readonly RENDERED: "rendered";
448
327
  }>;
449
328
  width: z.ZodNumber;
450
329
  height: z.ZodNumber;
451
330
  sha256: z.ZodString;
452
- }, "strip", z.ZodTypeAny, {
453
- file: string;
454
- source: "browser" | "rendered";
455
- width: number;
456
- height: number;
457
- sha256: string;
458
- }, {
459
- file: string;
460
- source: "browser" | "rendered";
461
- width: number;
462
- height: number;
463
- sha256: string;
464
- }>>;
465
- }, "strip", z.ZodTypeAny, {
466
- anchor: string;
467
- ok: boolean;
468
- step: number;
469
- drift?: string | undefined;
470
- error?: string | undefined;
471
- page?: string | undefined;
472
- endPage?: string | undefined;
473
- consequence?: string | undefined;
474
- screenshot?: {
475
- file: string;
476
- source: "browser" | "rendered";
477
- width: number;
478
- height: number;
479
- sha256: string;
480
- } | undefined;
481
- }, {
482
- anchor: string;
483
- ok: boolean;
484
- step: number;
485
- drift?: string | undefined;
486
- error?: string | undefined;
487
- page?: string | undefined;
488
- endPage?: string | undefined;
489
- consequence?: string | undefined;
490
- screenshot?: {
491
- file: string;
492
- source: "browser" | "rendered";
493
- width: number;
494
- height: number;
495
- sha256: string;
496
- } | undefined;
497
- }>, "many">>;
498
- /** The flow as recorded, when it fits in RUN_RECORDING_MAX_BYTES. */
331
+ }, z.core.$strip>>;
332
+ }, z.core.$strip>>>;
499
333
  recording: z.ZodOptional<z.ZodObject<{
500
334
  startPath: z.ZodOptional<z.ZodString>;
501
- steps: z.ZodArray<z.ZodUnknown, "many">;
502
- }, "strip", z.ZodTypeAny, {
503
- steps: unknown[];
504
- startPath?: string | undefined;
505
- }, {
506
- steps: unknown[];
507
- startPath?: string | undefined;
508
- }>>;
509
- /** True when the recording was too large to carry. */
335
+ steps: z.ZodArray<z.ZodUnknown>;
336
+ }, z.core.$strip>>;
510
337
  recordingOmitted: z.ZodOptional<z.ZodBoolean>;
511
- }, "strip", z.ZodTypeAny, {
512
- name: string;
513
- status: "pass" | "fail" | "healed" | "skipped";
514
- steps: number;
515
- durationMs: number;
516
- recording?: {
517
- steps: unknown[];
518
- startPath?: string | undefined;
519
- } | undefined;
520
- healed?: {
521
- from: string;
522
- to: string;
523
- consequenceVerified: boolean;
524
- } | undefined;
525
- template?: string | undefined;
526
- oracle?: string | undefined;
527
- evidenceRef?: string | undefined;
528
- failureReason?: string | undefined;
529
- stepResults?: {
530
- anchor: string;
531
- ok: boolean;
532
- step: number;
533
- drift?: string | undefined;
534
- error?: string | undefined;
535
- page?: string | undefined;
536
- endPage?: string | undefined;
537
- consequence?: string | undefined;
538
- screenshot?: {
539
- file: string;
540
- source: "browser" | "rendered";
541
- width: number;
542
- height: number;
543
- sha256: string;
544
- } | undefined;
545
- }[] | undefined;
546
- recordingOmitted?: boolean | undefined;
547
- }, {
548
- name: string;
549
- status: "pass" | "fail" | "healed" | "skipped";
550
- steps: number;
551
- durationMs: number;
552
- recording?: {
553
- steps: unknown[];
554
- startPath?: string | undefined;
555
- } | undefined;
556
- healed?: {
557
- from: string;
558
- to: string;
559
- consequenceVerified: boolean;
560
- } | undefined;
561
- template?: string | undefined;
562
- oracle?: string | undefined;
563
- evidenceRef?: string | undefined;
564
- failureReason?: string | undefined;
565
- stepResults?: {
566
- anchor: string;
567
- ok: boolean;
568
- step: number;
569
- drift?: string | undefined;
570
- error?: string | undefined;
571
- page?: string | undefined;
572
- endPage?: string | undefined;
573
- consequence?: string | undefined;
574
- screenshot?: {
575
- file: string;
576
- source: "browser" | "rendered";
577
- width: number;
578
- height: number;
579
- sha256: string;
580
- } | undefined;
581
- }[] | undefined;
582
- recordingOmitted?: boolean | undefined;
583
- }>;
338
+ }, z.core.$strip>;
584
339
  export type RunFlowResult = z.infer<typeof RunFlowResultSchema>;
585
340
  /** A standalone assertion not tied to a flow. `evidence` is opaque (narrowed per kind by the caller). */
586
341
  export declare const RunCheckSchema: z.ZodObject<{
587
- /**
588
- * Which source of truth answering this claim required.
589
- *
590
- * Optional, because a check folded from a journal written before the kind was recorded has none,
591
- * and the only alternatives are refusing the whole run or filling in a kind nobody observed. An
592
- * absent field says nobody wrote it down; a present one is what the predicate actually read.
593
- */
594
- kind: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<{
342
+ kind: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
595
343
  readonly ELEMENT: "element";
596
344
  readonly TEXT: "text";
597
345
  readonly SIGNAL: "signal";
@@ -605,151 +353,42 @@ export declare const RunCheckSchema: z.ZodObject<{
605
353
  readonly ALL_OF: "allOf";
606
354
  readonly ANY_OF: "anyOf";
607
355
  readonly NOT: "not";
608
- }>>, "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined, unknown>;
356
+ }>>, unknown>;
609
357
  predicate: z.ZodString;
610
- status: z.ZodEffects<z.ZodNativeEnum<{
358
+ status: z.ZodPreprocess<z.ZodEnum<{
611
359
  readonly YES: "yes";
612
360
  readonly NO: "no";
613
361
  readonly UNKNOWN: "unknown";
614
362
  readonly NO_FAULT: "no-fault";
615
- }>, "yes" | "no" | "unknown" | "no-fault", unknown>;
363
+ }>, unknown>;
616
364
  evidence: z.ZodOptional<z.ZodUnknown>;
617
- /**
618
- * Was this claim written down BEFORE the action, or after it?
619
- *
620
- * The difference between a check and a rationalisation. Afterwards, anything that happened can be
621
- * described as what you meant; a claim made in advance can only be met or missed.
622
- *
623
- * Optional, and absence is not `false`. `false` says the claim came afterwards. Absent says nobody
624
- * recorded which, and those are different facts about the evidence.
625
- */
626
365
  declaredBeforeActing: z.ZodOptional<z.ZodBoolean>;
627
- /**
628
- * What the check required and what it saw, in the engine's words, when it said — "an element
629
- * matching {"testid":"pay"} in state 'enabled'" and "present, visible, disabled". Without them an
630
- * issue a CI run found had no Expected or Actual to show. Optional: older runs carry neither.
631
- */
632
366
  expected: z.ZodOptional<z.ZodString>;
633
367
  observed: z.ZodOptional<z.ZodString>;
634
- /**
635
- * What kind of evidence bought this answer.
636
- *
637
- * A green paid for with "something matching was on screen" is not the same green as one paid for
638
- * with "the request went out", and a report that flattens them lets the cheap one pass for the
639
- * dear one. Free-form because the grades belong to whoever produced the verdict.
640
- */
641
368
  grade: z.ZodOptional<z.ZodString>;
642
- /**
643
- * What could not be seen while this was being checked.
644
- *
645
- * The property with no prior art: every other test report in existence is silent about its own
646
- * blind spots. An empty list means nothing was hidden; absence means nobody looked.
647
- */
648
- couldNotSee: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
649
- /**
650
- * Why the verdict came out this way, in the engine's vocabulary.
651
- *
652
- * Carried so a reader -- and the fold that looks for late answers -- can tell an outcome that
653
- * has not arrived from a capture that could not be read. Both are `unknown`, and only the
654
- * first is a question that waiting can settle.
655
- */
369
+ couldNotSee: z.ZodOptional<z.ZodArray<z.ZodString>>;
656
370
  reason: z.ZodOptional<z.ZodString>;
657
- /** This check's own name, so a later verdict can cite it. See revision.ts. */
658
371
  checkId: z.ZodOptional<z.ZodString>;
659
- /** The journal action that produced it, kept on this machine to pair it with its screenshot. */
660
372
  actionId: z.ZodOptional<z.ZodString>;
661
- /**
662
- * What this check proves: the agent's `intent` (a sentence, or the id of a declared intent), else a
663
- * sentence the engine built from the predicate in the failure voice — see `intentDerived`.
664
- */
665
373
  intent: z.ZodOptional<z.ZodString>;
666
- /** True when `intent` was built from the predicate, not given by the agent. */
667
374
  intentDerived: z.ZodOptional<z.ZodBoolean>;
668
- /** The index of the `allOf` part that failed, so a title can name the one thing that did not happen. */
669
375
  failedPart: z.ZodOptional<z.ZodNumber>;
670
- /** What the page looked like when this check was decided. */
671
376
  screenshot: z.ZodOptional<z.ZodObject<{
672
377
  file: z.ZodString;
673
- source: z.ZodNativeEnum<{
378
+ source: z.ZodEnum<{
674
379
  readonly BROWSER: "browser";
675
380
  readonly RENDERED: "rendered";
676
381
  }>;
677
382
  width: z.ZodNumber;
678
383
  height: z.ZodNumber;
679
384
  sha256: z.ZodString;
680
- }, "strip", z.ZodTypeAny, {
681
- file: string;
682
- source: "browser" | "rendered";
683
- width: number;
684
- height: number;
685
- sha256: string;
686
- }, {
687
- file: string;
688
- source: "browser" | "rendered";
689
- width: number;
690
- height: number;
691
- sha256: string;
692
- }>>;
693
- /**
694
- * The earlier check this one corrects, as `<runId>#<checkId>`.
695
- *
696
- * Present only on a correction, and the check it names is NOT edited: both stand, so a reader
697
- * can see that the first answer was given, when it changed, and why.
698
- */
385
+ }, z.core.$strip>>;
699
386
  supersedes: z.ZodOptional<z.ZodString>;
700
- }, "strip", z.ZodTypeAny, {
701
- status: "yes" | "no" | "unknown" | "no-fault";
702
- predicate: string;
703
- reason?: string | undefined;
704
- kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
705
- intent?: string | undefined;
706
- expected?: string | undefined;
707
- checkId?: string | undefined;
708
- actionId?: string | undefined;
709
- screenshot?: {
710
- file: string;
711
- source: "browser" | "rendered";
712
- width: number;
713
- height: number;
714
- sha256: string;
715
- } | undefined;
716
- evidence?: unknown;
717
- declaredBeforeActing?: boolean | undefined;
718
- observed?: string | undefined;
719
- grade?: string | undefined;
720
- couldNotSee?: string[] | undefined;
721
- intentDerived?: boolean | undefined;
722
- failedPart?: number | undefined;
723
- supersedes?: string | undefined;
724
- }, {
725
- predicate: string;
726
- reason?: string | undefined;
727
- kind?: unknown;
728
- intent?: string | undefined;
729
- status?: unknown;
730
- expected?: string | undefined;
731
- checkId?: string | undefined;
732
- actionId?: string | undefined;
733
- screenshot?: {
734
- file: string;
735
- source: "browser" | "rendered";
736
- width: number;
737
- height: number;
738
- sha256: string;
739
- } | undefined;
740
- evidence?: unknown;
741
- declaredBeforeActing?: boolean | undefined;
742
- observed?: string | undefined;
743
- grade?: string | undefined;
744
- couldNotSee?: string[] | undefined;
745
- intentDerived?: boolean | undefined;
746
- failedPart?: number | undefined;
747
- supersedes?: string | undefined;
748
- }>;
387
+ }, z.core.$strip>;
749
388
  export type RunCheck = z.infer<typeof RunCheckSchema>;
750
389
  /** A flagged risk. `gated` = a policy gate tripped on this surface. */
751
390
  export declare const RunRiskSchema: z.ZodObject<{
752
- surface: z.ZodNativeEnum<{
391
+ surface: z.ZodEnum<{
753
392
  readonly AUTH: "auth";
754
393
  readonly PAYMENT: "payment";
755
394
  readonly DB: "db";
@@ -759,7 +398,7 @@ export declare const RunRiskSchema: z.ZodObject<{
759
398
  readonly DESTRUCTIVE: "destructive";
760
399
  readonly EXTERNAL: "external";
761
400
  }>;
762
- severity: z.ZodNativeEnum<{
401
+ severity: z.ZodEnum<{
763
402
  readonly LOW: "low";
764
403
  readonly MEDIUM: "medium";
765
404
  readonly HIGH: "high";
@@ -770,37 +409,9 @@ export declare const RunRiskSchema: z.ZodObject<{
770
409
  file: z.ZodOptional<z.ZodString>;
771
410
  line: z.ZodOptional<z.ZodNumber>;
772
411
  network: z.ZodOptional<z.ZodString>;
773
- }, "strip", z.ZodTypeAny, {
774
- network?: string | undefined;
775
- file?: string | undefined;
776
- line?: number | undefined;
777
- }, {
778
- network?: string | undefined;
779
- file?: string | undefined;
780
- line?: number | undefined;
781
- }>>;
412
+ }, z.core.$strip>>;
782
413
  gated: z.ZodDefault<z.ZodBoolean>;
783
- }, "strip", z.ZodTypeAny, {
784
- surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
785
- severity: "low" | "medium" | "high" | "critical";
786
- detail: string;
787
- gated: boolean;
788
- evidence?: {
789
- network?: string | undefined;
790
- file?: string | undefined;
791
- line?: number | undefined;
792
- } | undefined;
793
- }, {
794
- surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
795
- severity: "low" | "medium" | "high" | "critical";
796
- detail: string;
797
- evidence?: {
798
- network?: string | undefined;
799
- file?: string | undefined;
800
- line?: number | undefined;
801
- } | undefined;
802
- gated?: boolean | undefined;
803
- }>;
414
+ }, z.core.$strip>;
804
415
  export type RunRisk = z.infer<typeof RunRiskSchema>;
805
416
  /** The cross-layer evidence behind the verdict. Raw bodies / full state appear only under DEV profile. */
806
417
  export declare const VerificationEvidenceSchema: z.ZodObject<{
@@ -808,112 +419,26 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
808
419
  level: z.ZodString;
809
420
  message: z.ZodString;
810
421
  at: z.ZodNumber;
811
- }, "strip", z.ZodTypeAny, {
812
- at: number;
813
- message: string;
814
- level: string;
815
- }, {
816
- at: number;
817
- message: string;
818
- level: string;
819
- }>, "many">>;
422
+ }, z.core.$strip>>>;
820
423
  networkAnomalies: z.ZodDefault<z.ZodArray<z.ZodObject<{
821
424
  method: z.ZodString;
822
425
  url: z.ZodString;
823
426
  status: z.ZodOptional<z.ZodNumber>;
824
427
  issue: z.ZodString;
825
- }, "strip", z.ZodTypeAny, {
826
- method: string;
827
- url: string;
828
- issue: string;
829
- status?: number | undefined;
830
- }, {
831
- method: string;
832
- url: string;
833
- issue: string;
834
- status?: number | undefined;
835
- }>, "many">>;
428
+ }, z.core.$strip>>>;
836
429
  stateAssertions: z.ZodDefault<z.ZodArray<z.ZodObject<{
837
430
  store: z.ZodString;
838
431
  path: z.ZodString;
839
- expected: z.ZodUnknown;
840
- actual: z.ZodUnknown;
432
+ expected: z.ZodOptional<z.ZodUnknown>;
433
+ actual: z.ZodOptional<z.ZodUnknown>;
841
434
  ok: z.ZodBoolean;
842
- }, "strip", z.ZodTypeAny, {
843
- ok: boolean;
844
- path: string;
845
- store: string;
846
- expected?: unknown;
847
- actual?: unknown;
848
- }, {
849
- ok: boolean;
850
- path: string;
851
- store: string;
852
- expected?: unknown;
853
- actual?: unknown;
854
- }>, "many">>;
435
+ }, z.core.$strip>>>;
855
436
  timeline: z.ZodDefault<z.ZodArray<z.ZodObject<{
856
437
  at: z.ZodNumber;
857
438
  kind: z.ZodString;
858
439
  summary: z.ZodString;
859
- }, "strip", z.ZodTypeAny, {
860
- at: number;
861
- kind: string;
862
- summary: string;
863
- }, {
864
- at: number;
865
- kind: string;
866
- summary: string;
867
- }>, "many">>;
868
- }, "strip", z.ZodTypeAny, {
869
- consoleErrors: {
870
- at: number;
871
- message: string;
872
- level: string;
873
- }[];
874
- networkAnomalies: {
875
- method: string;
876
- url: string;
877
- issue: string;
878
- status?: number | undefined;
879
- }[];
880
- stateAssertions: {
881
- ok: boolean;
882
- path: string;
883
- store: string;
884
- expected?: unknown;
885
- actual?: unknown;
886
- }[];
887
- timeline: {
888
- at: number;
889
- kind: string;
890
- summary: string;
891
- }[];
892
- }, {
893
- consoleErrors?: {
894
- at: number;
895
- message: string;
896
- level: string;
897
- }[] | undefined;
898
- networkAnomalies?: {
899
- method: string;
900
- url: string;
901
- issue: string;
902
- status?: number | undefined;
903
- }[] | undefined;
904
- stateAssertions?: {
905
- ok: boolean;
906
- path: string;
907
- store: string;
908
- expected?: unknown;
909
- actual?: unknown;
910
- }[] | undefined;
911
- timeline?: {
912
- at: number;
913
- kind: string;
914
- summary: string;
915
- }[] | undefined;
916
- }>;
440
+ }, z.core.$strip>>>;
441
+ }, z.core.$strip>;
917
442
  /** One paste-ready fix instruction for the host's coding agent. */
918
443
  export declare const RepairPacketSchema: z.ZodObject<{
919
444
  flow: z.ZodOptional<z.ZodString>;
@@ -924,43 +449,13 @@ export declare const RepairPacketSchema: z.ZodObject<{
924
449
  file: z.ZodString;
925
450
  line: z.ZodOptional<z.ZodNumber>;
926
451
  component: z.ZodOptional<z.ZodString>;
927
- }, "strip", z.ZodTypeAny, {
928
- file: string;
929
- component?: string | undefined;
930
- line?: number | undefined;
931
- }, {
932
- file: string;
933
- component?: string | undefined;
934
- line?: number | undefined;
935
- }>>;
452
+ }, z.core.$strip>>;
936
453
  suggestedPrompt: z.ZodString;
937
- }, "strip", z.ZodTypeAny, {
938
- expected: string;
939
- actual: string;
940
- suggestedPrompt: string;
941
- step?: number | undefined;
942
- flow?: string | undefined;
943
- sourceLocation?: {
944
- file: string;
945
- component?: string | undefined;
946
- line?: number | undefined;
947
- } | undefined;
948
- }, {
949
- expected: string;
950
- actual: string;
951
- suggestedPrompt: string;
952
- step?: number | undefined;
953
- flow?: string | undefined;
954
- sourceLocation?: {
955
- file: string;
956
- component?: string | undefined;
957
- line?: number | undefined;
958
- } | undefined;
959
- }>;
454
+ }, z.core.$strip>;
960
455
  export type RepairPacket = z.infer<typeof RepairPacketSchema>;
961
456
  /** The verdict block — what a deploy gate reads. */
962
457
  export declare const RunVerdictSchema: z.ZodObject<{
963
- status: z.ZodNativeEnum<{
458
+ status: z.ZodEnum<{
964
459
  readonly PASS: "pass";
965
460
  readonly FAIL: "fail";
966
461
  readonly PARTIAL: "partial";
@@ -975,140 +470,67 @@ export declare const RunVerdictSchema: z.ZodObject<{
975
470
  */
976
471
  readonly UNKNOWN: "unknown";
977
472
  }>;
978
- reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
979
- confidence: z.ZodNativeEnum<{
473
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
474
+ confidence: z.ZodEnum<{
980
475
  readonly HIGH: "high";
981
476
  readonly MEDIUM: "medium";
982
477
  readonly LOW: "low";
983
478
  }>;
984
479
  blockingRisks: z.ZodDefault<z.ZodNumber>;
985
- /**
986
- * Which check this verdict is about, so a later one can say it corrects this.
987
- *
988
- * Optional because a run's overall verdict is not about one check. A verdict with no check named
989
- * cannot be cited, and therefore cannot be corrected -- see revision.ts.
990
- */
991
480
  checkId: z.ZodOptional<z.ZodString>;
992
- /**
993
- * The verdict this one replaces, written as `<runId>#<checkId>`.
994
- *
995
- * Present only on a correction. The verdict it names is NOT edited: it stays exactly as it was
996
- * given, and this is a second, later answer that cites it. Rewriting the first in place would
997
- * erase the fact that it was ever given, and "we always knew" is the shape of the problem this
998
- * whole system exists to prevent.
999
- */
1000
481
  supersedes: z.ZodOptional<z.ZodString>;
1001
- }, "strip", z.ZodTypeAny, {
1002
- status: "pass" | "fail" | "unknown" | "partial";
1003
- reasons: string[];
1004
- confidence: "low" | "medium" | "high";
1005
- blockingRisks: number;
1006
- checkId?: string | undefined;
1007
- supersedes?: string | undefined;
1008
- }, {
1009
- status: "pass" | "fail" | "unknown" | "partial";
1010
- confidence: "low" | "medium" | "high";
1011
- checkId?: string | undefined;
1012
- supersedes?: string | undefined;
1013
- reasons?: string[] | undefined;
1014
- blockingRisks?: number | undefined;
1015
- }>;
482
+ }, z.core.$strip>;
1016
483
  export type RunVerdict = z.infer<typeof RunVerdictSchema>;
1017
484
  /** Optional tamper-evidence signature over the run (for audit; populated later). */
1018
485
  export declare const RunSignatureSchema: z.ZodObject<{
1019
486
  alg: z.ZodString;
1020
487
  value: z.ZodString;
1021
488
  signedAt: z.ZodNumber;
1022
- }, "strip", z.ZodTypeAny, {
1023
- value: string;
1024
- alg: string;
1025
- signedAt: number;
1026
- }, {
1027
- value: string;
1028
- alg: string;
1029
- signedAt: number;
1030
- }>;
489
+ }, z.core.$strip>;
1031
490
  /**
1032
491
  * The top-level verification-run artifact. Stable contract — additive changes only within a
1033
492
  * RUN_FILE_VERSION; a breaking change bumps it. Arrays default to empty so a minimal run (e.g. a
1034
493
  * single smoke flow) still validates. Version 1 files are still read; see the note on the constant.
1035
494
  */
1036
495
  export declare const ReticleVerificationRunSchema: z.ZodObject<{
1037
- schemaVersion: z.ZodUnion<[z.ZodLiteral<3>, z.ZodLiteral<2>, z.ZodLiteral<1>]>;
1038
- runId: z.ZodBranded<z.ZodString, "RunId">;
496
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<2>, z.ZodLiteral<1>]>;
497
+ runId: z.core.$ZodBranded<z.ZodString, "RunId", "out">;
1039
498
  createdAt: z.ZodNumber;
1040
499
  durationMs: z.ZodNumber;
1041
- profile: z.ZodNativeEnum<{
500
+ profile: z.ZodEnum<{
1042
501
  readonly DEV: "dev";
1043
502
  readonly PROD_PREVIEW: "prod-preview";
1044
503
  }>;
1045
504
  project: z.ZodObject<{
1046
505
  name: z.ZodString;
1047
- framework: z.ZodNativeEnum<{
506
+ framework: z.ZodEnum<{
1048
507
  readonly REACT: "react";
1049
508
  readonly NEXT: "next";
1050
509
  readonly VITE: "vite";
1051
510
  readonly OTHER: "other";
1052
511
  }>;
1053
512
  commit: z.ZodOptional<z.ZodString>;
1054
- /**
1055
- * The git branch of the checkout that served the page. Several agents can drive one project at
1056
- * once, each in its own worktree; the branch tells their runs apart. Optional and additive: an
1057
- * older reader strips it and keeps the run.
1058
- */
1059
513
  branch: z.ZodOptional<z.ZodString>;
1060
- env: z.ZodOptional<z.ZodNativeEnum<{
514
+ env: z.ZodOptional<z.ZodEnum<{
1061
515
  readonly PREVIEW: "preview";
1062
516
  readonly CI: "ci";
1063
517
  readonly LOCAL: "local";
1064
518
  }>>;
1065
519
  previewUrl: z.ZodOptional<z.ZodString>;
1066
- }, "strip", z.ZodTypeAny, {
1067
- name: string;
1068
- framework: "other" | "react" | "next" | "vite";
1069
- commit?: string | undefined;
1070
- branch?: string | undefined;
1071
- env?: "ci" | "preview" | "local" | undefined;
1072
- previewUrl?: string | undefined;
1073
- }, {
1074
- name: string;
1075
- framework: "other" | "react" | "next" | "vite";
1076
- commit?: string | undefined;
1077
- branch?: string | undefined;
1078
- env?: "ci" | "preview" | "local" | undefined;
1079
- previewUrl?: string | undefined;
1080
- }>;
520
+ }, z.core.$strip>;
1081
521
  agent: z.ZodObject<{
1082
522
  id: z.ZodString;
1083
- kind: z.ZodNativeEnum<{
523
+ kind: z.ZodEnum<{
1084
524
  readonly CODING_AGENT: "coding-agent";
1085
525
  readonly OEM_PIPELINE: "oem-pipeline";
1086
526
  readonly HUMAN: "human";
1087
527
  }>;
1088
528
  model: z.ZodOptional<z.ZodString>;
1089
- }, "strip", z.ZodTypeAny, {
1090
- kind: "coding-agent" | "oem-pipeline" | "human";
1091
- id: string;
1092
- model?: string | undefined;
1093
- }, {
1094
- kind: "coding-agent" | "oem-pipeline" | "human";
1095
- id: string;
1096
- model?: string | undefined;
1097
- }>;
1098
- /**
1099
- * The episode that produced this run: `.reticle/episodes/<episodeId>.jsonl` on the machine that
1100
- * ran it. Joins the run to every tool call the agent made, exactly. Absent when no episode was
1101
- * written (the journal off, a CI run with no agent).
1102
- */
529
+ }, z.core.$strip>;
1103
530
  episodeId: z.ZodOptional<z.ZodString>;
1104
- /**
1105
- * The coding agent's own session id, as its MCP server announced it (Claude Code's
1106
- * `CLAUDE_CODE_SESSION_ID`, the `session_id` its hooks receive). Joins the run to the agent
1107
- * hooks' `agent-<session>.jsonl` exactly, even with two sessions of one agent in a project.
1108
- */
1109
531
  agentSession: z.ZodOptional<z.ZodString>;
1110
532
  trigger: z.ZodObject<{
1111
- kind: z.ZodNativeEnum<{
533
+ kind: z.ZodEnum<{
1112
534
  readonly EDIT: "edit";
1113
535
  readonly CI: "ci";
1114
536
  readonly MANUAL: "manual";
@@ -1116,39 +538,10 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1116
538
  }>;
1117
539
  diffRef: z.ZodOptional<z.ZodString>;
1118
540
  note: z.ZodOptional<z.ZodString>;
1119
- }, "strip", z.ZodTypeAny, {
1120
- kind: "manual" | "edit" | "ci" | "oem";
1121
- diffRef?: string | undefined;
1122
- note?: string | undefined;
1123
- }, {
1124
- kind: "manual" | "edit" | "ci" | "oem";
1125
- diffRef?: string | undefined;
1126
- note?: string | undefined;
1127
- }>;
1128
- /**
1129
- * Which round of source edits this evidence belongs to.
1130
- *
1131
- * Evidence gathered before the change under test is true about the OLD code. Reporting it as true
1132
- * about the new code is a false pass, and it is the kind nobody notices because everything looks
1133
- * green. Absent when the run had no way to know.
1134
- */
541
+ }, z.core.$strip>;
1135
542
  editEpoch: z.ZodOptional<z.ZodNumber>;
1136
- /**
1137
- * What was verified, in the protocol's own vocabulary.
1138
- *
1139
- * The artifact recorded the project, the agent, the trigger and the edit round, and never what
1140
- * KIND of thing was on the other end -- so a run against a Tauri desktop app and one against a
1141
- * web page were indistinguishable to every reader of this file. `surface` is the field that
1142
- * separates them, and `instance` is the one that says which document the evidence belongs to,
1143
- * which is the difference between evidence about this page and evidence that survived a
1144
- * navigation.
1145
- *
1146
- * `SubjectRef` is the specification's, imported rather than restated. Optional because a run
1147
- * assembled without a live session -- in CI, from flows alone -- genuinely does not know, and
1148
- * an invented subject is worse than an absent one.
1149
- */
1150
543
  subject: z.ZodOptional<z.ZodObject<{
1151
- surface: z.ZodUnion<[z.ZodNativeEnum<{
544
+ surface: z.ZodUnion<readonly [z.ZodEnum<{
1152
545
  readonly WEB: "web";
1153
546
  readonly DESKTOP: "desktop";
1154
547
  readonly MOBILE: "mobile";
@@ -1160,33 +553,16 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1160
553
  epoch: z.ZodOptional<z.ZodNumber>;
1161
554
  locator: z.ZodOptional<z.ZodString>;
1162
555
  revision: z.ZodOptional<z.ZodString>;
1163
- }, "strip", z.ZodTypeAny, {
1164
- surface: string;
1165
- instance: string;
1166
- epoch?: number | undefined;
1167
- locator?: string | undefined;
1168
- revision?: string | undefined;
1169
- }, {
1170
- surface: string;
1171
- instance: string;
1172
- epoch?: number | undefined;
1173
- locator?: string | undefined;
1174
- revision?: string | undefined;
1175
- }>>;
1176
- /**
1177
- * The prompt this verification answered, when the agent relayed one. Loose here because this
1178
- * schema loads with every page; its shape is `PromptContextSchema` in `@reticlehq/core/artifacts`,
1179
- * which the daemon writes and reads it with.
1180
- */
556
+ }, z.core.$strip>>;
1181
557
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1182
558
  changedFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
1183
559
  path: z.ZodString;
1184
- changeKind: z.ZodNativeEnum<{
560
+ changeKind: z.ZodEnum<{
1185
561
  readonly ADDED: "added";
1186
562
  readonly MODIFIED: "modified";
1187
563
  readonly DELETED: "deleted";
1188
564
  }>;
1189
- risk: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<{
565
+ risk: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1190
566
  readonly AUTH: "auth";
1191
567
  readonly PAYMENT: "payment";
1192
568
  readonly DB: "db";
@@ -1195,21 +571,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1195
571
  readonly SECRETS: "secrets";
1196
572
  readonly DESTRUCTIVE: "destructive";
1197
573
  readonly EXTERNAL: "external";
1198
- }>, "many">>;
1199
- }, "strip", z.ZodTypeAny, {
1200
- path: string;
1201
- changeKind: "added" | "modified" | "deleted";
1202
- risk: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[];
1203
- }, {
1204
- path: string;
1205
- changeKind: "added" | "modified" | "deleted";
1206
- risk?: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[] | undefined;
1207
- }>, "many">>;
574
+ }>>>;
575
+ }, z.core.$strip>>>;
1208
576
  flows: z.ZodDefault<z.ZodArray<z.ZodObject<{
1209
577
  name: z.ZodString;
1210
- /** The saved flow this replayed copy was generated from — see the flow file's `template`. */
1211
578
  template: z.ZodOptional<z.ZodString>;
1212
- status: z.ZodNativeEnum<{
579
+ status: z.ZodEnum<{
1213
580
  readonly PASS: "pass";
1214
581
  readonly FAIL: "fail";
1215
582
  readonly SKIPPED: "skipped";
@@ -1222,18 +589,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1222
589
  from: z.ZodString;
1223
590
  to: z.ZodString;
1224
591
  consequenceVerified: z.ZodBoolean;
1225
- }, "strip", z.ZodTypeAny, {
1226
- from: string;
1227
- to: string;
1228
- consequenceVerified: boolean;
1229
- }, {
1230
- from: string;
1231
- to: string;
1232
- consequenceVerified: boolean;
1233
- }>>;
592
+ }, z.core.$strip>>;
1234
593
  evidenceRef: z.ZodOptional<z.ZodString>;
1235
594
  failureReason: z.ZodOptional<z.ZodString>;
1236
- /** Each step's result and page — see RUN_STEP_RESULTS_MAX. */
1237
595
  stepResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
1238
596
  step: z.ZodNumber;
1239
597
  anchor: z.ZodString;
@@ -1242,159 +600,26 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1242
600
  endPage: z.ZodOptional<z.ZodString>;
1243
601
  consequence: z.ZodOptional<z.ZodString>;
1244
602
  error: z.ZodOptional<z.ZodString>;
1245
- /** The drift's reason kind, when the step drifted. */
1246
603
  drift: z.ZodOptional<z.ZodString>;
1247
- /** What the page looked like when this step's outcome was decided. */
1248
604
  screenshot: z.ZodOptional<z.ZodObject<{
1249
605
  file: z.ZodString;
1250
- source: z.ZodNativeEnum<{
606
+ source: z.ZodEnum<{
1251
607
  readonly BROWSER: "browser";
1252
608
  readonly RENDERED: "rendered";
1253
609
  }>;
1254
610
  width: z.ZodNumber;
1255
611
  height: z.ZodNumber;
1256
612
  sha256: z.ZodString;
1257
- }, "strip", z.ZodTypeAny, {
1258
- file: string;
1259
- source: "browser" | "rendered";
1260
- width: number;
1261
- height: number;
1262
- sha256: string;
1263
- }, {
1264
- file: string;
1265
- source: "browser" | "rendered";
1266
- width: number;
1267
- height: number;
1268
- sha256: string;
1269
- }>>;
1270
- }, "strip", z.ZodTypeAny, {
1271
- anchor: string;
1272
- ok: boolean;
1273
- step: number;
1274
- drift?: string | undefined;
1275
- error?: string | undefined;
1276
- page?: string | undefined;
1277
- endPage?: string | undefined;
1278
- consequence?: string | undefined;
1279
- screenshot?: {
1280
- file: string;
1281
- source: "browser" | "rendered";
1282
- width: number;
1283
- height: number;
1284
- sha256: string;
1285
- } | undefined;
1286
- }, {
1287
- anchor: string;
1288
- ok: boolean;
1289
- step: number;
1290
- drift?: string | undefined;
1291
- error?: string | undefined;
1292
- page?: string | undefined;
1293
- endPage?: string | undefined;
1294
- consequence?: string | undefined;
1295
- screenshot?: {
1296
- file: string;
1297
- source: "browser" | "rendered";
1298
- width: number;
1299
- height: number;
1300
- sha256: string;
1301
- } | undefined;
1302
- }>, "many">>;
1303
- /** The flow as recorded, when it fits in RUN_RECORDING_MAX_BYTES. */
613
+ }, z.core.$strip>>;
614
+ }, z.core.$strip>>>;
1304
615
  recording: z.ZodOptional<z.ZodObject<{
1305
616
  startPath: z.ZodOptional<z.ZodString>;
1306
- steps: z.ZodArray<z.ZodUnknown, "many">;
1307
- }, "strip", z.ZodTypeAny, {
1308
- steps: unknown[];
1309
- startPath?: string | undefined;
1310
- }, {
1311
- steps: unknown[];
1312
- startPath?: string | undefined;
1313
- }>>;
1314
- /** True when the recording was too large to carry. */
617
+ steps: z.ZodArray<z.ZodUnknown>;
618
+ }, z.core.$strip>>;
1315
619
  recordingOmitted: z.ZodOptional<z.ZodBoolean>;
1316
- }, "strip", z.ZodTypeAny, {
1317
- name: string;
1318
- status: "pass" | "fail" | "healed" | "skipped";
1319
- steps: number;
1320
- durationMs: number;
1321
- recording?: {
1322
- steps: unknown[];
1323
- startPath?: string | undefined;
1324
- } | undefined;
1325
- healed?: {
1326
- from: string;
1327
- to: string;
1328
- consequenceVerified: boolean;
1329
- } | undefined;
1330
- template?: string | undefined;
1331
- oracle?: string | undefined;
1332
- evidenceRef?: string | undefined;
1333
- failureReason?: string | undefined;
1334
- stepResults?: {
1335
- anchor: string;
1336
- ok: boolean;
1337
- step: number;
1338
- drift?: string | undefined;
1339
- error?: string | undefined;
1340
- page?: string | undefined;
1341
- endPage?: string | undefined;
1342
- consequence?: string | undefined;
1343
- screenshot?: {
1344
- file: string;
1345
- source: "browser" | "rendered";
1346
- width: number;
1347
- height: number;
1348
- sha256: string;
1349
- } | undefined;
1350
- }[] | undefined;
1351
- recordingOmitted?: boolean | undefined;
1352
- }, {
1353
- name: string;
1354
- status: "pass" | "fail" | "healed" | "skipped";
1355
- steps: number;
1356
- durationMs: number;
1357
- recording?: {
1358
- steps: unknown[];
1359
- startPath?: string | undefined;
1360
- } | undefined;
1361
- healed?: {
1362
- from: string;
1363
- to: string;
1364
- consequenceVerified: boolean;
1365
- } | undefined;
1366
- template?: string | undefined;
1367
- oracle?: string | undefined;
1368
- evidenceRef?: string | undefined;
1369
- failureReason?: string | undefined;
1370
- stepResults?: {
1371
- anchor: string;
1372
- ok: boolean;
1373
- step: number;
1374
- drift?: string | undefined;
1375
- error?: string | undefined;
1376
- page?: string | undefined;
1377
- endPage?: string | undefined;
1378
- consequence?: string | undefined;
1379
- screenshot?: {
1380
- file: string;
1381
- source: "browser" | "rendered";
1382
- width: number;
1383
- height: number;
1384
- sha256: string;
1385
- } | undefined;
1386
- }[] | undefined;
1387
- recordingOmitted?: boolean | undefined;
1388
- }>, "many">>;
620
+ }, z.core.$strip>>>;
1389
621
  checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1390
- /**
1391
- * Which source of truth answering this claim required.
1392
- *
1393
- * Optional, because a check folded from a journal written before the kind was recorded has none,
1394
- * and the only alternatives are refusing the whole run or filling in a kind nobody observed. An
1395
- * absent field says nobody wrote it down; a present one is what the predicate actually read.
1396
- */
1397
- kind: z.ZodEffects<z.ZodOptional<z.ZodNativeEnum<{
622
+ kind: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
1398
623
  readonly ELEMENT: "element";
1399
624
  readonly TEXT: "text";
1400
625
  readonly SIGNAL: "signal";
@@ -1408,149 +633,40 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1408
633
  readonly ALL_OF: "allOf";
1409
634
  readonly ANY_OF: "anyOf";
1410
635
  readonly NOT: "not";
1411
- }>>, "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined, unknown>;
636
+ }>>, unknown>;
1412
637
  predicate: z.ZodString;
1413
- status: z.ZodEffects<z.ZodNativeEnum<{
638
+ status: z.ZodPreprocess<z.ZodEnum<{
1414
639
  readonly YES: "yes";
1415
640
  readonly NO: "no";
1416
641
  readonly UNKNOWN: "unknown";
1417
642
  readonly NO_FAULT: "no-fault";
1418
- }>, "yes" | "no" | "unknown" | "no-fault", unknown>;
643
+ }>, unknown>;
1419
644
  evidence: z.ZodOptional<z.ZodUnknown>;
1420
- /**
1421
- * Was this claim written down BEFORE the action, or after it?
1422
- *
1423
- * The difference between a check and a rationalisation. Afterwards, anything that happened can be
1424
- * described as what you meant; a claim made in advance can only be met or missed.
1425
- *
1426
- * Optional, and absence is not `false`. `false` says the claim came afterwards. Absent says nobody
1427
- * recorded which, and those are different facts about the evidence.
1428
- */
1429
645
  declaredBeforeActing: z.ZodOptional<z.ZodBoolean>;
1430
- /**
1431
- * What the check required and what it saw, in the engine's words, when it said — "an element
1432
- * matching {"testid":"pay"} in state 'enabled'" and "present, visible, disabled". Without them an
1433
- * issue a CI run found had no Expected or Actual to show. Optional: older runs carry neither.
1434
- */
1435
646
  expected: z.ZodOptional<z.ZodString>;
1436
647
  observed: z.ZodOptional<z.ZodString>;
1437
- /**
1438
- * What kind of evidence bought this answer.
1439
- *
1440
- * A green paid for with "something matching was on screen" is not the same green as one paid for
1441
- * with "the request went out", and a report that flattens them lets the cheap one pass for the
1442
- * dear one. Free-form because the grades belong to whoever produced the verdict.
1443
- */
1444
648
  grade: z.ZodOptional<z.ZodString>;
1445
- /**
1446
- * What could not be seen while this was being checked.
1447
- *
1448
- * The property with no prior art: every other test report in existence is silent about its own
1449
- * blind spots. An empty list means nothing was hidden; absence means nobody looked.
1450
- */
1451
- couldNotSee: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1452
- /**
1453
- * Why the verdict came out this way, in the engine's vocabulary.
1454
- *
1455
- * Carried so a reader -- and the fold that looks for late answers -- can tell an outcome that
1456
- * has not arrived from a capture that could not be read. Both are `unknown`, and only the
1457
- * first is a question that waiting can settle.
1458
- */
649
+ couldNotSee: z.ZodOptional<z.ZodArray<z.ZodString>>;
1459
650
  reason: z.ZodOptional<z.ZodString>;
1460
- /** This check's own name, so a later verdict can cite it. See revision.ts. */
1461
651
  checkId: z.ZodOptional<z.ZodString>;
1462
- /** The journal action that produced it, kept on this machine to pair it with its screenshot. */
1463
652
  actionId: z.ZodOptional<z.ZodString>;
1464
- /**
1465
- * What this check proves: the agent's `intent` (a sentence, or the id of a declared intent), else a
1466
- * sentence the engine built from the predicate in the failure voice — see `intentDerived`.
1467
- */
1468
653
  intent: z.ZodOptional<z.ZodString>;
1469
- /** True when `intent` was built from the predicate, not given by the agent. */
1470
654
  intentDerived: z.ZodOptional<z.ZodBoolean>;
1471
- /** The index of the `allOf` part that failed, so a title can name the one thing that did not happen. */
1472
655
  failedPart: z.ZodOptional<z.ZodNumber>;
1473
- /** What the page looked like when this check was decided. */
1474
656
  screenshot: z.ZodOptional<z.ZodObject<{
1475
657
  file: z.ZodString;
1476
- source: z.ZodNativeEnum<{
658
+ source: z.ZodEnum<{
1477
659
  readonly BROWSER: "browser";
1478
660
  readonly RENDERED: "rendered";
1479
661
  }>;
1480
662
  width: z.ZodNumber;
1481
663
  height: z.ZodNumber;
1482
664
  sha256: z.ZodString;
1483
- }, "strip", z.ZodTypeAny, {
1484
- file: string;
1485
- source: "browser" | "rendered";
1486
- width: number;
1487
- height: number;
1488
- sha256: string;
1489
- }, {
1490
- file: string;
1491
- source: "browser" | "rendered";
1492
- width: number;
1493
- height: number;
1494
- sha256: string;
1495
- }>>;
1496
- /**
1497
- * The earlier check this one corrects, as `<runId>#<checkId>`.
1498
- *
1499
- * Present only on a correction, and the check it names is NOT edited: both stand, so a reader
1500
- * can see that the first answer was given, when it changed, and why.
1501
- */
665
+ }, z.core.$strip>>;
1502
666
  supersedes: z.ZodOptional<z.ZodString>;
1503
- }, "strip", z.ZodTypeAny, {
1504
- status: "yes" | "no" | "unknown" | "no-fault";
1505
- predicate: string;
1506
- reason?: string | undefined;
1507
- kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
1508
- intent?: string | undefined;
1509
- expected?: string | undefined;
1510
- checkId?: string | undefined;
1511
- actionId?: string | undefined;
1512
- screenshot?: {
1513
- file: string;
1514
- source: "browser" | "rendered";
1515
- width: number;
1516
- height: number;
1517
- sha256: string;
1518
- } | undefined;
1519
- evidence?: unknown;
1520
- declaredBeforeActing?: boolean | undefined;
1521
- observed?: string | undefined;
1522
- grade?: string | undefined;
1523
- couldNotSee?: string[] | undefined;
1524
- intentDerived?: boolean | undefined;
1525
- failedPart?: number | undefined;
1526
- supersedes?: string | undefined;
1527
- }, {
1528
- predicate: string;
1529
- reason?: string | undefined;
1530
- kind?: unknown;
1531
- intent?: string | undefined;
1532
- status?: unknown;
1533
- expected?: string | undefined;
1534
- checkId?: string | undefined;
1535
- actionId?: string | undefined;
1536
- screenshot?: {
1537
- file: string;
1538
- source: "browser" | "rendered";
1539
- width: number;
1540
- height: number;
1541
- sha256: string;
1542
- } | undefined;
1543
- evidence?: unknown;
1544
- declaredBeforeActing?: boolean | undefined;
1545
- observed?: string | undefined;
1546
- grade?: string | undefined;
1547
- couldNotSee?: string[] | undefined;
1548
- intentDerived?: boolean | undefined;
1549
- failedPart?: number | undefined;
1550
- supersedes?: string | undefined;
1551
- }>, "many">>;
667
+ }, z.core.$strip>>>;
1552
668
  risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1553
- surface: z.ZodNativeEnum<{
669
+ surface: z.ZodEnum<{
1554
670
  readonly AUTH: "auth";
1555
671
  readonly PAYMENT: "payment";
1556
672
  readonly DB: "db";
@@ -1560,7 +676,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1560
676
  readonly DESTRUCTIVE: "destructive";
1561
677
  readonly EXTERNAL: "external";
1562
678
  }>;
1563
- severity: z.ZodNativeEnum<{
679
+ severity: z.ZodEnum<{
1564
680
  readonly LOW: "low";
1565
681
  readonly MEDIUM: "medium";
1566
682
  readonly HIGH: "high";
@@ -1571,148 +687,34 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1571
687
  file: z.ZodOptional<z.ZodString>;
1572
688
  line: z.ZodOptional<z.ZodNumber>;
1573
689
  network: z.ZodOptional<z.ZodString>;
1574
- }, "strip", z.ZodTypeAny, {
1575
- network?: string | undefined;
1576
- file?: string | undefined;
1577
- line?: number | undefined;
1578
- }, {
1579
- network?: string | undefined;
1580
- file?: string | undefined;
1581
- line?: number | undefined;
1582
- }>>;
690
+ }, z.core.$strip>>;
1583
691
  gated: z.ZodDefault<z.ZodBoolean>;
1584
- }, "strip", z.ZodTypeAny, {
1585
- surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
1586
- severity: "low" | "medium" | "high" | "critical";
1587
- detail: string;
1588
- gated: boolean;
1589
- evidence?: {
1590
- network?: string | undefined;
1591
- file?: string | undefined;
1592
- line?: number | undefined;
1593
- } | undefined;
1594
- }, {
1595
- surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
1596
- severity: "low" | "medium" | "high" | "critical";
1597
- detail: string;
1598
- evidence?: {
1599
- network?: string | undefined;
1600
- file?: string | undefined;
1601
- line?: number | undefined;
1602
- } | undefined;
1603
- gated?: boolean | undefined;
1604
- }>, "many">>;
692
+ }, z.core.$strip>>>;
1605
693
  evidence: z.ZodObject<{
1606
694
  consoleErrors: z.ZodDefault<z.ZodArray<z.ZodObject<{
1607
695
  level: z.ZodString;
1608
696
  message: z.ZodString;
1609
697
  at: z.ZodNumber;
1610
- }, "strip", z.ZodTypeAny, {
1611
- at: number;
1612
- message: string;
1613
- level: string;
1614
- }, {
1615
- at: number;
1616
- message: string;
1617
- level: string;
1618
- }>, "many">>;
698
+ }, z.core.$strip>>>;
1619
699
  networkAnomalies: z.ZodDefault<z.ZodArray<z.ZodObject<{
1620
700
  method: z.ZodString;
1621
701
  url: z.ZodString;
1622
702
  status: z.ZodOptional<z.ZodNumber>;
1623
703
  issue: z.ZodString;
1624
- }, "strip", z.ZodTypeAny, {
1625
- method: string;
1626
- url: string;
1627
- issue: string;
1628
- status?: number | undefined;
1629
- }, {
1630
- method: string;
1631
- url: string;
1632
- issue: string;
1633
- status?: number | undefined;
1634
- }>, "many">>;
704
+ }, z.core.$strip>>>;
1635
705
  stateAssertions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1636
706
  store: z.ZodString;
1637
707
  path: z.ZodString;
1638
- expected: z.ZodUnknown;
1639
- actual: z.ZodUnknown;
708
+ expected: z.ZodOptional<z.ZodUnknown>;
709
+ actual: z.ZodOptional<z.ZodUnknown>;
1640
710
  ok: z.ZodBoolean;
1641
- }, "strip", z.ZodTypeAny, {
1642
- ok: boolean;
1643
- path: string;
1644
- store: string;
1645
- expected?: unknown;
1646
- actual?: unknown;
1647
- }, {
1648
- ok: boolean;
1649
- path: string;
1650
- store: string;
1651
- expected?: unknown;
1652
- actual?: unknown;
1653
- }>, "many">>;
711
+ }, z.core.$strip>>>;
1654
712
  timeline: z.ZodDefault<z.ZodArray<z.ZodObject<{
1655
713
  at: z.ZodNumber;
1656
714
  kind: z.ZodString;
1657
715
  summary: z.ZodString;
1658
- }, "strip", z.ZodTypeAny, {
1659
- at: number;
1660
- kind: string;
1661
- summary: string;
1662
- }, {
1663
- at: number;
1664
- kind: string;
1665
- summary: string;
1666
- }>, "many">>;
1667
- }, "strip", z.ZodTypeAny, {
1668
- consoleErrors: {
1669
- at: number;
1670
- message: string;
1671
- level: string;
1672
- }[];
1673
- networkAnomalies: {
1674
- method: string;
1675
- url: string;
1676
- issue: string;
1677
- status?: number | undefined;
1678
- }[];
1679
- stateAssertions: {
1680
- ok: boolean;
1681
- path: string;
1682
- store: string;
1683
- expected?: unknown;
1684
- actual?: unknown;
1685
- }[];
1686
- timeline: {
1687
- at: number;
1688
- kind: string;
1689
- summary: string;
1690
- }[];
1691
- }, {
1692
- consoleErrors?: {
1693
- at: number;
1694
- message: string;
1695
- level: string;
1696
- }[] | undefined;
1697
- networkAnomalies?: {
1698
- method: string;
1699
- url: string;
1700
- issue: string;
1701
- status?: number | undefined;
1702
- }[] | undefined;
1703
- stateAssertions?: {
1704
- ok: boolean;
1705
- path: string;
1706
- store: string;
1707
- expected?: unknown;
1708
- actual?: unknown;
1709
- }[] | undefined;
1710
- timeline?: {
1711
- at: number;
1712
- kind: string;
1713
- summary: string;
1714
- }[] | undefined;
1715
- }>;
716
+ }, z.core.$strip>>>;
717
+ }, z.core.$strip>;
1716
718
  repair: z.ZodOptional<z.ZodObject<{
1717
719
  failurePackets: z.ZodDefault<z.ZodArray<z.ZodObject<{
1718
720
  flow: z.ZodOptional<z.ZodString>;
@@ -1723,114 +725,28 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1723
725
  file: z.ZodString;
1724
726
  line: z.ZodOptional<z.ZodNumber>;
1725
727
  component: z.ZodOptional<z.ZodString>;
1726
- }, "strip", z.ZodTypeAny, {
1727
- file: string;
1728
- component?: string | undefined;
1729
- line?: number | undefined;
1730
- }, {
1731
- file: string;
1732
- component?: string | undefined;
1733
- line?: number | undefined;
1734
- }>>;
728
+ }, z.core.$strip>>;
1735
729
  suggestedPrompt: z.ZodString;
1736
- }, "strip", z.ZodTypeAny, {
1737
- expected: string;
1738
- actual: string;
1739
- suggestedPrompt: string;
1740
- step?: number | undefined;
1741
- flow?: string | undefined;
1742
- sourceLocation?: {
1743
- file: string;
1744
- component?: string | undefined;
1745
- line?: number | undefined;
1746
- } | undefined;
1747
- }, {
1748
- expected: string;
1749
- actual: string;
1750
- suggestedPrompt: string;
1751
- step?: number | undefined;
1752
- flow?: string | undefined;
1753
- sourceLocation?: {
1754
- file: string;
1755
- component?: string | undefined;
1756
- line?: number | undefined;
1757
- } | undefined;
1758
- }>, "many">>;
1759
- }, "strip", z.ZodTypeAny, {
1760
- failurePackets: {
1761
- expected: string;
1762
- actual: string;
1763
- suggestedPrompt: string;
1764
- step?: number | undefined;
1765
- flow?: string | undefined;
1766
- sourceLocation?: {
1767
- file: string;
1768
- component?: string | undefined;
1769
- line?: number | undefined;
1770
- } | undefined;
1771
- }[];
1772
- }, {
1773
- failurePackets?: {
1774
- expected: string;
1775
- actual: string;
1776
- suggestedPrompt: string;
1777
- step?: number | undefined;
1778
- flow?: string | undefined;
1779
- sourceLocation?: {
1780
- file: string;
1781
- component?: string | undefined;
1782
- line?: number | undefined;
1783
- } | undefined;
1784
- }[] | undefined;
1785
- }>>;
1786
- /** What the page looked like after each action, assert and replayed step. Absent on older runs. */
730
+ }, z.core.$strip>>>;
731
+ }, z.core.$strip>>;
1787
732
  screenshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
1788
733
  file: z.ZodString;
1789
- source: z.ZodNativeEnum<{
734
+ source: z.ZodEnum<{
1790
735
  readonly BROWSER: "browser";
1791
736
  readonly RENDERED: "rendered";
1792
737
  }>;
1793
738
  width: z.ZodNumber;
1794
739
  height: z.ZodNumber;
1795
740
  sha256: z.ZodString;
1796
- } & {
1797
741
  seq: z.ZodNumber;
1798
742
  tool: z.ZodString;
1799
- /** The flow step it belongs to, as `<flow>#<step>`, when it was taken during a replay. */
1800
743
  step: z.ZodOptional<z.ZodString>;
1801
- /** Taken for a call that produced a verdict — what lets the run pair it with its check. */
1802
744
  verdict: z.ZodOptional<z.ZodBoolean>;
1803
- /** The check this picture is of (see `RunCheck.checkId`), when it could be paired with one. */
1804
745
  checkId: z.ZodOptional<z.ZodString>;
1805
- /** The journal action it was taken for: how a run pairs it with its check (`RunCheck.actionId`). */
1806
746
  actionId: z.ZodOptional<z.ZodString>;
1807
- }, "strip", z.ZodTypeAny, {
1808
- file: string;
1809
- source: "browser" | "rendered";
1810
- width: number;
1811
- height: number;
1812
- sha256: string;
1813
- seq: number;
1814
- tool: string;
1815
- step?: string | undefined;
1816
- verdict?: boolean | undefined;
1817
- checkId?: string | undefined;
1818
- actionId?: string | undefined;
1819
- }, {
1820
- file: string;
1821
- source: "browser" | "rendered";
1822
- width: number;
1823
- height: number;
1824
- sha256: string;
1825
- seq: number;
1826
- tool: string;
1827
- step?: string | undefined;
1828
- verdict?: boolean | undefined;
1829
- checkId?: string | undefined;
1830
- actionId?: string | undefined;
1831
- }>, "many">>;
747
+ }, z.core.$strip>>>;
1832
748
  verdict: z.ZodObject<{
1833
- status: z.ZodNativeEnum<{
749
+ status: z.ZodEnum<{
1834
750
  readonly PASS: "pass";
1835
751
  readonly FAIL: "fail";
1836
752
  readonly PARTIAL: "partial";
@@ -1845,137 +761,51 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1845
761
  */
1846
762
  readonly UNKNOWN: "unknown";
1847
763
  }>;
1848
- reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1849
- confidence: z.ZodNativeEnum<{
764
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString>>;
765
+ confidence: z.ZodEnum<{
1850
766
  readonly HIGH: "high";
1851
767
  readonly MEDIUM: "medium";
1852
768
  readonly LOW: "low";
1853
769
  }>;
1854
770
  blockingRisks: z.ZodDefault<z.ZodNumber>;
1855
- /**
1856
- * Which check this verdict is about, so a later one can say it corrects this.
1857
- *
1858
- * Optional because a run's overall verdict is not about one check. A verdict with no check named
1859
- * cannot be cited, and therefore cannot be corrected -- see revision.ts.
1860
- */
1861
771
  checkId: z.ZodOptional<z.ZodString>;
1862
- /**
1863
- * The verdict this one replaces, written as `<runId>#<checkId>`.
1864
- *
1865
- * Present only on a correction. The verdict it names is NOT edited: it stays exactly as it was
1866
- * given, and this is a second, later answer that cites it. Rewriting the first in place would
1867
- * erase the fact that it was ever given, and "we always knew" is the shape of the problem this
1868
- * whole system exists to prevent.
1869
- */
1870
772
  supersedes: z.ZodOptional<z.ZodString>;
1871
- }, "strip", z.ZodTypeAny, {
1872
- status: "pass" | "fail" | "unknown" | "partial";
1873
- reasons: string[];
1874
- confidence: "low" | "medium" | "high";
1875
- blockingRisks: number;
1876
- checkId?: string | undefined;
1877
- supersedes?: string | undefined;
1878
- }, {
1879
- status: "pass" | "fail" | "unknown" | "partial";
1880
- confidence: "low" | "medium" | "high";
1881
- checkId?: string | undefined;
1882
- supersedes?: string | undefined;
1883
- reasons?: string[] | undefined;
1884
- blockingRisks?: number | undefined;
1885
- }>;
773
+ }, z.core.$strip>;
1886
774
  signature: z.ZodOptional<z.ZodObject<{
1887
775
  alg: z.ZodString;
1888
776
  value: z.ZodString;
1889
777
  signedAt: z.ZodNumber;
1890
- }, "strip", z.ZodTypeAny, {
1891
- value: string;
1892
- alg: string;
1893
- signedAt: number;
1894
- }, {
1895
- value: string;
1896
- alg: string;
1897
- signedAt: number;
1898
- }>>;
1899
- /**
1900
- * On a Harness run: each goal the session's coding agent also judged, and how the two compare.
1901
- * Optional and additive; an older platform strips it and keeps the body.
1902
- */
778
+ }, z.core.$strip>>;
1903
779
  disparity: z.ZodOptional<z.ZodArray<z.ZodObject<{
1904
780
  goal: z.ZodString;
1905
- kind: z.ZodNativeEnum<{
781
+ kind: z.ZodEnum<{
1906
782
  readonly FINDABLE: "findable";
1907
783
  readonly DISCOVERABILITY: "discoverability";
1908
784
  readonly AGENT_ASSUMPTION: "agent_assumption";
1909
785
  readonly DEFECT: "defect";
1910
786
  }>;
1911
787
  agent: z.ZodObject<{
1912
- verified: z.ZodNativeEnum<{
788
+ verified: z.ZodEnum<{
1913
789
  readonly YES: "yes";
1914
790
  readonly NO: "no";
1915
791
  readonly UNKNOWN: "unknown";
1916
792
  readonly NO_FAULT: "no-fault";
1917
793
  }>;
1918
794
  claim: z.ZodString;
1919
- }, "strip", z.ZodTypeAny, {
1920
- verified: "yes" | "no" | "unknown" | "no-fault";
1921
- claim: string;
1922
- }, {
1923
- verified: "yes" | "no" | "unknown" | "no-fault";
1924
- claim: string;
1925
- }>;
795
+ }, z.core.$strip>;
1926
796
  harness: z.ZodObject<{
1927
- verified: z.ZodNativeEnum<{
797
+ verified: z.ZodEnum<{
1928
798
  readonly YES: "yes";
1929
799
  readonly NO: "no";
1930
800
  readonly UNKNOWN: "unknown";
1931
801
  readonly NO_FAULT: "no-fault";
1932
802
  }>;
1933
803
  found: z.ZodBoolean;
1934
- searched: z.ZodArray<z.ZodString, "many">;
804
+ searched: z.ZodArray<z.ZodString>;
1935
805
  gaveUpAt: z.ZodOptional<z.ZodString>;
1936
- }, "strip", z.ZodTypeAny, {
1937
- verified: "yes" | "no" | "unknown" | "no-fault";
1938
- found: boolean;
1939
- searched: string[];
1940
- gaveUpAt?: string | undefined;
1941
- }, {
1942
- verified: "yes" | "no" | "unknown" | "no-fault";
1943
- found: boolean;
1944
- searched: string[];
1945
- gaveUpAt?: string | undefined;
1946
- }>;
1947
- }, "strip", z.ZodTypeAny, {
1948
- kind: "findable" | "discoverability" | "agent_assumption" | "defect";
1949
- goal: string;
1950
- agent: {
1951
- verified: "yes" | "no" | "unknown" | "no-fault";
1952
- claim: string;
1953
- };
1954
- harness: {
1955
- verified: "yes" | "no" | "unknown" | "no-fault";
1956
- found: boolean;
1957
- searched: string[];
1958
- gaveUpAt?: string | undefined;
1959
- };
1960
- }, {
1961
- kind: "findable" | "discoverability" | "agent_assumption" | "defect";
1962
- goal: string;
1963
- agent: {
1964
- verified: "yes" | "no" | "unknown" | "no-fault";
1965
- claim: string;
1966
- };
1967
- harness: {
1968
- verified: "yes" | "no" | "unknown" | "no-fault";
1969
- found: boolean;
1970
- searched: string[];
1971
- gaveUpAt?: string | undefined;
1972
- };
1973
- }>, "many">>;
1974
- /**
1975
- * What the coding agent itself said the session showed (`reticle_session { end, claim }`), kept
1976
- * beside the graded `verdict` so claimed-vs-graded can be compared. Never read as the verdict.
1977
- */
1978
- agentClaim: z.ZodOptional<z.ZodNativeEnum<{
806
+ }, z.core.$strip>;
807
+ }, z.core.$strip>>>;
808
+ agentClaim: z.ZodOptional<z.ZodEnum<{
1979
809
  readonly PASS: "pass";
1980
810
  readonly FAIL: "fail";
1981
811
  readonly PARTIAL: "partial";
@@ -1990,393 +820,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1990
820
  */
1991
821
  readonly UNKNOWN: "unknown";
1992
822
  }>>;
1993
- }, "strip", z.ZodTypeAny, {
1994
- flows: {
1995
- name: string;
1996
- status: "pass" | "fail" | "healed" | "skipped";
1997
- steps: number;
1998
- durationMs: number;
1999
- recording?: {
2000
- steps: unknown[];
2001
- startPath?: string | undefined;
2002
- } | undefined;
2003
- healed?: {
2004
- from: string;
2005
- to: string;
2006
- consequenceVerified: boolean;
2007
- } | undefined;
2008
- template?: string | undefined;
2009
- oracle?: string | undefined;
2010
- evidenceRef?: string | undefined;
2011
- failureReason?: string | undefined;
2012
- stepResults?: {
2013
- anchor: string;
2014
- ok: boolean;
2015
- step: number;
2016
- drift?: string | undefined;
2017
- error?: string | undefined;
2018
- page?: string | undefined;
2019
- endPage?: string | undefined;
2020
- consequence?: string | undefined;
2021
- screenshot?: {
2022
- file: string;
2023
- source: "browser" | "rendered";
2024
- width: number;
2025
- height: number;
2026
- sha256: string;
2027
- } | undefined;
2028
- }[] | undefined;
2029
- recordingOmitted?: boolean | undefined;
2030
- }[];
2031
- agent: {
2032
- kind: "coding-agent" | "oem-pipeline" | "human";
2033
- id: string;
2034
- model?: string | undefined;
2035
- };
2036
- verdict: {
2037
- status: "pass" | "fail" | "unknown" | "partial";
2038
- reasons: string[];
2039
- confidence: "low" | "medium" | "high";
2040
- blockingRisks: number;
2041
- checkId?: string | undefined;
2042
- supersedes?: string | undefined;
2043
- };
2044
- durationMs: number;
2045
- evidence: {
2046
- consoleErrors: {
2047
- at: number;
2048
- message: string;
2049
- level: string;
2050
- }[];
2051
- networkAnomalies: {
2052
- method: string;
2053
- url: string;
2054
- issue: string;
2055
- status?: number | undefined;
2056
- }[];
2057
- stateAssertions: {
2058
- ok: boolean;
2059
- path: string;
2060
- store: string;
2061
- expected?: unknown;
2062
- actual?: unknown;
2063
- }[];
2064
- timeline: {
2065
- at: number;
2066
- kind: string;
2067
- summary: string;
2068
- }[];
2069
- };
2070
- schemaVersion: 2 | 1 | 3;
2071
- runId: string & z.BRAND<"RunId">;
2072
- createdAt: number;
2073
- profile: "dev" | "prod-preview";
2074
- project: {
2075
- name: string;
2076
- framework: "other" | "react" | "next" | "vite";
2077
- commit?: string | undefined;
2078
- branch?: string | undefined;
2079
- env?: "ci" | "preview" | "local" | undefined;
2080
- previewUrl?: string | undefined;
2081
- };
2082
- trigger: {
2083
- kind: "manual" | "edit" | "ci" | "oem";
2084
- diffRef?: string | undefined;
2085
- note?: string | undefined;
2086
- };
2087
- changedFiles: {
2088
- path: string;
2089
- changeKind: "added" | "modified" | "deleted";
2090
- risk: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[];
2091
- }[];
2092
- checks: {
2093
- status: "yes" | "no" | "unknown" | "no-fault";
2094
- predicate: string;
2095
- reason?: string | undefined;
2096
- kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
2097
- intent?: string | undefined;
2098
- expected?: string | undefined;
2099
- checkId?: string | undefined;
2100
- actionId?: string | undefined;
2101
- screenshot?: {
2102
- file: string;
2103
- source: "browser" | "rendered";
2104
- width: number;
2105
- height: number;
2106
- sha256: string;
2107
- } | undefined;
2108
- evidence?: unknown;
2109
- declaredBeforeActing?: boolean | undefined;
2110
- observed?: string | undefined;
2111
- grade?: string | undefined;
2112
- couldNotSee?: string[] | undefined;
2113
- intentDerived?: boolean | undefined;
2114
- failedPart?: number | undefined;
2115
- supersedes?: string | undefined;
2116
- }[];
2117
- risks: {
2118
- surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
2119
- severity: "low" | "medium" | "high" | "critical";
2120
- detail: string;
2121
- gated: boolean;
2122
- evidence?: {
2123
- network?: string | undefined;
2124
- file?: string | undefined;
2125
- line?: number | undefined;
2126
- } | undefined;
2127
- }[];
2128
- episodeId?: string | undefined;
2129
- agentSession?: string | undefined;
2130
- editEpoch?: number | undefined;
2131
- subject?: {
2132
- surface: string;
2133
- instance: string;
2134
- epoch?: number | undefined;
2135
- locator?: string | undefined;
2136
- revision?: string | undefined;
2137
- } | undefined;
2138
- context?: Record<string, unknown> | undefined;
2139
- repair?: {
2140
- failurePackets: {
2141
- expected: string;
2142
- actual: string;
2143
- suggestedPrompt: string;
2144
- step?: number | undefined;
2145
- flow?: string | undefined;
2146
- sourceLocation?: {
2147
- file: string;
2148
- component?: string | undefined;
2149
- line?: number | undefined;
2150
- } | undefined;
2151
- }[];
2152
- } | undefined;
2153
- screenshots?: {
2154
- file: string;
2155
- source: "browser" | "rendered";
2156
- width: number;
2157
- height: number;
2158
- sha256: string;
2159
- seq: number;
2160
- tool: string;
2161
- step?: string | undefined;
2162
- verdict?: boolean | undefined;
2163
- checkId?: string | undefined;
2164
- actionId?: string | undefined;
2165
- }[] | undefined;
2166
- signature?: {
2167
- value: string;
2168
- alg: string;
2169
- signedAt: number;
2170
- } | undefined;
2171
- disparity?: {
2172
- kind: "findable" | "discoverability" | "agent_assumption" | "defect";
2173
- goal: string;
2174
- agent: {
2175
- verified: "yes" | "no" | "unknown" | "no-fault";
2176
- claim: string;
2177
- };
2178
- harness: {
2179
- verified: "yes" | "no" | "unknown" | "no-fault";
2180
- found: boolean;
2181
- searched: string[];
2182
- gaveUpAt?: string | undefined;
2183
- };
2184
- }[] | undefined;
2185
- agentClaim?: "pass" | "fail" | "unknown" | "partial" | undefined;
2186
- }, {
2187
- agent: {
2188
- kind: "coding-agent" | "oem-pipeline" | "human";
2189
- id: string;
2190
- model?: string | undefined;
2191
- };
2192
- verdict: {
2193
- status: "pass" | "fail" | "unknown" | "partial";
2194
- confidence: "low" | "medium" | "high";
2195
- checkId?: string | undefined;
2196
- supersedes?: string | undefined;
2197
- reasons?: string[] | undefined;
2198
- blockingRisks?: number | undefined;
2199
- };
2200
- durationMs: number;
2201
- evidence: {
2202
- consoleErrors?: {
2203
- at: number;
2204
- message: string;
2205
- level: string;
2206
- }[] | undefined;
2207
- networkAnomalies?: {
2208
- method: string;
2209
- url: string;
2210
- issue: string;
2211
- status?: number | undefined;
2212
- }[] | undefined;
2213
- stateAssertions?: {
2214
- ok: boolean;
2215
- path: string;
2216
- store: string;
2217
- expected?: unknown;
2218
- actual?: unknown;
2219
- }[] | undefined;
2220
- timeline?: {
2221
- at: number;
2222
- kind: string;
2223
- summary: string;
2224
- }[] | undefined;
2225
- };
2226
- schemaVersion: 2 | 1 | 3;
2227
- runId: string;
2228
- createdAt: number;
2229
- profile: "dev" | "prod-preview";
2230
- project: {
2231
- name: string;
2232
- framework: "other" | "react" | "next" | "vite";
2233
- commit?: string | undefined;
2234
- branch?: string | undefined;
2235
- env?: "ci" | "preview" | "local" | undefined;
2236
- previewUrl?: string | undefined;
2237
- };
2238
- trigger: {
2239
- kind: "manual" | "edit" | "ci" | "oem";
2240
- diffRef?: string | undefined;
2241
- note?: string | undefined;
2242
- };
2243
- flows?: {
2244
- name: string;
2245
- status: "pass" | "fail" | "healed" | "skipped";
2246
- steps: number;
2247
- durationMs: number;
2248
- recording?: {
2249
- steps: unknown[];
2250
- startPath?: string | undefined;
2251
- } | undefined;
2252
- healed?: {
2253
- from: string;
2254
- to: string;
2255
- consequenceVerified: boolean;
2256
- } | undefined;
2257
- template?: string | undefined;
2258
- oracle?: string | undefined;
2259
- evidenceRef?: string | undefined;
2260
- failureReason?: string | undefined;
2261
- stepResults?: {
2262
- anchor: string;
2263
- ok: boolean;
2264
- step: number;
2265
- drift?: string | undefined;
2266
- error?: string | undefined;
2267
- page?: string | undefined;
2268
- endPage?: string | undefined;
2269
- consequence?: string | undefined;
2270
- screenshot?: {
2271
- file: string;
2272
- source: "browser" | "rendered";
2273
- width: number;
2274
- height: number;
2275
- sha256: string;
2276
- } | undefined;
2277
- }[] | undefined;
2278
- recordingOmitted?: boolean | undefined;
2279
- }[] | undefined;
2280
- episodeId?: string | undefined;
2281
- agentSession?: string | undefined;
2282
- editEpoch?: number | undefined;
2283
- subject?: {
2284
- surface: string;
2285
- instance: string;
2286
- epoch?: number | undefined;
2287
- locator?: string | undefined;
2288
- revision?: string | undefined;
2289
- } | undefined;
2290
- context?: Record<string, unknown> | undefined;
2291
- changedFiles?: {
2292
- path: string;
2293
- changeKind: "added" | "modified" | "deleted";
2294
- risk?: ("auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external")[] | undefined;
2295
- }[] | undefined;
2296
- checks?: {
2297
- predicate: string;
2298
- reason?: string | undefined;
2299
- kind?: unknown;
2300
- intent?: string | undefined;
2301
- status?: unknown;
2302
- expected?: string | undefined;
2303
- checkId?: string | undefined;
2304
- actionId?: string | undefined;
2305
- screenshot?: {
2306
- file: string;
2307
- source: "browser" | "rendered";
2308
- width: number;
2309
- height: number;
2310
- sha256: string;
2311
- } | undefined;
2312
- evidence?: unknown;
2313
- declaredBeforeActing?: boolean | undefined;
2314
- observed?: string | undefined;
2315
- grade?: string | undefined;
2316
- couldNotSee?: string[] | undefined;
2317
- intentDerived?: boolean | undefined;
2318
- failedPart?: number | undefined;
2319
- supersedes?: string | undefined;
2320
- }[] | undefined;
2321
- risks?: {
2322
- surface: "auth" | "payment" | "db" | "migration" | "rls" | "secrets" | "destructive" | "external";
2323
- severity: "low" | "medium" | "high" | "critical";
2324
- detail: string;
2325
- evidence?: {
2326
- network?: string | undefined;
2327
- file?: string | undefined;
2328
- line?: number | undefined;
2329
- } | undefined;
2330
- gated?: boolean | undefined;
2331
- }[] | undefined;
2332
- repair?: {
2333
- failurePackets?: {
2334
- expected: string;
2335
- actual: string;
2336
- suggestedPrompt: string;
2337
- step?: number | undefined;
2338
- flow?: string | undefined;
2339
- sourceLocation?: {
2340
- file: string;
2341
- component?: string | undefined;
2342
- line?: number | undefined;
2343
- } | undefined;
2344
- }[] | undefined;
2345
- } | undefined;
2346
- screenshots?: {
2347
- file: string;
2348
- source: "browser" | "rendered";
2349
- width: number;
2350
- height: number;
2351
- sha256: string;
2352
- seq: number;
2353
- tool: string;
2354
- step?: string | undefined;
2355
- verdict?: boolean | undefined;
2356
- checkId?: string | undefined;
2357
- actionId?: string | undefined;
2358
- }[] | undefined;
2359
- signature?: {
2360
- value: string;
2361
- alg: string;
2362
- signedAt: number;
2363
- } | undefined;
2364
- disparity?: {
2365
- kind: "findable" | "discoverability" | "agent_assumption" | "defect";
2366
- goal: string;
2367
- agent: {
2368
- verified: "yes" | "no" | "unknown" | "no-fault";
2369
- claim: string;
2370
- };
2371
- harness: {
2372
- verified: "yes" | "no" | "unknown" | "no-fault";
2373
- found: boolean;
2374
- searched: string[];
2375
- gaveUpAt?: string | undefined;
2376
- };
2377
- }[] | undefined;
2378
- agentClaim?: "pass" | "fail" | "unknown" | "partial" | undefined;
2379
- }>;
823
+ }, z.core.$strip>;
2380
824
  export type ReticleVerificationRun = z.infer<typeof ReticleVerificationRunSchema>;
2381
825
  export type VerificationEvidence = z.infer<typeof VerificationEvidenceSchema>;
2382
826
  export type RunSignature = z.infer<typeof RunSignatureSchema>;