import type { ProviderRouteId } from './provider-platform/types.js'; import type { VideoExecutionPayload } from './types.js'; export interface RunContractScene { sceneIndex: number; /** The candidate created for THIS submission (candidate mode), else null. */ candidateId: string | null; externalJobId: string | null; submittedAt: string; /** The SUBMITTED contract snapshot (frozen; the diff baseline). */ submittedPrompt: string; /** Resolved Asset://, @tag, chain-seed, voice — the exact array sent. */ submittedReferencePaths: string[]; submittedReferenceRole?: 'character' | 'keyframe'; submittedInputKind: 'text' | 'image' | 'video'; submittedDurationSeconds?: number; submittedCharacters: string[]; submittedChainedFromCandidateId?: string; /** sha256 of the stable-stringified contract fields — the diff fast-path. */ contractHash: string; } export interface RunContractArtifact { schemaVersion: 1; projectSlug: string; routeId: ProviderRouteId; /** The submit timestamp identifying this run (= report.generatedAt). */ runId: string; recordedAt: string; executionProfile: { aspectRatio: '16:9' | '9:16' | '1:1'; quality: 'fast' | 'quality'; resolution: '720p' | '1080p'; generateAudio: boolean; outputCount: number; veoModel?: 'fast' | 'quality' | 'lite' | 'free' | 'omni-flash'; }; scenes: RunContractScene[]; } export declare function runContractPathFor(root: string, slug: string): string; /** * Stable canonical hash of the per-scene contract fields used for the diff * fast-path. The field order is fixed and characters are sorted (set semantics); * referencePaths keep ORDER (a reorder is a meaningful divergence). Excludes * `submittedAt`/`candidateId`/`externalJobId` (run-instance metadata, not the * contract). */ export declare function hashRunContractScene(fields: { prompt: string; referencePaths: string[]; referenceRole?: 'character' | 'keyframe'; inputKind: 'text' | 'image' | 'video'; durationSeconds?: number; characters: string[]; chainedFromCandidateId?: string; }): string; export interface BuildRunContractInput { payload: VideoExecutionPayload; submittedAt: string; /** sceneIndex → candidateId for this submission (candidate mode). */ candidatesByScene?: Array<{ sceneIndex: number; candidateId: string; }>; externalJobId?: string | null; } /** Build the run-contract artifact from a just-submitted payload. PURE. */ export declare function buildRunContract(input: BuildRunContractInput): RunContractArtifact; export declare function writeRunContract(root: string, slug: string, artifact: RunContractArtifact): Promise; /** Read `artifacts/run-contract.json` (null when absent or malformed). */ export declare function readRunContract(root: string, slug: string): Promise; //# sourceMappingURL=run-status.d.ts.map