import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent"; import type { MergedConfig } from "../../config/config-layer.js"; import type { OrchestratorTranscriptWriter } from "../../subagent/orchestrator-transcript.js"; import { type PhaseDescriptor } from "../run-task.js"; import type { RunBugPipelineResult } from "./run-bug-types.js"; export type BugVerdictLoopOutcome = { kind: "advance"; } | { kind: "loopback"; toIndex: number; } | { kind: "return"; result: RunBugPipelineResult; }; export interface BugVerdictLoopParams { phase: PhaseDescriptor; bugId: string; storeCli: string; cwd: string; forgeRoot: string; iterationCounts: Record; currentPhaseIndex: number; modelRoutingConfig: MergedConfig; ctx: ExtensionCommandContext; orchTranscript: OrchestratorTranscriptWriter; /** Per-role phase-summary key map (BUG_SUMMARY_KEY_BY_ROLE). */ summaryKeyByRole: Record; /** Closure that finalizes this dispatch's OrchestratorTree node. */ finishPhaseNode: (status: "completed" | "failed" | "escalated") => void; /** Per-phase completion-recovery guard (forge-engineering#41) — roles that * already consumed their one set-bug-summary recovery attempt this run. */ recoveredPhases: Set; } /** * Evaluate the review-phase verdict and decide the loop's next move. * Mirrors the inline block that previously lived in runBugPipelineInner. */ export declare function handleBugReviewVerdict(p: BugVerdictLoopParams): Promise;