Fairly standard end-game Vasari blitz, and it's only the tip of the iceburg, as once a Vasari gets 10 or so kosturas you must keep your fleet in neutral or enemy territory at all times, since moving into a friendly gravity well will result in a barrage of kostura blasts that will annihilate your entire fleet. Basically, if Vasari gets this far it's their game to lose and Advent and TEC are in big trouble. Advent at very least can overpower a Vasari in a straight fight, but TEC is kinda screwed.
As TEC, you must prevent Vasari from ever getting to this point. In fact, they have to prevent Advent from getting here too since they just cannot compete with a mature fleet from either of the other factions. If you still have some advantages, such as a fleet size advantage, you can go on a last-ditch offensive and try to torch the enemy's kosturas, as well as their economy. Expect to lose planets in the meantime.
As Advent, you're in a similar situation where it's just not feasible to defend, but you're in a better position to counter-attack. It's very difficult to go toe to toe with a mature Vasari, but Advent has the tools to do it. The key here is to try to cripple the enemy. Even if your own economy is crippled in the process, Advent's late game fleet is expert at minimizing casualties so you should be able to maintain that fighting force for that much longer.
The bottom line, however, is that if the Vasari gets to Kosturas you're in big trouble. That superweapon is much stronger than either its TEC or Advent equivalent plus it has fewer prerequisites plus the Vasari faction is pretty brutal by this point in the game anyways. It's winnable, but it's not going to be easy.