On a local topos/local (∞,1)-topos $\mathbf{H}$, hence with extra fully faithful right adjoint $coDisc$ to the global section geometric morphism $(Disc \dashv \Gamma)$, is canonically induced the idempotent comonad $\flat \coloneqq Disc\circ \Gamma$. This modality sends for instance pointed connected objects $\mathbf{B}G$ to coefficients $\flat \mathbf{B}G$ for flat principal ∞-connections, and may therefore be referred to as the flat modality. It is itself the left adjoint in an adjoint modality with the sharp modality $\sharp \coloneqq coDisc \circ \Gamma$. If $\mathbf{H}$ is in addition a cohesive (∞,1)-topos then it is also the right adjoint in an adjoint modality with the shape modality $\int$.
The codiscrete objects in a local topos are the modal types for the sharp modality.
The discrete object in a local topos are the modal types for the flat modality.
(shape modality $\dashv$ flat modality $\dashv$ sharp modality)
$(ʃ \dashv \flat \dashv \sharp )$
dR-shape modality $\dashv$ dR-flat modality
$ʃ_{dR}\dashv \flat_{dR}$
(reduction modality $\dashv$ infinitesimal shape modality $\dashv$ infinitesimal flat modality)
$(\Re \dashv ʃ_{inf} \dashv \flat_{inf})$
See the references at local topos.