Well it specifies that Congress must declare war.
However, be that as it may. If you are interested you could examine the Burr treason trial wherein Chief Justice Marshall gave the definitive definition of “treason” under which our nation has operated for the 200 years since.
The trial is very instructive of the true nature of Thomas Jefferson and gives a portrait of him unknown to people today. And it is not pretty.
If someone in the U.S. had worked with the Japanese to ensure the success on their attack on Pearl Harbor, would such action have constituted treason, given that we were not at war with Japan at the time? I would think that it should, since the attack itself was clearly intended as an act of war. Not sure exactly how "waging war" should be defined, though.