import { type RunOptions } from './run.mts'; export interface PullRequest { readonly headRefName?: string; readonly state?: string; readonly headRefOid?: string; readonly isCrossRepository?: boolean; readonly headRepository?: { readonly name?: string; } | null; readonly headRepositoryOwner?: { readonly login?: string; } | null; } export type Assessment = { readonly head: string; } | { readonly reason: string; }; export declare function readRepository(main: RunOptions): string | undefined; /** Clean status and no hidden index entries. Returns the HEAD commit or a reason. */ export declare function assessLocal(worktree: RunOptions): Assessment; /** * Needs a merged or closed same-repository PR for this branch whose head is exactly HEAD. That * also proves HEAD is published on GitHub, so deleted branches (squash merges) need no remote ref. */ export declare function assessPullRequest(branch: string, head: string, repository: string | undefined, main: RunOptions): string | undefined; /** A complete open list protects active branches; bounded recent history only proves candidates. */ export declare function readPullSnapshot(main: RunOptions, limit: number): readonly PullRequest[] | undefined; export declare function assessListedPulls(pulls: readonly PullRequest[] | undefined, branch: string, head: string, repository: string | undefined): string | undefined;