# Tangent and cotangent bundle of a smooth algebraic stack

Are there any good notion of tangent and cotangent bundle (and stacks) of a smooth algebraic stack, similar to the notion of tangent and cotangent bundles (and spaces) of smooth schemes? I am interested in the case of moduli stack $\mathcal{M}_G^s$ of stable principal $G$-bundles of some fixed topological type $\delta \in \pi_1(G)$ over a smooth complex projective curve $X$. I guess there should be some open embedding of the cotangent stack of $\mathcal{M}_G^s$ into the moduli stack $\mathcal{M}_{G, Higgs}^s$ of stable $G$-Higgs bundles, and the complement of the image of the embedding is of codimension $\geq 2$, like the case of moduli space $M_G^s$ of stable $G$-bundles and the moduli space $M_{G, Higgs}^s$ of stable $G$-Higgs bundles (I am not sure if this is correct or not). If this is correct, can anyone give any reference for this?