Files
openclaw/node-compile-cache.d.mts
Peter Steinberger c9fc997e9a fix(gateway): avoid main-thread compile cache flush stalls (#171358)
Leave Node compile caching disabled on the Gateway main thread while preserving the shared build-scoped worker cache and existing worker flush boundaries. Remove the two synchronous Gateway flush calls that can stall cold startup.

Reuse the existing inherited-cache respawn handoff, preserving the supervised PID on supported platforms and the child bridge on Windows. Ordinary CLI caching and caller-authored disable settings remain unchanged. Permission-mode callers retain an already-active cache when process replacement may be forbidden.

Four alternating cold/warm runs retained worker caching, eliminated main-thread cache flushes, and passed the warm CPU regression gate. Focused regression proof covers main/worker cache state, Windows handoff, and POSIX signal propagation.
2026-10-13 14:34:55 -07:00

19 lines
685 B
TypeScript

export function enableOpenClawCompileCache(params: {
directory: string | undefined;
env?: NodeJS.ProcessEnv;
foregroundGateway?: boolean;
}): void;
export function scheduleOpenClawCompileCacheFlush(): void;
export function resolveOpenClawCompileCacheRespawnEnv(params: {
directory: string | undefined;
env?: NodeJS.ProcessEnv;
foregroundGateway?: boolean;
}): NodeJS.ProcessEnv | undefined;
export function resolveOpenClawCompileCacheDirectory(params: {
installRoot: string;
env?: NodeJS.ProcessEnv;
foregroundGateway?: boolean;
prewarm?: boolean;
}): string | undefined;
export function resolveSafeNodeCompileCacheDirectory(directory: string): string | undefined;