Where, in the ruleset files, is defined whether a trade route can be established here?

For example, in the "classic" game.ruleset, I see

[actionenabler_traderoute]
    action = "Establish Trade Route"
    actor_reqs    =
        { "type",   "name", "range", "present"
          "UnitFlag", "TradeRoute", "Local", TRUE
        }

which, as far as I understands, tells us that the unit must have the TradeRoute flag in units.ruleset.

Where do we see that, for example, the destination city must be "far enough" or, in the case of the Augmented2 modpack, "foreign and not at war" ?

I would suppose something in effects.ruleset, but I haven't found what.


Where do we see that, for example, the destination city must be "far enough" ...

Under "Start New Game" > "More Game Options...", go to the "Economic" tab, where you can specify the "minimum distance for trade routes":

enter image description here