export declare const STARTUP_UNAVAILABLE_GATEWAY_METHODS: readonly ["sessions.history", "sessions.messages", "sessions.list", "sessions.run", "sessions.reset", "models.list"];
export type StartupUnavailableGatewayMethod = (typeof STARTUP_UNAVAILABLE_GATEWAY_METHODS)[number];
export type GatewayReadinessSnapshot = {
    ready: boolean;
    httpListening: boolean;
    startedAtMs: number;
    readyAtMs: number | null;
    startupDurationMs: number | null;
};
export type StartupUnavailablePayload = {
    ok: false;
    error: string;
    code: 'STARTUP_UNAVAILABLE';
    retryable: true;
    retryAfterMs: number;
    method: StartupUnavailableGatewayMethod;
};
export declare class GatewayReadiness {
    private ready;
    private httpListening;
    private startedAtMs;
    private readyAtMs;
    markStarting(startedAtMs?: number): void;
    markHttpListening(): void;
    markReady(): void;
    isReady(): boolean;
    isHttpListening(): boolean;
    getSnapshot(): GatewayReadinessSnapshot;
    resolveRetryAfterMs(headerValue: string | undefined): number;
}
export declare function buildStartupUnavailablePayload(params: {
    method: StartupUnavailableGatewayMethod;
    retryAfterMs?: number;
}): StartupUnavailablePayload;
export declare function parseStartupRetryAfterMs(value: unknown): number;
