/** * Capture Agent — Postcondition Evaluator * * Deterministic evaluation of postconditions after each opcode. * No LLM calls — purely structural checks against AKTree, URL, and screenshots. */ import type { RuntimeAdapter, PostconditionSpec, ProgressSnapshot } from './execution-types.js'; /** * Evaluates whether a postcondition holds. * Retries internally up to postcondition.waitMs (polling). * Returns true if the condition is satisfied, false otherwise. */ export interface PostconditionResult { passed: boolean; reason: string; /** * AUT-240 (decision 2): the check could not be verified deterministically * (an AKTree probe kept throwing) and was assumed-OK as a last resort. The * capture is flagged low-confidence rather than failed. */ lowConfidence?: boolean; } export declare function evaluatePostcondition(adapter: RuntimeAdapter, spec: PostconditionSpec): Promise; /** * Evaluate a postcondition with extend-on-progress (AUT-240, Layer C): the poll * gets a generous budget up to the global deadline and the progress watchdog * cuts it only when the page is genuinely stuck. Replaces the old clamp-to- * remaining-budget that could starve the check to ~1ms after a slow action. * Shared by the runner (main path) and the recovery chain (retry re-check). */ export declare function evaluatePostconditionWithProgress(adapter: RuntimeAdapter, spec: PostconditionSpec, startedAtMs: number, globalDeadlineMs: number, getProgress: (() => Promise) | undefined): Promise;