import type http from "node:http"; /** * Hard cap on inbound HTTP request bodies for the app sidecar (baseline #8). * The sidecar is localhost-only, but an unbounded body balloons RSS ~5.5x its * size (a 100 MB POST measured at ~550 MB RSS). 10 MB is far above any * legitimate prompt / settings / session payload. */ export declare const MAX_HTTP_BODY_BYTES: number; /** Raw attachment bytes one prompt may carry: the app's drop limit * (MAX_DROPPED_FILE_BYTES in gg-app's files.rs, MAX_ATTACHMENT_BYTES in attachments.ts). */ export declare const MAX_PROMPT_ATTACHMENT_BYTES: number; /** `POST /prompt` carries attachments as base64 (4/3 of raw) plus the text. */ export declare const MAX_PROMPT_BODY_BYTES: number; /** * Read a request body into a string, aborting if it exceeds `maxBytes`. * * On overflow the socket is destroyed, a single `413` JSON response is sent * (unless headers were already flushed), and the promise resolves `null` so the * caller can short-circuit without double-responding. Socket errors also resolve * `null` — call sites use `.then()` without `.catch()`, so rejecting would * surface as an unhandled rejection. */ export declare function readCappedBody(req: http.IncomingMessage, res: http.ServerResponse, maxBytes?: number): Promise;