/** * Outbound attachment preparation — pure, no MCP or SMTP dependency. * * Stats every file BEFORE anything is read into memory, and enforces the * configured cap against the base64-ENCODED size (raw × 4/3), because that is * what the SMTP server actually receives; a 20 MB file inside a 25 MB limit * still bounces as ~27 MB on the wire. Rejections list every file with its * size so the caller can see exactly what to trim instead of decoding an * opaque SMTP 552 later. */ import type { AttachmentMeta } from '../types/index.js'; /** An attachment request: a bare path, or a path with inline/cid metadata. */ export interface AttachmentInput { path: string; /** Override the filename shown to the recipient (default: basename). */ filename?: string; /** Content-ID — the HTML body references the file as src="cid:". */ cid?: string; /** Explicit MIME type when the extension would misdetect. */ contentType?: string; } export interface PreparedAttachment { filename: string; path: string; size: number; cid?: string; contentType?: string; } export interface PreparedAttachments { attachments: PreparedAttachment[]; totalBytes: number; totalEncodedBytes: number; } export declare function formatSize(bytes: number): string; /** * Render an email's attachment list for a tool response. * * The part id is the point. `download_attachment` accepts a filename or a * partId and tells the caller to read partIds from `get_email`, but nothing * ever printed them — and for the case the docs single out, inline `cid:` * images, the filename selector cannot work at all: such parts rarely carry a * name parameter, so extractAttachments falls back to 'unnamed' and every one * of them collides. The cid is shown for the same reason, since that is what * an `` in the body refers to. */ export declare function describeAttachments(attachments: AttachmentMeta[]): string; export declare function prepareAttachments(paths: (string | AttachmentInput)[], maxTotalMb: number): Promise; //# sourceMappingURL=attachments.d.ts.map