/** * Shared HTTP for engine adapters (M6): POST JSON with exponential backoff on * 429/5xx and a timeout. Injectable `httpPost` and `sleep` so retry/backoff * paths test without network or real delays. */ export interface HttpJsonResponse { status: number; json(): Promise; text(): Promise; } export type HttpPost = (url: string, init: { headers: Record; body: string; signal?: AbortSignal; }) => Promise; /** A non-2xx HTTP response that is not (or no longer) retryable. */ export declare class HttpError extends Error { readonly status: number; constructor(status: number, message: string); } export interface RetryOptions { retries?: number; baseDelayMs?: number; timeoutMs?: number; sleep?: (ms: number) => Promise; } /** Real HTTP POST over the global fetch; the default for production use. */ export declare const defaultHttpPost: HttpPost; export declare function postJsonWithRetry(httpPost: HttpPost, url: string, init: { headers: Record; body: string; }, opts?: RetryOptions): Promise;