import type { KindAwareReconciliation } from "./bus/kind-aware-reconciliation"; import type { InvocationCorrelation, InvocationReconciliation } from "./host/session-runtime"; type DeadlineReconciliation = InvocationReconciliation | KindAwareReconciliation; export type PromptDeadlineOutcome = { kind: "failed"; code: "prompt_deadline_exceeded"; message: string; provenance: "deadline"; }; export declare class PromptDeadlineManager { #private; constructor(options: { reconciliation: DeadlineReconciliation; getLeaseMs: () => number; getMaxMs: () => number; now?: () => number; onExpired?: (correlation: InvocationCorrelation) => void; }); onAccepted(correlation: InvocationCorrelation): void; /** Re-arm a durable uncertainty-recovery record after process startup without * resetting its acceptance-anchored hard maximum runtime. */ recoverPending(correlation: InvocationCorrelation, acceptedAt: number, deadlineMaxAt?: number): void; onProgress(correlation: InvocationCorrelation, now?: number): void; onAttributableEvent(correlation: InvocationCorrelation, eventType: string, now?: number): void; /** Mark a real agent_end before durable reconciliation begins. If its upgrade * write fails, deadline retry replays this event instead of reasserting the * synthetic prompt_deadline_exceeded outcome. */ noteTerminalTransition(correlation: InvocationCorrelation, pendingFailure?: { code: string; message: string; }): void; clear(correlation: InvocationCorrelation): void; clearAll(): void; /** For tests: current deadline or undefined if no lease. */ deadlineAt(correlation: InvocationCorrelation): number | undefined; /** For tests: whether a lease exists. */ has(correlation: InvocationCorrelation): boolean; /** Whether expiry has fenced this correlation from late run adoption. */ isExpiring(correlation: InvocationCorrelation): boolean; /** Whether bounded uncertainty writes exhausted with recovery ownership retained. */ hasRecoveryPending(correlation: InvocationCorrelation): boolean; } export {};