import { type OpenGeniText } from "../messages/runtime.js"; /** Backoff between attempts: about ten seconds in all before anything is shown. */ export declare const TRANSIENT_RETRY_DELAYS_MS: readonly number[]; /** After the quiet retries give up, try once at this pace until Opengeni answers. */ export declare const TRANSIENT_RECONNECT_INTERVAL_MS = 3000; /** The one line shown while Opengeni is briefly unreachable. */ export declare const OPENGENI_UPDATING_NOTICE: (t: OpenGeniText) => string; /** * True for a failure that says the service is briefly unreachable, not that * the request was wrong: a gateway or availability status, a 500 the API marks * retryable, or a request that never got a response. */ export declare function isTransientServiceFailure(error: unknown): boolean; export type RetryTransientOptions = { /** Stop waiting (and rethrow the last failure) once this returns false. */ shouldContinue?: () => boolean; signal?: AbortSignal; delaysMs?: readonly number[]; sleep?: (ms: number, signal?: AbortSignal) => Promise; }; /** * Run a read, retrying only transient service failures with backoff. Never use * this for a request whose repeat could apply twice: it is for reads and for * writes that are idempotent by construction. */ export declare function retryTransient(operation: () => Promise, options?: RetryTransientOptions): Promise;