import type Database from "better-sqlite3"; export interface SqliteEnsureResult { Database: typeof Database; /** true when the native binding was freshly loaded (no rebuild needed). */ ok: true; } export interface SqliteEnsureError { ok: false; /** Human-readable error message. */ error: string; /** Shell command the user should run to repair. */ repairCmd: string; /** Absolute path to the extension directory for the rebuild. */ extDir: string; } /** * Synchronously load better-sqlite3 via createRequire, catching ABI * mismatches so the plugin can fall back gracefully instead of crashing * at module evaluation. Sync because openclaw's plugin loader requires * register() to return synchronously. * * On Node.js version change it prints an early-warning log through the * supplied logger and refreshes the fingerprint on success. */ export declare function ensureSqlite(openclawDir: string, extDir: string, log: { warn: (msg: string) => void; info?: (msg: string) => void; }): SqliteEnsureResult | SqliteEnsureError; /** Expose for external retries (for example after a manual rebuild). */ export declare function resetSqliteCache(): void;