import { type SqliteDatabase } from '../sqlite/sqlite-driver.js'; /** * Open (or create) a SkillHub state database at the given path. * * Behavior: * - Creates the parent directory if it does not exist. * - Enables WAL journal mode and foreign-key enforcement. * - Applies every `migrations/*.sql` file in lexicographic order. * Migrations must be idempotent (CREATE TABLE IF NOT EXISTS, etc.). * * The migrations directory lives next to this source file at build time; * we resolve it via `import.meta.url` so the lookup survives vitest ESM * (where `__dirname` is undefined). Migration files are discovered by * globbing (`*.sql`) and sorted lexicographically so future * `002-…`, `003-…` additions are picked up automatically. */ export declare function openStateDb(path: string): SqliteDatabase; /** * Return the user-defined table names present in `db` (excluding SQLite * system tables such as `sqlite_sequence`). */ export declare function listTables(db: SqliteDatabase): string[];