import type { Logger } from "../shared/logger.js"; import type { PublishJob, PublishingApiClientOptions } from "./api/types.js"; export declare const DEFAULT_POLL_INTERVAL_S = 5; export declare const DEFAULT_WATCH_TIMEOUT_S = 1800; export declare const clampPollInterval: (raw: number | undefined) => number; /** * Watch a job until it reaches a terminal state. Emits one log line * per state change (or per processedCount delta in verbose mode); * in --json mode, writes one JSON object per emitted change to stdout. * * Returns the terminal job. Caller decides whether to throw on * failed/cancelled — different verbs have different exit-code * conventions. * * Throws ScaiError on the watch timeout (NETWORK) so CI pipelines fail * loudly instead of swallowing a hung publish. */ export declare const watchPublishJob: (logger: Logger, client: PublishingApiClientOptions, jobId: string, pollIntervalS: number, timeoutS: number) => Promise; /** * Print the human-readable summary for a single job, including * failure diagnostics when the job ended in `failed`. Used by both * the one-shot status path and the final transition in --watch. */ export declare const printJobSummary: (logger: Logger, job: PublishJob) => void; /** * Translate a terminal job state into a ScaiError throw (or pass-through * for `completed`). Centralizes the exit-code mapping so every verb that * watches a job exits consistently: * - completed → no throw, caller proceeds * - failed → DEPLOY_FAILED (exit 6) * - cancelled → CANCELLED (exit 130, matches POSIX SIGINT convention) */ export declare const throwOnTerminalFailure: (job: PublishJob) => void;