export interface GitAvailability { /** * `ok` - a usable `git` was found and answered `--version`. * `absent` - positively no `git` binary (ENOENT). ONLY source of "not installed". * `blocked` - the probe itself could not conclude. A timeout, a shim * deadlock, a non-zero exit or empty output. NOT an absence. */ state: 'ok' | 'absent' | 'blocked'; /** Convenience: true only for `ok`. Prefer branching on `state`. */ ok: boolean; /** `git version 2.47.1.windows.1` when ok. */ version?: string; /** Absolute path the probe actually exercised (the shim filter's proof). */ resolvedPath?: string; /** Why the probe failed (spawn code, exit status, timeout, empty output). */ detail?: string; } /** Force the next call to re-probe (used by doctor/tests). */ export declare function resetGitAvailabilityCache(): void; /** Cached probe result. Never throws. */ export declare function probeGit(): GitAvailability; /** True when a usable `git` binary exists. */ export declare function isGitAvailable(): boolean; /** * True when the ONLY reason isolation is unavailable is a failed probe. * * Isolation must FAIL the run rather than degrade into the linked folder * (see `wake-handler.ts`), so a `blocked` probe is a hard stop: we do not know * whether git works, and guessing "no" is exactly the bug this tri-state fixes. */ export declare function isGitDefinitivelyAbsent(): boolean; /** * The task comment explaining why isolation is unavailable. Kept short and * actionable: they are looking at a task, not a log. * * The two states get DIFFERENT text on purpose. Telling someone to install git * when the probe merely deadlocked is how a working machine got told it had no * git - so `blocked` never mentions installing anything, and it never claims the * run carried on. * * There is deliberately NO string overload. Accepting a bare detail string is how * the old call site passed `'ENOENT'` and how another passed nothing at all, and * both shapes force the reader to guess which state is meant. Pass the probe * result, or nothing (which defaults to a fresh probe). */ export declare function gitUnavailableMessage(avail?: GitAvailability): string; /** * Credential/remote note for the run's closing comment: the flow never fails * on it, but the user should know why there is no PR. */ export declare function describeGitRemoteState(hasRemote: boolean, remoteUrl: string | null, hasToken: boolean): string;