export interface ImageInput { /** * Pure base64 string (no data URL prefix). Extracted from data URLs too. * * Note: callers may choose to forward the *original* data URL string to the * backend instead of this pure payload — see {@link readImageInput} doc for * the CLI-specific convention around data URLs. */ base64: string; /** Derived image format. jpeg | jpg | png | webp | bmp | tiff */ imageFormat: string; /** * Whether the original input was a data URL. CLI consumers typically pass * the original data URL through to the backend untouched (the backend can * parse `data:image/;base64,…` directly), and only need `base64` + * `imageFormat` for local-file inputs. */ isDataUrl: boolean; } /** * Read an image from a local file path or a data URL and return its * base64 payload together with format metadata. * * Supported formats (per v0.3.0 spec): jpeg, jpg, png, webp, bmp, tiff. * GIF and SVG are intentionally excluded. * * ## Conventions for CLI consumers * * The CLI deliberately supports *two* shapes when forwarding to the backend's * `RetrievalQuery.imageBase64` field, distinguished by `isDataUrl`: * * - **Local file path** (`isDataUrl=false`): the CLI sends pure base64 * (`base64`) together with the explicit `imageFormat` it derived from the * file extension. This is the canonical wire shape the API was designed for. * * - **Data URL** (`isDataUrl=true`): the CLI sends the *original* data URL * string (e.g. `data:image/png;base64,iVBOR…`) to the backend untouched. * `imageFormat` is omitted because the MIME is already encoded in the data * URL prefix and the backend parses it directly. This makes interactive * debugging easier — users can paste a screenshot URL straight from * browsers / clipboard tools without manual base64 stripping. * * Both shapes are accepted by the backend; consumers should not "normalize" * data URLs back to pure base64 unless they also re-emit `imageFormat`. */ export declare function readImageInput(input: string): ImageInput; //# sourceMappingURL=read-image-input.d.ts.map