import { type Args } from './args.mts'; import { type PullRequestMode } from './pr-mode.mts'; export type RelatedIssue = { number: number; relation: 'closes' | 'refs'; reason: string; /** `owner/name` of a cross-repository issue (rendered lowercase); absent for this repository. */ repository?: string; }; export type PullRequestInput = { title: string; summary: string; impact: string; relatedIssues: RelatedIssue[]; /** Declares no source issue; relatedIssues beside it must all be `refs`. */ noSourceIssue?: { reason: string; }; details: string[]; base: string; /** The caller's claim only; the rendered Agent line comes from `agentLabel`. */ agent?: string; model?: string; /** The trusted mode, see {@link trustedMode}; never the caller's word alone. */ mode: PullRequestMode; workspaceSetup: string; }; /** A positive integer argument, such as a pull request number or an issue number. */ export declare function positiveInteger(value: unknown, label: string): number; /** Rechecked after redaction, which can lengthen a title. */ export declare function checkTitleLength(title: string): void; /** * Reads and validates the structured pull request fields shared by the three pr_* tools. The mode * comes from the server's `env`; the caller's optional `mode` can only narrow it. */ export declare function readPullRequestInput(args: Args, env: NodeJS.ProcessEnv): PullRequestInput;