Adding a new Perspective Action

I am trying to create a new Action that can be triggered when a component event is fired, and I'm having some trouble finding where I am meant to implement this.

At present, I have registered a new Action in the DesignerHook's DesignerActionRegistry, so it can be selected configured on a component, as well as in the GatewayModuleHook's ActionRegistry (which is where I assume the actual functionality of the Action will be written, but I could be wrong about that since the script I included in the runAction() method of my new Action doesn't seem to be running).

I am also concerned that the ActionRegistry class (at either the Designer scope or Gateway scope) provides a way for me to register new actions, but no way to unregister them, meaning that uninstalling the the module will not actually remove the new action until the Gateway is restarted.

Does anyone have any experience with this to give me some guidance about how to add a new Action to Perspective?

---UPDATE---

Found where I needed to define behavior for the new action, and register it with the perspective client ActionRegistry.

This is done by creating a new ActionFactory (imported from the @inductiveautomation/perspective-client module) and registering it with the perspecitve client's ActionRegistry (also from the @inductiveautomation/perspective-client module).
This is all done in the 'web' folder (following from the samples' file structure).

Also discovered that I shouldn't need to register the action with the GatewayHook's action registry, since it is a Client scoped action, so I was doing some unnecessary work there.