import { type RunAgentFn } from "./hooks.js";
export interface WorkflowFileStat {
    isFile(): boolean;
    isDirectory(): boolean;
    mtimeMs: number;
}
export interface WorkflowFileSystem {
    readFile(path: string, encoding: BufferEncoding): Promise<string>;
    mkdir(path: string, options?: {
        recursive?: boolean;
    }): Promise<void>;
    rmdir(path: string): Promise<void>;
    stat(path: string): Promise<WorkflowFileStat>;
}
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<void>;
    onIterationEnd?: (iteration: number, result: IterationResult) => void | Promise<void>;
}
export type IterationResult = "completed" | "nothing_to_run" | "failed";
export declare function runDocumentWorkflow(options: DocumentWorkflowOptions): Promise<void>;
