@reticlehq/core 3.7.0 → 3.8.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.
Files changed (108) hide show
  1. package/dist/activation-entry.d.ts +9 -0
  2. package/dist/activation-entry.js +9 -0
  3. package/dist/artifacts/drive-script.d.ts +64 -64
  4. package/dist/artifacts/flow-constants.d.ts +15 -0
  5. package/dist/artifacts/flow-constants.js +15 -0
  6. package/dist/artifacts/flow-expect-flat.d.ts +8 -8
  7. package/dist/artifacts/flow-results.d.ts +11 -0
  8. package/dist/artifacts/flow-types.d.ts +164 -118
  9. package/dist/artifacts/flow-types.js +12 -0
  10. package/dist/artifacts/harness-credits.d.ts +6 -3
  11. package/dist/artifacts/harness-credits.js +9 -6
  12. package/dist/artifacts/harness-map.d.ts +6 -6
  13. package/dist/artifacts/impact.d.ts +77 -80
  14. package/dist/artifacts/impact.js +34 -17
  15. package/dist/artifacts/journal.d.ts +25 -6
  16. package/dist/artifacts/journal.js +13 -0
  17. package/dist/artifacts/prompt-context.d.ts +12 -0
  18. package/dist/artifacts/prompt-context.js +14 -3
  19. package/dist/graph/app-graph.d.ts +137 -0
  20. package/dist/graph/app-graph.js +498 -0
  21. package/dist/hooks/hook-events.d.ts +22 -22
  22. package/dist/hud-entry.js +1 -1
  23. package/dist/identity/checkout.d.ts +41 -0
  24. package/dist/identity/checkout.js +118 -0
  25. package/dist/identity/state-dir.d.ts +23 -0
  26. package/dist/identity/state-dir.js +43 -0
  27. package/dist/index.d.ts +10 -0
  28. package/dist/index.js +10 -0
  29. package/dist/onboarding.d.ts +22 -1
  30. package/dist/onboarding.js +19 -0
  31. package/dist/registry/dev-server-registry.d.ts +2 -2
  32. package/dist/schema/event-message.json +3 -1
  33. package/dist/schema/event-payloads.json +116 -1
  34. package/dist/schema/event-type.json +3 -1
  35. package/dist/schema/hello-message.json +21 -0
  36. package/dist/schema/reticle-event.json +3 -1
  37. package/dist/schema/reticle-message.json +24 -1
  38. package/dist/telemetry-bug.d.ts +6 -6
  39. package/dist/telemetry-entry.d.ts +1 -1
  40. package/dist/telemetry-entry.js +1 -1
  41. package/dist/telemetry-feedback.d.ts +14 -0
  42. package/dist/telemetry-feedback.js +19 -0
  43. package/dist/telemetry-refusal.d.ts +2 -2
  44. package/dist/telemetry-session.d.ts +23 -8
  45. package/dist/telemetry-session.js +15 -4
  46. package/dist/telemetry-signals.d.ts +227 -9
  47. package/dist/telemetry-signals.js +88 -1
  48. package/dist/telemetry.d.ts +379 -72
  49. package/dist/telemetry.js +71 -5
  50. package/dist/verdict/check-sentence.d.ts +34 -0
  51. package/dist/verdict/check-sentence.js +228 -0
  52. package/dist/verdict/consequence.d.ts +15 -0
  53. package/dist/verdict/consequence.js +11 -0
  54. package/dist/verdict/findings.d.ts +10 -0
  55. package/dist/verdict/findings.js +13 -0
  56. package/dist/verdict/instrumentation-coverage.d.ts +3 -34
  57. package/dist/verdict/instrumentation-coverage.js +14 -58
  58. package/dist/verdict/instrumentation-gap.d.ts +79 -0
  59. package/dist/verdict/instrumentation-gap.js +64 -0
  60. package/dist/verdict/predicate-tree.d.ts +2 -0
  61. package/dist/verdict/predicate-tree.js +16 -0
  62. package/dist/verdict/predicate.d.ts +2 -1
  63. package/dist/verdict/predicate.js +103 -12
  64. package/dist/verdict/property-assertion.d.ts +2 -2
  65. package/dist/verdict/run-report.d.ts +166 -0
  66. package/dist/verdict/run-report.js +53 -0
  67. package/dist/verdict/security.d.ts +36 -2
  68. package/dist/verdict/security.js +94 -14
  69. package/dist/verdict/verification-run.d.ts +95 -38
  70. package/dist/verdict/verification-run.js +33 -2
  71. package/dist/verdict/verify-progress.d.ts +6 -6
  72. package/dist/wire/constants/constants.d.ts +56 -141
  73. package/dist/wire/constants/constants.js +64 -144
  74. package/dist/wire/constants/discovery.d.ts +4 -4
  75. package/dist/wire/constants/discovery.js +4 -4
  76. package/dist/wire/constants/event-types.d.ts +35 -1
  77. package/dist/wire/constants/event-types.js +33 -1
  78. package/dist/wire/constants/hud-controls.js +0 -2
  79. package/dist/wire/constants/hud-use.d.ts +4 -0
  80. package/dist/wire/constants/hud-use.js +4 -0
  81. package/dist/wire/constants/mcp-wire.d.ts +16 -0
  82. package/dist/wire/constants/mcp-wire.js +16 -0
  83. package/dist/wire/constants/response-body-reason.d.ts +19 -0
  84. package/dist/wire/constants/response-body-reason.js +18 -0
  85. package/dist/wire/constants/reticle-env.d.ts +138 -0
  86. package/dist/wire/constants/reticle-env.js +138 -0
  87. package/dist/wire/constants/session-constants.d.ts +11 -0
  88. package/dist/wire/constants/session-constants.js +11 -0
  89. package/dist/wire/event-payloads.d.ts +150 -36
  90. package/dist/wire/event-payloads.js +83 -16
  91. package/dist/wire/messages.d.ts +102 -36
  92. package/dist/wire/messages.js +16 -0
  93. package/dist/wire/narrow.d.ts +6 -0
  94. package/dist/wire/narrow.js +26 -0
  95. package/dist/wire/next-step.d.ts +90 -0
  96. package/dist/wire/next-step.js +37 -0
  97. package/dist/wire/platform-link.d.ts +7 -0
  98. package/dist/wire/platform-link.js +12 -6
  99. package/dist/wire/production/activation-ticket.d.ts +64 -0
  100. package/dist/wire/production/activation-ticket.js +148 -0
  101. package/dist/wire/production/hello-mode.d.ts +35 -0
  102. package/dist/wire/production/hello-mode.js +32 -0
  103. package/dist/wire/production/production-policy.d.ts +138 -0
  104. package/dist/wire/production/production-policy.js +133 -0
  105. package/dist/wire/tool-names.d.ts +2 -0
  106. package/dist/wire/tool-names.js +2 -0
  107. package/dist/wire/types.d.ts +73 -48
  108. package/package.json +5 -1
