Files
openclaw/standalone-runtime-profile.mjs
Shakker bf6cce51c4 refactor: privatize standalone runtime profile resolver (#183111)
The standalone runtime profile now keeps its resolver private while preserving mode classification and process stability through the public getter.
2026-10-25 01:49:44 +00:00

15 lines
597 B
JavaScript

// The executing image owns its runtime profile; sidecars describe artifacts on disk.
let runtimeExecutionProfile;
function resolveRuntimeExecutionProfile(build) {
return build?.mode === "aot" ? "embedded-aot" : "dynamic-execution";
}
/** Compiler bootstrap installs image facts before any application entry or worker executes. */
export function getRuntimeExecutionProfile() {
return (runtimeExecutionProfile ??= resolveRuntimeExecutionProfile(
// eslint-disable-next-line no-underscore-dangle -- Compiler-owned bootstrap contract.
globalThis.__openclawStandaloneBuildInfo,
));
}