/** True when the runner image declares the desktop tier present (BOARDWALK_DESKTOP_TIER=1). */ export declare function desktopTierEnabled(env: NodeJS.ProcessEnv): boolean; export interface GuestDesktopConfig { /** Which OS driver backs this session (`makeDesktopDriver` selects on it). */ platform: "linux" | "darwin"; /** X display — Linux only; meaningless on macOS (the real screen is the target). */ display: string; screenWidth: number; screenHeight: number; } /** Read the guest desktop config from env, or null when the tier is disabled or unsupported here. * Linux drives XTEST/x11grab; macOS drives CGEvent/screencapture (desktop_driver_darwin.ts). */ export declare function loadGuestDesktopConfig(env: NodeJS.ProcessEnv, platform?: NodeJS.Platform): GuestDesktopConfig | null; export interface DesktopScreenshotCapture { png: Buffer; width: number; height: number; } export interface DesktopClick { x: number; y: number; button?: "left" | "right" | "middle"; clicks?: 1 | 2; } export interface DesktopScroll { dx: number; dy: number; x?: number; y?: number; } /** One screen's input + capture surface. Coordinates are screen pixels, origin top-left; every * implementation clamps into the screen bounds rather than erroring on an off-by-a-few click. */ export interface DesktopDriver { screenshot(): Promise; click(input: DesktopClick): Promise; type(input: { text: string; submit?: boolean; }): Promise; key(chord: string): Promise; scroll(input: DesktopScroll): Promise; drag(input: { from: { x: number; y: number; }; to: { x: number; y: number; }; }): Promise; } /** Exec seam for tests: run a binary to completion, resolve stdout, reject on non-zero exit. */ export type DriverExec = (cmd: string, args: readonly string[]) => Promise; /** A `+`-joined SDK chord ("Control+Shift+t", "Meta+a") in xdotool syntax ("ctrl+shift+t"). */ export declare function chordToXdotool(chord: string): string; /** A scroll delta in wheel notches: at least 1 for any non-zero delta, capped. */ export declare function scrollNotches(delta: number): number; /** Build the OS driver for a resolved desktop config (the composition root's one entry point). */ export declare function makeDesktopDriver(cfg: GuestDesktopConfig): DesktopDriver; /** * The Linux driver: xdotool (XTEST) for input, the image's ffmpeg (one-frame x11grab) for * screenshots — both already in the hosted guest image. `exec` is injectable for tests. */ export declare function makeXdotoolDriver(cfg: GuestDesktopConfig, exec?: DriverExec): DesktopDriver;