import type { EscalateDetails, EscalateTrigger, ReviewThread } from "../../types.mts"; interface EscalateCheck { triggers: EscalateTrigger[]; thrashHistory?: EscalateDetails["thrashHistory"]; } export declare function checkEscalateTriggers(actionableThreads: ReviewThread[], threadAttempts: Record): EscalateCheck; interface BaseBranchLookup { branch: string; /** True when we could not confirm the branch name from GitHub. Callers must * escalate rather than emitting a rebase against a potentially-wrong base. */ isFallback: boolean; /** Populated when `isFallback`; one-line reason shown in escalate output. */ failureReason?: string; } /** * Validate the base branch name from the GraphQL batch (`report.baseBranch`) * and fall back safely if it's missing/unsafe. The branch is interpolated into * shell commands by `buildFixInstructions`, so we reject anything outside * `[A-Za-z0-9._/-]` to prevent shell injection. */ /** * Render a seconds count as an approximate human duration: "8 seconds" below one minute, * otherwise whole minutes ("166 minutes", "60 minutes") — matching the precision the * generic stall timer has always reported, just adding a seconds tier for sub-minute ages * instead of always flooring to "0 minutes". */ export declare function formatDurationApprox(seconds: number): string; export declare function validateBaseBranch(raw: string): BaseBranchLookup; export declare function buildEscalateHumanMessage(escalate: Omit, pr: string | number, opts?: { merge?: boolean; }): string; export declare function buildEscalateSuggestion(triggers: EscalateTrigger[], detail?: string): string; export {};