import type { NetworkIntegration, NetworkController, NetworkDiagnosticsSnapshot, NetworkFetchRequest, NetworkFetchResponse, NetworkLookupResult, NetworkOptions, NetworkStatus, NetworkWebSocketConnection, NetworkWebSocketInit, ResolvedNetworkOptions, ResolvedNetworkPolicy, TailscaleAdapterFactory } from './types';
export declare class DefaultNetworkController implements NetworkController {
    private options;
    private readonly initialOptionKeys;
    private readonly integration;
    private listeners;
    private adapter;
    private adapterPromise;
    private adapterStatus;
    private persistedSession;
    private sessionHydrationPromise;
    private shouldClearPersistedSession;
    private tailscaleRecoveryPromise;
    private pendingExitNodeSelectionSync;
    constructor(options?: NetworkOptions, integration?: NetworkIntegration | null);
    getConfig(): ResolvedNetworkOptions;
    getResolvedPolicy(): ResolvedNetworkPolicy;
    subscribe(listener: (status: NetworkStatus) => void): () => void;
    configure(options: Partial<NetworkOptions>): Promise<NetworkStatus>;
    getStatus(): Promise<NetworkStatus>;
    getDiagnostics(): Promise<NetworkDiagnosticsSnapshot>;
    login(): Promise<NetworkStatus>;
    logout(): Promise<NetworkStatus>;
    fetch(request: NetworkFetchRequest): Promise<NetworkFetchResponse>;
    connectWebSocket(url: string, init?: NetworkWebSocketInit): Promise<NetworkWebSocketConnection>;
    lookup(hostname: string, options?: {
        family?: number;
        all?: boolean;
    }): Promise<NetworkLookupResult>;
    private ensureAdapter;
    private getResolvedOptions;
    private getActiveExitNodeId;
    private getPreferredExitNodeId;
    private extractHostname;
    private emit;
    private syncResolvedExitNodeSelection;
    private maybeSyncExitNodeSelectionFromStatus;
    private createAdapter;
    private recoverTailscaleRuntime;
    private ensureSessionHydrated;
    private buildPersistedSession;
    private persistSession;
}
export declare function createNetworkController(options?: NetworkOptions, integration?: NetworkIntegration | null): NetworkController;
export declare function hasExplicitDefaultNetworkController(): boolean;
export declare function getDefaultNetworkController(): NetworkController;
export declare function setDefaultNetworkController(controller: NetworkController | null, implicit?: boolean): void;
export declare function setTailscaleAdapterFactory(factory: TailscaleAdapterFactory | null): void;
//# sourceMappingURL=controller.d.ts.map