import { type ViteDevServer } from 'vite'; import type { NormalizedConfig } from './types.js'; import type { TestPoolManager } from './test_pool_manager.js'; import type { CoverageManager } from './coverage_manager.js'; import type { Orchestrator } from './orchestrator.js'; export interface ServerManagerOptions { cwd: string; config: NormalizedConfig; poolManager: TestPoolManager; } /** * A contract that defines the telemetry API exposed by the runner server. * Must be implemented by any runner type that wants to use the server manager. */ export interface ServerTelemetryContract { /** * Handle compilation errors. * @param error The error to handle. * @param bail Whether to bail out of the test run. */ handleCompilationError(error: Error, bail: boolean): Promise; } /** * Manages the Vite development server lifecycle and WebSocket telemetry. */ export declare class ServerManager { #private; get vite(): ViteDevServer | undefined; get coverageManager(): CoverageManager | undefined; constructor(orchestrator: Orchestrator, options: ServerManagerOptions); /** * Boots the Vite server and returns the local server URL. */ boot(): Promise; /** * Closes the Vite server if running. */ close(): Promise; }