/** Public API contract for run session status. */ export type RunSessionStatus = "running" | "waiting" | "completed" | "cancelled" | "failed"; /** Error shape for run cancelled. */ export declare class RunCancelledError extends Error { constructor(message?: string); } /** Error shape for run already exists. */ export declare class RunAlreadyExistsError extends Error { constructor(runId: string); } /** Error shape for run not active. */ export declare class RunNotActiveError extends Error { constructor(runId: string); } /** Error shape for wait not pending. */ export declare class WaitNotPendingError extends Error { constructor(runId: string, waitKey: string); } /** Error shape for wait conflict. */ export declare class WaitConflictError extends Error { constructor(runId: string, waitKey: string); } /** Public API contract for submit resume value outcome. */ export interface SubmitResumeValueOutcome { accepted: true; duplicate?: true; } /** Options accepted by run resume session manager. */ export interface RunResumeSessionManagerOptions { waitingTtlMs?: number; sessionTtlMs?: number | null; maxConcurrentSessions?: number; setTimeoutFn?: typeof setTimeout; clearTimeoutFn?: typeof clearTimeout; getConflictKey?: (value: T) => string; } /** Implement run resume session manager. */ export declare class RunResumeSessionManager { private readonly options; private readonly sessions; constructor(options?: RunResumeSessionManagerOptions); private get waitingTtlMs(); private get sessionTtlMs(); private get maxConcurrentSessions(); private get setTimeoutFn(); private get clearTimeoutFn(); private getConflictKey; private clearWaitingTimeout; private clearSessionTimeout; private scheduleSessionTimeout; private scheduleWaitingTimeout; private touchSession; private finalizeSession; startRun(input: { runId: string; threadId: string; }): AbortSignal; prepareForSignal(runId: string, waitKey: string): void; waitForSignal(runId: string, waitKey: string): Promise; submitSignal(runId: string, input: { waitKey: string; value: T; }): SubmitResumeValueOutcome; cancelRun(runId: string): boolean; completeRun(runId: string): void; failRun(runId: string): void; getRunStatus(runId: string): RunSessionStatus | null; reset(): void; } //# sourceMappingURL=resume-session.d.ts.map