If you are limited to these two definitions, the first is closest. But, historically, the application of "terminal" to computer systems derived from its more general use in the field of telecommunications. In that context, as Wikipedia defines it,
In the context of telecommunications, a terminal is a device which ends a telecommunications link and is the point at which a signal enters and/or leaves a network. Examples of equipment containing network terminations are telephones, fax machines, computer terminals and network devices, printers and workstations.
The first computer terminals were teleprinters (Teletypes) that had their origins with Samuel Morse and the telegraph networks of the 19th century. Terminal programs in modern operating systems connect to a channel called a PTY, or psuedo-teletype. These terminal programs emulate the physical terminals (teletypes followed by graphical displays) that once connected to a mainframe.