@@ -238,6 +238,11 @@ export declare const STEP_SCREENSHOT: {
238
238
  readonly MAX_PER_RUN: 300;
239
239
  /** The platform refuses an image larger than this, decoded. */
240
240
  readonly MAX_BYTES: number;
241
+ /**
242
+ * The `tool` of a frame: a picture taken between steps while Reticle drives a tab, about once a
243
+ * second. Frames share the run's `seq`, so the shots in `seq` order play the run as a film.
244
+ */
245
+ readonly FRAME_TOOL: "frame";
241
246
  };
242
247
  /** One step's screenshot as a run artifact records it. `file` is relative to the run's directory. */
243
248
  export declare const StepScreenshotSchema: z.ZodObject<{
@@ -345,9 +350,9 @@ export declare const RunStepResultSchema: z.ZodObject<{
345
350
  sha256: string;
346
351
  }>>;
347
352
  }, "strip", z.ZodTypeAny, {
353
+ anchor: string;
348
354
  ok: boolean;
349
355
  step: number;
350
- anchor: string;
351
356
  drift?: string | undefined;
352
357
  error?: string | undefined;
353
358
  page?: string | undefined;
@@ -361,9 +366,9 @@ export declare const RunStepResultSchema: z.ZodObject<{
361
366
  sha256: string;
362
367
  } | undefined;
363
368
  }, {
369
+ anchor: string;
364
370
  ok: boolean;
365
371
  step: number;
366
- anchor: string;
367
372
  drift?: string | undefined;
368
373
  error?: string | undefined;
369
374
  page?: string | undefined;
@@ -458,9 +463,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
458
463
  sha256: string;
459
464
  }>>;
