  Kontsevich and Soibelman defined Donaldson-Thomas invariants of a 3d
Calabi-Yau category equipped with a stability condition. Any cluster variety
gives rise to a family of such categories. Their DT invariants are encapsulated
in a single formal automorphism of the cluster variety, called the
DT-transformation.
  Let S be an oriented surface with punctures, and a finite number of special
points on the boundary considered modulo isotopy. It give rise to a moduli
space X(m, S), closely related to the moduli space of PGL(m)-local systems on
S, which carries a canonical cluster Poisson variety structure. For each
puncture of S, there is a birational Weyl group action on the space X(m, S). We
prove that it is given by cluster Poisson transformations. We prove a similar
result for the involution * of the space X(m,S) provided by dualising a local
system on S.
  We calculate the DT-transformation of the moduli space X(m,S), with few
exceptions. Namely, let C(m,S) be the transformation of the space X(m,S) given
by the product of three commuting maps: the involution *, the product, over all
punctures of S, of the longest element of the Weyl group action corresponding
to the puncture, and the "shift of the special points on the boundary by one"
map. Using a characterisation of a class of DT-transformations due to Keller,
we prove that C(m,S) = DT.
  We prove that, burring few exceptions, the Weyl group and the involution *
act by cluster transformations of the dual moduli space A(m, S). So the formula
C(m,S) = DT is valid for the space A(m,S).
  Our main result, combined with the work of Gross, Hacking, Keel and
Kontsevich, deliver a canonical basis in the space of regular functions on the
cluster variety X(m,S), and in the upper cluster algebra with principal
coefficients related to the pair (SL(m), S), with few exceptions.
