/**
 * File-block Applier
 *
 * Materializes model output into the project tree. Models emit complete
 * files as fenced blocks:
 *
 *   ```file:relative/path/from/root.ts
 *   <entire file content>
 *   ```
 *
 * Whole-file emission is deliberate: small models are far more reliable
 * emitting complete files than unified diffs. Fences of 3+ backticks are
 * supported so file contents containing ``` can be wrapped in ````.
 */
export interface FileBlock {
    path: string;
    content: string;
}
export interface ApplyResult {
    /** Relative paths written to disk */
    filesWritten: string[];
    /** Blocks rejected with the reason (unsafe path, etc.) */
    rejected: Array<{
        path: string;
        reason: string;
    }>;
    /** Set when no file blocks were found at all */
    error?: string;
}
export type Applier = (output: string, projectRoot: string) => ApplyResult | Promise<ApplyResult>;
export interface RevertibleApply {
    result: ApplyResult;
    /** Restore every written file to its pre-apply state (idempotent). */
    restore: () => void;
}
/** Extract file blocks from model output without writing anything. */
export declare function parseFileBlocks(output: string): FileBlock[];
/**
 * Default applier: parse file blocks and write them under projectRoot.
 * Paths are validated against traversal and .git writes; oversized files
 * are rejected rather than truncated.
 */
export declare function applyFileBlocks(output: string, projectRoot: string): ApplyResult;
/**
 * Apply file blocks with a snapshot of the prior state of every target, so
 * the application can be undone. Used by the explorer to evaluate competing
 * candidates against the same baseline tree without git machinery.
 */
export declare function applyFileBlocksWithRollback(output: string, projectRoot: string): RevertibleApply;
//# sourceMappingURL=applier.d.ts.map