export type GhErrorKind = 'not-found' | 'already-exists' | 'unauthed' | 'network' | 'timeout' | 'unknown'; export declare class GhError extends Error { readonly kind: GhErrorKind; readonly exitCode: number; readonly stderr: string; constructor(message: string, kind: GhErrorKind, exitCode: number, stderr: string); } export type GhReadiness = { ok: true; } | { ok: false; hint: string; }; export interface CreatePrOpts { base: string; head: string; title: string; body: string; } export type ExecFn = (file: string, args: string[]) => Promise<{ stdout: string; stderr: string; }>; export declare function _resetCacheForTest(): void; export declare function checkGhReady(opts?: { execFn?: ExecFn; ttlMs?: number; _now?: () => number; log?: (msg: string) => void; }): Promise; export declare function createPr(opts: CreatePrOpts, execFn?: ExecFn): Promise; export type ExecWithInputFn = (file: string, args: string[], input: string) => Promise<{ stdout: string; stderr: string; }>; export interface PostPrCommentOpts { pr: string; body: string; } export declare function postPrComment(opts: PostPrCommentOpts, execFn?: ExecWithInputFn): Promise; export declare function resolveCurrentBranchPr(execFn?: ExecFn): Promise;