@reticlehq/core 3.6.0 → 3.7.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 (90) hide show
  1. package/dist/artifacts/artifacts-entry.d.ts +2 -0
  2. package/dist/artifacts/artifacts-entry.js +2 -0
  3. package/dist/artifacts/drive-script.d.ts +158 -52
  4. package/dist/artifacts/drive-script.js +24 -1
  5. package/dist/artifacts/flow-constants.d.ts +18 -0
  6. package/dist/artifacts/flow-constants.js +20 -0
  7. package/dist/artifacts/flow-results.d.ts +450 -0
  8. package/dist/artifacts/flow-results.js +1 -0
  9. package/dist/artifacts/flow-types.d.ts +25 -437
  10. package/dist/artifacts/flow-types.js +5 -2
  11. package/dist/artifacts/harness-credits.d.ts +39 -0
  12. package/dist/artifacts/harness-credits.js +69 -0
  13. package/dist/artifacts/harness-map.d.ts +98 -0
  14. package/dist/artifacts/harness-map.js +36 -0
  15. package/dist/artifacts/impact.d.ts +354 -145
  16. package/dist/artifacts/impact.js +66 -48
  17. package/dist/artifacts/journal.d.ts +56 -5
  18. package/dist/artifacts/journal.js +26 -0
  19. package/dist/artifacts/screenshot-upload.d.ts +51 -0
  20. package/dist/artifacts/screenshot-upload.js +26 -0
  21. package/dist/hooks/hook-events.d.ts +4 -4
  22. package/dist/hud-entry.d.ts +1 -0
  23. package/dist/hud-entry.js +2 -0
  24. package/dist/index.d.ts +5 -0
  25. package/dist/index.js +5 -0
  26. package/dist/onboarding.d.ts +8 -0
  27. package/dist/onboarding.js +6 -0
  28. package/dist/realm/registry.js +19 -1
  29. package/dist/schema/command-message.json +30 -0
  30. package/dist/schema/command-name.json +3 -1
  31. package/dist/schema/event-payloads.json +40 -2
  32. package/dist/schema/reticle-message.json +30 -0
  33. package/dist/telemetry-bug.d.ts +169 -0
  34. package/dist/telemetry-bug.js +123 -0
  35. package/dist/telemetry-entry.d.ts +1 -0
  36. package/dist/telemetry-entry.js +1 -0
  37. package/dist/telemetry-feedback.d.ts +2 -2
  38. package/dist/telemetry-refusal.d.ts +2 -2
  39. package/dist/telemetry-session.d.ts +74 -0
  40. package/dist/telemetry-session.js +54 -0
  41. package/dist/telemetry-signals.d.ts +339 -0
  42. package/dist/telemetry-signals.js +138 -0
  43. package/dist/telemetry.d.ts +300 -254
  44. package/dist/telemetry.js +40 -115
  45. package/dist/verdict/disparity.d.ts +105 -0
  46. package/dist/verdict/disparity.js +40 -0
  47. package/dist/verdict/findings.d.ts +6 -0
  48. package/dist/verdict/findings.js +9 -0
  49. package/dist/verdict/instrumentation-coverage.d.ts +115 -0
  50. package/dist/verdict/instrumentation-coverage.js +226 -0
  51. package/dist/verdict/instrumentation-gap.js +1 -1
  52. package/dist/verdict/intent.d.ts +19 -5
  53. package/dist/verdict/intent.js +13 -1
  54. package/dist/verdict/predicate-tree.d.ts +15 -0
  55. package/dist/verdict/predicate-tree.js +21 -0
  56. package/dist/verdict/predicate.d.ts +14 -0
  57. package/dist/verdict/predicate.js +87 -3
  58. package/dist/verdict/security.d.ts +25 -0
  59. package/dist/verdict/security.js +82 -0
  60. package/dist/verdict/verification-run.d.ts +620 -32
  61. package/dist/verdict/verification-run.js +82 -0
  62. package/dist/wire/constants/constants.d.ts +15 -16
  63. package/dist/wire/constants/constants.js +16 -17
  64. package/dist/wire/constants/hud-controls.js +17 -5
  65. package/dist/wire/constants/hud-use.d.ts +29 -4
  66. package/dist/wire/constants/hud-use.js +26 -4
  67. package/dist/wire/constants/mcp-wire.d.ts +10 -0
  68. package/dist/wire/constants/mcp-wire.js +10 -0
  69. package/dist/wire/constants/reticle-chrome.d.ts +19 -0
  70. package/dist/wire/constants/reticle-chrome.js +19 -0
  71. package/dist/wire/constants/session-constants.d.ts +15 -2
  72. package/dist/wire/constants/session-constants.js +15 -2
  73. package/dist/wire/desktop-contract.d.ts +8 -0
  74. package/dist/wire/desktop-contract.js +11 -0
  75. package/dist/wire/event-payloads.d.ts +56 -4
  76. package/dist/wire/event-payloads.js +17 -0
  77. package/dist/wire/messages.d.ts +105 -32
  78. package/dist/wire/messages.js +9 -1
  79. package/dist/wire/platform-link.d.ts +77 -0
  80. package/dist/wire/platform-link.js +45 -0
  81. package/dist/wire/tool-names.d.ts +2 -0
  82. package/dist/wire/tool-names.js +2 -0
  83. package/dist/wire/types.d.ts +19 -6
  84. package/dist/wire/types.js +5 -0
  85. package/dist/words/notices.d.ts +1 -1
  86. package/dist/words/notices.js +1 -1
  87. package/dist/words/upgrade.js +1 -1
  88. package/dist/words/writing-rule.d.ts +14 -0
  89. package/dist/words/writing-rule.js +17 -0
  90. package/package.json +1 -1
