import { ImporterAdapter, ImportedMemory } from '@remnic/core'; /** * A single Gemini Apps activity record. Other `header` values (Search, Maps, * YouTube) co-exist in the same file when the user exports multiple products; * we filter to Gemini Apps only. */ interface GeminiActivityRecord { header?: string; title?: string; titleUrl?: string; /** Newer exports put the prompt text here. */ text?: string; /** ISO 8601 timestamp of the prompt. */ time?: string; products?: string[]; subtitles?: Array<{ name?: string; url?: string; }>; /** Some exports embed the model response as a follow-up subtitle. */ details?: Array<{ name?: string; }>; } interface ParsedGeminiExport { /** Prompts filtered to `header === "Gemini Apps"`. */ activities: GeminiActivityRecord[]; filePath?: string; } interface GeminiParseOptions { strict?: boolean; filePath?: string; /** * When true, keep records even if their header is not "Gemini Apps". * Default false — we only import Gemini activity. */ keepNonGemini?: boolean; } /** * Parse a Takeout activity payload. Accepts a JSON string, parsed object, or * parsed array. Non-Gemini records are filtered out by default. */ declare function parseGeminiExport(input: unknown, options?: GeminiParseOptions): ParsedGeminiExport; /** * Extract the user prompt text from an activity record. Newer exports put it * in `text`; older ones nest it inside `title` as "Asked: ". Returns * `undefined` when no usable prompt is present. */ declare function extractUserPrompt(record: GeminiActivityRecord): string | undefined; declare const adapter: ImporterAdapter; /** Alias kept for symmetry with other @remnic/import-* packages. */ declare const geminiAdapter: ImporterAdapter; declare const GEMINI_SOURCE_LABEL = "gemini"; interface GeminiTransformOptions { /** Optional cap on total memories emitted — primarily for tests. */ maxMemories?: number; /** * Minimum prompt length (in characters) to import. Very short prompts * ("yes", "ok", "tell me more") provide little durable signal. Default 10. */ minPromptLength?: number; } /** * Transform a parsed Gemini export into `ImportedMemory[]`. One memory per * Gemini activity record containing a non-trivial user prompt. */ declare function transformGeminiExport(parsed: ParsedGeminiExport, options?: GeminiTransformOptions): ImportedMemory[]; export { GEMINI_SOURCE_LABEL, type GeminiActivityRecord, type GeminiParseOptions, type GeminiTransformOptions, type ParsedGeminiExport, adapter, extractUserPrompt, geminiAdapter, parseGeminiExport, transformGeminiExport };