/**
 * Runtime-aware compatibility shim for SQLite.
 *
 * Picks `bun:sqlite` under Bun and `node:sqlite` under Node (>=22.5). Avoids
 * the native `better-sqlite3` addon entirely so there is no prebuild compile
 * and no Node/Bun ABI mismatch. Both runtimes are production: `dist/index.js`
 * runs under Node, while the signed standalone `dist/bin/agents` (what the
 * shims exec) embeds Bun.
 *
 * Exposes the small better-sqlite3-shaped surface area the rest of the
 * codebase already uses: `prepare/exec/pragma/transaction/close` on the DB,
 * `run/get/all` on statements.
 */
interface NativeStmt {
    run(...args: unknown[]): RunResult;
    get(...args: unknown[]): unknown;
    all(...args: unknown[]): unknown[];
}
export interface RunResult {
    changes: number | bigint;
    lastInsertRowid: number | bigint;
}
declare class StatementImpl<_T = unknown> {
    private readonly inner;
    constructor(inner: NativeStmt);
    run(...params: unknown[]): RunResult;
    get(...params: unknown[]): unknown;
    all(...params: unknown[]): unknown[];
}
declare class Database {
    private readonly inner;
    constructor(filename: string);
    prepare<T = unknown>(sql: string): StatementImpl<T>;
    exec(sql: string): void;
    pragma(stmt: string): void;
    transaction<Args extends unknown[], R>(fn: (...args: Args) => R): (...args: Args) => R;
    close(): void;
}
declare namespace Database {
    type Database = InstanceType<typeof DatabaseConstructor>;
    type Statement<T = unknown> = StatementImpl<T>;
}
declare const DatabaseConstructor: typeof Database;
export default Database;
