Considering the Soviet prowess for intelligence, it makes sense that they could infer the participation of the US (especially when all those new fangled Stingers started showing up). I have to imagine that the CIA would do their best to keep US involvement as invisible as possible, but even while working through ISI as an intermediary, what pieces of the puzzle did they leave behind that could implicate US support?
It may have started out covertly, but by the time the US was supplying Stingers, support was openly acknowledged.
Ghost Wars a book written by Steve Coll who formerly worked at The New Yorker is probably one of the best pieces I have read which gives great detail about this period. It goes deep into the history of the CIA and especially in that region