You can, in your assets view. If you see the explorers flee and instantaneously change their current sector, they 'cheatjumped'.
about the library, I see no problem in unwrapping my code into a library, because I try to build my programs the same style - put everything in small packages. For the escaping library, I would need scanEnemies, flee.*, isplayerwatchin and manage.sector.old. that SHOULD work already with other scripts, more or less.
Only needs some adjustments in internal script calls, e.g. when restarting after a successfull escape.
Okay, so todo would be:
- Avoid getting stuck with enemies on both sides of gates
- escape jumps with more than 1 jump
Let me see, what I can do

new results:
I couldn't reproduce the getting stuck of my explorers. That must have been fixed long time ago in v1.9.3?! I put enemies on both sides of a gate and they behaved correctly, watched and unwatched.
simply because when fleeing watched, they filter out the gate to sector.old as the very first step and then decide into which other gate they could escape best.
and about:
Case: Explorer flees into a sector that the player discovered. That sector is full of enemies, with no explored gates beyond.
Only choice is to jump two (or more) sectors back to safety.
This is what's happening already - only not in a direct form. Explorers jump 1 sector back, and if there still are enemies around (COULD be, that they are currently busy, chasing other ships), they jump one sector again, away from the dead end.
So I don't see the need to jump more than 1 sector at once. Especially as that would ONLY happen if the ships are watched, which is usually not the case. And it would mean a LOT of work. I would actually have to create another script for just that, let alone finding the correct conditions when to trigger it (stuck in a dead end AND just escaped from hostile ships via jump drive).
BUT what I found is that I need to build the dead.end.sectors.whitelist array dynamically to fit other universes. That is what I'm doing right now. That will prevent explorers from getting stuck around one gate with explore.hostile false and one sector friendly, the other hostile and an enemy on the friendly side.
So wait for 1.9.7, that will have all problems solved

edit: alright, NOW it should work. I tested it and got no more explorers stuck at all anymore. Can you confirm, Bullwinkle? To make sure, please run an explorer and let him auto-update himself, or delete the gal.ex.sectors.whitelist global var with prop mongler manually. THEN reinit script caches or just save and reload. The new whitelist is then generated. Takes some secs until finished.