export declare const CHECKPOINT_MARKER = "pr-checkpoint:v1"; export type CheckpointStatus = 'queued' | 'running' | 'awaiting_verification' | 'failed' | 'deadline' | 'unresumable' | 'complete'; export type Checkpoint = { marker: string; repository: string; pr: number; /** Absent on checkpoints posted before trigger ids were recorded; keep optional so resume can still parse them. */ triggerCommentId?: number; headRef: string; startSha: string; sessionStartSha: string; runId: string; runUrl: string; actor: string; sessionId: string; /** Absent from v1 checkpoints created before session URLs were exposed. */ sessionUrl?: string; resumeSourceRunId: string; status: CheckpointStatus; createdAt: string; updatedAt: string; }; export type GitHubComment = { id: number; user?: { login?: string; type?: string; }; performed_via_github_app?: { slug?: string; } | null; body?: string; created_at?: string; }; export interface CheckpointCodecOptions { marker?: string; sessionIdPattern?: RegExp; } export interface TrustedCheckpointActor { actor: string; userType?: string; appSlug?: string; } /** * Anti-forgery predicate: a checkpoint HTML comment is plain text any PR commenter can paste, * so `parseCheckpoint` alone proves shape, not provenance. This proves the comment itself was * authored by the expected App identity. */ export declare function isTrustedCheckpointComment(comment: GitHubComment, context: TrustedCheckpointActor): boolean; export declare function renderCheckpoint(checkpoint: Checkpoint, options?: { marker?: string; }): string; export declare function parseCheckpoint(body: string, options?: CheckpointCodecOptions): Checkpoint | undefined; export declare function validateCheckpoint(value: unknown, options?: CheckpointCodecOptions): Checkpoint | undefined; export declare function sortedCheckpointCandidates(comments: GitHubComment[], options?: CheckpointCodecOptions): { comment: GitHubComment; checkpoint: Checkpoint; }[];