The five permanent UN Security Council members have agreed the text of a draft UN resolution for the Syrian peace process, diplomats say.