/** * Retry helper for external calls (e.g. DSL SenpiClient). No backoff; fixed delay between attempts. */ export interface RetryOptions { /** Number of retries (total attempts = retries + 1). Default 2. */ retries?: number; /** Delay in ms before each retry. Default 500. */ delayMs?: number; /** Label for logging (e.g. "editPosition"). */ label?: string; /** Optional: called on each retry with (attempt, retriesRemaining, error). */ onRetry?: (attempt: number, retriesRemaining: number, error: unknown) => void; /** * Optional predicate deciding whether a given failure is worth retrying. When * provided and it returns `false`, the error is rethrown immediately with no * further attempts (and `onRetry` is not called). When omitted, every failure * is retried until attempts are exhausted (the original behavior). */ shouldRetry?: (error: unknown) => boolean; } /** * Executes fn(); on failure waits delayMs then retries up to retries times. * @throws Last error if all attempts fail. */ export declare function withRetry(fn: () => Promise, options?: RetryOptions): Promise; //# sourceMappingURL=retry.d.ts.map