/** * Polling guidance for async jobs. * * The async tools (start_research, create_brief, generate_content, start_audit, * start_optimization, batch_atomize) return immediately with a job id; the * agent then polls get_job_status until done. Without direction the agent either * hammers the API or stalls. These helpers attach concrete, per-type guidance — * expected duration, a recommended poll interval, a "first check" delay, and a * give-up ceiling — so the waiting agent can pace itself. */ export type AsyncJobType = "research" | "content" | "audit" | "brief" | "optimization" | "atomization"; export interface PollProfile { /** Typical completion window [min, max] in seconds. */ typical: [number, number]; /** Wait this long before the first status check. */ firstCheck: number; /** Steady-state interval between status checks. */ interval: number; /** Past this elapsed time the job is likely stuck — stop and report. */ giveUpAfter: number; } /** Never advise polling faster than this. */ export declare const MIN_POLL_INTERVAL_SECONDS = 5; /** * Rough, observed local/prod durations. Deliberately conservative — better to * have the agent check a little less often than to hammer. Tune as real * telemetry comes online. */ export declare const POLL_PROFILES: Record; /** * Audit duration scales with how many pages it crawls, so derive the profile * from max_pages rather than using one static guess. Rough model: a base cost * plus a per-page cost; the poll interval and give-up ceiling track the window. */ export declare function auditProfileForPages(maxPages: number | undefined): PollProfile; /** * Guidance for a freshly-started job (attach to a start_* tool response). * Pass `profile` to override the static default (e.g. a page-count-aware audit * profile from `auditProfileForPages`). */ export declare function startPollGuidance(type: AsyncJobType, id: string, profile?: PollProfile): string; /** * Elapsed-aware guidance for an in-progress get_job_status response. Tells the * agent how long to wait before the next check, and flags a likely-stuck job * once it passes the give-up ceiling. */ export declare function inProgressPollGuidance(type: AsyncJobType | undefined, elapsedSeconds: number | null, profile?: PollProfile): string; /** Seconds elapsed since an ISO/date string, or null if unparseable. */ export declare function elapsedSecondsSince(createdAt: string | undefined): number | null; //# sourceMappingURL=polling.d.ts.map