import type { BuildRunClientView, RunEventView } from './types'; export interface BuildRunWatchUpdate { run: BuildRunClientView; /** Events first observed on this poll, ordered as returned by the server. */ events: RunEventView[]; } export interface BuildRunWatchOptions { /** Initial exclusive event cursor. Defaults to zero. */ after?: number; /** Called for transient polling errors; polling continues unless the run is terminal. */ onError?: (error: unknown) => void; } export interface BuildRunWatchHandle { stop(): void; } /** * Poll a build view and its event cursor until stopped or the run reaches a * known terminal state. Unknown state strings remain untouched and nonterminal. */ export declare function watch(appId: string, runId: string, onUpdate: (update: BuildRunWatchUpdate) => void, options?: BuildRunWatchOptions): BuildRunWatchHandle;