Did you write a z-machine with sockets or is this piping to an existing one (frotz, etc?) I'm curious about the internals because I'm working on my own z-machine implementation too (not ssh though!)
I try to keep the code as generic as possible but nearly every game I try has had a surprise for me. I really don't want to have tons of special cases in the code but I think some might be unavoidable.
If you're writing your own Z-machine, then you can write it in a way that plans for such integration and that would make a direct-linked approach much easier.
My 'ssh toy' has proven quite popular so far and I hope it has introduced IF to some new people.
Thanks and best of luck with your Z-Machine. Hacks and Glory await!
I'm writing blog posts on my journey - detailing each instruction and any nuance with each one, as well as the object structure, z-text and misc. I hope to post it here one day.