/** * Every way `value` fails to be an `InteractiveProbeRecord`, as readable * messages. An empty array means it is valid. * * Hand-written rather than a schema library because the desktop package has no * validation dependency and this is the one shape it checks. */ export declare function validateProbeRecord(value: unknown): string[]; /** Throw with every validation error at once, or return the value typed. */ export declare function assertProbeRecord(value: unknown, source?: string): InteractiveProbeRecord; /** * The shape of one interactive-content measurement (stacksjs/stacks#877). * * A record is data, not prose: it says when it was taken, against which host * (a Craft window or a browser) at which version, on which OS and machine. That * is what lets it go stale visibly - a reader sees "Craft 0.0.105, macOS 27.0, * 2026-10-02" beside every number and can tell how far that is from what they * run. * * Every probe carries a status and a note. A probe that could not run - input * latency with nobody at the keyboard, pointer lock without a user gesture, a * gamepad with none attached - says `requires-interaction` and what was still * observable. It never carries a number it did not measure. */ export declare const PROBE_SCHEMA_VERSION: 1; export declare const PROBE_STATUSES: readonly ProbeStatus[]; /** Probe order, and the label each is published under. */ export declare const PROBE_NAMES: ReadonlyArray<[ProbeName, string]>; export declare interface ProbeResult { status: ProbeStatus note: string data?: Record } export declare interface InteractiveProbeRecord { schema: typeof PROBE_SCHEMA_VERSION measuredAt: string host: { kind: 'craft' | 'browser' name: string version: string userAgent: string } os: { platform: string arch: string name: string version: string build?: string } machine: { model: string cpu: string display: { name: string resolution: string refreshHz: number | null devicePixelRatio: number } } run: { idleMs: number loadMs: number cpuLoadMsPerFrame: number triangles: number interactionWindowMs: number sawRealInput: boolean } probes: Record } export type ProbeStatus = | 'available' /** The API is absent, or creating it failed. */ | 'unavailable' /** Numbers were taken; see `data`. */ | 'measured' /** Needs real input, a user gesture or hardware that this run did not have. */ | 'requires-interaction' /** Requested with a real user gesture and refused. */ | 'denied' /** The probe threw; `note` carries the message. */ | 'error'; export type ProbeName = | 'webgl2' | 'webgpu' | 'framePacing' | 'inputLatency' | 'audioLatency' | 'gamepad' | 'fullscreen' | 'pointerLock';