Syria's new leader Ahmed al-Sharaa agreed to a ceasefire with Kurdish forces after government troops advanced into northern and eastern regions.