Yes, espionage is not an act of war and is a regular occurrence, even between allied nations. You can see this clearly during WW2 now that much of the information has been declassified. Great Britain ran an extensive intelligence operation in New York prior to US entry into the war.