#!/usr/bin/env python3.14# -*- coding: utf-8 -*-"""Minimal `KEY=VALUE` reader for the scoped runtime env files under `/etc/euler`.The admin CLIs run as root and read their service's scoped env file(`auth.env`, `msg.env`) to recover the admin token and socket path. That is theonly reason this exists: the token lives **only** in a root-readable file, never in theoperator's environment, so the CLI has to read the file the unit reads.Shared rather than duplicated per service because :mod:`euler_webshell.msg` must not import:mod:`euler_site.auth` (web-server-guide § Messaging). Not a dotenv implementation —no interpolation, no export, no multi-line values; the files it reads are generated bythe setup kits and contain exactly `KEY=VALUE` lines."""from__future__importannotations__all__=['env_file_values']frompathlibimportPathdefenv_file_values(path:Path)->dict[str,str]:"""The `KEY=VALUE` pairs in *path*; empty when it is absent or unreadable."""values:dict[str,str]={}try:lines=path.read_text(encoding='utf-8').splitlines()exceptOSError:returnvaluesforrawinlines:line=raw.strip()ifnotlineorline.startswith('#')or'='notinline:continuekey,_,value=line.partition('=')values[key.strip()]=value.strip().strip('\'"')returnvalues