/** * The per-station runner configuration surface, read from a single mode-600 * file (`~/.hasna/loops/runner.env`, honoring LOOPS_DATA_DIR). The control * plane URL and key are credentials; the machine id and claim scope are the * runner's deployment identity. All four live in the file so that a package * update (version bump + service restart) never touches per-station config. * * The file is read, never sourced: it is plain `KEY=value` (optionally * `export `-prefixed and quoted), and shelling out to source it would mean * executing arbitrary code from disk on every runner start, for no gain. */ export declare const RUNNER_ENV_FILE_KEYS: readonly ["HASNA_LOOPS_API_URL", "HASNA_LOOPS_API_KEY", "LOOPS_RUNNER_MACHINE_ID", "LOOPS_RUNNER_CLAIM_SCOPE"]; export type RunnerEnvFileKey = (typeof RUNNER_ENV_FILE_KEYS)[number]; export interface RunnerEnvFileLoad { /** Absolute path of the env file (resolved, may not exist). */ envFile: string; /** Whether the file exists and was parsed. */ present: boolean; /** The loaded values for keys that were not already set in the given env. */ loaded: Record; } /** * Load the runner env file. Only keys not already set (non-blank) in `env` * are returned, so an explicit shell value always wins over the file. Fails * closed: a group/other-readable file is refused (it may hold the control * plane API key), naming the path and the chmod remedy, never a value. */ export declare function loadRunnerEnvFile(env?: NodeJS.ProcessEnv): RunnerEnvFileLoad; /** * Apply the runner env file into `env` (default: process.env), filling only * keys that are not already set. Returns the load result. */ export declare function applyRunnerEnvFile(env?: NodeJS.ProcessEnv): RunnerEnvFileLoad;