Syria's Kurdish-led SDF has agreed to a phased integration into government forces following weeks of fighting and a fragile ceasefire.