import Database from "better-sqlite3";
/**
 * Opens (or creates) the SQLite database at the daemon.db path,
 * enables WAL mode and foreign keys, and runs pending migrations.
 *
 * Returns the same instance on subsequent calls (singleton).
 */
export declare function openDatabase(dbPath?: string): Database.Database;
/**
 * Closes the database connection and resets the singleton.
 */
export declare function closeDatabase(): void;
/**
 * Returns the current schema version from the _migrations table or user_version pragma.
 */
export declare function getDatabaseVersion(db: Database.Database): number;
export { Database };
//# sourceMappingURL=database.d.ts.map