import type { RunTextCommand } from '../gh-cli/exec.mts'; import type { Args } from './args.mts'; import { type ToolContext } from './context.mts'; import type { PolicyRun } from './policy-run.mts'; import { type PullRequestInput } from './pr-input.mts'; export type Prepared = { input: PullRequestInput; head: string; body: string; errors: string[]; warnings: string[]; /** The live body the update was prepared from. */ liveBody?: string; }; /** * `create` has no live pull request. `update` requires one that is OPEN and whose head is the * worktree branch. `validate` only reads one, of any state and head, for its Shepherd Journal, * base and head. */ export type PrepareKind = 'create' | 'update' | 'validate'; export declare function gitIn(context: ToolContext): RunTextCommand; export declare function ghIn(context: ToolContext): RunTextCommand; export declare function policyFor(context: ToolContext): Omit; /** Renders the body, preserves the live journal for an update, and runs the policy validator. */ export declare function prepare(args: Args, context: ToolContext, kind: PrepareKind, pr: number | undefined): Promise;