/**
 * Local import/export/sync primitives for hosted-bridge workflows.
 * Produces stable JSON bundles — no automatic cloud calls from OSS.
 */
import type { Database } from "bun:sqlite";
import { type ExportProfile } from "./local-encryption.js";
import type { TaskDependency } from "../types/index.js";
export declare const BUNDLE_SCHEMA = "todos.bundle.v1";
export declare const BUNDLE_TYPES: readonly ["full_export", "tasks", "partial"];
export type BundleType = (typeof BUNDLE_TYPES)[number];
export declare const MERGE_STRATEGIES: readonly ["skip_existing", "remote_wins", "local_wins", "newest_wins"];
export type MergeStrategy = (typeof MERGE_STRATEGIES)[number];
export declare const CONFLICT_TYPES: readonly ["version_mismatch", "updated_at_newer_remote", "updated_at_newer_local", "missing_local", "missing_remote", "id_collision"];
export type ConflictType = (typeof CONFLICT_TYPES)[number];
export interface ImportExportBundle {
    schema_version: typeof BUNDLE_SCHEMA;
    bundle_type: BundleType;
    exported_at: string;
    source?: {
        machine_id?: string;
        hostname?: string;
    };
    project_id?: string | null;
    projects: Record<string, unknown>[];
    tasks: Record<string, unknown>[];
    plans: Record<string, unknown>[];
    dependencies: TaskDependency[];
    templates: Record<string, unknown>[];
    comments: Record<string, unknown>[];
    verification_records: Record<string, unknown>[];
    artifacts: Record<string, unknown>;
    metadata: Record<string, unknown>;
    export_profile?: ExportProfile;
    warnings?: string[];
}
export interface ExportLocalBundleOptions {
    project_id?: string;
    bundle_type?: BundleType;
    profile?: ExportProfile;
    acknowledge_plaintext?: boolean;
    include_templates?: boolean;
    include_comments?: boolean;
    include_dependencies?: boolean;
    include_verification?: boolean;
    include_artifacts?: boolean;
}
export interface SyncConflict {
    entity_type: string;
    entity_id: string;
    conflict_type: ConflictType;
    local_version?: number;
    remote_version?: number;
    local_updated_at?: string | null;
    remote_updated_at?: string | null;
    suggested_resolution: MergeStrategy;
}
export interface SyncPreview {
    schema_version: typeof BUNDLE_SCHEMA;
    compared_at: string;
    conflicts: SyncConflict[];
    summary: {
        create: number;
        update: number;
        skip: number;
        conflict: number;
    };
}
export interface ImportBundleOptions {
    strategy?: MergeStrategy;
    dry_run?: boolean;
}
export interface ImportResult {
    schema_version: typeof BUNDLE_SCHEMA;
    dry_run: boolean;
    created: Record<string, number>;
    updated: Record<string, number>;
    skipped: Record<string, number>;
    conflicts: SyncConflict[];
    errors: string[];
}
export declare function validateBundle(bundle: unknown): {
    valid: boolean;
    errors: string[];
};
export declare function exportLocalBundle(options?: ExportLocalBundleOptions, db?: Database): ImportExportBundle;
export declare function previewSync(bundle: ImportExportBundle, strategy?: MergeStrategy, db?: Database): SyncPreview;
export declare function importBundle(bundle: ImportExportBundle, options?: ImportBundleOptions, db?: Database): ImportResult;
export declare function writeBundleFile(bundle: ImportExportBundle, path: string): void;
export declare function readBundleFile(path: string): ImportExportBundle;
export declare function getBridgeDocs(): string;
//# sourceMappingURL=import-export-bridge.d.ts.map