import { type Task } from "./models.js"; import type { TaskStore } from "./store/base.js"; export declare const DEFAULT_POLL_MS = 100; export declare const MAX_POLL_MS = 500; /** * Grow the polling interval towards the ceiling. * * wait() has no idea whether the task takes 50ms or an hour. Starting tight keeps * short tasks snappy; growing keeps a long wait from costing a read every 100ms * for its whole duration. The +1 keeps truncation from pinning tiny intervals: * Math.floor(1 * 1.5) === 1 would otherwise never grow past 1. */ export declare function nextPollMs(current: number, maxMs: number): number; /** Poll get() until terminal or timeout. Returns the terminal Task (any status). * Throws TaskTimeout, leaving the task running. `pollMs` is the *first* interval; * it backs off towards `maxPollMs`. */ export declare function pollWait(store: TaskStore, taskId: string, { timeoutMs, pollMs, maxPollMs, }: { timeoutMs: number; pollMs?: number; maxPollMs?: number; }): Promise;