@reticlehq/core 2.8.0 → 2.10.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.
@@ -124,6 +124,24 @@ export declare const TelemetryEventKind: {
124
124
  * is a real rate rather than an inference, and a reconnecting page cannot inflate it.
125
125
  */
126
126
  readonly APP_INSTRUMENTED: "app_instrumented";
127
+ /**
128
+ * A daemon has been up long enough that no app is going to arrive on its own.
129
+ *
130
+ * The exact counterpart of `app_instrumented`, and the reason it has to exist: that event only
131
+ * fires on SUCCESS, so the far larger population — daemons that never get an app at all — is
132
+ * measurable today only by the ABSENCE of an event, and an absence cannot distinguish "nothing
133
+ * was wired" from "the process died before it could tell us" from "we never sent it".
134
+ *
135
+ * The funnel breaks here and nowhere else, so this is the one silence worth turning into a signal.
136
+ * Fired ONCE per daemon run, and never after an app has connected, so a daemon that starts slowly
137
+ * and then works reports nothing.
138
+ *
139
+ * Read it against `agentAttached`: a stalled daemon with no agent is a person who installed and
140
+ * walked away, which is not a defect. A stalled daemon WITH an agent attached is the failure this
141
+ * product currently has — the tools are there, something is asking for them, and there is no app
142
+ * on the other end.
143
+ */
144
+ readonly INSTRUMENTATION_STALLED: "instrumentation_stalled";
127
145
  /**
128
146
  * The agent LOST its Reticle tools — the worst thing this product does to anyone, and until now
129
147
  * completely invisible in the field.
@@ -293,10 +311,13 @@ export declare const VerificationSchema: z.ZodObject<{
293
311
  readonly ALREADY_TRUE: "already_true";
294
312
  readonly UNCLEAN_CAPTURE: "unclean_capture";
295
313
  readonly VACUOUS_GRADE: "vacuous_grade";
314
+ readonly NOTHING_DECLARED: "nothing_declared";
296
315
  readonly OUTCOME_PENDING: "outcome_pending";
297
316
  readonly OUTCOME_UNREAD: "outcome_unread";
298
317
  readonly UNSETTLED: "unsettled";
318
+ readonly EVIDENCE_INCOMPLETE: "evidence_incomplete";
299
319
  readonly PROVED: "proved";
320
+ readonly ABSENCE_BLIND_SPOT: "absence_blind_spot";
300
321
  }>>;
301
322
  /**
302
323
  * WHAT was lost, when `reason` is `unclean_capture` — see `CaptureLoss`.
@@ -321,7 +342,7 @@ export declare const VerificationSchema: z.ZodObject<{
321
342
  passed: boolean;
322
343
  falseGreenCaught: boolean;
323
344
  durationMs?: number | undefined;
324
- reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
345
+ reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "nothing_declared" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
325
346
  brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
326
347
  browser?: string | undefined;
327
348
  uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
@@ -331,7 +352,7 @@ export declare const VerificationSchema: z.ZodObject<{
331
352
  passed: boolean;
332
353
  falseGreenCaught: boolean;
333
354
  durationMs?: number | undefined;
334
- reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
355
+ reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "nothing_declared" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
335
356
  brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
336
357
  browser?: string | undefined;
337
358
  uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
@@ -481,7 +502,7 @@ export declare const CrashSchema: z.ZodObject<{
481
502
  message?: string | undefined;
482
503
  errorType?: string | undefined;
483
504
  tool?: string | undefined;
484
- port?: "other" | "reticle" | undefined;
505
+ port?: "reticle" | "other" | undefined;
485
506
  fingerprint?: string | undefined;
486
507
  machine?: {
487
508
  rssMb: number;
@@ -504,7 +525,7 @@ export declare const CrashSchema: z.ZodObject<{
504
525
  message?: string | undefined;
505
526
  errorType?: string | undefined;
506
527
  tool?: string | undefined;
507
- port?: "other" | "reticle" | undefined;
528
+ port?: "reticle" | "other" | undefined;
508
529
  fingerprint?: string | undefined;
509
530
  machine?: {
510
531
  rssMb: number;
@@ -656,20 +677,35 @@ export declare const BugFoundSchema: z.ZodObject<{
656
677
  */
657
678
  readonly UNCLASSIFIED: "unclassified";
658
679
  }>;
