/** * Environment-variable gateway — the sanctioned funnel for `process.env` access * (mirrors `packages/config` in gobing-ai/spur; enforced by the * `boundary/env-var-hygiene` rule). Direct `process.env`/`Bun.env` access is * banned outside this module so the set of env consumers stays greppable. * * These accessors are node-bun only: on `cloudflare-workers` there is no * `process`; inject config explicitly rather than calling them (ADR-008). */ /** * Read one environment variable. Only an unset variable yields `fallback`; * an empty string is a set value and is returned as-is. */ export declare function getEnvVar(name: string, fallback?: string): string | undefined; /** * Read the live environment as a record. The returned object IS `process.env` * (not a copy): whole-record operations (`{ ...getEnvVars(), ...vars }`, * `Object.entries(getEnvVars())`) see later mutations, which child-spawn * composition relies on. For single variables prefer {@link getEnvVar}, * {@link setEnvVar}, or {@link removeEnvVar}. */ export declare function getEnvVars(): Record; /** * Set one environment variable through the sanctioned gateway. Passing * `undefined` removes the key, so the save/restore idiom * (`const prev = getEnvVar(k); … setEnvVar(k, prev)`) restores absence exactly. */ export declare function setEnvVar(name: string, value: string | undefined): void; /** Remove one environment variable; a no-op when the key is absent. */ export declare function removeEnvVar(name: string): void; /** * Read a runtime option from a `bootstrap.options`-style option bag, returning * `fallback` when the config, section, or key is absent (or null). The typed * replacement surface for config-carrying environment variables — call sites * own key naming and value coercion. */ export declare function getAppOptions(config: { bootstrap?: { options?: Record | null; } | null; } | null | undefined, key: string, fallback: T): T; //# sourceMappingURL=env.d.ts.map