make sure can access worker from session
change session's states to plugin_states
add script_init/terminate