680
+ /**
681
+ * A stable hash identifying THIS defect across sessions — same kind at the same route = same
682
+ * fingerprint, regardless of when or where it was found.
683
+ *
684
+ * The inputs (route, selector) never travel raw — only the 8-char hex hash does, following the
685
+ * same privacy pattern as `projectId`. The analytics side groups on it to answer "was this bug
686
+ * fixed?" (the fingerprint stops appearing) and to deduplicate the same defect found by parallel
687
+ * agents in one run.
688
+ *
689
+ * OPTIONAL because old senders and the `reticle verify` CLI path do not yet compute it. Absent
690
+ * means "not fingerprinted", never "a different defect from one that has a fingerprint".
691
+ */
692
+ fingerprint: z.ZodOptional<z.ZodString>;
659
693
  }, "strip", z.ZodTypeAny, {
660
694
  kind: string;
661
695
  source: "replay" | "contradiction" | "crawl" | "assertion";
662
- attribution: "app" | "reticle" | "request" | "unclassified";
696
+ attribution: "reticle" | "app" | "request" | "unclassified";
663
697
  falseGreen: boolean;
664
698
  repeat: boolean;
665
699
  tool?: string | undefined;
700
+ fingerprint?: string | undefined;
666
701
  }, {
667
702
  kind: string;
668
703
  source: "replay" | "contradiction" | "crawl" | "assertion";
669
- attribution: "app" | "reticle" | "request" | "unclassified";
704
+ attribution: "reticle" | "app" | "request" | "unclassified";
670
705
  falseGreen: boolean;
671
706
  repeat: boolean;
672
707
  tool?: string | undefined;
708
+ fingerprint?: string | undefined;
673
709
  }>;
674
710
  export type BugFound = z.infer<typeof BugFoundSchema>;
675
711
  /**
@@ -785,6 +821,35 @@ export declare const AppInstrumentationSchema: z.ZodObject<{
785
821
  agentAttached: boolean;
786
822
  }>;
787
823
  export type AppInstrumentation = z.infer<typeof AppInstrumentationSchema>;
824
+ /**
825
+ * The shape of a daemon that waited and got nothing.
826
+ *
827
+ * Deliberately the same three facts as `AppInstrumentation` rather than a richer payload, so the
828
+ * success and failure cases are directly comparable: the only difference between them should be
829
+ * which event carries them. `msWaited` is the counterpart of `msToFirstApp`.
830
+ *
831
+ * What it does NOT carry is any attempt to say WHY, because at this point the daemon does not know.
832
+ * Whether a dev server is listening is a live probe, and running one on a timer to enrich a metric
833
+ * would be collecting for the metric's sake. The diagnosis belongs where a human or an agent asks
834
+ * for it, not here.
835
+ */
836
+ export declare const InstrumentationStallSchema: z.ZodObject<{
837
+ /** Whether `reticle init` had been run in this directory (a projectId is stamped). */
838
+ initialized: z.ZodBoolean;
839
+ /** Whether an MCP client is attached. The difference between an idle install and a broken one. */
840
+ agentAttached: z.ZodBoolean;
841
+ /** How long the daemon has been up with no app on the other end. */
842
+ msWaited: z.ZodNumber;
843
+ }, "strip", z.ZodTypeAny, {
844
+ initialized: boolean;
845
+ agentAttached: boolean;
846
+ msWaited: number;
847
+ }, {
848
+ initialized: boolean;
849
+ agentAttached: boolean;
850
+ msWaited: number;
851
+ }>;
852
+ export type InstrumentationStall = z.infer<typeof InstrumentationStallSchema>;
788
853
  /**
789
854
  * WHICH stage of an MCP outage this is. Reported at most twice per proxy process, and the two are
790
855
  * different facts: `first` says the session lost its tools at all, `budget_spent` says the proxy
@@ -793,6 +858,18 @@ export type AppInstrumentation = z.infer<typeof AppInstrumentationSchema>;
793
858
  export declare const OutageStage: {
794
859
  readonly FIRST: "first";
795
860
  readonly BUDGET_SPENT: "budget_spent";
861
+ /**
862
+ * The link came back on its own, and `attempts` says what it cost.
863
+ *
864
+ * Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
865
+ * counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
866
+ * event in the field carried the same stage and the same attempt count, and neither could carry
867
+ * another. That reads as "reconnection never advances past the first attempt" and it is really
868
+ * "this event is emitted before there is anything to say". `recovered` is the counterpart that
869
+ * makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
870
+ * whose tools never came back.
871
+ */
872
+ readonly RECOVERED: "recovered";
796
873
  };
