To make this work, I also built Stream Deck Integration, a framework that handles VSCode–Stream Deck communication. A notable aspect is its multi-instance coordination. VSCode has no way for multiple windows to talk to each other, so the framework uses a Leader/Follower pattern over WebSocket. The first instance becomes Leader, later ones connect as Followers. If the Leader closes, a Follower promotes itself with a randomized delay to avoid port conflicts.
The framework is extensible — if you want to build a provider for Docker, Git, or anything else, you only implement single-instance logic. Multi-instance coordination is handled by Stream Deck Integration.
No physical Stream Deck? You can try it with Elgato's free Virtual Stream Deck.