Book four. Massive spoilers for The Dragons of Dorcastle, The Hidden Masters of Marandur, and The Assassins of Altis ahead.
Since it does, after all, open with Mari and Alain on shipboard, with their allied Mages and Mechanics, and all the crew aware that Mari is the daughter. Which is why she's having nightmares of them all dying and its being her fault. . . .
Pirates try to take them. And then they learn there is a ship laden with Mechanics held prisoner by Mechanics and turn pirate themselves as the first step in trying to carry out her mission. (After discussion that there might have been other daughters who tried and failed.) Which involve a princess, Mari's telling an old teacher where she and Alain found certain information, Mages' ability to detect lies, what happens to a troll if its Mage dies without giving it order, guards declaiming on how they can't possibly help being overwhelmed by such superior forces, and more.