Add external event API for diagnostics and usage in modules

Resolve #86