Replace the brittle clipboard/fixed-coord extraction with an OCR vision loop: screenshot -> detect state (login/grid/portal/eper/modal via tesseract keywords) -> act -> verify -> retry/recover. Adds portal->catalogue detection (the seat non-deterministically opens a multi-brand portal with no VIN field), not-found handling, and ffmpeg crop+upscale -> tesseract.js for the decode modal. Only the model token + year are needed (matcher-tolerant), so OCR garbling is harmless. Validated live against a trial seat: 6/6 of the ePER-present Fiat VINs decoded to the correct model (EGEA/DOBLO); 2 genuine "vehicle not found" coverage gaps reported as null. 8/8 correct outcomes. Still flag-gated off by default; tesseract is dynamically imported only inside the worker. Warm-session persistence under swiftshader is the remaining hardening item (currently re-logins per VIN). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
471 KiB
471 KiB