On a local topos acts a comonad , being the left adjoint to the monad induces by the extra right adjoint of the global section geometric morphism. This is the flat modality on the topos.
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.
See the references at local topos.