refactor(daemon): share service description resolve

This commit is contained in:
Peter Steinberger
2026-02-16 00:36:43 +00:00
parent 58cf37ceeb
commit 0dbc51aa55
5 changed files with 41 additions and 20 deletions

View File

@@ -75,6 +75,20 @@ export function formatGatewayServiceDescription(params?: {
return `OpenClaw Gateway (${parts.join(", ")})`;
}
export function resolveGatewayServiceDescription(params: {
env: Record<string, string | undefined>;
environment?: Record<string, string | undefined>;
description?: string;
}): string {
return (
params.description ??
formatGatewayServiceDescription({
profile: params.env.OPENCLAW_PROFILE,
version: params.environment?.OPENCLAW_SERVICE_VERSION ?? params.env.OPENCLAW_SERVICE_VERSION,
})
);
}
export function resolveNodeLaunchAgentLabel(): string {
return NODE_LAUNCH_AGENT_LABEL;
}