Ministers will be told to use AI to screen migrants for threats, adviser says