import type { ONICheckpoint } from "../types.js"; import type { InterruptValue } from "./interrupt.js"; export interface HITLSession { threadId: string; resumeId: string; node: string; interrupt: InterruptValue; checkpoint: ONICheckpoint; createdAt: number; status: "pending" | "resumed" | "expired"; } export declare class HITLSessionStore { private sessions; private readonly ttlMs; constructor(ttlMs?: number); /** * Lazily evict sessions that have exceeded the TTL. * Pending sessions transition to "expired" then are removed. * Resumed sessions are removed only after TTL — they remain visible via * get() and all() until they age out, so callers can observe the final * status without a race between markResumed() and the next get(). */ private evict; record(threadId: string, interrupt: InterruptValue, checkpoint: ONICheckpoint): HITLSession; get(resumeId: string): HITLSession | null; getByThread(threadId: string): HITLSession[]; markResumed(resumeId: string): void; /** Revert a resumed session back to pending (e.g. after invoke failure). */ markPending(resumeId: string): void; pendingCount(): number; all(): HITLSession[]; } export declare class HITLInterruptException { readonly threadId: string; readonly interrupt: InterruptValue; readonly state: S; readonly isHITLInterrupt = true; constructor(threadId: string, interrupt: InterruptValue, state: S); /** Convenience: was this a getUserInput request? */ get isUserInputRequest(): boolean; get prompt(): string | undefined; get inputType(): string | undefined; get choices(): string[] | undefined; } //# sourceMappingURL=resume.d.ts.map