/**
 * @module _shared/execute-fill-gaps
 * @description `executeFillGaps` — fill timeline gaps with AI-generated
 * video (Kling image-to-video). Extracted from the 562-line `.action()`
 * body in `commands/ai-fill-gaps.ts` in v0.69 Phase 4 finishing piece.
 *
 * The CLI handler in ai-fill-gaps.ts now just wires onProgress to an
 * ora spinner and prints humanLines on completion. The manifest entry
 * (`edit_fill_gaps`) calls this same function without onProgress and
 * returns humanLines as the result body — same logic, dual surface.
 */
export interface ExecuteFillGapsOptions {
    /** Timeline file or directory (resolved relative to cwd). */
    projectPath: string;
    /** Output project path. Defaults to overwriting the input. */
    output?: string;
    /** Directory for generated videos. Defaults to <projectDir>/footage. */
    dir?: string;
    /** Custom prompt for video generation. */
    prompt?: string;
    /** If true, only report gaps without generating. */
    dryRun?: boolean;
    /** Kling generation mode (std or pro). */
    mode?: "std" | "pro";
    /** Aspect ratio. */
    ratio?: "16:9" | "9:16" | "1:1";
    /** Override Kling API key. */
    apiKey?: string;
    /** Override ImgBB API key (used to host frames for Kling input). */
    imgbbApiKey?: string;
    /** Optional progress callback for streaming status updates. */
    onProgress?: (message: string) => void;
}
export interface FillGapsGapReport {
    start: number;
    end: number;
    duration: number;
    /** How much of the gap can be filled by extending the previous clip. */
    canExtendBefore: number;
    /** How much can be filled by extending the next clip. */
    canExtendAfter: number;
    /** Remaining duration that needs AI generation. */
    remainingGap: number;
}
export interface ExecuteFillGapsResult {
    success: boolean;
    /** Error message on failure. */
    error?: string;
    /** Human-readable status lines (CLI prints; manifest joins). */
    humanLines: string[];
    /** Per-gap analysis (always populated when success=true). */
    gaps?: FillGapsGapReport[];
    /** Gaps that need AI generation (subset of `gaps`). */
    gapsNeedingAI?: FillGapsGapReport[];
    /** Number of gaps actually filled (0 in dry-run / no-gaps cases). */
    generatedCount?: number;
    /** Final project path (input path or `options.output`). */
    outputPath?: string;
    /** True when no gaps were detected. */
    noGaps?: boolean;
    /** True when all gaps can be filled by extending adjacent clips. */
    allExtendable?: boolean;
    /** True when dry-run mode reported gaps without generating. */
    dryRun?: boolean;
}
export declare function detectVideoGaps(videoClips: Array<{
    startTime: number;
    duration: number;
}>, totalDuration: number): Array<{
    start: number;
    end: number;
}>;
export declare function analyzeGapFillability(gaps: Array<{
    start: number;
    end: number;
}>, videoClips: Array<{
    startTime: number;
    duration: number;
    sourceId: string;
    sourceStartOffset: number;
    sourceEndOffset: number;
}>, sources: Array<{
    id: string;
    url: string;
    type: string;
    duration: number;
}>): Array<{
    gap: {
        start: number;
        end: number;
    };
    canExtendBefore: number;
    canExtendAfter: number;
    remainingGap: number;
    gapStart: number;
}>;
export declare function executeFillGaps(options: ExecuteFillGapsOptions): Promise<ExecuteFillGapsResult>;
