export declare const UPLOAD_MAX_BYTES: number; export interface ResolvedUploadFile { /** Absolute path of the temp (or caller-supplied local) file. */ path: string; /** Basename to report back ("logo.png" style). */ name: string; bytes: number; /** True when `path` is a temp file this module created (caller cleans up). */ temp: boolean; } export declare class UploadSourceError extends Error { } export interface UploadResize { width?: number; height?: number; fit?: "contain" | "cover"; format?: "png" | "jpeg" | "webp"; } /** Loose act args (flat width/height/fit/format from browser.py, or a strict * `resize` object) → a normalized UploadResize, or null when none asked. */ export declare function parseUploadResize(args: Record): UploadResize | null; /** Apply a resize/convert to a resolved file by running a canvas job through * the supplied JS evaluator (an async-IIFE expression whose awaited value is * the transformed image as base64). Returns a NEW temp file; throws * UploadSourceError with an actionable message when the page cannot do it. */ export declare function applyUploadResize(file: ResolvedUploadFile, resize: UploadResize, evaluate: (expression: string) => Promise): Promise; /** Staged-handle source: fetch /browser-media/.. */ export declare function resolveHandleSource(serverBase: string, handle: string): Promise; /** URL source: guarded direct download from the runner machine. */ export declare function resolveUrlSource(url: string): Promise; /** Base64 data-URL source: decoded locally (no network). Same image-only * allowlist, sniff and cap. NOTE the local bridge's request body cap bounds * how much base64 can arrive this way; large files should come as a staged * handle or a url. */ export declare function resolveDataUrlSource(dataUrl: string): Promise; /** Local-path source (LOCAL RUNNER ONLY): an image file already on this * machine. Image-gated by magic bytes, so this cannot be used to lift an * arbitrary local file (keys, configs, code) onto a website. */ export declare function resolvePathSource(path: string): Promise;