Add missing type hints to federation handler and server.