Pakistan and Afghanistan have agreed to an “immediate ceasefire” after a week of deadly clashes along their border, as the ties between the two South Asian neighbours plunged to their lowest point since the Taliban returned to power in 2021.