Linking stress in Earth’s crust and magma flow could help forecast eruptions and associated hazards