Tripura ( Three cities) + Rahasya ( Secret or Mystery) or the trinity . The three cities or states of consciousness are waking (Jagrut), dreaming (Svapna) and deep sleep (Shushupti). The underlying consciousness in them all is called Sri Tripura, the Mother Goddess Chandika. Tripura Rahasya is a ancient text with treatises on Advaita school. It is also called the Haritaayana Samhita after its author Haritaayana, son of Haritha and disciple of Parashurama and Datta Bhargava Samvad.
The text of Tripura Rahasya is teaching us the supreme spiritual truth. This highest truth was first taught by Lord Shiva to Lord Vishnu's incarnation as Sri Dattatreya which is Avadhuta , Dattatreya gave this knowledge to Parasurama, who later taught it to his disciple Haritaayana sumedha .
The Tripura Rahasya is a dialogue between Lord Dattatreya and Parasurama and a tantric or shakta text.
Lord Shiva himself taught this knowledge to Lord dattatreya an incarnation of Lord Vishnu. This is mentioned in the the text itself. Sumedha Haritayana once asked his Guru Shree Parashurama to taught him the highest truth and Lord Parashurama Narrated this knowledge to him , first taught by Lord Shiva to Parashurama's guru Dattatreya , as described in the book . Below are the shlokas.
सस्मार तत्पुरा प्रोक्तं दत्तात्रेयेण विष्णुना |
त्रिपुराया रहस्यं
यत्साक्षाच्छिवमुखाच्छरुतम ||30||
Sasmaar Tatpuraa Proktam Dattatreyena Vishnunam |
Tripura Rahasyam
YatsakshatShivaMukhamShrutam|
After sumedha asked Parashurama the question Parashurama remembered
the mystical knowledge of Tripura Bhagwati (goddess) which was heard
by Vishnu Dattatraya from Lord Shiva first.
This is again repeated in next verse where its said by Parashurama that he gained this knowledge from lord Shiva .Lord Shiva also instructed Lord Parashurama not to reveal this secret knowledge to anyone who is atheist , fool or ignorant. As described in next shloka.
Parashurama said -:
विशुद्भहृदि संन्यस्तं तत्कालेन शिवाज्ञया |मयि संक्राम्य सर्वस्वं
भक्तिज्ञानोपबृहितम ||31||
नास्तिकाय शठायाsपि नाम्ना भागै कलेशत: |
भक्तानामपि चान्येषान वक्तव्यं न पुरस्त्वया ||33||
I gained this knowledge full of Bhakti (devotion) and gyana
(knowledge) , Vairagya and with different types of mystic histories ,
which was kept in pure heart of Lord Shiva. He himself instructed me
not to reveal this secret to fools , atheist and ignorant.
Here is Hindi-Sanskrit PDF of
Tripura Rahasya