The deal follows weeks of fraught negotiations and threats of renewed hostilities, but key details remain unclear.