460
465
  }, "strip", z.ZodTypeAny, {
466
+ anchor: string;
461
467
  ok: boolean;
462
468
  step: number;
463
- anchor: string;
464
469
  drift?: string | undefined;
465
470
  error?: string | undefined;
466
471
  page?: string | undefined;
@@ -474,9 +479,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
474
479
  sha256: string;
475
480
  } | undefined;
476
481
  }, {
482
+ anchor: string;
477
483
  ok: boolean;
478
484
  step: number;
479
- anchor: string;
480
485
  drift?: string | undefined;
481
486
  error?: string | undefined;
482
487
  page?: string | undefined;
@@ -504,9 +509,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
504
509
  /** True when the recording was too large to carry. */
505
510
  recordingOmitted: z.ZodOptional<z.ZodBoolean>;
506
511
  }, "strip", z.ZodTypeAny, {
512
+ name: string;
507
513
  status: "pass" | "fail" | "healed" | "skipped";
508
514
  steps: number;
509
- name: string;
510
515
  durationMs: number;
511
516
  recording?: {
512
517
  steps: unknown[];
@@ -522,9 +527,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
522
527
  evidenceRef?: string | undefined;
523
528
  failureReason?: string | undefined;
524
529
  stepResults?: {
530
+ anchor: string;
525
531
  ok: boolean;
526
532
  step: number;
527
- anchor: string;
528
533
  drift?: string | undefined;
529
534
  error?: string | undefined;
530
535
  page?: string | undefined;
@@ -540,9 +545,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
540
545
  }[] | undefined;
541
546
  recordingOmitted?: boolean | undefined;
542
547
  }, {
548
+ name: string;
543
549
  status: "pass" | "fail" | "healed" | "skipped";
544
550
  steps: number;
545
- name: string;
546
551
  durationMs: number;
547
552
  recording?: {
548
553
  steps: unknown[];
@@ -558,9 +563,9 @@ export declare const RunFlowResultSchema: z.ZodObject<{
558
563
  evidenceRef?: string | undefined;
559
564
  failureReason?: string | undefined;
560
565
  stepResults?: {
566
+ anchor: string;
561
567
  ok: boolean;
562
568
  step: number;
563
- anchor: string;
564
569
  drift?: string | undefined;
565
570
  error?: string | undefined;
566
571
  page?: string | undefined;
@@ -653,8 +658,15 @@ export declare const RunCheckSchema: z.ZodObject<{
653
658
  checkId: z.ZodOptional<z.ZodString>;
654
659
  /** The journal action that produced it, kept on this machine to pair it with its screenshot. */
655
660
  actionId: z.ZodOptional<z.ZodString>;
656
- /** The declared intent this check was taken for, by id: what it proves, named rather than timed. */
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
+ */
657
665
  intent: z.ZodOptional<z.ZodString>;
666
+ /** True when `intent` was built from the predicate, not given by the agent. */
667
+ 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
+ failedPart: z.ZodOptional<z.ZodNumber>;
658
670
  /** What the page looked like when this check was decided. */
659
671
  screenshot: z.ZodOptional<z.ZodObject<{
660
672
  file: z.ZodString;
@@ -688,6 +700,7 @@ export declare const RunCheckSchema: z.ZodObject<{
688
700
  }, "strip", z.ZodTypeAny, {
689
701
  status: "yes" | "no" | "unknown" | "no-fault";
690
702
  predicate: string;
703
+ reason?: string | undefined;
691
704
  kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
692
705
  intent?: string | undefined;
693
706
  expected?: string | undefined;
@@ -705,10 +718,12 @@ export declare const RunCheckSchema: z.ZodObject<{
705
718
  observed?: string | undefined;
706
719
  grade?: string | undefined;
707
720
  couldNotSee?: string[] | undefined;
708
- reason?: string | undefined;
721
+ intentDerived?: boolean | undefined;
722
+ failedPart?: number | undefined;
709
723
  supersedes?: string | undefined;
710
724
  }, {
711
725
  predicate: string;
726
+ reason?: string | undefined;
712
727
  kind?: unknown;
713
728
  intent?: string | undefined;
714
729
  status?: unknown;
@@ -727,7 +742,8 @@ export declare const RunCheckSchema: z.ZodObject<{
727
742
  observed?: string | undefined;
728
743
  grade?: string | undefined;
729
744
  couldNotSee?: string[] | undefined;
730
- reason?: string | undefined;
745
+ intentDerived?: boolean | undefined;
746
+ failedPart?: number | undefined;
731
747
  supersedes?: string | undefined;
732
748
  }>;
733
749
  export type RunCheck = z.infer<typeof RunCheckSchema>;
@@ -841,12 +857,12 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
841
857
  kind: z.ZodString;
842
858
  summary: z.ZodString;
843
859
  }, "strip", z.ZodTypeAny, {
844
- kind: string;
845
860
  at: number;
861
+ kind: string;
846
862
  summary: string;
847
863
  }, {
848
- kind: string;
849
864
  at: number;
865
+ kind: string;
850
866
  summary: string;
851
867
  }>, "many">>;
852
868
  }, "strip", z.ZodTypeAny, {
@@ -869,8 +885,8 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
869
885
  actual?: unknown;
870
886
  }[];
871
887
  timeline: {
872
- kind: string;
873
888
  at: number;
889
+ kind: string;
874
890
  summary: string;
875
891
  }[];
876
892
  }, {
@@ -893,8 +909,8 @@ export declare const VerificationEvidenceSchema: z.ZodObject<{
893
909
  actual?: unknown;
894
910
  }[] | undefined;
895
911
  timeline?: {
896
- kind: string;
897
912
  at: number;
913
+ kind: string;
898
914
  summary: string;
899
915
  }[] | undefined;
900
916
  }>;
@@ -1035,6 +1051,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1035
1051
  readonly OTHER: "other";
1036
1052
  }>;
1037
1053
  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
+ branch: z.ZodOptional<z.ZodString>;
1038
1060
  env: z.ZodOptional<z.ZodNativeEnum<{
1039
1061
  readonly PREVIEW: "preview";
1040
1062
  readonly CI: "ci";
@@ -1045,12 +1067,14 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1045
1067
  name: string;
1046
1068
  framework: "other" | "react" | "next" | "vite";
1047
1069
  commit?: string | undefined;
1070
+ branch?: string | undefined;
1048
1071
  env?: "ci" | "preview" | "local" | undefined;
1049
1072
  previewUrl?: string | undefined;
1050
1073
  }, {
1051
1074
  name: string;
1052
1075
  framework: "other" | "react" | "next" | "vite";
1053
1076
  commit?: string | undefined;
1077
+ branch?: string | undefined;
1054
1078
  env?: "ci" | "preview" | "local" | undefined;
1055
1079
  previewUrl?: string | undefined;
1056
1080
  }>;
@@ -1071,6 +1095,18 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1071
1095
  id: string;
1072
1096
  model?: string | undefined;
1073
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
+ */
1103
+ 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
+ agentSession: z.ZodOptional<z.ZodString>;
1074
1110
  trigger: z.ZodObject<{
1075
1111
  kind: z.ZodNativeEnum<{
1076
1112
  readonly EDIT: "edit";
@@ -1232,9 +1268,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1232
1268
  sha256: string;
1233
1269
  }>>;
1234
1270
  }, "strip", z.ZodTypeAny, {
1271
+ anchor: string;
1235
1272
  ok: boolean;
1236
1273
  step: number;
1237
- anchor: string;
1238
1274
  drift?: string | undefined;
1239
1275
  error?: string | undefined;
1240
1276
  page?: string | undefined;
@@ -1248,9 +1284,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1248
1284
  sha256: string;
1249
1285
  } | undefined;
1250
1286
  }, {
1287
+ anchor: string;
1251
1288
  ok: boolean;
1252
1289
  step: number;
1253
- anchor: string;
1254
1290
  drift?: string | undefined;
1255
1291
  error?: string | undefined;
1256
1292
  page?: string | undefined;
@@ -1278,9 +1314,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1278
1314
  /** True when the recording was too large to carry. */
1279
1315
  recordingOmitted: z.ZodOptional<z.ZodBoolean>;
1280
1316
  }, "strip", z.ZodTypeAny, {
1317
+ name: string;
1281
1318
  status: "pass" | "fail" | "healed" | "skipped";
1282
1319
  steps: number;
1283
- name: string;
1284
1320
  durationMs: number;
1285
1321
  recording?: {
1286
1322
  steps: unknown[];
@@ -1296,9 +1332,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1296
1332
  evidenceRef?: string | undefined;
1297
1333
  failureReason?: string | undefined;
1298
1334
  stepResults?: {
1335
+ anchor: string;
1299
1336
  ok: boolean;
1300
1337
  step: number;
1301
- anchor: string;
1302
1338
  drift?: string | undefined;
1303
1339
  error?: string | undefined;
1304
1340
  page?: string | undefined;
@@ -1314,9 +1350,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1314
1350
  }[] | undefined;
1315
1351
  recordingOmitted?: boolean | undefined;
1316
1352
  }, {
1353
+ name: string;
1317
1354
  status: "pass" | "fail" | "healed" | "skipped";
1318
1355
  steps: number;
1319
- name: string;
1320
1356
  durationMs: number;
1321
1357
  recording?: {
1322
1358
  steps: unknown[];
@@ -1332,9 +1368,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1332
1368
  evidenceRef?: string | undefined;
1333
1369
  failureReason?: string | undefined;
1334
1370
  stepResults?: {
1371
+ anchor: string;
1335
1372
  ok: boolean;
1336
1373
  step: number;
1337
- anchor: string;
1338
1374
  drift?: string | undefined;
1339
1375
  error?: string | undefined;
1340
1376
  page?: string | undefined;
@@ -1425,8 +1461,15 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1425
1461
  checkId: z.ZodOptional<z.ZodString>;
1426
1462
  /** The journal action that produced it, kept on this machine to pair it with its screenshot. */
1427
1463
  actionId: z.ZodOptional<z.ZodString>;
1428
- /** The declared intent this check was taken for, by id: what it proves, named rather than timed. */
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
+ */
1429
1468
  intent: z.ZodOptional<z.ZodString>;
1469
+ /** True when `intent` was built from the predicate, not given by the agent. */
1470
+ 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
+ failedPart: z.ZodOptional<z.ZodNumber>;
1430
1473
  /** What the page looked like when this check was decided. */
1431
1474
  screenshot: z.ZodOptional<z.ZodObject<{
1432
1475
  file: z.ZodString;
@@ -1460,6 +1503,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1460
1503
  }, "strip", z.ZodTypeAny, {
1461
1504
  status: "yes" | "no" | "unknown" | "no-fault";
1462
1505
  predicate: string;
1506
+ reason?: string | undefined;
1463
1507
  kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
1464
1508
  intent?: string | undefined;
1465
1509
  expected?: string | undefined;
@@ -1477,10 +1521,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1477
1521
  observed?: string | undefined;
1478
1522
  grade?: string | undefined;
1479
1523
  couldNotSee?: string[] | undefined;
1480
- reason?: string | undefined;
1524
+ intentDerived?: boolean | undefined;
1525
+ failedPart?: number | undefined;
1481
1526
  supersedes?: string | undefined;
1482
1527
  }, {
1483
1528
  predicate: string;
1529
+ reason?: string | undefined;
1484
1530
  kind?: unknown;
1485
1531
  intent?: string | undefined;
1486
1532
  status?: unknown;
@@ -1499,7 +1545,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1499
1545
  observed?: string | undefined;
1500
1546
  grade?: string | undefined;
1501
1547
  couldNotSee?: string[] | undefined;
1502
- reason?: string | undefined;
1548
+ intentDerived?: boolean | undefined;
1549
+ failedPart?: number | undefined;
1503
1550
  supersedes?: string | undefined;
1504
1551
  }>, "many">>;
1505
1552
  risks: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -1609,12 +1656,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1609
1656
  kind: z.ZodString;
1610
1657
  summary: z.ZodString;
1611
1658
  }, "strip", z.ZodTypeAny, {
1612
- kind: string;
1613
1659
  at: number;
1660
+ kind: string;
1614
1661
  summary: string;
1615
1662
  }, {
1616
- kind: string;
1617
1663
  at: number;
1664
+ kind: string;
1618
1665
  summary: string;
1619
1666
  }>, "many">>;
1620
1667
  }, "strip", z.ZodTypeAny, {
@@ -1637,8 +1684,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1637
1684
  actual?: unknown;
1638
1685
  }[];
1639
1686
  timeline: {
1640
- kind: string;
1641
1687
  at: number;
1688
+ kind: string;
1642
1689
  summary: string;
1643
1690
  }[];
1644
1691
  }, {
@@ -1661,8 +1708,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1661
1708
  actual?: unknown;
1662
1709
  }[] | undefined;
1663
1710
  timeline?: {
1664
- kind: string;
1665
1711
  at: number;
1712
+ kind: string;
1666
1713
  summary: string;
1667
1714
  }[] | undefined;
1668
1715
  }>;
@@ -1945,9 +1992,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1945
1992
  }>>;
1946
1993
  }, "strip", z.ZodTypeAny, {
1947
1994
  flows: {
1995
+ name: string;
1948
1996
  status: "pass" | "fail" | "healed" | "skipped";
1949
1997
  steps: number;
1950
- name: string;
1951
1998
  durationMs: number;
1952
1999
  recording?: {
1953
2000
  steps: unknown[];
@@ -1963,9 +2010,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
1963
2010
  evidenceRef?: string | undefined;
1964
2011
  failureReason?: string | undefined;
1965
2012
  stepResults?: {
2013
+ anchor: string;
1966
2014
  ok: boolean;
1967
2015
  step: number;
1968
- anchor: string;
1969
2016
  drift?: string | undefined;
1970
2017
  error?: string | undefined;
1971
2018
  page?: string | undefined;
@@ -2015,12 +2062,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2015
2062
  actual?: unknown;
2016
2063
  }[];
2017
2064
  timeline: {
2018
- kind: string;
2019
2065
  at: number;
2066
+ kind: string;
2020
2067
  summary: string;
2021
2068
  }[];
2022
2069
  };
2023
- schemaVersion: 1 | 2 | 3;
2070
+ schemaVersion: 2 | 1 | 3;
2024
2071
  runId: string & z.BRAND<"RunId">;
2025
2072
  createdAt: number;
2026
2073
  profile: "dev" | "prod-preview";
@@ -2028,6 +2075,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2028
2075
  name: string;
2029
2076
  framework: "other" | "react" | "next" | "vite";
2030
2077
  commit?: string | undefined;
2078
+ branch?: string | undefined;
2031
2079
  env?: "ci" | "preview" | "local" | undefined;
2032
2080
  previewUrl?: string | undefined;
2033
2081
  };
@@ -2044,6 +2092,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2044
2092
  checks: {
2045
2093
  status: "yes" | "no" | "unknown" | "no-fault";
2046
2094
  predicate: string;
2095
+ reason?: string | undefined;
2047
2096
  kind?: "signal" | "net" | "state" | "element" | "text" | "route" | "console" | "animation" | "settled" | "compare" | "allOf" | "anyOf" | "not" | undefined;
2048
2097
  intent?: string | undefined;
2049
2098
  expected?: string | undefined;
@@ -2061,7 +2110,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2061
2110
  observed?: string | undefined;
2062
2111
  grade?: string | undefined;
2063
2112
  couldNotSee?: string[] | undefined;
2064
- reason?: string | undefined;
2113
+ intentDerived?: boolean | undefined;
2114
+ failedPart?: number | undefined;
2065
2115
  supersedes?: string | undefined;
2066
2116
  }[];
2067
2117
  risks: {
@@ -2075,6 +2125,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2075
2125
  line?: number | undefined;
2076
2126
  } | undefined;
2077
2127
  }[];
2128
+ episodeId?: string | undefined;
2129
+ agentSession?: string | undefined;
2078
2130
  editEpoch?: number | undefined;
2079
2131
  subject?: {
2080
2132
  surface: string;
@@ -2166,12 +2218,12 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2166
2218
  actual?: unknown;
2167
2219
  }[] | undefined;
2168
2220
  timeline?: {
2169
- kind: string;
2170
2221
  at: number;
2222
+ kind: string;
2171
2223
  summary: string;
2172
2224
  }[] | undefined;
2173
2225
  };
2174
- schemaVersion: 1 | 2 | 3;
2226
+ schemaVersion: 2 | 1 | 3;
2175
2227
  runId: string;
2176
2228
  createdAt: number;
2177
2229
  profile: "dev" | "prod-preview";
@@ -2179,6 +2231,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2179
2231
  name: string;
2180
2232
  framework: "other" | "react" | "next" | "vite";
2181
2233
  commit?: string | undefined;
2234
+ branch?: string | undefined;
2182
2235
  env?: "ci" | "preview" | "local" | undefined;
2183
2236
  previewUrl?: string | undefined;
2184
2237
  };
