I did a quick test but didn't have any luck and I couldn't get debugging to work properly and ran out of time.
Here's a breif explanation of what I 'think' is happening.
When you compile/execute (compile I understand, execute could have had a better name though), the script is passed and compiled/loaded into the engine, this means all you need to do is call the method in the engine and it all should work.
To make it dynamic, the trick is to know what the method names are in advance and that way you can call the engine directly with the method name.
If I get some more time I'll check it out, I may be able to loop through the engine (I think you can as it stores them in a dictionary) and retrieve all the method names and use those as the registered command names and call straight into the engine to execute them, this means we can ditch the callback system alltogether.
That's the plan anyway