@reticlehq/core 3.7.0 → 3.8.1
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/activation-entry.d.ts +9 -0
- package/dist/activation-entry.js +9 -0
- package/dist/artifacts/drive-script.d.ts +84 -1217
- package/dist/artifacts/drive-script.js +1 -1
- package/dist/artifacts/flow-constants.d.ts +15 -0
- package/dist/artifacts/flow-constants.js +15 -0
- package/dist/artifacts/flow-expect-flat.d.ts +8 -192
- package/dist/artifacts/flow-expect-flat.js +2 -2
- package/dist/artifacts/flow-results.d.ts +26 -0
- package/dist/artifacts/flow-types.d.ts +212 -2295
- package/dist/artifacts/flow-types.js +14 -2
- package/dist/artifacts/harness-credits.d.ts +6 -3
- package/dist/artifacts/harness-credits.js +9 -6
- package/dist/artifacts/harness-map.d.ts +8 -69
- package/dist/artifacts/harness-map.js +1 -1
- package/dist/artifacts/hud-notices.d.ts +8 -82
- package/dist/artifacts/hud-notices.js +1 -1
- package/dist/artifacts/impact.d.ts +104 -1665
- package/dist/artifacts/impact.js +38 -21
- package/dist/artifacts/journal.d.ts +15 -231
- package/dist/artifacts/journal.js +15 -2
- package/dist/artifacts/prompt-context.d.ts +7 -33
- package/dist/artifacts/prompt-context.js +15 -4
- package/dist/artifacts/screenshot-upload.d.ts +3 -26
- package/dist/artifacts/screenshot-upload.js +1 -1
- package/dist/graph/app-graph.d.ts +137 -0
- package/dist/graph/app-graph.js +498 -0
- package/dist/hooks/hook-events.d.ts +15 -171
- package/dist/hooks/hook-events.js +1 -1
- package/dist/hud-entry.js +1 -1
- package/dist/identity/checkout.d.ts +41 -0
- package/dist/identity/checkout.js +118 -0
- package/dist/identity/state-dir.d.ts +23 -0
- package/dist/identity/state-dir.js +43 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/onboarding.d.ts +23 -52
- package/dist/onboarding.js +20 -1
- package/dist/registry/daemon-registry.d.ts +2 -14
- package/dist/registry/daemon-registry.js +1 -1
- package/dist/registry/dev-server-registry.d.ts +2 -31
- package/dist/registry/dev-server-registry.js +1 -1
- package/dist/registry/project-registry.d.ts +4 -32
- package/dist/registry/project-registry.js +1 -1
- package/dist/schema/command-message.json +65 -68
- package/dist/schema/command-name.json +29 -33
- package/dist/schema/command-result.json +25 -30
- package/dist/schema/event-message.json +104 -101
- package/dist/schema/event-payloads.json +246 -108
- package/dist/schema/event-type.json +47 -48
- package/dist/schema/hello-message.json +150 -133
- package/dist/schema/reticle-event.json +98 -94
- package/dist/schema/reticle-message.json +338 -310
- package/dist/telemetry-bug.d.ts +4 -75
- package/dist/telemetry-bug.js +1 -1
- package/dist/telemetry-entry.d.ts +1 -1
- package/dist/telemetry-entry.js +1 -1
- package/dist/telemetry-feedback.d.ts +17 -91
- package/dist/telemetry-feedback.js +20 -1
- package/dist/telemetry-refusal.d.ts +4 -31
- package/dist/telemetry-refusal.js +1 -1
- package/dist/telemetry-session.d.ts +45 -624
- package/dist/telemetry-session.js +25 -12
- package/dist/telemetry-signals.d.ts +211 -86
- package/dist/telemetry-signals.js +100 -2
- package/dist/telemetry.d.ts +321 -1691
- package/dist/telemetry.js +72 -6
- package/dist/verdict/check-sentence.d.ts +34 -0
- package/dist/verdict/check-sentence.js +228 -0
- package/dist/verdict/compare-source.d.ts +1 -1
- package/dist/verdict/compare-source.js +1 -1
- package/dist/verdict/consequence.d.ts +15 -0
- package/dist/verdict/consequence.js +11 -0
- package/dist/verdict/disparity.d.ts +8 -56
- package/dist/verdict/disparity.js +1 -1
- package/dist/verdict/findings.d.ts +10 -0
- package/dist/verdict/findings.js +13 -0
- package/dist/verdict/instrumentation-coverage.d.ts +6 -37
- package/dist/verdict/instrumentation-coverage.js +15 -59
- package/dist/verdict/instrumentation-gap.d.ts +72 -0
- package/dist/verdict/instrumentation-gap.js +64 -0
- package/dist/verdict/intent.d.ts +25 -224
- package/dist/verdict/intent.js +1 -1
- package/dist/verdict/predicate-tree.d.ts +2 -0
- package/dist/verdict/predicate-tree.js +16 -0
- package/dist/verdict/predicate.d.ts +3 -2
- package/dist/verdict/predicate.js +107 -16
- package/dist/verdict/property-assertion.d.ts +23 -101
- package/dist/verdict/property-assertion.js +1 -1
- package/dist/verdict/run-report.d.ts +71 -0
- package/dist/verdict/run-report.js +53 -0
- package/dist/verdict/security.d.ts +48 -2
- package/dist/verdict/security.js +185 -18
- package/dist/verdict/verification-run.d.ts +124 -1623
- package/dist/verdict/verification-run.js +37 -6
- package/dist/verdict/verify-progress.d.ts +22 -64
- package/dist/verdict/verify-progress.js +1 -1
- package/dist/wire/constants/constants.d.ts +56 -141
- package/dist/wire/constants/constants.js +64 -144
- package/dist/wire/constants/discovery.d.ts +4 -4
- package/dist/wire/constants/discovery.js +4 -4
- package/dist/wire/constants/event-types.d.ts +37 -1
- package/dist/wire/constants/event-types.js +35 -1
- package/dist/wire/constants/hud-controls.js +0 -2
- package/dist/wire/constants/hud-use.d.ts +4 -0
- package/dist/wire/constants/hud-use.js +4 -0
- package/dist/wire/constants/mcp-wire.d.ts +16 -0
- package/dist/wire/constants/mcp-wire.js +16 -0
- package/dist/wire/constants/response-body-reason.d.ts +19 -0
- package/dist/wire/constants/response-body-reason.js +18 -0
- package/dist/wire/constants/reticle-env.d.ts +140 -0
- package/dist/wire/constants/reticle-env.js +140 -0
- package/dist/wire/constants/session-constants.d.ts +11 -0
- package/dist/wire/constants/session-constants.js +11 -0
- package/dist/wire/event-payloads.d.ts +173 -629
- package/dist/wire/event-payloads.js +107 -23
- package/dist/wire/event-priority.js +1 -0
- package/dist/wire/messages.d.ts +90 -713
- package/dist/wire/messages.js +19 -3
- package/dist/wire/narrow.d.ts +6 -0
- package/dist/wire/narrow.js +26 -0
- package/dist/wire/next-step.d.ts +50 -0
- package/dist/wire/next-step.js +37 -0
- package/dist/wire/platform-link.d.ts +7 -0
- package/dist/wire/platform-link.js +14 -8
- package/dist/wire/production/activation-ticket.d.ts +64 -0
- package/dist/wire/production/activation-ticket.js +148 -0
- package/dist/wire/production/hello-mode.d.ts +35 -0
- package/dist/wire/production/hello-mode.js +32 -0
- package/dist/wire/production/production-policy.d.ts +92 -0
- package/dist/wire/production/production-policy.js +133 -0
- package/dist/wire/tool-names.d.ts +2 -0
- package/dist/wire/tool-names.js +2 -0
- package/dist/wire/types.d.ts +102 -700
- package/dist/wire/types.js +5 -5
- package/dist/words/upgrade.d.ts +3 -13
- package/dist/words/upgrade.js +1 -1
- package/package.json +7 -4
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* happened", these answer "how much, how long, and on what". Nearly all the growth lands here —
|
|
6
6
|
* every new thing worth measuring lands in one of these two shapes.
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import * as z from 'zod';
|
|
9
9
|
/**
|
|
10
10
|
* The one-time advisories that point an agent at the platform and the Harness, by kind. Closed: a
|
|
11
11
|
* nudge whose kind is not listed here never reaches the wire.
|
|
@@ -13,9 +13,9 @@ import { z } from 'zod';
|
|
|
13
13
|
export declare const AgentNudgeKind: {
|
|
14
14
|
/** Unlinked, after the first verdict: `reticle connect` keeps it and lets the Harness test the app. */
|
|
15
15
|
readonly CONNECT: "connect";
|
|
16
|
-
/**
|
|
16
|
+
/** An older build's "close the gaps" advisory. No longer sent: the Harness has no coverage gate. */
|
|
17
17
|
readonly CLOSE_GAPS: "close_gaps";
|
|
18
|
-
/** Linked,
|
|
18
|
+
/** Linked, with the Harness off: the user can switch it on. */
|
|
19
19
|
readonly SWITCH_ON: "switch_on";
|
|
20
20
|
/** Harness on, and the agent is driving a long journey by hand: hand it to explore. */
|
|
21
21
|
readonly EXPLORE: "explore";
|
|
@@ -42,25 +42,11 @@ export declare function coverageBucketOf(percent: number): CoverageBucket;
|
|
|
42
42
|
* payload: you could rank the top error and never learn what it was, or which tool produced it.
|
|
43
43
|
*/
|
|
44
44
|
export declare const ErrorShapeSchema: z.ZodObject<{
|
|
45
|
-
/** Stable group key — the same defect from any machine shares it. */
|
|
46
45
|
fingerprint: z.ZodString;
|
|
47
|
-
/** How many times it happened this session. */
|
|
48
46
|
count: z.ZodNumber;
|
|
49
|
-
/** The message with every variable part stripped. The dictionary entry for the fingerprint. */
|
|
50
47
|
message: z.ZodString;
|
|
51
|
-
/** Which tool produced it — the same message from two tools is usually two different bugs. */
|
|
52
48
|
tool: z.ZodOptional<z.ZodString>;
|
|
53
|
-
},
|
|
54
|
-
message: string;
|
|
55
|
-
count: number;
|
|
56
|
-
fingerprint: string;
|
|
57
|
-
tool?: string | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
message: string;
|
|
60
|
-
count: number;
|
|
61
|
-
fingerprint: string;
|
|
62
|
-
tool?: string | undefined;
|
|
63
|
-
}>;
|
|
49
|
+
}, z.core.$strip>;
|
|
64
50
|
export type ErrorShape = z.infer<typeof ErrorShapeSchema>;
|
|
65
51
|
/**
|
|
66
52
|
* Whether the project has git, and whether anyone has pushed it.
|
|
@@ -103,44 +89,19 @@ export type RepoForge = (typeof RepoForge)[keyof typeof RepoForge];
|
|
|
103
89
|
* rather than percentages, because "2 GB free of 8" and "2 GB free of 64" are different worlds.
|
|
104
90
|
*/
|
|
105
91
|
export declare const MachineSnapshotSchema: z.ZodObject<{
|
|
106
|
-
/** Resident set size of the daemon itself — our footprint, the one we can actually fix. */
|
|
107
92
|
rssMb: z.ZodNumber;
|
|
108
93
|
heapUsedMb: z.ZodNumber;
|
|
109
|
-
/** Free and total system memory. A machine at 200 MB free explains a lot of otherwise-weird bugs. */
|
|
110
94
|
freeMemMb: z.ZodNumber;
|
|
111
95
|
totalMemMb: z.ZodNumber;
|
|
112
|
-
/** 1-minute load average, ×100 so it stays an integer. Zero on Windows, which does not report it. */
|
|
113
96
|
load1x100: z.ZodNumber;
|
|
114
97
|
cpuCount: z.ZodNumber;
|
|
115
|
-
},
|
|
116
|
-
rssMb: number;
|
|
117
|
-
heapUsedMb: number;
|
|
118
|
-
freeMemMb: number;
|
|
119
|
-
totalMemMb: number;
|
|
120
|
-
load1x100: number;
|
|
121
|
-
cpuCount: number;
|
|
122
|
-
}, {
|
|
123
|
-
rssMb: number;
|
|
124
|
-
heapUsedMb: number;
|
|
125
|
-
freeMemMb: number;
|
|
126
|
-
totalMemMb: number;
|
|
127
|
-
load1x100: number;
|
|
128
|
-
cpuCount: number;
|
|
129
|
-
}>;
|
|
98
|
+
}, z.core.$strip>;
|
|
130
99
|
export type MachineSnapshot = z.infer<typeof MachineSnapshotSchema>;
|
|
131
100
|
/** Per-tool wall-clock. `count` lives in `toolCounts`; these are the two numbers it does not carry. */
|
|
132
101
|
export declare const ToolTimingSchema: z.ZodObject<{
|
|
133
|
-
/** Total ms spent inside this tool. Divided by its count, the average; summed, the time in Reticle. */
|
|
134
102
|
totalMs: z.ZodNumber;
|
|
135
|
-
/** The single worst call. An average hides the 30-second outlier that made someone give up. */
|
|
136
103
|
maxMs: z.ZodNumber;
|
|
137
|
-
},
|
|
138
|
-
totalMs: number;
|
|
139
|
-
maxMs: number;
|
|
140
|
-
}, {
|
|
141
|
-
totalMs: number;
|
|
142
|
-
maxMs: number;
|
|
143
|
-
}>;
|
|
104
|
+
}, z.core.$strip>;
|
|
144
105
|
export type ToolTiming = z.infer<typeof ToolTimingSchema>;
|
|
145
106
|
/**
|
|
146
107
|
* Attempts, successes and failure reasons for one kind of connection.
|
|
@@ -153,17 +114,8 @@ export type ToolTiming = z.infer<typeof ToolTimingSchema>;
|
|
|
153
114
|
export declare const ConnectionStatsSchema: z.ZodObject<{
|
|
154
115
|
attempts: z.ZodNumber;
|
|
155
116
|
successes: z.ZodNumber;
|
|
156
|
-
/** Failure reasons with counts — our own classified vocabulary, never a raw error string. */
|
|
157
117
|
failures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
158
|
-
},
|
|
159
|
-
attempts: number;
|
|
160
|
-
successes: number;
|
|
161
|
-
failures?: Record<string, number> | undefined;
|
|
162
|
-
}, {
|
|
163
|
-
attempts: number;
|
|
164
|
-
successes: number;
|
|
165
|
-
failures?: Record<string, number> | undefined;
|
|
166
|
-
}>;
|
|
118
|
+
}, z.core.$strip>;
|
|
167
119
|
export type ConnectionStats = z.infer<typeof ConnectionStatsSchema>;
|
|
168
120
|
/**
|
|
169
121
|
* Why a browser/lease connection failed, classified into causes somebody can act on.
|
|
@@ -194,539 +146,109 @@ export type ConnectFailure = (typeof ConnectFailure)[keyof typeof ConnectFailure
|
|
|
194
146
|
* happened. Counts, never payloads: no arguments, no results, no selectors.
|
|
195
147
|
*/
|
|
196
148
|
export declare const SessionSummarySchema: z.ZodObject<{
|
|
197
|
-
/** How long the daemon was up, ms. */
|
|
198
149
|
durationMs: z.ZodNumber;
|
|
199
|
-
/** Total MCP tool calls served. */
|
|
200
150
|
toolCalls: z.ZodNumber;
|
|
201
|
-
/**
|
|
202
|
-
* Calls per tool name — `{ "reticle_act": 40 }`. Tool names are a fixed, low-cardinality set
|
|
203
|
-
* defined in this repository, so this is safe to send whole and is queryable with JSONExtract.
|
|
204
|
-
*/
|
|
205
151
|
toolCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
206
|
-
/** Tool calls that ended in an error, and the distinct error shapes behind them. */
|
|
207
152
|
toolErrors: z.ZodNumber;
|
|
208
|
-
/**
|
|
209
|
-
* The distinct error shapes seen, with counts, messages-with-variables-stripped, and the tool that
|
|
210
|
-
* produced each. Bounded, so a pathological loop cannot grow it without limit.
|
|
211
|
-
*/
|
|
212
153
|
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
213
|
-
/** Stable group key — the same defect from any machine shares it. */
|
|
214
154
|
fingerprint: z.ZodString;
|
|
215
|
-
/** How many times it happened this session. */
|
|
216
155
|
count: z.ZodNumber;
|
|
217
|
-
/** The message with every variable part stripped. The dictionary entry for the fingerprint. */
|
|
218
156
|
message: z.ZodString;
|
|
219
|
-
/** Which tool produced it — the same message from two tools is usually two different bugs. */
|
|
220
157
|
tool: z.ZodOptional<z.ZodString>;
|
|
221
|
-
},
|
|
222
|
-
message: string;
|
|
223
|
-
count: number;
|
|
224
|
-
fingerprint: string;
|
|
225
|
-
tool?: string | undefined;
|
|
226
|
-
}, {
|
|
227
|
-
message: string;
|
|
228
|
-
count: number;
|
|
229
|
-
fingerprint: string;
|
|
230
|
-
tool?: string | undefined;
|
|
231
|
-
}>, "many">>;
|
|
232
|
-
/**
|
|
233
|
-
* Failures reported by the IN-PAGE half of Reticle. Half the product runs in the browser and had no
|
|
234
|
-
* error reporting at all — every SDK catch block swallowed silently, so a broken observer just made
|
|
235
|
-
* the product quieter and nobody found out.
|
|
236
|
-
*/
|
|
158
|
+
}, z.core.$strip>>>;
|
|
237
159
|
sdkFailures: z.ZodOptional<z.ZodNumber>;
|
|
238
|
-
/** The distinct SDK failure shapes, with the module that reported each. */
|
|
239
160
|
sdkErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
240
|
-
/** Stable group key — the same defect from any machine shares it. */
|
|
241
161
|
fingerprint: z.ZodString;
|
|
242
|
-
/** How many times it happened this session. */
|
|
243
162
|
count: z.ZodNumber;
|
|
244
|
-
/** The message with every variable part stripped. The dictionary entry for the fingerprint. */
|
|
245
163
|
message: z.ZodString;
|
|
246
|
-
/** Which tool produced it — the same message from two tools is usually two different bugs. */
|
|
247
164
|
tool: z.ZodOptional<z.ZodString>;
|
|
248
|
-
},
|
|
249
|
-
message: string;
|
|
250
|
-
count: number;
|
|
251
|
-
fingerprint: string;
|
|
252
|
-
tool?: string | undefined;
|
|
253
|
-
}, {
|
|
254
|
-
message: string;
|
|
255
|
-
count: number;
|
|
256
|
-
fingerprint: string;
|
|
257
|
-
tool?: string | undefined;
|
|
258
|
-
}>, "many">>;
|
|
259
|
-
/** Verifications that produced a verdict during the session. */
|
|
165
|
+
}, z.core.$strip>>>;
|
|
260
166
|
verifications: z.ZodNumber;
|
|
261
|
-
/** Defects found in the app under test — the outcome number, not an activity number. */
|
|
262
167
|
bugsFound: z.ZodOptional<z.ZodNumber>;
|
|
263
|
-
/** Those bugs by kind, so the headline number can always be broken down rather than asserted. */
|
|
264
168
|
bugKinds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
265
|
-
/**
|
|
266
|
-
* Which PARAMETERS agents actually passed, per tool: `{"reticle_act": {"ref": 40, "action:click": 31}}`.
|
|
267
|
-
*
|
|
268
|
-
* Names only, with one narrow exception for parameters whose values are enums defined here
|
|
269
|
-
* (`action:click`). Never a raw value: `reticle_act`'s `args` carries the text being typed into the
|
|
270
|
-
* app, which on a login form is a password. See argument-shape.ts for the allowlist.
|
|
271
|
-
*/
|
|
272
169
|
toolParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
|
|
273
|
-
/**
|
|
274
|
-
* Browser/lease connections by kind, with attempts AND failures. Replaces a bare success counter
|
|
275
|
-
* that could not express the only interesting outcome.
|
|
276
|
-
*/
|
|
277
170
|
connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
278
171
|
attempts: z.ZodNumber;
|
|
279
172
|
successes: z.ZodNumber;
|
|
280
|
-
/** Failure reasons with counts — our own classified vocabulary, never a raw error string. */
|
|
281
173
|
failures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
282
|
-
},
|
|
283
|
-
attempts: number;
|
|
284
|
-
successes: number;
|
|
285
|
-
failures?: Record<string, number> | undefined;
|
|
286
|
-
}, {
|
|
287
|
-
attempts: number;
|
|
288
|
-
successes: number;
|
|
289
|
-
failures?: Record<string, number> | undefined;
|
|
290
|
-
}>>>;
|
|
291
|
-
/** Wall-clock per tool. With `toolCounts` this gives average, worst, and total time in Reticle. */
|
|
174
|
+
}, z.core.$strip>>>;
|
|
292
175
|
toolTiming: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
293
|
-
/** Total ms spent inside this tool. Divided by its count, the average; summed, the time in Reticle. */
|
|
294
176
|
totalMs: z.ZodNumber;
|
|
295
|
-
/** The single worst call. An average hides the 30-second outlier that made someone give up. */
|
|
296
177
|
maxMs: z.ZodNumber;
|
|
297
|
-
},
|
|
298
|
-
totalMs: number;
|
|
299
|
-
maxMs: number;
|
|
300
|
-
}, {
|
|
301
|
-
totalMs: number;
|
|
302
|
-
maxMs: number;
|
|
303
|
-
}>>>;
|
|
304
|
-
/**
|
|
305
|
-
* Total ms spent inside tool calls. The headline answer to "how much time does verification cost",
|
|
306
|
-
* and comparable against `durationMs` to see what fraction of a session Reticle was actually busy.
|
|
307
|
-
*/
|
|
178
|
+
}, z.core.$strip>>>;
|
|
308
179
|
busyMs: z.ZodOptional<z.ZodNumber>;
|
|
309
|
-
/**
|
|
310
|
-
* Time spent waiting on the BROWSER, and how many commands that was. Subtracted from `busyMs` this
|
|
311
|
-
* separates Reticle's own overhead from the app's — opposite fixes, previously indistinguishable.
|
|
312
|
-
*/
|
|
313
180
|
browserMs: z.ZodOptional<z.ZodNumber>;
|
|
314
181
|
browserCommands: z.ZodOptional<z.ZodNumber>;
|
|
315
|
-
/** The most tool calls in flight at once — parallel agents, or one agent fanning out. */
|
|
316
182
|
peakConcurrentTools: z.ZodOptional<z.ZodNumber>;
|
|
317
|
-
/** Calls for a tool name that does not exist. A non-zero value means the surface is confusing. */
|
|
318
183
|
unknownToolCalls: z.ZodOptional<z.ZodNumber>;
|
|
319
|
-
/**
|
|
320
|
-
* WHICH tools the agent reached for that do not exist, with counts.
|
|
321
|
-
*
|
|
322
|
-
* The count alone says "the surface confused someone" and can never say what they wanted. The name
|
|
323
|
-
* is a feature request in the agent's own vocabulary — and it is a NAME, from Reticle's own tool
|
|
324
|
-
* namespace, carrying no app data, so it is safe under the send-names-never-values rule.
|
|
325
|
-
*
|
|
326
|
-
* Bounded and truncated: a guess is a short identifier, and anything longer is not one.
|
|
327
|
-
*/
|
|
328
184
|
unknownTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
329
|
-
/**
|
|
330
|
-
* Tool calls that failed because there was no app to reach — no session connected, no session by
|
|
331
|
-
* that id, or several with none named.
|
|
332
|
-
*
|
|
333
|
-
* The single biggest drop-off in the funnel, counted here rather than left to be unpacked out of
|
|
334
|
-
* `errors[]` by a query. Absent when it never happened, so the field's PRESENCE is the signal.
|
|
335
|
-
*/
|
|
336
185
|
noSessionErrors: z.ZodOptional<z.ZodNumber>;
|
|
337
|
-
/**
|
|
338
|
-
* Connection-level POST failures on the MCP proxy (`ENOBUFS`, `EMFILE`, `EADDRNOTAVAIL`,
|
|
339
|
-
* `ECONNREFUSED` before any bytes were sent).
|
|
340
|
-
*
|
|
341
|
-
* These never produce `tool_refused` (the call never reached a handler) and never produce
|
|
342
|
-
* `mcp_connection_lost` (the SSE stream is fine). Without this count, a keep-alive retry that
|
|
343
|
-
* saves the call is indistinguishable from one that never fired. Absent when none happened.
|
|
344
|
-
*/
|
|
345
186
|
postSocketFailures: z.ZodOptional<z.ZodNumber>;
|
|
346
|
-
/**
|
|
347
|
-
* Of those POST failures, how many a bounded retry then delivered.
|
|
348
|
-
*
|
|
349
|
-
* The numerator against `postSocketFailures`: a retry that quietly saves a call is a different
|
|
350
|
-
* fact from a retry that never runs. Absent when none were saved.
|
|
351
|
-
*/
|
|
352
187
|
postRetriesSaved: z.ZodOptional<z.ZodNumber>;
|
|
353
|
-
/**
|
|
354
|
-
* Longest back-to-back run per tool name — the shape of a retry loop.
|
|
355
|
-
*
|
|
356
|
-
* `toolCounts` reports five useful calls and five retries of one failing call identically, and
|
|
357
|
-
* those are opposite facts: engagement versus an agent stuck. Only tools actually repeated appear.
|
|
358
|
-
*/
|
|
359
188
|
consecutiveRepeats: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
360
|
-
/**
|
|
361
|
-
* Actions driven with no verdict after them — the signature of the loop breaking mid-task.
|
|
362
|
-
*
|
|
363
|
-
* An agent that acts and then verifies is the product working; one that acts and wanders off has
|
|
364
|
-
* either given up or lost the thread, and nothing distinguished the two before.
|
|
365
|
-
*/
|
|
366
189
|
abandonedActions: z.ZodOptional<z.ZodNumber>;
|
|
367
|
-
/** The machine at shutdown — was it starved while all this was happening? */
|
|
368
190
|
machine: z.ZodOptional<z.ZodObject<{
|
|
369
|
-
/** Resident set size of the daemon itself — our footprint, the one we can actually fix. */
|
|
370
191
|
rssMb: z.ZodNumber;
|
|
371
192
|
heapUsedMb: z.ZodNumber;
|
|
372
|
-
/** Free and total system memory. A machine at 200 MB free explains a lot of otherwise-weird bugs. */
|
|
373
193
|
freeMemMb: z.ZodNumber;
|
|
374
194
|
totalMemMb: z.ZodNumber;
|
|
375
|
-
/** 1-minute load average, ×100 so it stays an integer. Zero on Windows, which does not report it. */
|
|
376
195
|
load1x100: z.ZodNumber;
|
|
377
196
|
cpuCount: z.ZodNumber;
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
heapUsedMb: number;
|
|
381
|
-
freeMemMb: number;
|
|
382
|
-
totalMemMb: number;
|
|
383
|
-
load1x100: number;
|
|
384
|
-
cpuCount: number;
|
|
385
|
-
}, {
|
|
386
|
-
rssMb: number;
|
|
387
|
-
heapUsedMb: number;
|
|
388
|
-
freeMemMb: number;
|
|
389
|
-
totalMemMb: number;
|
|
390
|
-
load1x100: number;
|
|
391
|
-
cpuCount: number;
|
|
392
|
-
}>>;
|
|
393
|
-
/** Distinct MCP clients seen (`claude-code`, `cursor`), so multi-agent use is visible. */
|
|
394
|
-
clients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
395
|
-
/**
|
|
396
|
-
* Client name -> version. The other half of `clients`, and the half that explains regressions.
|
|
397
|
-
*
|
|
398
|
-
* MCP's `clientInfo` carries a name AND a version, and both are read at the handshake. A product
|
|
399
|
-
* whose users are agents needs to slice every rate by which agent, on which build — a single
|
|
400
|
-
* global figure hides the finding entirely.
|
|
401
|
-
*
|
|
402
|
-
* NOT the model: `clientInfo` has no concept of one, so the transport genuinely cannot report it.
|
|
403
|
-
* Agents self-report it on feedback, which is the only mechanism there is.
|
|
404
|
-
*/
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
clients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
405
199
|
clientVersions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
406
|
-
/**
|
|
407
|
-
* Which tool surface was live. The 18-tool default and the 48-tool full surface are different
|
|
408
|
-
* products from inside an agent's context window, and comparing outcomes across them is the only
|
|
409
|
-
* way to tell whether the trim helps or hurts.
|
|
410
|
-
*/
|
|
411
200
|
surface: z.ZodOptional<z.ZodString>;
|
|
412
|
-
/**
|
|
413
|
-
* How many times an app's SDK dialled this daemon. **Session-lifetime, never windowed.**
|
|
414
|
-
*
|
|
415
|
-
* Zero here is the single most diagnostic number in the payload: the daemon ran and no app ever
|
|
416
|
-
* connected, which is a BROKEN INSTALL. Non-zero with no tool calls is the opposite problem — the
|
|
417
|
-
* install works and the agent never asked. Without this field those two are the same row, and
|
|
418
|
-
* they have opposite fixes.
|
|
419
|
-
*
|
|
420
|
-
* A counter rather than an event because the SDK reconnects on every page reload — an event per
|
|
421
|
-
* connect would be high volume for a question one number answers.
|
|
422
|
-
*/
|
|
423
201
|
appConnects: z.ZodOptional<z.ZodNumber>;
|
|
424
|
-
/**
|
|
425
|
-
* Milliseconds from daemon start to the FIRST app connecting. Absent when none ever did.
|
|
426
|
-
*
|
|
427
|
-
* Separates "the app was already running" from "the human had to go start it", which is the
|
|
428
|
-
* difference between a smooth install and one that needed a second step nobody documented.
|
|
429
|
-
*/
|
|
430
202
|
msToFirstApp: z.ZodOptional<z.ZodNumber>;
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
* Most of this is derivable at query time from `toolCalls` / `verifications` /
|
|
441
|
-
* `abandonedActions`. The part that is NOT derivable is `client_left` — whether the agent
|
|
442
|
-
* detached or simply stopped asking — which is why the daemon records it rather than leaving the
|
|
443
|
-
* whole thing to a query.
|
|
444
|
-
*/
|
|
445
|
-
endReason: z.ZodOptional<z.ZodEnum<["never_used", "explored", "abandoned", "verified", "client_left"]>>;
|
|
446
|
-
/**
|
|
447
|
-
* How often Reticle invited the agent to send feedback.
|
|
448
|
-
*
|
|
449
|
-
* The denominator for `feedback_submitted`: without it a low submission count cannot be told
|
|
450
|
-
* apart from an invitation that never appeared.
|
|
451
|
-
*/
|
|
203
|
+
sdkVersion: z.ZodOptional<z.ZodString>;
|
|
204
|
+
toolCallsBeforeApp: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
endReason: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
verified: "verified";
|
|
207
|
+
abandoned: "abandoned";
|
|
208
|
+
never_used: "never_used";
|
|
209
|
+
explored: "explored";
|
|
210
|
+
client_left: "client_left";
|
|
211
|
+
}>>;
|
|
452
212
|
feedbackPrompted: z.ZodOptional<z.ZodNumber>;
|
|
453
|
-
/**
|
|
454
|
-
* Tool errors bucketed by WHOSE defect they are: `schema` (the grammar failed to explain itself),
|
|
455
|
-
* `state` (the world moved), `refusal` (a deliberate no), `other` (a blind spot).
|
|
456
|
-
*
|
|
457
|
-
* `toolErrors` alone is one number over three failures with three different fixes, and only the
|
|
458
|
-
* `schema` bucket is fixable by writing better descriptions.
|
|
459
|
-
*/
|
|
460
213
|
errorClasses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
461
|
-
/**
|
|
462
|
-
* Errors after which the agent's NEXT call succeeded — the message worked.
|
|
463
|
-
*
|
|
464
|
-
* The best measure of an error message is what the agent does next. `consecutiveRepeats` has the
|
|
465
|
-
* loop and `errors[]` has the shape; this is the join. The most agent-specific metric in the
|
|
466
|
-
* payload: a human would sigh, a log would show nothing.
|
|
467
|
-
*/
|
|
468
214
|
errorsRecovered: z.ZodOptional<z.ZodNumber>;
|
|
469
|
-
/** Errors whose very next call failed again — the message did not land. */
|
|
470
215
|
errorsRepeated: z.ZodOptional<z.ZodNumber>;
|
|
471
|
-
/**
|
|
472
|
-
* Did this session ever produce a verdict? Absent on a periodic flush — nothing has ended yet.
|
|
473
|
-
*
|
|
474
|
-
* This is the release's headline metric and it was the one thing in the payload that had to be
|
|
475
|
-
* COMPUTED rather than read: `verifications > 0` over the lifetime counters, which are windowed on
|
|
476
|
-
* every other event in the stream, so the obvious query over `session_progress` answers a
|
|
477
|
-
* different question and looks like it answers this one. A metric that requires a correct
|
|
478
|
-
* subtraction to read is a metric that gets read wrong, and this one decides what the product is
|
|
479
|
-
* allowed to claim.
|
|
480
|
-
*
|
|
481
|
-
* ALWAYS present on a final summary, including `false`: a session that drove an app and never
|
|
482
|
-
* asked whether it worked is the finding, so absence and `false` must not look alike.
|
|
483
|
-
*/
|
|
484
216
|
endedWithVerdict: z.ZodOptional<z.ZodBoolean>;
|
|
485
|
-
/**
|
|
486
|
-
* Session totals, on the FINAL summary only. Every scalar counter above (`toolCalls`,
|
|
487
|
-
* `verifications`, `bugsFound`, ...) is windowed on EVERY event, the final one included, so the
|
|
488
|
-
* counts summed across a session's `session_progress` + `daemon_stopped` rows are the session's
|
|
489
|
-
* total. These are the same totals read off one row, under names a sum cannot pick up by mistake.
|
|
490
|
-
*/
|
|
491
217
|
lifetimeToolCalls: z.ZodOptional<z.ZodNumber>;
|
|
492
218
|
lifetimeVerifications: z.ZodOptional<z.ZodNumber>;
|
|
493
219
|
lifetimeBugsFound: z.ZodOptional<z.ZodNumber>;
|
|
494
|
-
/**
|
|
495
|
-
* Was the update nudge actually delivered to an agent during this daemon run.
|
|
496
|
-
*
|
|
497
|
-
* The nudge is the entire adoption mechanism for a published fix — it rides the tool-result
|
|
498
|
-
* envelope once per daemon process — and it emitted NOTHING, so the one question it exists to
|
|
499
|
-
* answer cannot be asked without it. `versionChange.nudged` is the other half and arrives only
|
|
500
|
-
* from machines that DID update; a machine pinned several releases back never fires
|
|
501
|
-
* `version_changed` at all, which is exactly the cohort worth understanding.
|
|
502
|
-
*
|
|
503
|
-
* Crossed against this same installId's `version` on a later day it separates the two causes,
|
|
504
|
-
* which need opposite fixes: `false` for run after run means the nudge is not firing for them (a
|
|
505
|
-
* cache that never warms, a check that never returns, an offline machine); `true` for run after
|
|
506
|
-
* run with a version that never moves means the agent is receiving it and dropping it out of the
|
|
507
|
-
* envelope, or telling a human who says no.
|
|
508
|
-
*
|
|
509
|
-
* Reads the delivery flag, not a counter: the nudge is one-shot per process by design, so `true`
|
|
510
|
-
* means "an agent was told", never "how often".
|
|
511
|
-
*/
|
|
512
220
|
updateNudged: z.ZodOptional<z.ZodBoolean>;
|
|
513
|
-
/**
|
|
514
|
-
* The newer version this daemon knew about, when it knew about one.
|
|
515
|
-
*
|
|
516
|
-
* Reticle's own published version number, so it is low-cardinality and carries nothing about the
|
|
517
|
-
* machine. Without it `updateNudged: false` is two facts at once — nothing was available, or
|
|
518
|
-
* something was and the nudge did not fire — and only the second is a defect.
|
|
519
|
-
*/
|
|
520
221
|
updateOffered: z.ZodOptional<z.ZodString>;
|
|
521
|
-
/**
|
|
522
|
-
* How people used the in-page HUD this window. All windowed, all absent when nobody touched it.
|
|
523
|
-
*
|
|
524
|
-
* `hudControls` counts presses per control id (a toggle as `id:on` / `id:off`), `hudViewMs` and
|
|
525
|
-
* `hudPanelMs` time how the HUD sat (bubble / collapsed / expanded) and which panel was showing,
|
|
526
|
-
* and `hudJourney` is the window's presses and view changes in order, cut at 60 with
|
|
527
|
-
* `hudJourneyCut`. `hudSlides` counts how often each rail slide was shown, by its id. Every key
|
|
528
|
-
* is a control or slide id Reticle authored: names, never values.
|
|
529
|
-
*/
|
|
530
222
|
hudControls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
531
223
|
hudViewMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
532
224
|
hudPanelMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
533
225
|
hudSlides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
534
|
-
hudJourney: z.ZodOptional<z.ZodArray<z.ZodString
|
|
226
|
+
hudJourney: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
535
227
|
hudJourneyCut: z.ZodOptional<z.ZodLiteral<true>>;
|
|
536
|
-
|
|
537
|
-
* The one-time platform and Harness advisories an agent was shown, by kind (`AgentNudgeKind`).
|
|
538
|
-
* Whether a connect or an explore followed is read beside it: `cli_command_run` for `connect`, and
|
|
539
|
-
* `toolCounts` / `toolParams` for `reticle_verify`'s explore. Windowed; absent when none was shown.
|
|
540
|
-
*/
|
|
541
|
-
nudgesShown: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<{
|
|
228
|
+
nudgesShown: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
542
229
|
/** Unlinked, after the first verdict: `reticle connect` keeps it and lets the Harness test the app. */
|
|
543
230
|
readonly CONNECT: "connect";
|
|
544
|
-
/**
|
|
231
|
+
/** An older build's "close the gaps" advisory. No longer sent: the Harness has no coverage gate. */
|
|
545
232
|
readonly CLOSE_GAPS: "close_gaps";
|
|
546
|
-
/** Linked,
|
|
233
|
+
/** Linked, with the Harness off: the user can switch it on. */
|
|
547
234
|
readonly SWITCH_ON: "switch_on";
|
|
548
235
|
/** Harness on, and the agent is driving a long journey by hand: hand it to explore. */
|
|
549
236
|
readonly EXPLORE: "explore";
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
* Harness drives refused for coverage below the gate, by coverage bucket (`CoverageBucket`).
|
|
553
|
-
* Windowed; absent when none was refused.
|
|
554
|
-
*/
|
|
555
|
-
harnessRefusedCoverage: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<{
|
|
237
|
+
}> & z.core.$partial, z.ZodNumber>>;
|
|
238
|
+
harnessRefusedCoverage: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
556
239
|
readonly B0: "0-19";
|
|
557
240
|
readonly B20: "20-39";
|
|
558
241
|
readonly B40: "40-59";
|
|
559
242
|
readonly B60: "60-79";
|
|
560
243
|
readonly B80: "80-100";
|
|
561
|
-
}
|
|
562
|
-
/** Was this a clean shutdown, or a periodic flush of a still-running session? */
|
|
244
|
+
}> & z.core.$partial, z.ZodNumber>>;
|
|
563
245
|
final: z.ZodBoolean;
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
* a genuine outage is invisible inside it.
|
|
571
|
-
*
|
|
572
|
-
* The daemon has always known this (`recordExitReason`); it simply never put it on an event. The
|
|
573
|
-
* proxy that emits the outage cannot know it — it only sees a socket end — so the join is made
|
|
574
|
-
* here, on the one event that fires at the same moment and already carries the session.
|
|
575
|
-
*/
|
|
576
|
-
exit: z.ZodOptional<z.ZodEnum<["idle", "signal", "unknown"]>>;
|
|
577
|
-
}, "strip", z.ZodTypeAny, {
|
|
578
|
-
durationMs: number;
|
|
579
|
-
toolCalls: number;
|
|
580
|
-
toolCounts: Record<string, number>;
|
|
581
|
-
toolErrors: number;
|
|
582
|
-
verifications: number;
|
|
583
|
-
final: boolean;
|
|
584
|
-
surface?: string | undefined;
|
|
585
|
-
errors?: {
|
|
586
|
-
message: string;
|
|
587
|
-
count: number;
|
|
588
|
-
fingerprint: string;
|
|
589
|
-
tool?: string | undefined;
|
|
590
|
-
}[] | undefined;
|
|
591
|
-
sdkFailures?: number | undefined;
|
|
592
|
-
sdkErrors?: {
|
|
593
|
-
message: string;
|
|
594
|
-
count: number;
|
|
595
|
-
fingerprint: string;
|
|
596
|
-
tool?: string | undefined;
|
|
597
|
-
}[] | undefined;
|
|
598
|
-
bugsFound?: number | undefined;
|
|
599
|
-
bugKinds?: Record<string, number> | undefined;
|
|
600
|
-
toolParams?: Record<string, Record<string, number>> | undefined;
|
|
601
|
-
connections?: Record<string, {
|
|
602
|
-
attempts: number;
|
|
603
|
-
successes: number;
|
|
604
|
-
failures?: Record<string, number> | undefined;
|
|
605
|
-
}> | undefined;
|
|
606
|
-
toolTiming?: Record<string, {
|
|
607
|
-
totalMs: number;
|
|
608
|
-
maxMs: number;
|
|
609
|
-
}> | undefined;
|
|
610
|
-
busyMs?: number | undefined;
|
|
611
|
-
browserMs?: number | undefined;
|
|
612
|
-
browserCommands?: number | undefined;
|
|
613
|
-
peakConcurrentTools?: number | undefined;
|
|
614
|
-
unknownToolCalls?: number | undefined;
|
|
615
|
-
unknownTools?: Record<string, number> | undefined;
|
|
616
|
-
noSessionErrors?: number | undefined;
|
|
617
|
-
postSocketFailures?: number | undefined;
|
|
618
|
-
postRetriesSaved?: number | undefined;
|
|
619
|
-
consecutiveRepeats?: Record<string, number> | undefined;
|
|
620
|
-
abandonedActions?: number | undefined;
|
|
621
|
-
machine?: {
|
|
622
|
-
rssMb: number;
|
|
623
|
-
heapUsedMb: number;
|
|
624
|
-
freeMemMb: number;
|
|
625
|
-
totalMemMb: number;
|
|
626
|
-
load1x100: number;
|
|
627
|
-
cpuCount: number;
|
|
628
|
-
} | undefined;
|
|
629
|
-
clients?: string[] | undefined;
|
|
630
|
-
clientVersions?: Record<string, string> | undefined;
|
|
631
|
-
appConnects?: number | undefined;
|
|
632
|
-
msToFirstApp?: number | undefined;
|
|
633
|
-
endReason?: "verified" | "abandoned" | "never_used" | "explored" | "client_left" | undefined;
|
|
634
|
-
feedbackPrompted?: number | undefined;
|
|
635
|
-
errorClasses?: Record<string, number> | undefined;
|
|
636
|
-
errorsRecovered?: number | undefined;
|
|
637
|
-
errorsRepeated?: number | undefined;
|
|
638
|
-
endedWithVerdict?: boolean | undefined;
|
|
639
|
-
lifetimeToolCalls?: number | undefined;
|
|
640
|
-
lifetimeVerifications?: number | undefined;
|
|
641
|
-
lifetimeBugsFound?: number | undefined;
|
|
642
|
-
updateNudged?: boolean | undefined;
|
|
643
|
-
updateOffered?: string | undefined;
|
|
644
|
-
hudControls?: Record<string, number> | undefined;
|
|
645
|
-
hudViewMs?: Record<string, number> | undefined;
|
|
646
|
-
hudPanelMs?: Record<string, number> | undefined;
|
|
647
|
-
hudSlides?: Record<string, number> | undefined;
|
|
648
|
-
hudJourney?: string[] | undefined;
|
|
649
|
-
hudJourneyCut?: true | undefined;
|
|
650
|
-
nudgesShown?: Partial<Record<"connect" | "close_gaps" | "switch_on" | "explore", number>> | undefined;
|
|
651
|
-
harnessRefusedCoverage?: Partial<Record<"0-19" | "20-39" | "40-59" | "60-79" | "80-100", number>> | undefined;
|
|
652
|
-
exit?: "signal" | "idle" | "unknown" | undefined;
|
|
653
|
-
}, {
|
|
654
|
-
durationMs: number;
|
|
655
|
-
toolCalls: number;
|
|
656
|
-
toolCounts: Record<string, number>;
|
|
657
|
-
toolErrors: number;
|
|
658
|
-
verifications: number;
|
|
659
|
-
final: boolean;
|
|
660
|
-
surface?: string | undefined;
|
|
661
|
-
errors?: {
|
|
662
|
-
message: string;
|
|
663
|
-
count: number;
|
|
664
|
-
fingerprint: string;
|
|
665
|
-
tool?: string | undefined;
|
|
666
|
-
}[] | undefined;
|
|
667
|
-
sdkFailures?: number | undefined;
|
|
668
|
-
sdkErrors?: {
|
|
669
|
-
message: string;
|
|
670
|
-
count: number;
|
|
671
|
-
fingerprint: string;
|
|
672
|
-
tool?: string | undefined;
|
|
673
|
-
}[] | undefined;
|
|
674
|
-
bugsFound?: number | undefined;
|
|
675
|
-
bugKinds?: Record<string, number> | undefined;
|
|
676
|
-
toolParams?: Record<string, Record<string, number>> | undefined;
|
|
677
|
-
connections?: Record<string, {
|
|
678
|
-
attempts: number;
|
|
679
|
-
successes: number;
|
|
680
|
-
failures?: Record<string, number> | undefined;
|
|
681
|
-
}> | undefined;
|
|
682
|
-
toolTiming?: Record<string, {
|
|
683
|
-
totalMs: number;
|
|
684
|
-
maxMs: number;
|
|
685
|
-
}> | undefined;
|
|
686
|
-
busyMs?: number | undefined;
|
|
687
|
-
browserMs?: number | undefined;
|
|
688
|
-
browserCommands?: number | undefined;
|
|
689
|
-
peakConcurrentTools?: number | undefined;
|
|
690
|
-
unknownToolCalls?: number | undefined;
|
|
691
|
-
unknownTools?: Record<string, number> | undefined;
|
|
692
|
-
noSessionErrors?: number | undefined;
|
|
693
|
-
postSocketFailures?: number | undefined;
|
|
694
|
-
postRetriesSaved?: number | undefined;
|
|
695
|
-
consecutiveRepeats?: Record<string, number> | undefined;
|
|
696
|
-
abandonedActions?: number | undefined;
|
|
697
|
-
machine?: {
|
|
698
|
-
rssMb: number;
|
|
699
|
-
heapUsedMb: number;
|
|
700
|
-
freeMemMb: number;
|
|
701
|
-
totalMemMb: number;
|
|
702
|
-
load1x100: number;
|
|
703
|
-
cpuCount: number;
|
|
704
|
-
} | undefined;
|
|
705
|
-
clients?: string[] | undefined;
|
|
706
|
-
clientVersions?: Record<string, string> | undefined;
|
|
707
|
-
appConnects?: number | undefined;
|
|
708
|
-
msToFirstApp?: number | undefined;
|
|
709
|
-
endReason?: "verified" | "abandoned" | "never_used" | "explored" | "client_left" | undefined;
|
|
710
|
-
feedbackPrompted?: number | undefined;
|
|
711
|
-
errorClasses?: Record<string, number> | undefined;
|
|
712
|
-
errorsRecovered?: number | undefined;
|
|
713
|
-
errorsRepeated?: number | undefined;
|
|
714
|
-
endedWithVerdict?: boolean | undefined;
|
|
715
|
-
lifetimeToolCalls?: number | undefined;
|
|
716
|
-
lifetimeVerifications?: number | undefined;
|
|
717
|
-
lifetimeBugsFound?: number | undefined;
|
|
718
|
-
updateNudged?: boolean | undefined;
|
|
719
|
-
updateOffered?: string | undefined;
|
|
720
|
-
hudControls?: Record<string, number> | undefined;
|
|
721
|
-
hudViewMs?: Record<string, number> | undefined;
|
|
722
|
-
hudPanelMs?: Record<string, number> | undefined;
|
|
723
|
-
hudSlides?: Record<string, number> | undefined;
|
|
724
|
-
hudJourney?: string[] | undefined;
|
|
725
|
-
hudJourneyCut?: true | undefined;
|
|
726
|
-
nudgesShown?: Partial<Record<"connect" | "close_gaps" | "switch_on" | "explore", number>> | undefined;
|
|
727
|
-
harnessRefusedCoverage?: Partial<Record<"0-19" | "20-39" | "40-59" | "60-79" | "80-100", number>> | undefined;
|
|
728
|
-
exit?: "signal" | "idle" | "unknown" | undefined;
|
|
729
|
-
}>;
|
|
246
|
+
exit: z.ZodOptional<z.ZodEnum<{
|
|
247
|
+
signal: "signal";
|
|
248
|
+
idle: "idle";
|
|
249
|
+
unknown: "unknown";
|
|
250
|
+
}>>;
|
|
251
|
+
}, z.core.$strip>;
|
|
730
252
|
export type SessionSummary = z.infer<typeof SessionSummarySchema>;
|
|
731
253
|
/**
|
|
732
254
|
* Coarse size buckets. A bucket answers "is this a toy or a real codebase" — which is the actual
|
|
@@ -783,28 +305,12 @@ export type StackUnknownReason = (typeof StackUnknownReason)[keyof typeof StackU
|
|
|
783
305
|
* look identical in a DAU chart, and only one of them is retained.
|
|
784
306
|
*/
|
|
785
307
|
export declare const ProjectProfileSchema: z.ZodObject<{
|
|
786
|
-
/** Framework detected from package.json (`next`, `vite`, `vue`, `astro`, …). */
|
|
787
308
|
stack: z.ZodOptional<z.ZodString>;
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
* help, which decides whether an agent-correction surface is worth building at all.
|
|
794
|
-
*
|
|
795
|
-
* Before discovery existed here, stack was detected on **none of the projects where Reticle was
|
|
796
|
-
* demonstrably set up**, and none of the large ones either. A detector
|
|
797
|
-
* that reads one directory reports nothing precisely where the real repos are.
|
|
798
|
-
*/
|
|
799
|
-
stackSource: z.ZodOptional<z.ZodEnum<["cwd", "workspace"]>>;
|
|
800
|
-
/**
|
|
801
|
-
* Why there is no `stack`, when there is none. Present ONLY when `stack` is absent.
|
|
802
|
-
*
|
|
803
|
-
* Omitted rather than sent as a "resolved" member, so the field's presence is itself the signal —
|
|
804
|
-
* the same rule the session counters follow. A member meaning "nothing went wrong" would be sent
|
|
805
|
-
* on every successful profile and would have to be filtered out of every query that uses this.
|
|
806
|
-
*/
|
|
807
|
-
stackUnknownReason: z.ZodOptional<z.ZodNativeEnum<{
|
|
309
|
+
stackSource: z.ZodOptional<z.ZodEnum<{
|
|
310
|
+
cwd: "cwd";
|
|
311
|
+
workspace: "workspace";
|
|
312
|
+
}>>;
|
|
313
|
+
stackUnknownReason: z.ZodOptional<z.ZodEnum<{
|
|
808
314
|
/** No manifest here, and discovery found no app anywhere below. Usually a daemon started outside the project. */
|
|
809
315
|
readonly NO_APP_FOUND: "no_app_found";
|
|
810
316
|
/** A `package.json` HERE, read fine, naming no dependency in the table. The app is a stack we do not know. */
|
|
@@ -825,19 +331,16 @@ export declare const ProjectProfileSchema: z.ZodObject<{
|
|
|
825
331
|
/** Workspace discovery threw — a permission error, most likely. Distinguished so it cannot masquerade as absence. */
|
|
826
332
|
readonly DISCOVERY_FAILED: "discovery_failed";
|
|
827
333
|
}>>;
|
|
828
|
-
/** Its MAJOR version only — "breaks on React 19" is a work item, a full semver is a fingerprint. */
|
|
829
334
|
stackMajor: z.ZodOptional<z.ZodNumber>;
|
|
830
|
-
size: z.ZodOptional<z.
|
|
335
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
831
336
|
readonly TINY: "tiny";
|
|
832
337
|
readonly SMALL: "small";
|
|
833
338
|
readonly MEDIUM: "medium";
|
|
834
339
|
readonly LARGE: "large";
|
|
835
340
|
readonly HUGE: "huge";
|
|
836
341
|
}>>;
|
|
837
|
-
/** True when the repo has workspaces — monorepos exercise very different code paths. */
|
|
838
342
|
monorepo: z.ZodOptional<z.ZodBoolean>;
|
|
839
|
-
|
|
840
|
-
git: z.ZodNativeEnum<{
|
|
343
|
+
git: z.ZodEnum<{
|
|
841
344
|
/** No `.git` anywhere above the project — Reticle is running in a plain directory. */
|
|
842
345
|
readonly NONE: "none";
|
|
843
346
|
/** `git init` was run, but there is no origin remote. Nobody else can be working on this copy. */
|
|
@@ -845,8 +348,7 @@ export declare const ProjectProfileSchema: z.ZodObject<{
|
|
|
845
348
|
/** There is an origin remote — the project is pushed and can be shared. */
|
|
846
349
|
readonly REMOTE: "remote";
|
|
847
350
|
}>;
|
|
848
|
-
|
|
849
|
-
forge: z.ZodOptional<z.ZodNativeEnum<{
|
|
351
|
+
forge: z.ZodOptional<z.ZodEnum<{
|
|
850
352
|
readonly GITHUB: "github";
|
|
851
353
|
readonly GITLAB: "gitlab";
|
|
852
354
|
readonly BITBUCKET: "bitbucket";
|
|
@@ -855,97 +357,16 @@ export declare const ProjectProfileSchema: z.ZodObject<{
|
|
|
855
357
|
readonly CODEBERG: "codeberg";
|
|
856
358
|
readonly SELF_HOSTED: "self_hosted";
|
|
857
359
|
}>>;
|
|
858
|
-
/**
|
|
859
|
-
* How long this project has existed, in whole WEEKS, from its first commit. Answers "are people
|
|
860
|
-
* adopting Reticle on greenfield spikes or on mature codebases" — the single most useful thing to
|
|
861
|
-
* know about who this is for. Weeks, not a date: a date plus a stack narrows to a specific repo.
|
|
862
|
-
*/
|
|
863
360
|
ageWeeks: z.ZodOptional<z.ZodNumber>;
|
|
864
|
-
/** Saved flows on disk — the deterministic-replay suite. 0 means replay was never adopted. */
|
|
865
361
|
flowCount: z.ZodNumber;
|
|
866
|
-
/** Saved text baselines. */
|
|
867
362
|
baselineCount: z.ZodNumber;
|
|
868
|
-
/** Saved pixel baselines — visual regression adoption. */
|
|
869
363
|
visualBaselineCount: z.ZodNumber;
|
|
870
|
-
/** Recorded verification-run artifacts — CI/OEM consumption. */
|
|
871
364
|
runCount: z.ZodNumber;
|
|
872
|
-
/** A git-checked `.reticle/contract.json` — the team declared a testable surface on purpose. */
|
|
873
365
|
hasContract: z.ZodBoolean;
|
|
874
|
-
/**
|
|
875
|
-
* Has `reticle init` run in this project — a `.reticle.json` is present.
|
|
876
|
-
*
|
|
877
|
-
* The install has two halves and the failure side of the second one is a SET DIFFERENCE:
|
|
878
|
-
* `daemon_started` minus `app_instrumented`, joined on `sessionId`. That difference says a daemon
|
|
879
|
-
* ran with nothing wired and cannot say WHY, so the whole non-instrumented majority arrives as one
|
|
880
|
-
* silence covering four different situations with four different owners.
|
|
881
|
-
*
|
|
882
|
-
* This is the first of the two bits that split it, and it is on `project_profiled` deliberately:
|
|
883
|
-
* that event fires once per daemon start whatever happens afterwards, so it is the only place a
|
|
884
|
-
* fact about a project is reported at all for an install that never instruments anything. `app_instrumented`
|
|
885
|
-
* carries the same field and cannot answer this, because it only exists when the answer is moot.
|
|
886
|
-
*/
|
|
887
366
|
initialized: z.ZodOptional<z.ZodBoolean>;
|
|
888
|
-
/**
|
|
889
|
-
* Has an app for this project EVER connected to Reticle — read from durable state, not from this
|
|
890
|
-
* process.
|
|
891
|
-
*
|
|
892
|
-
* The second bit. `initialized: false` is "never ran init"; `initialized: true` with this `false`
|
|
893
|
-
* is the cohort the funnel loses — the config was written and no page has ever reached the daemon,
|
|
894
|
-
* which is the dev server that was never restarted, a plugin that never loaded, or a handshake
|
|
895
|
-
* refused at the origin gate. `true` here with no `app_instrumented` this run is a working install
|
|
896
|
-
* whose app simply is not up right now, and reading that as a loss is how the drop-off gets
|
|
897
|
-
* over-stated.
|
|
898
|
-
*
|
|
899
|
-
* Scoped to project + port, like every other reader of this state, so it cannot borrow another
|
|
900
|
-
* project's success on a shared daemon. OPTIONAL because an older sender has none; absent means
|
|
901
|
-
* not measured, never `false`.
|
|
902
|
-
*/
|
|
903
367
|
appConnectedBefore: z.ZodOptional<z.ZodBoolean>;
|
|
904
|
-
/** Fail-to-pass bug capsules — the deepest feature in the product. */
|
|
905
368
|
capsuleCount: z.ZodNumber;
|
|
906
|
-
|
|
907
|
-
featuresUsed: z.ZodArray<z.ZodString, "many">;
|
|
908
|
-
/** 0–1: the fraction of shipped feature families in use. One number for "are they getting value". */
|
|
369
|
+
featuresUsed: z.ZodArray<z.ZodString>;
|
|
909
370
|
featureDepth: z.ZodNumber;
|
|
910
|
-
},
|
|
911
|
-
git: "none" | "local_only" | "remote";
|
|
912
|
-
flowCount: number;
|
|
913
|
-
baselineCount: number;
|
|
914
|
-
visualBaselineCount: number;
|
|
915
|
-
runCount: number;
|
|
916
|
-
hasContract: boolean;
|
|
917
|
-
capsuleCount: number;
|
|
918
|
-
featuresUsed: string[];
|
|
919
|
-
featureDepth: number;
|
|
920
|
-
stack?: string | undefined;
|
|
921
|
-
stackMajor?: number | undefined;
|
|
922
|
-
size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
|
|
923
|
-
stackSource?: "cwd" | "workspace" | undefined;
|
|
924
|
-
stackUnknownReason?: "no_app_found" | "manifest_unrecognised" | "workspace_apps_unrecognised" | "workspace_root_no_apps" | "discovery_failed" | undefined;
|
|
925
|
-
monorepo?: boolean | undefined;
|
|
926
|
-
forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
|
|
927
|
-
ageWeeks?: number | undefined;
|
|
928
|
-
initialized?: boolean | undefined;
|
|
929
|
-
appConnectedBefore?: boolean | undefined;
|
|
930
|
-
}, {
|
|
931
|
-
git: "none" | "local_only" | "remote";
|
|
932
|
-
flowCount: number;
|
|
933
|
-
baselineCount: number;
|
|
934
|
-
visualBaselineCount: number;
|
|
935
|
-
runCount: number;
|
|
936
|
-
hasContract: boolean;
|
|
937
|
-
capsuleCount: number;
|
|
938
|
-
featuresUsed: string[];
|
|
939
|
-
featureDepth: number;
|
|
940
|
-
stack?: string | undefined;
|
|
941
|
-
stackMajor?: number | undefined;
|
|
942
|
-
size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
|
|
943
|
-
stackSource?: "cwd" | "workspace" | undefined;
|
|
944
|
-
stackUnknownReason?: "no_app_found" | "manifest_unrecognised" | "workspace_apps_unrecognised" | "workspace_root_no_apps" | "discovery_failed" | undefined;
|
|
945
|
-
monorepo?: boolean | undefined;
|
|
946
|
-
forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
|
|
947
|
-
ageWeeks?: number | undefined;
|
|
948
|
-
initialized?: boolean | undefined;
|
|
949
|
-
appConnectedBefore?: boolean | undefined;
|
|
950
|
-
}>;
|
|
371
|
+
}, z.core.$strip>;
|
|
951
372
|
export type ProjectProfile = z.infer<typeof ProjectProfileSchema>;
|