import type { NodeIdDTO } from './common.js'; /** `POST /v1/nodes/{id}/worktree/close` result. */ export interface CloseWorktreeResultDTO { node_id: NodeIdDTO; /** The worktree branch fast-forwarded into its recorded local base branch. */ branch: string; worktree_path: string; /** The commit SHA the recorded local base branch was fast-forwarded onto. */ landed_sha: string; /** False while the caller's checkout remains registered for deferred cleanup. * `worktree_remove_error` names that state and the safe follow-up. */ worktree_removed: boolean; worktree_remove_error?: string; /** False while the local branch remains checked out by the deferred cleanup. */ branch_deleted: boolean; branch_delete_error?: string; /** Present ONLY when landing had to stash local changes in the base checkout * and re-applying them conflicted: names the preserved stash and how to * re-apply it. Its absence means nothing local was left over. */ base_checkout_stash?: string; } export interface AbandonWorktreeRequest { by: string; } export interface AbandonWorktreeResultDTO { node_id: NodeIdDTO; branch: string; tip_sha: string; worktree_path: string; branch_deleted: boolean; } /** A daemon-cleanup refusal retained for human intervention. */ export interface QuarantinedWorktreeDTO { node_id: string; path: string; branch: string; repo_root: string; reason: string; detail?: string; attempts: number; last_attempt: string; /** Bytes occupied by the checkout, or null when it is gone or unmeasurable. */ size_bytes: number | null; }