core: allow hooks to send arbitrary data
core: expose the hook method from the env
core: allow custom callables in hooks