@@ -255,13 +255,13 @@ export declare const ImpactDefectSchema: z.ZodObject<{
255
255
  }, "strip", z.ZodTypeAny, {
256
256
  at: number;
257
257
  title: string;
258
- detail?: string | undefined;
259
258
  source?: string | undefined;
259
+ detail?: string | undefined;
260
260
  }, {
261
261
  at: number;
262
262
  title: string;
263
- detail?: string | undefined;
264
263
  source?: string | undefined;
264
+ detail?: string | undefined;
265
265
  }>;
266
266
  export type ImpactDefect = z.infer<typeof ImpactDefectSchema>;
267
267
  /** One scope of the record: this project, or everything on this machine. */
@@ -470,13 +470,13 @@ export declare const ImpactScopeSchema: z.ZodObject<{
470
470
  }, "strip", z.ZodTypeAny, {
471
471
  at: number;
472
472
  title: string;
473
- detail?: string | undefined;
474
473
  source?: string | undefined;
474
+ detail?: string | undefined;
475
475
  }, {
476
476
  at: number;
477
477
  title: string;
478
- detail?: string | undefined;
479
478
  source?: string | undefined;
479
+ detail?: string | undefined;
480
480
  }>, "many">>;
481
481
  }, "strip", z.ZodTypeAny, {
482
482
  since: number;
@@ -527,8 +527,8 @@ export declare const ImpactScopeSchema: z.ZodObject<{
527
527
  defects: {
528
528
  at: number;
529
529
  title: string;
530
- detail?: string | undefined;
531
530
  source?: string | undefined;
531
+ detail?: string | undefined;
532
532
  }[];
533
533
  }, {
534
534
  since: number;
@@ -579,8 +579,8 @@ export declare const ImpactScopeSchema: z.ZodObject<{
579
579
  defects?: {
580
580
  at: number;
581
581
  title: string;
582
- detail?: string | undefined;
583
582
  source?: string | undefined;
583
+ detail?: string | undefined;
584
584
  }[] | undefined;
585
585
  }>;
586
586
  export type ImpactScope = z.infer<typeof ImpactScopeSchema>;
@@ -620,62 +620,13 @@ export declare const AccountStateSchema: z.ZodObject<{
620
620
  host?: string | undefined;
621
621
  }>;
622
622
  export type AccountState = z.infer<typeof AccountStateSchema>;
623
- /**
624
- * The standing offer on the autonomous harness, as the daemon last heard it from the platform.
625
- *
626
- * `claimed` is the only field that decides whether anything is shown, and ABSENCE of this whole
627
- * object means "we do not know" — never "not claimed". That distinction is the difference between
628
- * an offer and a nag: a machine that is offline, unlinked, or paired with an older daemon has not
629
- * told us the person still needs this, and advertising at them anyway is how a dev-only HUD gets
630
- * switched off for good. The account field beside this one already carries that warning; it applies
631
- * here with more force, because this one is marketing.
632
- */
633
- export declare const HarnessOfferSchema: z.ZodObject<{
634
- /** True once this org has claimed. A claimed offer is shown as remaining time, never as a pitch. */
635
- claimed: z.ZodBoolean;
636
- /** When the free period ends, epoch ms. Absent when nothing has been claimed. */
637
- expiresAt: z.ZodOptional<z.ZodNumber>;
638
- /** Whole days left, already computed — the HUD has no clock worth trusting for this. */
639
- daysRemaining: z.ZodOptional<z.ZodNumber>;
640
- /** Where claiming happens. Absent ⇒ the HUD shows nothing, because a pitch with no door is noise. */
641
- claimUrl: z.ZodOptional<z.ZodString>;
642
- /**
643
- * Whether a drive could actually run if the offer were taken.
644
- *
645
- * Entitlement is not readiness. A workspace can be fully entitled against a deployment that holds
646
- * no key for its provider, and then every signal reads healthy while a drive cannot start —
647
- * including the card, which would sell three free months of something unusable and burn the one
648
- * claim the person gets. Absent means "not told", which is treated as drivable for the same
649
- * reason `claimed` is required and the rest are not: silence from an older platform must not
650
- * switch the feature off.
651
- */
652
- drivable: z.ZodOptional<z.ZodBoolean>;
653
- /**
654
- * Whether claiming would still grant anything.
655
- *
656
- * Carried separately because `claimed` is "running RIGHT NOW", and an expired free period reads
657
- * `claimed: false` — the same as never having taken it. Without this the HUD would advertise a
658
- * three-month offer to the one group of people who can never accept it again, which is worse than
659
- * saying nothing at all. Absent ⇒ treated as still offerable: an older platform that does not
660
- * report it also has no expiries to get wrong.
661
- */
662
- eligible: z.ZodOptional<z.ZodBoolean>;
663
- }, "strip", z.ZodTypeAny, {
664
- claimed: boolean;
665
- expiresAt?: number | undefined;
666
- daysRemaining?: number | undefined;
667
- claimUrl?: string | undefined;
668
- drivable?: boolean | undefined;
669
- eligible?: boolean | undefined;
670
- }, {
671
- claimed: boolean;
672
- expiresAt?: number | undefined;
673
- daysRemaining?: number | undefined;
674
- claimUrl?: string | undefined;
675
- drivable?: boolean | undefined;
676
- eligible?: boolean | undefined;
677
- }>;
678
- export type HarnessOffer = z.infer<typeof HarnessOfferSchema>;
623
+ /** The grant Harness credits came from: sign-up, the card-started trial, or a paid plan. */
624
+ export declare const CreditKind: {
625
+ readonly FREE: "free";
626
+ readonly TRIAL: "trial";
627
+ readonly PAID: "paid";
628
+ };
629
+ export type CreditKind = (typeof CreditKind)[keyof typeof CreditKind];
679
630
  /**
680
631
  * What the platform says about autonomous driving for this project.
681
632
  *
@@ -684,7 +635,7 @@ export type HarnessOffer = z.infer<typeof HarnessOfferSchema>;
684
635
  */
685
636
  export declare const HarnessConfigSchema: z.ZodObject<{
686
637
  provider: z.ZodString;
687
- /** The switch somebody set. The platform's default is on. */
638
+ /** The switch somebody set. Off for a new project: the Harness is opt-in. */
688
639
  harnessEnabled: z.ZodBoolean;
689
640
  /** Whether this workspace may drive on OUR model spend. Never folded into the switch. */
690
641
  harnessEntitled: z.ZodBoolean;
@@ -694,37 +645,179 @@ export declare const HarnessConfigSchema: z.ZodObject<{
694
645
  credits: z.ZodOptional<z.ZodObject<{
695
646
  used: z.ZodNumber;
696
647
  limit: z.ZodNumber;
648
+ /** The grant they came from. Optional on the wire: an older platform omits it. */
649
+ kind: z.ZodOptional<z.ZodEnum<["free", "trial", "paid"]>>;
650
+ /** Whole days the grant has left, counted by the daemon from the platform's end date. */
651
+ daysLeft: z.ZodOptional<z.ZodNumber>;
697
652
  }, "strip", z.ZodTypeAny, {
698
653
  used: number;
699
654
  limit: number;
655
+ kind?: "free" | "trial" | "paid" | undefined;
656
+ daysLeft?: number | undefined;
700
657
  }, {
701
658
  used: number;
702
659
  limit: number;
660
+ kind?: "free" | "trial" | "paid" | undefined;
661
+ daysLeft?: number | undefined;
703
662
  }>>;
704
663
  /** The platform this answer came from, so the HUD's links go there and not to the hosted one. */
705
664
  platformUrl: z.ZodOptional<z.ZodString>;
665
+ /**
666
+ * The platform's own Harness coverage gate, which it enforces. The HUD prefers it to the daemon's
667
+ * local score; absent from an older platform, which leaves the local score to decide.
668
+ */
669
+ gate: z.ZodOptional<z.ZodObject<{
670
+ unlocked: z.ZodBoolean;
671
+ /** floor(score × 100); absent before any app reported. */
672
+ percent: z.ZodOptional<z.ZodNumber>;
673
+ reason: z.ZodOptional<z.ZodString>;
674
+ prompt: z.ZodOptional<z.ZodString>;
675
+ }, "strip", z.ZodTypeAny, {
676
+ unlocked: boolean;
677
+ reason?: string | undefined;
678
+ percent?: number | undefined;
679
+ prompt?: string | undefined;
680
+ }, {
681
+ unlocked: boolean;
682
+ reason?: string | undefined;
683
+ percent?: number | undefined;
684
+ prompt?: string | undefined;
685
+ }>>;
686
+ /** The plan in force: which grant, trial days left, seats. Absent from a platform that sent none. */
687
+ plan: z.ZodOptional<z.ZodObject<{
688
+ kind: z.ZodEnum<["free", "trial", "paid"]>;
689
+ daysLeft: z.ZodOptional<z.ZodNumber>;
690
+ seats: z.ZodOptional<z.ZodNumber>;
691
+ }, "strip", z.ZodTypeAny, {
692
+ kind: "free" | "trial" | "paid";
693
+ daysLeft?: number | undefined;
694
+ seats?: number | undefined;
695
+ }, {
696
+ kind: "free" | "trial" | "paid";
697
+ daysLeft?: number | undefined;
698
+ seats?: number | undefined;
699
+ }>>;
700
+ /** Harness runs the platform holds for this project. Absent: the platform did not say. */
701
+ harnessRuns: z.ZodOptional<z.ZodNumber>;
702
+ /** Memory entries the platform holds for this project. Absent: the platform did not say. */
703
+ memoryEntries: z.ZodOptional<z.ZodNumber>;
706
704
  }, "strip", z.ZodTypeAny, {
707
705
  provider: string;
708
706
  harnessEnabled: boolean;
709
707
  harnessEntitled: boolean;
708
+ plan?: {
709
+ kind: "free" | "trial" | "paid";
710
+ daysLeft?: number | undefined;
711
+ seats?: number | undefined;
712
+ } | undefined;
710
713
  providerReady?: boolean | undefined;
711
714
  credits?: {
712
715
  used: number;
713
716
  limit: number;
717
+ kind?: "free" | "trial" | "paid" | undefined;
718
+ daysLeft?: number | undefined;
714
719
  } | undefined;
715
720
  platformUrl?: string | undefined;
721
+ gate?: {
722
+ unlocked: boolean;
723
+ reason?: string | undefined;
724
+ percent?: number | undefined;
725
+ prompt?: string | undefined;
726
+ } | undefined;
727
+ harnessRuns?: number | undefined;
728
+ memoryEntries?: number | undefined;
716
729
  }, {
717
730
  provider: string;
718
731
  harnessEnabled: boolean;
719
732
  harnessEntitled: boolean;
733
+ plan?: {
734
+ kind: "free" | "trial" | "paid";
735
+ daysLeft?: number | undefined;
736
+ seats?: number | undefined;
737
+ } | undefined;
720
738
  providerReady?: boolean | undefined;
721
739
  credits?: {
722
740
  used: number;
723
741
  limit: number;
742
+ kind?: "free" | "trial" | "paid" | undefined;
743
+ daysLeft?: number | undefined;
724
744
  } | undefined;
725
745
  platformUrl?: string | undefined;
746
+ gate?: {
747
+ unlocked: boolean;
748
+ reason?: string | undefined;
749
+ percent?: number | undefined;
750
+ prompt?: string | undefined;
751
+ } | undefined;
752
+ harnessRuns?: number | undefined;
753
+ memoryEntries?: number | undefined;
726
754
  }>;
727
755
  export type HarnessConfig = z.infer<typeof HarnessConfigSchema>;
756
+ /** The Harness drive running in this tab's project, so the panel can show progress and Stop. */
757
+ export declare const HarnessDriveSchema: z.ZodObject<{
758
+ runId: z.ZodString;
759
+ steps: z.ZodNumber;
760
+ }, "strip", z.ZodTypeAny, {
761
+ steps: number;
762
+ runId: string;
763
+ }, {
764
+ steps: number;
765
+ runId: string;
766
+ }>;
767
+ export type HarnessDrive = z.infer<typeof HarnessDriveSchema>;
768
+ /** The longest note a person can send their coding agent from the HUD. */
769
+ export declare const AGENT_NOTE_MAX = 500;
770
+ /** How many of a tab's latest notes the HUD shows. */
771
+ export declare const AGENT_NOTES_SHOWN = 5;
772
+ /** A note sent to the coding agent from this tab. `seen` only once an agent's tool call took it. */
773
+ export declare const AgentNoteSchema: z.ZodObject<{
774
+ text: z.ZodString;
775
+ seen: z.ZodBoolean;
776
+ /** Which agent took it, when the daemon knows. */
777
+ by: z.ZodOptional<z.ZodString>;
778
+ }, "strip", z.ZodTypeAny, {
779
+ text: string;
780
+ seen: boolean;
781
+ by?: string | undefined;
782
+ }, {
783
+ text: string;
784
+ seen: boolean;
785
+ by?: string | undefined;
786
+ }>;
787
+ export type AgentNote = z.infer<typeof AgentNoteSchema>;
788
+ /** The coding agents attached to the daemon now (friendly names), and this tab's latest notes. */
789
+ export declare const AgentLinkSchema: z.ZodObject<{
790
+ agents: z.ZodArray<z.ZodString, "many">;
791
+ notes: z.ZodArray<z.ZodObject<{
792
+ text: z.ZodString;
793
+ seen: z.ZodBoolean;
794
+ /** Which agent took it, when the daemon knows. */
795
+ by: z.ZodOptional<z.ZodString>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ text: string;
798
+ seen: boolean;
799
+ by?: string | undefined;
800
+ }, {
801
+ text: string;
802
+ seen: boolean;
803
+ by?: string | undefined;
804
+ }>, "many">;
805
+ }, "strip", z.ZodTypeAny, {
806
+ notes: {
807
+ text: string;
808
+ seen: boolean;
809
+ by?: string | undefined;
810
+ }[];
811
+ agents: string[];
812
+ }, {
813
+ notes: {
814
+ text: string;
815
+ seen: boolean;
816
+ by?: string | undefined;
817
+ }[];
818
+ agents: string[];
819
+ }>;
820
+ export type AgentLink = z.infer<typeof AgentLinkSchema>;
728
821
  export declare const ImpactSnapshotSchema: z.ZodObject<{
729
822
  schemaVersion: z.ZodNumber;
730
823
  project: z.ZodObject<{
@@ -932,13 +1025,13 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
932
1025
  }, "strip", z.ZodTypeAny, {
933
1026
  at: number;
934
1027
  title: string;
935
- detail?: string | undefined;
936
1028
  source?: string | undefined;
1029
+ detail?: string | undefined;
937
1030
  }, {
938
1031
  at: number;
939
1032
  title: string;
940
- detail?: string | undefined;
941
1033
  source?: string | undefined;
1034
+ detail?: string | undefined;
942
1035
  }>, "many">>;
943
1036
  }, "strip", z.ZodTypeAny, {
944
1037
  since: number;
@@ -989,8 +1082,8 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
989
1082
  defects: {
990
1083
  at: number;
991
1084
  title: string;
992
- detail?: string | undefined;
993
1085
  source?: string | undefined;
1086
+ detail?: string | undefined;
994
1087
  }[];
995
1088
  }, {
996
1089
  since: number;
@@ -1041,8 +1134,8 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1041
1134
  defects?: {
1042
1135
  at: number;
1043
1136
  title: string;
1044
- detail?: string | undefined;
1045
1137
  source?: string | undefined;
1138
+ detail?: string | undefined;
1046
1139
  }[] | undefined;
1047
1140
  }>;
1048
1141
  global: z.ZodObject<{
@@ -1250,13 +1343,13 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1250
1343
  }, "strip", z.ZodTypeAny, {
1251
1344
  at: number;
1252
1345
  title: string;
1253
- detail?: string | undefined;
1254
1346
  source?: string | undefined;
1347
+ detail?: string | undefined;
1255
1348
  }, {
1256
1349
  at: number;
1257
1350
  title: string;
1258
- detail?: string | undefined;
1259
1351
  source?: string | undefined;
1352
+ detail?: string | undefined;
1260
1353
  }>, "many">>;
1261
1354
  }, "strip", z.ZodTypeAny, {
1262
1355
  since: number;
@@ -1307,8 +1400,8 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1307
1400
  defects: {
1308
1401
  at: number;
1309
1402
  title: string;
1310
- detail?: string | undefined;
1311
1403
  source?: string | undefined;
1404
+ detail?: string | undefined;
1312
1405
  }[];
1313
1406
  }, {
1314
1407
  since: number;
@@ -1359,8 +1452,8 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1359
1452
  defects?: {
1360
1453
  at: number;
1361
1454
  title: string;
1362
- detail?: string | undefined;
1363
1455
  source?: string | undefined;
1456
+ detail?: string | undefined;
1364
1457
  }[] | undefined;
1365
1458
  }>;
1366
1459
  /** Project name, for the report's title row. */
@@ -1392,55 +1485,6 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1392
1485
  org?: string | undefined;
1393
1486
  host?: string | undefined;
1394
1487
  }>>;
1395
- /**
1396
- * The harness offer, when the daemon knows it. Absent is "unknown" and shows nothing — see
1397
- * `HarnessOfferSchema` for why that asymmetry is deliberate.
1398
- */
1399
- harnessOffer: z.ZodOptional<z.ZodObject<{
1400
- /** True once this org has claimed. A claimed offer is shown as remaining time, never as a pitch. */
1401
- claimed: z.ZodBoolean;
1402
- /** When the free period ends, epoch ms. Absent when nothing has been claimed. */
1403
- expiresAt: z.ZodOptional<z.ZodNumber>;
1404
- /** Whole days left, already computed — the HUD has no clock worth trusting for this. */
1405
- daysRemaining: z.ZodOptional<z.ZodNumber>;
1406
- /** Where claiming happens. Absent ⇒ the HUD shows nothing, because a pitch with no door is noise. */
1407
- claimUrl: z.ZodOptional<z.ZodString>;
1408
- /**
1409
- * Whether a drive could actually run if the offer were taken.
1410
- *
1411
- * Entitlement is not readiness. A workspace can be fully entitled against a deployment that holds
1412
- * no key for its provider, and then every signal reads healthy while a drive cannot start —
1413
- * including the card, which would sell three free months of something unusable and burn the one
1414
- * claim the person gets. Absent means "not told", which is treated as drivable for the same
1415
- * reason `claimed` is required and the rest are not: silence from an older platform must not
1416
- * switch the feature off.
1417
- */
1418
- drivable: z.ZodOptional<z.ZodBoolean>;
1419
- /**
1420
- * Whether claiming would still grant anything.
1421
- *
1422
- * Carried separately because `claimed` is "running RIGHT NOW", and an expired free period reads
1423
- * `claimed: false` — the same as never having taken it. Without this the HUD would advertise a
1424
- * three-month offer to the one group of people who can never accept it again, which is worse than
1425
- * saying nothing at all. Absent ⇒ treated as still offerable: an older platform that does not
1426
- * report it also has no expiries to get wrong.
1427
- */
1428
- eligible: z.ZodOptional<z.ZodBoolean>;
1429
- }, "strip", z.ZodTypeAny, {
1430
- claimed: boolean;
1431
- expiresAt?: number | undefined;
1432
- daysRemaining?: number | undefined;
1433
- claimUrl?: string | undefined;
1434
- drivable?: boolean | undefined;
1435
- eligible?: boolean | undefined;
1436
- }, {
1437
- claimed: boolean;
1438
- expiresAt?: number | undefined;
1439
- daysRemaining?: number | undefined;
1440
- claimUrl?: string | undefined;
1441
- drivable?: boolean | undefined;
1442
- eligible?: boolean | undefined;
1443
- }>>;
1444
1488
  /**
1445
1489
  * The harness switch and whether this workspace may drive on our spend.
1446
1490
  *
@@ -1455,7 +1499,7 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1455
1499
  */
1456
1500
  harnessConfig: z.ZodOptional<z.ZodObject<{
1457
1501
  provider: z.ZodString;
1458
- /** The switch somebody set. The platform's default is on. */
1502
+ /** The switch somebody set. Off for a new project: the Harness is opt-in. */
1459
1503
  harnessEnabled: z.ZodBoolean;
1460
1504
  /** Whether this workspace may drive on OUR model spend. Never folded into the switch. */
1461
1505
  harnessEntitled: z.ZodBoolean;
@@ -1465,35 +1509,155 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1465
1509
  credits: z.ZodOptional<z.ZodObject<{
1466
1510
  used: z.ZodNumber;
1467
1511
  limit: z.ZodNumber;
1512
+ /** The grant they came from. Optional on the wire: an older platform omits it. */
1513
+ kind: z.ZodOptional<z.ZodEnum<["free", "trial", "paid"]>>;
1514
+ /** Whole days the grant has left, counted by the daemon from the platform's end date. */
1515
+ daysLeft: z.ZodOptional<z.ZodNumber>;
1468
1516
  }, "strip", z.ZodTypeAny, {
1469
1517
  used: number;
1470
1518
  limit: number;
1519
+ kind?: "free" | "trial" | "paid" | undefined;
1520
+ daysLeft?: number | undefined;
1471
1521
  }, {
1472
1522
  used: number;
1473
1523
  limit: number;
1524
+ kind?: "free" | "trial" | "paid" | undefined;
1525
+ daysLeft?: number | undefined;
1474
1526
  }>>;
1475
1527
  /** The platform this answer came from, so the HUD's links go there and not to the hosted one. */
1476
1528
  platformUrl: z.ZodOptional<z.ZodString>;
1529
+ /**
1530
+ * The platform's own Harness coverage gate, which it enforces. The HUD prefers it to the daemon's
1531
+ * local score; absent from an older platform, which leaves the local score to decide.
1532
+ */
1533
+ gate: z.ZodOptional<z.ZodObject<{
1534
+ unlocked: z.ZodBoolean;
1535
+ /** floor(score × 100); absent before any app reported. */
1536
+ percent: z.ZodOptional<z.ZodNumber>;
1537
+ reason: z.ZodOptional<z.ZodString>;
1538
+ prompt: z.ZodOptional<z.ZodString>;
1539
+ }, "strip", z.ZodTypeAny, {
1540
+ unlocked: boolean;
1541
+ reason?: string | undefined;
1542
+ percent?: number | undefined;
1543
+ prompt?: string | undefined;
1544
+ }, {
1545
+ unlocked: boolean;
1546
+ reason?: string | undefined;
1547
+ percent?: number | undefined;
1548
+ prompt?: string | undefined;
1549
+ }>>;
1550
+ /** The plan in force: which grant, trial days left, seats. Absent from a platform that sent none. */
1551
+ plan: z.ZodOptional<z.ZodObject<{
1552
+ kind: z.ZodEnum<["free", "trial", "paid"]>;
1553
+ daysLeft: z.ZodOptional<z.ZodNumber>;
1554
+ seats: z.ZodOptional<z.ZodNumber>;
1555
+ }, "strip", z.ZodTypeAny, {
1556
+ kind: "free" | "trial" | "paid";
1557
+ daysLeft?: number | undefined;
1558
+ seats?: number | undefined;
1559
+ }, {
1560
+ kind: "free" | "trial" | "paid";
1561
+ daysLeft?: number | undefined;
1562
+ seats?: number | undefined;
1563
+ }>>;
1564
+ /** Harness runs the platform holds for this project. Absent: the platform did not say. */
1565
+ harnessRuns: z.ZodOptional<z.ZodNumber>;
1566
+ /** Memory entries the platform holds for this project. Absent: the platform did not say. */
1567
+ memoryEntries: z.ZodOptional<z.ZodNumber>;
1477
1568
  }, "strip", z.ZodTypeAny, {
1478
1569
  provider: string;
1479
1570
  harnessEnabled: boolean;
1480
1571
  harnessEntitled: boolean;
1572
+ plan?: {
1573
+ kind: "free" | "trial" | "paid";
1574
+ daysLeft?: number | undefined;
1575
+ seats?: number | undefined;
1576
+ } | undefined;
1481
1577
  providerReady?: boolean | undefined;
1482
1578
  credits?: {
1483
1579
  used: number;
1484
1580
  limit: number;
1581
+ kind?: "free" | "trial" | "paid" | undefined;
1582
+ daysLeft?: number | undefined;
1485
1583
  } | undefined;
1486
1584
  platformUrl?: string | undefined;
1585
+ gate?: {
1586
+ unlocked: boolean;
1587
+ reason?: string | undefined;
1588
+ percent?: number | undefined;
1589
+ prompt?: string | undefined;
1590
+ } | undefined;
1591
+ harnessRuns?: number | undefined;
1592
+ memoryEntries?: number | undefined;
1487
1593
  }, {
1488
1594
  provider: string;
1489
1595
  harnessEnabled: boolean;
1490
1596
  harnessEntitled: boolean;
1597
+ plan?: {
1598
+ kind: "free" | "trial" | "paid";
1599
+ daysLeft?: number | undefined;
1600
+ seats?: number | undefined;
1601
+ } | undefined;
1491
1602
  providerReady?: boolean | undefined;
1492
1603
  credits?: {
1493
1604
  used: number;
1494
1605
  limit: number;
1606
+ kind?: "free" | "trial" | "paid" | undefined;
1607
+ daysLeft?: number | undefined;
1495
1608
  } | undefined;
1496
1609
  platformUrl?: string | undefined;
1610
+ gate?: {
1611
+ unlocked: boolean;
1612
+ reason?: string | undefined;
1613
+ percent?: number | undefined;
1614
+ prompt?: string | undefined;
1615
+ } | undefined;
1616
+ harnessRuns?: number | undefined;
1617
+ memoryEntries?: number | undefined;
1618
+ }>>;
1619
+ /** The drive running now, when there is one. Absent: nothing is driving. */
1620
+ harnessDrive: z.ZodOptional<z.ZodObject<{
1621
+ runId: z.ZodString;
1622
+ steps: z.ZodNumber;
1623
+ }, "strip", z.ZodTypeAny, {
1624
+ steps: number;
1625
+ runId: string;
1626
+ }, {
1627
+ steps: number;
1628
+ runId: string;
1629
+ }>>;
1630
+ /** Who is coding against this daemon, and what this tab said to them. Absent: an older daemon. */
1631
+ agent: z.ZodOptional<z.ZodObject<{
1632
+ agents: z.ZodArray<z.ZodString, "many">;
1633
+ notes: z.ZodArray<z.ZodObject<{
1634
+ text: z.ZodString;
1635
+ seen: z.ZodBoolean;
1636
+ /** Which agent took it, when the daemon knows. */
1637
+ by: z.ZodOptional<z.ZodString>;
1638
+ }, "strip", z.ZodTypeAny, {
1639
+ text: string;
1640
+ seen: boolean;
1641
+ by?: string | undefined;
1642
+ }, {
1643
+ text: string;
1644
+ seen: boolean;
1645
+ by?: string | undefined;
1646
+ }>, "many">;
1647
+ }, "strip", z.ZodTypeAny, {
1648
+ notes: {
1649
+ text: string;
1650
+ seen: boolean;
1651
+ by?: string | undefined;
1652
+ }[];
1653
+ agents: string[];
1654
+ }, {
1655
+ notes: {
1656
+ text: string;
1657
+ seen: boolean;
1658
+ by?: string | undefined;
1659
+ }[];
1660
+ agents: string[];
1497
1661
  }>>;
1498
1662
  /**
1499
1663
  * The rail's notices, already chosen for this machine by the daemon (see `hud-notices.ts`).
@@ -1514,6 +1678,11 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1514
1678
  * push, and the sentence describing it). Loose here, shaped by the daemon's sync-status.
1515
1679
  */
1516
1680
  sync: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1681
+ /**
1682
+ * How much of THIS tab's app Reticle sees, and the prompt that asks a coding agent to close the
1683
+ * rest (`covered`, `total`, `missing`, `prompt`). Loose here, shaped by the daemon's coverageOf.
1684
+ */
1685
+ instrumentation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1517
1686
  }, "strip", z.ZodTypeAny, {
1518
1687
  schemaVersion: number;
1519
1688
  project: {
@@ -1565,8 +1734,8 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1565
1734
  defects: {
1566
1735
  at: number;
1567
1736
  title: string;
1568
- detail?: string | undefined;
1569
1737
  source?: string | undefined;
1738
+ detail?: string | undefined;
1570
1739
  }[];
1571
1740
  };
1572
1741
  global: {
@@ -1618,37 +1787,57 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1618
1787
  defects: {
1619
1788
  at: number;
1620
1789
  title: string;
1621
- detail?: string | undefined;
1622
1790
  source?: string | undefined;
1791
+ detail?: string | undefined;
1623
1792
  }[];
1624
1793
  };
1794
+ agent?: {
1795
+ notes: {
1796
+ text: string;
1797
+ seen: boolean;
1798
+ by?: string | undefined;
1799
+ }[];
1800
+ agents: string[];
1801
+ } | undefined;
1625
1802
  sync?: Record<string, unknown> | undefined;
1626
- projectName?: string | undefined;
1627
- dashboardUrl?: string | undefined;
1628
1803
  account?: {
1629
1804
  signedIn: boolean;
1630
1805
  email?: string | undefined;
1631
1806
  org?: string | undefined;
1632
1807
  host?: string | undefined;
1633
1808
  } | undefined;
1634
- harnessOffer?: {
1635
- claimed: boolean;
1636
- expiresAt?: number | undefined;
1637
- daysRemaining?: number | undefined;
1638
- claimUrl?: string | undefined;
1639
- drivable?: boolean | undefined;
1640
- eligible?: boolean | undefined;
1641
- } | undefined;
1809
+ instrumentation?: Record<string, unknown> | undefined;
1810
+ projectName?: string | undefined;
1811
+ dashboardUrl?: string | undefined;
1642
1812
  harnessConfig?: {
1643
1813
  provider: string;
1644
1814
  harnessEnabled: boolean;
1645
1815
  harnessEntitled: boolean;
1816
+ plan?: {
1817
+ kind: "free" | "trial" | "paid";
1818
+ daysLeft?: number | undefined;
1819
+ seats?: number | undefined;
1820
+ } | undefined;
1646
1821
  providerReady?: boolean | undefined;
1647
1822
  credits?: {
1648
1823
  used: number;
1649
1824
  limit: number;
1825
+ kind?: "free" | "trial" | "paid" | undefined;
1826
+ daysLeft?: number | undefined;
1650
1827
  } | undefined;
1651
1828
  platformUrl?: string | undefined;
1829
+ gate?: {
1830
+ unlocked: boolean;
1831
+ reason?: string | undefined;
1832
+ percent?: number | undefined;
1833
+ prompt?: string | undefined;
1834
+ } | undefined;
1835
+ harnessRuns?: number | undefined;
1836
+ memoryEntries?: number | undefined;
1837
+ } | undefined;
1838
+ harnessDrive?: {
1839
+ steps: number;
1840
+ runId: string;
1652
1841
  } | undefined;
1653
1842
  notices?: unknown[] | undefined;
1654
1843
  coverage?: Record<string, number> | undefined;
@@ -1703,8 +1892,8 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1703
1892
  defects?: {
1704
1893
  at: number;
1705
1894
  title: string;
1706
- detail?: string | undefined;
1707
1895
  source?: string | undefined;
1896
+ detail?: string | undefined;
1708
1897
  }[] | undefined;
1709
1898
  };
