





















@@ -10,6 +10,7 @@ import {
1010} from "@openclaw/normalization-core/string-normalization";
1111import { normalizeEnvVarKey } from "../infra/host-env-security.js";
1212import { parseTcpPort } from "../infra/tcp-port.js";
13+import { VERSION } from "../version.js";
1314import { resolveLaunchAgentPlistPath } from "./launchd.js";
1415import { isBunRuntime, isNodeRuntime } from "./runtime-binary.js";
1516import {
@@ -63,6 +64,7 @@ export const SERVICE_AUDIT_CODES = {
6364gatewayRuntimeNodeVersionManager: "gateway-runtime-node-version-manager",
6465gatewayRuntimeNodeSystemMissing: "gateway-runtime-node-system-missing",
6566gatewayTokenDrift: "gateway-token-drift",
67+gatewayServiceVersionMismatch: "gateway-service-version-mismatch",
6668launchdKeepAlive: "launchd-keep-alive",
6769launchdRunAtLoad: "launchd-run-at-load",
6870systemdAfterNetworkOnline: "systemd-after-network-online",
@@ -602,6 +604,20 @@ export function checkTokenDrift(params: {
602604return null;
603605}
604606607+function auditGatewayServiceVersion(command: GatewayServiceCommand, issues: ServiceConfigIssue[]) {
608+const serviceVersion = command?.environment?.OPENCLAW_SERVICE_VERSION?.trim();
609+if (!serviceVersion || serviceVersion === VERSION) {
610+return;
611+}
612+613+issues.push({
614+code: SERVICE_AUDIT_CODES.gatewayServiceVersionMismatch,
615+message: `Gateway service was installed by OpenClaw ${serviceVersion}; current CLI is ${VERSION}.`,
616+detail: command?.sourcePath,
617+level: "recommended",
618+});
619+}
620+605621export async function auditGatewayServiceConfig(params: {
606622env: Record<string, string | undefined>;
607623command: GatewayServiceCommand;
@@ -623,6 +639,7 @@ export async function auditGatewayServiceConfig(params: {
623639auditManagedServiceEnvironment(params.command, issues, params.expectedManagedServiceEnvKeys);
624640auditProxyServiceEnvironment(params.command, issues);
625641auditGatewayToken(params.command, issues, params.expectedGatewayToken);
642+auditGatewayServiceVersion(params.command, issues);
626643auditGatewayServicePath(params.command, issues, params.env, platform, params.expectedServicePath);
627644await auditGatewayRuntime(params.env, params.command, issues, platform);
628645此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。