helpers: require "protocols" late to avoid circularity