/** * Bounded progress-aware lease for the SDK prompt terminal deadline (#4334). * * The accepted prompt deadline is no longer a fixed wall-clock window from * acceptance: fresh *attributable* progress — tool/skill execution events * correlated to the exact accepted `commandId`/`turnId` at the prompt/agent * runtime boundary — renews the terminal deadline up to a deterministic hard * maximum runtime. Unrelated session noise, heartbeats, other turns, streaming * chatter, and retry bookkeeping never renew the lease, and there is no * unbounded disable value: `maxMs` is always a finite bound. */ export interface PromptDeadlineLease { /** When the prompt was accepted; anchors the hard maximum runtime. */ readonly acceptedAt: number; /** Last verified attributable progress (starts at acceptance). */ lastProgressAt: number; /** Inactivity window: the deadline is this far past the last verified progress. */ readonly leaseMs: number; /** Deterministic hard maximum runtime from acceptance; never unbounded. */ readonly maxMs: number; /** Monotonic revision used to reject stale expiry work after progress. */ generation: number; } export declare function createPromptDeadlineLease(input: { now: number; leaseMs: number; maxMs: number; }): PromptDeadlineLease; /** * Current terminal deadline: the inactivity lease from last verified progress, * bounded by the hard maximum runtime from acceptance. */ export declare function promptDeadlineAt(lease: PromptDeadlineLease): number; /** * Record fresh attributable progress. Monotonic: a stale or equal timestamp * never moves the lease backwards, so out-of-order delivery cannot shorten it. */ export declare function recordAttributableProgress(lease: PromptDeadlineLease, now: number): void; /** * Whether an agent session event at the prompt/agent runtime boundary is * attributable progress for the accepted prompt. Only tool execution * boundaries qualify: skills do their work through tools, so skill progress is * covered; streaming text/thinking deltas, retries, and bookkeeping are not. */ export declare function isAttributableProgressEventType(type: string): boolean;