import { type RunAgentFn } from "./hooks.js"; export interface WorkflowFileStat { isFile(): boolean; isDirectory(): boolean; mtimeMs: number; } export interface WorkflowFileSystem { readFile(path: string, encoding: BufferEncoding): Promise; mkdir(path: string, options?: { recursive?: boolean; }): Promise; rmdir(path: string): Promise; stat(path: string): Promise; } export interface DocumentWorkflowOptions { cwd: string; homeDir: string; docPath: string; fs: WorkflowFileSystem; runAgent: RunAgentFn; readConfig: (content: string) => { frontmatter: any; body: string; } | Promise<{ frontmatter: any; body: string; }>; signal?: AbortSignal; onIterationStart?: (iteration: number) => void | Promise; onIterationEnd?: (iteration: number, result: IterationResult) => void | Promise; } export type IterationResult = "completed" | "nothing_to_run" | "failed"; export declare function runDocumentWorkflow(options: DocumentWorkflowOptions): Promise;