import type Database from 'better-sqlite3'; export interface RetryOptions { /** Maximum number of retries (default: 5) */ maxRetries?: number; /** Base delay in ms for exponential backoff (default: 50) */ baseMs?: number; /** Maximum delay in ms for exponential backoff (default: 1000) */ maxMs?: number; /** Maximum total wait time in ms across all retries (default: 30000) */ maxTotalWaitMs?: number; } /** * Execute a function with retry on SQLITE_BUSY using exponential backoff. * Each retry doubles the delay, capped at maxMs. * Total wait time is capped by maxTotalWaitMs per FS-SS-003-0005 VR-007. * * @param fn - The function to execute (typically a DB write operation) * @param options - Retry configuration * @throws DatabaseBusyError (ERR-LOCK-001) if all retries are exhausted */ export declare function withRetry(fn: () => T, options?: RetryOptions): T; /** * Execute a database operation within a transaction with retry on busy. */ export declare function withTransaction(db: Database.Database, fn: () => T, options?: RetryOptions): T; //# sourceMappingURL=retry.d.ts.map