import { type DB } from '../storage/db.js'; import type { Config } from '../config/config.js'; export interface RuntimeDb { db: DB; cfg: Config; dataDir: string; } /** Resolve config the same way serve does, open key-aware, run migrations. * * Key is applied only when the file on disk is actually encrypted: a * plaintext DB (fresh test dir, encryption recently toggled on but serve's * auto-migration not yet run) must be opened WITHOUT a key — PRAGMA key on * a plaintext file makes every read fail with "file is not a database". * serve owns the plaintext→encrypted migration; one-shot commands do not. */ export declare function openRuntimeDb(): RuntimeDb;