feat: let config choose the daemon's backend
Merged
ST
1mo ago+978+978+012345678901234567890123456789-68-68-01234567890123456789
Adds a [serve] table to config.toml so stackvox serve can start on the mlx backend without flags. When something else starts the daemon (stack-nudge's launchd agent, or its own spawn when the socket is missing) there's nowhere to put --backend mlx --model-dir ..., so a resident MLX model has been flag-only until now.
[serve]takes backend, model_dir, model_adapter and the generation options, same names as the flags. Onlyserveacts on it, the config is shared by every install and aspeakwithout the mlx extra shouldn't pick it up--backendor--model-diron the command line ignores the table, the flags then describe the model. Any other flag beats its key, and the reference clip and transcript count as one setting- relative paths resolve against the config file's folder (under launchd the cwd is
/), unknown or badly typed keys warn and get dropped - if the configured model fails to load, serve logs it and falls back to kokoro, otherwise launchd restarts it every 10s into the same failure and you get no voice. A model named by flag still fails like before, and
stackvox statusnow shows which backend is actually running - the daemon takes a startup lock before loading the model. With a slow model every spawn that found no socket was loading its own copy, and all but one died on bind. Now the rest exit straight away
Tested end to end with a local MLX model: three concurrent serves give one load and two clean exits, a missing model_dir falls back to kokoro and status says so. 412 tests, ruff and mypy clean.