openclaw/node-compile-cache.d.mts
Peter Steinberger 6e987af9bc
fix(launcher): keep the Node compile-cache path short on Windows (#162841)
2026.9.7 lengthened the compile-cache marker from <mtime>-<size> to build-<buildId>, which pushed cache paths on Windows into the directory-length window where Node 24's module.enableCompileCache() never returns (nodejs/node#66438); every OpenClaw process start could then spin at full CPU. The shared cache owner now uses a 16-character hash of the full build id as the marker, refuses Windows cache paths over 200 characters with a recorded warning (cache off for that process), and no longer propagates an unsafe inherited cache path to children. Legacy namespace handling and POSIX behavior are unchanged; native Windows/Node 24.18 completes the packaged CLI with a 220-character TEMP in 2.4 s.

Closes #162821
2026-10-01 11:29:41 -07:00

6 lines
310 B
TypeScript

export function resolveOpenClawCompileCacheDirectory(params: {
installRoot: string;
env?: NodeJS.ProcessEnv;
}): string | undefined;
export function resolveSafeNodeCompileCacheDirectory(directory: string): string | undefined;
export function maintainOpenClawCompileCache(directory: string): Promise<void>;