import type { MotionOverlayPlan, MotionTake } from './types.js'; /** Pure: pull the prompt body out of a `prompts/take-NN.md` — the text between the * first pair of ``` fences (the ready-to-paste Omni prompt). Falls back to the * whole doc if no fence is present. */ export declare function extractPromptBlock(md: string): string; /** One pack entry: a take's clip + its prompt file (basenames, inside the pack). */ export interface FlowPackEntry { index: number; clip: string; prompt: string; span: string; } /** Pure: the README walking the operator through the Flow web hand-off. */ export declare function flowPackReadme(args: { entries: FlowPackEntry[]; style: string; layout: string; }): string; /** Injectable fs seam for the pack writer (tests pass fakes). */ export interface EmitFlowPackDeps { copyFile?: (src: string, dst: string) => Promise; readFile?: (p: string) => Promise; writeFile?: (p: string, data: string) => Promise; } export interface FlowPackResult { packDir: string; entries: FlowPackEntry[]; } /** * Emit the hand-off pack into `outDir`: copy each take clip, write its prompt as a * clean `.txt`, and a README. Reads the take + prompt files the planner already * wrote under `plan.workdir`. Pure control flow over injectable fs. */ export declare function emitFlowPack(plan: MotionOverlayPlan, outDir: string, deps?: EmitFlowPackDeps): Promise; /** * Pure: pair each take (in order) with its returned animated clip. Prefers a file * whose name contains the take's `take-0N` token; otherwise falls back to sorted * positional order. Returns `null` for a take with no matching output. */ export declare function pairFlowOutputs(takes: MotionTake[], files: string[]): Array<{ take: MotionTake; file: string | null; }>; /** * Pure: ffmpeg concat-filter args joining N restored clips into one reel (re-encode; * robust across heterogeneous inputs). `-y` is prepended by the runner. */ export declare function buildConcatArgs(clips: string[], outputPath: string): string[]; /** Injectable ffmpeg seam for restitch. */ export type FfmpegRunner = (args: string[]) => Promise; export interface RestitchResult { outputPath: string; takeCount: number; restored: string[]; } /** * Restitch: for each take, re-mux the operator's downloaded animated clip with the * take's ORIGINAL audio (`buildAudioRestoreArgs`), then concat into the final reel. * Throws if a take has no matching animated output. */ export declare function restitchFlowOutputs(plan: MotionOverlayPlan, flowOutDir: string, outputPath: string, deps: { ffmpeg: FfmpegRunner; listDir?: (d: string) => Promise; }): Promise; //# sourceMappingURL=flow-pack.d.ts.map