import type { PatchAction } from "./BuilderOutputParser.js"; export interface PatchApplyResult { touched: string[]; } export type PatchPolicyReasonCode = "patch_outside_workspace" | "patch_outside_allowed_scope" | "patch_read_only_path" | "destructive_operation_blocked" | "writes_disabled_by_profile"; export interface PatchPolicyErrorMetadata { reason_code: PatchPolicyReasonCode; file: string; normalized_file: string; action: PatchAction["action"]; allowed_paths?: string[]; read_only_paths?: string[]; policy?: string; } export declare class PatchPolicyError extends Error { readonly metadata: PatchPolicyErrorMetadata; constructor(message: string, metadata: PatchPolicyErrorMetadata); } export interface PatchApplyPolicy { allowWritePaths?: string[]; readOnlyPaths?: string[]; allowDestructiveOperations?: boolean; allowWrites?: boolean; } export interface PatchApplierOptions { workspaceRoot: string; validateFile?: (filePath: string) => Promise | void; policy?: PatchApplyPolicy; } export interface PatchRollbackEntry { file: string; normalizedFile: string; resolved: string; existed: boolean; content?: string; } export interface PatchRollbackPlan { entries: PatchRollbackEntry[]; } export declare class PatchApplier { private options; constructor(options: PatchApplierOptions); private resolvePolicy; private resolvePatchTarget; createRollback(patches: PatchAction[], policyOverride?: PatchApplyPolicy): Promise; rollback(plan: PatchRollbackPlan): Promise; apply(patches: PatchAction[], policyOverride?: PatchApplyPolicy): Promise; } //# sourceMappingURL=PatchApplier.d.ts.map