Plugin Protocol
routerd plugins are trusted local executables.
routerd invokes a plugin with:
- JSON input on stdin
- JSON output on stdout
- human-readable logs on stderr
- action metadata in environment variables
Actions
validateobserveplanensuredelete
Environment Variables
ROUTERD_ACTIONROUTERD_RESOURCE_API_VERSIONROUTERD_RESOURCE_KINDROUTERD_RESOURCE_NAMEROUTERD_GENERATIONROUTERD_RUN_DIRROUTERD_STATE_DIRROUTERD_DRY_RUN
The full protocol will be implemented and documented as the plugin runner is added.
Log Sink Plugins
LogSink resources with spec.type: plugin are one-way event sinks. routerd
executes the configured trusted local executable once per event.
- stdin: one JSON event object followed by a newline
- stdout: ignored
- stderr: human-readable diagnostics
- environment variables:
ROUTERD_LOG_LEVELROUTERD_LOG_ROUTERROUTERD_LOG_COMMAND
Event JSON:
{
"timestamp": "2026-04-26T00:00:00Z",
"level": "info",
"message": "routerd command completed",
"router": "lab-router",
"command": "reconcile",
"fields": {
"phase": "Healthy"
}
}