@reticlehq/core 2.8.0 → 2.9.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.
- package/dist/browser-misdirect.d.ts +23 -0
- package/dist/browser-misdirect.js +28 -0
- package/dist/constants.d.ts +37 -0
- package/dist/constants.js +37 -0
- package/dist/contract-fingerprint.d.ts +7 -0
- package/dist/contract-fingerprint.js +1 -1
- package/dist/event-payloads.d.ts +3 -2
- package/dist/finding-fingerprint.d.ts +23 -0
- package/dist/finding-fingerprint.js +19 -0
- package/dist/flow-types.d.ts +10 -0
- package/dist/impact-savings.d.ts +17 -0
- package/dist/impact-savings.js +47 -0
- package/dist/impact.d.ts +1284 -0
- package/dist/impact.js +127 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -1
- package/dist/notices.d.ts +12 -0
- package/dist/notices.js +13 -0
- package/dist/project-id.js +25 -4
- package/dist/security.js +18 -1
- package/dist/session-constants.d.ts +18 -0
- package/dist/session-constants.js +17 -0
- package/dist/telemetry-feedback.d.ts +2 -2
- package/dist/telemetry.d.ts +218 -27
- package/dist/telemetry.js +76 -1
- package/dist/types.d.ts +12 -3
- package/dist/types.js +15 -3
- package/dist/verified-constants.d.ts +27 -0
- package/dist/verified-constants.js +27 -0
- package/package.json +1 -1
package/dist/telemetry.d.ts
CHANGED
|
@@ -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.
|
|
@@ -296,7 +314,9 @@ export declare const VerificationSchema: z.ZodObject<{
|
|
|
296
314
|
readonly OUTCOME_PENDING: "outcome_pending";
|
|
297
315
|
readonly OUTCOME_UNREAD: "outcome_unread";
|
|
298
316
|
readonly UNSETTLED: "unsettled";
|
|
317
|
+
readonly EVIDENCE_INCOMPLETE: "evidence_incomplete";
|
|
299
318
|
readonly PROVED: "proved";
|
|
319
|
+
readonly ABSENCE_BLIND_SPOT: "absence_blind_spot";
|
|
300
320
|
}>>;
|
|
301
321
|
/**
|
|
302
322
|
* WHAT was lost, when `reason` is `unclean_capture` — see `CaptureLoss`.
|
|
@@ -321,7 +341,7 @@ export declare const VerificationSchema: z.ZodObject<{
|
|
|
321
341
|
passed: boolean;
|
|
322
342
|
falseGreenCaught: boolean;
|
|
323
343
|
durationMs?: number | undefined;
|
|
324
|
-
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
344
|
+
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
|
|
325
345
|
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
326
346
|
browser?: string | undefined;
|
|
327
347
|
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
@@ -331,7 +351,7 @@ export declare const VerificationSchema: z.ZodObject<{
|
|
|
331
351
|
passed: boolean;
|
|
332
352
|
falseGreenCaught: boolean;
|
|
333
353
|
durationMs?: number | undefined;
|
|
334
|
-
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
354
|
+
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
|
|
335
355
|
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
336
356
|
browser?: string | undefined;
|
|
337
357
|
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
@@ -656,6 +676,19 @@ export declare const BugFoundSchema: z.ZodObject<{
|
|
|
656
676
|
*/
|
|
657
677
|
readonly UNCLASSIFIED: "unclassified";
|
|
658
678
|
}>;
|
|
679
|
+
/**
|
|
680
|
+
* A stable hash identifying THIS defect across sessions — same kind at the same route = same
|
|
681
|
+
* fingerprint, regardless of when or where it was found.
|
|
682
|
+
*
|
|
683
|
+
* The inputs (route, selector) never travel raw — only the 8-char hex hash does, following the
|
|
684
|
+
* same privacy pattern as `projectId`. The analytics side groups on it to answer "was this bug
|
|
685
|
+
* fixed?" (the fingerprint stops appearing) and to deduplicate the same defect found by parallel
|
|
686
|
+
* agents in one run.
|
|
687
|
+
*
|
|
688
|
+
* OPTIONAL because old senders and the `reticle verify` CLI path do not yet compute it. Absent
|
|
689
|
+
* means "not fingerprinted", never "a different defect from one that has a fingerprint".
|
|
690
|
+
*/
|
|
691
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
659
692
|
}, "strip", z.ZodTypeAny, {
|
|
660
693
|
kind: string;
|
|
661
694
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
@@ -663,6 +696,7 @@ export declare const BugFoundSchema: z.ZodObject<{
|
|
|
663
696
|
falseGreen: boolean;
|
|
664
697
|
repeat: boolean;
|
|
665
698
|
tool?: string | undefined;
|
|
699
|
+
fingerprint?: string | undefined;
|
|
666
700
|
}, {
|
|
667
701
|
kind: string;
|
|
668
702
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
@@ -670,6 +704,7 @@ export declare const BugFoundSchema: z.ZodObject<{
|
|
|
670
704
|
falseGreen: boolean;
|
|
671
705
|
repeat: boolean;
|
|
672
706
|
tool?: string | undefined;
|
|
707
|
+
fingerprint?: string | undefined;
|
|
673
708
|
}>;
|
|
674
709
|
export type BugFound = z.infer<typeof BugFoundSchema>;
|
|
675
710
|
/**
|
|
@@ -785,6 +820,35 @@ export declare const AppInstrumentationSchema: z.ZodObject<{
|
|
|
785
820
|
agentAttached: boolean;
|
|
786
821
|
}>;
|
|
787
822
|
export type AppInstrumentation = z.infer<typeof AppInstrumentationSchema>;
|
|
823
|
+
/**
|
|
824
|
+
* The shape of a daemon that waited and got nothing.
|
|
825
|
+
*
|
|
826
|
+
* Deliberately the same three facts as `AppInstrumentation` rather than a richer payload, so the
|
|
827
|
+
* success and failure cases are directly comparable: the only difference between them should be
|
|
828
|
+
* which event carries them. `msWaited` is the counterpart of `msToFirstApp`.
|
|
829
|
+
*
|
|
830
|
+
* What it does NOT carry is any attempt to say WHY, because at this point the daemon does not know.
|
|
831
|
+
* Whether a dev server is listening is a live probe, and running one on a timer to enrich a metric
|
|
832
|
+
* would be collecting for the metric's sake. The diagnosis belongs where a human or an agent asks
|
|
833
|
+
* for it, not here.
|
|
834
|
+
*/
|
|
835
|
+
export declare const InstrumentationStallSchema: z.ZodObject<{
|
|
836
|
+
/** Whether `reticle init` had been run in this directory (a projectId is stamped). */
|
|
837
|
+
initialized: z.ZodBoolean;
|
|
838
|
+
/** Whether an MCP client is attached. The difference between an idle install and a broken one. */
|
|
839
|
+
agentAttached: z.ZodBoolean;
|
|
840
|
+
/** How long the daemon has been up with no app on the other end. */
|
|
841
|
+
msWaited: z.ZodNumber;
|
|
842
|
+
}, "strip", z.ZodTypeAny, {
|
|
843
|
+
initialized: boolean;
|
|
844
|
+
agentAttached: boolean;
|
|
845
|
+
msWaited: number;
|
|
846
|
+
}, {
|
|
847
|
+
initialized: boolean;
|
|
848
|
+
agentAttached: boolean;
|
|
849
|
+
msWaited: number;
|
|
850
|
+
}>;
|
|
851
|
+
export type InstrumentationStall = z.infer<typeof InstrumentationStallSchema>;
|
|
788
852
|
/**
|
|
789
853
|
* WHICH stage of an MCP outage this is. Reported at most twice per proxy process, and the two are
|
|
790
854
|
* different facts: `first` says the session lost its tools at all, `budget_spent` says the proxy
|
|
@@ -793,6 +857,18 @@ export type AppInstrumentation = z.infer<typeof AppInstrumentationSchema>;
|
|
|
793
857
|
export declare const OutageStage: {
|
|
794
858
|
readonly FIRST: "first";
|
|
795
859
|
readonly BUDGET_SPENT: "budget_spent";
|
|
860
|
+
/**
|
|
861
|
+
* The link came back on its own, and `attempts` says what it cost.
|
|
862
|
+
*
|
|
863
|
+
* Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
|
|
864
|
+
* counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
|
|
865
|
+
* event in the field carried the same stage and the same attempt count, and neither could carry
|
|
866
|
+
* another. That reads as "reconnection never advances past the first attempt" and it is really
|
|
867
|
+
* "this event is emitted before there is anything to say". `recovered` is the counterpart that
|
|
868
|
+
* makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
|
|
869
|
+
* whose tools never came back.
|
|
870
|
+
*/
|
|
871
|
+
readonly RECOVERED: "recovered";
|
|
796
872
|
};
|
|
797
873
|
export type OutageStage = (typeof OutageStage)[keyof typeof OutageStage];
|
|
798
874
|
/**
|
|
@@ -801,8 +877,17 @@ export type OutageStage = (typeof OutageStage)[keyof typeof OutageStage];
|
|
|
801
877
|
* without a raw string reaching the wire, per the classifier rule.
|
|
802
878
|
*/
|
|
803
879
|
export declare const OutageReason: {
|
|
804
|
-
/** The SSE stream ended cleanly
|
|
880
|
+
/** The SSE stream ended cleanly and nothing said why. */
|
|
805
881
|
readonly SSE_ENDED: "sse_ended";
|
|
882
|
+
/**
|
|
883
|
+
* The daemon ANNOUNCED that it was retiring before it closed the stream.
|
|
884
|
+
*
|
|
885
|
+
* Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
|
|
886
|
+
* a daemon dying under a live client are the same clean stream end on this side of the socket, so
|
|
887
|
+
* the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
|
|
888
|
+
* going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
|
|
889
|
+
*/
|
|
890
|
+
readonly DAEMON_SHUTDOWN: "daemon_shutdown";
|
|
806
891
|
/** The stream errored. */
|
|
807
892
|
readonly SSE_ERROR: "sse_error";
|
|
808
893
|
/** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
|
|
@@ -828,10 +913,31 @@ export declare const McpOutageSchema: z.ZodObject<{
|
|
|
828
913
|
stage: z.ZodNativeEnum<{
|
|
829
914
|
readonly FIRST: "first";
|
|
830
915
|
readonly BUDGET_SPENT: "budget_spent";
|
|
916
|
+
/**
|
|
917
|
+
* The link came back on its own, and `attempts` says what it cost.
|
|
918
|
+
*
|
|
919
|
+
* Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
|
|
920
|
+
* counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
|
|
921
|
+
* event in the field carried the same stage and the same attempt count, and neither could carry
|
|
922
|
+
* another. That reads as "reconnection never advances past the first attempt" and it is really
|
|
923
|
+
* "this event is emitted before there is anything to say". `recovered` is the counterpart that
|
|
924
|
+
* makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
|
|
925
|
+
* whose tools never came back.
|
|
926
|
+
*/
|
|
927
|
+
readonly RECOVERED: "recovered";
|
|
831
928
|
}>;
|
|
832
929
|
reason: z.ZodNativeEnum<{
|
|
833
|
-
/** The SSE stream ended cleanly
|
|
930
|
+
/** The SSE stream ended cleanly and nothing said why. */
|
|
834
931
|
readonly SSE_ENDED: "sse_ended";
|
|
932
|
+
/**
|
|
933
|
+
* The daemon ANNOUNCED that it was retiring before it closed the stream.
|
|
934
|
+
*
|
|
935
|
+
* Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
|
|
936
|
+
* a daemon dying under a live client are the same clean stream end on this side of the socket, so
|
|
937
|
+
* the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
|
|
938
|
+
* going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
|
|
939
|
+
*/
|
|
940
|
+
readonly DAEMON_SHUTDOWN: "daemon_shutdown";
|
|
835
941
|
/** The stream errored. */
|
|
836
942
|
readonly SSE_ERROR: "sse_error";
|
|
837
943
|
/** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
|
|
@@ -858,14 +964,14 @@ export declare const McpOutageSchema: z.ZodObject<{
|
|
|
858
964
|
*/
|
|
859
965
|
pendingLost: z.ZodOptional<z.ZodNumber>;
|
|
860
966
|
}, "strip", z.ZodTypeAny, {
|
|
861
|
-
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
967
|
+
reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
862
968
|
attempts: number;
|
|
863
|
-
stage: "first" | "budget_spent";
|
|
969
|
+
stage: "first" | "budget_spent" | "recovered";
|
|
864
970
|
pendingLost?: number | undefined;
|
|
865
971
|
}, {
|
|
866
|
-
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
972
|
+
reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
867
973
|
attempts: number;
|
|
868
|
-
stage: "first" | "budget_spent";
|
|
974
|
+
stage: "first" | "budget_spent" | "recovered";
|
|
869
975
|
pendingLost?: number | undefined;
|
|
870
976
|
}>;
|
|
871
977
|
export type McpOutage = z.infer<typeof McpOutageSchema>;
|
|
@@ -1094,6 +1200,24 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1094
1200
|
* is a real rate rather than an inference, and a reconnecting page cannot inflate it.
|
|
1095
1201
|
*/
|
|
1096
1202
|
readonly APP_INSTRUMENTED: "app_instrumented";
|
|
1203
|
+
/**
|
|
1204
|
+
* A daemon has been up long enough that no app is going to arrive on its own.
|
|
1205
|
+
*
|
|
1206
|
+
* The exact counterpart of `app_instrumented`, and the reason it has to exist: that event only
|
|
1207
|
+
* fires on SUCCESS, so the far larger population — daemons that never get an app at all — is
|
|
1208
|
+
* measurable today only by the ABSENCE of an event, and an absence cannot distinguish "nothing
|
|
1209
|
+
* was wired" from "the process died before it could tell us" from "we never sent it".
|
|
1210
|
+
*
|
|
1211
|
+
* The funnel breaks here and nowhere else, so this is the one silence worth turning into a signal.
|
|
1212
|
+
* Fired ONCE per daemon run, and never after an app has connected, so a daemon that starts slowly
|
|
1213
|
+
* and then works reports nothing.
|
|
1214
|
+
*
|
|
1215
|
+
* Read it against `agentAttached`: a stalled daemon with no agent is a person who installed and
|
|
1216
|
+
* walked away, which is not a defect. A stalled daemon WITH an agent attached is the failure this
|
|
1217
|
+
* product currently has — the tools are there, something is asking for them, and there is no app
|
|
1218
|
+
* on the other end.
|
|
1219
|
+
*/
|
|
1220
|
+
readonly INSTRUMENTATION_STALLED: "instrumentation_stalled";
|
|
1097
1221
|
/**
|
|
1098
1222
|
* The agent LOST its Reticle tools — the worst thing this product does to anyone, and until now
|
|
1099
1223
|
* completely invisible in the field.
|
|
@@ -1238,10 +1362,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1238
1362
|
text: string;
|
|
1239
1363
|
kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
|
|
1240
1364
|
source: "agent" | "human";
|
|
1365
|
+
impact?: string | undefined;
|
|
1241
1366
|
trace?: string | undefined;
|
|
1242
1367
|
rating?: number | undefined;
|
|
1243
1368
|
need?: string | undefined;
|
|
1244
|
-
impact?: string | undefined;
|
|
1245
1369
|
currentApproach?: string | undefined;
|
|
1246
1370
|
model?: string | undefined;
|
|
1247
1371
|
clientVersion?: string | undefined;
|
|
@@ -1256,10 +1380,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1256
1380
|
text: string;
|
|
1257
1381
|
kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
|
|
1258
1382
|
source: "agent" | "human";
|
|
1383
|
+
impact?: string | undefined;
|
|
1259
1384
|
trace?: string | undefined;
|
|
1260
1385
|
rating?: number | undefined;
|
|
1261
1386
|
need?: string | undefined;
|
|
1262
|
-
impact?: string | undefined;
|
|
1263
1387
|
currentApproach?: string | undefined;
|
|
1264
1388
|
model?: string | undefined;
|
|
1265
1389
|
clientVersion?: string | undefined;
|
|
@@ -1656,7 +1780,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1656
1780
|
readonly OUTCOME_PENDING: "outcome_pending";
|
|
1657
1781
|
readonly OUTCOME_UNREAD: "outcome_unread";
|
|
1658
1782
|
readonly UNSETTLED: "unsettled";
|
|
1783
|
+
readonly EVIDENCE_INCOMPLETE: "evidence_incomplete";
|
|
1659
1784
|
readonly PROVED: "proved";
|
|
1785
|
+
readonly ABSENCE_BLIND_SPOT: "absence_blind_spot";
|
|
1660
1786
|
}>>;
|
|
1661
1787
|
/**
|
|
1662
1788
|
* WHAT was lost, when `reason` is `unclean_capture` — see `CaptureLoss`.
|
|
@@ -1681,7 +1807,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1681
1807
|
passed: boolean;
|
|
1682
1808
|
falseGreenCaught: boolean;
|
|
1683
1809
|
durationMs?: number | undefined;
|
|
1684
|
-
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
1810
|
+
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
|
|
1685
1811
|
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
1686
1812
|
browser?: string | undefined;
|
|
1687
1813
|
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
@@ -1691,7 +1817,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1691
1817
|
passed: boolean;
|
|
1692
1818
|
falseGreenCaught: boolean;
|
|
1693
1819
|
durationMs?: number | undefined;
|
|
1694
|
-
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
1820
|
+
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
|
|
1695
1821
|
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
1696
1822
|
browser?: string | undefined;
|
|
1697
1823
|
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
@@ -2007,6 +2133,19 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2007
2133
|
*/
|
|
2008
2134
|
readonly UNCLASSIFIED: "unclassified";
|
|
2009
2135
|
}>;
|
|
2136
|
+
/**
|
|
2137
|
+
* A stable hash identifying THIS defect across sessions — same kind at the same route = same
|
|
2138
|
+
* fingerprint, regardless of when or where it was found.
|
|
2139
|
+
*
|
|
2140
|
+
* The inputs (route, selector) never travel raw — only the 8-char hex hash does, following the
|
|
2141
|
+
* same privacy pattern as `projectId`. The analytics side groups on it to answer "was this bug
|
|
2142
|
+
* fixed?" (the fingerprint stops appearing) and to deduplicate the same defect found by parallel
|
|
2143
|
+
* agents in one run.
|
|
2144
|
+
*
|
|
2145
|
+
* OPTIONAL because old senders and the `reticle verify` CLI path do not yet compute it. Absent
|
|
2146
|
+
* means "not fingerprinted", never "a different defect from one that has a fingerprint".
|
|
2147
|
+
*/
|
|
2148
|
+
fingerprint: z.ZodOptional<z.ZodString>;
|
|
2010
2149
|
}, "strip", z.ZodTypeAny, {
|
|
2011
2150
|
kind: string;
|
|
2012
2151
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
@@ -2014,6 +2153,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2014
2153
|
falseGreen: boolean;
|
|
2015
2154
|
repeat: boolean;
|
|
2016
2155
|
tool?: string | undefined;
|
|
2156
|
+
fingerprint?: string | undefined;
|
|
2017
2157
|
}, {
|
|
2018
2158
|
kind: string;
|
|
2019
2159
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
@@ -2021,6 +2161,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2021
2161
|
falseGreen: boolean;
|
|
2022
2162
|
repeat: boolean;
|
|
2023
2163
|
tool?: string | undefined;
|
|
2164
|
+
fingerprint?: string | undefined;
|
|
2024
2165
|
}>>;
|
|
2025
2166
|
/** Only on `tool_refused`: which tool, why, and whether the agent tried the same thing again. */
|
|
2026
2167
|
refusal: z.ZodOptional<z.ZodObject<{
|
|
@@ -2064,10 +2205,31 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2064
2205
|
stage: z.ZodNativeEnum<{
|
|
2065
2206
|
readonly FIRST: "first";
|
|
2066
2207
|
readonly BUDGET_SPENT: "budget_spent";
|
|
2208
|
+
/**
|
|
2209
|
+
* The link came back on its own, and `attempts` says what it cost.
|
|
2210
|
+
*
|
|
2211
|
+
* Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
|
|
2212
|
+
* counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
|
|
2213
|
+
* event in the field carried the same stage and the same attempt count, and neither could carry
|
|
2214
|
+
* another. That reads as "reconnection never advances past the first attempt" and it is really
|
|
2215
|
+
* "this event is emitted before there is anything to say". `recovered` is the counterpart that
|
|
2216
|
+
* makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
|
|
2217
|
+
* whose tools never came back.
|
|
2218
|
+
*/
|
|
2219
|
+
readonly RECOVERED: "recovered";
|
|
2067
2220
|
}>;
|
|
2068
2221
|
reason: z.ZodNativeEnum<{
|
|
2069
|
-
/** The SSE stream ended cleanly
|
|
2222
|
+
/** The SSE stream ended cleanly and nothing said why. */
|
|
2070
2223
|
readonly SSE_ENDED: "sse_ended";
|
|
2224
|
+
/**
|
|
2225
|
+
* The daemon ANNOUNCED that it was retiring before it closed the stream.
|
|
2226
|
+
*
|
|
2227
|
+
* Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
|
|
2228
|
+
* a daemon dying under a live client are the same clean stream end on this side of the socket, so
|
|
2229
|
+
* the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
|
|
2230
|
+
* going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
|
|
2231
|
+
*/
|
|
2232
|
+
readonly DAEMON_SHUTDOWN: "daemon_shutdown";
|
|
2071
2233
|
/** The stream errored. */
|
|
2072
2234
|
readonly SSE_ERROR: "sse_error";
|
|
2073
2235
|
/** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
|
|
@@ -2094,14 +2256,14 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2094
2256
|
*/
|
|
2095
2257
|
pendingLost: z.ZodOptional<z.ZodNumber>;
|
|
2096
2258
|
}, "strip", z.ZodTypeAny, {
|
|
2097
|
-
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2259
|
+
reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2098
2260
|
attempts: number;
|
|
2099
|
-
stage: "first" | "budget_spent";
|
|
2261
|
+
stage: "first" | "budget_spent" | "recovered";
|
|
2100
2262
|
pendingLost?: number | undefined;
|
|
2101
2263
|
}, {
|
|
2102
|
-
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2264
|
+
reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2103
2265
|
attempts: number;
|
|
2104
|
-
stage: "first" | "budget_spent";
|
|
2266
|
+
stage: "first" | "budget_spent" | "recovered";
|
|
2105
2267
|
pendingLost?: number | undefined;
|
|
2106
2268
|
}>>;
|
|
2107
2269
|
/** Only on `app_instrumented`: the install's second half finally happening. */
|
|
@@ -2121,6 +2283,23 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2121
2283
|
initialized: boolean;
|
|
2122
2284
|
agentAttached: boolean;
|
|
2123
2285
|
}>>;
|
|
2286
|
+
/** Only on `instrumentation_stalled`: the install's second half not happening. */
|
|
2287
|
+
stall: z.ZodOptional<z.ZodObject<{
|
|
2288
|
+
/** Whether `reticle init` had been run in this directory (a projectId is stamped). */
|
|
2289
|
+
initialized: z.ZodBoolean;
|
|
2290
|
+
/** Whether an MCP client is attached. The difference between an idle install and a broken one. */
|
|
2291
|
+
agentAttached: z.ZodBoolean;
|
|
2292
|
+
/** How long the daemon has been up with no app on the other end. */
|
|
2293
|
+
msWaited: z.ZodNumber;
|
|
2294
|
+
}, "strip", z.ZodTypeAny, {
|
|
2295
|
+
initialized: boolean;
|
|
2296
|
+
agentAttached: boolean;
|
|
2297
|
+
msWaited: number;
|
|
2298
|
+
}, {
|
|
2299
|
+
initialized: boolean;
|
|
2300
|
+
agentAttached: boolean;
|
|
2301
|
+
msWaited: number;
|
|
2302
|
+
}>>;
|
|
2124
2303
|
/**
|
|
2125
2304
|
* Only on `reticle_installed` / `init_completed`: which published route brought this install in.
|
|
2126
2305
|
*
|
|
@@ -2144,7 +2323,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2144
2323
|
readonly UNKNOWN: "unknown";
|
|
2145
2324
|
}>>;
|
|
2146
2325
|
}, "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";
|
|
2326
|
+
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
2327
|
version: string;
|
|
2149
2328
|
ci: boolean;
|
|
2150
2329
|
v: 3;
|
|
@@ -2161,6 +2340,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2161
2340
|
falseGreen: boolean;
|
|
2162
2341
|
repeat: boolean;
|
|
2163
2342
|
tool?: string | undefined;
|
|
2343
|
+
fingerprint?: string | undefined;
|
|
2164
2344
|
} | undefined;
|
|
2165
2345
|
project?: {
|
|
2166
2346
|
git: "none" | "local_only" | "remote";
|
|
@@ -2249,10 +2429,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2249
2429
|
text: string;
|
|
2250
2430
|
kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
|
|
2251
2431
|
source: "agent" | "human";
|
|
2432
|
+
impact?: string | undefined;
|
|
2252
2433
|
trace?: string | undefined;
|
|
2253
2434
|
rating?: number | undefined;
|
|
2254
2435
|
need?: string | undefined;
|
|
2255
|
-
impact?: string | undefined;
|
|
2256
2436
|
currentApproach?: string | undefined;
|
|
2257
2437
|
model?: string | undefined;
|
|
2258
2438
|
clientVersion?: string | undefined;
|
|
@@ -2272,7 +2452,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2272
2452
|
passed: boolean;
|
|
2273
2453
|
falseGreenCaught: boolean;
|
|
2274
2454
|
durationMs?: number | undefined;
|
|
2275
|
-
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
2455
|
+
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
|
|
2276
2456
|
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
2277
2457
|
browser?: string | undefined;
|
|
2278
2458
|
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
@@ -2330,9 +2510,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2330
2510
|
retried: boolean;
|
|
2331
2511
|
} | undefined;
|
|
2332
2512
|
outage?: {
|
|
2333
|
-
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2513
|
+
reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2334
2514
|
attempts: number;
|
|
2335
|
-
stage: "first" | "budget_spent";
|
|
2515
|
+
stage: "first" | "budget_spent" | "recovered";
|
|
2336
2516
|
pendingLost?: number | undefined;
|
|
2337
2517
|
} | undefined;
|
|
2338
2518
|
instrumentation?: {
|
|
@@ -2340,9 +2520,14 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2340
2520
|
initialized: boolean;
|
|
2341
2521
|
agentAttached: boolean;
|
|
2342
2522
|
} | undefined;
|
|
2523
|
+
stall?: {
|
|
2524
|
+
initialized: boolean;
|
|
2525
|
+
agentAttached: boolean;
|
|
2526
|
+
msWaited: number;
|
|
2527
|
+
} | undefined;
|
|
2343
2528
|
installSource?: "unknown" | "skill_file" | "npx_skill" | "plugin" | "docs_site" | "readme" | "cli_direct" | undefined;
|
|
2344
2529
|
}, {
|
|
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";
|
|
2530
|
+
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
2531
|
version: string;
|
|
2347
2532
|
ci: boolean;
|
|
2348
2533
|
v: 3;
|
|
@@ -2359,6 +2544,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2359
2544
|
falseGreen: boolean;
|
|
2360
2545
|
repeat: boolean;
|
|
2361
2546
|
tool?: string | undefined;
|
|
2547
|
+
fingerprint?: string | undefined;
|
|
2362
2548
|
} | undefined;
|
|
2363
2549
|
project?: {
|
|
2364
2550
|
git: "none" | "local_only" | "remote";
|
|
@@ -2447,10 +2633,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2447
2633
|
text: string;
|
|
2448
2634
|
kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
|
|
2449
2635
|
source: "agent" | "human";
|
|
2636
|
+
impact?: string | undefined;
|
|
2450
2637
|
trace?: string | undefined;
|
|
2451
2638
|
rating?: number | undefined;
|
|
2452
2639
|
need?: string | undefined;
|
|
2453
|
-
impact?: string | undefined;
|
|
2454
2640
|
currentApproach?: string | undefined;
|
|
2455
2641
|
model?: string | undefined;
|
|
2456
2642
|
clientVersion?: string | undefined;
|
|
@@ -2470,7 +2656,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2470
2656
|
passed: boolean;
|
|
2471
2657
|
falseGreenCaught: boolean;
|
|
2472
2658
|
durationMs?: number | undefined;
|
|
2473
|
-
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
2659
|
+
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "evidence_incomplete" | "proved" | "absence_blind_spot" | undefined;
|
|
2474
2660
|
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
2475
2661
|
browser?: string | undefined;
|
|
2476
2662
|
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
@@ -2528,9 +2714,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2528
2714
|
retried: boolean;
|
|
2529
2715
|
} | undefined;
|
|
2530
2716
|
outage?: {
|
|
2531
|
-
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2717
|
+
reason: "other" | "sse_ended" | "daemon_shutdown" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
2532
2718
|
attempts: number;
|
|
2533
|
-
stage: "first" | "budget_spent";
|
|
2719
|
+
stage: "first" | "budget_spent" | "recovered";
|
|
2534
2720
|
pendingLost?: number | undefined;
|
|
2535
2721
|
} | undefined;
|
|
2536
2722
|
instrumentation?: {
|
|
@@ -2538,6 +2724,11 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2538
2724
|
initialized: boolean;
|
|
2539
2725
|
agentAttached: boolean;
|
|
2540
2726
|
} | undefined;
|
|
2727
|
+
stall?: {
|
|
2728
|
+
initialized: boolean;
|
|
2729
|
+
agentAttached: boolean;
|
|
2730
|
+
msWaited: number;
|
|
2731
|
+
} | undefined;
|
|
2541
2732
|
installSource?: "unknown" | "skill_file" | "npx_skill" | "plugin" | "docs_site" | "readme" | "cli_direct" | undefined;
|
|
2542
2733
|
}>;
|
|
2543
2734
|
export type TelemetryEvent = z.infer<typeof TelemetryEventSchema>;
|
package/dist/telemetry.js
CHANGED
|
@@ -128,6 +128,24 @@ export const TelemetryEventKind = {
|
|
|
128
128
|
* is a real rate rather than an inference, and a reconnecting page cannot inflate it.
|
|
129
129
|
*/
|
|
130
130
|
APP_INSTRUMENTED: 'app_instrumented',
|
|
131
|
+
/**
|
|
132
|
+
* A daemon has been up long enough that no app is going to arrive on its own.
|
|
133
|
+
*
|
|
134
|
+
* The exact counterpart of `app_instrumented`, and the reason it has to exist: that event only
|
|
135
|
+
* fires on SUCCESS, so the far larger population — daemons that never get an app at all — is
|
|
136
|
+
* measurable today only by the ABSENCE of an event, and an absence cannot distinguish "nothing
|
|
137
|
+
* was wired" from "the process died before it could tell us" from "we never sent it".
|
|
138
|
+
*
|
|
139
|
+
* The funnel breaks here and nowhere else, so this is the one silence worth turning into a signal.
|
|
140
|
+
* Fired ONCE per daemon run, and never after an app has connected, so a daemon that starts slowly
|
|
141
|
+
* and then works reports nothing.
|
|
142
|
+
*
|
|
143
|
+
* Read it against `agentAttached`: a stalled daemon with no agent is a person who installed and
|
|
144
|
+
* walked away, which is not a defect. A stalled daemon WITH an agent attached is the failure this
|
|
145
|
+
* product currently has — the tools are there, something is asking for them, and there is no app
|
|
146
|
+
* on the other end.
|
|
147
|
+
*/
|
|
148
|
+
INSTRUMENTATION_STALLED: 'instrumentation_stalled',
|
|
131
149
|
/**
|
|
132
150
|
* The agent LOST its Reticle tools — the worst thing this product does to anyone, and until now
|
|
133
151
|
* completely invisible in the field.
|
|
@@ -194,6 +212,7 @@ const SESSION_SCOPED = new Set([
|
|
|
194
212
|
TelemetryEventKind.SESSION_PROGRESS,
|
|
195
213
|
TelemetryEventKind.MCP_CLIENT_CONNECTED,
|
|
196
214
|
TelemetryEventKind.APP_INSTRUMENTED,
|
|
215
|
+
TelemetryEventKind.INSTRUMENTATION_STALLED,
|
|
197
216
|
TelemetryEventKind.PROJECT_PROFILED,
|
|
198
217
|
TelemetryEventKind.VERIFICATION_COMPLETED,
|
|
199
218
|
TelemetryEventKind.BUG_FOUND,
|
|
@@ -527,6 +546,19 @@ export const BugFoundSchema = z.object({
|
|
|
527
546
|
* `BugAttribution` for why `app` needs positive evidence.
|
|
528
547
|
*/
|
|
529
548
|
attribution: z.nativeEnum(BugAttribution),
|
|
549
|
+
/**
|
|
550
|
+
* A stable hash identifying THIS defect across sessions — same kind at the same route = same
|
|
551
|
+
* fingerprint, regardless of when or where it was found.
|
|
552
|
+
*
|
|
553
|
+
* The inputs (route, selector) never travel raw — only the 8-char hex hash does, following the
|
|
554
|
+
* same privacy pattern as `projectId`. The analytics side groups on it to answer "was this bug
|
|
555
|
+
* fixed?" (the fingerprint stops appearing) and to deduplicate the same defect found by parallel
|
|
556
|
+
* agents in one run.
|
|
557
|
+
*
|
|
558
|
+
* OPTIONAL because old senders and the `reticle verify` CLI path do not yet compute it. Absent
|
|
559
|
+
* means "not fingerprinted", never "a different defect from one that has a fingerprint".
|
|
560
|
+
*/
|
|
561
|
+
fingerprint: z.string().max(16).optional(),
|
|
530
562
|
});
|
|
531
563
|
/**
|
|
532
564
|
* WHY a tool could not do what was asked.
|
|
@@ -600,6 +632,26 @@ export const AppInstrumentationSchema = z.object({
|
|
|
600
632
|
/** How long the daemon had been up. Large values mean Reticle sat there with nothing wired. */
|
|
601
633
|
msToFirstApp: z.number().int().nonnegative(),
|
|
602
634
|
});
|
|
635
|
+
/**
|
|
636
|
+
* The shape of a daemon that waited and got nothing.
|
|
637
|
+
*
|
|
638
|
+
* Deliberately the same three facts as `AppInstrumentation` rather than a richer payload, so the
|
|
639
|
+
* success and failure cases are directly comparable: the only difference between them should be
|
|
640
|
+
* which event carries them. `msWaited` is the counterpart of `msToFirstApp`.
|
|
641
|
+
*
|
|
642
|
+
* What it does NOT carry is any attempt to say WHY, because at this point the daemon does not know.
|
|
643
|
+
* Whether a dev server is listening is a live probe, and running one on a timer to enrich a metric
|
|
644
|
+
* would be collecting for the metric's sake. The diagnosis belongs where a human or an agent asks
|
|
645
|
+
* for it, not here.
|
|
646
|
+
*/
|
|
647
|
+
export const InstrumentationStallSchema = z.object({
|
|
648
|
+
/** Whether `reticle init` had been run in this directory (a projectId is stamped). */
|
|
649
|
+
initialized: z.boolean(),
|
|
650
|
+
/** Whether an MCP client is attached. The difference between an idle install and a broken one. */
|
|
651
|
+
agentAttached: z.boolean(),
|
|
652
|
+
/** How long the daemon has been up with no app on the other end. */
|
|
653
|
+
msWaited: z.number().int().nonnegative(),
|
|
654
|
+
});
|
|
603
655
|
/**
|
|
604
656
|
* WHICH stage of an MCP outage this is. Reported at most twice per proxy process, and the two are
|
|
605
657
|
* different facts: `first` says the session lost its tools at all, `budget_spent` says the proxy
|
|
@@ -608,6 +660,18 @@ export const AppInstrumentationSchema = z.object({
|
|
|
608
660
|
export const OutageStage = {
|
|
609
661
|
FIRST: 'first',
|
|
610
662
|
BUDGET_SPENT: 'budget_spent',
|
|
663
|
+
/**
|
|
664
|
+
* The link came back on its own, and `attempts` says what it cost.
|
|
665
|
+
*
|
|
666
|
+
* Without it `first` is unfalsifiable. It is emitted at the moment of the drop, when the attempt
|
|
667
|
+
* counter is 1 by construction and the cap keeps any later drop from ever replacing it — so every
|
|
668
|
+
* event in the field carried the same stage and the same attempt count, and neither could carry
|
|
669
|
+
* another. That reads as "reconnection never advances past the first attempt" and it is really
|
|
670
|
+
* "this event is emitted before there is anything to say". `recovered` is the counterpart that
|
|
671
|
+
* makes the pair mean something: `first` with no `recovered` and no `budget_spent` is a session
|
|
672
|
+
* whose tools never came back.
|
|
673
|
+
*/
|
|
674
|
+
RECOVERED: 'recovered',
|
|
611
675
|
};
|
|
612
676
|
/**
|
|
613
677
|
* WHY the stream went away, as far as the proxy can tell. A closed vocabulary because the proxy's
|
|
@@ -615,8 +679,17 @@ export const OutageStage = {
|
|
|
615
679
|
* without a raw string reaching the wire, per the classifier rule.
|
|
616
680
|
*/
|
|
617
681
|
export const OutageReason = {
|
|
618
|
-
/** The SSE stream ended cleanly
|
|
682
|
+
/** The SSE stream ended cleanly and nothing said why. */
|
|
619
683
|
SSE_ENDED: 'sse_ended',
|
|
684
|
+
/**
|
|
685
|
+
* The daemon ANNOUNCED that it was retiring before it closed the stream.
|
|
686
|
+
*
|
|
687
|
+
* Not an outage the agent suffered, and separating it is the whole point: a scheduled shutdown and
|
|
688
|
+
* a daemon dying under a live client are the same clean stream end on this side of the socket, so
|
|
689
|
+
* the metric meant to say "the agent lost its tools" spent most of its volume counting the daemon
|
|
690
|
+
* going to sleep exactly as designed. Split out, `sse_ended` finally means what it says.
|
|
691
|
+
*/
|
|
692
|
+
DAEMON_SHUTDOWN: 'daemon_shutdown',
|
|
620
693
|
/** The stream errored. */
|
|
621
694
|
SSE_ERROR: 'sse_error',
|
|
622
695
|
/** The socket died under us with neither `end` nor `error` — daemon killed, network reset. */
|
|
@@ -834,6 +907,8 @@ export const TelemetryEventSchema = z.object({
|
|
|
834
907
|
outage: McpOutageSchema.optional(),
|
|
835
908
|
/** Only on `app_instrumented`: the install's second half finally happening. */
|
|
836
909
|
instrumentation: AppInstrumentationSchema.optional(),
|
|
910
|
+
/** Only on `instrumentation_stalled`: the install's second half not happening. */
|
|
911
|
+
stall: InstrumentationStallSchema.optional(),
|
|
837
912
|
/**
|
|
838
913
|
* Only on `reticle_installed` / `init_completed`: which published route brought this install in.
|
|
839
914
|
*
|