import { z } from 'zod'; import type { StorePaths } from '../store/paths.js'; import type { ExecFn } from '../util/exec.js'; /** * Checkpoints are commits created with git plumbing through a TEMPORARY * index: the user's index, worktree and HEAD are never moved. Each snapshot * lands under `refs/nightwatch/` so `git log` stays clean and a * normal `git gc` keeps the objects alive while the ref exists. */ export declare const checkpointSchema: z.ZodObject<{ session: z.ZodString; seq: z.ZodNumber; commit: z.ZodString; tree: z.ZodString; ts: z.ZodString; note: z.ZodOptional; }, "strip", z.ZodTypeAny, { seq: number; ts: string; session: string; commit: string; tree: string; note?: string | undefined; }, { seq: number; ts: string; session: string; commit: string; tree: string; note?: string | undefined; }>; export type Checkpoint = z.infer; export declare function listCheckpoints(paths: StorePaths, session?: string): readonly Checkpoint[]; export interface CheckpointOutcome { readonly created: boolean; readonly checkpoint?: Checkpoint; readonly reason?: string; } export declare function createCheckpoint(paths: StorePaths, projectRoot: string, session: string, note?: string, exec?: ExecFn, now?: () => Date): CheckpointOutcome; /** Returns the shell command a user should run to restore a checkpoint. */ export declare function restoreCommand(checkpoint: Checkpoint): string; /** * Auto-checkpoint on SessionStart as well as Stop. A single-turn headless run * fires Stop only once — at the very end — so without the session-start * baseline the scope check would diff against the END state and hide every * tracked-file modification. Found by the first recorded self-run. */ export declare function isAutoCheckpointEvent(hookEventName: string): boolean;