import type { TargetDescriptor } from "./contracts/target.js"; import { type CaptureSource, type ExecutionAction, type RecordingAdapter } from "./contracts/execution.js"; export declare const target: { role: (role: string, options?: { name?: string; }) => TargetDescriptor; text: (text: string) => TargetDescriptor; axid: (axid: string) => TargetDescriptor; placeholder: (placeholder: string) => TargetDescriptor; label: (label: string) => TargetDescriptor; css: (selector: string) => TargetDescriptor; testId: (testId: string) => TargetDescriptor; }; export declare const capture: { window: () => CaptureSource; display: (displayUUID: string) => CaptureSource; region: (displayUUID: string, rect: { x: number; y: number; width: number; height: number; }) => CaptureSource; pickDisplay: () => CaptureSource; pickRegion: () => CaptureSource; }; export type RecordingPhase = "prepare" | "record"; export interface ElementSnapshot { role: string | null; name: string | null; value: string | null; enabled: boolean; } export type SessionRequest = { command: "start"; out: string; definition: RecordingConfiguration; } | { command: "beginCapture"; } | { command: "finish"; } | { command: "abort"; reason: string; } | { command: "sceneBegin"; phase: RecordingPhase; scene: string; } | { command: "sceneEnd"; phase: RecordingPhase; scene: string; } | { command: "action"; phase: RecordingPhase; scene?: string; action: ExecutionAction; } | { command: "query"; target: TargetDescriptor; } | { command: "waitBegin"; phase: RecordingPhase; scene?: string; action: Extract; } | { command: "waitEnd"; id: string; ok: boolean; }; export type SessionResponse = { ok: true; snapshot?: ElementSnapshot | null; } | { ok: false; code: string; message: string; }; export interface SessionTransport { request(request: SessionRequest): Promise; close(): Promise; } export interface RecordingConfiguration { id: string; targetApp: string; adapter?: RecordingAdapter; pace?: "relaxed" | "natural" | "brisk"; frameRate?: number; capture?: CaptureSource; } export interface RecordingDefinition extends RecordingConfiguration { prepare?: (screen: RecordingSession) => Promise; record: (screen: RecordingSession) => Promise; } export declare function defineRecording(definition: RecordingDefinition): RecordingDefinition; export interface RecordOptions { out: string; } export declare function record(definition: RecordingDefinition, options: RecordOptions): Promise; type ActionOptions = { id?: string; }; export declare class RecordingSession { private readonly transport; readonly phase: RecordingPhase; private readonly runState; private readonly adapterKind?; private currentScene; private mutating; private constructor(); scene(id: string, body: () => Promise): Promise; query(value: TargetDescriptor): Promise; exists(value: TargetDescriptor): Promise; open(options?: ActionOptions & { url?: string; }): Promise; navigate(url: string, options?: ActionOptions): Promise; click(value: TargetDescriptor, options?: ActionOptions): Promise; type(value: TargetDescriptor, text: string, options?: ActionOptions & { wpm?: number; }): Promise; press(key: string, options?: ActionOptions & { mods?: string[]; }): Promise; hotkey(keys: string[], options?: ActionOptions): Promise; scroll(value: TargetDescriptor, by: { dx: number; dy: number; }, options?: ActionOptions): Promise; drag(from: TargetDescriptor, to: TargetDescriptor, options?: ActionOptions): Promise; pause(milliseconds: number, options?: ActionOptions): Promise; waitUntil(predicate: () => boolean | Promise, options: ActionOptions & { timeout: number; interval?: number; }): Promise; private action; private id; private assertOK; } export {}; //# sourceMappingURL=recording.d.ts.map