UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

16 lines (15 loc) • 706 B
import { d as resolveGatewayLaunchAgentLabel } from "./constants-BZisy3jr.mjs"; import { n as sanitizeForLog } from "./ansi-CZa2t0Hf.mjs"; //#region src/daemon/launchd-label.ts /** Resolves the one effective launchd label shared by lifecycle and diagnostics. */ function assertValidLaunchAgentLabel(e) { const t = e.trim(); if (!/^[A-Za-z0-9._-]+$/.test(t)) throw new Error(`Invalid launchd label: ${sanitizeForLog(t)}`); return t; } function resolveLaunchAgentLabel(e) { const t = e?.OPENCLAW_LAUNCHD_LABEL?.trim(); return assertValidLaunchAgentLabel(t || resolveGatewayLaunchAgentLabel(e?.OPENCLAW_PROFILE)); } //#endregion export { resolveLaunchAgentLabel as n, assertValidLaunchAgentLabel as t };