Text this: Task Vector Geometry Underlies Dual Modes of Task Inference in Transformers