Two 14-ounce packages frozen all-butter puff pastry, thawed but cold
1 pound thinly sliced smoked ham
2 cups shredded Gruyère cheese
1 large egg, lightly beaten
1/2 teaspoon coarse sea salt
Preheat the oven to 375°. In a medium skillet, heat the oil. Add the onion and cook over moderate heat, stirring, until softened, about 6 minutes. Add the honey and mustard and cook, stirring, until thickened and deep amber, about 15 minutes. Puree in a food processor until almost smooth.
Lay 1 sheet of the puff pastry on a parchment paperlined baking sheet. Brush with the honey mustard, leaving a 1/2-inch border all around. Arrange the ham over the mustard, then the cheese. Top with the remaining pastry sheet. Pinch the edges together to seal and fold over to form a 1/2-inch-wide border; crimp with a fork. Brush the top with the beaten egg and sprinkle with the salt. Using a fork, poke a few holes in the pastry. Bake for about 1 hour, until golden. Let stand for 30 minutes. Cut into rectangles and serve warm.