Firstly, do you have any links to info on your machine? It sounds interesting.
Secondly, I think that you might be able to do this without a component.
If your ON_ABORT_COMMAND .ngc file contains a custom M-code (such as M100) then that M100 file could be a python file, which could then put LinuxCNC in to the correct mode and send MDI commands to purge the nozzle.
I think that the basic code would look much the same, but without the need to make HAL connections.