You missed the part where the Soviets were asked to help for 2 years before they actually got involved.
You will find it in the link you provided. No need to thank me.
They engineered the coup against the Afghan leader of the time, who was installed by a previous coup, who was a bit OTT. Nice cherry picking of wiki though :thumbsup:
and the same way the Americans were invited to Vietnam.
If you are fighting alongside the national Afghan army, you are hardly fighting a war against Afghanistan/
The Americans however, did invade Afghanistan.