In a large, heavy-bottomed pot, melt butter over medium heat.
Add onions, stir and season generously with salt and pepper.
Lower heat and continue cooking, stirring regularly, until the onions completely caramelize -- about four to six hours.
When the onions have caramelized, stir in the tomato paste and cook for at least 30 more minutes.
Pour in the wine, port, and Cognac or brandy, and toss in the sachet. Reduce mixture to one third original amount.
Add the stock and demi-glace, and allow to simmer for one hour.
Remove from heat, allow to cool and chill overnight.
To serve, reheat soup gently, add a splash of brandy, taste and adjust seasonings. Serve in oven-proof bowls. Top each serving with toasted croissant slices and Gruyère. Place under broiler until cheese is melted and browned. Top with fresh thyme or parsley and serve.