import type { Message } from './types.js';
export type ImportSource = 'claude' | 'codex' | 'mempalace';
export type ImportKind = 'session' | 'drawer';
export interface ImportSourceStatus {
    source: ImportSource;
    detected: boolean;
    rootPath: string;
    artifactsFound: number;
    note?: string;
}
export interface ImportPreviewThread {
    sourcePath: string;
    sourceThreadId: string;
    name: string;
    cwd: string;
    model: string;
    provider: string;
    messageCount: number;
    createdAt: string;
    updatedAt: string;
}
export interface ImportPreview {
    source: ImportSource;
    artifactsFound: number;
    importableArtifacts: number;
    alreadyImportedArtifacts: number;
    totalMessages: number;
    threads: ImportPreviewThread[];
    warnings: string[];
}
export interface ImportRunResult {
    runId: string;
    source: ImportSource;
    importedArtifacts: number;
    skippedArtifacts: number;
    importedMessages: number;
    importedSessions: number;
    importedDrawers: number;
    warnings: string[];
}
export interface ImportRollbackResult {
    runId: string;
    deletedSessions: number;
    deletedDrawers: number;
    warnings: string[];
}
export interface ImportStatusSummary {
    ledgerEntries: number;
    runs: number;
    sessionsImported: number;
    drawersImported: number;
    bySource: Record<ImportSource, {
        sessions: number;
        drawers: number;
    }>;
}
interface ImportLedgerEntry {
    runId: string;
    source: ImportSource;
    kind: ImportKind;
    sourcePath: string;
    contentSha256: string;
    importedId: string;
    importedAt: string;
    messageCount?: number;
}
interface ParsedThread {
    sourcePath: string;
    sourceThreadId: string;
    name: string;
    cwd: string;
    model: string;
    provider: string;
    messages: Message[];
    createdAt: string;
    updatedAt: string;
    contentSha256: string;
}
interface ParsedDrawer {
    sourcePath: string;
    content: string;
    contentSha256: string;
    wing: string;
    room: string;
    tags: string[];
    importance: number;
}
interface ImportOptions {
    homeDir?: string;
    cwd?: string;
    limit?: number;
}
interface RunImportOptions extends ImportOptions {
    dryRun?: boolean;
}
interface ParseWarning {
    sourcePath: string;
    warning: string;
}
declare function parseClaudeThread(path: string): {
    thread: ParsedThread | null;
    warnings: ParseWarning[];
};
declare function parseCodexThread(path: string): {
    thread: ParsedThread | null;
    warnings: ParseWarning[];
};
declare function parseMempalaceDrawers(homeDir: string): {
    drawers: ParsedDrawer[];
    warnings: ParseWarning[];
};
declare function readLedger(): ImportLedgerEntry[];
declare function ledgerKey(source: ImportSource, kind: ImportKind, sourcePath: string, contentSha256: string): string;
export declare function scanImportSources(options?: ImportOptions): ImportSourceStatus[];
export declare function previewImport(source: ImportSource, options?: ImportOptions): ImportPreview;
export declare function runImport(source: ImportSource, options?: RunImportOptions): ImportRunResult;
export declare function rollbackImport(runId: string, cwd?: string): ImportRollbackResult;
export declare function importStatus(): ImportStatusSummary;
export declare const _internal: {
    parseClaudeThread: typeof parseClaudeThread;
    parseCodexThread: typeof parseCodexThread;
    parseMempalaceDrawers: typeof parseMempalaceDrawers;
    readLedger: typeof readLedger;
    ledgerKey: typeof ledgerKey;
};
export {};
