A driver is a program that answers three verbs
That is the whole plugin contract. RobotDx runs the program, reads JSON lines from it, and never imports the driver, so the driver keeps its own dependencies, its own language and its own crashes.
# what it is, and the utilities it registers <command> describe # one run of checks for one device <command> diagnose --device <id> # a utility; a dry run prints the exact command it would run <command> act --device <id> --action <name> --dry-run
The smallest example, a made-up gripper, answers diagnose with lines like this (one of them, without its timestamp, and wrapped to fit):
{"schema": "diagnostics-record/0", "record": "status",
"path": "jaw", "name": "jaw: temperature",
"level": "warn", "code": "JawHot",
"message": "jaw motor 71 °C (warn above 70 °C)",
"expected_period_s": 30,
"measurements": [{"key": "temperature", "value": 71.0,
"unit": "Cel", "warn_high": 70.0}]}