Magnetic jet shows how stars begin their final transformation