export type TunnelHealthStatus = 'stopped' | 'starting' | 'checking' | 'healthy' | 'degraded' | 'localUnhealthy' | 'exited' | 'error' | 'linkReplaced';
export interface TunnelStatus {
    running: boolean;
    status: TunnelHealthStatus;
    url: string | null;
    startedAt: string | null;
    targetPort: number | null;
    generation: number;
    lastCheckedAt: string | null;
    lastHealthyAt: string | null;
    lastRemoteError: string | null;
    lastLocalError: string | null;
    lastExitAt: string | null;
    lastExitCode: number | null;
    lastExitSignal: string | null;
    lastError: string | null;
    lastProcessOutput: string | null;
    consecutiveRemoteFailures: number;
    consecutiveLocalFailures: number;
    canRegenerate: boolean;
}
export declare const TunnelService: {
    start(port: number): Promise<{
        url: string;
        token: string;
    }>;
    regenerate(port: number): Promise<{
        url: string;
        token: string;
    }>;
    stop(): void;
    getStatus(): TunnelStatus;
    getToken(): string | null;
    validateToken(candidate: string): boolean;
    validateHealthCheck(check: string | null | undefined, generation: string | null | undefined): boolean;
    getHealthResponse(): {
        ok: boolean;
        generation: number;
        status: TunnelHealthStatus;
    };
    isRunning(): boolean;
    checkNow(): Promise<void>;
    __resetForTests(): void;
};
//# sourceMappingURL=tunnel.service.d.ts.map