/**
 * Judge evaluation types for AI simulation testing.
 *
 * Provides structured types for evaluation criteria, results, and scoring
 * used by the LLM judge to assess AI-generated applications.
 */
/**
 * Evaluation criteria for the judge to assess.
 *
 * Defines the requirements and expectations that the generated
 * application should meet across different dimensions.
 */
export interface EvaluationCriteria {
    /** Functional requirements that must be met */
    functionalRequirements: string[];
    /** UI/UX requirements for interface design and usability */
    uiRequirements: string[];
    /** Data integration and flow requirements */
    dataRequirements: string[];
    /** Performance and efficiency considerations */
    performanceRequirements?: string[];
    /** Additional custom criteria */
    customCriteria?: string[];
}
/**
 * Judge evaluation result for a single criterion.
 *
 * Represents the assessment of one specific requirement
 * with scoring, reasoning, and evidence.
 */
export interface CriterionEvaluation {
    /** The criterion being evaluated */
    criterion: string;
    /** Whether the criterion passed evaluation */
    passed: boolean;
    /** Numerical score from 0-100 */
    score: number;
    /** Detailed reasoning for the evaluation */
    reasoning: string;
    /** Supporting evidence (screenshots, DOM state, etc.) */
    evidence?: string;
    /** Suggestions for improvement */
    suggestions?: string[];
}
/**
 * Complete judge evaluation result.
 *
 * Comprehensive assessment of the AI-generated application
 * including overall scoring and detailed criterion evaluations.
 */
export interface JudgeEvaluation {
    /** Overall score from 0-100 */
    overallScore: number;
    /** Overall pass/fail determination */
    passed: boolean;
    /** Individual criterion evaluations */
    criteriaEvaluations: CriterionEvaluation[];
    /** Executive summary of the evaluation */
    summary: string;
    /** High-level suggestions for improvement */
    suggestions: string[];
    /** Strengths identified in the implementation */
    strengths?: string[];
    /** Weaknesses identified in the implementation */
    weaknesses?: string[];
    /** Token usage statistics */
    tokensUsed: {
        input: number;
        output: number;
        cached?: number;
        total: number;
    };
    /** Time taken for evaluation in milliseconds */
    evaluationDurationMs?: number;
    /** Confidence level of the evaluation (0-1) */
    confidence?: number;
    /** Error message if evaluation failed */
    error?: string;
}
/**
 * Configuration for the judge execution.
 */
export interface JudgeConfig {
    /** Playwright MCP server URL */
    playwrightMcpUrl: string;
    /** JWT token for AI Gateway authentication */
    jwt?: string;
    /** Maximum steps the judge can take */
    maxSteps?: number;
    /** Timeout for evaluation in milliseconds */
    timeoutMs?: number;
    /** Minimum passing score (0-100) */
    passingThreshold?: number;
    /** Whether to capture screenshots as evidence */
    captureScreenshots?: boolean;
    /** Whether to include detailed reasoning */
    detailedReasoning?: boolean;
}
/**
 * MCP tool call parameters for Playwright actions.
 */
export interface PlaywrightActionParams {
    /** The action to perform */
    action: "navigate" | "click" | "fill" | "screenshot" | "getText" | "waitForSelector" | "evaluate" | "getUrl" | "reload";
    /** Action-specific parameters */
    params: Record<string, any>;
}
/**
 * Result from a Playwright action execution.
 */
export interface PlaywrightActionResult {
    /** Whether the action succeeded */
    success: boolean;
    /** Result data from the action */
    data?: any;
    /** Error message if action failed */
    error?: string;
    /** Screenshot if captured */
    screenshot?: string;
}
/**
 * Judge context passed to tools.
 */
export interface JudgeContext {
    /** Application URL being evaluated */
    appUrl: string;
    /** Original simulation prompts */
    prompts: string[];
    /** Evaluation criteria */
    criteria: EvaluationCriteria;
    /** Current evaluation state */
    evaluationState: {
        criteriaChecked: string[];
        evidence: Map<string, string>;
        scores: Map<string, number>;
    };
}
/**
 * Extended simulation result with judge evaluation.
 *
 * Augments the standard simulation result with judge assessment data.
 */
export interface EvaluatedSimulationResult {
    /** Base simulation result */
    appUrl?: string;
    promptId: string;
    success: boolean;
    error?: string;
    duration: number;
    stepResults: Array<{
        prompt: string;
        success: boolean;
        duration: number;
        error?: string;
    }>;
    tokens: {
        input: number;
        output: number;
        cached?: number;
        total: number;
    };
    /** Judge evaluation if performed */
    judgeEvaluation?: JudgeEvaluation;
    /** Error during evaluation if any */
    evaluationError?: string;
    /** Time taken for judge evaluation */
    evaluationDuration?: number;
}
//# sourceMappingURL=types.d.ts.map