/** * Conflict Handler * * Detects, parses, and resolves git merge conflicts with multiple strategies. */ import type { FileConflict, ConflictState, ConflictResolutionStrategy, ConflictResolutionResult, ManualResolution } from "../types.js"; export declare class ConflictHandler { private readonly worktreePath; private readonly logger; private cachedConflicts; constructor(worktreePath: string); /** * Check if the worktree has merge conflicts. */ hasConflicts(): Promise; /** * Detect and parse all conflicts in the worktree. */ detectConflicts(): Promise; /** * Get conflict state for tracking. */ getConflictState(taskId: string, worktreeId: string): Promise; /** * Resolve conflicts using the specified strategy. */ resolveConflicts(strategy: ConflictResolutionStrategy, manualResolutions?: ManualResolution[]): Promise; /** * Resolve all conflicts by accepting "ours" (current branch) version. */ private resolveWithOurs; /** * Resolve all conflicts by accepting "theirs" (incoming branch) version. */ private resolveWithTheirs; /** * Attempt automatic resolution by combining non-overlapping changes. * Falls back to keeping both versions separated by a marker. */ private resolveWithAuto; /** * Simple auto-merge: combine both versions with a separator comment. * For code files, this often results in both changes being kept. */ private autoMergeContent; /** * Apply manual resolutions provided by the user. */ private resolveManually; /** * Complete the merge after all conflicts are resolved. */ completeMerge(message?: string): Promise<{ success: boolean; commitHash?: string; error?: string; }>; /** * Abort the merge and return to pre-merge state. */ abortMerge(): Promise; /** * Get merge head information. */ getMergeInfo(): Promise<{ ours: string; theirs: string; oursRef: string; theirsRef: string; } | null>; } //# sourceMappingURL=conflict-handler.d.ts.map