I’ve been thinking:
Since a semiautomatic rifle is defined as: “any repeating rifle which utilizes a portion of the energy of a firing cartridge to extract the fired cartridge case and chamber the next round, and which requires a separate pull of the trigger to fire each cartridge.”
There is a workaround. Eliminate the recoil springs and most of the firing mechanism. Replace them with a small servo set that cycles the bolt and then re-locks it after each shot. The weapon would not be a semi-automatic at that point, since the energy to extract and chamber would not come from the energy of the fired cartridge.
The magazine of such a weapon could contain the battery and be recharged between firings, the battery could be in the weapon, or both.