import type { DatabaseSync } from 'node:sqlite'; /** * Run an operation inside a `BEGIN IMMEDIATE` transaction with nested SAVEPOINT * support and COMMIT retry on SQLITE_BUSY / SQLITE_LOCKED. * * When called inside an already-active transaction, automatically uses SAVEPOINT * so the outer transaction controls final COMMIT/ROLLBACK. When called at the * top level, owns the full transaction lifecycle with retry on contention. */ export declare function runSqliteWriteTransaction(fn: (db: DatabaseSync) => T): T; export declare function getSqliteDatabase(): DatabaseSync;