Protocol
The protocol is defined inubx-plugin-protocol (Protocol Buffers). The service definition:
Launch handshake
ubx launches the plugin binary with the environment variableUBX_PLUGIN_LAUNCH=1. The plugin must:
- Start a gRPC server on a random available local port
- Print the port number to stdout (as a plain integer, e.g.
50051\n) - Serve requests until the parent process closes the connection
CompileRequest
PlanRequest / PlanResponse
ApplyRequest + ProgressEvent stream
IRProgram structure
The IR JSON contains:type_path (array of segments), props (key-value pairs with typed IR expressions), and for_clause / when information.
Minimal Go plugin skeleton
Installing a custom plugin
~/.ubx/plugins/<name>/ubx-plugin-<name> and records it in the lock file.
Naming convention
Plugin binaries must follow theubx-plugin-<name> naming convention. The <name> part becomes the engine name used in workspace.xcl.
IR schema version
Their_schema_version field in requests lets your plugin detect and reject incompatible IR versions. ubx passes the current IR schema version; your plugin should return an error if the version is unsupported.
