  We describe a pure spinor BRST cohomology framework to compactly represent
ten-dimensional one-loop amplitudes involving any number of massless open- and
closed-string states. The method of previous work to construct scalar and
vectorial BRST invariants in pure spinor superspace signals the appearance of
the hexagon gauge anomaly when applied to tensors. We study the systematics of
the underlying BRST anomaly by defining the notion of pseudo-cohomology. This
leads to a rich network of pseudo-invariant superfields of arbitrary tensor
rank whose behavior under traces and contractions with external momenta is
determined from cohomology manipulations. Separate papers will illustrate the
virtue of the superfields in this work to represent one-loop amplitudes of the
superstring and of ten-dimensional super-Yang--Mills theory.
