import type { ImageContent } from '@earendil-works/pi-ai'; /** A clipboard image ready to attach, plus an optional note for the controller * to surface — either a resize note (from pi's `formatDimensionNote`) or, when * no image was attached, the reason (dropped over the cap, or no clipboard * tool / read failure). */ export interface ClipboardImageResult { /** Ready to push into a `prompt`/`steer`/`follow_up` frame's `images?`. ABSENT * when the image was read but DROPPED (a fallback exceeded MAX_BYTES base64), * or when there was no image to read but a precise reason is worth surfacing; * `note` then carries that reason and the caller attaches nothing. */ image?: ImageContent; /** Either a resize note ("Resized from 4032×3024 to 1568×1176", present only * when resized) or, when `image` is absent, the reason no image was attached. */ note?: string; } /** Persist a (already-resized) clipboard image to a stable temp file and return * its absolute path, so the attach editor can drop the PATH inline into the * prompt instead of inlining base64 the agent can't see. The broker runs on the * same host, so a tmpdir path is readable by the engine. */ export declare function writeClipboardImageToFile(image: ImageContent): string; /** Read + resize the current clipboard image. Returns `null` ONLY when the * clipboard genuinely holds no image; a `note`-only result means there is a * precise reason to surface (no clipboard tool, read failure, or an over-cap * drop). All best-effort — the caller shows a brief notice and carries on. */ export declare function readClipboardImage(): Promise; interface RawImage { bytes: Buffer; mimeType: string; } /** Outcome of the raw clipboard read, distinguishing the three cases the caller * must tell apart: `image` present → got bytes; `note` present → no image AND a * precise reason to surface (no clipboard tool / read failure); both absent → * the clipboard genuinely holds no image. */ export interface RawReadOutcome { image?: RawImage; note?: string; } /** Result of probing one clipboard tool, distinguishing a MISSING binary (so the * caller can say "no clipboard tool") from a tool that ran but produced no image * (`bytes` absent, `missing` false → genuinely empty). */ export interface RunResult { /** Tool stdout when it produced non-empty output. */ bytes?: Buffer; /** The binary was not found on PATH (ENOENT). */ missing?: boolean; } /** Pure macOS dispatch (the regression-test seam): try `pngpaste` if present, * else fall through to the native osascript read — a missing `pngpaste` must * NOT collapse to "no image", which was the stock-Mac bug. */ export declare function selectMacOutcome(runTool: (command: string, args: string[]) => RunResult, readNative: () => RawReadOutcome): RawReadOutcome; /** Pure Linux dispatch (the regression-test seam): Wayland (`wl-paste`) first, * then X11 (`xclip`), PNG then JPEG. If NO tool binary was found, surface a * precise "install …" note; if a tool ran but found no image, report empty. */ export declare function selectLinuxOutcome(runTool: (command: string, args: string[]) => RunResult, wayland: boolean): RawReadOutcome; export {};