import { z } from 'zod'; import { EventType } from './constants/constants.js'; /** * Per-event-type payload schemas — the typed replacement for the envelope's open `data` record. * The envelope (`ReticleEventSchema.data`) stays open on the wire so a richer SDK is never rejected * mid-upgrade; narrowing happens here, at the server's inbound boundary and wherever the journal reads * an event's fields. `parseEventPayload` is that boundary. * * Two fidelity tiers by design: * - **Precise + closed** for stable observers (dom/route/perf/anim/scroll/signal/health/...). * - **Precise on the load-bearing fields + `.passthrough`** for observers / will enrich * (network, console, error, state, storage) — today's fields are validated, tomorrow's added * fields (stack, TTFB, initiator, path diffs) pass through instead of failing closed. Each closes * fully as its observer is rewritten. */ /** * Wire payload vocabularies. The browser observers EMIT these values and the schemas below VALIDATE * them, so a browser-side typo (`'SSE'`) would pass tsc and fail only here, at runtime. Each is a const * object — the browser imports the members, the schema derives its z.nativeEnum from the same object — * so emitter and validator are one source. Co-located with the schemas (kept constants.ts under its cap). */ /** * `FETCH` is a response whose BODY is still arriving after the request itself resolved. * * `fetch` settles at HEADERS, so a streamed response is reported complete while the server is still * writing. Measured on a Next.js App Router page: the RSC payload's NET_REQUEST landed 16 ms in, the * shell rendered, and the Suspense boundary's content arrived 889 ms later — a window in which * nothing at all was observed, so `settled` passed while the fallback was still on screen. */ export declare const StreamTransport: { readonly SSE: "sse"; readonly WS: "ws"; readonly FETCH: "fetch"; }; export type StreamTransport = (typeof StreamTransport)[keyof typeof StreamTransport]; /** `CLOSE` pairs with `OPEN`: until it arrives, the body is still being written. */ export declare const StreamDirection: { readonly OPEN: "open"; readonly IN: "in"; readonly OUT: "out"; readonly CLOSE: "close"; }; export type StreamDirection = (typeof StreamDirection)[keyof typeof StreamDirection]; export declare const ScrollDirection: { readonly UP: "up"; readonly DOWN: "down"; }; export type ScrollDirection = (typeof ScrollDirection)[keyof typeof ScrollDirection]; /** * The three readable client-side storage areas. * * `cookies` is plural because that is what the storage tool accepts, what the browser returns and * what the docs publish. This member read `cookie` for as long as it had no callers, which is * exactly how long a name can disagree with every use of it for free. */ export declare const StorageArea: { readonly LOCAL: "local"; readonly SESSION: "session"; readonly COOKIE: "cookies"; }; export type StorageArea = (typeof StorageArea)[keyof typeof StorageArea]; /** * A single cookie to seed before initial navigation. */ export declare const SeedCookieSchema: z.ZodObject<{ name: z.ZodString; value: z.ZodString; domain: z.ZodOptional; path: z.ZodOptional; url: z.ZodOptional; httpOnly: z.ZodOptional; secure: z.ZodOptional; sameSite: z.ZodOptional>; expires: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }, { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }>; export type SeedCookie = z.infer; export declare const SeedCookiesSchema: z.ZodUnion<[z.ZodRecord, z.ZodArray; path: z.ZodOptional; url: z.ZodOptional; httpOnly: z.ZodOptional; secure: z.ZodOptional; sameSite: z.ZodOptional>; expires: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }, { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }>, "many">]>; export type SeedCookies = z.infer; /** * Client storage and session state to seed into an isolated context before the first navigation. * Matches the three storage areas Reticle already observes (localStorage, sessionStorage, cookies). */ export declare const SeedStorageSchema: z.ZodObject<{ local: z.ZodOptional>; session: z.ZodOptional>; cookies: z.ZodOptional, z.ZodArray; path: z.ZodOptional; url: z.ZodOptional; httpOnly: z.ZodOptional; secure: z.ZodOptional; sameSite: z.ZodOptional>; expires: z.ZodOptional; }, "strip", z.ZodTypeAny, { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }, { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }>, "many">]>>; }, "strip", z.ZodTypeAny, { local?: Record | undefined; session?: Record | undefined; cookies?: Record | { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }[] | undefined; }, { local?: Record | undefined; session?: Record | undefined; cookies?: Record | { value: string; name: string; path?: string | undefined; url?: string | undefined; domain?: string | undefined; httpOnly?: boolean | undefined; secure?: boolean | undefined; sameSite?: "Strict" | "Lax" | "None" | undefined; expires?: number | undefined; }[] | undefined; }>; export type SeedStorage = z.infer; /** * The registry. `satisfies Record` makes a missing event type a *compile* error — * the wire can never carry a type without a payload contract. */ export declare const EVENT_PAYLOAD_SCHEMAS: { "dom.added": z.ZodObject<{ role: z.ZodOptional; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role?: string | undefined; name?: string | undefined; }, { role?: string | undefined; name?: string | undefined; }>; "dom.removed": z.ZodObject<{ role: z.ZodOptional; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role?: string | undefined; name?: string | undefined; }, { role?: string | undefined; name?: string | undefined; }>; "dom.attr": z.ZodObject<{ attr: z.ZodString; value: z.ZodOptional; old: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ attr: z.ZodString; value: z.ZodOptional; old: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ attr: z.ZodString; value: z.ZodOptional; old: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; "dom.text": z.ZodObject<{ text: z.ZodString; old: z.ZodOptional; }, "strip", z.ZodTypeAny, { text: string; old?: string | undefined; }, { text: string; old?: string | undefined; }>; "net.request": z.ZodObject<{ id: z.ZodString; method: z.ZodString; url: z.ZodString; status: z.ZodNumber; ok: z.ZodBoolean; durationMs: z.ZodNumber; initiator: z.ZodString; urlRaw: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; method: z.ZodString; url: z.ZodString; status: z.ZodNumber; ok: z.ZodBoolean; durationMs: z.ZodNumber; initiator: z.ZodString; urlRaw: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; method: z.ZodString; url: z.ZodString; status: z.ZodNumber; ok: z.ZodBoolean; durationMs: z.ZodNumber; initiator: z.ZodString; urlRaw: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; "net.pending": z.ZodObject<{ id: z.ZodString; method: z.ZodString; url: z.ZodString; initiator: z.ZodString; urlRaw: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; method: string; url: string; initiator: string; urlRaw?: string | undefined; }, { id: string; method: string; url: string; initiator: string; urlRaw?: string | undefined; }>; "net.stream": z.ZodObject<{ transport: z.ZodNativeEnum<{ readonly SSE: "sse"; readonly WS: "ws"; readonly FETCH: "fetch"; }>; direction: z.ZodNativeEnum<{ readonly OPEN: "open"; readonly IN: "in"; readonly OUT: "out"; readonly CLOSE: "close"; }>; url: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ transport: z.ZodNativeEnum<{ readonly SSE: "sse"; readonly WS: "ws"; readonly FETCH: "fetch"; }>; direction: z.ZodNativeEnum<{ readonly OPEN: "open"; readonly IN: "in"; readonly OUT: "out"; readonly CLOSE: "close"; }>; url: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ transport: z.ZodNativeEnum<{ readonly SSE: "sse"; readonly WS: "ws"; readonly FETCH: "fetch"; }>; direction: z.ZodNativeEnum<{ readonly OPEN: "open"; readonly IN: "in"; readonly OUT: "out"; readonly CLOSE: "close"; }>; url: z.ZodString; }, z.ZodTypeAny, "passthrough">>; download: z.ZodObject<{ mimeType: z.ZodString; bytes: z.ZodNumber; filename: z.ZodOptional; lines: z.ZodOptional; preview: z.ZodOptional; previewTruncated: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ mimeType: z.ZodString; bytes: z.ZodNumber; filename: z.ZodOptional; lines: z.ZodOptional; preview: z.ZodOptional; previewTruncated: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ mimeType: z.ZodString; bytes: z.ZodNumber; filename: z.ZodOptional; lines: z.ZodOptional; preview: z.ZodOptional; previewTruncated: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; perf: z.ZodObject<{ metric: z.ZodNativeEnum<{ readonly LCP: "lcp"; readonly CLS: "cls"; readonly LONGTASK: "longtask"; }>; value: z.ZodNumber; at: z.ZodNumber; }, "strip", z.ZodTypeAny, { value: number; at: number; metric: "lcp" | "cls" | "longtask"; }, { value: number; at: number; metric: "lcp" | "cls" | "longtask"; }>; "route.change": z.ZodObject<{ from: z.ZodString; to: z.ZodString; pathname: z.ZodString; search: z.ZodString; hash: z.ZodString; }, "strip", z.ZodTypeAny, { pathname: string; from: string; to: string; search: string; hash: string; }, { pathname: string; from: string; to: string; search: string; hash: string; }>; "console.log": z.ZodObject<{ message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; "console.warn": z.ZodObject<{ message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; "console.error": z.ZodObject<{ message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; "console.info": z.ZodObject<{ message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; "console.debug": z.ZodObject<{ message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; "error.uncaught": z.ZodObject<{ message: z.ZodString; source: z.ZodOptional; line: z.ZodOptional; kind: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ message: z.ZodString; source: z.ZodOptional; line: z.ZodOptional; kind: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ message: z.ZodString; source: z.ZodOptional; line: z.ZodOptional; kind: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; "visible.shown": z.ZodObject<{ role: z.ZodOptional; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role?: string | undefined; name?: string | undefined; }, { role?: string | undefined; name?: string | undefined; }>; "anim.start": z.ZodObject<{ name: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; }, { name: string; }>; "anim.end": z.ZodObject<{ name: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; }, { name: string; }>; "scroll.position": z.ZodObject<{ x: z.ZodNumber; y: z.ZodNumber; percent: z.ZodNumber; direction: z.ZodNativeEnum<{ readonly UP: "up"; readonly DOWN: "down"; }>; }, "strip", z.ZodTypeAny, { direction: "up" | "down"; x: number; y: number; percent: number; }, { direction: "up" | "down"; x: number; y: number; percent: number; }>; "reveal.shown": z.ZodObject<{ role: z.ZodOptional; name: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ role: z.ZodOptional; name: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ role: z.ZodOptional; name: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; signal: z.ZodObject<{ name: z.ZodString; data: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; data?: unknown; }, { name: string; data?: unknown; }>; "state.change": z.ZodObject<{ name: z.ZodString; value: z.ZodUnknown; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ name: z.ZodString; value: z.ZodUnknown; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ name: z.ZodString; value: z.ZodUnknown; }, z.ZodTypeAny, "passthrough">>; "storage.change": z.ZodObject<{ area: z.ZodNativeEnum<{ readonly LOCAL: "local"; readonly SESSION: "session"; readonly COOKIE: "cookies"; }>; key: z.ZodString; old: z.ZodOptional; new: z.ZodOptional; }, "strip", z.ZodTypeAny, { key: string; area: "local" | "session" | "cookies"; old?: string | undefined; new?: string | undefined; }, { key: string; area: "local" | "session" | "cookies"; old?: string | undefined; new?: string | undefined; }>; "page.health": z.ZodObject<{ hidden: z.ZodBoolean; focused: z.ZodBoolean; reason: z.ZodOptional; /** * Which browser the page is, normalised in the SDK to a closed list before it is sent — never * a UA string and never a raw `userAgentData` brand. Optional: an older SDK does not report * one, and a desktop webview has no brand to report. */ brand: z.ZodOptional>; /** * Which shell the page is running in: `web`, `electron`, `tauri`, or something newer. * * The SDK has always sent this and the server has always read it, but until now the field was * not declared here, so it travelled through `.passthrough()` and appeared in NONE of the * generated `dist/schema/*.json` files. Anyone implementing this contract from the published * schemas -- which is what a third-party realm does -- could not see that the field exists, let * alone that the server depends on it. * * A plain string on purpose, NOT a closed list of the three shells that ship today. A realm * that does not exist yet has to be able to name itself, and an enum here would mean one * unknown value fails the whole health report, taking visibility, focus and the heartbeat down * with it. The wire says the field exists and is a string; which values mean something stays * with the reader, where it already is. */ runtime: z.ZodOptional; /** The rendering engine, coarse on purpose (blink / gecko / webkit). Same reasoning as `runtime`. */ engine: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ hidden: z.ZodBoolean; focused: z.ZodBoolean; reason: z.ZodOptional; /** * Which browser the page is, normalised in the SDK to a closed list before it is sent — never * a UA string and never a raw `userAgentData` brand. Optional: an older SDK does not report * one, and a desktop webview has no brand to report. */ brand: z.ZodOptional>; /** * Which shell the page is running in: `web`, `electron`, `tauri`, or something newer. * * The SDK has always sent this and the server has always read it, but until now the field was * not declared here, so it travelled through `.passthrough()` and appeared in NONE of the * generated `dist/schema/*.json` files. Anyone implementing this contract from the published * schemas -- which is what a third-party realm does -- could not see that the field exists, let * alone that the server depends on it. * * A plain string on purpose, NOT a closed list of the three shells that ship today. A realm * that does not exist yet has to be able to name itself, and an enum here would mean one * unknown value fails the whole health report, taking visibility, focus and the heartbeat down * with it. The wire says the field exists and is a string; which values mean something stays * with the reader, where it already is. */ runtime: z.ZodOptional; /** The rendering engine, coarse on purpose (blink / gecko / webkit). Same reasoning as `runtime`. */ engine: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ hidden: z.ZodBoolean; focused: z.ZodBoolean; reason: z.ZodOptional; /** * Which browser the page is, normalised in the SDK to a closed list before it is sent — never * a UA string and never a raw `userAgentData` brand. Optional: an older SDK does not report * one, and a desktop webview has no brand to report. */ brand: z.ZodOptional>; /** * Which shell the page is running in: `web`, `electron`, `tauri`, or something newer. * * The SDK has always sent this and the server has always read it, but until now the field was * not declared here, so it travelled through `.passthrough()` and appeared in NONE of the * generated `dist/schema/*.json` files. Anyone implementing this contract from the published * schemas -- which is what a third-party realm does -- could not see that the field exists, let * alone that the server depends on it. * * A plain string on purpose, NOT a closed list of the three shells that ship today. A realm * that does not exist yet has to be able to name itself, and an enum here would mean one * unknown value fails the whole health report, taking visibility, focus and the heartbeat down * with it. The wire says the field exists and is a string; which values mean something stays * with the reader, where it already is. */ runtime: z.ZodOptional; /** The rendering engine, coarse on purpose (blink / gecko / webkit). Same reasoning as `runtime`. */ engine: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; "context.opened": z.ZodObject<{ href: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ href: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ href: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; "dialog.opened": z.ZodObject<{ /** Which of the three, so a caller can tell a blocking question from a blocking notice. */ kind: z.ZodEnum<["alert", "confirm", "prompt"]>; /** What the app asked. The whole point: a cancelled action is only legible with the question. */ message: z.ZodOptional; /** What Reticle answered on the app's behalf. `false`/`null` are the non-destructive replies. */ answered: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** Which of the three, so a caller can tell a blocking question from a blocking notice. */ kind: z.ZodEnum<["alert", "confirm", "prompt"]>; /** What the app asked. The whole point: a cancelled action is only legible with the question. */ message: z.ZodOptional; /** What Reticle answered on the app's behalf. `false`/`null` are the non-destructive replies. */ answered: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** Which of the three, so a caller can tell a blocking question from a blocking notice. */ kind: z.ZodEnum<["alert", "confirm", "prompt"]>; /** What the app asked. The whole point: a cancelled action is only legible with the question. */ message: z.ZodOptional; /** What Reticle answered on the app's behalf. `false`/`null` are the non-destructive replies. */ answered: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; "render.commit": z.ZodObject<{ commits: z.ZodNumber; }, "strip", z.ZodTypeAny, { commits: number; }, { commits: number; }>; "focus.change": z.ZodObject<{ to: z.ZodOptional; from: z.ZodOptional; toBody: z.ZodBoolean; }, "strip", z.ZodTypeAny, { toBody: boolean; from?: string | undefined; to?: string | undefined; }, { toBody: boolean; from?: string | undefined; to?: string | undefined; }>; "flow.recorded": z.ZodObject<{ name: z.ZodString; flow: z.ZodUnknown; }, "strip", z.ZodTypeAny, { name: string; flow?: unknown; }, { name: string; flow?: unknown; }>; "transport.overflow": z.ZodObject<{ dropped: z.ZodNumber; }, "strip", z.ZodTypeAny, { dropped: number; }, { dropped: number; }>; truncated: z.ZodObject<{ channel: z.ZodString; dropped: z.ZodNumber; }, "strip", z.ZodTypeAny, { dropped: number; channel: string; }, { dropped: number; channel: string; }>; "blind-spot": z.ZodObject<{ kind: z.ZodNativeEnum<{ readonly CLOSED_SHADOW_ROOT: "closed-shadow-root"; readonly RATE_LIMITED: "rate-limited"; readonly CROSS_ORIGIN_IFRAME: "cross-origin-iframe"; readonly UNINSTRUMENTED_FRAME: "uninstrumented-frame"; readonly VIRTUALIZED_UNMOUNTED: "virtualized-unmounted"; readonly WRAPPED_NETWORK: "wrapped-network"; readonly UNOBSERVED_IPC: "unobserved-ipc"; readonly VERDICTLESS_SEND: "verdictless-send"; readonly UNWATCHED_STATE: "unwatched-state"; }>; count: z.ZodNumber; }, "strip", z.ZodTypeAny, { kind: "closed-shadow-root" | "rate-limited" | "cross-origin-iframe" | "uninstrumented-frame" | "virtualized-unmounted" | "wrapped-network" | "unobserved-ipc" | "verdictless-send" | "unwatched-state"; count: number; }, { kind: "closed-shadow-root" | "rate-limited" | "cross-origin-iframe" | "uninstrumented-frame" | "virtualized-unmounted" | "wrapped-network" | "unobserved-ipc" | "verdictless-send" | "unwatched-state"; count: number; }>; "sdk.failed": z.ZodObject<{ /** WHERE in the SDK — a fixed vocabulary of our own module names, never a user path. */ site: z.ZodString; /** The error message. Stripped of variables server-side before it is ever reported onward. */ message: z.ZodString; errorType: z.ZodOptional; }, "strip", z.ZodTypeAny, { message: string; site: string; errorType?: string | undefined; }, { message: string; site: string; errorType?: string | undefined; }>; "net.detail": z.ZodObject<{ url: z.ZodString; method: z.ZodOptional; status: z.ZodNumber; headers: z.ZodRecord; resourceType: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ url: z.ZodString; method: z.ZodOptional; status: z.ZodNumber; headers: z.ZodRecord; resourceType: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ url: z.ZodString; method: z.ZodOptional; status: z.ZodNumber; headers: z.ZodRecord; resourceType: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; "human.control": z.ZodObject<{ kind: z.ZodNativeEnum<{ readonly PAUSE: "pause"; readonly RESUME: "resume"; readonly END: "end"; readonly MESSAGE: "message"; readonly REPLAY: "replay"; readonly SYNC: "sync"; }>; text: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "message" | "pause" | "resume" | "end" | "replay" | "sync"; text?: string | undefined; }, { kind: "message" | "pause" | "resume" | "end" | "replay" | "sync"; text?: string | undefined; }>; "human.mark": z.ZodObject<{ note: z.ZodString; anchor: z.ZodString; strategy: z.ZodNativeEnum<{ readonly TESTID: "testid"; readonly COMPONENT: "component"; readonly ROLE: "role"; readonly POSITION: "position"; }>; label: z.ZodOptional; source: z.ZodOptional>; route: z.ZodOptional; }, "strip", z.ZodTypeAny, { anchor: string; note: string; strategy: "role" | "testid" | "component" | "position"; label?: string | undefined; route?: string | undefined; source?: { file: string; line: number; } | undefined; }, { anchor: string; note: string; strategy: "role" | "testid" | "component" | "position"; label?: string | undefined; route?: string | undefined; source?: { file: string; line: number; } | undefined; }>; }; /** Narrow an event's `data` against its type's payload schema. Unknown in, typed-or-error out. */ export declare function parseEventPayload(type: EventType, data: unknown): z.SafeParseReturnType;