import type { RunTextCommand } from '../gh-cli/exec.mts'; export type LivePullRequest = { body: string; headRefName: string; headRefOid: string; baseRefName: string; state: string; additions: number; deletions: number; changedFiles: number; }; /** The live pull request as gh reports it, whatever its state. */ export declare function readLivePullRequest(gh: RunTextCommand, pr: number): Promise; /** The live pull request, rejected unless it is open. */ export declare function livePullRequest(gh: RunTextCommand, pr: number): Promise; /** * The base to validate an existing pull request against: its live base. An explicit `base` that * differs is rejected, because `gh pr edit` here changes only the title and body. */ export declare function liveBase(pr: number, live: LivePullRequest, given: string | undefined): string; /** * Re-reads the live pull request just before the edit and aborts if its Shepherd Journal or base * changed since the body was prepared and validated, so an entry appended in between is never * overwritten and a retargeted PR never gets a body validated against its old base. */ export declare function assertJournalUnchanged(gh: RunTextCommand, pr: number, preparedFrom: string, base: string): Promise; /** The server's credential values that must never reach the policy or GitHub, longest first. */ export declare function credentials(env: NodeJS.ProcessEnv): string[]; /** Replaces every server credential in every string of a JSON-shaped value. */ export declare function redactCredentials(value: T, secrets: string[]): T;