import { type SqliteDatabase } from './driver.js'; /** * Resolves where *our* database lives. * * Deliberately homedir-based and NOT XDG_DATA_HOME-based. A sandboxed launcher * (the VSCode snap, for instance) sets XDG_DATA_HOME to a private path, which is * precisely how OpenCode's own history ended up split across two databases on * this machine. The MCP server and the CLI must always agree on one file, so the * only ways to move it are explicit: AI_USAGE_DB or AI_USAGE_HOME. */ export declare function resolveDatabasePath(): string; export interface OpenDatabaseOptions { path?: string; readonly?: boolean; } export declare function openDatabase(options?: OpenDatabaseOptions): SqliteDatabase; export declare function migrate(db: SqliteDatabase): void; export declare function schemaVersion(db: SqliteDatabase): number;