AbstractSimple, or Kleinian, singularities are classified by Dynkin diagrams of type $ADE$. Let $\mathfrak {g}$ be the corresponding finite-dimensional Lie algebra, and $W$ its Weyl group. The set of $\mathfrak {g}$-invariants in the basic representation of the affine Kac–Moody algebra $\hat {\mathfrak {g}}$ is known as a $\mathcal {W}$-algebra and is a subalgebra of the Heisenberg vertex algebra $\mathcal {F}$. Using period integrals, we construct an analytic continuation of the twisted representation of $\mathcal {F}$. Our construction yields a global object, which may be called a $W$-twisted representation of $\mathcal {F}$. Our main result is that the total descendant potential of the singularity, introduced by Givental, is a highest-weight vector for the $\mathcal {W}$-algebra.