In a pan, combine the sugar and balsamic then stir until sugar dissolves.
Bring to a simmer then cook until thick and syrupy.
Add thyme, salt, pepper and tomatoes, then remove from the heat and leave to cool completely.
Once tomatoes have cooled, combine with mozzarella, pesto, basil and chopped tomatoes then season with salt and pepper to taste.
Roll out the puff pastry into a rectangle.
Place the Caprese filling in a line in the centre of the pastry.
Cut pastry alongside the filling into strips diagonally (about 1 cm apart)
Fold the pastry in to encase the filling.
Brush with egg yolk, then sprinkle with sea salt.
Bake at 200C until pastry is golden and crisp.