/** * Agentic QE v3 - Visual & Accessibility MCP Tools * * qe/visual/compare - Visual regression testing * qe/a11y/audit - Accessibility auditing * * This module wraps the REAL visual-accessibility domain services: * - VisualTesterService for screenshot capture and comparison * - AccessibilityTesterService for WCAG compliance auditing */ import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base'; import { ToolResult } from '../../types'; export interface VisualCompareParams { urls: string[]; viewports?: Viewport[]; baselineDir?: string; threshold?: number; fullPage?: boolean; hideSelectors?: string[]; waitForSelector?: string; [key: string]: unknown; } export interface Viewport { width: number; height: number; name?: string; isMobile?: boolean; } export interface VisualCompareResult { comparisons: VisualComparison[]; summary: VisualSummary; newBaselines: string[]; recommendations: string[]; } export interface VisualComparison { url: string; viewport: Viewport; status: 'passed' | 'failed' | 'new'; diffPercentage: number; diffPixels: number; screenshotPath?: string; diffImagePath?: string; baselinePath?: string; regions?: DiffRegion[]; } export interface DiffRegion { x: number; y: number; width: number; height: number; changeType: 'added' | 'removed' | 'modified'; significance: 'high' | 'medium' | 'low'; } export interface VisualSummary { total: number; passed: number; failed: number; new: number; avgDiffPercentage: number; } export interface A11yAuditParams { urls: string[]; standard?: 'wcag21-aa' | 'wcag21-aaa' | 'wcag22-aa' | 'section508'; includeWarnings?: boolean; checkContrast?: boolean; checkKeyboard?: boolean; rules?: string[]; [key: string]: unknown; } export interface A11yAuditResult { audits: UrlAudit[]; summary: A11ySummary; topIssues: TopIssue[]; remediationPlan: RemediationItem[]; } export interface UrlAudit { url: string; score: number; passed: boolean; violations: A11yViolation[]; warnings: A11yWarning[]; passedRules: number; } export interface A11yViolation { id: string; impact: 'critical' | 'serious' | 'moderate' | 'minor'; description: string; help: string; helpUrl: string; wcagCriteria: string[]; nodes: ViolationNode[]; } export interface ViolationNode { selector: string; html: string; failureSummary: string; fixSuggestion?: string; } export interface A11yWarning { id: string; description: string; nodes: number; } export interface A11ySummary { totalUrls: number; passingUrls: number; avgScore: number; criticalViolations: number; seriousViolations: number; totalViolations: number; } export interface TopIssue { ruleId: string; description: string; occurrences: number; impact: string; affectedUrls: string[]; } export interface RemediationItem { violationId: string; description: string; fix: string; effort: 'trivial' | 'minor' | 'moderate' | 'major'; priority: number; } export declare class VisualCompareTool extends MCPToolBase { readonly config: MCPToolConfig; private visualTester; /** * Get or create the visual tester service */ private getService; execute(params: VisualCompareParams, context: MCPToolContext): Promise>; } export declare class A11yAuditTool extends MCPToolBase { readonly config: MCPToolConfig; private accessibilityTester; /** * Get or create the accessibility tester service */ private getService; execute(params: A11yAuditParams, context: MCPToolContext): Promise>; } //# sourceMappingURL=index.d.ts.map