import type { Command } from "commander"; import type { EmitContext } from "../commander.js"; /** * Resolve the V8 old-space ceiling for the dashboard process. * * Next sizes `--max-old-space-size` to roughly half of system RAM when the * flag is absent, which on a large machine hands a long-lived dashboard a * ceiling it will never approach — so V8 never feels enough pressure to run a * major GC and the process settles at a multi-gigabyte working set made mostly * of collectable garbage. Pinning a modest ceiling restores that pressure. * * Precedence: explicit flag → `HARNERY_WEB_MAX_OLD_SPACE` → the default. * `0` (or any non-positive value) opts out and restores Next's own sizing. */ export declare function resolveMaxOldSpaceMb(flag?: string): number; /** * Append the heap ceiling to any inherited `NODE_OPTIONS`. Next only supplies * its own `--max-old-space-size` when the flag is absent, so appending here * wins without clobbering flags the caller set (source maps, inspector, …). */ export declare function nodeOptionsWithHeapCap(mb: number): string | undefined; /** Preload the request diagnostics hook without replacing Next's HTTP server. */ export declare function nodeOptionsWithWebDiagnostics(webDir: string, mb: number): string; export declare function webPerformanceLogDestination(coordRoot: string, env?: Readonly>): string; /** * Probe the exact localhost socket Next will claim. This is deliberately a * check-and-report step, not an alternate-port allocator: Harnery keeps one * memorable URL and asks the caller to resolve a real conflict explicitly. */ export declare function isWebPortAvailable(port: number): Promise; export declare function registerWebCommand(program: Command, emit: EmitContext): void; //# sourceMappingURL=web.d.ts.map