If you're restricted to those two definitions, the first one is probably the closest match. However, historically, the term "terminal" in computer systems actually came from its broader use in telecommunications. As Wikipedia explains, in that context, a terminal is simply a device that ends a telecommunications link—it's where a signal enters or leaves the network. Examples include telephones, fax machines, computer terminals, network devices, printers, and workstations.
The first computer terminals were actually teleprinters (teletypes), which trace their origins back to Samuel Morse and 19th-century telegraph networks. Today, terminal programs in modern operating systems connect to a channel called a PTY (pseudo-teletype). These programs emulate the physical terminals—starting with teletypes and later moving to graphical displays—that once connected to mainframes.