// Single source of truth for the worktree work-loss guard type.
// WorktreeRiskReport: returned by BooCoder's checkWorktreeWorkAtRisk, passed
// through the server, and consumed by the web dialog. Three-way contract.

export interface WorktreeRiskReport {
  worktreePath: string;
  branch: string;
  dirty: boolean;
  unpushed: number; // commits ahead of upstream, or -1 if no upstream is set
  unmerged: number; // commits on this branch not in the project default branch
  atRisk: boolean;  // dirty || unmerged > 0 || (upstream && unpushed > 0) || git error
  error?: string;   // populated on a git failure; presence forces atRisk
}
