@reticlehq/core 3.8.0 → 3.8.2
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/artifacts/drive-script.d.ts +84 -1217
- package/dist/artifacts/drive-script.js +1 -1
- 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 +15 -0
- package/dist/artifacts/flow-types.d.ts +202 -2331
- package/dist/artifacts/flow-types.js +2 -2
- 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 +80 -1638
- package/dist/artifacts/impact.js +4 -4
- package/dist/artifacts/journal.d.ts +12 -247
- package/dist/artifacts/journal.js +2 -2
- package/dist/artifacts/prompt-context.d.ts +5 -43
- package/dist/artifacts/prompt-context.js +1 -1
- package/dist/artifacts/screenshot-upload.d.ts +3 -26
- package/dist/artifacts/screenshot-upload.js +1 -1
- package/dist/hooks/hook-events.d.ts +15 -171
- package/dist/hooks/hook-events.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/onboarding.d.ts +8 -58
- package/dist/onboarding.js +1 -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 -103
- package/dist/schema/event-payloads.json +142 -119
- package/dist/schema/event-type.json +47 -50
- package/dist/schema/hello-message.json +150 -154
- package/dist/schema/reticle-event.json +98 -96
- package/dist/schema/reticle-message.json +338 -333
- package/dist/telemetry-bug.d.ts +4 -75
- package/dist/telemetry-bug.js +1 -1
- package/dist/telemetry-feedback.d.ts +11 -99
- package/dist/telemetry-feedback.js +1 -1
- package/dist/telemetry-refusal.d.ts +4 -31
- package/dist/telemetry-refusal.js +1 -1
- package/dist/telemetry-session.d.ts +39 -633
- package/dist/telemetry-session.js +10 -8
- package/dist/telemetry-signals.d.ts +58 -151
- package/dist/telemetry-signals.js +12 -1
- package/dist/telemetry.d.ts +137 -1814
- package/dist/telemetry.js +1 -1
- package/dist/verdict/compare-source.d.ts +1 -1
- package/dist/verdict/compare-source.js +1 -1
- package/dist/verdict/disparity.d.ts +8 -56
- package/dist/verdict/disparity.js +1 -1
- package/dist/verdict/instrumentation-coverage.d.ts +3 -3
- package/dist/verdict/instrumentation-coverage.js +1 -1
- package/dist/verdict/instrumentation-gap.d.ts +3 -10
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +25 -224
- package/dist/verdict/intent.js +1 -1
- package/dist/verdict/predicate.d.ts +1 -1
- package/dist/verdict/predicate.js +5 -5
- package/dist/verdict/property-assertion.d.ts +23 -101
- package/dist/verdict/property-assertion.js +1 -1
- package/dist/verdict/run-report.d.ts +13 -108
- package/dist/verdict/run-report.js +1 -1
- package/dist/verdict/security.d.ts +12 -0
- package/dist/verdict/security.js +94 -7
- package/dist/verdict/verification-run.d.ts +112 -1668
- package/dist/verdict/verification-run.js +4 -4
- package/dist/verdict/verify-progress.d.ts +22 -64
- package/dist/verdict/verify-progress.js +1 -1
- package/dist/wire/click-input.d.ts +15 -0
- package/dist/wire/click-input.js +42 -0
- package/dist/wire/constants/event-types.d.ts +2 -0
- package/dist/wire/constants/event-types.js +2 -0
- package/dist/wire/constants/response-body-reason.d.ts +4 -4
- package/dist/wire/constants/response-body-reason.js +4 -4
- package/dist/wire/constants/reticle-env.d.ts +2 -0
- package/dist/wire/constants/reticle-env.js +2 -0
- package/dist/wire/event-payloads.d.ts +108 -678
- package/dist/wire/event-payloads.js +24 -7
- package/dist/wire/event-priority.js +1 -0
- package/dist/wire/messages.d.ts +66 -755
- package/dist/wire/messages.js +3 -3
- package/dist/wire/next-step.d.ts +11 -51
- package/dist/wire/next-step.js +1 -1
- package/dist/wire/platform-link.js +2 -2
- package/dist/wire/production/production-policy.d.ts +37 -83
- package/dist/wire/production/production-policy.js +1 -1
- package/dist/wire/types.d.ts +75 -698
- 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 +4 -5
|
@@ -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.
|
|
@@ -252,7 +252,7 @@ export const SessionSummarySchema = z.object({
|
|
|
252
252
|
* `toolCounts` reports five useful calls and five retries of one failing call identically, and
|
|
253
253
|
* those are opposite facts: engagement versus an agent stuck. Only tools actually repeated appear.
|
|
254
254
|
*/
|
|
255
|
-
consecutiveRepeats: z.record(z.number().int().positive()).optional(),
|
|
255
|
+
consecutiveRepeats: z.record(z.string(), z.number().int().positive()).optional(),
|
|
256
256
|
/**
|
|
257
257
|
* Actions driven with no verdict after them — the signature of the loop breaking mid-task.
|
|
258
258
|
*
|
|
@@ -410,10 +410,10 @@ export const SessionSummarySchema = z.object({
|
|
|
410
410
|
* `hudJourneyCut`. `hudSlides` counts how often each rail slide was shown, by its id. Every key
|
|
411
411
|
* is a control or slide id Reticle authored: names, never values.
|
|
412
412
|
*/
|
|
413
|
-
hudControls: z.record(z.number()).optional(),
|
|
414
|
-
hudViewMs: z.record(z.number()).optional(),
|
|
415
|
-
hudPanelMs: z.record(z.number()).optional(),
|
|
416
|
-
hudSlides: z.record(z.number()).optional(),
|
|
413
|
+
hudControls: z.record(z.string(), z.number()).optional(),
|
|
414
|
+
hudViewMs: z.record(z.string(), z.number()).optional(),
|
|
415
|
+
hudPanelMs: z.record(z.string(), z.number()).optional(),
|
|
416
|
+
hudSlides: z.record(z.string(), z.number()).optional(),
|
|
417
417
|
hudJourney: z.array(z.string().max(64)).max(60).optional(),
|
|
418
418
|
hudJourneyCut: z.literal(true).optional(),
|
|
419
419
|
/**
|
|
@@ -421,13 +421,15 @@ export const SessionSummarySchema = z.object({
|
|
|
421
421
|
* Whether a connect or an explore followed is read beside it: `cli_command_run` for `connect`, and
|
|
422
422
|
* `toolCounts` / `toolParams` for `reticle_verify`'s explore. Windowed; absent when none was shown.
|
|
423
423
|
*/
|
|
424
|
-
nudgesShown: z
|
|
424
|
+
nudgesShown: z
|
|
425
|
+
.partialRecord(z.nativeEnum(AgentNudgeKind), z.number().int().positive())
|
|
426
|
+
.optional(),
|
|
425
427
|
/**
|
|
426
428
|
* Harness drives an older build refused for low coverage, by coverage bucket (`CoverageBucket`).
|
|
427
429
|
* No longer sent: the Harness has no coverage gate. Kept so an older daemon's events still parse.
|
|
428
430
|
*/
|
|
429
431
|
harnessRefusedCoverage: z
|
|
430
|
-
.
|
|
432
|
+
.partialRecord(z.nativeEnum(CoverageBucket), z.number().int().positive())
|
|
431
433
|
.optional(),
|
|
432
434
|
/** Was this a clean shutdown, or a periodic flush of a still-running session? */
|
|
433
435
|
final: z.boolean(),
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Its own file so the vocabulary has one home and `telemetry.ts` only wires it in. Every value here is
|
|
8
8
|
* a closed set, a boolean or a bucket: none of these fields can carry a URL, a path, a name or text.
|
|
9
9
|
*/
|
|
10
|
-
import
|
|
10
|
+
import * as z from 'zod';
|
|
11
11
|
/**
|
|
12
12
|
* Where this machine stands with the platform, on every event. `linked` implies signed in OR an
|
|
13
13
|
* api key in the environment: a project with a working link reports to a workspace either way.
|
|
@@ -62,7 +62,7 @@ export type CountBucket = (typeof CountBucket)[keyof typeof CountBucket];
|
|
|
62
62
|
export declare function countBucket(n: number): CountBucket;
|
|
63
63
|
/** `hud_viewed` / `hud_signin_prompted`: which page or prompt, and how many tabs had a HUD. */
|
|
64
64
|
export declare const HudEventSchema: z.ZodObject<{
|
|
65
|
-
view: z.ZodOptional<z.
|
|
65
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
66
66
|
readonly CHAT: "chat";
|
|
67
67
|
readonly FLOWS: "flows";
|
|
68
68
|
readonly NOTES: "notes";
|
|
@@ -72,27 +72,19 @@ export declare const HudEventSchema: z.ZodObject<{
|
|
|
72
72
|
readonly ACCOUNT: "account";
|
|
73
73
|
readonly NONE: "none";
|
|
74
74
|
}>>;
|
|
75
|
-
surface: z.ZodOptional<z.
|
|
75
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
76
76
|
readonly RAIL: "rail";
|
|
77
77
|
readonly HARNESS: "harness";
|
|
78
78
|
readonly HEADER: "header";
|
|
79
79
|
}>>;
|
|
80
|
-
tabs: z.ZodOptional<z.
|
|
80
|
+
tabs: z.ZodOptional<z.ZodEnum<{
|
|
81
81
|
readonly ZERO: "0";
|
|
82
82
|
readonly ONE: "1";
|
|
83
83
|
readonly TWO_THREE: "2-3";
|
|
84
84
|
readonly FOUR_NINE: "4-9";
|
|
85
85
|
readonly TEN_PLUS: "10+";
|
|
86
86
|
}>>;
|
|
87
|
-
},
|
|
88
|
-
surface?: "harness" | "rail" | "header" | undefined;
|
|
89
|
-
view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined;
|
|
90
|
-
tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
91
|
-
}, {
|
|
92
|
-
surface?: "harness" | "rail" | "header" | undefined;
|
|
93
|
-
view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined;
|
|
94
|
-
tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
95
|
-
}>;
|
|
87
|
+
}, z.core.$strip>;
|
|
96
88
|
export type HudEvent = z.infer<typeof HudEventSchema>;
|
|
97
89
|
/** How a project got linked to a workspace on this machine. */
|
|
98
90
|
export declare const PlatformLinkVia: {
|
|
@@ -105,7 +97,7 @@ export declare const PlatformLinkVia: {
|
|
|
105
97
|
};
|
|
106
98
|
export type PlatformLinkVia = (typeof PlatformLinkVia)[keyof typeof PlatformLinkVia];
|
|
107
99
|
export declare const PlatformLinkSchema: z.ZodObject<{
|
|
108
|
-
via: z.
|
|
100
|
+
via: z.ZodEnum<{
|
|
109
101
|
/** `reticle connect`: sign in, link and sync in one command. */
|
|
110
102
|
readonly CONNECT: "connect";
|
|
111
103
|
/** The HUD's "Link this project" / "Save runs for your team". */
|
|
@@ -113,11 +105,7 @@ export declare const PlatformLinkSchema: z.ZodObject<{
|
|
|
113
105
|
/** A bare `reticle link`. */
|
|
114
106
|
readonly LINK: "link";
|
|
115
107
|
}>;
|
|
116
|
-
},
|
|
117
|
-
via: "link" | "hud" | "connect";
|
|
118
|
-
}, {
|
|
119
|
-
via: "link" | "hud" | "connect";
|
|
120
|
-
}>;
|
|
108
|
+
}, z.core.$strip>;
|
|
121
109
|
export type PlatformLink = z.infer<typeof PlatformLinkSchema>;
|
|
122
110
|
export declare const HarnessRunPhase: {
|
|
123
111
|
readonly STARTED: "started";
|
|
@@ -169,44 +157,40 @@ export declare const HarnessRunSource: {
|
|
|
169
157
|
export type HarnessRunSource = (typeof HarnessRunSource)[keyof typeof HarnessRunSource];
|
|
170
158
|
/** `harness_run`: one `started` and one `completed` per run. */
|
|
171
159
|
export declare const HarnessRunSchema: z.ZodObject<{
|
|
172
|
-
phase: z.
|
|
160
|
+
phase: z.ZodEnum<{
|
|
173
161
|
readonly STARTED: "started";
|
|
174
162
|
readonly COMPLETED: "completed";
|
|
175
163
|
}>;
|
|
176
|
-
source: z.
|
|
164
|
+
source: z.ZodEnum<{
|
|
177
165
|
readonly AGENT: "agent";
|
|
178
166
|
readonly HUD: "hud";
|
|
179
167
|
readonly DASHBOARD: "dashboard";
|
|
180
168
|
readonly CLI_TRY: "cli_try";
|
|
181
169
|
readonly PLAN: "plan";
|
|
182
170
|
}>;
|
|
183
|
-
/** The run drives on the platform (always, today), as opposed to an injected local driver. */
|
|
184
171
|
hosted: z.ZodBoolean;
|
|
185
|
-
|
|
186
|
-
outcome: z.ZodOptional<z.ZodNativeEnum<{
|
|
172
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
187
173
|
readonly PROVED: "proved";
|
|
188
174
|
readonly NOT_PROVED: "not_proved";
|
|
189
175
|
readonly FAILED: "failed";
|
|
190
176
|
readonly BLOCKED: "blocked";
|
|
191
177
|
readonly STOPPED: "stopped";
|
|
192
178
|
}>>;
|
|
193
|
-
|
|
194
|
-
journeys: z.ZodOptional<z.ZodNativeEnum<{
|
|
179
|
+
journeys: z.ZodOptional<z.ZodEnum<{
|
|
195
180
|
readonly ZERO: "0";
|
|
196
181
|
readonly ONE: "1";
|
|
197
182
|
readonly TWO_THREE: "2-3";
|
|
198
183
|
readonly FOUR_NINE: "4-9";
|
|
199
184
|
readonly TEN_PLUS: "10+";
|
|
200
185
|
}>>;
|
|
201
|
-
replayed: z.ZodOptional<z.
|
|
186
|
+
replayed: z.ZodOptional<z.ZodEnum<{
|
|
202
187
|
readonly ZERO: "0";
|
|
203
188
|
readonly ONE: "1";
|
|
204
189
|
readonly TWO_THREE: "2-3";
|
|
205
190
|
readonly FOUR_NINE: "4-9";
|
|
206
191
|
readonly TEN_PLUS: "10+";
|
|
207
192
|
}>>;
|
|
208
|
-
|
|
209
|
-
reason: z.ZodOptional<z.ZodNativeEnum<{
|
|
193
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
210
194
|
/** The project has no platform link, so there is nowhere to drive from. */
|
|
211
195
|
readonly NOT_LINKED: "not_linked";
|
|
212
196
|
/** The platform did not confirm the drive in time, or answered something unreadable. */
|
|
@@ -226,23 +210,7 @@ export declare const HarnessRunSchema: z.ZodObject<{
|
|
|
226
210
|
/** A refusal this list does not name. A growing count here is a gap in this list. */
|
|
227
211
|
readonly OTHER: "other";
|
|
228
212
|
}>>;
|
|
229
|
-
},
|
|
230
|
-
source: "plan" | "agent" | "hud" | "dashboard" | "cli_try";
|
|
231
|
-
phase: "completed" | "started";
|
|
232
|
-
hosted: boolean;
|
|
233
|
-
reason?: "version_skew" | "other" | "not_linked" | "platform_unreachable" | "harness_off" | "no_credits" | "not_entitled" | "coverage_gate" | "broken" | undefined;
|
|
234
|
-
replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
235
|
-
outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined;
|
|
236
|
-
journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
237
|
-
}, {
|
|
238
|
-
source: "plan" | "agent" | "hud" | "dashboard" | "cli_try";
|
|
239
|
-
phase: "completed" | "started";
|
|
240
|
-
hosted: boolean;
|
|
241
|
-
reason?: "version_skew" | "other" | "not_linked" | "platform_unreachable" | "harness_off" | "no_credits" | "not_entitled" | "coverage_gate" | "broken" | undefined;
|
|
242
|
-
replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
243
|
-
outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined;
|
|
244
|
-
journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
245
|
-
}>;
|
|
213
|
+
}, z.core.$strip>;
|
|
246
214
|
export type HarnessRun = z.infer<typeof HarnessRunSchema>;
|
|
247
215
|
/**
|
|
248
216
|
* The envelope fields and blocks this file adds to `TelemetryEventSchema`, spread into it there.
|
|
@@ -250,7 +218,7 @@ export type HarnessRun = z.infer<typeof HarnessRunSchema>;
|
|
|
250
218
|
*/
|
|
251
219
|
export declare const SIGNAL_FIELDS: {
|
|
252
220
|
/** Signed out, signed in, or signed in AND this project linked to a workspace. */
|
|
253
|
-
accountState: z.ZodOptional<z.
|
|
221
|
+
accountState: z.ZodOptional<z.ZodEnum<{
|
|
254
222
|
readonly SIGNED_OUT: "signed_out";
|
|
255
223
|
readonly SIGNED_IN: "signed_in";
|
|
256
224
|
readonly LINKED: "linked";
|
|
@@ -263,7 +231,7 @@ export declare const SIGNAL_FIELDS: {
|
|
|
263
231
|
*/
|
|
264
232
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
265
233
|
/** Which coding agent this event came from, normalised. Absent when nothing said. */
|
|
266
|
-
client: z.ZodOptional<z.
|
|
234
|
+
client: z.ZodOptional<z.ZodEnum<{
|
|
267
235
|
readonly CLAUDE_CODE: "claude_code";
|
|
268
236
|
readonly CLAUDE_DESKTOP: "claude_desktop";
|
|
269
237
|
readonly CODEX: "codex";
|
|
@@ -278,7 +246,7 @@ export declare const SIGNAL_FIELDS: {
|
|
|
278
246
|
readonly OTHER: "other";
|
|
279
247
|
}>>;
|
|
280
248
|
/** How the running `reticle` was launched. */
|
|
281
|
-
launch: z.ZodOptional<z.
|
|
249
|
+
launch: z.ZodOptional<z.ZodEnum<{
|
|
282
250
|
readonly NPX: "npx";
|
|
283
251
|
readonly GLOBAL: "global";
|
|
284
252
|
readonly PROJECT: "project";
|
|
@@ -286,7 +254,7 @@ export declare const SIGNAL_FIELDS: {
|
|
|
286
254
|
}>>;
|
|
287
255
|
/** Only on `hud_viewed` / `hud_signin_prompted`. */
|
|
288
256
|
hud: z.ZodOptional<z.ZodObject<{
|
|
289
|
-
view: z.ZodOptional<z.
|
|
257
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
290
258
|
readonly CHAT: "chat";
|
|
291
259
|
readonly FLOWS: "flows";
|
|
292
260
|
readonly NOTES: "notes";
|
|
@@ -296,30 +264,22 @@ export declare const SIGNAL_FIELDS: {
|
|
|
296
264
|
readonly ACCOUNT: "account";
|
|
297
265
|
readonly NONE: "none";
|
|
298
266
|
}>>;
|
|
299
|
-
surface: z.ZodOptional<z.
|
|
267
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
300
268
|
readonly RAIL: "rail";
|
|
301
269
|
readonly HARNESS: "harness";
|
|
302
270
|
readonly HEADER: "header";
|
|
303
271
|
}>>;
|
|
304
|
-
tabs: z.ZodOptional<z.
|
|
272
|
+
tabs: z.ZodOptional<z.ZodEnum<{
|
|
305
273
|
readonly ZERO: "0";
|
|
306
274
|
readonly ONE: "1";
|
|
307
275
|
readonly TWO_THREE: "2-3";
|
|
308
276
|
readonly FOUR_NINE: "4-9";
|
|
309
277
|
readonly TEN_PLUS: "10+";
|
|
310
278
|
}>>;
|
|
311
|
-
},
|
|
312
|
-
surface?: "harness" | "rail" | "header" | undefined;
|
|
313
|
-
view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined;
|
|
314
|
-
tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
315
|
-
}, {
|
|
316
|
-
surface?: "harness" | "rail" | "header" | undefined;
|
|
317
|
-
view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined;
|
|
318
|
-
tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
319
|
-
}>>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
320
280
|
/** Only on `platform_linked`. */
|
|
321
281
|
link: z.ZodOptional<z.ZodObject<{
|
|
322
|
-
via: z.
|
|
282
|
+
via: z.ZodEnum<{
|
|
323
283
|
/** `reticle connect`: sign in, link and sync in one command. */
|
|
324
284
|
readonly CONNECT: "connect";
|
|
325
285
|
/** The HUD's "Link this project" / "Save runs for your team". */
|
|
@@ -327,51 +287,43 @@ export declare const SIGNAL_FIELDS: {
|
|
|
327
287
|
/** A bare `reticle link`. */
|
|
328
288
|
readonly LINK: "link";
|
|
329
289
|
}>;
|
|
330
|
-
},
|
|
331
|
-
via: "link" | "hud" | "connect";
|
|
332
|
-
}, {
|
|
333
|
-
via: "link" | "hud" | "connect";
|
|
334
|
-
}>>;
|
|
290
|
+
}, z.core.$strip>>;
|
|
335
291
|
/** Only on `harness_run`. */
|
|
336
292
|
harness: z.ZodOptional<z.ZodObject<{
|
|
337
|
-
phase: z.
|
|
293
|
+
phase: z.ZodEnum<{
|
|
338
294
|
readonly STARTED: "started";
|
|
339
295
|
readonly COMPLETED: "completed";
|
|
340
296
|
}>;
|
|
341
|
-
source: z.
|
|
297
|
+
source: z.ZodEnum<{
|
|
342
298
|
readonly AGENT: "agent";
|
|
343
299
|
readonly HUD: "hud";
|
|
344
300
|
readonly DASHBOARD: "dashboard";
|
|
345
301
|
readonly CLI_TRY: "cli_try";
|
|
346
302
|
readonly PLAN: "plan";
|
|
347
303
|
}>;
|
|
348
|
-
/** The run drives on the platform (always, today), as opposed to an injected local driver. */
|
|
349
304
|
hosted: z.ZodBoolean;
|
|
350
|
-
|
|
351
|
-
outcome: z.ZodOptional<z.ZodNativeEnum<{
|
|
305
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
352
306
|
readonly PROVED: "proved";
|
|
353
307
|
readonly NOT_PROVED: "not_proved";
|
|
354
308
|
readonly FAILED: "failed";
|
|
355
309
|
readonly BLOCKED: "blocked";
|
|
356
310
|
readonly STOPPED: "stopped";
|
|
357
311
|
}>>;
|
|
358
|
-
|
|
359
|
-
journeys: z.ZodOptional<z.ZodNativeEnum<{
|
|
312
|
+
journeys: z.ZodOptional<z.ZodEnum<{
|
|
360
313
|
readonly ZERO: "0";
|
|
361
314
|
readonly ONE: "1";
|
|
362
315
|
readonly TWO_THREE: "2-3";
|
|
363
316
|
readonly FOUR_NINE: "4-9";
|
|
364
317
|
readonly TEN_PLUS: "10+";
|
|
365
318
|
}>>;
|
|
366
|
-
replayed: z.ZodOptional<z.
|
|
319
|
+
replayed: z.ZodOptional<z.ZodEnum<{
|
|
367
320
|
readonly ZERO: "0";
|
|
368
321
|
readonly ONE: "1";
|
|
369
322
|
readonly TWO_THREE: "2-3";
|
|
370
323
|
readonly FOUR_NINE: "4-9";
|
|
371
324
|
readonly TEN_PLUS: "10+";
|
|
372
325
|
}>>;
|
|
373
|
-
|
|
374
|
-
reason: z.ZodOptional<z.ZodNativeEnum<{
|
|
326
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
375
327
|
/** The project has no platform link, so there is nowhere to drive from. */
|
|
376
328
|
readonly NOT_LINKED: "not_linked";
|
|
377
329
|
/** The platform did not confirm the drive in time, or answered something unreadable. */
|
|
@@ -391,23 +343,7 @@ export declare const SIGNAL_FIELDS: {
|
|
|
391
343
|
/** A refusal this list does not name. A growing count here is a gap in this list. */
|
|
392
344
|
readonly OTHER: "other";
|
|
393
345
|
}>>;
|
|
394
|
-
},
|
|
395
|
-
source: "plan" | "agent" | "hud" | "dashboard" | "cli_try";
|
|
396
|
-
phase: "completed" | "started";
|
|
397
|
-
hosted: boolean;
|
|
398
|
-
reason?: "version_skew" | "other" | "not_linked" | "platform_unreachable" | "harness_off" | "no_credits" | "not_entitled" | "coverage_gate" | "broken" | undefined;
|
|
399
|
-
replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
400
|
-
outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined;
|
|
401
|
-
journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
402
|
-
}, {
|
|
403
|
-
source: "plan" | "agent" | "hud" | "dashboard" | "cli_try";
|
|
404
|
-
phase: "completed" | "started";
|
|
405
|
-
hosted: boolean;
|
|
406
|
-
reason?: "version_skew" | "other" | "not_linked" | "platform_unreachable" | "harness_off" | "no_credits" | "not_entitled" | "coverage_gate" | "broken" | undefined;
|
|
407
|
-
replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
408
|
-
outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined;
|
|
409
|
-
journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined;
|
|
410
|
-
}>>;
|
|
346
|
+
}, z.core.$strip>>;
|
|
411
347
|
};
|
|
412
348
|
/**
|
|
413
349
|
* The socket error code behind a drop, as a closed set. Anything else reports `other`, so a new code
|
|
@@ -435,7 +371,7 @@ export declare const ProxyExitReason: {
|
|
|
435
371
|
export type ProxyExitReason = (typeof ProxyExitReason)[keyof typeof ProxyExitReason];
|
|
436
372
|
/** `mcp_proxy_exited`: the agent's MCP server process ended, and the agent lost its tools. */
|
|
437
373
|
export declare const ProxyExitSchema: z.ZodObject<{
|
|
438
|
-
reason: z.
|
|
374
|
+
reason: z.ZodEnum<{
|
|
439
375
|
/** The client closed stdin. The normal end of a session. */
|
|
440
376
|
readonly STDIN_END: "stdin_end";
|
|
441
377
|
/** The client link was quiet for the idle window, with no work in flight. */
|
|
@@ -445,37 +381,27 @@ export declare const ProxyExitSchema: z.ZodObject<{
|
|
|
445
381
|
/** The proxy could not start a daemon and had no way to continue. */
|
|
446
382
|
readonly WAKE_FAILED: "wake_failed";
|
|
447
383
|
}>;
|
|
448
|
-
/** How long the proxy process ran. */
|
|
449
384
|
uptimeMs: z.ZodNumber;
|
|
450
|
-
/** How many times the proxy lost its daemon stream in its life. */
|
|
451
385
|
drops: z.ZodNumber;
|
|
452
|
-
/** How many `tools/call` requests the client sent through this proxy. */
|
|
453
386
|
toolCalls: z.ZodNumber;
|
|
454
387
|
proxyId: z.ZodOptional<z.ZodString>;
|
|
455
|
-
},
|
|
456
|
-
reason: "idle" | "stdin_end" | "client_gone_storm" | "wake_failed";
|
|
457
|
-
toolCalls: number;
|
|
458
|
-
uptimeMs: number;
|
|
459
|
-
drops: number;
|
|
460
|
-
proxyId?: string | undefined;
|
|
461
|
-
}, {
|
|
462
|
-
reason: "idle" | "stdin_end" | "client_gone_storm" | "wake_failed";
|
|
463
|
-
toolCalls: number;
|
|
464
|
-
uptimeMs: number;
|
|
465
|
-
drops: number;
|
|
466
|
-
proxyId?: string | undefined;
|
|
467
|
-
}>;
|
|
388
|
+
}, z.core.$strip>;
|
|
468
389
|
export type ProxyExit = z.infer<typeof ProxyExitSchema>;
|
|
469
390
|
/** `daemon_died_unclean`: a daemon start found the pidfile of a daemon that never stopped cleanly. */
|
|
470
391
|
export declare const DaemonDeathSchema: z.ZodObject<{
|
|
471
|
-
/** Time from the dead daemon's start (its pidfile write) to this discovery. */
|
|
472
392
|
ageMs: z.ZodNumber;
|
|
473
|
-
},
|
|
474
|
-
ageMs: number;
|
|
475
|
-
}, {
|
|
476
|
-
ageMs: number;
|
|
477
|
-
}>;
|
|
393
|
+
}, z.core.$strip>;
|
|
478
394
|
export type DaemonDeath = z.infer<typeof DaemonDeathSchema>;
|
|
395
|
+
/** How the parent started the daemon. On Windows a start through WMI leaves the Job Object. */
|
|
396
|
+
export declare const DaemonSpawnMethod: {
|
|
397
|
+
/** A detached child of the parent. On Windows it stays in the job of the parent. */
|
|
398
|
+
readonly DETACHED: "detached";
|
|
399
|
+
/** Windows only: started through WMI `Win32_Process.Create`, outside every job. */
|
|
400
|
+
readonly WMI: "wmi";
|
|
401
|
+
/** Windows only: the WMI start failed, so the parent used the detached start. */
|
|
402
|
+
readonly WMI_FALLBACK: "wmi_fallback";
|
|
403
|
+
};
|
|
404
|
+
export type DaemonSpawnMethod = (typeof DaemonSpawnMethod)[keyof typeof DaemonSpawnMethod];
|
|
479
405
|
/** What held the port when a wake was refused. */
|
|
480
406
|
export declare const WakeRefusalPresence: {
|
|
481
407
|
/** Something that is not a Reticle daemon holds the port. */
|
|
@@ -486,23 +412,19 @@ export declare const WakeRefusalPresence: {
|
|
|
486
412
|
export type WakeRefusalPresence = (typeof WakeRefusalPresence)[keyof typeof WakeRefusalPresence];
|
|
487
413
|
/** `wake_refused`: the proxy would not use the daemon port it found. */
|
|
488
414
|
export declare const WakeRefusalSchema: z.ZodObject<{
|
|
489
|
-
presence: z.
|
|
415
|
+
presence: z.ZodEnum<{
|
|
490
416
|
/** Something that is not a Reticle daemon holds the port. */
|
|
491
417
|
readonly FOREIGN: "foreign";
|
|
492
418
|
/** A Reticle daemon for a different project holds the port. */
|
|
493
419
|
readonly OTHER_PROJECT: "other_project";
|
|
494
420
|
}>;
|
|
495
|
-
},
|
|
496
|
-
presence: "foreign" | "other_project";
|
|
497
|
-
}, {
|
|
498
|
-
presence: "foreign" | "other_project";
|
|
499
|
-
}>;
|
|
421
|
+
}, z.core.$strip>;
|
|
500
422
|
export type WakeRefusal = z.infer<typeof WakeRefusalSchema>;
|
|
501
423
|
/** The blocks this file adds to `TelemetryEventSchema`, spread into it there. */
|
|
502
424
|
export declare const TRANSPORT_FIELDS: {
|
|
503
425
|
/** Only on `mcp_proxy_exited`. */
|
|
504
426
|
proxyExit: z.ZodOptional<z.ZodObject<{
|
|
505
|
-
reason: z.
|
|
427
|
+
reason: z.ZodEnum<{
|
|
506
428
|
/** The client closed stdin. The normal end of a session. */
|
|
507
429
|
readonly STDIN_END: "stdin_end";
|
|
508
430
|
/** The client link was quiet for the idle window, with no work in flight. */
|
|
@@ -512,46 +434,31 @@ export declare const TRANSPORT_FIELDS: {
|
|
|
512
434
|
/** The proxy could not start a daemon and had no way to continue. */
|
|
513
435
|
readonly WAKE_FAILED: "wake_failed";
|
|
514
436
|
}>;
|
|
515
|
-
/** How long the proxy process ran. */
|
|
516
437
|
uptimeMs: z.ZodNumber;
|
|
517
|
-
/** How many times the proxy lost its daemon stream in its life. */
|
|
518
438
|
drops: z.ZodNumber;
|
|
519
|
-
/** How many `tools/call` requests the client sent through this proxy. */
|
|
520
439
|
toolCalls: z.ZodNumber;
|
|
521
440
|
proxyId: z.ZodOptional<z.ZodString>;
|
|
522
|
-
},
|
|
523
|
-
reason: "idle" | "stdin_end" | "client_gone_storm" | "wake_failed";
|
|
524
|
-
toolCalls: number;
|
|
525
|
-
uptimeMs: number;
|
|
526
|
-
drops: number;
|
|
527
|
-
proxyId?: string | undefined;
|
|
528
|
-
}, {
|
|
529
|
-
reason: "idle" | "stdin_end" | "client_gone_storm" | "wake_failed";
|
|
530
|
-
toolCalls: number;
|
|
531
|
-
uptimeMs: number;
|
|
532
|
-
drops: number;
|
|
533
|
-
proxyId?: string | undefined;
|
|
534
|
-
}>>;
|
|
441
|
+
}, z.core.$strip>>;
|
|
535
442
|
/** Only on `daemon_died_unclean`. */
|
|
536
443
|
daemonDeath: z.ZodOptional<z.ZodObject<{
|
|
537
|
-
/** Time from the dead daemon's start (its pidfile write) to this discovery. */
|
|
538
444
|
ageMs: z.ZodNumber;
|
|
539
|
-
},
|
|
540
|
-
ageMs: number;
|
|
541
|
-
}, {
|
|
542
|
-
ageMs: number;
|
|
543
|
-
}>>;
|
|
445
|
+
}, z.core.$strip>>;
|
|
544
446
|
/** Only on `wake_refused`. */
|
|
545
447
|
wakeRefusal: z.ZodOptional<z.ZodObject<{
|
|
546
|
-
presence: z.
|
|
448
|
+
presence: z.ZodEnum<{
|
|
547
449
|
/** Something that is not a Reticle daemon holds the port. */
|
|
548
450
|
readonly FOREIGN: "foreign";
|
|
549
451
|
/** A Reticle daemon for a different project holds the port. */
|
|
550
452
|
readonly OTHER_PROJECT: "other_project";
|
|
551
453
|
}>;
|
|
552
|
-
},
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
/** Only on `daemon_started`: how the parent started the daemon. A scalar. */
|
|
456
|
+
spawnMethod: z.ZodOptional<z.ZodEnum<{
|
|
457
|
+
/** A detached child of the parent. On Windows it stays in the job of the parent. */
|
|
458
|
+
readonly DETACHED: "detached";
|
|
459
|
+
/** Windows only: started through WMI `Win32_Process.Create`, outside every job. */
|
|
460
|
+
readonly WMI: "wmi";
|
|
461
|
+
/** Windows only: the WMI start failed, so the parent used the detached start. */
|
|
462
|
+
readonly WMI_FALLBACK: "wmi_fallback";
|
|
556
463
|
}>>;
|
|
557
464
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Its own file so the vocabulary has one home and `telemetry.ts` only wires it in. Every value here is
|
|
8
8
|
* a closed set, a boolean or a bucket: none of these fields can carry a URL, a path, a name or text.
|
|
9
9
|
*/
|
|
10
|
-
import
|
|
10
|
+
import * as z from 'zod';
|
|
11
11
|
import { HudPanel, HudPromptSurface } from './wire/constants/hud-use.js';
|
|
12
12
|
/**
|
|
13
13
|
* Where this machine stands with the platform, on every event. `linked` implies signed in OR an
|
|
@@ -203,6 +203,15 @@ export const DaemonDeathSchema = z.object({
|
|
|
203
203
|
/** Time from the dead daemon's start (its pidfile write) to this discovery. */
|
|
204
204
|
ageMs: z.number().int().nonnegative(),
|
|
205
205
|
});
|
|
206
|
+
/** How the parent started the daemon. On Windows a start through WMI leaves the Job Object. */
|
|
207
|
+
export const DaemonSpawnMethod = {
|
|
208
|
+
/** A detached child of the parent. On Windows it stays in the job of the parent. */
|
|
209
|
+
DETACHED: 'detached',
|
|
210
|
+
/** Windows only: started through WMI `Win32_Process.Create`, outside every job. */
|
|
211
|
+
WMI: 'wmi',
|
|
212
|
+
/** Windows only: the WMI start failed, so the parent used the detached start. */
|
|
213
|
+
WMI_FALLBACK: 'wmi_fallback',
|
|
214
|
+
};
|
|
206
215
|
/** What held the port when a wake was refused. */
|
|
207
216
|
export const WakeRefusalPresence = {
|
|
208
217
|
/** Something that is not a Reticle daemon holds the port. */
|
|
@@ -222,4 +231,6 @@ export const TRANSPORT_FIELDS = {
|
|
|
222
231
|
daemonDeath: DaemonDeathSchema.optional(),
|
|
223
232
|
/** Only on `wake_refused`. */
|
|
224
233
|
wakeRefusal: WakeRefusalSchema.optional(),
|
|
234
|
+
/** Only on `daemon_started`: how the parent started the daemon. A scalar. */
|
|
235
|
+
spawnMethod: z.nativeEnum(DaemonSpawnMethod).optional(),
|
|
225
236
|
};
|