kit_root.py
python
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14
Reconcile reviewed credential compatibility 32254cd939885d9…
Human
patch
8 days ago
| 1 | """Locate the kit installation root and carried version.""" |
| 2 | |
| 3 | from __future__ import annotations |
| 4 | |
| 5 | from functools import lru_cache |
| 6 | from pathlib import Path |
| 7 | |
| 8 | |
| 9 | @lru_cache(maxsize=1) |
| 10 | def kit_root() -> Path: |
| 11 | """Return the absolute path to the overseer-kit root (parent of ``cli/``).""" |
| 12 | return Path(__file__).resolve().parent.parent |
| 13 | |
| 14 | |
| 15 | def kit_version() -> str: |
| 16 | """Read the semver carried by this CLI from ``VERSION``.""" |
| 17 | version_path = kit_root() / "VERSION" |
| 18 | return version_path.read_text(encoding="utf-8").strip() |
File History
2 commits
sha256:106ef9e12cca7f3be3ffb2a6bd3abfa76f032dce453c9e5010d732a8d86f2e14
Reconcile reviewed credential compatibility 32254cd939885d9…
Human
patch
8 days ago
sha256:c87cf2c2f03da507f66f93922cb339a2cbebb33ad6372a6039032fb09a20da12
Reconcile reviewed Overseer recovery d47291d5d9030de5ebef71…
Human
minor
⚠
9 days ago