You could check out
javascript.net, which itself is based on
Google's V8 engine. It should let you marshal objects in and out of javascript code.
You could use this sort of thing to let a user control bits of your plugin's internals with user created javascript.