import type { SessionManager } from "@earendil-works/pi-coding-agent"; import type { Repo } from "./git.js"; /** * Where the checkout stood when a round finished. A resumed session carries the * conversation but not the world it happened in: CI hands the next round a new * commit and a thread of comments the transcript has never seen, and an agent * that does not know that answers about code nobody is looking at any more. */ export declare function readCheckpoint(repo: Repo, pr?: number): Checkpoint | null; /** The checkpoint the last round left behind, if this session has one. */ export declare function lastCheckpoint(manager: SessionManager): Checkpoint | null; /** * Written only when the round produced something, so a broken run leaves the * older commit standing and the next one still reads everything since. */ export declare function saveCheckpoint(manager: SessionManager, checkpoint: Checkpoint): void; /** * What the agent has to catch up on, as a procedure it can run. Nothing moved * means nothing is said — an unchanged checkout on a fresh comment still gets * the pull request line, which is the whole point of a comment round. */ export declare function describeUpdate(previous: Checkpoint | null, current: Checkpoint | null): string | null; export interface Checkpoint { commit: string; /** ISO timestamp of the round that wrote it — the cut-off for "new comments". */ at: string; branch?: string; remote?: string; pr?: number; }