/** * Capture settings the browser extension is allowed to change. * * This is an explicit allowlist with clamped ranges. The previous * implementation spread an arbitrary request body over its global settings * object, which let any caller repoint the screenshot directory or set an * unbounded log limit and exhaust memory. */ export interface CaptureSettings { /** Maximum entries retained per log category. */ logLimit: number; /** Character budget for a single query response. */ queryLimit: number; /** Maximum length of any individual captured string. */ stringSizeLimit: number; /** Maximum serialised size of a single captured entry. */ maxLogSize: number; /** * Byte budget for a screenshot. The browser degrades format and scale until * the capture fits, so an image never blows the client's context window or * overruns the transport's read buffer. */ screenshotMaxBytes: number; showRequestHeaders: boolean; showResponseHeaders: boolean; } export declare const LIMITS: { readonly logLimit: { readonly min: 1; readonly max: 5000; readonly default: 500; }; readonly queryLimit: { readonly min: 1000; readonly max: 500000; readonly default: 30000; }; readonly stringSizeLimit: { readonly min: 100; readonly max: 100000; readonly default: 500; }; readonly maxLogSize: { readonly min: 1000; readonly max: 1000000; readonly default: 20000; }; readonly screenshotMaxBytes: { readonly min: 50000; readonly max: 9000000; readonly default: 3000000; }; }; export declare const DEFAULT_SETTINGS: Readonly; /** * Produces a new settings object from `current` plus whatever of `patch` is * recognised. Unknown keys, wrong types and out-of-range values are discarded * rather than rejected, so a well-meaning client with a stale field still works. */ export declare function mergeSettings(current: Readonly, patch: unknown): CaptureSettings;