@reticlehq/core 3.6.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activation-entry.d.ts +9 -0
- package/dist/activation-entry.js +9 -0
- package/dist/artifacts/artifacts-entry.d.ts +2 -0
- package/dist/artifacts/artifacts-entry.js +2 -0
- package/dist/artifacts/drive-script.d.ts +222 -116
- package/dist/artifacts/drive-script.js +24 -1
- package/dist/artifacts/flow-constants.d.ts +33 -0
- package/dist/artifacts/flow-constants.js +35 -0
- package/dist/artifacts/flow-expect-flat.d.ts +8 -8
- package/dist/artifacts/flow-results.d.ts +461 -0
- package/dist/artifacts/flow-results.js +1 -0
- package/dist/artifacts/flow-types.d.ts +177 -543
- package/dist/artifacts/flow-types.js +17 -2
- package/dist/artifacts/harness-credits.d.ts +42 -0
- package/dist/artifacts/harness-credits.js +72 -0
- package/dist/artifacts/harness-map.d.ts +98 -0
- package/dist/artifacts/harness-map.js +36 -0
- package/dist/artifacts/impact.d.ts +355 -149
- package/dist/artifacts/impact.js +84 -49
- package/dist/artifacts/journal.d.ts +81 -11
- package/dist/artifacts/journal.js +39 -0
- package/dist/artifacts/prompt-context.d.ts +12 -0
- package/dist/artifacts/prompt-context.js +14 -3
- package/dist/artifacts/screenshot-upload.d.ts +51 -0
- package/dist/artifacts/screenshot-upload.js +26 -0
- package/dist/graph/app-graph.d.ts +137 -0
- package/dist/graph/app-graph.js +498 -0
- package/dist/hooks/hook-events.d.ts +26 -26
- package/dist/hud-entry.d.ts +1 -0
- package/dist/hud-entry.js +2 -0
- 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 +15 -0
- package/dist/index.js +15 -0
- package/dist/onboarding.d.ts +30 -1
- package/dist/onboarding.js +25 -0
- package/dist/realm/registry.js +19 -1
- package/dist/registry/dev-server-registry.d.ts +2 -2
- package/dist/schema/command-message.json +30 -0
- package/dist/schema/command-name.json +3 -1
- package/dist/schema/event-message.json +3 -1
- package/dist/schema/event-payloads.json +156 -3
- package/dist/schema/event-type.json +3 -1
- package/dist/schema/hello-message.json +21 -0
- package/dist/schema/reticle-event.json +3 -1
- package/dist/schema/reticle-message.json +54 -1
- package/dist/telemetry-bug.d.ts +169 -0
- package/dist/telemetry-bug.js +123 -0
- package/dist/telemetry-entry.d.ts +2 -1
- package/dist/telemetry-entry.js +2 -1
- package/dist/telemetry-feedback.d.ts +16 -2
- package/dist/telemetry-feedback.js +19 -0
- package/dist/telemetry-session.d.ts +91 -2
- package/dist/telemetry-session.js +65 -0
- package/dist/telemetry-signals.d.ts +557 -0
- package/dist/telemetry-signals.js +225 -0
- package/dist/telemetry.d.ts +649 -296
- package/dist/telemetry.js +110 -119
- package/dist/verdict/check-sentence.d.ts +34 -0
- package/dist/verdict/check-sentence.js +228 -0
- package/dist/verdict/consequence.d.ts +15 -0
- package/dist/verdict/consequence.js +11 -0
- package/dist/verdict/disparity.d.ts +105 -0
- package/dist/verdict/disparity.js +40 -0
- package/dist/verdict/findings.d.ts +16 -0
- package/dist/verdict/findings.js +22 -0
- package/dist/verdict/instrumentation-coverage.d.ts +84 -0
- package/dist/verdict/instrumentation-coverage.js +182 -0
- package/dist/verdict/instrumentation-gap.d.ts +79 -0
- package/dist/verdict/instrumentation-gap.js +65 -1
- package/dist/verdict/intent.d.ts +19 -5
- package/dist/verdict/intent.js +13 -1
- package/dist/verdict/predicate-tree.d.ts +17 -0
- package/dist/verdict/predicate-tree.js +37 -0
- package/dist/verdict/predicate.d.ts +16 -1
- package/dist/verdict/predicate.js +188 -13
- package/dist/verdict/property-assertion.d.ts +2 -2
- package/dist/verdict/run-report.d.ts +166 -0
- package/dist/verdict/run-report.js +53 -0
- package/dist/verdict/security.d.ts +60 -1
- package/dist/verdict/security.js +174 -12
- package/dist/verdict/verification-run.d.ts +713 -68
- package/dist/verdict/verification-run.js +113 -0
- package/dist/verdict/verify-progress.d.ts +6 -6
- package/dist/wire/constants/constants.d.ts +69 -155
- package/dist/wire/constants/constants.js +78 -159
- 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 +35 -1
- package/dist/wire/constants/event-types.js +33 -1
- package/dist/wire/constants/hud-controls.js +15 -5
- package/dist/wire/constants/hud-use.d.ts +33 -4
- package/dist/wire/constants/hud-use.js +30 -4
- package/dist/wire/constants/mcp-wire.d.ts +26 -0
- package/dist/wire/constants/mcp-wire.js +26 -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-chrome.d.ts +19 -0
- package/dist/wire/constants/reticle-chrome.js +19 -0
- package/dist/wire/constants/reticle-env.d.ts +138 -0
- package/dist/wire/constants/reticle-env.js +138 -0
- package/dist/wire/constants/session-constants.d.ts +26 -2
- package/dist/wire/constants/session-constants.js +26 -2
- package/dist/wire/desktop-contract.d.ts +8 -0
- package/dist/wire/desktop-contract.js +11 -0
- package/dist/wire/event-payloads.d.ts +202 -36
- package/dist/wire/event-payloads.js +100 -16
- package/dist/wire/messages.d.ts +193 -54
- package/dist/wire/messages.js +25 -1
- package/dist/wire/narrow.d.ts +6 -0
- package/dist/wire/narrow.js +26 -0
- package/dist/wire/next-step.d.ts +90 -0
- package/dist/wire/next-step.js +37 -0
- package/dist/wire/platform-link.d.ts +84 -0
- package/dist/wire/platform-link.js +57 -6
- 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 +138 -0
- package/dist/wire/production/production-policy.js +133 -0
- package/dist/wire/tool-names.d.ts +4 -0
- package/dist/wire/tool-names.js +4 -0
- package/dist/wire/types.d.ts +90 -52
- package/dist/wire/types.js +5 -0
- package/dist/words/notices.d.ts +1 -1
- package/dist/words/notices.js +1 -1
- package/dist/words/upgrade.js +1 -1
- package/dist/words/writing-rule.d.ts +14 -0
- package/dist/words/writing-rule.js +17 -0
- package/package.json +5 -1
|
@@ -6,6 +6,38 @@
|
|
|
6
6
|
* every new thing worth measuring lands in one of these two shapes.
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
+
/**
|
|
10
|
+
* The one-time advisories that point an agent at the platform and the Harness, by kind. Closed: a
|
|
11
|
+
* nudge whose kind is not listed here never reaches the wire.
|
|
12
|
+
*/
|
|
13
|
+
export const AgentNudgeKind = {
|
|
14
|
+
/** Unlinked, after the first verdict: `reticle connect` keeps it and lets the Harness test the app. */
|
|
15
|
+
CONNECT: 'connect',
|
|
16
|
+
/** An older build's "close the gaps" advisory. No longer sent: the Harness has no coverage gate. */
|
|
17
|
+
CLOSE_GAPS: 'close_gaps',
|
|
18
|
+
/** Linked, with the Harness off: the user can switch it on. */
|
|
19
|
+
SWITCH_ON: 'switch_on',
|
|
20
|
+
/** Harness on, and the agent is driving a long journey by hand: hand it to explore. */
|
|
21
|
+
EXPLORE: 'explore',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A coverage percent, in fifths. A bucket answers "how far from the gate" without an exact number
|
|
25
|
+
* that, beside the stack and the size, starts to describe one app.
|
|
26
|
+
*/
|
|
27
|
+
export const CoverageBucket = {
|
|
28
|
+
B0: '0-19',
|
|
29
|
+
B20: '20-39',
|
|
30
|
+
B40: '40-59',
|
|
31
|
+
B60: '60-79',
|
|
32
|
+
B80: '80-100',
|
|
33
|
+
};
|
|
34
|
+
const BUCKET_WIDTH = 20;
|
|
35
|
+
const BUCKETS = Object.values(CoverageBucket);
|
|
36
|
+
/** The bucket a 0..100 percent falls in. */
|
|
37
|
+
export function coverageBucketOf(percent) {
|
|
38
|
+
const index = Math.min(BUCKETS.length - 1, Math.max(0, Math.floor(percent / BUCKET_WIDTH)));
|
|
39
|
+
return BUCKETS[index] ?? CoverageBucket.B0;
|
|
40
|
+
}
|
|
9
41
|
/**
|
|
10
42
|
* One distinct error shape seen during a session, with the detail needed to fix it.
|
|
11
43
|
*
|
|
@@ -268,6 +300,17 @@ export const SessionSummarySchema = z.object({
|
|
|
268
300
|
* difference between a smooth install and one that needed a second step nobody documented.
|
|
269
301
|
*/
|
|
270
302
|
msToFirstApp: z.number().int().nonnegative().optional(),
|
|
303
|
+
/**
|
|
304
|
+
* The SDK version of the last page that connected to this daemon, from its HELLO. Our own
|
|
305
|
+
* release number, or `other`. Absent when no page announced one.
|
|
306
|
+
*/
|
|
307
|
+
sdkVersion: z.string().min(1).max(32).optional(),
|
|
308
|
+
/**
|
|
309
|
+
* Tool calls made before the first app connected. Session lifetime, like `appConnects`: read the
|
|
310
|
+
* last row, never sum. Absent when there were none. With `appConnects: 0`, it is an agent that
|
|
311
|
+
* worked against a daemon with no app, which sends no verdict and often no refusal.
|
|
312
|
+
*/
|
|
313
|
+
toolCallsBeforeApp: z.number().int().nonnegative().optional(),
|
|
271
314
|
/**
|
|
272
315
|
* What state the AGENT's work was in when the session ended. Absent on a periodic flush.
|
|
273
316
|
*
|
|
@@ -322,6 +365,15 @@ export const SessionSummarySchema = z.object({
|
|
|
322
365
|
* asked whether it worked is the finding, so absence and `false` must not look alike.
|
|
323
366
|
*/
|
|
324
367
|
endedWithVerdict: z.boolean().optional(),
|
|
368
|
+
/**
|
|
369
|
+
* Session totals, on the FINAL summary only. Every scalar counter above (`toolCalls`,
|
|
370
|
+
* `verifications`, `bugsFound`, ...) is windowed on EVERY event, the final one included, so the
|
|
371
|
+
* counts summed across a session's `session_progress` + `daemon_stopped` rows are the session's
|
|
372
|
+
* total. These are the same totals read off one row, under names a sum cannot pick up by mistake.
|
|
373
|
+
*/
|
|
374
|
+
lifetimeToolCalls: z.number().int().nonnegative().optional(),
|
|
375
|
+
lifetimeVerifications: z.number().int().nonnegative().optional(),
|
|
376
|
+
lifetimeBugsFound: z.number().int().nonnegative().optional(),
|
|
325
377
|
/**
|
|
326
378
|
* Was the update nudge actually delivered to an agent during this daemon run.
|
|
327
379
|
*
|
|
@@ -364,6 +416,19 @@ export const SessionSummarySchema = z.object({
|
|
|
364
416
|
hudSlides: z.record(z.number()).optional(),
|
|
365
417
|
hudJourney: z.array(z.string().max(64)).max(60).optional(),
|
|
366
418
|
hudJourneyCut: z.literal(true).optional(),
|
|
419
|
+
/**
|
|
420
|
+
* The one-time platform and Harness advisories an agent was shown, by kind (`AgentNudgeKind`).
|
|
421
|
+
* Whether a connect or an explore followed is read beside it: `cli_command_run` for `connect`, and
|
|
422
|
+
* `toolCounts` / `toolParams` for `reticle_verify`'s explore. Windowed; absent when none was shown.
|
|
423
|
+
*/
|
|
424
|
+
nudgesShown: z.record(z.nativeEnum(AgentNudgeKind), z.number().int().positive()).optional(),
|
|
425
|
+
/**
|
|
426
|
+
* Harness drives an older build refused for low coverage, by coverage bucket (`CoverageBucket`).
|
|
427
|
+
* No longer sent: the Harness has no coverage gate. Kept so an older daemon's events still parse.
|
|
428
|
+
*/
|
|
429
|
+
harnessRefusedCoverage: z
|
|
430
|
+
.record(z.nativeEnum(CoverageBucket), z.number().int().positive())
|
|
431
|
+
.optional(),
|
|
367
432
|
/** Was this a clean shutdown, or a periodic flush of a still-running session? */
|
|
368
433
|
final: z.boolean(),
|
|
369
434
|
/**
|
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The product signals the event set could not answer: who is signed in, which workspace and which
|
|
3
|
+
* agent client an event belongs to, which HUD page was opened, which sign-in prompts were seen, when a
|
|
4
|
+
* project was linked, how a Harness run started and ended, and what happened to the MCP proxy and
|
|
5
|
+
* its daemon when the link failed.
|
|
6
|
+
*
|
|
7
|
+
* Its own file so the vocabulary has one home and `telemetry.ts` only wires it in. Every value here is
|
|
8
|
+
* a closed set, a boolean or a bucket: none of these fields can carry a URL, a path, a name or text.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* Where this machine stands with the platform, on every event. `linked` implies signed in OR an
|
|
13
|
+
* api key in the environment: a project with a working link reports to a workspace either way.
|
|
14
|
+
*/
|
|
15
|
+
export declare const TelemetryAccountState: {
|
|
16
|
+
readonly SIGNED_OUT: "signed_out";
|
|
17
|
+
readonly SIGNED_IN: "signed_in";
|
|
18
|
+
readonly LINKED: "linked";
|
|
19
|
+
};
|
|
20
|
+
export type TelemetryAccountState = (typeof TelemetryAccountState)[keyof typeof TelemetryAccountState];
|
|
21
|
+
/**
|
|
22
|
+
* Which coding agent an event came from, normalised from the MCP handshake's `clientInfo.name`, else
|
|
23
|
+
* from a marker the agent sets in the environment of what it spawns. `other` is a client that named
|
|
24
|
+
* itself and is not on this list; absent means nothing said.
|
|
25
|
+
*/
|
|
26
|
+
export declare const AgentClient: {
|
|
27
|
+
readonly CLAUDE_CODE: "claude_code";
|
|
28
|
+
readonly CLAUDE_DESKTOP: "claude_desktop";
|
|
29
|
+
readonly CODEX: "codex";
|
|
30
|
+
readonly CURSOR: "cursor";
|
|
31
|
+
readonly GEMINI_CLI: "gemini_cli";
|
|
32
|
+
readonly ANTIGRAVITY: "antigravity";
|
|
33
|
+
readonly WINDSURF: "windsurf";
|
|
34
|
+
readonly CLINE: "cline";
|
|
35
|
+
readonly OPENCODE: "opencode";
|
|
36
|
+
readonly ZED: "zed";
|
|
37
|
+
readonly VSCODE: "vscode";
|
|
38
|
+
readonly OTHER: "other";
|
|
39
|
+
};
|
|
40
|
+
export type AgentClient = (typeof AgentClient)[keyof typeof AgentClient];
|
|
41
|
+
/**
|
|
42
|
+
* How the running `reticle` was launched, read from where its own entry script sits: an npx cache,
|
|
43
|
+
* a global install, or a project's `node_modules`. Only the bucket leaves the machine, never the path.
|
|
44
|
+
* It is not the install CHANNEL (`installSource`): every channel can end in any of these.
|
|
45
|
+
*/
|
|
46
|
+
export declare const LaunchMethod: {
|
|
47
|
+
readonly NPX: "npx";
|
|
48
|
+
readonly GLOBAL: "global";
|
|
49
|
+
readonly PROJECT: "project";
|
|
50
|
+
readonly OTHER: "other";
|
|
51
|
+
};
|
|
52
|
+
export type LaunchMethod = (typeof LaunchMethod)[keyof typeof LaunchMethod];
|
|
53
|
+
/** A count, bucketed: an exact number of tabs or journeys starts to describe one app. */
|
|
54
|
+
export declare const CountBucket: {
|
|
55
|
+
readonly ZERO: "0";
|
|
56
|
+
readonly ONE: "1";
|
|
57
|
+
readonly TWO_THREE: "2-3";
|
|
58
|
+
readonly FOUR_NINE: "4-9";
|
|
59
|
+
readonly TEN_PLUS: "10+";
|
|
60
|
+
};
|
|
61
|
+
export type CountBucket = (typeof CountBucket)[keyof typeof CountBucket];
|
|
62
|
+
export declare function countBucket(n: number): CountBucket;
|
|
63
|
+
/** `hud_viewed` / `hud_signin_prompted`: which page or prompt, and how many tabs had a HUD. */
|
|
64
|
+
export declare const HudEventSchema: z.ZodObject<{
|
|
65
|
+
view: z.ZodOptional<z.ZodNativeEnum<{
|
|
66
|
+
readonly CHAT: "chat";
|
|
67
|
+
readonly FLOWS: "flows";
|
|
68
|
+
readonly NOTES: "notes";
|
|
69
|
+
readonly HARNESS: "harness";
|
|
70
|
+
readonly SETTINGS: "settings";
|
|
71
|
+
readonly REPORT: "report";
|
|
72
|
+
readonly ACCOUNT: "account";
|
|
73
|
+
readonly NONE: "none";
|
|
74
|
+
}>>;
|
|
75
|
+
surface: z.ZodOptional<z.ZodNativeEnum<{
|
|
76
|
+
readonly RAIL: "rail";
|
|
77
|
+
readonly HARNESS: "harness";
|
|
78
|
+
readonly HEADER: "header";
|
|
79
|
+
}>>;
|
|
80
|
+
tabs: z.ZodOptional<z.ZodNativeEnum<{
|
|
81
|
+
readonly ZERO: "0";
|
|
82
|
+
readonly ONE: "1";
|
|
83
|
+
readonly TWO_THREE: "2-3";
|
|
84
|
+
readonly FOUR_NINE: "4-9";
|
|
85
|
+
readonly TEN_PLUS: "10+";
|
|
86
|
+
}>>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>;
|
|
96
|
+
export type HudEvent = z.infer<typeof HudEventSchema>;
|
|
97
|
+
/** How a project got linked to a workspace on this machine. */
|
|
98
|
+
export declare const PlatformLinkVia: {
|
|
99
|
+
/** `reticle connect`: sign in, link and sync in one command. */
|
|
100
|
+
readonly CONNECT: "connect";
|
|
101
|
+
/** The HUD's "Link this project" / "Save runs for your team". */
|
|
102
|
+
readonly HUD: "hud";
|
|
103
|
+
/** A bare `reticle link`. */
|
|
104
|
+
readonly LINK: "link";
|
|
105
|
+
};
|
|
106
|
+
export type PlatformLinkVia = (typeof PlatformLinkVia)[keyof typeof PlatformLinkVia];
|
|
107
|
+
export declare const PlatformLinkSchema: z.ZodObject<{
|
|
108
|
+
via: z.ZodNativeEnum<{
|
|
109
|
+
/** `reticle connect`: sign in, link and sync in one command. */
|
|
110
|
+
readonly CONNECT: "connect";
|
|
111
|
+
/** The HUD's "Link this project" / "Save runs for your team". */
|
|
112
|
+
readonly HUD: "hud";
|
|
113
|
+
/** A bare `reticle link`. */
|
|
114
|
+
readonly LINK: "link";
|
|
115
|
+
}>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
via: "link" | "hud" | "connect";
|
|
118
|
+
}, {
|
|
119
|
+
via: "link" | "hud" | "connect";
|
|
120
|
+
}>;
|
|
121
|
+
export type PlatformLink = z.infer<typeof PlatformLinkSchema>;
|
|
122
|
+
export declare const HarnessRunPhase: {
|
|
123
|
+
readonly STARTED: "started";
|
|
124
|
+
readonly COMPLETED: "completed";
|
|
125
|
+
};
|
|
126
|
+
export type HarnessRunPhase = (typeof HarnessRunPhase)[keyof typeof HarnessRunPhase];
|
|
127
|
+
/** How a Harness run ended. `blocked` is a refusal before it drove (gate, credits, switched off). */
|
|
128
|
+
export declare const HarnessRunOutcome: {
|
|
129
|
+
readonly PROVED: "proved";
|
|
130
|
+
readonly NOT_PROVED: "not_proved";
|
|
131
|
+
readonly FAILED: "failed";
|
|
132
|
+
readonly BLOCKED: "blocked";
|
|
133
|
+
readonly STOPPED: "stopped";
|
|
134
|
+
};
|
|
135
|
+
export type HarnessRunOutcome = (typeof HarnessRunOutcome)[keyof typeof HarnessRunOutcome];
|
|
136
|
+
/**
|
|
137
|
+
* Why a Harness run did not drive: only on a `blocked` or `failed` run. Closed, and read off the
|
|
138
|
+
* refusal that stopped it, never off its sentence, so a reworded message cannot change the count.
|
|
139
|
+
*/
|
|
140
|
+
export declare const HarnessRunReason: {
|
|
141
|
+
/** The project has no platform link, so there is nowhere to drive from. */
|
|
142
|
+
readonly NOT_LINKED: "not_linked";
|
|
143
|
+
/** The platform did not confirm the drive in time, or answered something unreadable. */
|
|
144
|
+
readonly PLATFORM_UNREACHABLE: "platform_unreachable";
|
|
145
|
+
/** The Harness is switched off for this project (the default until somebody turns it on). */
|
|
146
|
+
readonly HARNESS_OFF: "harness_off";
|
|
147
|
+
/** The workspace has no credits left. */
|
|
148
|
+
readonly NO_CREDITS: "no_credits";
|
|
149
|
+
/** The workspace has not claimed the Harness. */
|
|
150
|
+
readonly NOT_ENTITLED: "not_entitled";
|
|
151
|
+
/** An older build refused for low instrumentation. No longer sent: the Harness has no coverage gate. */
|
|
152
|
+
readonly COVERAGE_GATE: "coverage_gate";
|
|
153
|
+
/** The page and the daemon come from different builds, so every step would answer unknown. */
|
|
154
|
+
readonly VERSION_SKEW: "version_skew";
|
|
155
|
+
/** The drive started and broke. */
|
|
156
|
+
readonly BROKEN: "broken";
|
|
157
|
+
/** A refusal this list does not name. A growing count here is a gap in this list. */
|
|
158
|
+
readonly OTHER: "other";
|
|
159
|
+
};
|
|
160
|
+
export type HarnessRunReason = (typeof HarnessRunReason)[keyof typeof HarnessRunReason];
|
|
161
|
+
/** Who started a Harness run. `dashboard` is a run started from the platform's chat. */
|
|
162
|
+
export declare const HarnessRunSource: {
|
|
163
|
+
readonly AGENT: "agent";
|
|
164
|
+
readonly HUD: "hud";
|
|
165
|
+
readonly DASHBOARD: "dashboard";
|
|
166
|
+
readonly CLI_TRY: "cli_try";
|
|
167
|
+
readonly PLAN: "plan";
|
|
168
|
+
};
|
|
169
|
+
export type HarnessRunSource = (typeof HarnessRunSource)[keyof typeof HarnessRunSource];
|
|
170
|
+
/** `harness_run`: one `started` and one `completed` per run. */
|
|
171
|
+
export declare const HarnessRunSchema: z.ZodObject<{
|
|
172
|
+
phase: z.ZodNativeEnum<{
|
|
173
|
+
readonly STARTED: "started";
|
|
174
|
+
readonly COMPLETED: "completed";
|
|
175
|
+
}>;
|
|
176
|
+
source: z.ZodNativeEnum<{
|
|
177
|
+
readonly AGENT: "agent";
|
|
178
|
+
readonly HUD: "hud";
|
|
179
|
+
readonly DASHBOARD: "dashboard";
|
|
180
|
+
readonly CLI_TRY: "cli_try";
|
|
181
|
+
readonly PLAN: "plan";
|
|
182
|
+
}>;
|
|
183
|
+
/** The run drives on the platform (always, today), as opposed to an injected local driver. */
|
|
184
|
+
hosted: z.ZodBoolean;
|
|
185
|
+
/** Only on `completed`. */
|
|
186
|
+
outcome: z.ZodOptional<z.ZodNativeEnum<{
|
|
187
|
+
readonly PROVED: "proved";
|
|
188
|
+
readonly NOT_PROVED: "not_proved";
|
|
189
|
+
readonly FAILED: "failed";
|
|
190
|
+
readonly BLOCKED: "blocked";
|
|
191
|
+
readonly STOPPED: "stopped";
|
|
192
|
+
}>>;
|
|
193
|
+
/** Only on `completed`: journeys the run answered, and how many of those replayed with no model. */
|
|
194
|
+
journeys: z.ZodOptional<z.ZodNativeEnum<{
|
|
195
|
+
readonly ZERO: "0";
|
|
196
|
+
readonly ONE: "1";
|
|
197
|
+
readonly TWO_THREE: "2-3";
|
|
198
|
+
readonly FOUR_NINE: "4-9";
|
|
199
|
+
readonly TEN_PLUS: "10+";
|
|
200
|
+
}>>;
|
|
201
|
+
replayed: z.ZodOptional<z.ZodNativeEnum<{
|
|
202
|
+
readonly ZERO: "0";
|
|
203
|
+
readonly ONE: "1";
|
|
204
|
+
readonly TWO_THREE: "2-3";
|
|
205
|
+
readonly FOUR_NINE: "4-9";
|
|
206
|
+
readonly TEN_PLUS: "10+";
|
|
207
|
+
}>>;
|
|
208
|
+
/** Only on a `blocked` or `failed` run: why it did not drive. */
|
|
209
|
+
reason: z.ZodOptional<z.ZodNativeEnum<{
|
|
210
|
+
/** The project has no platform link, so there is nowhere to drive from. */
|
|
211
|
+
readonly NOT_LINKED: "not_linked";
|
|
212
|
+
/** The platform did not confirm the drive in time, or answered something unreadable. */
|
|
213
|
+
readonly PLATFORM_UNREACHABLE: "platform_unreachable";
|
|
214
|
+
/** The Harness is switched off for this project (the default until somebody turns it on). */
|
|
215
|
+
readonly HARNESS_OFF: "harness_off";
|
|
216
|
+
/** The workspace has no credits left. */
|
|
217
|
+
readonly NO_CREDITS: "no_credits";
|
|
218
|
+
/** The workspace has not claimed the Harness. */
|
|
219
|
+
readonly NOT_ENTITLED: "not_entitled";
|
|
220
|
+
/** An older build refused for low instrumentation. No longer sent: the Harness has no coverage gate. */
|
|
221
|
+
readonly COVERAGE_GATE: "coverage_gate";
|
|
222
|
+
/** The page and the daemon come from different builds, so every step would answer unknown. */
|
|
223
|
+
readonly VERSION_SKEW: "version_skew";
|
|
224
|
+
/** The drive started and broke. */
|
|
225
|
+
readonly BROKEN: "broken";
|
|
226
|
+
/** A refusal this list does not name. A growing count here is a gap in this list. */
|
|
227
|
+
readonly OTHER: "other";
|
|
228
|
+
}>>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>;
|
|
246
|
+
export type HarnessRun = z.infer<typeof HarnessRunSchema>;
|
|
247
|
+
/**
|
|
248
|
+
* The envelope fields and blocks this file adds to `TelemetryEventSchema`, spread into it there.
|
|
249
|
+
* Every one optional: an older sender has none of them.
|
|
250
|
+
*/
|
|
251
|
+
export declare const SIGNAL_FIELDS: {
|
|
252
|
+
/** Signed out, signed in, or signed in AND this project linked to a workspace. */
|
|
253
|
+
accountState: z.ZodOptional<z.ZodNativeEnum<{
|
|
254
|
+
readonly SIGNED_OUT: "signed_out";
|
|
255
|
+
readonly SIGNED_IN: "signed_in";
|
|
256
|
+
readonly LINKED: "linked";
|
|
257
|
+
}>>;
|
|
258
|
+
/** This project reports to a workspace. */
|
|
259
|
+
linked: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
+
/**
|
|
261
|
+
* The platform's id for the linked workspace (`orgId` in `.reticle/cloud.json`): a pseudonymous
|
|
262
|
+
* key the platform joins its own records on. Never the workspace NAME, never an email.
|
|
263
|
+
*/
|
|
264
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
265
|
+
/** Which coding agent this event came from, normalised. Absent when nothing said. */
|
|
266
|
+
client: z.ZodOptional<z.ZodNativeEnum<{
|
|
267
|
+
readonly CLAUDE_CODE: "claude_code";
|
|
268
|
+
readonly CLAUDE_DESKTOP: "claude_desktop";
|
|
269
|
+
readonly CODEX: "codex";
|
|
270
|
+
readonly CURSOR: "cursor";
|
|
271
|
+
readonly GEMINI_CLI: "gemini_cli";
|
|
272
|
+
readonly ANTIGRAVITY: "antigravity";
|
|
273
|
+
readonly WINDSURF: "windsurf";
|
|
274
|
+
readonly CLINE: "cline";
|
|
275
|
+
readonly OPENCODE: "opencode";
|
|
276
|
+
readonly ZED: "zed";
|
|
277
|
+
readonly VSCODE: "vscode";
|
|
278
|
+
readonly OTHER: "other";
|
|
279
|
+
}>>;
|
|
280
|
+
/** How the running `reticle` was launched. */
|
|
281
|
+
launch: z.ZodOptional<z.ZodNativeEnum<{
|
|
282
|
+
readonly NPX: "npx";
|
|
283
|
+
readonly GLOBAL: "global";
|
|
284
|
+
readonly PROJECT: "project";
|
|
285
|
+
readonly OTHER: "other";
|
|
286
|
+
}>>;
|
|
287
|
+
/** Only on `hud_viewed` / `hud_signin_prompted`. */
|
|
288
|
+
hud: z.ZodOptional<z.ZodObject<{
|
|
289
|
+
view: z.ZodOptional<z.ZodNativeEnum<{
|
|
290
|
+
readonly CHAT: "chat";
|
|
291
|
+
readonly FLOWS: "flows";
|
|
292
|
+
readonly NOTES: "notes";
|
|
293
|
+
readonly HARNESS: "harness";
|
|
294
|
+
readonly SETTINGS: "settings";
|
|
295
|
+
readonly REPORT: "report";
|
|
296
|
+
readonly ACCOUNT: "account";
|
|
297
|
+
readonly NONE: "none";
|
|
298
|
+
}>>;
|
|
299
|
+
surface: z.ZodOptional<z.ZodNativeEnum<{
|
|
300
|
+
readonly RAIL: "rail";
|
|
301
|
+
readonly HARNESS: "harness";
|
|
302
|
+
readonly HEADER: "header";
|
|
303
|
+
}>>;
|
|
304
|
+
tabs: z.ZodOptional<z.ZodNativeEnum<{
|
|
305
|
+
readonly ZERO: "0";
|
|
306
|
+
readonly ONE: "1";
|
|
307
|
+
readonly TWO_THREE: "2-3";
|
|
308
|
+
readonly FOUR_NINE: "4-9";
|
|
309
|
+
readonly TEN_PLUS: "10+";
|
|
310
|
+
}>>;
|
|
311
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>>;
|
|
320
|
+
/** Only on `platform_linked`. */
|
|
321
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
322
|
+
via: z.ZodNativeEnum<{
|
|
323
|
+
/** `reticle connect`: sign in, link and sync in one command. */
|
|
324
|
+
readonly CONNECT: "connect";
|
|
325
|
+
/** The HUD's "Link this project" / "Save runs for your team". */
|
|
326
|
+
readonly HUD: "hud";
|
|
327
|
+
/** A bare `reticle link`. */
|
|
328
|
+
readonly LINK: "link";
|
|
329
|
+
}>;
|
|
330
|
+
}, "strip", z.ZodTypeAny, {
|
|
331
|
+
via: "link" | "hud" | "connect";
|
|
332
|
+
}, {
|
|
333
|
+
via: "link" | "hud" | "connect";
|
|
334
|
+
}>>;
|
|
335
|
+
/** Only on `harness_run`. */
|
|
336
|
+
harness: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
phase: z.ZodNativeEnum<{
|
|
338
|
+
readonly STARTED: "started";
|
|
339
|
+
readonly COMPLETED: "completed";
|
|
340
|
+
}>;
|
|
341
|
+
source: z.ZodNativeEnum<{
|
|
342
|
+
readonly AGENT: "agent";
|
|
343
|
+
readonly HUD: "hud";
|
|
344
|
+
readonly DASHBOARD: "dashboard";
|
|
345
|
+
readonly CLI_TRY: "cli_try";
|
|
346
|
+
readonly PLAN: "plan";
|
|
347
|
+
}>;
|
|
348
|
+
/** The run drives on the platform (always, today), as opposed to an injected local driver. */
|
|
349
|
+
hosted: z.ZodBoolean;
|
|
350
|
+
/** Only on `completed`. */
|
|
351
|
+
outcome: z.ZodOptional<z.ZodNativeEnum<{
|
|
352
|
+
readonly PROVED: "proved";
|
|
353
|
+
readonly NOT_PROVED: "not_proved";
|
|
354
|
+
readonly FAILED: "failed";
|
|
355
|
+
readonly BLOCKED: "blocked";
|
|
356
|
+
readonly STOPPED: "stopped";
|
|
357
|
+
}>>;
|
|
358
|
+
/** Only on `completed`: journeys the run answered, and how many of those replayed with no model. */
|
|
359
|
+
journeys: z.ZodOptional<z.ZodNativeEnum<{
|
|
360
|
+
readonly ZERO: "0";
|
|
361
|
+
readonly ONE: "1";
|
|
362
|
+
readonly TWO_THREE: "2-3";
|
|
363
|
+
readonly FOUR_NINE: "4-9";
|
|
364
|
+
readonly TEN_PLUS: "10+";
|
|
365
|
+
}>>;
|
|
366
|
+
replayed: z.ZodOptional<z.ZodNativeEnum<{
|
|
367
|
+
readonly ZERO: "0";
|
|
368
|
+
readonly ONE: "1";
|
|
369
|
+
readonly TWO_THREE: "2-3";
|
|
370
|
+
readonly FOUR_NINE: "4-9";
|
|
371
|
+
readonly TEN_PLUS: "10+";
|
|
372
|
+
}>>;
|
|
373
|
+
/** Only on a `blocked` or `failed` run: why it did not drive. */
|
|
374
|
+
reason: z.ZodOptional<z.ZodNativeEnum<{
|
|
375
|
+
/** The project has no platform link, so there is nowhere to drive from. */
|
|
376
|
+
readonly NOT_LINKED: "not_linked";
|
|
377
|
+
/** The platform did not confirm the drive in time, or answered something unreadable. */
|
|
378
|
+
readonly PLATFORM_UNREACHABLE: "platform_unreachable";
|
|
379
|
+
/** The Harness is switched off for this project (the default until somebody turns it on). */
|
|
380
|
+
readonly HARNESS_OFF: "harness_off";
|
|
381
|
+
/** The workspace has no credits left. */
|
|
382
|
+
readonly NO_CREDITS: "no_credits";
|
|
383
|
+
/** The workspace has not claimed the Harness. */
|
|
384
|
+
readonly NOT_ENTITLED: "not_entitled";
|
|
385
|
+
/** An older build refused for low instrumentation. No longer sent: the Harness has no coverage gate. */
|
|
386
|
+
readonly COVERAGE_GATE: "coverage_gate";
|
|
387
|
+
/** The page and the daemon come from different builds, so every step would answer unknown. */
|
|
388
|
+
readonly VERSION_SKEW: "version_skew";
|
|
389
|
+
/** The drive started and broke. */
|
|
390
|
+
readonly BROKEN: "broken";
|
|
391
|
+
/** A refusal this list does not name. A growing count here is a gap in this list. */
|
|
392
|
+
readonly OTHER: "other";
|
|
393
|
+
}>>;
|
|
394
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>>;
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* The socket error code behind a drop, as a closed set. Anything else reports `other`, so a new code
|
|
414
|
+
* cannot put free text on the wire.
|
|
415
|
+
*/
|
|
416
|
+
export declare const OutageErrCode: {
|
|
417
|
+
readonly ECONNRESET: "ECONNRESET";
|
|
418
|
+
readonly ECONNREFUSED: "ECONNREFUSED";
|
|
419
|
+
readonly EPIPE: "EPIPE";
|
|
420
|
+
readonly ETIMEDOUT: "ETIMEDOUT";
|
|
421
|
+
readonly OTHER: "other";
|
|
422
|
+
};
|
|
423
|
+
export type OutageErrCode = (typeof OutageErrCode)[keyof typeof OutageErrCode];
|
|
424
|
+
/** Why the MCP proxy process left. Each member names one exit path in the proxy. */
|
|
425
|
+
export declare const ProxyExitReason: {
|
|
426
|
+
/** The client closed stdin. The normal end of a session. */
|
|
427
|
+
readonly STDIN_END: "stdin_end";
|
|
428
|
+
/** The client link was quiet for the idle window, with no work in flight. */
|
|
429
|
+
readonly IDLE: "idle";
|
|
430
|
+
/** Too many client-pipe disconnects since the last usable session: the client is gone. */
|
|
431
|
+
readonly CLIENT_GONE_STORM: "client_gone_storm";
|
|
432
|
+
/** The proxy could not start a daemon and had no way to continue. */
|
|
433
|
+
readonly WAKE_FAILED: "wake_failed";
|
|
434
|
+
};
|
|
435
|
+
export type ProxyExitReason = (typeof ProxyExitReason)[keyof typeof ProxyExitReason];
|
|
436
|
+
/** `mcp_proxy_exited`: the agent's MCP server process ended, and the agent lost its tools. */
|
|
437
|
+
export declare const ProxyExitSchema: z.ZodObject<{
|
|
438
|
+
reason: z.ZodNativeEnum<{
|
|
439
|
+
/** The client closed stdin. The normal end of a session. */
|
|
440
|
+
readonly STDIN_END: "stdin_end";
|
|
441
|
+
/** The client link was quiet for the idle window, with no work in flight. */
|
|
442
|
+
readonly IDLE: "idle";
|
|
443
|
+
/** Too many client-pipe disconnects since the last usable session: the client is gone. */
|
|
444
|
+
readonly CLIENT_GONE_STORM: "client_gone_storm";
|
|
445
|
+
/** The proxy could not start a daemon and had no way to continue. */
|
|
446
|
+
readonly WAKE_FAILED: "wake_failed";
|
|
447
|
+
}>;
|
|
448
|
+
/** How long the proxy process ran. */
|
|
449
|
+
uptimeMs: z.ZodNumber;
|
|
450
|
+
/** How many times the proxy lost its daemon stream in its life. */
|
|
451
|
+
drops: z.ZodNumber;
|
|
452
|
+
/** How many `tools/call` requests the client sent through this proxy. */
|
|
453
|
+
toolCalls: z.ZodNumber;
|
|
454
|
+
proxyId: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>;
|
|
468
|
+
export type ProxyExit = z.infer<typeof ProxyExitSchema>;
|
|
469
|
+
/** `daemon_died_unclean`: a daemon start found the pidfile of a daemon that never stopped cleanly. */
|
|
470
|
+
export declare const DaemonDeathSchema: z.ZodObject<{
|
|
471
|
+
/** Time from the dead daemon's start (its pidfile write) to this discovery. */
|
|
472
|
+
ageMs: z.ZodNumber;
|
|
473
|
+
}, "strip", z.ZodTypeAny, {
|
|
474
|
+
ageMs: number;
|
|
475
|
+
}, {
|
|
476
|
+
ageMs: number;
|
|
477
|
+
}>;
|
|
478
|
+
export type DaemonDeath = z.infer<typeof DaemonDeathSchema>;
|
|
479
|
+
/** What held the port when a wake was refused. */
|
|
480
|
+
export declare const WakeRefusalPresence: {
|
|
481
|
+
/** Something that is not a Reticle daemon holds the port. */
|
|
482
|
+
readonly FOREIGN: "foreign";
|
|
483
|
+
/** A Reticle daemon for a different project holds the port. */
|
|
484
|
+
readonly OTHER_PROJECT: "other_project";
|
|
485
|
+
};
|
|
486
|
+
export type WakeRefusalPresence = (typeof WakeRefusalPresence)[keyof typeof WakeRefusalPresence];
|
|
487
|
+
/** `wake_refused`: the proxy would not use the daemon port it found. */
|
|
488
|
+
export declare const WakeRefusalSchema: z.ZodObject<{
|
|
489
|
+
presence: z.ZodNativeEnum<{
|
|
490
|
+
/** Something that is not a Reticle daemon holds the port. */
|
|
491
|
+
readonly FOREIGN: "foreign";
|
|
492
|
+
/** A Reticle daemon for a different project holds the port. */
|
|
493
|
+
readonly OTHER_PROJECT: "other_project";
|
|
494
|
+
}>;
|
|
495
|
+
}, "strip", z.ZodTypeAny, {
|
|
496
|
+
presence: "foreign" | "other_project";
|
|
497
|
+
}, {
|
|
498
|
+
presence: "foreign" | "other_project";
|
|
499
|
+
}>;
|
|
500
|
+
export type WakeRefusal = z.infer<typeof WakeRefusalSchema>;
|
|
501
|
+
/** The blocks this file adds to `TelemetryEventSchema`, spread into it there. */
|
|
502
|
+
export declare const TRANSPORT_FIELDS: {
|
|
503
|
+
/** Only on `mcp_proxy_exited`. */
|
|
504
|
+
proxyExit: z.ZodOptional<z.ZodObject<{
|
|
505
|
+
reason: z.ZodNativeEnum<{
|
|
506
|
+
/** The client closed stdin. The normal end of a session. */
|
|
507
|
+
readonly STDIN_END: "stdin_end";
|
|
508
|
+
/** The client link was quiet for the idle window, with no work in flight. */
|
|
509
|
+
readonly IDLE: "idle";
|
|
510
|
+
/** Too many client-pipe disconnects since the last usable session: the client is gone. */
|
|
511
|
+
readonly CLIENT_GONE_STORM: "client_gone_storm";
|
|
512
|
+
/** The proxy could not start a daemon and had no way to continue. */
|
|
513
|
+
readonly WAKE_FAILED: "wake_failed";
|
|
514
|
+
}>;
|
|
515
|
+
/** How long the proxy process ran. */
|
|
516
|
+
uptimeMs: z.ZodNumber;
|
|
517
|
+
/** How many times the proxy lost its daemon stream in its life. */
|
|
518
|
+
drops: z.ZodNumber;
|
|
519
|
+
/** How many `tools/call` requests the client sent through this proxy. */
|
|
520
|
+
toolCalls: z.ZodNumber;
|
|
521
|
+
proxyId: z.ZodOptional<z.ZodString>;
|
|
522
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
}>>;
|
|
535
|
+
/** Only on `daemon_died_unclean`. */
|
|
536
|
+
daemonDeath: z.ZodOptional<z.ZodObject<{
|
|
537
|
+
/** Time from the dead daemon's start (its pidfile write) to this discovery. */
|
|
538
|
+
ageMs: z.ZodNumber;
|
|
539
|
+
}, "strip", z.ZodTypeAny, {
|
|
540
|
+
ageMs: number;
|
|
541
|
+
}, {
|
|
542
|
+
ageMs: number;
|
|
543
|
+
}>>;
|
|
544
|
+
/** Only on `wake_refused`. */
|
|
545
|
+
wakeRefusal: z.ZodOptional<z.ZodObject<{
|
|
546
|
+
presence: z.ZodNativeEnum<{
|
|
547
|
+
/** Something that is not a Reticle daemon holds the port. */
|
|
548
|
+
readonly FOREIGN: "foreign";
|
|
549
|
+
/** A Reticle daemon for a different project holds the port. */
|
|
550
|
+
readonly OTHER_PROJECT: "other_project";
|
|
551
|
+
}>;
|
|
552
|
+
}, "strip", z.ZodTypeAny, {
|
|
553
|
+
presence: "foreign" | "other_project";
|
|
554
|
+
}, {
|
|
555
|
+
presence: "foreign" | "other_project";
|
|
556
|
+
}>>;
|
|
557
|
+
};
|