I'm maintaining roslibrust with a major goal being maintaining ROS1 and ROS2 compatibility.
Happy for the API to continue to evolve, but it would be really handy to have some mechanism to discover what rosbridge_server variant I'm talking with, and adapt my protocol appropriately.
Providing this a ros service, "/rosbridge_server/get_version" that returns the version from the package.xml would be a simple way to do this. But we may prefer "/rosbridge_server/protocol_version" that returns a SemVer number corresponding to the design of the ROSBRIDGE_PROTOCOL.md
Versioning the protocol would be useful for the documentation as well!