When foreign actors commit such an act from outside the country, and their government isn't cooperative about stopping/punishing them, that's exactly the kind of thing intelligence agencies should be involved with.
The original author said: "I don't want the NSA to perform domestic civilian law enforcement functions"
In other words, the FBI (and police, etc) perform domestic law enforcement, following criminal procedure. The NSA, CIA, etc handle non-domestic (foreign) threats, in whatever manner they see fit.