Resolve the root dir that holds per-project state and user config. Precedence: ``$CODEX_SELF_EVOLUTION_HOME`` → ``~/.codex-self-evolution``.
()
| 37 | |
| 38 | |
| 39 | def get_home_dir() -> Path: |
| 40 | """Resolve the root dir that holds per-project state and user config. |
| 41 | |
| 42 | Precedence: ``$CODEX_SELF_EVOLUTION_HOME`` → ``~/.codex-self-evolution``. |
| 43 | """ |
| 44 | override = os.environ.get(HOME_DIR_ENV) |
| 45 | if override: |
| 46 | return Path(override).expanduser().resolve() |
| 47 | return Path.home() / DEFAULT_HOME_DIRNAME |
| 48 | |
| 49 | |
| 50 | def mangle_project_path(path: Path) -> str: |
no outgoing calls