I would like to give a short quote from the Svatantra Tantra about the appearance of the Goddess Bagalāmukhī and her connection with Śrīvidyā, also Viṣṇu and Śiva.
अथ बक्ष्यामि देवेशि बगलोत्पत्ति कारणम्।
पुरा कृत युगे देवि वात क्षोभ उपस्थिते।।
Now, Mistress of the Gods, listen to the reason for the appearance of Bagalāmukhī. A long time ago, a great hurricane appeared in the Satya Yuga.
चराचर विनाशाय विष्णुश्चिन्ता परायणः।
तपस्यया च संतुष्टा महात्रिपुर सुन्दरी।।
All living and non-living began to collapse. Seeing this, Viṣṇu fell into contemplation and in this way he satisfied Mahātripurasundarī.
हरिद्राख्यं सरो दृष्ट्वा जल क्रीड़ा परायणा।
महाप्रीति हृदस्थान्ते सौराष्ट्र बगलाम्बिका।।
Seeing how in the playing waters of the Haridra lake (Turmeric lake) in Saurāṣṭra (now Gujarat), Mother Bagalāmukhī appeared in the heart of the Goddess (Tripurasundarī).
Further, the text says that heat (or light) emerged from Śrīvidyā (Tripurasundarī) and from there spread everywhere, stopping the hurricane. This happened on the fourteenth lunar day (Caturdaśī tithi) connected with Tuesday when the sun was in Capricorn (Makara), also on the night known as Vīrarātri (the heroic night).
Bagalāmukhī is considered as a part of Śrīvidyā Tantra and in her four-armed form she is in many ways identical to Tripurasundarī. There is also a story in the Rādhā Tantra about how Viṣṇu practiced tapasya and could not get success in sadhanā, after which the Goddess Śrī (Tripura) appeared to him and said that he need to manifest with her in Mathura, she would manifest in the form of Rādhikā. And worshiping Kalī in her by the kaulācāra methods, he, being Kṛṣṇa, will reveal all his siddhis. This happened because of the worshipping Rādhā as Parakīya–śakti, Viṣṇu (Kṛṣṇa) gained all success and destroyed many demons. The most interesting thing in all these stories is that the Goddess Śrī can be considered as Lakṣmī, but she is also Tripurasundarī, and we know that Śiva is Bhairava of Tripurasundarī. Thus, based on the analysis of these stories, we see that Viṣṇu and Śiva are one Deity –– Harihara. Also, Lakṣmī and Śrī, who were worshiped by Kṛṣṇa, may be Kalī, whom Kṛṣṇa invoked in them. This wonderful story allows you to cover a lot. We also know that Bagalāmukhī is a stambhinī–śakti, she can represent not only the power of Mahāmṛtyuñjaya, but also the sthiti–śakti of Viṣṇu. The Sāṃkhyāyana Tantra (Paṭala 35) describes Bagalāmukhī as one who is revered as Kalī in the uttara and urdhva āmnāyas. There is also a description of her as the one on the left side of which is Kalī, and on the right side is Tripurasundarī. Bagalāmukhī includes these two Goddesses who embrace Kalī and Śrī Kūlas.