/** * The product signals the event set could not answer: who is signed in, which workspace and which * agent client an event belongs to, which HUD page was opened, which sign-in prompts were seen, when a * project was linked, and how a Harness run started and ended. * * Its own file so the vocabulary has one home and `telemetry.ts` only wires it in. Every value here is * a closed set, a boolean or a bucket: none of these fields can carry a URL, a path, a name or text. */ import { z } from 'zod'; /** * Where this machine stands with the platform, on every event. `linked` implies signed in OR an * api key in the environment: a project with a working link reports to a workspace either way. */ export declare const TelemetryAccountState: { readonly SIGNED_OUT: "signed_out"; readonly SIGNED_IN: "signed_in"; readonly LINKED: "linked"; }; export type TelemetryAccountState = (typeof TelemetryAccountState)[keyof typeof TelemetryAccountState]; /** * Which coding agent an event came from, normalised from the MCP handshake's `clientInfo.name`, else * from a marker the agent sets in the environment of what it spawns. `other` is a client that named * itself and is not on this list; absent means nothing said. */ export declare const AgentClient: { readonly CLAUDE_CODE: "claude_code"; readonly CLAUDE_DESKTOP: "claude_desktop"; readonly CODEX: "codex"; readonly CURSOR: "cursor"; readonly GEMINI_CLI: "gemini_cli"; readonly ANTIGRAVITY: "antigravity"; readonly WINDSURF: "windsurf"; readonly CLINE: "cline"; readonly OPENCODE: "opencode"; readonly ZED: "zed"; readonly VSCODE: "vscode"; readonly OTHER: "other"; }; export type AgentClient = (typeof AgentClient)[keyof typeof AgentClient]; /** * How the running `reticle` was launched, read from where its own entry script sits: an npx cache, * a global install, or a project's `node_modules`. Only the bucket leaves the machine, never the path. * It is not the install CHANNEL (`installSource`): every channel can end in any of these. */ export declare const LaunchMethod: { readonly NPX: "npx"; readonly GLOBAL: "global"; readonly PROJECT: "project"; readonly OTHER: "other"; }; export type LaunchMethod = (typeof LaunchMethod)[keyof typeof LaunchMethod]; /** A count, bucketed: an exact number of tabs or journeys starts to describe one app. */ export declare const CountBucket: { readonly ZERO: "0"; readonly ONE: "1"; readonly TWO_THREE: "2-3"; readonly FOUR_NINE: "4-9"; readonly TEN_PLUS: "10+"; }; export type CountBucket = (typeof CountBucket)[keyof typeof CountBucket]; export declare function countBucket(n: number): CountBucket; /** `hud_viewed` / `hud_signin_prompted`: which page or prompt, and how many tabs had a HUD. */ export declare const HudEventSchema: z.ZodObject<{ view: z.ZodOptional>; surface: z.ZodOptional>; tabs: z.ZodOptional>; }, "strip", z.ZodTypeAny, { surface?: "harness" | "rail" | "header" | undefined; view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined; tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }, { surface?: "harness" | "rail" | "header" | undefined; view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined; tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }>; export type HudEvent = z.infer; /** How a project got linked to a workspace on this machine. */ export declare const PlatformLinkVia: { /** `reticle connect`: sign in, link and sync in one command. */ readonly CONNECT: "connect"; /** The HUD's "Link this project" / "Save runs for your team". */ readonly HUD: "hud"; /** A bare `reticle link`. */ readonly LINK: "link"; }; export type PlatformLinkVia = (typeof PlatformLinkVia)[keyof typeof PlatformLinkVia]; export declare const PlatformLinkSchema: z.ZodObject<{ via: z.ZodNativeEnum<{ /** `reticle connect`: sign in, link and sync in one command. */ readonly CONNECT: "connect"; /** The HUD's "Link this project" / "Save runs for your team". */ readonly HUD: "hud"; /** A bare `reticle link`. */ readonly LINK: "link"; }>; }, "strip", z.ZodTypeAny, { via: "hud" | "link" | "connect"; }, { via: "hud" | "link" | "connect"; }>; export type PlatformLink = z.infer; export declare const HarnessRunPhase: { readonly STARTED: "started"; readonly COMPLETED: "completed"; }; export type HarnessRunPhase = (typeof HarnessRunPhase)[keyof typeof HarnessRunPhase]; /** How a Harness run ended. `blocked` is a refusal before it drove (gate, credits, switched off). */ export declare const HarnessRunOutcome: { readonly PROVED: "proved"; readonly NOT_PROVED: "not_proved"; readonly FAILED: "failed"; readonly BLOCKED: "blocked"; readonly STOPPED: "stopped"; }; export type HarnessRunOutcome = (typeof HarnessRunOutcome)[keyof typeof HarnessRunOutcome]; /** Who started a Harness run. `dashboard` is a run started from the platform's chat. */ export declare const HarnessRunSource: { readonly AGENT: "agent"; readonly HUD: "hud"; readonly DASHBOARD: "dashboard"; readonly CLI_TRY: "cli_try"; readonly PLAN: "plan"; }; export type HarnessRunSource = (typeof HarnessRunSource)[keyof typeof HarnessRunSource]; /** `harness_run`: one `started` and one `completed` per run. */ export declare const HarnessRunSchema: z.ZodObject<{ phase: z.ZodNativeEnum<{ readonly STARTED: "started"; readonly COMPLETED: "completed"; }>; source: z.ZodNativeEnum<{ readonly AGENT: "agent"; readonly HUD: "hud"; readonly DASHBOARD: "dashboard"; readonly CLI_TRY: "cli_try"; readonly PLAN: "plan"; }>; /** The run drives on the platform (always, today), as opposed to an injected local driver. */ hosted: z.ZodBoolean; /** Only on `completed`. */ outcome: z.ZodOptional>; /** Only on `completed`: journeys the run answered, and how many of those replayed with no model. */ journeys: z.ZodOptional>; replayed: z.ZodOptional>; }, "strip", z.ZodTypeAny, { source: "plan" | "agent" | "hud" | "dashboard" | "cli_try"; phase: "completed" | "started"; hosted: boolean; outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined; journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }, { source: "plan" | "agent" | "hud" | "dashboard" | "cli_try"; phase: "completed" | "started"; hosted: boolean; outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined; journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }>; export type HarnessRun = z.infer; /** * The envelope fields and blocks this file adds to `TelemetryEventSchema`, spread into it there. * Every one optional: an older sender has none of them. */ export declare const SIGNAL_FIELDS: { /** Signed out, signed in, or signed in AND this project linked to a workspace. */ accountState: z.ZodOptional>; /** This project reports to a workspace. */ linked: z.ZodOptional; /** * The platform's id for the linked workspace (`orgId` in `.reticle/cloud.json`): a pseudonymous * key the platform joins its own records on. Never the workspace NAME, never an email. */ workspaceId: z.ZodOptional; /** Which coding agent this event came from, normalised. Absent when nothing said. */ client: z.ZodOptional>; /** How the running `reticle` was launched. */ launch: z.ZodOptional>; /** Only on `hud_viewed` / `hud_signin_prompted`. */ hud: z.ZodOptional>; surface: z.ZodOptional>; tabs: z.ZodOptional>; }, "strip", z.ZodTypeAny, { surface?: "harness" | "rail" | "header" | undefined; view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined; tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }, { surface?: "harness" | "rail" | "header" | undefined; view?: "flows" | "harness" | "none" | "chat" | "notes" | "settings" | "report" | "account" | undefined; tabs?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }>>; /** Only on `platform_linked`. */ link: z.ZodOptional; }, "strip", z.ZodTypeAny, { via: "hud" | "link" | "connect"; }, { via: "hud" | "link" | "connect"; }>>; /** Only on `harness_run`. */ harness: z.ZodOptional; source: z.ZodNativeEnum<{ readonly AGENT: "agent"; readonly HUD: "hud"; readonly DASHBOARD: "dashboard"; readonly CLI_TRY: "cli_try"; readonly PLAN: "plan"; }>; /** The run drives on the platform (always, today), as opposed to an injected local driver. */ hosted: z.ZodBoolean; /** Only on `completed`. */ outcome: z.ZodOptional>; /** Only on `completed`: journeys the run answered, and how many of those replayed with no model. */ journeys: z.ZodOptional>; replayed: z.ZodOptional>; }, "strip", z.ZodTypeAny, { source: "plan" | "agent" | "hud" | "dashboard" | "cli_try"; phase: "completed" | "started"; hosted: boolean; outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined; journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }, { source: "plan" | "agent" | "hud" | "dashboard" | "cli_try"; phase: "completed" | "started"; hosted: boolean; outcome?: "proved" | "failed" | "blocked" | "not_proved" | "stopped" | undefined; journeys?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; replayed?: "0" | "1" | "2-3" | "4-9" | "10+" | undefined; }>>; };