import { type ChainSeedHostDeps } from './seedance-chain-host.js'; import type { ProviderRouteId } from './provider-platform/types.js'; import type { VideoExecutionCancelResult, VideoExecutionPayload, VideoExecutionPlan, VideoExecutionPollResult } from './types.js'; /** * Assemble a scene's reference set, merging continuity + identity instead of * choosing one. A chain-from-prev keyframe video (when present) leads so * downstream adapters treat it as the primary seed; character Asset:// identity * refs follow. Only the "assets + chain" case differs from legacy behavior — * the other three branches are byte-identical to the prior either/or. * * Routing note: on seedance-direct, classifyReferencePaths sends Asset:// to * reference_images and the .mp4 keyframe to reference_videos, so the merged * array lands in the correct provider slots within the ≤9 img / ≤3 vid budget. */ export declare function resolveSceneReferencePaths(input: { resolvedAssetUris: string[]; chainSeedPath: string | null; packetOrBaseReferencePaths: string[]; /** * Always-appended references (e.g. a voice-clone video). Unlike image identity * URIs, these do NOT replace the base/packet refs — a voice clip is additive, so * a scene keeps its identity image (in packetOrBaseReferencePaths on Runway, or * the Asset:// URI on seedance) AND gains the voice. Default [] -> byte-identical. */ additionalReferencePaths?: string[]; }): string[]; /** * Structurally pin each scene character's locked costume into the scene prompt. * * For every character listed on the scene that has a registered profile with a * `costume`, append a deterministic clause `Keep in exactly.` * (using the profile's canonical display name, even if the scene listed a * differently-cased name). This is the wardrobe analog of the visual-descriptor * identity lock: it stops a recurring character drifting clothing/colour between * scenes (the real Satyavan dhoti-colour bug) by binding the on-screen body to * the locked costume rather than leaving it to prose. * * Pure & deterministic: * - Only scene characters are considered (cast order preserved). * - Characters without a costume contribute nothing. * - Idempotent: a clause already present in the prompt is not re-appended. * - No matching costume -> the prompt is returned BYTE-IDENTICAL. */ export declare function appendCostumeClauses(promptText: string, sceneCharacters: string[], costumeByLowerName: Map): string; /** * Canonical, project-agnostic per-scene render rules baked into EVERY scene's * animation/motion prompt by `buildExecutionPayload` (default-on; opt-out via the * `standingRenderRules` manifest flag or the `VCLAW_DISABLE_STANDING_RULES` * env kill-switch). Learned from real failures on the Savitri film: * * - MOTION: natural, physically-correct motion only; no fidgeting/twitching/ * jitter/morphing of faces or bodies; no fiddling with cloth; nothing new * appears/fades in/materializes; no duplicates or extra figures; full frame, * no border. * - AUDIO: only diegetic ambient sound; NO speech, dialogue, voices, singing, or * music (lips may mime only). Voices/music are overlaid in post, so the * rendered clip must be ambient-only. * * The first line is a stable SENTINEL used for idempotent injection — never * reword it without updating `appendStandingRenderRules`'s containment check. */ export declare const STANDING_RENDER_RULES: string; /** * Idempotently append the canonical {@link STANDING_RENDER_RULES} block to a * prompt. Pure & deterministic: * - Appends the block once, space-separated (no leading separator on an empty * prompt). * - If the block (matched by its leading sentinel) is already present anywhere * in the prompt, the prompt is returned BYTE-IDENTICAL (never double-appended). * * Gating is the caller's job — when the standing rules are disabled this helper * is simply not called, so the prompt is byte-identical to today. */ export declare function appendStandingRenderRules(promptText: string): string; export interface BuildExecutionPayloadOptions { /** * Restricts the payload to these scene indices. When omitted, all storyboard * scenes are included (legacy behavior). When provided, scenes not in the * list are dropped. */ sceneIndices?: number[]; /** * When true, resolves `chainFromPrev` seeds from the previous scene's * selected candidate. Only honored in candidate mode. */ resolveChainSeeds?: boolean; /** * Environment used for the pre-submission route-capability check (reads the * `VCLAW_ALLOW_UNSAFE_MODELS` escape hatch). Defaults to `process.env`. */ env?: NodeJS.ProcessEnv; /** * Opt-in PHASE-3 continuity loop. When true, for each task that has a * chain-from-prev seed we enrich `task.prompt` with a continuity cue derived * from the prior scene's rendered keyframe (Gemini when a key + an image seed * are available, else deterministic story-bible descriptors), and re-paste * the full cast/setting/prop descriptor block (StoryCraft anti-drift). * * When false/absent the payload is BYTE-IDENTICAL to today: no Gemini call, * no prompt mutation. Honored only when `resolveChainSeeds` produced seeds. */ continuityFeedback?: boolean; /** * Injected fetch for the continuity Gemini call (tests). Defaults to global * fetch via the key pool. Only used when `continuityFeedback` is true. */ continuityFetcher?: typeof fetch; /** * Injected I/O for hosting an auto-chain seed on the seedance-direct route * (ffmpeg last-frame extraction + Go Bananas upload). Tests pass fakes; in * production this defaults to `defaultChainSeedHostDeps(env)`. Only consulted * when the route is seedance-direct AND a local-video chain seed was resolved. */ chainSeedHost?: ChainSeedHostDeps; } /** * Error thrown when `resolveChainSeeds` is enabled and the upstream scene has * no selected candidate (or no usable video output). */ export declare class ChainFromPrevSourceMissingError extends Error { readonly code = "chain-from-prev-source-missing"; readonly sceneIndex: number; readonly sourceSceneIndex: number; constructor(sceneIndex: number, sourceSceneIndex: number, reason: string); } export declare function buildExecutionPayload(projectSlug: string, plan: VideoExecutionPlan, root?: string, options?: BuildExecutionPayloadOptions): Promise; export declare function submitExecutionPayload(payload: VideoExecutionPayload, options?: { env?: NodeJS.ProcessEnv; }): Promise<{ adapterCommand: string; externalJobId: string | null; rawResult: unknown; }>; export declare function pollExecutionPayload(input: { projectSlug: string; routeId: ProviderRouteId; externalJobId: string; outputDir: string; workspaceRoot: string; }, options?: { env?: NodeJS.ProcessEnv; }): Promise; export declare function cancelExecutionPayload(input: { projectSlug: string; routeId: ProviderRouteId; externalJobId: string; outputDir: string; workspaceRoot: string; }, options?: { env?: NodeJS.ProcessEnv; }): Promise; //# sourceMappingURL=execution-runtime.d.ts.map