import { ExecutionContext } from "./execution"; import { SourceFile } from "./tree"; import { Recipe } from "./recipe"; export interface RecipeRun { changeset: Result[]; } export declare class Result { readonly before?: SourceFile | undefined; readonly after?: SourceFile | undefined; constructor(before?: SourceFile | undefined, after?: SourceFile | undefined); diff(): Promise; } export declare function scheduleRun(recipe: Recipe, before: SourceFile[], ctx: ExecutionContext): Promise; export type ProgressCallback = (phase: 'parsing' | 'scanning' | 'processing', current: number, total: number, sourcePath: string) => void; /** * Streaming version of scheduleRun that yields results as soon as each file is processed. * This allows callers to print diffs immediately and free memory earlier. * * Accepts either an array or an async iterable of source files. Files are processed * immediately as they're yielded from the iterable, avoiding the need to collect all * files into memory before starting work. * * For scanning recipes, each file is scanned immediately as it's pulled from the generator, * then stored for the edit phase. The scan phase completes before any results are yielded. * * @param onProgress Optional callback for progress updates during scanning and processing phases. */ export declare function scheduleRunStreaming(recipe: Recipe, before: SourceFile[] | AsyncIterable, ctx: ExecutionContext, onProgress?: ProgressCallback): AsyncGenerator; //# sourceMappingURL=run.d.ts.map