The portal 2 engine is closed source and not available to the public. And Stanley Parable was made in unity. I don't really understand what you are trying to do but i suggest using a regular game engine like godot or unity.
Oh yeah sorry about that, it was the first thing that came up on google lol.
After doing some more research I found out that Stanley Parable was made by cloning the Source 2013 repo and following the valve wiki. Though i still don't reccomend this. But do what you do ig.