import { BulkImportSourceAdapter, ImportTurn, BulkImportSource } from '@remnic/core'; /** * Adapter that conforms to `BulkImportSourceAdapter` from `@remnic/core`. * Delegates parsing to `parseWeCloneExport`. */ declare const wecloneImportAdapter: BulkImportSourceAdapter; /** * Extended ImportTurn that carries the original WeClone message_id so that the * threader can resolve reply chains (core's ImportTurn has no messageId field). */ interface WeCloneImportTurn extends ImportTurn { messageId?: string; } type WeClonePlatform = "telegram" | "whatsapp" | "discord" | "slack"; interface WeClonePreprocessedMessage { sender: string; text: string; timestamp: string; reply_to_id?: string; message_id?: string; } interface WeClonePreprocessedExport { platform: WeClonePlatform; messages: WeClonePreprocessedMessage[]; export_date?: string; } interface ParseOptions { /** Override the platform field from the export. */ platform?: WeClonePlatform; /** When true, throw on any validation failure instead of skipping. */ strict?: boolean; /** * Sender name that identifies the user (i.e. "self"). * Defaults to the first sender encountered in the messages array. */ selfSender?: string; /** * Sender names that should be treated as "assistant" (bot/AI). * Messages from other senders are assigned the "other" role. */ assistantSenders?: string[]; } /** * Parse a WeClone preprocessed export into a `BulkImportSource`. * * Accepts either: * - A `WeClonePreprocessedExport` object with `messages` array * - A raw array of `WeClonePreprocessedMessage` items */ declare function parseWeCloneExport(input: unknown, options?: ParseOptions): BulkImportSource; /** * Idempotently register the WeClone adapter with the core bulk-import * registry. Callable multiple times without throwing (CLAUDE.md #13: * secondary calls must not crash host processes that pre-register the * adapter for test fixtures). * * Returns true when the adapter was newly registered, false when an adapter * with the same name already exists. */ declare function ensureWecloneImportAdapterRegistered(): boolean; export { type ParseOptions, type WeCloneImportTurn, type WeClonePlatform, type WeClonePreprocessedExport, type WeClonePreprocessedMessage, ensureWecloneImportAdapterRegistered, parseWeCloneExport, wecloneImportAdapter };