import type { DatabaseAdapter } from "../db.js";
import type { ClientSurface } from "../sources.js";
/**
 * Antigravity (Google's Antigravity IDE/CLI, built on the Gemini stack) writes one JSONL
 * transcript file per conversation at:
 *
 *   <root>/brain/<conversation-id>/.system_generated/logs/transcript.jsonl
 *
 * (or `transcript_full.jsonl` as a fallback -- scanner.ts is responsible for picking exactly one
 * of the two per conversation directory before this adapter ever sees a candidate file, so this
 * adapter only ever imports a single file per conversation-id).
 *
 * IMPORTANT: this shape (the `brain/<id>/.system_generated/logs/transcript*.jsonl` path
 * convention and the per-line fields below) is reverse-engineered from public
 * documentation/community sources, not an official Antigravity/Gemini API or schema. It may shift
 * across Antigravity releases. Every read in this file must degrade gracefully (skip the line/
 * file, emit a warning) when a field is missing or has an unexpected type -- never throw on an
 * unexpected shape.
 *
 * Token usage is not exposed by this local storage, so `token_available` always reports 0/false
 * for Antigravity sessions and messages, the same convention other unofficial-schema adapters
 * (Cursor) use when their source has no usable token counters.
 *
 * Privacy: the `content` field of each transcript line is prompt/response text and must NEVER be
 * read, stored, or hashed into anything persisted -- only structural fields (step_index, type,
 * source, created_at, tool_calls[].name) are ever touched.
 */
interface ImportCounters {
    sessions_upserted: number;
    messages_upserted: number;
    runtime_events_upserted: number;
}
interface WarningEntry {
    code: string;
    message_code: string;
    severity: "info" | "warning" | "error";
    source_file_id?: string;
    details?: Record<string, number | string | boolean>;
}
export declare function importAntigravityFile(context: {
    db: DatabaseAdapter;
    sourceFileId: string;
    machineId: string;
    hmacSalt: string;
    clientSurface: Extract<ClientSurface, "cli" | "code">;
}, absolutePath: string): Promise<{
    counters: ImportCounters;
    warnings: WarningEntry[];
}>;
export {};
