/** * Ralph Loop Verifier * * Adds oracle verification to ralph-loop completion claims. * When ralph-loop outputs a completion promise, instead of immediately * accepting it, we trigger an oracle verification phase. * * Flow: * 1. Ralph-loop outputs TASK_COMPLETE * 2. System detects this and enters verification mode * 3. Oracle agent is invoked to verify the work * 4. If oracle approves -> truly complete * 5. If oracle finds flaws -> continue ralph-loop with oracle feedback */ export interface VerificationState { /** Whether verification is pending */ pending: boolean; /** The completion claim that triggered verification */ completion_claim: string; /** Number of verification attempts */ verification_attempts: number; /** Max verification attempts before force-accepting */ max_verification_attempts: number; /** Oracle feedback from last verification */ oracle_feedback?: string; /** Whether oracle approved */ oracle_approved?: boolean; /** Timestamp of verification request */ requested_at: string; /** Original ralph-loop task */ original_task: string; } /** * Read verification state */ export declare function readVerificationState(directory: string): VerificationState | null; /** * Write verification state */ export declare function writeVerificationState(directory: string, state: VerificationState): boolean; /** * Clear verification state */ export declare function clearVerificationState(directory: string): boolean; /** * Start verification process */ export declare function startVerification(directory: string, completionClaim: string, originalTask: string): VerificationState; /** * Record oracle feedback */ export declare function recordOracleFeedback(directory: string, approved: boolean, feedback: string): VerificationState | null; /** * Generate oracle verification prompt */ export declare function getOracleVerificationPrompt(state: VerificationState): string; /** * Generate continuation prompt after oracle rejection */ export declare function getOracleRejectionContinuationPrompt(state: VerificationState): string; /** * Check if text contains oracle approval */ export declare function detectOracleApproval(text: string): boolean; /** * Check if text contains oracle rejection indicators */ export declare function detectOracleRejection(text: string): { rejected: boolean; feedback: string; }; //# sourceMappingURL=index.d.ts.map