1710
1899
  global: {
@@ -1756,37 +1945,57 @@ export declare const ImpactSnapshotSchema: z.ZodObject<{
1756
1945
  defects?: {
1757
1946
  at: number;
1758
1947
  title: string;
1759
- detail?: string | undefined;
1760
1948
  source?: string | undefined;
1949
+ detail?: string | undefined;
1761
1950
  }[] | undefined;
1762
1951
  };
1952
+ agent?: {
1953
+ notes: {
1954
+ text: string;
1955
+ seen: boolean;
1956
+ by?: string | undefined;
1957
+ }[];
1958
+ agents: string[];
1959
+ } | undefined;
1763
1960
  sync?: Record<string, unknown> | undefined;
1764
- projectName?: string | undefined;
1765
- dashboardUrl?: string | undefined;
1766
1961
  account?: {
1767
1962
  signedIn: boolean;
1768
1963
  email?: string | undefined;
1769
1964
  org?: string | undefined;
1770
1965
  host?: string | undefined;
1771
1966
  } | undefined;
1772
- harnessOffer?: {
1773
- claimed: boolean;
1774
- expiresAt?: number | undefined;
1775
- daysRemaining?: number | undefined;
1776
- claimUrl?: string | undefined;
1777
- drivable?: boolean | undefined;
1778
- eligible?: boolean | undefined;
1779
- } | undefined;
1967
+ instrumentation?: Record<string, unknown> | undefined;
1968
+ projectName?: string | undefined;
1969
+ dashboardUrl?: string | undefined;
1780
1970
  harnessConfig?: {
1781
1971
  provider: string;
1782
1972
  harnessEnabled: boolean;
1783
1973
  harnessEntitled: boolean;
1974
+ plan?: {
1975
+ kind: "free" | "trial" | "paid";
1976
+ daysLeft?: number | undefined;
1977
+ seats?: number | undefined;
1978
+ } | undefined;
1784
1979
  providerReady?: boolean | undefined;
1785
1980
  credits?: {
1786
1981
  used: number;
1787
1982
  limit: number;
1983
+ kind?: "free" | "trial" | "paid" | undefined;
1984
+ daysLeft?: number | undefined;
1788
1985
  } | undefined;
1789
1986
  platformUrl?: string | undefined;
1987
+ gate?: {
1988
+ unlocked: boolean;
1989
+ reason?: string | undefined;
1990
+ percent?: number | undefined;
1991
+ prompt?: string | undefined;
1992
+ } | undefined;
1993
+ harnessRuns?: number | undefined;
1994
+ memoryEntries?: number | undefined;
1995
+ } | undefined;
1996
+ harnessDrive?: {
1997
+ steps: number;
1998
+ runId: string;
1790
1999
  } | undefined;
1791
2000
  notices?: unknown[] | undefined;
1792
2001
  coverage?: Record<string, number> | undefined;