Kind: function.
Return the cache root pathlib.Path. Cross-platform via
platformdirs. See
ADR-0006
for the full layout contract.
Downstream tools and agents need a stable, programmatic way to find the
cache without re-implementing platformdirs logic. Returning a
Path (not a string) keeps callers honest about path
handling on Windows.
Kind: function.
Return the total byte size of files under the cache root. Returns 0
when the cache is empty. Iterates with rglob; not intended
for sub-second polling.
Kind: function.
Remove cached content. The scope argument selects what to
remove ("all", "versions", "index",
or a specific tool version label).
Per ADR-0006, only re-fetchable upstream content lives under the cache root, so clearing is always safe. Future scopes that touch user-owned state would require an ADR.