/** * Verification loop engine and checkpoint system * - Verification loop (/verify): Runs tests, analyzes failures, fixes code, repeats * - Checkpoint system (/checkpoint): Saves/restores git state */ export interface Checkpoint { id: string; sessionId: string; label?: string; headSha: string; isDirty: boolean; dirtyFiles: string[]; timestamp: string; cwd: string; } export interface VerificationConfig { maxIterations: number; timeoutMs: number; verbose: boolean; } declare function ensureCheckpointsDir(): void; declare function checkpointPath(sessionId: string, checkpointId: string): string; declare function generateCheckpointId(): string; declare function getGitHeadSha(cwd: string): string; declare function getGitDirtyFiles(cwd: string): string[]; declare function isGitDirty(cwd: string): boolean; /** * Save current git state as a checkpoint * @param sessionId - Unique session identifier * @param cwd - Working directory to checkpoint * @param label - Optional label for the checkpoint * @returns Checkpoint metadata */ export declare function saveCheckpoint(sessionId: string, cwd: string, label?: string): Checkpoint; /** * List all checkpoints for a session * @param sessionId - Session identifier * @returns Array of checkpoint metadata */ export declare function listCheckpoints(sessionId: string): Checkpoint[]; /** * Restore a checkpoint (returns instructions for restoration) * @param sessionId - Session identifier * @param checkpointId - Checkpoint identifier * @returns Instructions string for restoring the checkpoint */ export declare function restoreCheckpoint(sessionId: string, checkpointId: string): string; /** * Auto-detect the test command for the current project * @param cwd - Working directory * @returns Test command string */ export declare function autoDetectTestCommand(cwd: string): string; /** * Build a detailed verification loop prompt * @param cwd - Working directory * @param command - Optional test command (auto-detected if not provided) * @returns Detailed prompt string */ export declare function buildVerifyPrompt(cwd: string, command?: string): string; /** * Run a verification loop (for CLI reference/testing) * @param cwd - Working directory * @param command - Test command * @param config - Verification configuration * @returns Verification result */ export declare function runVerificationLoop(cwd: string, command: string, config?: VerificationConfig): Promise<{ success: boolean; iterations: number; errors: string[]; }>; export { getGitHeadSha, getGitDirtyFiles, isGitDirty, generateCheckpointId, checkpointPath, ensureCheckpointsDir, };