import type { BaseCheckpointSaver } from "@langchain/langgraph-checkpoint"; /** * A checkpointer whose in-flight writes can be awaited. * * LangGraph persists checkpoints asynchronously: when a graph run fails, its * stream rejects while writes the run already issued can still be landing, and * the checkpoint that owns a parked interrupt's `__interrupt__` write can be * put AFTER the rejection. Callers that read the checkpoint the moment a turn * fails (the parked-route gate records which route owns a park by diffing the * pending interrupts across the turn) would then miss a park that becomes * durable a moment later. Draining the writes before the failure propagates * makes "the turn has settled" mean "the turn has stopped writing". */ export interface TrackedCheckpointer { /** The checkpointer to hand the graph; it records every write it forwards. */ readonly saver: BaseCheckpointSaver; /** Resolves once every write the graph has issued so far has settled. */ settled(): Promise; } /** * The tracked form of `saver`, one per saver instance, so a graph cached per * checkpointer and the adapter that drains it always share the same tracker. */ export declare function trackCheckpointWrites(saver: BaseCheckpointSaver): TrackedCheckpointer; //# sourceMappingURL=checkpoint-writes.d.ts.map