import { type BrowserTestRunnerOptions } from "./runner.js"; import type { BrowserTestEvent, BrowserTestRunInput, BrowserTestRunOutput } from "./types.js"; interface CoordinatorRequest { id: number; type: "run" | "cancel" | "dispose"; input?: BrowserTestRunInput; reason?: string; } interface CoordinatorResultResponse { id: number; type: "result"; ok: boolean; output?: BrowserTestRunOutput; error?: string; } interface CoordinatorEventResponse { id: number; type: "event"; event: BrowserTestEvent; } type CoordinatorResponse = CoordinatorResultResponse | CoordinatorEventResponse; export interface TestCoordinatorScope { addEventListener(type: "message", listener: (event: MessageEvent) => void): void; postMessage(message: CoordinatorResponse): void; } export type TestCoordinatorHostOptions = Omit; /** * Hosts the portable Rust coordinator in a dedicated coordinator worker. The * host creates child test workers but contains no scheduling policy. */ export declare function installRunMatTestCoordinatorHost(scope: TestCoordinatorScope, options: TestCoordinatorHostOptions): void; export declare class BrowserTestCoordinatorClient { private readonly worker; private nextId; private active; constructor(worker: Worker); run(input: BrowserTestRunInput, signal?: AbortSignal, onEvent?: (event: BrowserTestEvent) => void): Promise; dispose(): void; private rejectActive; } export {}; //# sourceMappingURL=coordinator-worker.d.ts.map