I thought the CIA’s charter, or whatever, was external. No domestic spying.
I think Presidential Decision Directive PDD-62 (May 22, 1998) helped get CIA foot more in the door stateside including some of the basis for “Fusion Centers” and JTTF:
https://www.youtube.com/watch?v=aY94prtutXw
https://fas.org/irp/offdocs/pdd/
https://fas.org/irp/offdocs/pdd-62.htm