| 1 | export interface WorktreeMergeInspection { |
| 2 | available: boolean; |
| 3 | reason?: string; |
| 4 | canMerge: boolean; |
| 5 | alreadyMerged: boolean; |
| 6 | worktreeRoot?: string; |
| 7 | sourceRoot?: string; |
| 8 | worktreeBranch?: string; |
| 9 | targetBranch?: string; |
| 10 | createdHead?: string; |
| 11 | worktreeHead?: string; |
| 12 | worktreeStateToken?: string; |
| 13 | targetHead?: string; |
| 14 | aheadCount: number; |
| 15 | behindCount: number; |
| 16 | filesChanged: number; |
| 17 | insertions: number; |
| 18 | deletions: number; |
| 19 | changedFiles: string[]; |
| 20 | hasConflicts: boolean; |
| 21 | conflictFiles: string[]; |
| 22 | worktreeDirty: boolean; |
| 23 | sourceDirty: boolean; |
| 24 | blockers: WorktreeMergeBlocker[]; |
| 25 | cleanupBlockers: WorktreeMergeBlocker[]; |
| 26 | } |
| 27 | |
| 28 | export interface WorktreeMergeBlocker { |
| 29 | code: string; |
| 30 | message: string; |
| 31 | paths: string[]; |
| 32 | } |
| 33 | |
| 34 | export interface WorktreeMergeRequest { |
| 35 | tabId: string; |
| 36 | expectedTargetBranch: string; |
| 37 | expectedTargetHead: string; |
| 38 | expectedWorktreeHead: string; |
| 39 | expectedWorktreeStateToken: string; |
| 40 | autoCommitDirty: boolean; |
| 41 | } |
| 42 | |
| 43 | export interface CloseMergedWorktreeTabRequest { |
| 44 | tabId: string; |
| 45 | worktreeRoot: string; |
| 46 | sourceTabId: string; |
| 47 | sourceRoot: string; |
| 48 | navigationIntentToken: string; |
| 49 | } |
| 50 | |
| 51 | export interface CloseMergedWorktreeTabResult { |
| 52 | closed: boolean; |
| 53 | idempotent: boolean; |
| 54 | } |
| 55 | |
| 56 | export interface WorktreeMergeResult { |
| 57 | merged: boolean; |
| 58 | alreadyMerged: boolean; |
| 59 | recoveryRequired: boolean; |
| 60 | sourceRoot?: string; |
| 61 | targetBranch?: string; |
| 62 | targetHead?: string; |
| 63 | mergedCommit?: string; |
| 64 | worktreeRoot?: string; |
| 65 | worktreeBranch?: string; |
| 66 | worktreeHead?: string; |
| 67 | error?: string; |
| 68 | } |
| 69 | |
| 70 | export interface WorktreeCleanupRequest { |
| 71 | worktreeRoot: string; |
| 72 | sourceRoot: string; |
| 73 | targetBranch: string; |
| 74 | mergedCommit: string; |
| 75 | worktreeBranch: string; |
| 76 | worktreeHead: string; |
| 77 | } |
| 78 | |
| 79 | export interface WorktreeCleanupResult { |
| 80 | completed: boolean; |
| 81 | worktreeRemoved: boolean; |
| 82 | branchDeleted: boolean; |
| 83 | recoveryRetained?: boolean; |
| 84 | recoveryRoot?: string; |
| 85 | recoveryWorktreeRegistered?: boolean; |
| 86 | branchRetained?: boolean; |
| 87 | blockers: WorktreeMergeBlocker[]; |
| 88 | error?: string; |
| 89 | } |
| 90 |