/** * opencode-db-to-messages * * Reads session info and messages directly from OpenCode's internal SQLite * database (~/.local/share/opencode/opencode.db), bypassing the REST API. * * This is the fallback path used by indexer-cli when OpenCode was started * without --port (e.g. `opencode -s `), in which case no HTTP * server is started and the REST API is unavailable. * * The DB is opened read-only — no WAL conflicts, no write contention. */ import type { FullMessage } from "./types"; export interface OpenCodeSession { id: string; title: string; directory: string; } /** * Returns session metadata from the OpenCode DB, or null if not found. */ export declare function getSessionFromOpenCodeDb(sessionId: string, dbPath?: string): OpenCodeSession | null; /** * Returns all messages for a session from the OpenCode DB, in chronological * order, shaped as FullMessage[] (same format as the REST API response). * * Returns null if the DB is not accessible. */ export declare function getMessagesFromOpenCodeDb(sessionId: string, dbPath?: string): FullMessage[] | null; //# sourceMappingURL=opencode-db-to-messages.d.ts.map