。
I plan to ask tonight.
Literal
I [topic-は] tonight ask [intention-つもり] [explanatory-なんだ].
~つもりだ ('intend to') expresses a plan. なんだ (explanatory のだ) adds a confiding nuance — 'the thing is, I'm planning to ask tonight.' 聞く here likely means 'to ask' rather than 'to listen.'