import { type BuildAssetKind } from "./build-cache.js";
import { type AssetFreshness } from "./build-asset-metadata.js";
import { type LoadedProjectConfig } from "./project-config.js";
import { type StoryboardValidationIssue } from "./storyboard-edit.js";
export type BuildStage = "assets" | "compose" | "sync" | "render" | "all";
export type BuildPlanStatus = "ready" | "invalid";
export type AssetPlanReason = "canonical-exists" | "canonical-stale" | "canonical-unknown" | "content-cache-hit" | "force" | "missing" | "referenced-asset" | "invalid-reference" | "stage-skipped";
export type ProviderResolutionKind = BuildAssetKind | "composer";
export type ProviderResolutionSource = "cli" | "storyboard" | "project-config" | "default" | "auto";
export interface BuildPlanBeat {
    id: string;
    heading: string;
    durationSec: number | null;
    cues: Record<string, unknown>;
    assets: {
        narration: AssetPlan | null;
        backdrop: AssetPlan | null;
        video: AssetPlan | null;
        music: AssetPlan | null;
    };
    composition: {
        path: string;
        exists: boolean;
    };
}
export interface AssetPlan {
    kind: BuildAssetKind;
    cue: string;
    provider: string;
    path: string;
    cachePath?: string;
    cacheKey?: string;
    metadataPath?: string;
    freshness?: AssetFreshness;
    sourcePath?: string;
    referenceError?: string;
    exists: boolean;
    canonicalExists: boolean;
    cacheHit: boolean;
    willCopyFromCache: boolean;
    willGenerate: boolean;
    estimatedCostUsd: number;
    reason: AssetPlanReason;
}
export interface ProviderResolution {
    kind: ProviderResolutionKind;
    requested: string | null;
    resolved: string;
    source: ProviderResolutionSource;
    requiresKey: boolean;
    configured: boolean;
    configKey?: string;
    missingKey?: string;
    retryWith: string[];
}
export interface BuildPlanResult {
    schemaVersion: "1";
    kind: "build-plan";
    projectDir: string;
    config: LoadedProjectConfig;
    stage: BuildStage;
    status: BuildPlanStatus;
    currentStage: BuildStage;
    mode: "agent" | "batch" | "auto";
    beat: string | null;
    beats: BuildPlanBeat[];
    missing: string[];
    providers: string[];
    providerResolution: ProviderResolution[];
    estimatedCostUsd: number;
    summary: BuildPlanSummary;
    nextCommands: string[];
    warnings: string[];
    retryWith: string[];
    validation: {
        ok: boolean;
        issues: StoryboardValidationIssue[];
    };
}
export interface BuildPlanSummary {
    beats: number;
    missing: string[];
    providers: string[];
    estimatedCostUsd: number;
    validationErrors: number;
    validationWarnings: number;
}
export interface CreateBuildPlanOptions {
    projectDir: string;
    stage?: BuildStage;
    beat?: string;
    mode?: "agent" | "batch" | "auto";
    skipNarration?: boolean;
    skipBackdrop?: boolean;
    skipVideo?: boolean;
    skipMusic?: boolean;
    ttsProvider?: string;
    voice?: string;
    imageProvider?: string;
    imageQuality?: "standard" | "hd";
    imageSize?: string;
    videoProvider?: string;
    musicProvider?: string;
    composer?: string;
    force?: boolean;
}
export declare function createBuildPlan(opts: CreateBuildPlanOptions): Promise<BuildPlanResult>;
