I highly doubt that they would just give the source code up. Even if it is just part of it.
What I think that iRealSMS and MySMS does is kills the daemon (service) that watches for SMS messages coming in from the GSM modem. I don't think necessarily MobileSMS is open while you're in Springboard.
I think it'd waste some memory having an application as big as MobileSMS open just waiting for an SMS message.
So Apple most likely (no data to support me on this) has a small service waiting for the an SMS, then when it receives one it'll then show a UIAlert box in the Springboard, gives you an option to Close (dismiss), or Reply (open MobileSMS).
What you could do is replace the hook from the SMS watcher daemon thats hooked to Springboard with your custom popup box; Which can also include a text box, more buttons (Reply, Quick Reply, Close etc), and the SMS message that's been received.
I'm not exactly sure how to achieve this, but i have some idea... because i've been a little curious. So i found this tutorial on hooking to springboard, it may help someone to create their own quick reply mod:
[Tutorial] Hooking SpringBoard - iPod touch Fans...