import type { Command } from "commander"; import { type WorkflowExecutionResult } from "../client.js"; /** Friendly message when we can't resolve a ref (no git, no repo, no commits). */ export declare const REF_RESOLUTION_ERROR = "Failed to resolve git HEAD ref. Ensure you are in a git repository with at least one commit, or pass --ref explicitly."; /** Resolve the ref to test: the explicit --ref, else current git HEAD. Throws * REF_RESOLUTION_ERROR (no raw stack trace) when git can't resolve it. `runGit` * is injectable for tests. */ export declare function resolveRef(explicit?: string, runGit?: () => string): string; export declare function isTerminalStatus(status: string): boolean; /** Non-zero only on a real failure, so `--wait` can gate the loop. */ export declare function exitCodeForStatus(status: string): number; /** Human-readable summary of a regression run: glyph + pass-rate meter, then * the raw test counts below. */ export declare function formatResultSummary(res: WorkflowExecutionResult): string; /** Minimal client surface these helpers need — keeps them mockable in tests. */ export interface ExecutionResultClient { getExecutionResult(org: string, execId: string): Promise; } /** Poll a run's result every `intervalMs` until it reaches a terminal status or * the timeout elapses. `sleep`/`now` are injectable so tests don't wall-clock. * A transient `getExecutionResult` failure (network blip) does NOT reject the * whole wait: before the deadline it sleeps and retries; at/after the deadline * it returns timed-out (with the last error surfaced). */ export declare function pollUntilTerminal(client: ExecutionResultClient, org: string, execId: string, opts: { timeoutMs: number; intervalMs: number; sleep?: (ms: number) => Promise; now?: () => number; }): Promise<{ result: WorkflowExecutionResult; timedOut: boolean; lastError?: string; }>; /** Fetch a run's result once and print it. Returns the process exit code. */ export declare function fetchAndReport(client: ExecutionResultClient, org: string, execId: string, opts?: { json?: boolean; yaml?: boolean; log?: (s: string) => void; }): Promise; /** Poll a run to completion and print the outcome. Returns the exit code * (non-zero on failure or timeout so the loop can gate on it). */ export declare function waitAndReport(client: ExecutionResultClient, org: string, execId: string, opts: { json?: boolean; yaml?: boolean; timeoutMs: number; intervalMs: number; log?: (s: string) => void; sleep?: (ms: number) => Promise; now?: () => number; }): Promise; export declare function registerRegressionCommand(program: Command): void; //# sourceMappingURL=regression.d.ts.map