export interface IngestYouTubeOptions {
    workId: string;
    url: string;
    /** BCP-47 target language for translation. e.g. "zh-CN". */
    targetLanguage?: string;
    /** Override OpenRouter chat model for translation. */
    translateModel?: string;
    /** Optional source-time start (seconds). When combined with `endSec`,
     *  yt-dlp downloads only this window via --download-sections. */
    startSec?: number;
    /** Optional source-time end (seconds). */
    endSec?: number;
}
export interface IngestYouTubeResult {
    ok: true;
    workId: string;
    sourceClipPath: string;
    durationSec: number;
    segmentCount: number;
    language: string;
    targetLanguage: string;
}
export interface IngestYouTubeError {
    ok: false;
    step: "validate" | "download" | "probe" | "transcribe" | "translate" | "compose";
    error: string;
    code?: string;
}
interface SourceSegment {
    start: number;
    end: number;
    text: string;
}
interface TranslatedSegment extends SourceSegment {
    translation: string;
}
export declare function ingestYouTubeIntoWork(opts: IngestYouTubeOptions): Promise<IngestYouTubeResult | IngestYouTubeError>;
declare function parseNumberedLines(content: string, expectedCount: number): string[];
declare function renderBriefMarkdown(opts: {
    url: string;
    durationSec: number;
    sourceLanguage: string;
    targetLanguage: string;
    segments: TranslatedSegment[];
}): string;
declare function buildCaptionModel(segments: TranslatedSegment[], language: string): {
    modelId: string;
    audioTrackId: null;
    language: string;
    segments: {
        segmentId: string;
        start: number;
        end: number;
        text: string;
    }[];
    groups: {
        groupId: string;
        start: number;
        end: number;
        segmentIds: string[];
        style: Record<string, unknown>;
        animation: Record<string, unknown>;
    }[];
};
export declare const _internals: {
    parseNumberedLines: typeof parseNumberedLines;
    renderBriefMarkdown: typeof renderBriefMarkdown;
    buildCaptionModel: typeof buildCaptionModel;
};
export {};
//# sourceMappingURL=ingest-youtube.d.ts.map