feature(terminal) add connect/disconnect events