//#region src/daemon/constants.ts
const GATEWAY_LAUNCH_AGENT_LABEL = "ai.symi.gateway";
const GATEWAY_SYSTEMD_SERVICE_NAME = "symi-gateway";
const GATEWAY_WINDOWS_TASK_NAME = "Symi Gateway";
const GATEWAY_SERVICE_MARKER = "symi";
const GATEWAY_SERVICE_KIND = "gateway";
const NODE_LAUNCH_AGENT_LABEL = "ai.symi.node";
const NODE_SYSTEMD_SERVICE_NAME = "symi-node";
const NODE_WINDOWS_TASK_NAME = "Symi Node";
const NODE_SERVICE_MARKER = "symi";
const NODE_SERVICE_KIND = "node";
const NODE_WINDOWS_TASK_SCRIPT_NAME = "node.cmd";
function normalizeGatewayProfile(profile) {
	const trimmed = profile?.trim();
	if (!trimmed || trimmed.toLowerCase() === "default") return null;
	return trimmed;
}
function resolveGatewayProfileSuffix(profile) {
	const normalized = normalizeGatewayProfile(profile);
	return normalized ? `-${normalized}` : "";
}
function resolveGatewayLaunchAgentLabel(profile) {
	const normalized = normalizeGatewayProfile(profile);
	if (!normalized) return GATEWAY_LAUNCH_AGENT_LABEL;
	return `ai.symi.${normalized}`;
}
function resolveLegacyGatewayLaunchAgentLabels(profile) {
	return [];
}
function resolveGatewaySystemdServiceName(profile) {
	const suffix = resolveGatewayProfileSuffix(profile);
	if (!suffix) return GATEWAY_SYSTEMD_SERVICE_NAME;
	return `symi-gateway${suffix}`;
}
function resolveGatewayWindowsTaskName(profile) {
	const normalized = normalizeGatewayProfile(profile);
	if (!normalized) return GATEWAY_WINDOWS_TASK_NAME;
	return `Symi Gateway (${normalized})`;
}
function formatGatewayServiceDescription(params) {
	const profile = normalizeGatewayProfile(params?.profile);
	const version = params?.version?.trim();
	const parts = [];
	if (profile) parts.push(`profile: ${profile}`);
	if (version) parts.push(`v${version}`);
	if (parts.length === 0) return "Symi Gateway";
	return `Symi Gateway (${parts.join(", ")})`;
}
function resolveGatewayServiceDescription(params) {
	return params.description ?? formatGatewayServiceDescription({
		profile: params.env.SYMI_PROFILE,
		version: params.environment?.SYMI_SERVICE_VERSION ?? params.env.SYMI_SERVICE_VERSION
	});
}
function resolveNodeLaunchAgentLabel() {
	return NODE_LAUNCH_AGENT_LABEL;
}
function resolveNodeSystemdServiceName() {
	return NODE_SYSTEMD_SERVICE_NAME;
}
function resolveNodeWindowsTaskName() {
	return NODE_WINDOWS_TASK_NAME;
}
function formatNodeServiceDescription(params) {
	const version = params?.version?.trim();
	if (!version) return "Symi Node Host";
	return `Symi Node Host (v${version})`;
}

//#endregion
export { NODE_SERVICE_MARKER as a, resolveGatewayLaunchAgentLabel as c, resolveGatewaySystemdServiceName as d, resolveGatewayWindowsTaskName as f, resolveNodeWindowsTaskName as g, resolveNodeSystemdServiceName as h, NODE_SERVICE_KIND as i, resolveGatewayProfileSuffix as l, resolveNodeLaunchAgentLabel as m, GATEWAY_SERVICE_KIND as n, NODE_WINDOWS_TASK_SCRIPT_NAME as o, resolveLegacyGatewayLaunchAgentLabels as p, GATEWAY_SERVICE_MARKER as r, formatNodeServiceDescription as s, GATEWAY_LAUNCH_AGENT_LABEL as t, resolveGatewayServiceDescription as u };