/** * ExtractionModeDetector - Detect and extract errors from GitHub Actions logs * * Supports two modes: * 1. Matrix mode: Validate YAML output with extraction field (pass through faithfully) * 2. Non-matrix mode: Raw test output (detect extractor and extract errors) * * Try matrix first, fall back to non-matrix if YAML not found. * * @packageDocumentation */ import type { ErrorExtractorResult } from '@vibe-validate/extractors'; import type { GitHubActionCheck } from '../schemas/watch-pr-result.schema.js'; /** * ExtractionModeDetector - Detect extraction mode and extract errors * * Tries matrix mode first (YAML with extraction field), falls back to non-matrix mode. */ export declare class ExtractionModeDetector { /** * Detect extraction mode and extract errors * * @param check - GitHub Actions check * @param logs - Raw log output * @returns ErrorExtractorResult or null if extraction failed */ detectAndExtract(check: GitHubActionCheck, logs: string): Promise; /** * Extract from matrix mode (validate YAML output) * * Looks for YAML markers (---...---) and extracts the "extraction" field. * * @param logs - Raw log output * @returns ErrorExtractorResult or null if not matrix mode */ private extractFromMatrixMode; /** * Extract from non-matrix mode (raw test output) * * Detects extractor from check name or logs, then runs extraction. * * @param _checkName - Check name (unused - autoDetectAndExtract handles detection) * @param logs - Raw log output * @returns ErrorExtractorResult or null if extraction failed */ private extractFromNonMatrixMode; /** * Strip GitHub Actions log prefix from a single line * * @param line - Log line * @returns Cleaned line */ private stripLogPrefix; /** * Extract ErrorExtractorResult from parsed YAML * * Tries root level first (vibe-validate run output), then nested (vibe-validate validate output) * * @param parsed - Parsed YAML object * @returns ErrorExtractorResult or null */ private extractFromYAML; /** * Extract ErrorExtractorResult from phases array (validate output) * * @param phases - Phases array * @returns ErrorExtractorResult or null */ private extractFromPhases; /** * Extract ErrorExtractorResult from a single phase's steps * * @param phase - Phase object * @returns ErrorExtractorResult or null */ private extractFromPhaseSteps; /** * Validate extraction structure * * @param extraction - Extraction object * @returns ErrorExtractorResult or null */ private validateExtraction; } //# sourceMappingURL=extraction-mode-detector.d.ts.map