@reticlehq/core 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/brand.d.ts +0 -1
  2. package/dist/brand.js +0 -1
  3. package/dist/consequence.d.ts +0 -1
  4. package/dist/consequence.js +0 -1
  5. package/dist/constants.d.ts +30 -33
  6. package/dist/constants.js +33 -31
  7. package/dist/daemon-registry.d.ts +0 -1
  8. package/dist/daemon-registry.js +0 -1
  9. package/dist/desktop-contract.cjs +11 -0
  10. package/dist/desktop-contract.d.cts +6 -0
  11. package/dist/desktop-contract.d.ts +58 -0
  12. package/dist/desktop-contract.js +59 -0
  13. package/dist/event-payloads.d.ts +62 -5
  14. package/dist/event-payloads.js +35 -4
  15. package/dist/event-priority.d.ts +25 -0
  16. package/dist/event-priority.js +45 -0
  17. package/dist/findings.d.ts +124 -0
  18. package/dist/findings.js +122 -0
  19. package/dist/flow-constants.d.ts +0 -1
  20. package/dist/flow-constants.js +0 -1
  21. package/dist/flow-types.d.ts +26 -2
  22. package/dist/flow-types.js +0 -1
  23. package/dist/index.d.ts +8 -1
  24. package/dist/index.js +9 -2
  25. package/dist/journal.d.ts +0 -1
  26. package/dist/journal.js +0 -1
  27. package/dist/messages.d.ts +40 -11
  28. package/dist/messages.js +14 -1
  29. package/dist/net.d.ts +41 -0
  30. package/dist/net.js +40 -0
  31. package/dist/notices.d.ts +0 -1
  32. package/dist/notices.js +0 -1
  33. package/dist/redaction.d.ts +64 -1
  34. package/dist/redaction.js +119 -3
  35. package/dist/schema/event-message.json +3 -1
  36. package/dist/schema/event-type.json +3 -1
  37. package/dist/schema/hello-message.json +9 -0
  38. package/dist/schema/reticle-event.json +3 -1
  39. package/dist/schema/reticle-message.json +12 -1
  40. package/dist/security.d.ts +20 -1
  41. package/dist/security.js +45 -1
  42. package/dist/session-constants.d.ts +0 -1
  43. package/dist/session-constants.js +0 -1
  44. package/dist/source-constants.d.ts +26 -0
  45. package/dist/source-constants.js +26 -0
  46. package/dist/state-select.d.ts +10 -1
  47. package/dist/state-select.js +56 -8
  48. package/dist/telemetry-feedback.d.ts +265 -0
  49. package/dist/telemetry-feedback.js +163 -0
  50. package/dist/telemetry-session.d.ts +524 -0
  51. package/dist/telemetry-session.js +245 -0
  52. package/dist/telemetry.d.ts +1410 -37
  53. package/dist/telemetry.js +338 -18
  54. package/dist/toon.d.ts +0 -1
  55. package/dist/toon.js +0 -1
  56. package/dist/types.d.ts +15 -8
  57. package/dist/types.js +0 -1
  58. package/dist/upgrade.d.ts +0 -1
  59. package/dist/upgrade.js +0 -1
  60. package/dist/verification-run.d.ts +14 -15
  61. package/dist/verification-run.js +0 -1
  62. package/dist/verified-constants.d.ts +104 -0
  63. package/dist/verified-constants.js +102 -0
  64. package/package.json +7 -3
  65. package/dist/brand.d.ts.map +0 -1
  66. package/dist/brand.js.map +0 -1
  67. package/dist/consequence.d.ts.map +0 -1
  68. package/dist/consequence.js.map +0 -1
  69. package/dist/constants.d.ts.map +0 -1
  70. package/dist/constants.js.map +0 -1
  71. package/dist/daemon-registry.d.ts.map +0 -1
  72. package/dist/daemon-registry.js.map +0 -1
  73. package/dist/event-payloads.d.ts.map +0 -1
  74. package/dist/event-payloads.js.map +0 -1
  75. package/dist/flow-constants.d.ts.map +0 -1
  76. package/dist/flow-constants.js.map +0 -1
  77. package/dist/flow-types.d.ts.map +0 -1
  78. package/dist/flow-types.js.map +0 -1
  79. package/dist/index.d.ts.map +0 -1
  80. package/dist/index.js.map +0 -1
  81. package/dist/journal.d.ts.map +0 -1
  82. package/dist/journal.js.map +0 -1
  83. package/dist/messages.d.ts.map +0 -1
  84. package/dist/messages.js.map +0 -1
  85. package/dist/notices.d.ts.map +0 -1
  86. package/dist/notices.js.map +0 -1
  87. package/dist/redaction.d.ts.map +0 -1
  88. package/dist/redaction.js.map +0 -1
  89. package/dist/security.d.ts.map +0 -1
  90. package/dist/security.js.map +0 -1
  91. package/dist/session-constants.d.ts.map +0 -1
  92. package/dist/session-constants.js.map +0 -1
  93. package/dist/state-select.d.ts.map +0 -1
  94. package/dist/state-select.js.map +0 -1
  95. package/dist/telemetry.d.ts.map +0 -1
  96. package/dist/telemetry.js.map +0 -1
  97. package/dist/toon.d.ts.map +0 -1
  98. package/dist/toon.js.map +0 -1
  99. package/dist/types.d.ts.map +0 -1
  100. package/dist/types.js.map +0 -1
  101. package/dist/upgrade.d.ts.map +0 -1
  102. package/dist/upgrade.js.map +0 -1
  103. package/dist/verification-run.d.ts.map +0 -1
  104. package/dist/verification-run.js.map +0 -1
@@ -7,49 +7,526 @@
7
7
  *
8
8
  * Privacy is structural, not a policy: the ONLY identifiers on the wire are a random per-machine UUID
9
9
  * (`anonymousId`, minted locally, never derived from anything personal) and a one-way HASH of the