797
874
  export type OutageStage = (typeof OutageStage)[keyof typeof OutageStage];
798
875
  /**
@@ -801,8 +878,17 @@ export type OutageStage = (typeof OutageStage)[keyof typeof OutageStage];
801
878
  * without a raw string reaching the wire, per the classifier rule.
802
879
  */
803
880
  export declare const OutageReason: {
804
- /** The SSE stream ended cleanly — usually the daemon exiting. */
881
+ /** The SSE stream ended cleanly and nothing said why. */
805
882
  readonly SSE_ENDED: "sse_ended";
883
+ /**
884
+ * The daemon ANNOUNCED that it was retiring before it closed the stream.
885
+ *
886
+ * Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
887
+ * a daemon dying under a live client are the same clean stream end on this side of the socket, so
888
+ * the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
889
+ * going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
890
+ */
891
+ readonly DAEMON_SHUTDOWN: "daemon_shutdown";
806
892
  /** The stream errored. */
807
893
  readonly SSE_ERROR: "sse_error";
808
894
  /** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
@@ -828,10 +914,31 @@ export declare const McpOutageSchema: z.ZodObject<{
828
914
  stage: z.ZodNativeEnum<{
829
915
  readonly FIRST: "first";
830
916
  readonly BUDGET_SPENT: "budget_spent";
917
+ /**
918
+ * The link came back on its own, and `attempts` says what it cost.
919
+ *
920
+ * Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
921
+ * counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
922
+ * event in the field carried the same stage and the same attempt count, and neither could carry
923
+ * another. That reads as "reconnection never advances past the first attempt" and it is really
924
+ * "this event is emitted before there is anything to say". `recovered` is the counterpart that
925
+ * makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
926
+ * whose tools never came back.
927
+ */
928
+ readonly RECOVERED: "recovered";
831
929
  }>;
832
930
  reason: z.ZodNativeEnum<{
833
- /** The SSE stream ended cleanly — usually the daemon exiting. */
931
+ /** The SSE stream ended cleanly and nothing said why. */
834
932
  readonly SSE_ENDED: "sse_ended";
933
+ /**
934
+ * The daemon ANNOUNCED that it was retiring before it closed the stream.
935
+ *
936
+ * Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
937
+ * a daemon dying under a live client are the same clean stream end on this side of the socket, so
938
+ * the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
939
+ * going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
940
+ */
941
+ readonly DAEMON_SHUTDOWN: "daemon_shutdown";
835
942
  /** The stream errored. */
836
943
  readonly SSE_ERROR: "sse_error";
837
944
  /** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
@@ -858,14 +965,14 @@ export declare const McpOutageSchema: z.ZodObject<{
858
965
  */
859
966
  pendingLost: z.ZodOptional<z.ZodNumber>;
860
967
  }, "strip", z.ZodTypeAny, {
861
- reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
968
+ reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
862
969
  attempts: number;
863
- stage: "first" | "budget_spent";
970
+ stage: "first" | "budget_spent" | "recovered";
864
971
  pendingLost?: number | undefined;
865
972
  }, {
866
- reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
973
+ reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
867
974
  attempts: number;
868
- stage: "first" | "budget_spent";
975
+ stage: "first" | "budget_spent" | "recovered";
869
976
  pendingLost?: number | undefined;
870
977
  }>;
871
978
  export type McpOutage = z.infer<typeof McpOutageSchema>;
