mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-26 10:13:27 +08:00
The standalone runtime profile now keeps its resolver private while preserving mode classification and process stability through the public getter.
15 lines
597 B
JavaScript
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,
|
|
));
|
|
}
|