Direct detection of a break in the teraelectronvolt cosmic-ray spectrum of electrons and positrons