import { type UiAction, type UiAdapter, type UiDispatchReceipt, type UiSnapshot, type UiStep } from "./contracts.js"; import { type CaptureTransform, type GeometryRect } from "./geometry.js"; export interface UiVisualCapture { image: Uint8Array; mimeType: "image/png" | "image/jpeg"; transform: CaptureTransform; liveBounds: GeometryRect; } export interface UiPointResult { points: Array<{ x: number; y: number; }>; space: "normalized" | "image-pixel"; model: string; revision: string; } /** Host callbacks own capture, the preflighted local Moondream client and input API. */ export interface VisualUiOptions { capture: (state: UiSnapshot, signal?: AbortSignal) => Promise; point: (image: UiVisualCapture, description: string, signal: AbortSignal) => Promise; click: (point: { x: number; y: number; }, state: UiSnapshot, signal?: AbortSignal) => Promise; model: string; revision: string; timeoutMs?: number; /** Host acknowledges capture-only availability failure; never catches semantic observation failure. Throw for lost owner/Stop. */ onCaptureUnavailable?: (error: unknown, state: UiSnapshot, signal?: AbortSignal) => void; desktopSession?: string; } /** Vision only supplies a candidate. The same controller still authorizes and verifies it. */ export declare class SemanticThenVisualAdapter implements UiAdapter { private readonly semantic; private readonly options; getDesktopVerificationScope(): import("./desktop-verification.js").DesktopVerificationScope | undefined; private step?; private grounding?; constructor(semantic: UiAdapter, options: VisualUiOptions); prepareStep(step: UiStep, signal?: AbortSignal): Promise; private matches; private read; private capture; private captureKey; observe(signal?: AbortSignal): Promise; perform(action: UiAction, signal?: AbortSignal): Promise; }