Our solution
Plugins that run beside the Router
Router Plugins are separate processes that communicate with the Router via gRPC over IPC using HashiCorp's go-plugin framework. They run alongside the Router, not on the network. If a plugin crashes, the Router continues operating.
How Router Plugins integrate
Scaffold the plugin with `wgc router plugin init`. The CLI generates the project with proto definitions and SDK wiring.
Implement the plugin in Go or TypeScript (Bun). The Go SDK includes an HTTP client with middleware support, OpenTelemetry tracing, and structured logging. TypeScript plugins run on Bun without a bundled SDK.
Build with `wgc router plugin build`. The CLI compiles and packages the plugin.
The Router manages plugin lifecycle: startup, health checks, and hot-reload.
Plugins communicate via gRPC over IPC. No network round trip. No separate deployment target.
Push to the Cosmo Cloud Plugin Registry to deploy without re-deploying the Router.
One deployment unit. No extra infrastructure.