@@ -1094,6 +1201,24 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1094
1201
  * is a real rate rather than an inference, and a reconnecting page cannot inflate it.
1095
1202
  */
1096
1203
  readonly APP_INSTRUMENTED: "app_instrumented";
1204
+ /**
1205
+ * A daemon has been up long enough that no app is going to arrive on its own.
1206
+ *
1207
+ * The exact counterpart of `app_instrumented`, and the reason it has to exist: that event only
1208
+ * fires on SUCCESS, so the far larger population — daemons that never get an app at all — is
1209
+ * measurable today only by the ABSENCE of an event, and an absence cannot distinguish "nothing
1210
+ * was wired" from "the process died before it could tell us" from "we never sent it".
1211
+ *
1212
+ * The funnel breaks here and nowhere else, so this is the one silence worth turning into a signal.
1213
+ * Fired ONCE per daemon run, and never after an app has connected, so a daemon that starts slowly
1214
+ * and then works reports nothing.
1215
+ *
1216
+ * Read it against `agentAttached`: a stalled daemon with no agent is a person who installed and
1217
+ * walked away, which is not a defect. A stalled daemon WITH an agent attached is the failure this
1218
+ * product currently has — the tools are there, something is asking for them, and there is no app
1219
+ * on the other end.
1220
+ */
1221
+ readonly INSTRUMENTATION_STALLED: "instrumentation_stalled";
1097
1222
  /**
1098
1223
  * The agent LOST its Reticle tools — the worst thing this product does to anyone, and until now
1099
1224
  * completely invisible in the field.
@@ -1238,10 +1363,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1238
1363
  text: string;
1239
1364
  kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
1240
1365
  source: "agent" | "human";
1366
+ impact?: string | undefined;
1241
1367
  trace?: string | undefined;
1242
1368
  rating?: number | undefined;
1243
1369
  need?: string | undefined;
1244
- impact?: string | undefined;
1245
1370
  currentApproach?: string | undefined;
1246
1371
  model?: string | undefined;
1247
1372
  clientVersion?: string | undefined;
@@ -1256,10 +1381,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1256
1381
  text: string;
1257
1382
  kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
1258
1383
  source: "agent" | "human";
1384
+ impact?: string | undefined;
1259
1385
  trace?: string | undefined;
1260
1386
  rating?: number | undefined;
1261
1387
  need?: string | undefined;
1262
- impact?: string | undefined;
1263
1388
  currentApproach?: string | undefined;
1264
1389
  model?: string | undefined;
1265
1390
  clientVersion?: string | undefined;
@@ -1653,10 +1778,13 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1653
1778
  readonly ALREADY_TRUE: "already_true";
1654
1779
  readonly UNCLEAN_CAPTURE: "unclean_capture";
1655
1780
  readonly VACUOUS_GRADE: "vacuous_grade";
1781
+ readonly NOTHING_DECLARED: "nothing_declared";
1656
1782
  readonly OUTCOME_PENDING: "outcome_pending";
1657
1783
  readonly OUTCOME_UNREAD: "outcome_unread";
1658
1784
  readonly UNSETTLED: "unsettled";
1785
+ readonly EVIDENCE_INCOMPLETE: "evidence_incomplete";
1659
1786
  readonly PROVED: "proved";
1787
+ readonly ABSENCE_BLIND_SPOT: "absence_blind_spot";
1660
1788
  }>>;
1661
1789
  /**
1662
1790
  * WHAT was lost, when `reason` is `unclean_capture` — see `CaptureLoss`.
@@ -1681,7 +1809,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1681
1809
  passed: boolean;
1682
1810
  falseGreenCaught: boolean;
1683
1811
  durationMs?: number | undefined;
1684
- reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
1812
+ reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "nothing_declared" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
1685
1813
  brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
1686
1814
  browser?: string | undefined;
1687
1815
  uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
@@ -1691,7 +1819,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1691
1819
  passed: boolean;
1692
1820
  falseGreenCaught: boolean;
1693
1821
  durationMs?: number | undefined;
1694
- reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
1822
+ reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "nothing_declared" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
1695
1823
  brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
1696
1824
  browser?: string | undefined;
1697
1825
  uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
@@ -1819,7 +1947,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1819
1947
  message?: string | undefined;
1820
1948
  errorType?: string | undefined;
1821
1949
  tool?: string | undefined;
1822
- port?: "other" | "reticle" | undefined;
1950
+ port?: "reticle" | "other" | undefined;
1823
1951
  fingerprint?: string | undefined;
1824
1952
  machine?: {
1825
1953
  rssMb: number;
@@ -1842,7 +1970,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
1842
1970
  message?: string | undefined;
1843
1971
  errorType?: string | undefined;
1844
1972
  tool?: string | undefined;
1845
- port?: "other" | "reticle" | undefined;
1973
+ port?: "reticle" | "other" | undefined;
1846
1974
  fingerprint?: string | undefined;
1847
1975
  machine?: {
1848
1976
  rssMb: number;
@@ -2007,20 +2135,35 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2007
2135
  */
