import type { DatabaseAdapter } from "../db.js";
import { type FileImportWarning } from "./file-import-contract.js";
/**
 * Antigravity keeps one SQLite store per conversation (`conversations/<conversation-id>.db`) whose
 * `gen_metadata` rows are protobuf generation records. The layout is reverse-engineered, not an
 * official schema, so only one narrowly validated message is read:
 *   1.4.2 uncached input, 1.4.3 output, 1.4.5 cached input, 1.4.9 thinking, 1.4.10 visible output,
 *   1.9.4 {1: epoch seconds, 2: nanos} generation time, 1.21 model display name.
 * A record is accepted only when output == thinking + visible output (whenever both are present)
 * and a valid timestamp exists; anything else is skipped and counted, never guessed. Prompt or
 * response content is never decoded: only varints and the short model name are read.
 * Rows attach to the transcript session of the same conversation id (see antigravity.ts); if the
 * transcript is missing, a technical `task` session holds them until the transcript upserts it.
 */
interface ImportContext {
    db: DatabaseAdapter;
    sourceFileId: string;
    machineId: string;
    hmacSalt: string;
}
interface ImportCounters {
    sessions_upserted: number;
    messages_upserted: number;
    runtime_events_upserted: number;
}
export declare function isAntigravityConversationDbPath(fullPath: string): boolean;
export interface AntigravityUsageRecord {
    at: string;
    model: string | null;
    input: number;
    output: number;
    cacheRead: number;
    reasoning: number;
}
export declare function parseAntigravityGenerationMetadata(data: Buffer): AntigravityUsageRecord | null;
export declare function importAntigravityConversationDb(context: ImportContext, absolutePath: string): Promise<{
    counters: ImportCounters;
    warnings: FileImportWarning[];
}>;
export {};
