/** * Deterministic source-format detection (issue #3709). * * Detection inspects only the already-read source bytes: a bounded leading * sample decides JSONL-vs-JSON and provider by envelope markers. An explicit * `--provider` selection narrows candidates; a sample that matches a different * provider than requested fails closed with `format_mismatch`. Detection never * guesses: a sample matching no supported envelope fails with * `unsupported_format` rather than falling back to a speculative parse. */ import { type SessionImportFormatId, type SessionImportProviderId } from "./types"; export interface SessionImportDetection { provider: SessionImportProviderId; format: SessionImportFormatId; } /** * Detect the provider/format of an explicit transcript file. * * @param text Full source text (already size-bounded by the caller). * @param requestedProvider Explicit provider selection; undefined = auto. */ export declare function detectSessionImportFormat(text: string, requestedProvider: SessionImportProviderId | undefined): SessionImportDetection;