export declare const OMP_ENV_DIRNAME = ".omp"; export declare const OMP_ENV_FILENAME = ".env"; /** * Parse the text of a `.env` file. Accepted syntax (a deliberate subset, the * same rules src/jira.ts already follows): * * KEY=value → { KEY: "value" } * KEY="quoted value" → { KEY: "quoted value" } (single OR double quotes; matching outer pair stripped) * KEY=value with spaces → { KEY: "value with spaces" } * # comment → ignored * (blank line) → ignored * malformed (no `=`) → skipped (no throw) * KEY= → empty string → caller decides whether to apply * * NOT supported (out of scope for `omp`): `export KEY=`, `${VAR}` interpolation, * multi-line values, escape sequences. Keep this tiny. */ export declare function parseDotEnv(text: string): Record; export interface LoadOmpEnvOptions { /** Override the user's home directory. Defaults to `os.homedir()`. */ homeDir?: string; /** Target process.env-like map. Defaults to the real process.env. */ processEnv?: NodeJS.ProcessEnv; /** Where to send diagnostic warnings. Defaults to console.error (stderr). */ log?: (msg: string) => void; } export interface LoadOmpEnvResult { /** Number of keys actually applied to processEnv (skipped keys do not count). */ loaded: number; /** Resolved file path that was read, or null when no file exists. */ path: string | null; } /** * Locate `/.omp/.env`, parse it, and apply non-conflicting keys onto * `processEnv`. Keys already present in `processEnv` (incl. empty strings) are * preserved — shell environment always wins. * * Returns a summary so the caller can log "loaded N keys from " once at * startup if desired. We do NOT log secret values; only the path and counts. */ export declare function loadOmpEnv(opts?: LoadOmpEnvOptions): LoadOmpEnvResult;