kit_root.py file-level

at sha256:a · View file ↗ · Intel ↗

History
1 files
1 commits
0 hotspots
0 🧊 dead
0 💥 blast risk
sha256:5 chore(governance): sync handover+roadmap to 8358f96 (drift: D1=drifted,… · aaronrene · Sep 5, 2026
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()