Afghanistan warns it will defend itself against aggression as tensions with Pakistan escalate over worsening military disputes.