/** * Merge Manager * * Handles squash merging for autopilot branches. */ import { EventEmitter } from 'events'; import { BranchManager } from './branch-manager.js'; /** * Merge result */ export interface MergeResult { success: boolean; sourceBranch: string; targetBranch: string; commitHash?: string; error?: string; conflictFiles?: string[]; } /** * Merge Manager Options */ export interface MergeManagerOptions { workingDirectory: string; branchPrefix?: string; } /** * Merge Manager Events */ export interface MergeManagerEvents { 'merge:started': { sourceBranch: string; targetBranch: string; }; 'merge:completed': { result: MergeResult; }; 'merge:conflict': { sourceBranch: string; targetBranch: string; files: string[]; }; 'merge:aborted': { sourceBranch: string; targetBranch: string; }; } /** * Merge Manager * * Handles squash merging of worker branches to epic branches, * and epic branches to the base branch. */ export declare class MergeManager extends EventEmitter { private workingDirectory; private branchManager; constructor(options: MergeManagerOptions); /** * Squash merge a branch into another */ squashMerge(sourceBranch: string, targetBranch: string, commitMessage: string): Promise; /** * Merge worker branch to epic branch */ mergeWorkerToEpic(workerId: number, epicNumber: number, ticketTitle: string): Promise; /** * Merge epic branch to base branch */ mergeEpicToBase(epicNumber: number, epicTitle: string, baseBranch?: string): Promise; /** * Reset worker branch to epic branch */ resetWorkerToEpic(workerId: number, epicNumber: number): Promise; /** * Check if there are changes to commit */ private hasChangesToCommit; /** * Get conflict files */ private getConflictFiles; /** * Abort current merge */ abortMerge(): Promise; /** * Checkout a branch */ private checkoutBranch; /** * Cherry-pick a commit */ cherryPick(commitHash: string, targetBranch: string): Promise; /** * Rebase a branch onto another */ rebaseBranch(branchToRebase: string, ontoBranch: string): Promise; /** * Update epic branch from base */ updateEpicFromBase(epicNumber: number, baseBranch?: string): Promise; /** * Get branch manager */ getBranchManager(): BranchManager; /** * Set working directory */ setWorkingDirectory(dir: string): void; /** * Get working directory */ getWorkingDirectory(): string; } /** * Create a merge manager */ export declare function createMergeManager(options: MergeManagerOptions): MergeManager; //# sourceMappingURL=merge-manager.d.ts.map