fix: include OPENCLAW_SERVICE_VERSION in system presence version detection

The gateway's system-presence.ts was not detecting the version when
OpenClaw is run as a launchd service, because the daemon-runtime.ts
sets OPENCLAW_SERVICE_VERSION but system-presence.ts only checked
OPENCLAW_VERSION and npm_package_version.

This caused 'openclaw status' to show 'unknown' for the version.

Issue: #18456

🤖 AI-assisted (lightly tested)
This commit is contained in:
Buddy (AI)
2026-02-16 19:28:50 +00:00
committed by Peter Steinberger
parent 5d9a026a9e
commit 91903bac15

View File

@@ -50,7 +50,7 @@ function resolvePrimaryIPv4(): string | undefined {
function initSelfPresence() {
const host = os.hostname();
const ip = resolvePrimaryIPv4() ?? undefined;
const version = process.env.OPENCLAW_VERSION ?? process.env.npm_package_version ?? "unknown";
const version = process.env.OPENCLAW_VERSION ?? process.env.OPENCLAW_SERVICE_VERSION ?? process.env.npm_package_version ?? "unknown";
const modelIdentifier = (() => {
const p = os.platform();
if (p === "darwin") {