/**
 * Guarded loader for the better-sqlite3 native module.
 *
 * better-sqlite3 ships prebuilt binaries per Node ABI. On a Node version
 * newer than the installed better-sqlite3's prebuilds (and with no C++
 * toolchain to compile from source), the native load fails — historically
 * with a bare `libc++abi: terminating ... Napi::Error` crash-loop and zero
 * guidance. This module is the single place better-sqlite3 is loaded at
 * runtime: it turns that failure into one actionable, catchable error
 * instead of an opaque abort.
 *
 * It must NEVER call `process.exit()`: this module is reachable from the
 * library entry (`shieldcortex` → `initDatabase`), so a host app that merely
 * imports the package must not be terminated. The load failure is thrown as a
 * typed `NativeModuleLoadError`; a CLI/server entry point can catch it and
 * decide to exit, but the module itself stays a well-behaved library.
 */
import type DatabaseConstructor from 'better-sqlite3';
/**
 * Thrown when the better-sqlite3 native binding cannot be loaded (missing /
 * ABI-mismatched / wrong-arch prebuild, or the module is not installed).
 *
 * Carries the actionable, formatted guidance in `.message` so a caller can
 * print it verbatim. Typed so entry points can distinguish an environmental
 * install problem from a genuine runtime error and exit cleanly if they choose.
 */
export declare class NativeModuleLoadError extends Error {
    /** The original error raised by `require('better-sqlite3')`. */
    readonly cause: unknown;
    constructor(message: string, cause: unknown);
}
/**
 * Build the user-facing message for a native-load failure. Pure and
 * side-effect free so it can be unit-tested without breaking the binding.
 */
export declare function formatNativeLoadError(err: unknown, nodeVersion: string, abi: string): string;
/**
 * True when an error from opening the database is a better-sqlite3 native-module
 * load failure (environmental), as opposed to genuine file corruption. Pure +
 * exported so the init path can route it away from destructive recovery.
 */
export declare function isNativeModuleLoadError(error: unknown): boolean;
declare const BetterSqlite3: typeof DatabaseConstructor;
export type { DatabaseConstructor };
export default BetterSqlite3;
