Return the OS-appropriate cache directory for Deep Agents Code.
Uses ~/Library/Caches on macOS, LOCALAPPDATA on Windows (falling back
to ~/AppData/Local), and XDG_CACHE_HOME elsewhere when it is an
absolute path (falling back to ~/.cache). The XDG spec treats relative
XDG_CACHE_HOME values as invalid, so they are ignored rather than
resolved against the launch directory. If the OS home directory cannot be
resolved to an absolute path, caches fall back to the selected profile's
.state/cache directory so an absolute DEEPAGENTS_HOME remains usable.
Platform-native locations are the convention for a long-lived app (this is
what platformdirs codifies and what uv itself does — its own cache is
~/Library/Caches/uv on macOS). The install script deliberately does not
follow this: as a portable one-shot POSIX bootstrap it uses XDG-style
${XDG_CACHE_HOME:-~/.cache} on every platform (like the rustup and uv
installers), so on macOS its <cache>/deepagents-code/install.log lands
under a different root than the update logs. That divergence is
intentional; do not "fix" one side to match the other without a concrete
need (e.g., a diagnostic command that collects both logs).