TS-2555: add more hook support for ts_lua plugin