import type BetterSqlite3 from 'better-sqlite3';
/**
 * Load the `better-sqlite3` constructor in a way that survives every runtime the
 * daemon ships in.
 *
 * The naive `typeof require === 'function' ? require : createRequire(import.meta.url)`
 * is unsafe inside the daemon-cloud bundle: esbuild emits CJS output but, for any
 * chunk that touches `import.meta.url`, it shims the local `require` with a stub
 * that THROWS `Dynamic require of "..." is not supported`. That stub is still
 * `typeof === 'function'`, so the ternary picks it and the call throws — it never
 * reaches the `createRequire` fallback. The failure surfaced as `mesh_send_task`
 * crashing the whole tool call instead of gracefully degrading.
 *
 * The robust approach is to ATTEMPT the real `require` and CATCH the esbuild stub's
 * throw, then fall back to `createRequire`. We try multiple resolution bases so the
 * load works whether the code runs as:
 *   - a genuine CJS module (bare `require` works),
 *   - an esbuild CJS bundle with the throwing `require` shim (createRequire(import.meta.url)),
 *   - a pure ESM module where `require` is undefined (createRequire(import.meta.url)).
 */
export declare function loadBetterSqlite3(): typeof BetterSqlite3;
