/**
 * Database initialization and connection management
 */
import Database from 'better-sqlite3';
/**
 * Initialize the database connection
 */
export declare function initDatabase(dbPath?: string): Database.Database;
/**
 * Get the current database instance
 */
export declare function getDatabase(): Database.Database;
/**
 * Close the database connection with proper cleanup
 */
export declare function closeDatabase(): void;
/**
 * Manually checkpoint the WAL file (call periodically for long-running processes)
 */
export declare function checkpointWal(): {
    walPages: number;
    checkpointed: number;
};
/**
 * Check database file size for bloat prevention
 */
export interface DatabaseSizeInfo {
    size: number;
    sizeFormatted: string;
    warning: boolean;
    blocked: boolean;
    message: string;
}
export declare function checkDatabaseSize(): DatabaseSizeInfo;
/**
 * Check if database operations should be blocked due to size
 */
export declare function isDatabaseBlocked(): boolean;
/**
 * Execute a function within a transaction (auto-commits on success, rollback on error)
 * Use this for batch operations that need atomicity
 */
export declare function withTransaction<T>(fn: () => T): T;
/**
 * Execute a function within an IMMEDIATE transaction (acquires write lock immediately)
 * Use this for critical operations that must not conflict with concurrent writes
 */
export declare function withImmediateTransaction<T>(fn: () => T): T;
//# sourceMappingURL=init.d.ts.map