Files
openclaw/src/commands/daemon-install-runtime-warning.ts
Vincent Koc f33ab243cf fix(sqlite): reject runtimes vulnerable to WAL corruption (#106065)
* fix(sqlite): require WAL-reset-safe Node runtime

* docs(sqlite): document safe Node runtime floor

* fix(sqlite): defer runtime library validation until use

* fix(ci): align startup memory with Node 24.15
2026-07-13 13:59:00 +08:00

21 lines
827 B
TypeScript

// Runtime warning helpers for daemon install plans that depend on Node.
import { renderSystemNodeWarning, resolveSystemNodeInfo } from "../daemon/runtime-paths.js";
import type { GatewayDaemonRuntime } from "./daemon-runtime.js";
export type DaemonInstallWarnFn = (message: string, title?: string) => void;
/** Warn when daemon install will use a system Node path that may be unsuitable. */
export async function emitNodeRuntimeWarning(params: {
env: Record<string, string | undefined>;
runtime: GatewayDaemonRuntime;
nodeProgram?: string;
warn?: DaemonInstallWarnFn;
title: string;
}): Promise<void> {
const systemNode = await resolveSystemNodeInfo({ env: params.env });
const warning = renderSystemNodeWarning(systemNode, params.nodeProgram);
if (warning) {
params.warn?.(warning, params.title);
}
}