@reticlehq/core 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +25 -1
- package/dist/constants.js +30 -1
- package/dist/desktop-contract.cjs +1 -0
- package/dist/desktop-contract.d.cts +1 -0
- package/dist/desktop-contract.d.ts +10 -0
- package/dist/desktop-contract.js +10 -0
- package/dist/findings.d.ts +31 -0
- package/dist/findings.js +39 -0
- package/dist/flow-constants.d.ts +2 -0
- package/dist/flow-constants.js +2 -0
- package/dist/notices.d.ts +2 -2
- package/dist/notices.js +2 -2
- package/dist/telemetry-session.d.ts +22 -6
- package/dist/telemetry-session.js +20 -6
- package/dist/telemetry.d.ts +499 -33
- package/dist/telemetry.js +236 -14
- package/dist/types.d.ts +12 -0
- package/dist/types.js +10 -0
- package/dist/verified-constants.d.ts +23 -0
- package/dist/verified-constants.js +22 -0
- package/package.json +1 -1
package/dist/telemetry.d.ts
CHANGED
|
@@ -104,6 +104,26 @@ export declare const TelemetryEventKind: {
|
|
|
104
104
|
* identical to healthy usage in every other metric.
|
|
105
105
|
*/
|
|
106
106
|
readonly MCP_CLIENT_CONNECTED: "mcp_client_connected";
|
|
107
|
+
/**
|
|
108
|
+
* An app carrying the SDK connected to this daemon for the first time in its life.
|
|
109
|
+
*
|
|
110
|
+
* THE funnel step, and the one nothing could measure. Reticle's install has two halves — register
|
|
111
|
+
* the MCP server so the agent has the tools, and get the SDK into a running page so there is
|
|
112
|
+
* something for those tools to look at — and they are done at different times, by different
|
|
113
|
+
* commands, often in different directories. Almost everyone completes the first. The second is
|
|
114
|
+
* where the users go.
|
|
115
|
+
*
|
|
116
|
+
* Everything that existed before answered a different question. `daemon_started` and
|
|
117
|
+
* `mcp_client_connected` describe the agent half only. `session_appConnects` describes the app
|
|
118
|
+
* half but is a WINDOW counter: it resets on every flush, so a user whose app connected in one
|
|
119
|
+
* window reads zero in every other, and the population it under-counts is exactly the population
|
|
120
|
+
* being measured. A funnel built on it reported fewer instrumented users than there were users
|
|
121
|
+
* calling tools, which is impossible on its face and was the first sign the field was unusable.
|
|
122
|
+
*
|
|
123
|
+
* Fired ONCE per daemon run, on the first connect only — so `daemon_started` → `app_instrumented`
|
|
124
|
+
* is a real rate rather than an inference, and a reconnecting page cannot inflate it.
|
|
125
|
+
*/
|
|
126
|
+
readonly APP_INSTRUMENTED: "app_instrumented";
|
|
107
127
|
/**
|
|
108
128
|
* The agent LOST its Reticle tools — the worst thing this product does to anyone, and until now
|
|
109
129
|
* completely invisible in the field.
|
|
@@ -139,6 +159,19 @@ export declare const TelemetryEventKind: {
|
|
|
139
159
|
* human watching the screen would have caught" is the argument.
|
|
140
160
|
*/
|
|
141
161
|
readonly BUG_FOUND: "bug_found";
|
|
162
|
+
/**
|
|
163
|
+
* A tool could not do what was asked, and said so.
|
|
164
|
+
*
|
|
165
|
+
* The refusal path already computes a precise diagnosis, hands it to the agent as prose, and then
|
|
166
|
+
* throws it away. So the largest cohort in the funnel — the users who connect an agent and never
|
|
167
|
+
* drive — is visible only by subtraction, and the three genuinely different situations behind it
|
|
168
|
+
* (nothing was ever wired here, the app is not running, a session was lost) arrive as one silence.
|
|
169
|
+
*
|
|
170
|
+
* `noSessionErrors` on the session summary counts one of those causes and only at the end of a
|
|
171
|
+
* session, without the tool, without the discriminator, and without whether the agent tried again.
|
|
172
|
+
* This carries the fact at the moment it happens. See issue #172.
|
|
173
|
+
*/
|
|
174
|
+
readonly TOOL_REFUSED: "tool_refused";
|
|
142
175
|
};
|
|
143
176
|
export type TelemetryEventKind = (typeof TelemetryEventKind)[keyof typeof TelemetryEventKind];
|
|
144
177
|
/** True when this event happened inside a daemon run, so a `sessionId` on it means something. */
|
|
@@ -168,7 +201,7 @@ export type TelemetryActor = (typeof TelemetryActor)[keyof typeof TelemetryActor
|
|
|
168
201
|
* property the funnel actually needs: `init` runs in the app directory and the daemon is spawned from
|
|
169
202
|
* wherever the agent's client happens to sit, so an id that changes with the working directory
|
|
170
203
|
* severs the two halves of the funnel. Only `cwd` has that defect, and it is now the last resort
|
|
171
|
-
* rather than the first fallback —
|
|
204
|
+
* rather than the first fallback — the field showed many ids minted for a single project.
|
|
172
205
|
*/
|
|
173
206
|
export declare const ProjectIdSource: {
|
|
174
207
|
/** Hash of the shared git origin — the same on every clone, so cross-machine counting is valid. */
|
|
@@ -265,6 +298,23 @@ export declare const VerificationSchema: z.ZodObject<{
|
|
|
265
298
|
readonly UNSETTLED: "unsettled";
|
|
266
299
|
readonly PROVED: "proved";
|
|
267
300
|
}>>;
|
|
301
|
+
/**
|
|
302
|
+
* WHAT was lost, when `reason` is `unclean_capture` — see `CaptureLoss`.
|
|
303
|
+
*
|
|
304
|
+
* The three causes belong to three different owners and need three different fixes, and without
|
|
305
|
+
* this they are one bar. The one time we had to answer it the data could not, and the answer
|
|
306
|
+
* turned out to be that our own eviction counter was miscounting.
|
|
307
|
+
*
|
|
308
|
+
* ONE value, not a list: `losses` can hold several and a multi-value property is not something a
|
|
309
|
+
* dashboard can group by, so the FIRST is sent and the order in the producers is the order of
|
|
310
|
+
* ownership — ours before the page's. Absent on every verdict whose capture was clean.
|
|
311
|
+
*/
|
|
312
|
+
uncleanLoss: z.ZodOptional<z.ZodNativeEnum<{
|
|
313
|
+
readonly BUFFER_LOSS: "buffer_loss";
|
|
314
|
+
readonly TRANSPORT_GAP: "transport_gap";
|
|
315
|
+
readonly BLIND_SPOT: "blind_spot";
|
|
316
|
+
readonly OTHER: "other";
|
|
317
|
+
}>>;
|
|
268
318
|
}, "strip", z.ZodTypeAny, {
|
|
269
319
|
verified: string;
|
|
270
320
|
via: string;
|
|
@@ -272,8 +322,9 @@ export declare const VerificationSchema: z.ZodObject<{
|
|
|
272
322
|
falseGreenCaught: boolean;
|
|
273
323
|
durationMs?: number | undefined;
|
|
274
324
|
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
275
|
-
brand?: "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" |
|
|
325
|
+
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
276
326
|
browser?: string | undefined;
|
|
327
|
+
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
277
328
|
}, {
|
|
278
329
|
verified: string;
|
|
279
330
|
via: string;
|
|
@@ -281,8 +332,9 @@ export declare const VerificationSchema: z.ZodObject<{
|
|
|
281
332
|
falseGreenCaught: boolean;
|
|
282
333
|
durationMs?: number | undefined;
|
|
283
334
|
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
284
|
-
brand?: "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" |
|
|
335
|
+
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
285
336
|
browser?: string | undefined;
|
|
337
|
+
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
286
338
|
}>;
|
|
287
339
|
export type Verification = z.infer<typeof VerificationSchema>;
|
|
288
340
|
/** Which way the installed version moved, and between which versions. */
|
|
@@ -493,15 +545,23 @@ export type BugSource = (typeof BugSource)[keyof typeof BugSource];
|
|
|
493
545
|
* WHOSE fault the defect was.
|
|
494
546
|
*
|
|
495
547
|
* `bugsFound` is the number this product would most like to publish, and it is not publishable
|
|
496
|
-
* without this.
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
*
|
|
548
|
+
* without this. It shipped twice and was wrong both times: across two full real drives EVERY
|
|
549
|
+
* `attribution: 'app'` was a misattribution, so a single session would have published defects
|
|
550
|
+
* against a customer's product that did not exist. A metric confidently wrong about whose fault
|
|
551
|
+
* something is, is worse than no metric — it is the number a founder steers on, and it points at the
|
|
552
|
+
* customer. It was removed, and an ABSENT field then made "nobody classified this" and "we looked
|
|
553
|
+
* and could not tell" the same fact, which is the other half of the same problem.
|
|
554
|
+
*
|
|
555
|
+
* So it is back with two rules, and both are what the earlier versions lacked:
|
|
500
556
|
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
557
|
+
* 1. **Always present.** `UNCLASSIFIED` is a value, not a gap. Absence would mean an old sender or a
|
|
558
|
+
* path that forgot; a value means the classifier ran and declined.
|
|
559
|
+
* 2. **`APP` requires POSITIVE evidence** — something the app itself did: a request that came back
|
|
560
|
+
* failed, a signal the app fired carrying data that disagrees with its own screen, a written
|
|
561
|
+
* field echoed back changed. Never "nothing else explained it". Core already draws exactly this
|
|
562
|
+
* line for the verdict, in `ABSENCE_DERIVED_CONTRADICTIONS`, and that is the line reused rather
|
|
563
|
+
* than a second judgement invented next to it — every one of the historical misattributions was
|
|
564
|
+
* an absence-derived kind, so this rule produces zero of them on the same data.
|
|
505
565
|
*/
|
|
506
566
|
export declare const BugAttribution: {
|
|
507
567
|
/** A defect in the app under test — the only bucket that belongs in a published defect count. */
|
|
@@ -510,6 +570,15 @@ export declare const BugAttribution: {
|
|
|
510
570
|
readonly REQUEST: "request";
|
|
511
571
|
/** Reticle could not see or could not drive. Our bug, or our configuration. Ship a fix. */
|
|
512
572
|
readonly RETICLE: "reticle";
|
|
573
|
+
/**
|
|
574
|
+
* The classifier looked and the evidence could not say.
|
|
575
|
+
*
|
|
576
|
+
* The honest majority, and it must stay a value rather than becoming a gap: a failed
|
|
577
|
+
* `element.present` covers "the button is missing", "the API is down" and "the agent mistyped a
|
|
578
|
+
* testid" identically, and an owner invented for it would put a guess into the one number we
|
|
579
|
+
* intend to publish. Exclude it from a defect count; never fold it into `app`.
|
|
580
|
+
*/
|
|
581
|
+
readonly UNCLASSIFIED: "unclassified";
|
|
513
582
|
};
|
|
514
583
|
export type BugAttribution = (typeof BugAttribution)[keyof typeof BugAttribution];
|
|
515
584
|
/**
|
|
@@ -564,33 +633,111 @@ export declare const BugFoundSchema: z.ZodObject<{
|
|
|
564
633
|
*/
|
|
565
634
|
repeat: z.ZodBoolean;
|
|
566
635
|
/**
|
|
567
|
-
* Whose fault it was
|
|
568
|
-
*
|
|
636
|
+
* Whose fault it was, ALWAYS present — `unclassified` when the evidence cannot say, never absent.
|
|
637
|
+
*
|
|
638
|
+
* Absence and "we looked and could not tell" are different facts, and only one of them is a
|
|
639
|
+
* measurement. Count `attribution: 'app'` for defects found in anybody's product; see
|
|
640
|
+
* `BugAttribution` for why `app` needs positive evidence.
|
|
569
641
|
*/
|
|
570
|
-
attribution: z.
|
|
642
|
+
attribution: z.ZodNativeEnum<{
|
|
571
643
|
/** A defect in the app under test — the only bucket that belongs in a published defect count. */
|
|
572
644
|
readonly APP: "app";
|
|
573
645
|
/** The agent's own call was wrong: a path, store or target that never existed. Teach the agent. */
|
|
574
646
|
readonly REQUEST: "request";
|
|
575
647
|
/** Reticle could not see or could not drive. Our bug, or our configuration. Ship a fix. */
|
|
576
648
|
readonly RETICLE: "reticle";
|
|
577
|
-
|
|
649
|
+
/**
|
|
650
|
+
* The classifier looked and the evidence could not say.
|
|
651
|
+
*
|
|
652
|
+
* The honest majority, and it must stay a value rather than becoming a gap: a failed
|
|
653
|
+
* `element.present` covers "the button is missing", "the API is down" and "the agent mistyped a
|
|
654
|
+
* testid" identically, and an owner invented for it would put a guess into the one number we
|
|
655
|
+
* intend to publish. Exclude it from a defect count; never fold it into `app`.
|
|
656
|
+
*/
|
|
657
|
+
readonly UNCLASSIFIED: "unclassified";
|
|
658
|
+
}>;
|
|
578
659
|
}, "strip", z.ZodTypeAny, {
|
|
579
660
|
kind: string;
|
|
580
661
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
662
|
+
attribution: "app" | "reticle" | "request" | "unclassified";
|
|
581
663
|
falseGreen: boolean;
|
|
582
664
|
repeat: boolean;
|
|
583
|
-
attribution?: "app" | "reticle" | "request" | undefined;
|
|
584
665
|
tool?: string | undefined;
|
|
585
666
|
}, {
|
|
586
667
|
kind: string;
|
|
587
668
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
669
|
+
attribution: "app" | "reticle" | "request" | "unclassified";
|
|
588
670
|
falseGreen: boolean;
|
|
589
671
|
repeat: boolean;
|
|
590
|
-
attribution?: "app" | "reticle" | "request" | undefined;
|
|
591
672
|
tool?: string | undefined;
|
|
592
673
|
}>;
|
|
593
674
|
export type BugFound = z.infer<typeof BugFoundSchema>;
|
|
675
|
+
/**
|
|
676
|
+
* WHY a tool could not do what was asked.
|
|
677
|
+
*
|
|
678
|
+
* Derived from the refusal paths that actually exist rather than invented: every member below is a
|
|
679
|
+
* bucket over `error-recovery.ts`'s recovery table, which is the single place a thrown message is
|
|
680
|
+
* turned into a next action. That table is the vocabulary; this is its coarse grouping, and a new
|
|
681
|
+
* entry there cannot compile without being classified here.
|
|
682
|
+
*
|
|
683
|
+
* The five that matter belong to four different owners, which is the whole reason for splitting
|
|
684
|
+
* them: `no_session` is the install's second half never happening, `bad_args` is the agent's own
|
|
685
|
+
* call, `not_ready` is the environment, and `no_match` / `unsupported` are the app and our own
|
|
686
|
+
* capability surface. One undifferentiated "the agent stopped" number cannot be acted on by anyone.
|
|
687
|
+
*/
|
|
688
|
+
export declare const RefusalReason: {
|
|
689
|
+
/** There was no app to reach: nothing connected, no session by that id, or several with none named. */
|
|
690
|
+
readonly NO_SESSION: "no_session";
|
|
691
|
+
/** The target did not exist: a stale ref, a missing baseline, an option value the select has not got. */
|
|
692
|
+
readonly NO_MATCH: "no_match";
|
|
693
|
+
/** Reticle refuses to pretend: a rich-text surface, a disabled field, a destructive control. */
|
|
694
|
+
readonly UNSUPPORTED: "unsupported";
|
|
695
|
+
/** The call did not match the schema, or named a value our own validators reject. */
|
|
696
|
+
readonly BAD_ARGS: "bad_args";
|
|
697
|
+
/** Nothing is wrong with the call; the world is not ready — a throttled tab, a timeout, no browser. */
|
|
698
|
+
readonly NOT_READY: "not_ready";
|
|
699
|
+
/** A refusal this list does not name. A classifier that cannot say "I don't know" lies instead. */
|
|
700
|
+
readonly OTHER: "other";
|
|
701
|
+
};
|
|
702
|
+
export type RefusalReason = (typeof RefusalReason)[keyof typeof RefusalReason];
|
|
703
|
+
/** One tool call that could not be served. */
|
|
704
|
+
export declare const ToolRefusalSchema: z.ZodObject<{
|
|
705
|
+
/** Which tool. A name from our own fixed namespace, never app data. */
|
|
706
|
+
tool: z.ZodString;
|
|
707
|
+
reason: z.ZodNativeEnum<{
|
|
708
|
+
/** There was no app to reach: nothing connected, no session by that id, or several with none named. */
|
|
709
|
+
readonly NO_SESSION: "no_session";
|
|
710
|
+
/** The target did not exist: a stale ref, a missing baseline, an option value the select has not got. */
|
|
711
|
+
readonly NO_MATCH: "no_match";
|
|
712
|
+
/** Reticle refuses to pretend: a rich-text surface, a disabled field, a destructive control. */
|
|
713
|
+
readonly UNSUPPORTED: "unsupported";
|
|
714
|
+
/** The call did not match the schema, or named a value our own validators reject. */
|
|
715
|
+
readonly BAD_ARGS: "bad_args";
|
|
716
|
+
/** Nothing is wrong with the call; the world is not ready — a throttled tab, a timeout, no browser. */
|
|
717
|
+
readonly NOT_READY: "not_ready";
|
|
718
|
+
/** A refusal this list does not name. A classifier that cannot say "I don't know" lies instead. */
|
|
719
|
+
readonly OTHER: "other";
|
|
720
|
+
}>;
|
|
721
|
+
/**
|
|
722
|
+
* TRUE when the call immediately before this one was the SAME tool, also refused.
|
|
723
|
+
*
|
|
724
|
+
* Reported on the RETRY rather than on the first refusal, because the first refusal has to be sent
|
|
725
|
+
* at the moment it happens: deferring it until the next call is known would lose it entirely for
|
|
726
|
+
* the agent that gives up, and that agent is the whole population this event exists to describe.
|
|
727
|
+
* So count `retried: true` for retries; the ratio against all refusals is whether our diagnosis
|
|
728
|
+
* gets anybody unstuck.
|
|
729
|
+
*/
|
|
730
|
+
retried: z.ZodBoolean;
|
|
731
|
+
}, "strip", z.ZodTypeAny, {
|
|
732
|
+
reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
|
|
733
|
+
tool: string;
|
|
734
|
+
retried: boolean;
|
|
735
|
+
}, {
|
|
736
|
+
reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
|
|
737
|
+
tool: string;
|
|
738
|
+
retried: boolean;
|
|
739
|
+
}>;
|
|
740
|
+
export type ToolRefusal = z.infer<typeof ToolRefusalSchema>;
|
|
594
741
|
/** An MCP client attaching. Separates "installed and running" from "someone is actually using it". */
|
|
595
742
|
export declare const McpConnectionSchema: z.ZodObject<{
|
|
596
743
|
/** False the first time a client attaches to this daemon; true for every attach after. */
|
|
@@ -613,6 +760,31 @@ export declare const McpConnectionSchema: z.ZodObject<{
|
|
|
613
760
|
client?: string | undefined;
|
|
614
761
|
}>;
|
|
615
762
|
export type McpConnection = z.infer<typeof McpConnectionSchema>;
|
|
763
|
+
/**
|
|
764
|
+
* `app_instrumented`: an app carrying the SDK reached this daemon for the first time.
|
|
765
|
+
*
|
|
766
|
+
* The install has two halves — the MCP server registered so the agent has the tools, and the SDK
|
|
767
|
+
* loaded by a running page so there is something to look at — and this is the only signal for the
|
|
768
|
+
* second. Deliberately carries NO stack and no framework: `project_profiled` already reports both
|
|
769
|
+
* for the same daemon run, and the two join on `sessionId`.
|
|
770
|
+
*/
|
|
771
|
+
export declare const AppInstrumentationSchema: z.ZodObject<{
|
|
772
|
+
/** Whether `reticle init` had been run in this directory (a projectId is stamped). */
|
|
773
|
+
initialized: z.ZodBoolean;
|
|
774
|
+
/** Whether an MCP client was already attached when the app arrived. */
|
|
775
|
+
agentAttached: z.ZodBoolean;
|
|
776
|
+
/** How long the daemon had been up. Large values mean Reticle sat there with nothing wired. */
|
|
777
|
+
msToFirstApp: z.ZodNumber;
|
|
778
|
+
}, "strip", z.ZodTypeAny, {
|
|
779
|
+
msToFirstApp: number;
|
|
780
|
+
initialized: boolean;
|
|
781
|
+
agentAttached: boolean;
|
|
782
|
+
}, {
|
|
783
|
+
msToFirstApp: number;
|
|
784
|
+
initialized: boolean;
|
|
785
|
+
agentAttached: boolean;
|
|
786
|
+
}>;
|
|
787
|
+
export type AppInstrumentation = z.infer<typeof AppInstrumentationSchema>;
|
|
616
788
|
/**
|
|
617
789
|
* WHICH stage of an MCP outage this is. Reported at most twice per proxy process, and the two are
|
|
618
790
|
* different facts: `first` says the session lost its tools at all, `budget_spent` says the proxy
|
|
@@ -676,7 +848,7 @@ export declare const McpOutageSchema: z.ZodObject<{
|
|
|
676
848
|
/**
|
|
677
849
|
* In-flight tool calls this drop actually killed — the only part an agent can FEEL.
|
|
678
850
|
*
|
|
679
|
-
* Without it every drop looks equally bad.
|
|
851
|
+
* Without it every drop looks equally bad. In the field almost every outage was
|
|
680
852
|
* `stage: first` with `attempts: 1`** — the stream ended once and the proxy reconnected, which for
|
|
681
853
|
* an agent with nothing in flight is invisible. Reading that 321 as "the agent lost its tools 321
|
|
682
854
|
* times" overstates the problem by roughly the whole number, and buries the one drop that mattered.
|
|
@@ -697,6 +869,76 @@ export declare const McpOutageSchema: z.ZodObject<{
|
|
|
697
869
|
pendingLost?: number | undefined;
|
|
698
870
|
}>;
|
|
699
871
|
export type McpOutage = z.infer<typeof McpOutageSchema>;
|
|
872
|
+
/**
|
|
873
|
+
* WHICH published route brought this install in.
|
|
874
|
+
*
|
|
875
|
+
* Four routes ship at once — the SKILL.md paste URL, an `npx skills add` package, a Claude Code
|
|
876
|
+
* plugin, and docs.reticle.sh — and not one install can be attributed to any of them today. Every
|
|
877
|
+
* decision about where to spend effort on distribution is therefore made blind.
|
|
878
|
+
*
|
|
879
|
+
* The value is NEVER inferred. It is read from a single explicit marker (`RETICLE_INSTALL_SOURCE`)
|
|
880
|
+
* that a channel sets on itself, narrowed against this list, and anything else reports `UNKNOWN`.
|
|
881
|
+
* That is deliberate and it means `unknown` will stay large: a guessed attribution is worse than no
|
|
882
|
+
* attribution, because a distribution decision made on a guess is indistinguishable from one made on
|
|
883
|
+
* a measurement. Read a small `unknown` as a marker that spread, never as success.
|
|
884
|
+
*
|
|
885
|
+
* What the marker CANNOT be derived from, and why nothing here tries:
|
|
886
|
+
* - `npm_config_user_agent` says npm/pnpm ran us. Every one of these routes runs through npx, so it
|
|
887
|
+
* separates none of them.
|
|
888
|
+
* - The presence of `.claude-plugin/` or an installed skill directory says a plugin or a skill is
|
|
889
|
+
* present in the repo, not that it is the thing that ran `init` — and both are present at once on
|
|
890
|
+
* any machine that has tried more than one route.
|
|
891
|
+
* - A first-run heuristic on which command ran first says nothing about who told the user to run it.
|
|
892
|
+
*/
|
|
893
|
+
export declare const InstallSource: {
|
|
894
|
+
/** The canonical SKILL.md paste URL — the marker is in the command SKILL.md tells the agent to run. */
|
|
895
|
+
readonly SKILL_FILE: "skill_file";
|
|
896
|
+
/** The `npx skills add` package, which ships its own copy of the skill carrying its own marker. */
|
|
897
|
+
readonly NPX_SKILL: "npx_skill";
|
|
898
|
+
/** The Claude Code plugin, which sets the marker in the `env` of the MCP server it registers. */
|
|
899
|
+
readonly PLUGIN: "plugin";
|
|
900
|
+
/** docs.reticle.sh, whose install snippets carry the marker. */
|
|
901
|
+
readonly DOCS_SITE: "docs_site";
|
|
902
|
+
/** The repository README's install snippet. */
|
|
903
|
+
readonly README: "readme";
|
|
904
|
+
/** Somebody typed the command with no channel in front of it. Only ever self-declared. */
|
|
905
|
+
readonly CLI_DIRECT: "cli_direct";
|
|
906
|
+
/** No marker, or one this list does not name. The honest answer, and expected to dominate. */
|
|
907
|
+
readonly UNKNOWN: "unknown";
|
|
908
|
+
};
|
|
909
|
+
export type InstallSource = (typeof InstallSource)[keyof typeof InstallSource];
|
|
910
|
+
/**
|
|
911
|
+
* Why a run LOOKS automated, when `CI` alone does not say so.
|
|
912
|
+
*
|
|
913
|
+
* Advisory only — see the `automation` field on the event and `automation-hint.ts` for what these
|
|
914
|
+
* are and, more importantly, what they are not allowed to be used for.
|
|
915
|
+
*/
|
|
916
|
+
export declare const AutomationHint: {
|
|
917
|
+
/** A container runtime marker is present at the filesystem root. */
|
|
918
|
+
readonly CONTAINER: "container";
|
|
919
|
+
/** A hosted dev environment declared itself (Codespaces, Gitpod, Cloud Shell, dev container). */
|
|
920
|
+
readonly HOSTED_WORKSPACE: "hosted_workspace";
|
|
921
|
+
/** Neither end of the process is attached to a terminal. The weakest of the three. */
|
|
922
|
+
readonly NO_TTY: "no_tty";
|
|
923
|
+
};
|
|
924
|
+
export type AutomationHint = (typeof AutomationHint)[keyof typeof AutomationHint];
|
|
925
|
+
/**
|
|
926
|
+
* What `init` SAW after it finished writing, when it stayed to look.
|
|
927
|
+
*
|
|
928
|
+
* The install has two halves — register the MCP server so the agent has the tools, and get the SDK
|
|
929
|
+
* into a running page so there is something to look at — and nothing joined "init finished" to "an
|
|
930
|
+
* app connected". `init` exited 0 having written files, and the second half was completed by far
|
|
931
|
+
* fewer people than the first with no event able to tell the two apart.
|
|
932
|
+
*/
|
|
933
|
+
export declare const InitConfirmation: {
|
|
934
|
+
/** An app carrying the SDK reached the daemon while `init` watched. This is what installed means. */
|
|
935
|
+
readonly CONNECTED: "connected";
|
|
936
|
+
/** Nothing was listening on the bridge port, so no session could arrive. Not a failed install. */
|
|
937
|
+
readonly NO_DAEMON: "no_daemon";
|
|
938
|
+
/** A daemon was up and no app connected inside the window — the dev server is the outstanding step. */
|
|
939
|
+
readonly NO_SESSION: "no_session";
|
|
940
|
+
};
|
|
941
|
+
export type InitConfirmation = (typeof InitConfirmation)[keyof typeof InitConfirmation];
|
|
700
942
|
/** How `reticle init` went. The onboarding funnel, which had no instrumentation whatsoever. */
|
|
701
943
|
export declare const InitOutcomeSchema: z.ZodObject<{
|
|
702
944
|
ok: z.ZodBoolean;
|
|
@@ -706,16 +948,33 @@ export declare const InitOutcomeSchema: z.ZodObject<{
|
|
|
706
948
|
stack: z.ZodOptional<z.ZodString>;
|
|
707
949
|
/** Whether the MCP registration step succeeded — the step most likely to fail silently. */
|
|
708
950
|
mcpRegistered: z.ZodOptional<z.ZodBoolean>;
|
|
951
|
+
/**
|
|
952
|
+
* What `init` saw when it waited for an app to connect.
|
|
953
|
+
*
|
|
954
|
+
* ABSENT means it never looked, which is the honest answer for every scripted run: `init` only
|
|
955
|
+
* waits when a human is at the terminal. Read an absent value as "not measured", never as a
|
|
956
|
+
* failure to connect, or the funnel reads scripted installs as losses.
|
|
957
|
+
*/
|
|
958
|
+
confirmation: z.ZodOptional<z.ZodNativeEnum<{
|
|
959
|
+
/** An app carrying the SDK reached the daemon while `init` watched. This is what installed means. */
|
|
960
|
+
readonly CONNECTED: "connected";
|
|
961
|
+
/** Nothing was listening on the bridge port, so no session could arrive. Not a failed install. */
|
|
962
|
+
readonly NO_DAEMON: "no_daemon";
|
|
963
|
+
/** A daemon was up and no app connected inside the window — the dev server is the outstanding step. */
|
|
964
|
+
readonly NO_SESSION: "no_session";
|
|
965
|
+
}>>;
|
|
709
966
|
}, "strip", z.ZodTypeAny, {
|
|
710
967
|
ok: boolean;
|
|
711
968
|
stack?: string | undefined;
|
|
712
969
|
reason?: string | undefined;
|
|
713
970
|
mcpRegistered?: boolean | undefined;
|
|
971
|
+
confirmation?: "no_session" | "connected" | "no_daemon" | undefined;
|
|
714
972
|
}, {
|
|
715
973
|
ok: boolean;
|
|
716
974
|
stack?: string | undefined;
|
|
717
975
|
reason?: string | undefined;
|
|
718
976
|
mcpRegistered?: boolean | undefined;
|
|
977
|
+
confirmation?: "no_session" | "connected" | "no_daemon" | undefined;
|
|
719
978
|
}>;
|
|
720
979
|
export type InitOutcome = z.infer<typeof InitOutcomeSchema>;
|
|
721
980
|
/**
|
|
@@ -815,6 +1074,26 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
815
1074
|
* identical to healthy usage in every other metric.
|
|
816
1075
|
*/
|
|
817
1076
|
readonly MCP_CLIENT_CONNECTED: "mcp_client_connected";
|
|
1077
|
+
/**
|
|
1078
|
+
* An app carrying the SDK connected to this daemon for the first time in its life.
|
|
1079
|
+
*
|
|
1080
|
+
* THE funnel step, and the one nothing could measure. Reticle's install has two halves — register
|
|
1081
|
+
* the MCP server so the agent has the tools, and get the SDK into a running page so there is
|
|
1082
|
+
* something for those tools to look at — and they are done at different times, by different
|
|
1083
|
+
* commands, often in different directories. Almost everyone completes the first. The second is
|
|
1084
|
+
* where the users go.
|
|
1085
|
+
*
|
|
1086
|
+
* Everything that existed before answered a different question. `daemon_started` and
|
|
1087
|
+
* `mcp_client_connected` describe the agent half only. `session_appConnects` describes the app
|
|
1088
|
+
* half but is a WINDOW counter: it resets on every flush, so a user whose app connected in one
|
|
1089
|
+
* window reads zero in every other, and the population it under-counts is exactly the population
|
|
1090
|
+
* being measured. A funnel built on it reported fewer instrumented users than there were users
|
|
1091
|
+
* calling tools, which is impossible on its face and was the first sign the field was unusable.
|
|
1092
|
+
*
|
|
1093
|
+
* Fired ONCE per daemon run, on the first connect only — so `daemon_started` → `app_instrumented`
|
|
1094
|
+
* is a real rate rather than an inference, and a reconnecting page cannot inflate it.
|
|
1095
|
+
*/
|
|
1096
|
+
readonly APP_INSTRUMENTED: "app_instrumented";
|
|
818
1097
|
/**
|
|
819
1098
|
* The agent LOST its Reticle tools — the worst thing this product does to anyone, and until now
|
|
820
1099
|
* completely invisible in the field.
|
|
@@ -850,6 +1129,19 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
850
1129
|
* human watching the screen would have caught" is the argument.
|
|
851
1130
|
*/
|
|
852
1131
|
readonly BUG_FOUND: "bug_found";
|
|
1132
|
+
/**
|
|
1133
|
+
* A tool could not do what was asked, and said so.
|
|
1134
|
+
*
|
|
1135
|
+
* The refusal path already computes a precise diagnosis, hands it to the agent as prose, and then
|
|
1136
|
+
* throws it away. So the largest cohort in the funnel — the users who connect an agent and never
|
|
1137
|
+
* drive — is visible only by subtraction, and the three genuinely different situations behind it
|
|
1138
|
+
* (nothing was ever wired here, the app is not running, a session was lost) arrive as one silence.
|
|
1139
|
+
*
|
|
1140
|
+
* `noSessionErrors` on the session summary counts one of those causes and only at the end of a
|
|
1141
|
+
* session, without the tool, without the discriminator, and without whether the agent tried again.
|
|
1142
|
+
* This carries the fact at the moment it happens. See issue #172.
|
|
1143
|
+
*/
|
|
1144
|
+
readonly TOOL_REFUSED: "tool_refused";
|
|
853
1145
|
}>;
|
|
854
1146
|
/** Client epoch-ms when the event happened (the server also stamps its own receive time). */
|
|
855
1147
|
ts: z.ZodNumber;
|
|
@@ -857,6 +1149,23 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
857
1149
|
version: z.ZodString;
|
|
858
1150
|
/** Runs inside CI? Separates real human DAU from pipeline traffic (both matter, differently). */
|
|
859
1151
|
ci: z.ZodBoolean;
|
|
1152
|
+
/**
|
|
1153
|
+
* ADVISORY hint that this run looks automated, when something beyond `CI` suggests it.
|
|
1154
|
+
*
|
|
1155
|
+
* `ci` reads one environment variable, which is right for a GitHub Actions runner and blind to a
|
|
1156
|
+
* cloud agent sandbox — our own gate has landed in the user data with `ci: false`. This is the
|
|
1157
|
+
* second angle, and it is NEVER a filter: people work in containers, in Codespaces, and over ssh
|
|
1158
|
+
* with no terminal. Never exclude a row because this is set; absent means nothing looked
|
|
1159
|
+
* automated, not that a human was present. See automation-hint.ts for the rejected signals.
|
|
1160
|
+
*/
|
|
1161
|
+
automation: z.ZodOptional<z.ZodNativeEnum<{
|
|
1162
|
+
/** A container runtime marker is present at the filesystem root. */
|
|
1163
|
+
readonly CONTAINER: "container";
|
|
1164
|
+
/** A hosted dev environment declared itself (Codespaces, Gitpod, Cloud Shell, dev container). */
|
|
1165
|
+
readonly HOSTED_WORKSPACE: "hosted_workspace";
|
|
1166
|
+
/** Neither end of the process is attached to a terminal. The weakest of the three. */
|
|
1167
|
+
readonly NO_TTY: "no_tty";
|
|
1168
|
+
}>>;
|
|
860
1169
|
/**
|
|
861
1170
|
* What `projectId` was derived from. On EVERY event, not just the profile, because the core
|
|
862
1171
|
* counting questions ("users per project", "projects per user") run over all events and need to
|
|
@@ -1082,6 +1391,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1082
1391
|
errorClasses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1083
1392
|
errorsRecovered: z.ZodOptional<z.ZodNumber>;
|
|
1084
1393
|
errorsRepeated: z.ZodOptional<z.ZodNumber>;
|
|
1394
|
+
endedWithVerdict: z.ZodOptional<z.ZodBoolean>;
|
|
1085
1395
|
final: z.ZodBoolean;
|
|
1086
1396
|
exit: z.ZodOptional<z.ZodEnum<["idle", "signal", "unknown"]>>;
|
|
1087
1397
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1143,6 +1453,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1143
1453
|
errorClasses?: Record<string, number> | undefined;
|
|
1144
1454
|
errorsRecovered?: number | undefined;
|
|
1145
1455
|
errorsRepeated?: number | undefined;
|
|
1456
|
+
endedWithVerdict?: boolean | undefined;
|
|
1146
1457
|
exit?: "signal" | "idle" | "unknown" | undefined;
|
|
1147
1458
|
}, {
|
|
1148
1459
|
durationMs: number;
|
|
@@ -1203,6 +1514,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1203
1514
|
errorClasses?: Record<string, number> | undefined;
|
|
1204
1515
|
errorsRecovered?: number | undefined;
|
|
1205
1516
|
errorsRepeated?: number | undefined;
|
|
1517
|
+
endedWithVerdict?: boolean | undefined;
|
|
1206
1518
|
exit?: "signal" | "idle" | "unknown" | undefined;
|
|
1207
1519
|
}>>;
|
|
1208
1520
|
/** Only on `project_profiled`: the shape and depth-of-use of the project. */
|
|
@@ -1346,6 +1658,23 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1346
1658
|
readonly UNSETTLED: "unsettled";
|
|
1347
1659
|
readonly PROVED: "proved";
|
|
1348
1660
|
}>>;
|
|
1661
|
+
/**
|
|
1662
|
+
* WHAT was lost, when `reason` is `unclean_capture` — see `CaptureLoss`.
|
|
1663
|
+
*
|
|
1664
|
+
* The three causes belong to three different owners and need three different fixes, and without
|
|
1665
|
+
* this they are one bar. The one time we had to answer it the data could not, and the answer
|
|
1666
|
+
* turned out to be that our own eviction counter was miscounting.
|
|
1667
|
+
*
|
|
1668
|
+
* ONE value, not a list: `losses` can hold several and a multi-value property is not something a
|
|
1669
|
+
* dashboard can group by, so the FIRST is sent and the order in the producers is the order of
|
|
1670
|
+
* ownership — ours before the page's. Absent on every verdict whose capture was clean.
|
|
1671
|
+
*/
|
|
1672
|
+
uncleanLoss: z.ZodOptional<z.ZodNativeEnum<{
|
|
1673
|
+
readonly BUFFER_LOSS: "buffer_loss";
|
|
1674
|
+
readonly TRANSPORT_GAP: "transport_gap";
|
|
1675
|
+
readonly BLIND_SPOT: "blind_spot";
|
|
1676
|
+
readonly OTHER: "other";
|
|
1677
|
+
}>>;
|
|
1349
1678
|
}, "strip", z.ZodTypeAny, {
|
|
1350
1679
|
verified: string;
|
|
1351
1680
|
via: string;
|
|
@@ -1353,8 +1682,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1353
1682
|
falseGreenCaught: boolean;
|
|
1354
1683
|
durationMs?: number | undefined;
|
|
1355
1684
|
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
1356
|
-
brand?: "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" |
|
|
1685
|
+
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
1357
1686
|
browser?: string | undefined;
|
|
1687
|
+
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
1358
1688
|
}, {
|
|
1359
1689
|
verified: string;
|
|
1360
1690
|
via: string;
|
|
@@ -1362,8 +1692,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1362
1692
|
falseGreenCaught: boolean;
|
|
1363
1693
|
durationMs?: number | undefined;
|
|
1364
1694
|
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
1365
|
-
brand?: "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" |
|
|
1695
|
+
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
1366
1696
|
browser?: string | undefined;
|
|
1697
|
+
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
1367
1698
|
}>>;
|
|
1368
1699
|
/** Only on `version_changed`. */
|
|
1369
1700
|
versionChange: z.ZodOptional<z.ZodObject<{
|
|
@@ -1579,16 +1910,33 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1579
1910
|
stack: z.ZodOptional<z.ZodString>;
|
|
1580
1911
|
/** Whether the MCP registration step succeeded — the step most likely to fail silently. */
|
|
1581
1912
|
mcpRegistered: z.ZodOptional<z.ZodBoolean>;
|
|
1913
|
+
/**
|
|
1914
|
+
* What `init` saw when it waited for an app to connect.
|
|
1915
|
+
*
|
|
1916
|
+
* ABSENT means it never looked, which is the honest answer for every scripted run: `init` only
|
|
1917
|
+
* waits when a human is at the terminal. Read an absent value as "not measured", never as a
|
|
1918
|
+
* failure to connect, or the funnel reads scripted installs as losses.
|
|
1919
|
+
*/
|
|
1920
|
+
confirmation: z.ZodOptional<z.ZodNativeEnum<{
|
|
1921
|
+
/** An app carrying the SDK reached the daemon while `init` watched. This is what installed means. */
|
|
1922
|
+
readonly CONNECTED: "connected";
|
|
1923
|
+
/** Nothing was listening on the bridge port, so no session could arrive. Not a failed install. */
|
|
1924
|
+
readonly NO_DAEMON: "no_daemon";
|
|
1925
|
+
/** A daemon was up and no app connected inside the window — the dev server is the outstanding step. */
|
|
1926
|
+
readonly NO_SESSION: "no_session";
|
|
1927
|
+
}>>;
|
|
1582
1928
|
}, "strip", z.ZodTypeAny, {
|
|
1583
1929
|
ok: boolean;
|
|
1584
1930
|
stack?: string | undefined;
|
|
1585
1931
|
reason?: string | undefined;
|
|
1586
1932
|
mcpRegistered?: boolean | undefined;
|
|
1933
|
+
confirmation?: "no_session" | "connected" | "no_daemon" | undefined;
|
|
1587
1934
|
}, {
|
|
1588
1935
|
ok: boolean;
|
|
1589
1936
|
stack?: string | undefined;
|
|
1590
1937
|
reason?: string | undefined;
|
|
1591
1938
|
mcpRegistered?: boolean | undefined;
|
|
1939
|
+
confirmation?: "no_session" | "connected" | "no_daemon" | undefined;
|
|
1592
1940
|
}>>;
|
|
1593
1941
|
/** Only on `bug_found`. */
|
|
1594
1942
|
bug: z.ZodOptional<z.ZodObject<{
|
|
@@ -1636,32 +1984,81 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1636
1984
|
*/
|
|
1637
1985
|
repeat: z.ZodBoolean;
|
|
1638
1986
|
/**
|
|
1639
|
-
* Whose fault it was
|
|
1640
|
-
*
|
|
1987
|
+
* Whose fault it was, ALWAYS present — `unclassified` when the evidence cannot say, never absent.
|
|
1988
|
+
*
|
|
1989
|
+
* Absence and "we looked and could not tell" are different facts, and only one of them is a
|
|
1990
|
+
* measurement. Count `attribution: 'app'` for defects found in anybody's product; see
|
|
1991
|
+
* `BugAttribution` for why `app` needs positive evidence.
|
|
1641
1992
|
*/
|
|
1642
|
-
attribution: z.
|
|
1993
|
+
attribution: z.ZodNativeEnum<{
|
|
1643
1994
|
/** A defect in the app under test — the only bucket that belongs in a published defect count. */
|
|
1644
1995
|
readonly APP: "app";
|
|
1645
1996
|
/** The agent's own call was wrong: a path, store or target that never existed. Teach the agent. */
|
|
1646
1997
|
readonly REQUEST: "request";
|
|
1647
1998
|
/** Reticle could not see or could not drive. Our bug, or our configuration. Ship a fix. */
|
|
1648
1999
|
readonly RETICLE: "reticle";
|
|
1649
|
-
|
|
2000
|
+
/**
|
|
2001
|
+
* The classifier looked and the evidence could not say.
|
|
2002
|
+
*
|
|
2003
|
+
* The honest majority, and it must stay a value rather than becoming a gap: a failed
|
|
2004
|
+
* `element.present` covers "the button is missing", "the API is down" and "the agent mistyped a
|
|
2005
|
+
* testid" identically, and an owner invented for it would put a guess into the one number we
|
|
2006
|
+
* intend to publish. Exclude it from a defect count; never fold it into `app`.
|
|
2007
|
+
*/
|
|
2008
|
+
readonly UNCLASSIFIED: "unclassified";
|
|
2009
|
+
}>;
|
|
1650
2010
|
}, "strip", z.ZodTypeAny, {
|
|
1651
2011
|
kind: string;
|
|
1652
2012
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
2013
|
+
attribution: "app" | "reticle" | "request" | "unclassified";
|
|
1653
2014
|
falseGreen: boolean;
|
|
1654
2015
|
repeat: boolean;
|
|
1655
|
-
attribution?: "app" | "reticle" | "request" | undefined;
|
|
1656
2016
|
tool?: string | undefined;
|
|
1657
2017
|
}, {
|
|
1658
2018
|
kind: string;
|
|
1659
2019
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
2020
|
+
attribution: "app" | "reticle" | "request" | "unclassified";
|
|
1660
2021
|
falseGreen: boolean;
|
|
1661
2022
|
repeat: boolean;
|
|
1662
|
-
attribution?: "app" | "reticle" | "request" | undefined;
|
|
1663
2023
|
tool?: string | undefined;
|
|
1664
2024
|
}>>;
|
|
2025
|
+
/** Only on `tool_refused`: which tool, why, and whether the agent tried the same thing again. */
|
|
2026
|
+
refusal: z.ZodOptional<z.ZodObject<{
|
|
2027
|
+
/** Which tool. A name from our own fixed namespace, never app data. */
|
|
2028
|
+
tool: z.ZodString;
|
|
2029
|
+
reason: z.ZodNativeEnum<{
|
|
2030
|
+
/** There was no app to reach: nothing connected, no session by that id, or several with none named. */
|
|
2031
|
+
readonly NO_SESSION: "no_session";
|
|
2032
|
+
/** The target did not exist: a stale ref, a missing baseline, an option value the select has not got. */
|
|
2033
|
+
readonly NO_MATCH: "no_match";
|
|
2034
|
+
/** Reticle refuses to pretend: a rich-text surface, a disabled field, a destructive control. */
|
|
2035
|
+
readonly UNSUPPORTED: "unsupported";
|
|
2036
|
+
/** The call did not match the schema, or named a value our own validators reject. */
|
|
2037
|
+
readonly BAD_ARGS: "bad_args";
|
|
2038
|
+
/** Nothing is wrong with the call; the world is not ready — a throttled tab, a timeout, no browser. */
|
|
2039
|
+
readonly NOT_READY: "not_ready";
|
|
2040
|
+
/** A refusal this list does not name. A classifier that cannot say "I don't know" lies instead. */
|
|
2041
|
+
readonly OTHER: "other";
|
|
2042
|
+
}>;
|
|
2043
|
+
/**
|
|
2044
|
+
* TRUE when the call immediately before this one was the SAME tool, also refused.
|
|
2045
|
+
*
|
|
2046
|
+
* Reported on the RETRY rather than on the first refusal, because the first refusal has to be sent
|
|
2047
|
+
* at the moment it happens: deferring it until the next call is known would lose it entirely for
|
|
2048
|
+
* the agent that gives up, and that agent is the whole population this event exists to describe.
|
|
2049
|
+
* So count `retried: true` for retries; the ratio against all refusals is whether our diagnosis
|
|
2050
|
+
* gets anybody unstuck.
|
|
2051
|
+
*/
|
|
2052
|
+
retried: z.ZodBoolean;
|
|
2053
|
+
}, "strip", z.ZodTypeAny, {
|
|
2054
|
+
reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
|
|
2055
|
+
tool: string;
|
|
2056
|
+
retried: boolean;
|
|
2057
|
+
}, {
|
|
2058
|
+
reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
|
|
2059
|
+
tool: string;
|
|
2060
|
+
retried: boolean;
|
|
2061
|
+
}>>;
|
|
1665
2062
|
/** Only on `mcp_connection_lost`: which stage of the outage, why, and after how many retries. */
|
|
1666
2063
|
outage: z.ZodOptional<z.ZodObject<{
|
|
1667
2064
|
stage: z.ZodNativeEnum<{
|
|
@@ -1687,7 +2084,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1687
2084
|
/**
|
|
1688
2085
|
* In-flight tool calls this drop actually killed — the only part an agent can FEEL.
|
|
1689
2086
|
*
|
|
1690
|
-
* Without it every drop looks equally bad.
|
|
2087
|
+
* Without it every drop looks equally bad. In the field almost every outage was
|
|
1691
2088
|
* `stage: first` with `attempts: 1`** — the stream ended once and the proxy reconnected, which for
|
|
1692
2089
|
* an agent with nothing in flight is invisible. Reading that 321 as "the agent lost its tools 321
|
|
1693
2090
|
* times" overstates the problem by roughly the whole number, and buries the one drop that mattered.
|
|
@@ -1707,8 +2104,47 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1707
2104
|
stage: "first" | "budget_spent";
|
|
1708
2105
|
pendingLost?: number | undefined;
|
|
1709
2106
|
}>>;
|
|
2107
|
+
/** Only on `app_instrumented`: the install's second half finally happening. */
|
|
2108
|
+
instrumentation: z.ZodOptional<z.ZodObject<{
|
|
2109
|
+
/** Whether `reticle init` had been run in this directory (a projectId is stamped). */
|
|
2110
|
+
initialized: z.ZodBoolean;
|
|
2111
|
+
/** Whether an MCP client was already attached when the app arrived. */
|
|
2112
|
+
agentAttached: z.ZodBoolean;
|
|
2113
|
+
/** How long the daemon had been up. Large values mean Reticle sat there with nothing wired. */
|
|
2114
|
+
msToFirstApp: z.ZodNumber;
|
|
2115
|
+
}, "strip", z.ZodTypeAny, {
|
|
2116
|
+
msToFirstApp: number;
|
|
2117
|
+
initialized: boolean;
|
|
2118
|
+
agentAttached: boolean;
|
|
2119
|
+
}, {
|
|
2120
|
+
msToFirstApp: number;
|
|
2121
|
+
initialized: boolean;
|
|
2122
|
+
agentAttached: boolean;
|
|
2123
|
+
}>>;
|
|
2124
|
+
/**
|
|
2125
|
+
* Only on `reticle_installed` / `init_completed`: which published route brought this install in.
|
|
2126
|
+
*
|
|
2127
|
+
* A scalar rather than a block because it belongs to two different events that have no payload in
|
|
2128
|
+
* common, and because there is exactly one fact to carry. Absent on every other kind.
|
|
2129
|
+
*/
|
|
2130
|
+
installSource: z.ZodOptional<z.ZodNativeEnum<{
|
|
2131
|
+
/** The canonical SKILL.md paste URL — the marker is in the command SKILL.md tells the agent to run. */
|
|
2132
|
+
readonly SKILL_FILE: "skill_file";
|
|
2133
|
+
/** The `npx skills add` package, which ships its own copy of the skill carrying its own marker. */
|
|
2134
|
+
readonly NPX_SKILL: "npx_skill";
|
|
2135
|
+
/** The Claude Code plugin, which sets the marker in the `env` of the MCP server it registers. */
|
|
2136
|
+
readonly PLUGIN: "plugin";
|
|
2137
|
+
/** docs.reticle.sh, whose install snippets carry the marker. */
|
|
2138
|
+
readonly DOCS_SITE: "docs_site";
|
|
2139
|
+
/** The repository README's install snippet. */
|
|
2140
|
+
readonly README: "readme";
|
|
2141
|
+
/** Somebody typed the command with no channel in front of it. Only ever self-declared. */
|
|
2142
|
+
readonly CLI_DIRECT: "cli_direct";
|
|
2143
|
+
/** No marker, or one this list does not name. The honest answer, and expected to dominate. */
|
|
2144
|
+
readonly UNKNOWN: "unknown";
|
|
2145
|
+
}>>;
|
|
1710
2146
|
}, "strip", z.ZodTypeAny, {
|
|
1711
|
-
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" | "mcp_connection_lost" | "init_completed" | "bug_found";
|
|
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";
|
|
1712
2148
|
version: string;
|
|
1713
2149
|
ci: boolean;
|
|
1714
2150
|
v: 3;
|
|
@@ -1721,9 +2157,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1721
2157
|
bug?: {
|
|
1722
2158
|
kind: string;
|
|
1723
2159
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
2160
|
+
attribution: "app" | "reticle" | "request" | "unclassified";
|
|
1724
2161
|
falseGreen: boolean;
|
|
1725
2162
|
repeat: boolean;
|
|
1726
|
-
attribution?: "app" | "reticle" | "request" | undefined;
|
|
1727
2163
|
tool?: string | undefined;
|
|
1728
2164
|
} | undefined;
|
|
1729
2165
|
project?: {
|
|
@@ -1803,8 +2239,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1803
2239
|
errorClasses?: Record<string, number> | undefined;
|
|
1804
2240
|
errorsRecovered?: number | undefined;
|
|
1805
2241
|
errorsRepeated?: number | undefined;
|
|
2242
|
+
endedWithVerdict?: boolean | undefined;
|
|
1806
2243
|
exit?: "signal" | "idle" | "unknown" | undefined;
|
|
1807
2244
|
} | undefined;
|
|
2245
|
+
automation?: "container" | "hosted_workspace" | "no_tty" | undefined;
|
|
1808
2246
|
projectIdSource?: "cwd" | "git_origin" | "git_root" | "package_root" | undefined;
|
|
1809
2247
|
tzOffsetMin?: number | undefined;
|
|
1810
2248
|
feedback?: {
|
|
@@ -1835,8 +2273,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1835
2273
|
falseGreenCaught: boolean;
|
|
1836
2274
|
durationMs?: number | undefined;
|
|
1837
2275
|
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
1838
|
-
brand?: "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" |
|
|
2276
|
+
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
1839
2277
|
browser?: string | undefined;
|
|
2278
|
+
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
1840
2279
|
} | undefined;
|
|
1841
2280
|
versionChange?: {
|
|
1842
2281
|
direction: string;
|
|
@@ -1883,6 +2322,12 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1883
2322
|
stack?: string | undefined;
|
|
1884
2323
|
reason?: string | undefined;
|
|
1885
2324
|
mcpRegistered?: boolean | undefined;
|
|
2325
|
+
confirmation?: "no_session" | "connected" | "no_daemon" | undefined;
|
|
2326
|
+
} | undefined;
|
|
2327
|
+
refusal?: {
|
|
2328
|
+
reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
|
|
2329
|
+
tool: string;
|
|
2330
|
+
retried: boolean;
|
|
1886
2331
|
} | undefined;
|
|
1887
2332
|
outage?: {
|
|
1888
2333
|
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
@@ -1890,8 +2335,14 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1890
2335
|
stage: "first" | "budget_spent";
|
|
1891
2336
|
pendingLost?: number | undefined;
|
|
1892
2337
|
} | undefined;
|
|
2338
|
+
instrumentation?: {
|
|
2339
|
+
msToFirstApp: number;
|
|
2340
|
+
initialized: boolean;
|
|
2341
|
+
agentAttached: boolean;
|
|
2342
|
+
} | undefined;
|
|
2343
|
+
installSource?: "unknown" | "skill_file" | "npx_skill" | "plugin" | "docs_site" | "readme" | "cli_direct" | undefined;
|
|
1893
2344
|
}, {
|
|
1894
|
-
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" | "mcp_connection_lost" | "init_completed" | "bug_found";
|
|
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";
|
|
1895
2346
|
version: string;
|
|
1896
2347
|
ci: boolean;
|
|
1897
2348
|
v: 3;
|
|
@@ -1904,9 +2355,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1904
2355
|
bug?: {
|
|
1905
2356
|
kind: string;
|
|
1906
2357
|
source: "replay" | "contradiction" | "crawl" | "assertion";
|
|
2358
|
+
attribution: "app" | "reticle" | "request" | "unclassified";
|
|
1907
2359
|
falseGreen: boolean;
|
|
1908
2360
|
repeat: boolean;
|
|
1909
|
-
attribution?: "app" | "reticle" | "request" | undefined;
|
|
1910
2361
|
tool?: string | undefined;
|
|
1911
2362
|
} | undefined;
|
|
1912
2363
|
project?: {
|
|
@@ -1986,8 +2437,10 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
1986
2437
|
errorClasses?: Record<string, number> | undefined;
|
|
1987
2438
|
errorsRecovered?: number | undefined;
|
|
1988
2439
|
errorsRepeated?: number | undefined;
|
|
2440
|
+
endedWithVerdict?: boolean | undefined;
|
|
1989
2441
|
exit?: "signal" | "idle" | "unknown" | undefined;
|
|
1990
2442
|
} | undefined;
|
|
2443
|
+
automation?: "container" | "hosted_workspace" | "no_tty" | undefined;
|
|
1991
2444
|
projectIdSource?: "cwd" | "git_origin" | "git_root" | "package_root" | undefined;
|
|
1992
2445
|
tzOffsetMin?: number | undefined;
|
|
1993
2446
|
feedback?: {
|
|
@@ -2018,8 +2471,9 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2018
2471
|
falseGreenCaught: boolean;
|
|
2019
2472
|
durationMs?: number | undefined;
|
|
2020
2473
|
reason?: "inconclusive" | "observation_lost" | "assertion_failed" | "contradicted" | "already_true" | "unclean_capture" | "vacuous_grade" | "outcome_pending" | "outcome_unread" | "unsettled" | "proved" | undefined;
|
|
2021
|
-
brand?: "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" |
|
|
2474
|
+
brand?: "other" | "chrome" | "edge" | "arc" | "dia" | "brave" | "opera" | "firefox" | "safari" | undefined;
|
|
2022
2475
|
browser?: string | undefined;
|
|
2476
|
+
uncleanLoss?: "buffer_loss" | "transport_gap" | "blind_spot" | "other" | undefined;
|
|
2023
2477
|
} | undefined;
|
|
2024
2478
|
versionChange?: {
|
|
2025
2479
|
direction: string;
|
|
@@ -2066,6 +2520,12 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2066
2520
|
stack?: string | undefined;
|
|
2067
2521
|
reason?: string | undefined;
|
|
2068
2522
|
mcpRegistered?: boolean | undefined;
|
|
2523
|
+
confirmation?: "no_session" | "connected" | "no_daemon" | undefined;
|
|
2524
|
+
} | undefined;
|
|
2525
|
+
refusal?: {
|
|
2526
|
+
reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
|
|
2527
|
+
tool: string;
|
|
2528
|
+
retried: boolean;
|
|
2069
2529
|
} | undefined;
|
|
2070
2530
|
outage?: {
|
|
2071
2531
|
reason: "other" | "sse_ended" | "sse_error" | "sse_aborted" | "sse_closed" | "connect_error";
|
|
@@ -2073,5 +2533,11 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
2073
2533
|
stage: "first" | "budget_spent";
|
|
2074
2534
|
pendingLost?: number | undefined;
|
|
2075
2535
|
} | undefined;
|
|
2536
|
+
instrumentation?: {
|
|
2537
|
+
msToFirstApp: number;
|
|
2538
|
+
initialized: boolean;
|
|
2539
|
+
agentAttached: boolean;
|
|
2540
|
+
} | undefined;
|
|
2541
|
+
installSource?: "unknown" | "skill_file" | "npx_skill" | "plugin" | "docs_site" | "readme" | "cli_direct" | undefined;
|
|
2076
2542
|
}>;
|
|
2077
2543
|
export type TelemetryEvent = z.infer<typeof TelemetryEventSchema>;
|