State’s writ largely restored, progressing to achieve enduring peace: COAS