import type { RunnerEvents } from '../types.js'; import type { Orchestrator } from './orchestrator.js'; export type TelemetryPayload = { [K in keyof RunnerEvents]: { event: K; data: RunnerEvents[K]; }; }[keyof RunnerEvents]; /** * A class that specializes in receiving from the browser telemetry events * and forwarding them to the telemetry service. */ export declare class Telemetry { #private; constructor(orchestrator: Orchestrator); /** * Processes the telemetry event sent from the browser's WSS connection. * It prepares the data for the telemetry service by deserializing errors * and cleaning the stack traces. It then re-emits the event through the * orchestrator's telemetry service. * * This method must be called for every telemetry event sent from the browser. * * @param event The telemetry event to process */ handleLupaTelemetryEvent(event: TelemetryPayload): Promise; /** * Resolves when all queued telemetry events have been processed. * Must be awaited before ending the runner to ensure no events are lost. */ drainTelemetry(): Promise; }