Gravar-mail: A causal framework for surrogate endpoints with semi-competing risks data