import { type SessionDestinationInput } from "../session/session-manager"; import { type PreparedSessionImport, type SessionImportCompleted, type SessionImportProviderId } from "./types"; /** Bumped when normalization/rendering changes; persisted in provenance. */ export declare const EXTERNAL_IMPORT_CONVERTER_VERSION = 1; /** Persisted custom-entry type carrying import provenance (never enters LLM context). */ export declare const EXTERNAL_IMPORT_PROVENANCE_CUSTOM_TYPE = "session-import"; /** Persisted custom-message type carrying the reconstructed continuation context. */ export declare const EXTERNAL_IMPORT_CONTEXT_CUSTOM_TYPE = "session-import"; /** Hard source size limit; larger exports fail with `content_too_large`. */ export declare const EXTERNAL_IMPORT_SOURCE_MAX_BYTES: number; export interface ExternalSessionImportRequest { /** Explicit user-selected transcript/export file. */ sourcePath: string; /** Explicit provider; omitted = deterministic auto-detection. */ provider?: SessionImportProviderId; /** Import-owner workspace (recorded as the new session's cwd). */ cwd: string; /** Session destination; defaults to the workspace's managed session store. */ destination?: SessionDestinationInput; /** Test seam for deterministic provenance timestamps. */ now?: () => Date; } export interface SessionImportSourceIdentity { dev: bigint; ino: bigint; size: bigint; mtimeNs: bigint; ctimeNs: bigint; } /** * Phase 1: read, detect, parse, normalize, redact, and bound. Performs no * session mutation; safe to run before any session transition. */ export declare function prepareExternalSessionImport(request: Pick & { expectedIdentity?: SessionImportSourceIdentity; }): Promise; /** * Phase 2: materialize a prepared import as a NEW GJC session file and verify * it reopens as a resumable session. The caller's live session is untouched. */ export declare function materializeExternalSessionImport(prepared: PreparedSessionImport, options: Pick): Promise; /** Full import: prepare + materialize. Never switches the caller's session. */ export declare function importProviderSessionFile(request: ExternalSessionImportRequest): Promise; /** Human-facing summary lines for a completed import. */ export declare function formatProviderSessionImportSummary(result: SessionImportCompleted): string; /** Human-facing diagnostic for a failed import. */ export declare function formatProviderSessionImportError(error: unknown): string;