import { TaskResponse } from '../models/server-message.model';
import { MethodManager } from './method.manager';
export interface WorkerServerConnectionHealth {
    isConnected: boolean;
    lastConnectionAttemptAt: number;
    lastConnectedAt: number;
    lastDisconnectedAt: number;
    connectionLossStartedAt: number;
    currentOutageMs: number;
    lastDisconnectReason: string;
}
export declare class WorkerServerManager {
    private _methodManager;
    private _serverConfig;
    private _runningTasks;
    private _taskLogThresholdMs;
    private _isConnected;
    private _lastConnectionAttemptAt;
    private _lastConnectedAt;
    private _lastDisconnectedAt;
    private _connectionLossStartedAt;
    private _lastDisconnectReason;
    constructor();
    static create(methodManager: MethodManager, serverConfig: any): WorkerServerManager;
    initialize(methodManager: MethodManager, serverConfig: any): void;
    private markWorkerConnectionAttempt;
    private markWorkerConnected;
    private markWorkerDisconnected;
    getConnectionHealth(): WorkerServerConnectionHealth;
    private startWorkerInstance;
    private handleIncomingTask;
    private logWorkerEvent;
    private safeStringify;
    sendWorkerResponse(ws: any, payload: TaskResponse | string): void;
}
