import type { AttachmentAdapter, CompleteAttachment, PendingAttachment } from "@assistant-ui/react"; export declare const MAX_PDF_BYTES: number; export declare const MAX_IMAGE_BYTES: number; export declare const MAX_IMAGE_DIMENSION = 2048; export declare const MAX_ESTIMATED_BODY_BYTES: number; export declare const AGGRESSIVE_MAX_IMAGE_DIMENSION = 1024; export declare const AGGRESSIVE_JPEG_QUALITY = 0.7; export declare function inferDocumentContentType(file: File): string; export declare function getFileDataURL(file: File | Blob): Promise; /** * Transcode an image to a web-safe JPEG or PNG via canvas and return its * data-URL. Throws if canvas is unavailable. */ export declare function transcodeImageToDataURL(file: File, opts?: { maxDimension?: number; jpegQuality?: number; }): Promise; /** * Return a web-safe, size-bounded data-URL for an image file. * * - Always transcodes formats that vision APIs reject (HEIC, TIFF, AVIF, BMP, …) * to JPEG/PNG via canvas, regardless of file size. * - Also downscales files over MAX_IMAGE_BYTES so large screenshots/photos * don't blow up the request body. * - Throws (does NOT silently fall back) when the format is non-web-safe and * canvas transcoding fails — the adapter should surface a visible error. */ export declare function getImageFileDataURL(file: File): Promise; /** * Estimate the serialized byte cost of a collection of attachment data-URLs * (base64 strings, accounting for JSON string escaping overhead). */ export declare function estimateAttachmentBodyBytes(dataUrls: string[]): number; export type QueuedAttachment = CompleteAttachment; export declare class DownscalingImageAttachmentAdapter implements AttachmentAdapter { accept: string; add(state: { file: File; }): Promise; send(attachment: PendingAttachment): Promise; remove(): Promise; } export declare class BinaryDocumentAttachmentAdapter implements AttachmentAdapter { accept: string; add(state: { file: File; }): Promise; send(attachment: PendingAttachment): Promise; remove(): Promise; } export declare function imageContentTypeFromDataUrl(dataUrl: string): string; export declare function imageExtensionFromContentType(contentType: string): string; export declare function createAgentImageAttachments(images?: readonly string[]): QueuedAttachment[] | undefined; export declare function isTextLikeFile(file: File): boolean; export declare function textFileAttachmentEnvelope(file: File, text: string): string; export declare function serializeAttachmentContentPart(part: Record): QueuedAttachment["content"][number] | null; export declare function serializeQueuedAttachments(attachments?: ReadonlyArray): Promise; //# sourceMappingURL=attachment-adapters.d.ts.map