In my world, portals are magical devices that, when activated by some command, create a connection to a linked portal device. Portals allow objects to pass from the source (the portal device that was activated) to the destination device. However, objects cannot travel back from the destination device to the source device without the destination device being activated as a source. The activation command is made specifically for the portal when it is created and is often effectively impossible to derive from a portal (active or inert) without destroying it. It is possible for an object or person part-way through a portal to retreat, as long as it has not passed completely to the other side.
When a portal is activated, energy can travel in both directions through the portal, both electromagnetic radiation and sound energy, though the gases that carry the sound energy do not actually pass through the portal. This allows the person activating the portal to more easily determine if it is safe to proceed through the portal prior to actually doing so and allows a person on the source-side of a portal to communicate bidirectionally with a person on the destination side. This is the return-energy channel.
Physically, a portal device is often a physical doorway or tunnel, or perhaps a ring, maybe like a stargate, but it could be much more lightly constructed, possibly as little as a stiff, shaped wire. A portal functions from both sides simultaneously without collision of transmitted objects within the portal.
In my story, an inactive portal device left behind by an enemy has been discovered, but its activation command cannot be determined. Its discoverers wish to leave a trap for the enemy should the enemy ever attempt to use the portal again.
It would be easy enough to place the portal device in an unsafe location, but the enemy would likely be able to see that the location was unsafe and would decline to send anything through it, thus avoiding the trap.
I am currently thinking that some sort of energy weapon trap could be placed near the destination portal device so that when the enemy activates the portal, the energy weapon would be activated and its energy would pass through the portal in reverse using the return-energy channel, and cause harm to facilities and personnel in the vicinity of the source portal.
My question is: What would be the most appropriate weapon or harmful effect known to present-day science to use as the source of harm in this trap, considering the caveats below, in order of importance?
The weapon/effect should cause as little harm or destruction as possible on the destination side of the portal (save to enemy personnel/material coming through the portal who get in the way).
The weapon/effect should cause the greatest possible harm and destruction to enemy personnel and facilities on the source side of the portal.
The weapon/effect should maximize the time that the portal remains open, either by incapacitating the source portal's operator quickly enough that it cannot be closed, or by being sufficiently subtle that it is not immediately noticeable that harm is occurring.
The weapon should function for as long as possible and should be able to be activated and deactivated automatically when the portal opens or closes.
Collateral effects passing through the portal from the source to the destination side should be minimized as far as practical.
The weapon should cause as little damage as practical to either the source or destination portals so as to maximize the potential for damage to other personnel and facilities on the source side.
The monetary cost of the weapon/effect, if a cost can be determined at all, should be minimized.
Answerers need not concern themselves with how portal activation is detected. Assume an appropriate detector exists and can activate and - if possible - deactivate the weapon/effect.
The total energy emitted from the weapon/effect should not exceed 1 terajoule.
Where the delivery of energy occurs over the period during which the portal is open, assume that the portal will remain open for ten minutes unless closed earlier by its operator.
A physical modern-day device capable of emitting a suitable harmful effect would be preferred, but a suitable harmful effect which cannot be generated with current technology may also be considered - the effect can be generated magically.
Assume that the enemy uses human soldiers in late medieval plate armor and small numbers of automata that are effectively robust solid steel objects that do not have electronics susceptible to EMP and range in volume from 100 to 500 liters. Construction of facilities on the source-side of the portal should be considered to be similar to that of late medieval fortifications.
As additional context, the destination portal device is in a large garden area, and cannot be moved from its location without potentially giving away that it has been discovered. Any weapon placed in the garden and aimed at the inactive portal must not harm the garden. Nukes are right out, as there isn't enough space for the massive amount of shielding required to protect the garden from the nuke. The weapon is going to need to be some sort of directed energy.
Additionally, please describe the effects of the proposed weapon on the personnel and structures near the source portal.