"""Load bootstrap config from config.yaml.""" import os from pathlib import Path import yaml CONFIG_PATH = os.environ.get("PIPEKIT_CONFIG", "/opt/pipekit/config.yaml") def load_config() -> dict: path = Path(CONFIG_PATH) if not path.exists(): raise FileNotFoundError(f"Config not found: {path}") with open(path) as f: return yaml.safe_load(f) _config = None def get_config() -> dict: global _config if _config is None: _config = load_config() return _config