How do I add a custom Vega transformation?

I would like to create a custom Vega transformation, specifically to put time ranges into arbitrary buckets such that they never overlap in a given bucket (basically to show the duration and disposition of a set of tasks that have been processed). I've looked over the existing transform code, and read through the Vega extension API docs, and this sounds doable.

What I can't figure out, though, is how to actually call the Vega extensibility API. Are there any examples of similar extensions or plug-ins that do similar work? Or can you point me to how I could gain access via some other channel? I've been unable to find anything related on GitHub.

unfortunately you can't use the vega extensibility API right away from the Kibana Vega editor.
What you can do is you can build a Kibana visualization plugin to build your own set of functions/vega extensions.
On the other end, if you can be more precise on your use case and provide me an example I can check what can be done directly in vega if possible