Bounds cacheDirectory/originals to an adaptive limit:
min(cacheOriginalsMaxBytes, bytesUsed + bytesFree - freeBelowBytes), with
bytesFree from fs.statfs, so it falls as the disk fills and rises as space
returns (status().originalsLimitBytes exposes it). Each original write evicts
least-recently-used originals until usage fits; last-use is the file mtime,
bumped on every read that returns a path, so order survives restarts. Pinned
originals and the file just written are never evicted — so an on-demand fetch
larger than the limit keeps the path it returns and re-downloads nothing; the
skipped file becomes eligible on a later write. When only such files remain the
cache stays over-limit. Defaults: 100 GiB limit, 50 GiB reserve; thumbnails and
the backup directory are never counted.
Model: opus-4-8