Preheat oven to 400°F (200°C). Line a baking sheet with parchment paper.
In a large skillet, heat olive oil over medium heat. Add onions and cook, stirring occasionally, until caramelized, about 20-25 minutes. Stir in thyme, salt, and pepper.
Add sausage to the skillet and cook, breaking it up with a spoon, until browned. Drain any excess grease.
Roll out puff pastry sheet on a lightly floured surface. Cut into desired shapes (rectangles or squares).
Spoon sausage mixture onto each pastry piece. Fold over and seal edges with a fork.
Whisk egg with a tablespoon of water and brush over the top of each roll.
Bake for 20-25 minutes, or until golden brown. Let cool slightly before serving.