import { z } from 'zod'; import { type ComputerSessionReport } from './diagnostics.js'; export declare const ComputerEvaluationPlanSchema: z.ZodObject<{ taskIds: z.ZodArray; repetitions: z.ZodNumber; modelRef: z.ZodString; environment: z.ZodString; evidence: z.ZodEnum<{ native: "native"; fixture: "fixture"; "real-app": "real-app"; }>; }, z.core.$strict>; export declare const ComputerEvaluationRunSchema: z.ZodObject<{ taskId: z.ZodString; repetition: z.ZodNumber; modelRef: z.ZodString; environment: z.ZodString; evidence: z.ZodEnum<{ native: "native"; fixture: "fixture"; "real-app": "real-app"; }>; outcome: z.ZodEnum<{ unknown: "unknown"; failed: "failed"; passed: "passed"; }>; oracle: z.ZodEnum<{ none: "none"; artifact: "artifact"; "application-state": "application-state"; }>; claimedSuccess: z.ZodBoolean; takeover: z.ZodBoolean; duplicateInputs: z.ZodNullable; scopeViolations: z.ZodNullable; postStopInputs: z.ZodNullable; durationMs: z.ZodNumber; modelRequests: z.ZodNullable; inputTokens: z.ZodNullable; outputTokens: z.ZodNullable; cost: z.ZodNullable; actions: z.ZodOptional>; unchangedInputs: z.ZodOptional>; observationChanges: z.ZodOptional>; rescueAttempts: z.ZodOptional>; rescueExhaustions: z.ZodOptional>; failure: z.ZodOptional; phase: z.ZodEnum<{ open: "open"; dispatch: "dispatch"; model: "model"; executor: "executor"; observe: "observe"; release: "release"; frame_upload: "frame_upload"; oracle: "oracle"; }>; errorCode: z.ZodString; dispatch: z.ZodEnum<{ unknown: "unknown"; completed: "completed"; started: "started"; notStarted: "notStarted"; }>; diagnosticId: z.ZodOptional; httpStatus: z.ZodOptional; requestId: z.ZodOptional; validationReason: z.ZodOptional>; validation: z.ZodOptional; stage: z.ZodEnum<{ plan: "plan"; schema: "schema"; converted_action: "converted_action"; typing_target: "typing_target"; keyboard: "keyboard"; }>; issues: z.ZodArray, z.ZodNumber]>>; code: z.ZodEnum<{ custom: "custom"; invalid_type: "invalid_type"; unrecognized_keys: "unrecognized_keys"; invalid_union: "invalid_union"; invalid_value: "invalid_value"; invalid_format: "invalid_format"; too_big: "too_big"; too_small: "too_small"; not_multiple_of: "not_multiple_of"; missing_point: "missing_point"; outside_frame: "outside_frame"; editable_target_missing: "editable_target_missing"; editable_target_ambiguous: "editable_target_ambiguous"; invalid_context: "invalid_context"; unsupported_key: "unsupported_key"; plan_not_grounded: "plan_not_grounded"; }>; action: z.ZodEnum<{ type: "type"; key: "key"; unknown: "unknown"; answer: "answer"; wait: "wait"; batch: "batch"; terminate: "terminate"; activate: "activate"; showMenu: "showMenu"; click: "click"; drag: "drag"; setValue: "setValue"; typeText: "typeText"; pressKeys: "pressKeys"; scroll: "scroll"; activateSequence: "activateSequence"; finished: "finished"; button_plan: "button_plan"; activate_sequence: "activate_sequence"; show_menu: "show_menu"; set_value: "set_value"; left_click: "left_click"; right_click: "right_click"; double_click: "double_click"; hscroll: "hscroll"; interact: "interact"; takeover: "takeover"; }>; }, z.core.$strict>>; }, z.core.$strict>>; stability: z.ZodOptional; samples: z.ZodNumber; action: z.ZodOptional>; changes: z.ZodArray>; changedElementIndices: z.ZodArray; }, z.core.$strict>>; serviceErrorCode: z.ZodOptional>; }, z.core.$strict>>; }, z.core.$strict>; export type ComputerEvaluationRun = z.infer; export declare function isAutonomousComputerSuccess(run: ComputerEvaluationRun): boolean; /** Export measured runtime values only; an executor must supply independent safety and oracle evidence. */ export declare function computerReportMeasurements(report: ComputerSessionReport): { failure?: { category: "permission" | "target" | "unknown" | "cancelled" | "model" | "observation" | "transport" | "native" | "budget" | "no_progress" | "harness"; phase: "open" | "dispatch" | "model" | "executor" | "observe" | "release" | "frame_upload" | "oracle"; errorCode: string; dispatch: "unknown" | "completed" | "started" | "notStarted"; diagnosticId?: string | undefined; httpStatus?: number | undefined; requestId?: string | undefined; validationReason?: "invalid_json" | "invalid_arguments" | "missing_call" | "multiple_calls" | "invalid_envelope" | "output_limit" | undefined; validation?: { action: "type" | "key" | "unknown" | "answer" | "wait" | "batch" | "terminate" | "activate" | "showMenu" | "click" | "drag" | "setValue" | "typeText" | "pressKeys" | "scroll" | "activateSequence" | "finished" | "button_plan" | "activate_sequence" | "show_menu" | "set_value" | "left_click" | "right_click" | "double_click" | "hscroll" | "interact" | "takeover"; stage: "plan" | "schema" | "converted_action" | "typing_target" | "keyboard"; issues: { path: (number | "reason" | "keys" | "value" | "name" | "time" | "from" | "action" | "to" | "when" | "label" | "text" | "kind" | "status" | "count" | "steps" | "durationMs" | "role" | "actions" | "x" | "y" | "proposal" | "ref" | "arguments" | "point" | "button" | "deltaX" | "deltaY" | "refs" | "pixels" | "unknown_field" | "coordinate" | "claimedSuccess")[]; code: "custom" | "invalid_type" | "unrecognized_keys" | "invalid_union" | "invalid_value" | "invalid_format" | "too_big" | "too_small" | "not_multiple_of" | "missing_point" | "outside_frame" | "editable_target_missing" | "editable_target_ambiguous" | "invalid_context" | "unsupported_key" | "plan_not_grounded"; action: "type" | "key" | "unknown" | "answer" | "wait" | "batch" | "terminate" | "activate" | "showMenu" | "click" | "drag" | "setValue" | "typeText" | "pressKeys" | "scroll" | "activateSequence" | "finished" | "button_plan" | "activate_sequence" | "show_menu" | "set_value" | "left_click" | "right_click" | "double_click" | "hscroll" | "interact" | "takeover"; }[]; } | undefined; stability?: { stage: "initial_capture" | "pre_dispatch" | "post_action"; samples: number; changes: ("deadline" | "window_identity" | "window_geometry" | "image_dimensions" | "accessibility_structure" | "accessibility_text" | "accessibility_state" | "accessibility_geometry" | "visual_or_unexposed_state")[]; changedElementIndices: number[]; action?: "type" | "key" | "unknown" | "answer" | "wait" | "batch" | "terminate" | "activate" | "showMenu" | "click" | "drag" | "setValue" | "typeText" | "pressKeys" | "scroll" | "activateSequence" | "finished" | "button_plan" | "activate_sequence" | "show_menu" | "set_value" | "left_click" | "right_click" | "double_click" | "hscroll" | "interact" | "takeover" | undefined; } | undefined; serviceErrorCode?: "provider_error" | "invalid_request" | "max_input_tokens_exceeded" | "max_tokens_exceeded" | "model_capability_unsupported" | "unsupported_request_field" | "invalid_image" | "request_too_large" | "free_pool_unavailable" | undefined; } | undefined; durationMs: number; modelRequests: number; actions: number; unchangedInputs: number; observationChanges: number; rescueAttempts: number; rescueExhaustions: number; takeover: boolean; claimedSuccess: boolean; }; /** The independent harness supplies oracle results; model claims never grade a run. */ export declare function evaluateComputerRuns(rawPlan: unknown, rawRuns: unknown[]): { expectedRuns: number; completedRuns: number; missingRuns: number; passed: number; successRate: number; falseSuccesses: number; incidents: number; unmeasuredSafetyRuns: number; failuresByCategory: Record; failuresByPhase: Record; failed: number; unknown: number; takeoverRate: number; takeovers: number; p95DurationMs: number | null; modelRequests: number | null; inputTokens: number | null; outputTokens: number | null; actions: number | null; unchangedInputs: number | null; observationChanges: number | null; rescueAttempts: number | null; rescueExhaustions: number | null; costPerSuccess: number | null; betaGatePassed: boolean; taskIds: string[]; repetitions: number; modelRef: string; environment: string; evidence: "native" | "fixture" | "real-app"; };