/** * Freeze-time target stability scoring (#14). A frozen target's locators decide how well replay * survives UI change: a text-only target breaks on a rename and forces a `self-heal` (LLM re-entry * — cost + non-determinism); a `selector` or a `role`+`index` fallback survives it. Scoring and * warning at freeze time lets the author strengthen weak targets up front, lowering the self-heal * trigger rate. Pure — no I/O, no LLM (invariant #4). */ import type { Scenario, Step, Target } from "./types.js"; export interface TargetScore { /** 0..1 estimate of how well the target survives UI change. */ score: number; /** below the warn threshold — likely to force a self-heal later. */ weak: boolean; reason: string; } /** Score how well a single frozen target survives UI change. */ export declare function scoreTarget(target: Target): TargetScore; /** A step's target paired with its stability score. */ export interface ScoredTarget { stepIndex: number; step: Step; target: Target; score: TargetScore; } /** Score every located step in a scenario — caller decides what to do with the weak ones. */ export declare function scoreScenario(scenario: Scenario): ScoredTarget[]; /** The weak targets in a scenario — flag these at freeze time so the author can strengthen them. */ export declare function weakTargets(scenario: Scenario): ScoredTarget[]; /** A run of blind key presses discover emitted instead of resolved click/type targets (#61). */ export interface GuessedKeyRun { startIndex: number; keys: string[]; } /** Flag blind pressKey chains at freeze time: a Tab anywhere, or ≥2 consecutive key presses, is * focus-guessing — it can land on the wrong element (or nothing) and still pass coarse assertions * (#61). A single non-Tab press (an Enter submit after typing) is a normal pattern and not flagged. */ export declare function guessedKeyRuns(scenario: Scenario): GuessedKeyRun[];