/** * HTML Evaluator - Browser-based HTML/JavaScript evaluation * * Uses Playwright for real browser rendering, screenshot capture, * and console error detection. */ import { BaseEvaluator, EvaluationResult } from '../base-evaluator'; export interface HTMLEvaluationResult extends EvaluationResult { details: { renders: boolean; errors: string[]; warnings: string[]; screenshot?: string; render_time_ms: number; has_doctype: boolean; has_required_tags: boolean; structure_issues: string[]; [key: string]: unknown; }; } /** * HTML/JavaScript evaluator using Playwright for browser testing. * * Scoring: * - Renders successfully: 50 points * - No console errors: 30 points * - Fast render (<3s): 20 points */ export declare class HTMLEvaluator extends BaseEvaluator { private headless; private outputDir; private playwrightAvailable; private playwright; constructor(headless?: boolean, outputDir?: string); private checkPlaywright; getLanguage(): string; getFileExtension(): string; /** * Extract HTML code from response (handles markdown code blocks). */ private extractHTML; /** * Validate HTML structure statically. */ private validateStructure; /** * Evaluate HTML using browser (if Playwright available) or static validation. */ evaluate(code: string, testName: string, _prompt: string, _expected?: string): Promise; /** * Evaluate HTML in a real browser using Playwright. */ private evaluateInBrowser; } //# sourceMappingURL=html-evaluator.d.ts.map