import { type RetryPolicy } from "@caupulican/pi-agent-core/reliability"; /** * Restart-durable, host-owned attempt ladder policy for delegated workers. * * The budget model has always carried `maxAttempts`, but nothing drove a second attempt: a * failed worker terminalized immediately and "retry" meant the orchestrator model burning a * turn to re-delegate blind, losing the worker's transcript. The ladder makes retry a host * mechanism instead: a retryable bounded failure suspends the attempt (durable, fenced) and * re-enqueues it through the owner scheduler after backoff, resuming from the persisted * conversation exactly like restart recovery does. * * Retries are deliberately evidence-gated: only failures whose recorded detail classifies as * transient (network, 5xx, rate limits) are retried. A missing detail or an unknown * classification never retries — an undiagnosed failure repeated is spend without evidence. */ export declare const DEFAULT_WORKER_TASK_ATTEMPTS = 2; export declare const WORKER_TASK_RETRY_POLICY: RetryPolicy; export type WorkerRetryDecision = { retry: true; reason: string; delayMs: number; } | { retry: false; reason: string; }; export declare function evaluateWorkerRetry(args: { laneStatus: string; reasonCode: string; reasonDetail?: string; provider: string; /** Restart-durable ladder retries already consumed for this attempt. */ retriesUsed: number; /** Grant budget ceiling for total attempts; defaults to {@link DEFAULT_WORKER_TASK_ATTEMPTS}. */ maxAttempts?: number; }): WorkerRetryDecision; //# sourceMappingURL=worker-retry-policy.d.ts.map