2008
2136
  readonly UNCLASSIFIED: "unclassified";
2009
2137
  }>;
2138
+ /**
2139
+ * A stable hash identifying THIS defect across sessions — same kind at the same route = same
2140
+ * fingerprint, regardless of when or where it was found.
2141
+ *
2142
+ * The inputs (route, selector) never travel raw — only the 8-char hex hash does, following the
2143
+ * same privacy pattern as `projectId`. The analytics side groups on it to answer "was this bug
2144
+ * fixed?" (the fingerprint stops appearing) and to deduplicate the same defect found by parallel
2145
+ * agents in one run.
2146
+ *
2147
+ * OPTIONAL because old senders and the `reticle verify` CLI path do not yet compute it. Absent
2148
+ * means "not fingerprinted", never "a different defect from one that has a fingerprint".
2149
+ */
2150
+ fingerprint: z.ZodOptional<z.ZodString>;
2010
2151
  }, "strip", z.ZodTypeAny, {
2011
2152
  kind: string;
2012
2153
  source: "replay" | "contradiction" | "crawl" | "assertion";
2013
- attribution: "app" | "reticle" | "request" | "unclassified";
2154
+ attribution: "reticle" | "app" | "request" | "unclassified";
2014
2155
  falseGreen: boolean;
2015
2156
  repeat: boolean;
2016
2157
  tool?: string | undefined;
2158
+ fingerprint?: string | undefined;
2017
2159
  }, {
2018
2160
  kind: string;
2019
2161
  source: "replay" | "contradiction" | "crawl" | "assertion";
2020
- attribution: "app" | "reticle" | "request" | "unclassified";
2162
+ attribution: "reticle" | "app" | "request" | "unclassified";
2021
2163
  falseGreen: boolean;
2022
2164
  repeat: boolean;
2023
2165
  tool?: string | undefined;
2166
+ fingerprint?: string | undefined;
2024
2167
  }>>;
2025
2168
  /** Only on `tool_refused`: which tool, why, and whether the agent tried the same thing again. */