10
- * project (`projectId`) — no repo name, no path, no email, no code. It is strictly opt-OUT (respects
10
+ * project (`projectId`) — no repo name, no path, no email, no code. The ONE exception is the
11
+ * `feedback` event, and it is an exception by consent, not by accident: it carries text a human typed
12
+ * or an agent wrote, it is NEVER emitted passively (only from an explicit `reticle_feedback` call or
13
+ * `reticle feedback` command), and it has its own kill switch. It is strictly opt-OUT (respects
11
14
  * `RETICLE_TELEMETRY=0` and the `DO_NOT_TRACK` convention) and best-effort (a failed send never touches
12
15
  * the tool's behaviour). Same conventions as the rest of core: enums are `as const` narrowed with
13
16
  * `z.nativeEnum`, timestamps are epoch-ms NUMBERS, no `any`.
14
17
  */
15
18
  import { z } from 'zod';
16
19
  /** Bump when the event shape changes so the analytics side can segment old senders. */
17
- export declare const TELEMETRY_EVENT_VERSION = 1;
18
- /** The lifecycle moments that answer the adoption questions. One event = one moment. */
20
+ export declare const TELEMETRY_EVENT_VERSION = 3;
21
+ /**
22
+ * The event taxonomy. Every name says WHAT HAPPENED, in `noun_verbed` form, with no abbreviations —
23
+ * the previous set failed that badly enough to confuse its own authors: `invoke` sounded like "a tool
24
+ * was invoked" but meant "the CLI binary ran", while the event that actually meant a tool call was
25
+ * `tool`, emitted from a file called `invoke-tool.ts`. A name you have to look up is a name that gets
26
+ * misread on a dashboard six months from now.
27
+ *
28
+ * VOLUME IS PART OF THE DESIGN. PostHog bills per ingested event, so the taxonomy is deliberately
29
+ * shaped around one high-frequency thing (tool calls) being AGGREGATED rather than emitted. A single
30
+ * agent verification loop is 50–200 tool calls; at one event each, a thousand users would push
31
+ * millions of events a day for a question — "which tools get used" — that one summary property
32
+ * answers better, because it also preserves the SHAPE of a session instead of scattering it across
33
+ * 200 rows. See `SessionSummary`.
34
+ */
19
35
  export declare const TelemetryEventKind: {
20
- /** First-ever run on this machine (or a fresh `npm install`) — powers install count + new-user curve. */
21
- readonly INSTALL: "install";
22
- /** The CLI/MCP server was invoked — the raw "how many times it gets used" counter. */
23
- readonly INVOKE: "invoke";
24
- /** A daemon/MCP session came up — the numerator of "active sessions" + DAU/WAU/MAU. */
25
- readonly SESSION_START: "session_start";
26
- /** A session ended (carries its duration) — powers active-session-length + churn-within-session. */
27
- readonly SESSION_END: "session_end";
28
- /** One MCP tool call (carries the tool name) — powers "which tool is mostly used". */
29
- readonly TOOL: "tool";
36
+ /** First-ever run on this machine — powers install count + the new-user curve. */
37
+ readonly RETICLE_INSTALLED: "reticle_installed";
38
+ /**
39
+ * A human ran a `reticle` subcommand. Carries WHICH command, which is the closest honest read we
40
+ * have on human intent (`verify` and `gate` mean something very different from `status`).
41
+ *
42
+ * Explicitly NOT emitted for the internal `_daemon` spawn: `reticle mcp` re-runs its own binary to
43
+ * start the daemon, so counting that child inflated the old `invoke` metric ~2x — and worst on
44
+ * exactly the agent-driven sessions that matter most, while leaving one-shot commands like
45
+ * `version` untouched. That skewed the ratio, not just the scale.
46
+ */
47
+ readonly CLI_COMMAND_RUN: "cli_command_run";
48
+ /** The daemon came up — the numerator of active sessions + DAU/WAU/MAU. */
49
+ readonly DAEMON_STARTED: "daemon_started";
50
+ /**
51
+ * The daemon exited. THE RICH ONE: carries the whole session rolled up (duration, tool histogram,
52
+ * errors, features touched). One event replaces the hundreds the old per-call `tool` event sent.
53
+ */
54
+ readonly DAEMON_STOPPED: "daemon_stopped";
55
+ /**
56
+ * A verification produced a verdict. The product's reason to exist, and the one metric an investor
57
+ * should be shown: not "tools were called" but "an app was actually verified, and here is how often
58
+ * that caught something a green test would have missed".
59
+ */
60
+ readonly VERIFICATION_COMPLETED: "verification_completed";
61
+ /**
62
+ * A snapshot of the project Reticle is pointed at — stack, size, and how DEEPLY the feature surface
63
+ * is used. Answers "are they using all of Reticle or three tools of it", which is the difference
64
+ * between a retention problem and an activation problem. Once per daemon start, so it is cheap.
65
+ */
66
+ readonly PROJECT_PROFILED: "project_profiled";
67
+ /** `reticle update` or `reticle rollback` moved the installed version. Carries from → to. */
68
+ readonly VERSION_CHANGED: "version_changed";
69
+ /** An uncaught exception or unhandled rejection reached the top of the daemon. Crash analytics. */
70
+ readonly RUNTIME_CRASHED: "runtime_crashed";
71
+ /**
72
+ * Someone told us something went wrong (or right). UNLIKE every other kind, this one carries
73
+ * author-written free text — which is exactly why it is never emitted passively: it exists only
74
+ * because an agent called `reticle_feedback` or a human ran `reticle feedback`. See
75
+ * `FeedbackSchema` for the consent/redaction contract.
76
+ */
77
+ readonly FEEDBACK_SUBMITTED: "feedback_submitted";
78
+ /**
79
+ * Someone chose to tell us who they are. Like `feedback_submitted`, this exists ONLY because a
80
+ * human ran a command — Reticle never infers an identity from a git remote, an email in git
81
+ * config, or anything else. See `identify.ts` for why that refusal is deliberate.
82
+ */
83
+ readonly IDENTIFIED: "identified";
84
+ /**
85
+ * An MCP client attached to the daemon.
86
+ *
87
+ * The one event that separates "Reticle is installed and running" from "somebody is actually using
88
+ * it": a daemon can sit up for days with no agent attached. It also exposes reconnect churn — a
89
+ * client that reattaches every few minutes is a client whose transport is broken, which looks
90
+ * identical to healthy usage in every other metric.
91
+ */
92
+ readonly MCP_CLIENT_CONNECTED: "mcp_client_connected";
93
+ /**
94
+ * `reticle init` finished. The onboarding funnel had no instrumentation at all, so a setup that
95
+ * failed on a missing dependency was indistinguishable from a user who never tried.
96
+ */
97
+ readonly INIT_COMPLETED: "init_completed";
98
+ /**
99
+ * Reticle found a defect in the app under test.
100
+ *
101
+ * THE metric the product exists to produce. Everything else here measures whether Reticle is used;
102
+ * this measures whether it WORKS — and it is the only number that can honestly be put in front of
103
+ * an investor or published, because it counts outcomes for users rather than activity by them.
104
+ *
105
+ * Deliberately a discrete event rather than only a counter: each bug carries its KIND, and the
106
+ * distribution is the interesting part. "We found 4,000 bugs" is a claim; "1,200 of them were
107
+ * greens that lied — a passing assertion sitting on a failed write, which no screenshot and no
108
+ * human watching the screen would have caught" is the argument.
109
+ */
110
+ readonly BUG_FOUND: "bug_found";
30
111
  };
31
112
  export type TelemetryEventKind = (typeof TelemetryEventKind)[keyof typeof TelemetryEventKind];
113
+ /**
114
+ * Who caused this. The only honest split available to us: a `reticle` command was TYPED by a person,
115
+ * while an MCP tool call came from the agent's own loop.
116
+ *
117
+ * What we deliberately do NOT claim to know is whether the human told the agent to verify or the
118
+ * agent decided on its own — that lives in a prompt Reticle never sees. Inferring it from timing
119
+ * would be a guess dressed as a measurement, and a dashboard cannot tell the difference later.
120
+ */
121
+ export declare const TelemetryActor: {
122
+ readonly HUMAN: "human";
123
+ readonly AGENT: "agent";
124
+ };
125
+ export type TelemetryActor = (typeof TelemetryActor)[keyof typeof TelemetryActor];
126
+ /**
127
+ * What `projectId` was derived from — and therefore whether it is comparable ACROSS machines.
128
+ *
129
+ * This is the field that keeps "how many users share this project" from silently lying. A
130
+ * cwd-derived id is unique per machine, so those rows always show exactly one user per project. Left
131
+ * unlabelled they would drag the average toward 1 and hide real team adoption; labelled, the
132
+ * analytics can restrict that question to `git_origin` rows, where it is a real measurement.
133
+ */
134
+ export declare const ProjectIdSource: {
135
+ /** Hash of the shared git origin — the same on every clone, so cross-machine counting is valid. */
136
+ readonly GIT_ORIGIN: "git_origin";
137
+ /** Hash of the local directory path — unique per machine; NOT comparable across users. */
138
+ readonly CWD: "cwd";
139
+ };
140
+ export type ProjectIdSource = (typeof ProjectIdSource)[keyof typeof ProjectIdSource];
141
+ /**
142
+ * How Reticle reached the browser during a session. Distinguishes the always-on SDK (observing the
143
+ * human's own tab) from a Reticle-launched or CDP-attached browser, which is the expensive path and
144
+ * the one whose failures hurt most.
145
+ */
146
+ export declare const BrowserLaunchKind: {
147
+ /** `reticle drive` / `reticle verify` launched a browser. */
148
+ readonly LAUNCHED: "launched";
149
+ /** Attached to an already-running browser over `RETICLE_CDP_URL`. */
150
+ readonly ATTACHED: "attached";
151
+ /** A pooled headless context leased for a parallel flow. */
152
+ readonly POOLED: "pooled";
153
+ };
154
+ export type BrowserLaunchKind = (typeof BrowserLaunchKind)[keyof typeof BrowserLaunchKind];
155
+ /** The outcome of one verification. `verified` is Reticle's own honesty grade, not merely pass/fail. */
156
+ export declare const VerificationSchema: z.ZodObject<{
157
+ /** Which tool produced the verdict (`reticle_assert`, `reticle_flow_verify`, …). */
158
+ via: z.ZodString;
159
+ /** `yes` | `no` | `unknown` — the honest verdict, where `unknown` means the evidence could not decide. */
160
+ verified: z.ZodString;
161
+ /** Did the underlying assertion pass? Distinct from `verified` on purpose. */
162
+ passed: z.ZodBoolean;
163
+ /**
164
+ * TRUE when the assertion passed but Reticle refused to call it verified — a caught false green.
165
+ * This is the product's whole thesis expressed as one boolean, and the number to put in a deck.
166
+ */
167
+ falseGreenCaught: z.ZodBoolean;
168
+ durationMs: z.ZodOptional<z.ZodNumber>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ via: string;
171
+ verified: string;
172
+ passed: boolean;
173
+ falseGreenCaught: boolean;
174
+ durationMs?: number | undefined;
175
+ }, {
176
+ via: string;
177
+ verified: string;
178
+ passed: boolean;
179
+ falseGreenCaught: boolean;
180
+ durationMs?: number | undefined;
181
+ }>;
182
+ export type Verification = z.infer<typeof VerificationSchema>;
183
+ /** Which way the installed version moved, and between which versions. */
184
+ export declare const VersionChangeSchema: z.ZodObject<{
185
+ from: z.ZodString;
186
+ to: z.ZodString;
187
+ /** `update` (forward) or `rollback` (back) — a rollback is a release-quality alarm. */
188
+ direction: z.ZodString;
189
+ }, "strip", z.ZodTypeAny, {
190
+ direction: string;
191
+ from: string;
192
+ to: string;
193
+ }, {
194
+ direction: string;
195
+ from: string;
196
+ to: string;
197
+ }>;
198
+ export type VersionChange = z.infer<typeof VersionChangeSchema>;
199
+ /**
200
+ * A crash, with enough detail to actually diagnose it.
201
+ *
202
+ * The first version of this carried only a fingerprint — a hash — which made crashes RANKABLE and
203
+ * completely UNDIAGNOSABLE: you could see that forty machines hit `a3f2c1d8e9b0` and had no way on
204
+ * earth to learn what `a3f2c1d8e9b0` was. A group key with no dictionary. Everything below exists to
205
+ * give the hash a meaning, while keeping the line that matters: our code and our failure, never the
206
+ * user's code and never their data.
207
+ */
208
+ export declare const CrashSchema: z.ZodObject<{
209
+ /** `uncaught_exception` | `unhandled_rejection`. */
210
+ kind: z.ZodString;
211
+ /** The error's constructor name (`TypeError`) — coarse, safe, and enough to triage. */
212
+ errorType: z.ZodOptional<z.ZodString>;
213
+ /** Hash of the type + our own frames. Groups the same crash across every machine. */
214
+ fingerprint: z.ZodOptional<z.ZodString>;
215
+ /**
216
+ * The message with every VARIABLE part removed — quoted strings, URLs, paths, ids, numbers all
217
+ * replaced by `*`. `no baseline named *` tells us exactly what broke; the flow name that made it
218
+ * specific to one user never leaves. This is what turns the fingerprint from an opaque key into a
219
+ * readable defect.
220
+ */
221
+ message: z.ZodOptional<z.ZodString>;
222
+ /**
223
+ * The RETICLE-OWNED stack frames, innermost first, as `function@file:line`.
224
+ *
225
+ * This is our own published code — `runTool@invoke-tool.js:88` is a line anyone can read in the
226
+ * npm tarball — so there is no privacy question in sending it, and it is the single most useful
227
+ * thing for a root-cause analysis: the file, the line, and the function. Frames belonging to the
228
+ * user's application or to node internals are dropped entirely before this is built.
229
+ */
230
+ frames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
231
+ /** The MCP tool in flight when it happened, when there was one. The trigger point. */
232
+ tool: z.ZodOptional<z.ZodString>;
233
+ /**
234
+ * The tool calls immediately before the failure, oldest first — the agent's approach run.
235
+ *
236
+ * Answers "what was it trying to do", which a single frame cannot: `snapshot → act → act →
237
+ * assert` is a verification loop, `lease_acquire → navigate → crash` is a startup problem. Tool
238
+ * NAMES only, from our own fixed vocabulary; no arguments, so nothing the agent typed is in here.
239
+ */
240
+ breadcrumb: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
241
+ /** Node major/minor — crashes cluster hard by runtime version and we were not recording it. */
242
+ nodeVersion: z.ZodOptional<z.ZodString>;
243
+ /** `arm64` / `x64`. A surprising number of native-module failures are architecture-specific. */
244
+ arch: z.ZodOptional<z.ZodString>;
245
+ /**
246
+ * The machine at the moment of the crash. "Out of memory" and "our bug" look identical in a stack
247
+ * trace and are completely different problems; this is what tells them apart.
248
+ */
249
+ machine: z.ZodOptional<z.ZodObject<{
250
+ rssMb: z.ZodNumber;
251
+ heapUsedMb: z.ZodNumber;
252
+ freeMemMb: z.ZodNumber;
253
+ totalMemMb: z.ZodNumber;
254
+ load1x100: z.ZodNumber;
255
+ cpuCount: z.ZodNumber;
256
+ }, "strip", z.ZodTypeAny, {
257
+ rssMb: number;
258
+ heapUsedMb: number;
259
+ freeMemMb: number;
260
+ totalMemMb: number;
261
+ load1x100: number;
262
+ cpuCount: number;
263
+ }, {
264
+ rssMb: number;
265
+ heapUsedMb: number;
266
+ freeMemMb: number;
267
+ totalMemMb: number;
268
+ load1x100: number;
269
+ cpuCount: number;
270
+ }>>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ kind: string;
273
+ message?: string | undefined;
274
+ errorType?: string | undefined;
275
+ tool?: string | undefined;
276
+ fingerprint?: string | undefined;
277
+ machine?: {
278
+ rssMb: number;
279
+ heapUsedMb: number;
280
+ freeMemMb: number;
281
+ totalMemMb: number;
282
+ load1x100: number;
283
+ cpuCount: number;
284
+ } | undefined;
285
+ frames?: string[] | undefined;
286
+ breadcrumb?: string[] | undefined;
287
+ nodeVersion?: string | undefined;
288
+ arch?: string | undefined;
289
+ }, {
290
+ kind: string;
291
+ message?: string | undefined;
292
+ errorType?: string | undefined;
293
+ tool?: string | undefined;
294
+ fingerprint?: string | undefined;
295
+ machine?: {
296
+ rssMb: number;
297
+ heapUsedMb: number;
298
+ freeMemMb: number;
299
+ totalMemMb: number;
300
+ load1x100: number;
301
+ cpuCount: number;
302
+ } | undefined;
303
+ frames?: string[] | undefined;
304
+ breadcrumb?: string[] | undefined;
305
+ nodeVersion?: string | undefined;
306
+ arch?: string | undefined;
307
+ }>;
308
+ export type Crash = z.infer<typeof CrashSchema>;
309
+ /**
310
+ * How Reticle came to find a defect. Four routes, in descending order of "a human would have missed
311
+ * this": a contradiction is invisible to someone watching the screen, a crawl finding required no
312
+ * script at all, a replay failure is a regression on something that used to work, and a failed
313
+ * assertion is the agent's own check not holding.
314
+ */
315
+ export declare const BugSource: {
316
+ /** Channels disagreed — the false green. A passing screen sitting on a failed write. */
317
+ readonly CONTRADICTION: "contradiction";
318
+ /** `reticle_crawl` found it autonomously, with nobody writing a test. */
319
+ readonly CRAWL: "crawl";
320
+ /** A saved flow that used to pass stopped passing — a regression. */
321
+ readonly REPLAY: "replay";
322
+ /** An assertion the agent declared did not hold. */
323
+ readonly ASSERTION: "assertion";
324
+ };
325
+ export type BugSource = (typeof BugSource)[keyof typeof BugSource];
326
+ /**
327
+ * One defect Reticle found in the app under test.
328
+ *
329
+ * `kind` is the taxonomy value from `findings.ts` — `signal-contradicted`, `console-error`,
330
+ * `duplicate-request` and so on. Never a selector, a URL, an element, or any description of the
331
+ * user's app: we report THAT a class of defect was found, never WHAT it was in.
332
+ */
333
+ export declare const BugFoundSchema: z.ZodObject<{
334
+ source: z.ZodNativeEnum<{
335
+ /** Channels disagreed — the false green. A passing screen sitting on a failed write. */
336
+ readonly CONTRADICTION: "contradiction";
337
+ /** `reticle_crawl` found it autonomously, with nobody writing a test. */
338
+ readonly CRAWL: "crawl";
339
+ /** A saved flow that used to pass stopped passing — a regression. */
340
+ readonly REPLAY: "replay";
341
+ /** An assertion the agent declared did not hold. */
342
+ readonly ASSERTION: "assertion";
343
+ }>;
344
+ /** The classified kind from Reticle's own findings vocabulary. */
345
+ kind: z.ZodString;
346
+ /**
347
+ * True when the defect PRESENTED AS SUCCESS — the screen advanced, the assertion passed, the click
348
+ * looked fine — while another channel showed it had not.
349
+ *
350
+ * Defined by the presentation rather than by "an assertion passed", because the same defect arrives
351
+ * both ways: through `reticle_assert` there IS a passing assertion to contradict, and through
352
+ * `reticle_crawl` there is no assertion at all and the UI simply moved on over a failed write. Both
353
+ * are the thing a human watching the screen cannot see, and that is what the flag has to mean if
354
+ * the number is going to be published.
355
+ *
356
+ * The subset worth naming separately, because it is the only category Reticle can claim as uniquely
357
+ * its own: every other kind of bug is findable by a careful human or an ordinary test.
358
+ */
359
+ falseGreen: z.ZodBoolean;
360
+ /** Which tool surfaced it. */
361
+ tool: z.ZodOptional<z.ZodString>;
362
+ /**
363
+ * TRUE when this KIND was already reported in this session — i.e. this is another INSTANCE of a
364
+ * defect already counted, not another defect.
365
+ *
366
+ * Both numbers are claims, and they are different ones. "Reticle found N defects" is the headline;
367
+ * "users hit them M times" is the frequency that says which ones actually cost anybody anything.
368
+ * Without this flag the event stream answers only the second while looking like it answers the
369
+ * first, so any distinct-defect count read off it is silently inflated — the exact way a published
370
+ * number goes wrong. Count `repeat: false` for distinct, count everything for instances.
371
+ *
372
+ * Scoped to the SESSION, because that is the only identity available: the payload deliberately
373
+ * carries no selector, URL or app detail, so the same defect in two sessions cannot be recognised
374
+ * as one — and must not be, since that would need data this event refuses to collect.
375
+ */
376
+ repeat: z.ZodBoolean;
377
+ }, "strip", z.ZodTypeAny, {
378
+ kind: string;
379
+ source: "replay" | "contradiction" | "crawl" | "assertion";
380
+ falseGreen: boolean;
381
+ repeat: boolean;
382
+ tool?: string | undefined;
383
+ }, {
384
+ kind: string;
385
+ source: "replay" | "contradiction" | "crawl" | "assertion";
386
+ falseGreen: boolean;
387
+ repeat: boolean;
388
+ tool?: string | undefined;
389
+ }>;
390
+ export type BugFound = z.infer<typeof BugFoundSchema>;
391
+ /** An MCP client attaching. Separates "installed and running" from "someone is actually using it". */
392
+ export declare const McpConnectionSchema: z.ZodObject<{
393
+ /** False the first time a client attaches to this daemon; true for every attach after. */
394
+ reconnect: z.ZodBoolean;
395
+ /**
396
+ * How long the daemon had been up first. A large value on the FIRST connect is the interesting
397
+ * case — it means Reticle was started and then sat unused, which is an onboarding failure nobody
398
+ * would otherwise report.
399
+ */
400
+ daemonAgeMs: z.ZodNumber;
401
+ /** Which client, from its own handshake (`claude-code`, `cursor`). */
402
+ client: z.ZodOptional<z.ZodString>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ reconnect: boolean;
405
+ daemonAgeMs: number;
406
+ client?: string | undefined;
407
+ }, {
408
+ reconnect: boolean;
409
+ daemonAgeMs: number;
410
+ client?: string | undefined;
411
+ }>;
412
+ export type McpConnection = z.infer<typeof McpConnectionSchema>;
413
+ /** How `reticle init` went. The onboarding funnel, which had no instrumentation whatsoever. */
414
+ export declare const InitOutcomeSchema: z.ZodObject<{
415
+ ok: z.ZodBoolean;
416
+ /** Classified cause when it failed — our vocabulary, never a raw error or a path. */
417
+ reason: z.ZodOptional<z.ZodString>;
418
+ /** The framework it detected, so we can see which stacks fail to set up. */
419
+ stack: z.ZodOptional<z.ZodString>;
420
+ /** Whether the MCP registration step succeeded — the step most likely to fail silently. */
421
+ mcpRegistered: z.ZodOptional<z.ZodBoolean>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ ok: boolean;
424
+ reason?: string | undefined;
425
+ stack?: string | undefined;
426
+ mcpRegistered?: boolean | undefined;
427
+ }, {
428
+ ok: boolean;
429
+ reason?: string | undefined;
430
+ stack?: string | undefined;
431
+ mcpRegistered?: boolean | undefined;
432
+ }>;
433
+ export type InitOutcome = z.infer<typeof InitOutcomeSchema>;
32
434
  /**
33
435
  * One anonymous telemetry event. `anonymousId` and the optional hashed `projectId` are the only
34
436
  * identifiers; everything else is a low-cardinality dimension for slicing the adoption metrics.
35
437
  */
36
438
  export declare const TelemetryEventSchema: z.ZodObject<{
37
- v: z.ZodLiteral<1>;
439
+ v: z.ZodLiteral<3>;
38
440
  /** Random UUID persisted at `~/.reticle/telemetry-id`. Distinct-count of this = users (DAU/WAU/MAU). */
39
441
  anonymousId: z.ZodString;
40
442
  /** One-way hash of the git remote (or cwd) — counts DISTINCT PROJECTS without revealing any of them. */
41
443
  projectId: z.ZodOptional<z.ZodString>;
444
+ /**
445
+ * One daemon run. Ties `daemon_started` → every verification → a crash → `daemon_stopped` into a
446
+ * single story.
447
+ *
448
+ * Without it, events could only be grouped by machine and approximate time — so "what was happening
449
+ * when this crashed?" was unanswerable, three concurrent daemons on one machine (which the product
450
+ * explicitly supports) interleaved into one undifferentiated stream, and no per-session funnel could
451
+ * be built at all. It cannot be backfilled, which is why it is worth adding before the data matters.
452
+ */
453
+ sessionId: z.ZodString;
42
454
  event: z.ZodNativeEnum<{
43
- /** First-ever run on this machine (or a fresh `npm install`) — powers install count + new-user curve. */
44
- readonly INSTALL: "install";
45
- /** The CLI/MCP server was invoked — the raw "how many times it gets used" counter. */
46
- readonly INVOKE: "invoke";
47
- /** A daemon/MCP session came up — the numerator of "active sessions" + DAU/WAU/MAU. */
48
- readonly SESSION_START: "session_start";
49
- /** A session ended (carries its duration) — powers active-session-length + churn-within-session. */
50
- readonly SESSION_END: "session_end";
51
- /** One MCP tool call (carries the tool name) — powers "which tool is mostly used". */
52
- readonly TOOL: "tool";
455
+ /** First-ever run on this machine — powers install count + the new-user curve. */
456
+ readonly RETICLE_INSTALLED: "reticle_installed";
457
+ /**
458
+ * A human ran a `reticle` subcommand. Carries WHICH command, which is the closest honest read we
459
+ * have on human intent (`verify` and `gate` mean something very different from `status`).
460
+ *
461
+ * Explicitly NOT emitted for the internal `_daemon` spawn: `reticle mcp` re-runs its own binary to
462
+ * start the daemon, so counting that child inflated the old `invoke` metric ~2x — and worst on
463
+ * exactly the agent-driven sessions that matter most, while leaving one-shot commands like
464
+ * `version` untouched. That skewed the ratio, not just the scale.
465
+ */
466
+ readonly CLI_COMMAND_RUN: "cli_command_run";
467
+ /** The daemon came up — the numerator of active sessions + DAU/WAU/MAU. */
468
+ readonly DAEMON_STARTED: "daemon_started";
469
+ /**
470
+ * The daemon exited. THE RICH ONE: carries the whole session rolled up (duration, tool histogram,
471
+ * errors, features touched). One event replaces the hundreds the old per-call `tool` event sent.
472
+ */
473
+ readonly DAEMON_STOPPED: "daemon_stopped";
474
+ /**
475
+ * A verification produced a verdict. The product's reason to exist, and the one metric an investor
476
+ * should be shown: not "tools were called" but "an app was actually verified, and here is how often
477
+ * that caught something a green test would have missed".
478
+ */
479
+ readonly VERIFICATION_COMPLETED: "verification_completed";
480
+ /**
481
+ * A snapshot of the project Reticle is pointed at — stack, size, and how DEEPLY the feature surface
482
+ * is used. Answers "are they using all of Reticle or three tools of it", which is the difference
483
+ * between a retention problem and an activation problem. Once per daemon start, so it is cheap.
484
+ */
485
+ readonly PROJECT_PROFILED: "project_profiled";
486
+ /** `reticle update` or `reticle rollback` moved the installed version. Carries from → to. */
487
+ readonly VERSION_CHANGED: "version_changed";
488
+ /** An uncaught exception or unhandled rejection reached the top of the daemon. Crash analytics. */
489
+ readonly RUNTIME_CRASHED: "runtime_crashed";
490
+ /**
491
+ * Someone told us something went wrong (or right). UNLIKE every other kind, this one carries
492
+ * author-written free text — which is exactly why it is never emitted passively: it exists only
493
+ * because an agent called `reticle_feedback` or a human ran `reticle feedback`. See
494
+ * `FeedbackSchema` for the consent/redaction contract.
495
+ */
496
+ readonly FEEDBACK_SUBMITTED: "feedback_submitted";
497
+ /**
498
+ * Someone chose to tell us who they are. Like `feedback_submitted`, this exists ONLY because a
499
+ * human ran a command — Reticle never infers an identity from a git remote, an email in git
500
+ * config, or anything else. See `identify.ts` for why that refusal is deliberate.
501
+ */
502
+ readonly IDENTIFIED: "identified";
503
+ /**
504
+ * An MCP client attached to the daemon.
505
+ *
506
+ * The one event that separates "Reticle is installed and running" from "somebody is actually using
507
+ * it": a daemon can sit up for days with no agent attached. It also exposes reconnect churn — a
508
+ * client that reattaches every few minutes is a client whose transport is broken, which looks
509
+ * identical to healthy usage in every other metric.
510
+ */
511
+ readonly MCP_CLIENT_CONNECTED: "mcp_client_connected";
512
+ /**
513
+ * `reticle init` finished. The onboarding funnel had no instrumentation at all, so a setup that
514
+ * failed on a missing dependency was indistinguishable from a user who never tried.
515
+ */
516
+ readonly INIT_COMPLETED: "init_completed";
517
+ /**
518
+ * Reticle found a defect in the app under test.
519
+ *
520
+ * THE metric the product exists to produce. Everything else here measures whether Reticle is used;
521
+ * this measures whether it WORKS — and it is the only number that can honestly be put in front of
522
+ * an investor or published, because it counts outcomes for users rather than activity by them.
523
+ *
524
+ * Deliberately a discrete event rather than only a counter: each bug carries its KIND, and the
525
+ * distribution is the interesting part. "We found 4,000 bugs" is a claim; "1,200 of them were
526
+ * greens that lied — a passing assertion sitting on a failed write, which no screenshot and no
527
+ * human watching the screen would have caught" is the argument.
528
+ */
529
+ readonly BUG_FOUND: "bug_found";
53
530
  }>;
54
531
  /** Client epoch-ms when the event happened (the server also stamps its own receive time). */
55
532
  ts: z.ZodNumber;
@@ -57,34 +534,930 @@ export declare const TelemetryEventSchema: z.ZodObject<{
57
534
  version: z.ZodString;
58
535
  /** Runs inside CI? Separates real human DAU from pipeline traffic (both matter, differently). */
59
536
  ci: z.ZodBoolean;
537
+ /**
538
+ * What `projectId` was derived from. On EVERY event, not just the profile, because the core
539
+ * counting questions ("users per project", "projects per user") run over all events and need to
540
+ * know which rows are comparable across machines without joining to another event first.
541
+ */
542
+ projectIdSource: z.ZodOptional<z.ZodNativeEnum<{
543
+ /** Hash of the shared git origin — the same on every clone, so cross-machine counting is valid. */
544
+ readonly GIT_ORIGIN: "git_origin";
545
+ /** Hash of the local directory path — unique per machine; NOT comparable across users. */
546
+ readonly CWD: "cwd";
547
+ }>>;
60
548
  /** `process.platform` (darwin/linux/win32) — OS mix, low cardinality, non-identifying. */
61
549
  os: z.ZodString;
62
- /** Only on `session_end`: how long the session was active, in ms. */
63
- sessionMs: z.ZodOptional<z.ZodNumber>;
64
- /** Only on `tool`: the MCP tool name invoked (e.g. `reticle_act`). Low cardinality by construction. */
65
- tool: z.ZodOptional<z.ZodString>;
550
+ /** Only on `feedback`: the author-submitted report + its environment context. Never sent otherwise. */
551
+ feedback: z.ZodOptional<z.ZodObject<{
552
+ source: z.ZodNativeEnum<{
553
+ readonly AGENT: "agent";
554
+ readonly HUMAN: "human";
555
+ }>;
556
+ kind: z.ZodNativeEnum<{
557
+ readonly BUG: "bug";
558
+ readonly GAP: "gap";
559
+ readonly AMBIGUITY: "ambiguity";
560
+ readonly FEATURE_REQUEST: "feature_request";
561
+ readonly IMPROVEMENT: "improvement";
562
+ readonly EXPERIENCE: "experience";
563
+ }>;
564
+ text: z.ZodString;
565
+ trace: z.ZodOptional<z.ZodString>;
566
+ rating: z.ZodOptional<z.ZodNumber>;
567
+ need: z.ZodOptional<z.ZodString>;
568
+ impact: z.ZodOptional<z.ZodString>;
569
+ currentApproach: z.ZodOptional<z.ZodString>;
570
+ model: z.ZodOptional<z.ZodString>;
571
+ clientVersion: z.ZodOptional<z.ZodString>;
572
+ stack: z.ZodOptional<z.ZodString>;
573
+ stackMajor: z.ZodOptional<z.ZodNumber>;
574
+ runtime: z.ZodOptional<z.ZodNativeEnum<{
575
+ readonly WEB: "web";
576
+ readonly ELECTRON: "electron";
577
+ readonly TAURI: "tauri";
578
+ }>>;
579
+ engine: z.ZodOptional<z.ZodNativeEnum<{
580
+ readonly BLINK: "blink";
581
+ readonly GECKO: "gecko";
582
+ readonly WEBKIT: "webkit";
583
+ }>>;
584
+ driver: z.ZodOptional<z.ZodNativeEnum<{
585
+ readonly CDP: "cdp";
586
+ readonly SDK: "sdk";
587
+ }>>;
588
+ client: z.ZodOptional<z.ZodString>;
589
+ mcpScope: z.ZodOptional<z.ZodNativeEnum<{
590
+ readonly USER: "user";
591
+ readonly PROJECT: "project";
592
+ }>>;
593
+ }, "strip", z.ZodTypeAny, {
594
+ text: string;
595
+ kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
596
+ source: "human" | "agent";
597
+ model?: string | undefined;
598
+ stack?: string | undefined;
599
+ stackMajor?: number | undefined;
600
+ trace?: string | undefined;
601
+ rating?: number | undefined;
602
+ need?: string | undefined;
603
+ impact?: string | undefined;
604
+ currentApproach?: string | undefined;
605
+ clientVersion?: string | undefined;
606
+ runtime?: "web" | "electron" | "tauri" | undefined;
607
+ engine?: "blink" | "gecko" | "webkit" | undefined;
608
+ driver?: "cdp" | "sdk" | undefined;
609
+ client?: string | undefined;
610
+ mcpScope?: "project" | "user" | undefined;
611
+ }, {
612
+ text: string;
613
+ kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
614
+ source: "human" | "agent";
615
+ model?: string | undefined;
616
+ stack?: string | undefined;
617
+ stackMajor?: number | undefined;
618
+ trace?: string | undefined;
619
+ rating?: number | undefined;
620
+ need?: string | undefined;
621
+ impact?: string | undefined;
622
+ currentApproach?: string | undefined;
623
+ clientVersion?: string | undefined;
624
+ runtime?: "web" | "electron" | "tauri" | undefined;
625
+ engine?: "blink" | "gecko" | "webkit" | undefined;
626
+ driver?: "cdp" | "sdk" | undefined;
627
+ client?: string | undefined;
628
+ mcpScope?: "project" | "user" | undefined;
629
+ }>>;
630
+ /** Human or agent. Absent on events that are neither (a crash, a version change). */
631
+ actor: z.ZodOptional<z.ZodNativeEnum<{
632
+ readonly HUMAN: "human";
633
+ readonly AGENT: "agent";
634
+ }>>;
635
+ /** Only on `cli_command_run`: which subcommand. */
636
+ command: z.ZodOptional<z.ZodString>;
637
+ /**
638
+ * Only on `cli_command_run`: which flags were PRESENT, by name. Never their values — a flag value
639
+ * is a port, a URL, a file path, or in `--http-token`'s case a secret. Names alone answer the
640
+ * question ("does anyone use `--storage-state`?") with none of that risk.
641
+ */
642
+ flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
643
+ /** Only on `daemon_stopped`: the whole session rolled into one event. */
644
+ session: z.ZodOptional<z.ZodObject<{
645
+ durationMs: z.ZodNumber;
646
+ toolCalls: z.ZodNumber;
647
+ toolCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
648
+ toolErrors: z.ZodNumber;
649
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
650
+ fingerprint: z.ZodString;
651
+ count: z.ZodNumber;
652
+ message: z.ZodString;
653
+ tool: z.ZodOptional<z.ZodString>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ message: string;
656
+ count: number;
657
+ fingerprint: string;
658
+ tool?: string | undefined;
659
+ }, {
660
+ message: string;
661
+ count: number;
662
+ fingerprint: string;
663
+ tool?: string | undefined;
664
+ }>, "many">>;
665
+ sdkFailures: z.ZodOptional<z.ZodNumber>;
666
+ sdkErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
667
+ fingerprint: z.ZodString;
668
+ count: z.ZodNumber;
669
+ message: z.ZodString;
670
+ tool: z.ZodOptional<z.ZodString>;
671
+ }, "strip", z.ZodTypeAny, {
672
+ message: string;
673
+ count: number;
674
+ fingerprint: string;
675
+ tool?: string | undefined;
676
+ }, {
677
+ message: string;
678
+ count: number;
679
+ fingerprint: string;
680
+ tool?: string | undefined;
681
+ }>, "many">>;
682
+ verifications: z.ZodNumber;
683
+ bugsFound: z.ZodOptional<z.ZodNumber>;
684
+ bugKinds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
685
+ toolParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
686
+ connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
687
+ attempts: z.ZodNumber;
688
+ successes: z.ZodNumber;
689
+ failures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
690
+ }, "strip", z.ZodTypeAny, {
691
+ attempts: number;
692
+ successes: number;
693
+ failures?: Record<string, number> | undefined;
694
+ }, {
695
+ attempts: number;
696
+ successes: number;
697
+ failures?: Record<string, number> | undefined;
698
+ }>>>;
699
+ toolTiming: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
700
+ totalMs: z.ZodNumber;
701
+ maxMs: z.ZodNumber;
702
+ }, "strip", z.ZodTypeAny, {
703
+ totalMs: number;
704
+ maxMs: number;
705
+ }, {
706
+ totalMs: number;
707
+ maxMs: number;
708
+ }>>>;
709
+ busyMs: z.ZodOptional<z.ZodNumber>;
710
+ browserMs: z.ZodOptional<z.ZodNumber>;
711
+ browserCommands: z.ZodOptional<z.ZodNumber>;
712
+ peakConcurrentTools: z.ZodOptional<z.ZodNumber>;
713
+ unknownToolCalls: z.ZodOptional<z.ZodNumber>;
714
+ machine: z.ZodOptional<z.ZodObject<{
715
+ rssMb: z.ZodNumber;
716
+ heapUsedMb: z.ZodNumber;
717
+ freeMemMb: z.ZodNumber;
718
+ totalMemMb: z.ZodNumber;
719
+ load1x100: z.ZodNumber;
720
+ cpuCount: z.ZodNumber;
721
+ }, "strip", z.ZodTypeAny, {
722
+ rssMb: number;
723
+ heapUsedMb: number;
724
+ freeMemMb: number;
725
+ totalMemMb: number;
726
+ load1x100: number;
727
+ cpuCount: number;
728
+ }, {
729
+ rssMb: number;
730
+ heapUsedMb: number;
731
+ freeMemMb: number;
732
+ totalMemMb: number;
733
+ load1x100: number;
734
+ cpuCount: number;
735
+ }>>;
736
+ clients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
737
+ final: z.ZodBoolean;
738
+ }, "strip", z.ZodTypeAny, {
739
+ durationMs: number;
740
+ toolCalls: number;
741
+ toolCounts: Record<string, number>;
742
+ toolErrors: number;
743
+ verifications: number;
744
+ final: boolean;
745
+ errors?: {
746
+ message: string;
747
+ count: number;
748
+ fingerprint: string;
749
+ tool?: string | undefined;
750
+ }[] | undefined;
751
+ sdkFailures?: number | undefined;
752
+ sdkErrors?: {
753
+ message: string;
754
+ count: number;
755
+ fingerprint: string;
756
+ tool?: string | undefined;
757
+ }[] | undefined;
758
+ bugsFound?: number | undefined;
759
+ bugKinds?: Record<string, number> | undefined;
760
+ toolParams?: Record<string, Record<string, number>> | undefined;
761
+ connections?: Record<string, {
762
+ attempts: number;
763
+ successes: number;
764
+ failures?: Record<string, number> | undefined;
765
+ }> | undefined;
766
+ toolTiming?: Record<string, {
767
+ totalMs: number;
768
+ maxMs: number;
769
+ }> | undefined;
770
+ busyMs?: number | undefined;
771
+ browserMs?: number | undefined;
772
+ browserCommands?: number | undefined;
773
+ peakConcurrentTools?: number | undefined;
774
+ unknownToolCalls?: number | undefined;
775
+ machine?: {
776
+ rssMb: number;
777
+ heapUsedMb: number;
778
+ freeMemMb: number;
779
+ totalMemMb: number;
780
+ load1x100: number;
781
+ cpuCount: number;
782
+ } | undefined;
783
+ clients?: string[] | undefined;
784
+ }, {
785
+ durationMs: number;
786
+ toolCalls: number;
787
+ toolCounts: Record<string, number>;
788
+ toolErrors: number;
789
+ verifications: number;
790
+ final: boolean;
791
+ errors?: {
792
+ message: string;
793
+ count: number;
794
+ fingerprint: string;
795
+ tool?: string | undefined;
796
+ }[] | undefined;
797
+ sdkFailures?: number | undefined;
798
+ sdkErrors?: {
799
+ message: string;
800
+ count: number;
801
+ fingerprint: string;
802
+ tool?: string | undefined;
803
+ }[] | undefined;
804
+ bugsFound?: number | undefined;
805
+ bugKinds?: Record<string, number> | undefined;
806
+ toolParams?: Record<string, Record<string, number>> | undefined;
807
+ connections?: Record<string, {
808
+ attempts: number;
809
+ successes: number;
810
+ failures?: Record<string, number> | undefined;
811
+ }> | undefined;
812
+ toolTiming?: Record<string, {
813
+ totalMs: number;
814
+ maxMs: number;
815
+ }> | undefined;
816
+ busyMs?: number | undefined;
817
+ browserMs?: number | undefined;
818
+ browserCommands?: number | undefined;
819
+ peakConcurrentTools?: number | undefined;
820
+ unknownToolCalls?: number | undefined;
821
+ machine?: {
822
+ rssMb: number;
823
+ heapUsedMb: number;
824
+ freeMemMb: number;
825
+ totalMemMb: number;
826
+ load1x100: number;
827
+ cpuCount: number;
828
+ } | undefined;
829
+ clients?: string[] | undefined;
830
+ }>>;
831
+ /** Only on `project_profiled`: the shape and depth-of-use of the project. */
832
+ project: z.ZodOptional<z.ZodObject<{
833
+ stack: z.ZodOptional<z.ZodString>;
834
+ stackMajor: z.ZodOptional<z.ZodNumber>;
835
+ size: z.ZodOptional<z.ZodNativeEnum<{
836
+ readonly TINY: "tiny";
837
+ readonly SMALL: "small";
838
+ readonly MEDIUM: "medium";
839
+ readonly LARGE: "large";
840
+ readonly HUGE: "huge";
841
+ }>>;
842
+ monorepo: z.ZodOptional<z.ZodBoolean>;
843
+ git: z.ZodNativeEnum<{
844
+ readonly NONE: "none";
845
+ readonly LOCAL_ONLY: "local_only";
846
+ readonly REMOTE: "remote";
847
+ }>;
848
+ forge: z.ZodOptional<z.ZodNativeEnum<{
849
+ readonly GITHUB: "github";
850
+ readonly GITLAB: "gitlab";
851
+ readonly BITBUCKET: "bitbucket";
852
+ readonly AZURE: "azure";
853
+ readonly SOURCEHUT: "sourcehut";
854
+ readonly CODEBERG: "codeberg";
855
+ readonly SELF_HOSTED: "self_hosted";
856
+ }>>;
857
+ ageWeeks: z.ZodOptional<z.ZodNumber>;
858
+ flowCount: z.ZodNumber;
859
+ baselineCount: z.ZodNumber;
860
+ visualBaselineCount: z.ZodNumber;
861
+ runCount: z.ZodNumber;
862
+ hasContract: z.ZodBoolean;
863
+ capsuleCount: z.ZodNumber;
864
+ featuresUsed: z.ZodArray<z.ZodString, "many">;
865
+ featureDepth: z.ZodNumber;
866
+ }, "strip", z.ZodTypeAny, {
867
+ git: "none" | "local_only" | "remote";
868
+ flowCount: number;
869
+ baselineCount: number;
870
+ visualBaselineCount: number;
871
+ runCount: number;
872
+ hasContract: boolean;
873
+ capsuleCount: number;
874
+ featuresUsed: string[];
875
+ featureDepth: number;
876
+ stack?: string | undefined;
877
+ stackMajor?: number | undefined;
878
+ size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
879
+ monorepo?: boolean | undefined;
880
+ forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
881
+ ageWeeks?: number | undefined;
882
+ }, {
883
+ git: "none" | "local_only" | "remote";
884
+ flowCount: number;
885
+ baselineCount: number;
886
+ visualBaselineCount: number;
887
+ runCount: number;
888
+ hasContract: boolean;
889
+ capsuleCount: number;
890
+ featuresUsed: string[];
891
+ featureDepth: number;
892
+ stack?: string | undefined;
893
+ stackMajor?: number | undefined;
894
+ size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
895
+ monorepo?: boolean | undefined;
896
+ forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
897
+ ageWeeks?: number | undefined;
898
+ }>>;
899
+ /** Only on `verification_completed`. */
900
+ verification: z.ZodOptional<z.ZodObject<{
901
+ /** Which tool produced the verdict (`reticle_assert`, `reticle_flow_verify`, …). */
902
+ via: z.ZodString;
903
+ /** `yes` | `no` | `unknown` — the honest verdict, where `unknown` means the evidence could not decide. */
904
+ verified: z.ZodString;
905
+ /** Did the underlying assertion pass? Distinct from `verified` on purpose. */
906
+ passed: z.ZodBoolean;
907
+ /**
908
+ * TRUE when the assertion passed but Reticle refused to call it verified — a caught false green.
909
+ * This is the product's whole thesis expressed as one boolean, and the number to put in a deck.
910
+ */
911
+ falseGreenCaught: z.ZodBoolean;
912
+ durationMs: z.ZodOptional<z.ZodNumber>;
913
+ }, "strip", z.ZodTypeAny, {
914
+ via: string;
915
+ verified: string;
916
+ passed: boolean;
917
+ falseGreenCaught: boolean;
918
+ durationMs?: number | undefined;
919
+ }, {
920
+ via: string;
921
+ verified: string;
922
+ passed: boolean;
923
+ falseGreenCaught: boolean;
924
+ durationMs?: number | undefined;
925
+ }>>;
926
+ /** Only on `version_changed`. */
927
+ versionChange: z.ZodOptional<z.ZodObject<{
928
+ from: z.ZodString;
929
+ to: z.ZodString;
930
+ /** `update` (forward) or `rollback` (back) — a rollback is a release-quality alarm. */
931
+ direction: z.ZodString;
932
+ }, "strip", z.ZodTypeAny, {
933
+ direction: string;
934
+ from: string;
935
+ to: string;
936
+ }, {
937
+ direction: string;
938
+ from: string;
939
+ to: string;
940
+ }>>;
941
+ /** Only on `runtime_crashed`. */
942
+ crash: z.ZodOptional<z.ZodObject<{
943
+ /** `uncaught_exception` | `unhandled_rejection`. */
944
+ kind: z.ZodString;
945
+ /** The error's constructor name (`TypeError`) — coarse, safe, and enough to triage. */
946
+ errorType: z.ZodOptional<z.ZodString>;
947
+ /** Hash of the type + our own frames. Groups the same crash across every machine. */
948
+ fingerprint: z.ZodOptional<z.ZodString>;
949
+ /**
950
+ * The message with every VARIABLE part removed — quoted strings, URLs, paths, ids, numbers all
951
+ * replaced by `*`. `no baseline named *` tells us exactly what broke; the flow name that made it
952
+ * specific to one user never leaves. This is what turns the fingerprint from an opaque key into a
953
+ * readable defect.
954
+ */
955
+ message: z.ZodOptional<z.ZodString>;
956
+ /**
957
+ * The RETICLE-OWNED stack frames, innermost first, as `function@file:line`.
958
+ *
959
+ * This is our own published code — `runTool@invoke-tool.js:88` is a line anyone can read in the
960
+ * npm tarball — so there is no privacy question in sending it, and it is the single most useful
961
+ * thing for a root-cause analysis: the file, the line, and the function. Frames belonging to the
962
+ * user's application or to node internals are dropped entirely before this is built.
963
+ */
964
+ frames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
965
+ /** The MCP tool in flight when it happened, when there was one. The trigger point. */
966
+ tool: z.ZodOptional<z.ZodString>;
967
+ /**
968
+ * The tool calls immediately before the failure, oldest first — the agent's approach run.
969
+ *
970
+ * Answers "what was it trying to do", which a single frame cannot: `snapshot → act → act →
971
+ * assert` is a verification loop, `lease_acquire → navigate → crash` is a startup problem. Tool
972
+ * NAMES only, from our own fixed vocabulary; no arguments, so nothing the agent typed is in here.
973
+ */
974
+ breadcrumb: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
975
+ /** Node major/minor — crashes cluster hard by runtime version and we were not recording it. */
976
+ nodeVersion: z.ZodOptional<z.ZodString>;
977
+ /** `arm64` / `x64`. A surprising number of native-module failures are architecture-specific. */
978
+ arch: z.ZodOptional<z.ZodString>;
979
+ /**
980
+ * The machine at the moment of the crash. "Out of memory" and "our bug" look identical in a stack
981
+ * trace and are completely different problems; this is what tells them apart.
982
+ */
983
+ machine: z.ZodOptional<z.ZodObject<{
984
+ rssMb: z.ZodNumber;
985
+ heapUsedMb: z.ZodNumber;
986
+ freeMemMb: z.ZodNumber;
987
+ totalMemMb: z.ZodNumber;
988
+ load1x100: z.ZodNumber;
989
+ cpuCount: z.ZodNumber;
990
+ }, "strip", z.ZodTypeAny, {
991
+ rssMb: number;
992
+ heapUsedMb: number;
993
+ freeMemMb: number;
994
+ totalMemMb: number;
995
+ load1x100: number;
996
+ cpuCount: number;
997
+ }, {
998
+ rssMb: number;
999
+ heapUsedMb: number;
1000
+ freeMemMb: number;
1001
+ totalMemMb: number;
1002
+ load1x100: number;
1003
+ cpuCount: number;
1004
+ }>>;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ kind: string;
1007
+ message?: string | undefined;
1008
+ errorType?: string | undefined;
1009
+ tool?: string | undefined;
1010
+ fingerprint?: string | undefined;
1011
+ machine?: {
1012
+ rssMb: number;
1013
+ heapUsedMb: number;
1014
+ freeMemMb: number;
1015
+ totalMemMb: number;
1016
+ load1x100: number;
1017
+ cpuCount: number;
1018
+ } | undefined;
1019
+ frames?: string[] | undefined;
1020
+ breadcrumb?: string[] | undefined;
1021
+ nodeVersion?: string | undefined;
1022
+ arch?: string | undefined;
1023
+ }, {
1024
+ kind: string;
1025
+ message?: string | undefined;
1026
+ errorType?: string | undefined;
1027
+ tool?: string | undefined;
1028
+ fingerprint?: string | undefined;
1029
+ machine?: {
1030
+ rssMb: number;
1031
+ heapUsedMb: number;
1032
+ freeMemMb: number;
1033
+ totalMemMb: number;
1034
+ load1x100: number;
1035
+ cpuCount: number;
1036
+ } | undefined;
1037
+ frames?: string[] | undefined;
1038
+ breadcrumb?: string[] | undefined;
1039
+ nodeVersion?: string | undefined;
1040
+ arch?: string | undefined;
1041
+ }>>;
1042
+ /** Only on `identified` — self-declared, opt-in, and the only personal data ever sent. */
1043
+ identity: z.ZodOptional<z.ZodObject<{
1044
+ context: z.ZodNativeEnum<{
1045
+ readonly COMPANY: "company";
1046
+ readonly SIDE_PROJECT: "side_project";
1047
+ readonly OPEN_SOURCE: "open_source";
1048
+ readonly LEARNING: "learning";
1049
+ }>;
1050
+ company: z.ZodOptional<z.ZodString>;
1051
+ email: z.ZodOptional<z.ZodString>;
1052
+ }, "strip", z.ZodTypeAny, {
1053
+ context: "company" | "side_project" | "open_source" | "learning";
1054
+ company?: string | undefined;
1055
+ email?: string | undefined;
1056
+ }, {
1057
+ context: "company" | "side_project" | "open_source" | "learning";
1058
+ company?: string | undefined;
1059
+ email?: string | undefined;
1060
+ }>>;
1061
+ /** Only on `mcp_client_connected`. */
1062
+ connection: z.ZodOptional<z.ZodObject<{
1063
+ /** False the first time a client attaches to this daemon; true for every attach after. */
1064
+ reconnect: z.ZodBoolean;
1065
+ /**
1066
+ * How long the daemon had been up first. A large value on the FIRST connect is the interesting
1067
+ * case — it means Reticle was started and then sat unused, which is an onboarding failure nobody
1068
+ * would otherwise report.
1069
+ */
1070
+ daemonAgeMs: z.ZodNumber;
1071
+ /** Which client, from its own handshake (`claude-code`, `cursor`). */
1072
+ client: z.ZodOptional<z.ZodString>;
1073
+ }, "strip", z.ZodTypeAny, {
1074
+ reconnect: boolean;
1075
+ daemonAgeMs: number;
1076
+ client?: string | undefined;
1077
+ }, {
1078
+ reconnect: boolean;
1079
+ daemonAgeMs: number;
1080
+ client?: string | undefined;
1081
+ }>>;
1082
+ /** Only on `init_completed`. */
1083
+ init: z.ZodOptional<z.ZodObject<{
1084
+ ok: z.ZodBoolean;
1085
+ /** Classified cause when it failed — our vocabulary, never a raw error or a path. */
1086
+ reason: z.ZodOptional<z.ZodString>;
1087
+ /** The framework it detected, so we can see which stacks fail to set up. */
1088
+ stack: z.ZodOptional<z.ZodString>;
1089
+ /** Whether the MCP registration step succeeded — the step most likely to fail silently. */
1090
+ mcpRegistered: z.ZodOptional<z.ZodBoolean>;
1091
+ }, "strip", z.ZodTypeAny, {
1092
+ ok: boolean;
1093
+ reason?: string | undefined;
1094
+ stack?: string | undefined;
1095
+ mcpRegistered?: boolean | undefined;
1096
+ }, {
1097
+ ok: boolean;
1098
+ reason?: string | undefined;
1099
+ stack?: string | undefined;
1100
+ mcpRegistered?: boolean | undefined;
1101
+ }>>;
1102
+ /** Only on `bug_found`. */
1103
+ bug: z.ZodOptional<z.ZodObject<{
1104
+ source: z.ZodNativeEnum<{
1105
+ /** Channels disagreed — the false green. A passing screen sitting on a failed write. */
1106
+ readonly CONTRADICTION: "contradiction";
1107
+ /** `reticle_crawl` found it autonomously, with nobody writing a test. */
1108
+ readonly CRAWL: "crawl";
1109
+ /** A saved flow that used to pass stopped passing — a regression. */
1110
+ readonly REPLAY: "replay";
1111
+ /** An assertion the agent declared did not hold. */
1112
+ readonly ASSERTION: "assertion";
1113
+ }>;
1114
+ /** The classified kind from Reticle's own findings vocabulary. */
1115
+ kind: z.ZodString;
1116
+ /**
1117
+ * True when the defect PRESENTED AS SUCCESS — the screen advanced, the assertion passed, the click
1118
+ * looked fine — while another channel showed it had not.
1119
+ *
1120
+ * Defined by the presentation rather than by "an assertion passed", because the same defect arrives
1121
+ * both ways: through `reticle_assert` there IS a passing assertion to contradict, and through
1122
+ * `reticle_crawl` there is no assertion at all and the UI simply moved on over a failed write. Both
1123
+ * are the thing a human watching the screen cannot see, and that is what the flag has to mean if
1124
+ * the number is going to be published.
1125
+ *
1126
+ * The subset worth naming separately, because it is the only category Reticle can claim as uniquely
1127
+ * its own: every other kind of bug is findable by a careful human or an ordinary test.
1128
+ */
1129
+ falseGreen: z.ZodBoolean;
1130
+ /** Which tool surfaced it. */
1131
+ tool: z.ZodOptional<z.ZodString>;
1132
+ /**
1133
+ * TRUE when this KIND was already reported in this session — i.e. this is another INSTANCE of a
1134
+ * defect already counted, not another defect.
1135
+ *
1136
+ * Both numbers are claims, and they are different ones. "Reticle found N defects" is the headline;
1137
+ * "users hit them M times" is the frequency that says which ones actually cost anybody anything.
1138
+ * Without this flag the event stream answers only the second while looking like it answers the
1139
+ * first, so any distinct-defect count read off it is silently inflated — the exact way a published
1140
+ * number goes wrong. Count `repeat: false` for distinct, count everything for instances.
1141
+ *
1142
+ * Scoped to the SESSION, because that is the only identity available: the payload deliberately
1143
+ * carries no selector, URL or app detail, so the same defect in two sessions cannot be recognised
1144
+ * as one — and must not be, since that would need data this event refuses to collect.
1145
+ */
1146
+ repeat: z.ZodBoolean;
1147
+ }, "strip", z.ZodTypeAny, {
1148
+ kind: string;
1149
+ source: "replay" | "contradiction" | "crawl" | "assertion";
1150
+ falseGreen: boolean;
1151
+ repeat: boolean;
1152
+ tool?: string | undefined;
1153
+ }, {
1154
+ kind: string;
1155
+ source: "replay" | "contradiction" | "crawl" | "assertion";
1156
+ falseGreen: boolean;
1157
+ repeat: boolean;
1158
+ tool?: string | undefined;
1159
+ }>>;
66
1160
  }, "strip", z.ZodTypeAny, {
67
- event: "tool" | "install" | "invoke" | "session_start" | "session_end";
1161
+ event: "reticle_installed" | "cli_command_run" | "daemon_started" | "daemon_stopped" | "verification_completed" | "project_profiled" | "version_changed" | "runtime_crashed" | "feedback_submitted" | "identified" | "mcp_client_connected" | "init_completed" | "bug_found";
1162
+ sessionId: string;
68
1163
  version: string;
69
1164
  ci: boolean;
70
- v: 1;
1165
+ v: 3;
71
1166
  anonymousId: string;
72
1167
  ts: number;
73
1168
  os: string;
1169
+ command?: string | undefined;
74
1170
  projectId?: string | undefined;
75
- tool?: string | undefined;
76
- sessionMs?: number | undefined;
1171
+ session?: {
1172
+ durationMs: number;
1173
+ toolCalls: number;
1174
+ toolCounts: Record<string, number>;
1175
+ toolErrors: number;
1176
+ verifications: number;
1177
+ final: boolean;
1178
+ errors?: {
1179
+ message: string;
1180
+ count: number;
1181
+ fingerprint: string;
1182
+ tool?: string | undefined;
1183
+ }[] | undefined;
1184
+ sdkFailures?: number | undefined;
1185
+ sdkErrors?: {
1186
+ message: string;
1187
+ count: number;
1188
+ fingerprint: string;
1189
+ tool?: string | undefined;
1190
+ }[] | undefined;
1191
+ bugsFound?: number | undefined;
1192
+ bugKinds?: Record<string, number> | undefined;
1193
+ toolParams?: Record<string, Record<string, number>> | undefined;
1194
+ connections?: Record<string, {
1195
+ attempts: number;
1196
+ successes: number;
1197
+ failures?: Record<string, number> | undefined;
1198
+ }> | undefined;
1199
+ toolTiming?: Record<string, {
1200
+ totalMs: number;
1201
+ maxMs: number;
1202
+ }> | undefined;
1203
+ busyMs?: number | undefined;
1204
+ browserMs?: number | undefined;
1205
+ browserCommands?: number | undefined;
1206
+ peakConcurrentTools?: number | undefined;
1207
+ unknownToolCalls?: number | undefined;
1208
+ machine?: {
1209
+ rssMb: number;
1210
+ heapUsedMb: number;
1211
+ freeMemMb: number;
1212
+ totalMemMb: number;
1213
+ load1x100: number;
1214
+ cpuCount: number;
1215
+ } | undefined;
1216
+ clients?: string[] | undefined;
1217
+ } | undefined;
1218
+ project?: {
1219
+ git: "none" | "local_only" | "remote";
1220
+ flowCount: number;
1221
+ baselineCount: number;
1222
+ visualBaselineCount: number;
1223
+ runCount: number;
1224
+ hasContract: boolean;
1225
+ capsuleCount: number;
1226
+ featuresUsed: string[];
1227
+ featureDepth: number;
1228
+ stack?: string | undefined;
1229
+ stackMajor?: number | undefined;
1230
+ size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
1231
+ monorepo?: boolean | undefined;
1232
+ forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
1233
+ ageWeeks?: number | undefined;
1234
+ } | undefined;
1235
+ bug?: {
1236
+ kind: string;
1237
+ source: "replay" | "contradiction" | "crawl" | "assertion";
1238
+ falseGreen: boolean;
1239
+ repeat: boolean;
1240
+ tool?: string | undefined;
1241
+ } | undefined;
1242
+ projectIdSource?: "cwd" | "git_origin" | undefined;
1243
+ feedback?: {
1244
+ text: string;
1245
+ kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
1246
+ source: "human" | "agent";
1247
+ model?: string | undefined;
1248
+ stack?: string | undefined;
1249
+ stackMajor?: number | undefined;
1250
+ trace?: string | undefined;
1251
+ rating?: number | undefined;
1252
+ need?: string | undefined;
1253
+ impact?: string | undefined;
1254
+ currentApproach?: string | undefined;
1255
+ clientVersion?: string | undefined;
1256
+ runtime?: "web" | "electron" | "tauri" | undefined;
1257
+ engine?: "blink" | "gecko" | "webkit" | undefined;
1258
+ driver?: "cdp" | "sdk" | undefined;
1259
+ client?: string | undefined;
1260
+ mcpScope?: "project" | "user" | undefined;
1261
+ } | undefined;
1262
+ actor?: "human" | "agent" | undefined;
1263
+ flags?: string[] | undefined;
1264
+ verification?: {
1265
+ via: string;
1266
+ verified: string;
1267
+ passed: boolean;
1268
+ falseGreenCaught: boolean;
1269
+ durationMs?: number | undefined;
1270
+ } | undefined;
1271
+ versionChange?: {
1272
+ direction: string;
1273
+ from: string;
1274
+ to: string;
1275
+ } | undefined;
1276
+ crash?: {
1277
+ kind: string;
1278
+ message?: string | undefined;
1279
+ errorType?: string | undefined;
1280
+ tool?: string | undefined;
1281
+ fingerprint?: string | undefined;
1282
+ machine?: {
1283
+ rssMb: number;
1284
+ heapUsedMb: number;
1285
+ freeMemMb: number;
1286
+ totalMemMb: number;
1287
+ load1x100: number;
1288
+ cpuCount: number;
1289
+ } | undefined;
1290
+ frames?: string[] | undefined;
1291
+ breadcrumb?: string[] | undefined;
1292
+ nodeVersion?: string | undefined;
1293
+ arch?: string | undefined;
1294
+ } | undefined;
1295
+ identity?: {
1296
+ context: "company" | "side_project" | "open_source" | "learning";
1297
+ company?: string | undefined;
1298
+ email?: string | undefined;
1299
+ } | undefined;
1300
+ connection?: {
1301
+ reconnect: boolean;
1302
+ daemonAgeMs: number;
1303
+ client?: string | undefined;
1304
+ } | undefined;
1305
+ init?: {
1306
+ ok: boolean;
1307
+ reason?: string | undefined;
1308
+ stack?: string | undefined;
1309
+ mcpRegistered?: boolean | undefined;
1310
+ } | undefined;
77
1311
  }, {
78
- event: "tool" | "install" | "invoke" | "session_start" | "session_end";
1312
+ event: "reticle_installed" | "cli_command_run" | "daemon_started" | "daemon_stopped" | "verification_completed" | "project_profiled" | "version_changed" | "runtime_crashed" | "feedback_submitted" | "identified" | "mcp_client_connected" | "init_completed" | "bug_found";
1313
+ sessionId: string;
79
1314
  version: string;
80
1315
  ci: boolean;
81
- v: 1;
1316
+ v: 3;
82
1317
  anonymousId: string;
83
1318
  ts: number;
84
1319
  os: string;
1320
+ command?: string | undefined;
85
1321
  projectId?: string | undefined;
86
- tool?: string | undefined;
87
- sessionMs?: number | undefined;
1322
+ session?: {
1323
+ durationMs: number;
1324
+ toolCalls: number;
1325
+ toolCounts: Record<string, number>;
1326
+ toolErrors: number;
1327
+ verifications: number;
1328
+ final: boolean;
1329
+ errors?: {
1330
+ message: string;
1331
+ count: number;
1332
+ fingerprint: string;
1333
+ tool?: string | undefined;
1334
+ }[] | undefined;
1335
+ sdkFailures?: number | undefined;
1336
+ sdkErrors?: {
1337
+ message: string;
1338
+ count: number;
1339
+ fingerprint: string;
1340
+ tool?: string | undefined;
1341
+ }[] | undefined;
1342
+ bugsFound?: number | undefined;
1343
+ bugKinds?: Record<string, number> | undefined;
1344
+ toolParams?: Record<string, Record<string, number>> | undefined;
1345
+ connections?: Record<string, {
1346
+ attempts: number;
1347
+ successes: number;
1348
+ failures?: Record<string, number> | undefined;
1349
+ }> | undefined;
1350
+ toolTiming?: Record<string, {
1351
+ totalMs: number;
1352
+ maxMs: number;
1353
+ }> | undefined;
1354
+ busyMs?: number | undefined;
1355
+ browserMs?: number | undefined;
1356
+ browserCommands?: number | undefined;
1357
+ peakConcurrentTools?: number | undefined;
1358
+ unknownToolCalls?: number | undefined;
1359
+ machine?: {
1360
+ rssMb: number;
1361
+ heapUsedMb: number;
1362
+ freeMemMb: number;
1363
+ totalMemMb: number;
1364
+ load1x100: number;
1365
+ cpuCount: number;
1366
+ } | undefined;
1367
+ clients?: string[] | undefined;
1368
+ } | undefined;
1369
+ project?: {
1370
+ git: "none" | "local_only" | "remote";
1371
+ flowCount: number;
1372
+ baselineCount: number;
1373
+ visualBaselineCount: number;
1374
+ runCount: number;
1375
+ hasContract: boolean;
1376
+ capsuleCount: number;
1377
+ featuresUsed: string[];
1378
+ featureDepth: number;
1379
+ stack?: string | undefined;
1380
+ stackMajor?: number | undefined;
1381
+ size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
1382
+ monorepo?: boolean | undefined;
1383
+ forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
1384
+ ageWeeks?: number | undefined;
1385
+ } | undefined;
1386
+ bug?: {
1387
+ kind: string;
1388
+ source: "replay" | "contradiction" | "crawl" | "assertion";
1389
+ falseGreen: boolean;
1390
+ repeat: boolean;
1391
+ tool?: string | undefined;
1392
+ } | undefined;
1393
+ projectIdSource?: "cwd" | "git_origin" | undefined;
1394
+ feedback?: {
1395
+ text: string;
1396
+ kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
1397
+ source: "human" | "agent";
1398
+ model?: string | undefined;
1399
+ stack?: string | undefined;
1400
+ stackMajor?: number | undefined;
1401
+ trace?: string | undefined;
1402
+ rating?: number | undefined;
1403
+ need?: string | undefined;
1404
+ impact?: string | undefined;
1405
+ currentApproach?: string | undefined;
1406
+ clientVersion?: string | undefined;
1407
+ runtime?: "web" | "electron" | "tauri" | undefined;
1408
+ engine?: "blink" | "gecko" | "webkit" | undefined;
1409
+ driver?: "cdp" | "sdk" | undefined;
1410
+ client?: string | undefined;
1411
+ mcpScope?: "project" | "user" | undefined;
1412
+ } | undefined;
1413
+ actor?: "human" | "agent" | undefined;
1414
+ flags?: string[] | undefined;
1415
+ verification?: {
1416
+ via: string;
1417
+ verified: string;
1418
+ passed: boolean;
1419
+ falseGreenCaught: boolean;
1420
+ durationMs?: number | undefined;
1421
+ } | undefined;
1422
+ versionChange?: {
1423
+ direction: string;
1424
+ from: string;
1425
+ to: string;
1426
+ } | undefined;
1427
+ crash?: {
1428
+ kind: string;
1429
+ message?: string | undefined;
1430
+ errorType?: string | undefined;
1431
+ tool?: string | undefined;
1432
+ fingerprint?: string | undefined;
1433
+ machine?: {
1434
+ rssMb: number;
1435
+ heapUsedMb: number;
1436
+ freeMemMb: number;
1437
+ totalMemMb: number;
1438
+ load1x100: number;
1439
+ cpuCount: number;
1440
+ } | undefined;
1441
+ frames?: string[] | undefined;
1442
+ breadcrumb?: string[] | undefined;
1443
+ nodeVersion?: string | undefined;
1444
+ arch?: string | undefined;
1445
+ } | undefined;
1446
+ identity?: {
1447
+ context: "company" | "side_project" | "open_source" | "learning";
1448
+ company?: string | undefined;
1449
+ email?: string | undefined;
1450
+ } | undefined;
1451
+ connection?: {
1452
+ reconnect: boolean;
1453
+ daemonAgeMs: number;
1454
+ client?: string | undefined;
1455
+ } | undefined;
1456
+ init?: {
1457
+ ok: boolean;
1458
+ reason?: string | undefined;
1459
+ stack?: string | undefined;
1460
+ mcpRegistered?: boolean | undefined;
1461
+ } | undefined;
88
1462
  }>;
89
1463
  export type TelemetryEvent = z.infer<typeof TelemetryEventSchema>;
90
- //# sourceMappingURL=telemetry.d.ts.map