fix bug with extract hook
add docs and hook function in extensions interface
fix hooks method
refactor extension api pipeline