import { fstatSync } from "node:fs"; export interface GrabAttachmentRecord { id: string; origin: "drop" | "paste" | "path"; name: string; mime: string; bytes: number; sha256: string; width: number | null; height: number | null; path: string; sourcePath: string | null; } export declare var MAX_ATTACHMENT_BYTES: number; export declare var MAX_ATTACHMENT_BODY_BYTES: number; export declare var INBOX_MAX_AGE_MS: number; export declare class AttachmentError extends Error { status: number; constructor(status: number, message: string); } export declare function grabInboxRoot(): string; export declare function sessionInboxDir(sessionKey: string): string; export declare var MAX_SESSION_ATTACHMENTS: number; export declare function pruneGrabInbox(now?: number, maxAgeMs?: number): { removed: string[]; }; export declare function parseMultipartFile(contentType: string, body: Buffer): { name: string; mime: string; bytes: Buffer; origin: "drop" | "paste"; }; export declare function storeAttachmentBytes(sessionKey: string, input: { name: string; declaredMime: string; bytes: Buffer; origin: "drop" | "paste"; }): GrabAttachmentRecord; export declare function storeAttachmentPath(sessionKey: string, input: { path: string; projectDir: string; }): GrabAttachmentRecord; export declare function openAttachmentFile(path: string): { fd: number; stat: ReturnType; }; export declare function attachmentOpenError(error: unknown, resolved: string): AttachmentError; export declare function handleAttachmentRequest(sessionKey: string, projectDir: string, contentType: string, body: Buffer): { status: number; body: unknown; };