Advertise support for OSC 52 in DA1 response
It's becoming an informal standard to advertise support for OSC 52 (copy to clipboard) in the DA1 (primary device attributes) response. See https://github.com/contour-terminal/vt-extensions/blob/master/clipboard-extension.md for some details and emulators/applications that support it (includes mainline emacs and neovim!). As for the requirements set forth in the linked document:
"Conforming terminals MUST at least support an empty Pc value, and a Pc value of c. Other values are optional." Mosh supports Pc being c. It does not support it being empty yet, but there are a couple open PRs to fix this (#1054 and #1104).
In practice, it could make sense to start advertising support even before supporting empty Pc because many applications that look for this OSC 52 support advertisement (eg Emacs) still primarily use Pc=c
"Conforming terminals MUST support a Pd value that is a base64 encoded representation of the content that will be copied to the clipboard." -- already supported
As it stands right now, Emacs under Mosh will autodetect that copy to clipboard is not supported and simply will not attempt it, even though there is enough support there.
Source: mobile-shell/mosh