Heat oil in a medium to large skillet. Add shallots (or onion) and cook until transparent (about 3-4 minutes).
Add mushrooms and cook about 10 - 12 minutes more (or until they release their liquid and become tender).
Add garlic, thyme and rosemary, cooking another minute while stirring.
Stir in red wine if using and cook until wine evaporates.
In a small bowl, whisk together soy sauce and flour. Then, add vegan butter to skillet. When melted add soy/flour paste. Whisk continuously to cook flour for about 2 - 3 minutes.
Slowly whisk in broth and bring to a boil.
Reduce heat a bit, and cook 2 minutes, whisking constantly, until thickened. Add salt and pepper and serve hot.