2026
2169
  refusal: z.ZodOptional<z.ZodObject<{
@@ -2064,10 +2207,31 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2064
2207
  stage: z.ZodNativeEnum<{
2065
2208
  readonly FIRST: "first";
2066
2209
  readonly BUDGET_SPENT: "budget_spent";
2210
+ /**
2211
+ * The link came back on its own, and `attempts` says what it cost.
2212
+ *
2213
+ * Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
2214
+ * counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
2215
+ * event in the field carried the same stage and the same attempt count, and neither could carry
2216
+ * another. That reads as "reconnection never advances past the first attempt" and it is really
2217
+ * "this event is emitted before there is anything to say". `recovered` is the counterpart that
2218
+ * makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
2219
+ * whose tools never came back.
2220
+ */
2221
+ readonly RECOVERED: "recovered";
2067
2222
  }>;
2068
2223
  reason: z.ZodNativeEnum<{
2069
- /** The SSE stream ended cleanly — usually the daemon exiting. */
2224
+ /** The SSE stream ended cleanly and nothing said why. */
2070
2225
  readonly SSE_ENDED: "sse_ended";
2226
+ /**
2227
+ * The daemon ANNOUNCED that it was retiring before it closed the stream.
2228
+ *
2229
+ * Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
2230
+ * a daemon dying under a live client are the same clean stream end on this side of the socket, so
2231
+ * the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
2232
+ * going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
2233
+ */
2234
+ readonly DAEMON_SHUTDOWN: "daemon_shutdown";
2071
2235
  /** The stream errored. */
2072
2236
  readonly SSE_ERROR: "sse_error";
2073
2237
  /** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
@@ -2094,14 +2258,14 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2094
2258
  */
2095
2259
  pendingLost: z.ZodOptional<z.ZodNumber>;
2096
2260
  }, "strip", z.ZodTypeAny, {
2097
- reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2261
+ reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2098
2262
  attempts: number;
2099
- stage: "first" | "budget_spent";
2263
+ stage: "first" | "budget_spent" | "recovered";
2100
2264
  pendingLost?: number | undefined;
2101
2265
  }, {
2102
- reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2266
+ reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2103
2267
  attempts: number;
2104
- stage: "first" | "budget_spent";
2268
+ stage: "first" | "budget_spent" | "recovered";
2105
2269
  pendingLost?: number | undefined;
2106
2270
  }>>;
2107
2271
  /** Only on `app_instrumented`: the install's second half finally happening. */
@@ -2121,6 +2285,23 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2121
2285
  initialized: boolean;
2122
2286
  agentAttached: boolean;
2123
2287
  }>>;
2288
+ /** Only on `instrumentation_stalled`: the install's second half not happening. */
2289
+ stall: z.ZodOptional<z.ZodObject<{
2290
+ /** Whether `reticle init` had been run in this directory (a projectId is stamped). */
2291
+ initialized: z.ZodBoolean;
2292
+ /** Whether an MCP client is attached. The difference between an idle install and a broken one. */
2293
+ agentAttached: z.ZodBoolean;
2294
+ /** How long the daemon has been up with no app on the other end. */
2295
+ msWaited: z.ZodNumber;
2296
+ }, "strip", z.ZodTypeAny, {
2297
+ initialized: boolean;
2298
+ agentAttached: boolean;
2299
+ msWaited: number;
2300
+ }, {
2301
+ initialized: boolean;
2302
+ agentAttached: boolean;
2303
+ msWaited: number;
2304
+ }>>;
2124
2305
  /**
2125
2306
  * Only on `reticle_installed` / `init_completed`: which published route brought this install in.
2126
2307
  *
@@ -2143,8 +2324,32 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2143
2324
  /** No marker, or one this list does not name. The honest answer, and expected to dominate. */
2144
2325
  readonly UNKNOWN: "unknown";
2145
2326
  }>>;
