Computing distances in Agents.jl

In Agents.jl, is there a built-in method to compute the distance from an agent within a GridSpace that automatically uses the appropriate distance metric (consistent with the one specified during the space’s initialization) and correctly handles periodic boundary conditions?

So far, I have only encountered workarounds that either manually select the distance function based on the metric chosen at space creation and then handling periodicity, or just relying on a Pathfinder to infer distance from path length. But it feels like I’ve missed something.