import type { BoardEntry } from "../report/board-types.js"; import type { ResolvedConfig } from "../types.js"; /** * A handoff, injectable so a test and the visual gate can drive the whole pump * without a Terminal window opening on somebody's desk. */ export type Handoff = (resolved: ResolvedConfig, issue: string, tools: string[], turn: number) => Promise<{ launched: boolean; reason?: string; }>; /** For tests. Returns the previous one, so a test can put it back. */ export declare function setHandoff(next: Handoff): Handoff; /** * Whether this issue can still be won. * * An issue at its attempt cap gets ruled blocked by the next `verify-fix` * without being looked at, so handing it over is opening a window on a fight * that is already lost. The queue refuses it at the door instead. */ export declare function queueableReason(entry: BoardEntry | undefined, cap: number): string | null; /** * Advance the queue against whatever the board says right now. * * The one entry point everything outside this file uses: a route that just * changed the queue, the watcher noticing a run wrote, the backstop, and the * server's own start. It resolves the board through the payload's cache, so * the common case reads no files at all. */ export declare function pumpQueue(resolved: ResolvedConfig): Promise; /** * Bring the queue up to date with the board, and hand over the head if it is * the head's turn. * * `board` is the one the status payload just built. Building a second one here * would re-read the event log and every issue's state file, at up to twelve * times a second while a check is appending to it. */ export declare function advanceQueue(resolved: ResolvedConfig, board: BoardEntry[]): Promise;