2327
+ /**
2328
+ * Enterprise activation, on EVERY event. Two scalars rather than a block, for the same reason
2329
+ * `installSource` is one: they describe the install, not any single event, and they have to be
2330
+ * present on the events that show whether a licensed customer got anywhere.
2331
+ *
2332
+ * `licenseId` is the signed license id — an opaque uuid that resolves to a company only against the
2333
+ * issuance ledger we hold locally, so the analytics backend never learns a customer list. The
2334
+ * organisation NAME is deliberately absent: it is free text somebody typed at signing time, and
2335
+ * rule 3 is names-never-values.
2336
+ *
2337
+ * `licenseId` is present only when activation is `active`; `licenseStatus` rides whenever an issuer
2338
+ * key is baked, including the failure states, which is what makes a lapse distinguishable from a
2339
+ * churn. The PLAN is deliberately not here: the issuance ledger already holds it against this same
2340
+ * id, so it would be a per-event cost for something the join that resolves the id resolves anyway.
2341
+ */
2342
+ licenseId: z.ZodOptional<z.ZodString>;
2343
+ /** How activation resolved. Absent on a build with no issuer key baked, i.e. every OSS install. */
2344
+ licenseStatus: z.ZodOptional<z.ZodNativeEnum<{
2345
+ readonly ACTIVE: "active";
2346
+ readonly MISSING: "missing";
2347
+ readonly INVALID: "invalid";
2348
+ readonly EXPIRED: "expired";
2349
+ readonly EVAL: "eval";
2350
+ }>>;
2146
2351
  }, "strip", z.ZodTypeAny, {
2147
- event: "reticle_installed" | "cli_command_run" | "daemon_started" | "daemon_stopped" | "session_progress" | "verification_completed" | "project_profiled" | "version_changed" | "runtime_crashed" | "feedback_submitted" | "identified" | "mcp_client_connected" | "app_instrumented" | "mcp_connection_lost" | "init_completed" | "bug_found" | "tool_refused";
2352
+ event: "reticle_installed" | "cli_command_run" | "daemon_started" | "daemon_stopped" | "session_progress" | "verification_completed" | "project_profiled" | "version_changed" | "runtime_crashed" | "feedback_submitted" | "identified" | "mcp_client_connected" | "app_instrumented" | "instrumentation_stalled" | "mcp_connection_lost" | "init_completed" | "bug_found" | "tool_refused";
2148
2353
  version: string;
2149
2354
  ci: boolean;
2150
2355
  v: 3;
@@ -2157,10 +2362,11 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2157
2362
  bug?: {
2158
2363
  kind: string;
2159
2364
  source: "replay" | "contradiction" | "crawl" | "assertion";
2160
- attribution: "app" | "reticle" | "request" | "unclassified";
2365
+ attribution: "reticle" | "app" | "request" | "unclassified";
2161
2366
  falseGreen: boolean;
2162
2367
  repeat: boolean;
2163
2368
  tool?: string | undefined;
2369
+ fingerprint?: string | undefined;
2164
2370
  } | undefined;
2165
2371
  project?: {
2166
2372
  git: "none" | "local_only" | "remote";
@@ -2249,10 +2455,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2249
2455
  text: string;
2250
2456
  kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
2251
2457
  source: "agent" | "human";
2458
+ impact?: string | undefined;
2252
2459
  trace?: string | undefined;
2253
2460
  rating?: number | undefined;
2254
2461
  need?: string | undefined;
2255
- impact?: string | undefined;
2256
2462
  currentApproach?: string | undefined;
2257
2463
  model?: string | undefined;
2258
2464
  clientVersion?: string | undefined;
@@ -2272,7 +2478,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2272
2478
  passed: boolean;
2273
2479
  falseGreenCaught: boolean;
2274
2480
  durationMs?: number | undefined;
2275
- reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
2481
+ reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "nothing_declared" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
2276
2482
  brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
2277
2483
  browser?: string | undefined;
2278
2484
  uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
@@ -2288,7 +2494,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2288
2494
  message?: string | undefined;
2289
2495
  errorType?: string | undefined;
2290
2496
  tool?: string | undefined;
2291
- port?: "other" | "reticle" | undefined;
2497
+ port?: "reticle" | "other" | undefined;
2292
2498
  fingerprint?: string | undefined;
2293
2499
  machine?: {
2294
2500
  rssMb: number;
@@ -2330,9 +2536,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2330
2536
  retried: boolean;
2331
2537
  } | undefined;
2332
2538
  outage?: {
2333
- reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2539
+ reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2334
2540
  attempts: number;
2335
- stage: "first" | "budget_spent";
2541
+ stage: "first" | "budget_spent" | "recovered";
2336
2542
  pendingLost?: number | undefined;
2337
2543
  } | undefined;
2338
2544
  instrumentation?: {
@@ -2340,9 +2546,16 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2340
2546
  initialized: boolean;
2341
2547
  agentAttached: boolean;
2342
2548
  } | undefined;
2549
+ stall?: {
2550
+ initialized: boolean;
2551
+ agentAttached: boolean;
2552
+ msWaited: number;
2553
+ } | undefined;
2343
2554
  installSource?: "unknown" | "skill_file" | "npx_skill" | "plugin" | "docs_site" | "readme" | "cli_direct" | undefined;
2555
+ licenseId?: string | undefined;
2556
+ licenseStatus?: "active" | "missing" | "invalid" | "expired" | "eval" | undefined;
2344
2557
  }, {
2345
- event: "reticle_installed" | "cli_command_run" | "daemon_started" | "daemon_stopped" | "session_progress" | "verification_completed" | "project_profiled" | "version_changed" | "runtime_crashed" | "feedback_submitted" | "identified" | "mcp_client_connected" | "app_instrumented" | "mcp_connection_lost" | "init_completed" | "bug_found" | "tool_refused";
2558
+ event: "reticle_installed" | "cli_command_run" | "daemon_started" | "daemon_stopped" | "session_progress" | "verification_completed" | "project_profiled" | "version_changed" | "runtime_crashed" | "feedback_submitted" | "identified" | "mcp_client_connected" | "app_instrumented" | "instrumentation_stalled" | "mcp_connection_lost" | "init_completed" | "bug_found" | "tool_refused";
2346
2559
  version: string;
2347
2560
  ci: boolean;
2348
2561
  v: 3;
@@ -2355,10 +2568,11 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2355
2568
  bug?: {
2356
2569
  kind: string;
2357
2570
  source: "replay" | "contradiction" | "crawl" | "assertion";
2358
- attribution: "app" | "reticle" | "request" | "unclassified";
2571
+ attribution: "reticle" | "app" | "request" | "unclassified";
2359
2572
  falseGreen: boolean;
2360
2573
  repeat: boolean;
2361
2574
  tool?: string | undefined;
2575
+ fingerprint?: string | undefined;
2362
2576
  } | undefined;
2363
2577
  project?: {
2364
2578
  git: "none" | "local_only" | "remote";
@@ -2447,10 +2661,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2447
2661
  text: string;
2448
2662
  kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
2449
2663
  source: "agent" | "human";
2664
+ impact?: string | undefined;
2450
2665
  trace?: string | undefined;
2451
2666
  rating?: number | undefined;
2452
2667
  need?: string | undefined;
2453
- impact?: string | undefined;
2454
2668
  currentApproach?: string | undefined;
2455
2669
  model?: string | undefined;
2456
2670
  clientVersion?: string | undefined;
@@ -2470,7 +2684,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2470
2684
  passed: boolean;
2471
2685
  falseGreenCaught: boolean;
2472
2686
  durationMs?: number | undefined;
2473
- reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
2687
+ reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "nothing_declared" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
2474
2688
  brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
2475
2689
  browser?: string | undefined;
2476
2690
  uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
@@ -2486,7 +2700,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2486
2700
  message?: string | undefined;
2487
2701
  errorType?: string | undefined;
2488
2702
  tool?: string | undefined;
2489
- port?: "other" | "reticle" | undefined;
2703
+ port?: "reticle" | "other" | undefined;
2490
2704
  fingerprint?: string | undefined;
2491
2705
  machine?: {
2492
2706
  rssMb: number;
@@ -2528,9 +2742,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2528
2742
  retried: boolean;
2529
2743
  } | undefined;
2530
2744
  outage?: {
2531
- reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2745
+ reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
2532
2746
  attempts: number;
2533
- stage: "first" | "budget_spent";
2747
+ stage: "first" | "budget_spent" | "recovered";
2534
2748
  pendingLost?: number | undefined;
2535
2749
  } | undefined;
2536
2750
  instrumentation?: {
@@ -2538,6 +2752,13 @@ export declare const TelemetryEventSchema: z.ZodObject<{
2538
2752
  initialized: boolean;
2539
2753
  agentAttached: boolean;
2540
2754
  } | undefined;
2755
+ stall?: {
2756
+ initialized: boolean;
2757
+ agentAttached: boolean;
2758
+ msWaited: number;
2759
+ } | undefined;
2541
2760
  installSource?: "unknown" | "skill_file" | "npx_skill" | "plugin" | "docs_site" | "readme" | "cli_direct" | undefined;
2761
+ licenseId?: string | undefined;
2762
+ licenseStatus?: "active" | "missing" | "invalid" | "expired" | "eval" | undefined;
2542
2763
  }>;
2543
2764
  export type TelemetryEvent = z.infer<typeof TelemetryEventSchema>;