@@ -2188,9 +2241,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2188
2241
  note?: string | undefined;
2189
2242
  };
2190
2243
  flows?: {
2244
+ name: string;
2191
2245
  status: "pass" | "fail" | "healed" | "skipped";
2192
2246
  steps: number;
2193
- name: string;
2194
2247
  durationMs: number;
2195
2248
  recording?: {
2196
2249
  steps: unknown[];
@@ -2206,9 +2259,9 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2206
2259
  evidenceRef?: string | undefined;
2207
2260
  failureReason?: string | undefined;
2208
2261
  stepResults?: {
2262
+ anchor: string;
2209
2263
  ok: boolean;
2210
2264
  step: number;
2211
- anchor: string;
2212
2265
  drift?: string | undefined;
2213
2266
  error?: string | undefined;
2214
2267
  page?: string | undefined;
@@ -2224,6 +2277,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2224
2277
  }[] | undefined;
2225
2278
  recordingOmitted?: boolean | undefined;
2226
2279
  }[] | undefined;
2280
+ episodeId?: string | undefined;
2281
+ agentSession?: string | undefined;
2227
2282
  editEpoch?: number | undefined;
2228
2283
  subject?: {
2229
2284
  surface: string;
@@ -2240,6 +2295,7 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2240
2295
  }[] | undefined;
2241
2296
  checks?: {
2242
2297
  predicate: string;
2298
+ reason?: string | undefined;
2243
2299
  kind?: unknown;
2244
2300
  intent?: string | undefined;
2245
2301
  status?: unknown;
@@ -2258,7 +2314,8 @@ export declare const ReticleVerificationRunSchema: z.ZodObject<{
2258
2314
  observed?: string | undefined;
2259
2315
  grade?: string | undefined;
2260
2316
  couldNotSee?: string[] | undefined;
2261
- reason?: string | undefined;
2317
+ intentDerived?: boolean | undefined;
2318
+ failedPart?: number | undefined;
2262
2319
  supersedes?: string | undefined;
2263
2320
  }[] | undefined;
2264
2321
  risks?: {
@@ -98,8 +98,9 @@ export const RunFlowStatus = {
98
98
  * a drive with nothing failed was reported "1 broken" before this rule was one rule.
99
99
  */
100
100
  export function driveFlowStatus(checks) {
101
- if (0 < checks.failed)
101
+ if (0 < checks.failed) {
102
102
  return RunFlowStatus.FAIL;
103
+ }
103
104
  return 0 < checks.held && false !== checks.goalMet ? RunFlowStatus.PASS : RunFlowStatus.SKIPPED;
104
105
  }
105
106
  /**
@@ -228,6 +229,11 @@ export const STEP_SCREENSHOT = {
228
229
  MAX_PER_RUN: 300,
229
230
  /** The platform refuses an image larger than this, decoded. */
230
231
  MAX_BYTES: 1.5 * 1024 * 1024,
232
+ /**
233
+ * The `tool` of a frame: a picture taken between steps while Reticle drives a tab, about once a
234
+ * second. Frames share the run's `seq`, so the shots in `seq` order play the run as a film.
235
+ */
236
+ FRAME_TOOL: 'frame',
231
237
  };
232
238
  /** One step's screenshot as a run artifact records it. `file` is relative to the run's directory. */
233
239
  export const StepScreenshotSchema = z.object({
@@ -352,8 +358,15 @@ export const RunCheckSchema = z.object({
352
358
  checkId: z.string().optional(),
353
359
  /** The journal action that produced it, kept on this machine to pair it with its screenshot. */
354
360
  actionId: z.string().optional(),
355
- /** The declared intent this check was taken for, by id: what it proves, named rather than timed. */
361
+ /**
362
+ * What this check proves: the agent's `intent` (a sentence, or the id of a declared intent), else a
363
+ * sentence the engine built from the predicate in the failure voice — see `intentDerived`.
364
+ */
356
365
  intent: z.string().optional(),
366
+ /** True when `intent` was built from the predicate, not given by the agent. */
367
+ intentDerived: z.boolean().optional(),
368
+ /** The index of the `allOf` part that failed, so a title can name the one thing that did not happen. */
369
+ failedPart: z.number().int().min(0).optional(),
357
370
  /** What the page looked like when this check was decided. */
358
371
  screenshot: StepScreenshotSchema.optional(),
359
372
  /**
@@ -464,6 +477,12 @@ export const ReticleVerificationRunSchema = z.object({
464
477
  name: z.string(),
465
478
  framework: z.nativeEnum(RunFramework),
466
479
  commit: z.string().optional(),
480
+ /**
481
+ * The git branch of the checkout that served the page. Several agents can drive one project at
482
+ * once, each in its own worktree; the branch tells their runs apart. Optional and additive: an
483
+ * older reader strips it and keeps the run.
484
+ */
485
+ branch: z.string().optional(),
467
486
  env: z.nativeEnum(RunEnv).optional(),
468
487
  previewUrl: z.string().optional(),
469
488
  }),
@@ -472,6 +491,18 @@ export const ReticleVerificationRunSchema = z.object({
472
491
  kind: z.nativeEnum(RunAgentKind),
473
492
  model: z.string().optional(),
474
493
  }),
494
+ /**
495
+ * The episode that produced this run: `.reticle/episodes/<episodeId>.jsonl` on the machine that
496
+ * ran it. Joins the run to every tool call the agent made, exactly. Absent when no episode was
497
+ * written (the journal off, a CI run with no agent).
498
+ */
499
+ episodeId: z.string().optional(),
500
+ /**
501
+ * The coding agent's own session id, as its MCP server announced it (Claude Code's
502
+ * `CLAUDE_CODE_SESSION_ID`, the `session_id` its hooks receive). Joins the run to the agent
503
+ * hooks' `agent-<session>.jsonl` exactly, even with two sessions of one agent in a project.
504
+ */
505
+ agentSession: z.string().optional(),
475
506
  trigger: z.object({
476
507
  kind: z.nativeEnum(RunTrigger),
477
508
  diffRef: z.string().optional(),
@@ -60,15 +60,15 @@ export declare const verifyProgressEventSchema: z.ZodObject<{
60
60
  }, "strip", z.ZodTypeAny, {
61
61
  at: number;
62
62
  phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
63
- ok?: boolean | undefined;
64
63
  name?: string | undefined;
64
+ ok?: boolean | undefined;
65
65
  total?: number | undefined;
66
66
  index?: number | undefined;
67
67
  }, {
68
68
  at: number;
69
69
  phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
70
- ok?: boolean | undefined;
71
70
  name?: string | undefined;
71
+ ok?: boolean | undefined;
72
72
  total?: number | undefined;
73
73
  index?: number | undefined;
74
74
  }>;
@@ -91,15 +91,15 @@ export declare const verifyProgressBatchSchema: z.ZodObject<{
91
91
  }, "strip", z.ZodTypeAny, {
92
92
  at: number;
93
93
  phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
94
- ok?: boolean | undefined;
95
94
  name?: string | undefined;
95
+ ok?: boolean | undefined;
96
96
  total?: number | undefined;
97
97
  index?: number | undefined;
98
98
  }, {
99
99
  at: number;
100
100
  phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
101
- ok?: boolean | undefined;
102
101
  name?: string | undefined;
102
+ ok?: boolean | undefined;
103
103
  total?: number | undefined;
104
104
  index?: number | undefined;
105
105
  }>, "many">;
@@ -108,8 +108,8 @@ export declare const verifyProgressBatchSchema: z.ZodObject<{
108
108
  events: {
109
109
  at: number;
110
110
  phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
111
- ok?: boolean | undefined;
112
111
  name?: string | undefined;
112
+ ok?: boolean | undefined;
113
113
  total?: number | undefined;
114
114
  index?: number | undefined;
115
115
  }[];
@@ -118,8 +118,8 @@ export declare const verifyProgressBatchSchema: z.ZodObject<{
118
118
  events: {
119
119
  at: number;
120
120
  phase: "connecting" | "waiting_for_app" | "flows_found" | "flow_started" | "flow_finished" | "grading" | "pushed";
121
- ok?: boolean | undefined;
122
121
  name?: string | undefined;
122
+ ok?: boolean | undefined;
123
123
  total?: number | undefined;
124
124
  index?: number | undefined;
125
125
  }[];