>>>Also, the USSR was invited by the Afghanistan government to contain a rebellion, it wasn't an aggressive (imperialist) invasion.
Another way to articulate that moment in history: "the USSR was disappointed with the main strongman in their puppet regime so they sent their best operators to murder him in the night".
Afghanistan and the USSR were on good terms, and had signed a treaty which included military assistance. The USSR was called upon to assist Afghanistan to contain uprisings. However, only after the Soviet-friendly leader of Afghanistan was assassinated by his own party members, did they intervene.