How local stresses control magma-chamber ruptures, dyke injections, and eruptions in composite volcanoes