/**
 * `opensquid export / import` — entire ~/.opensquid/ state bundle.
 *
 * Used to back up everything the engine writes (codexes, lessons,
 * memories with .vec sidecars, hooks state under sessions/, project
 * ID cards, engine config) into a single portable archive. Re-import
 * on a fresh machine restores identical state.
 *
 * Format: tar.gz via system `tar` (bsdtar on macOS / Windows 10+,
 * GNU tar on Linux — all support `-czf` / `-xzf`). Reasoning: zero
 * new dependency, deterministic byte layout, easy to inspect via
 * `tar tzf`. Encryption deferred — pass through gpg externally for
 * now (`gpg -c <archive>`).
 *
 * Round-trip semantics:
 * - export writes tar.gz containing the entire ~/.opensquid/ tree
 *   relative to $HOME so paths remain portable across machines
 * - import accepts --merge (default — extracts on top of existing
 *   ~/.opensquid/, last-write-wins per file) or --replace (wipe
 *   ~/.opensquid/ first then extract). Vector index .vec sidecars
 *   carry through; engine rehydrates the in-memory HNSW on next
 *   spawn from those sidecars.
 *
 * Failure modes:
 * - missing tar binary → throw with install-tar hint
 * - existing output path → refuse without --force
 * - tar exit non-zero → propagate stderr
 * - --replace on non-empty ~/.opensquid/ + missing input archive → no
 *   data loss because we extract to a tmp dir first then atomic rename
 */
export declare class SystemExportError extends Error {
    readonly hint?: string | undefined;
    constructor(message: string, hint?: string | undefined);
}
export interface ExportOptions {
    /** Output archive path. Defaults to `./opensquid-<timestamp>.tar.gz`. */
    output?: string;
    /** Overwrite existing output path. */
    force?: boolean;
    /** Override the source data root (default: `LOOP_HOME` or `~/.opensquid/`). */
    dataRoot?: string;
}
export interface ExportResult {
    output: string;
    size_bytes: number;
}
export declare function exportSystem(opts?: ExportOptions): Promise<ExportResult>;
export interface ImportOptions {
    /** Source archive path. */
    input: string;
    /**
     * `merge` (default): extract on top of existing data root, last-write
     * -wins per file. `replace`: wipe data root first then extract.
     */
    mode?: "merge" | "replace";
    /** Override the destination data root. */
    dataRoot?: string;
}
export interface ImportResult {
    input: string;
    data_root: string;
    mode: "merge" | "replace";
}
export declare function importSystem(opts: ImportOptions): Promise<ImportResult>;
//# sourceMappingURL=system-export.d.ts.map