* refactor(server): run backend servers through ServerProcess and NativeProcess
WrappedServer now owns one ServerProcess while a model is loaded, in place
of a raw process handle and a separately recorded launch command. Each
backend describes what to run in a ServerCommand and hands it to
start_server(), which starts the process, polls its ready endpoint at the
address the process reports, and starts the watchdog. Unload, the
watchdog and a failed or cancelled load all end the server through
stop_server() or ServerProcess::stop().
NativeProcess is the only ServerProcess so far and starts the binary
through ProcessManager exactly as each backend did before.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* refactor(server): tighten ServerProcess ownership and error paths
- ServerProcess stops its server on destruction; start_server stops a
replaced process outside the lock
- OpenMOSS voice design runs through NativeProcess
- FLM and ORT skip troubleshooting output when a load was cancelled
- /metrics scrapes the backend at the host it reports
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* refactor(server): reuse URL helpers and trim leftovers from the ServerProcess move
- /metrics parses backend URLs with utils::parse_target_url; base URLs
bracket IPv6 hosts
- OpenMOSS voice design connects to the host its process reports and calls
stop_server() directly
- vLLM skips the CWSR hint when a load was cancelled
- Drop the redundant stop in start_server, unused process_manager.h
includes, and comments that restate the code
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* refactor(server): give WrappedServer a default unload() and drop per-backend leftovers
unload() now defaults to stop_server(), and ~WrappedServer() stops the
server, so backends whose unload() and destructor only did that drop them.
The overrides that remain do real cleanup: vLLM's shim directory, OpenMoss's
request lock, Cloud's state and whisper.cpp's temp directory.
The ready log moves into wait_for_ready() with the server's base URL,
replacing the per-backend "Model loaded on port" and "Server is ready" lines.
RyzenAI reads its model path from model_info in load() instead of storing it
through set_model_path(), and drops is_loaded_ and a model_name_ that shadowed
the base member. Router destroys a server after unload(), so member resets in
unload() (Moonshine, TheNoise, vLLM, OpenMoss, FLM) are removed.
Comments in server_process.h, wrapped_server.cpp and test_launch_command.cpp
now state specific contracts instead of restating names.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: describe starting backends through start_server() and the default unload()
adding-a-backend.md gains a "Starting the server process" section with a
ServerCommand/start_server() example and the per-backend settings, and says
unload() is optional. The OpenMOSS notes in backends-reference.md now name
start_server(), the local NativeProcess designer and server_command() in place
of the removed stop_speech_process() and spawn(). AGENTS.md drops unload()
from the methods every backend implements.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: leave AGENTS.md unchanged
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
* feat(server): record the command each backend was started with
Kept with the process handle, under the same lock. Replaced when a backend
restarts, cleared when it stops. set_process_handle() has no defaults for the
new arguments, so every backend has to pass them.
* feat(server): expose launch_command in /health
Shows what the backend actually started with, so an auto ctx_size comes back
as a number. Cloud models spawn nothing, so they have no field. Left out of
/metrics, where each command would add its own Prometheus series.
* test: cover launch command bookkeeping
Checks that a restart replaces the command and that cleanup clears it. Neither
is visible through /health, since dead backends never appear there.
* fix(server): read pid and launch command as one snapshot
* docs: show launch_command on a second /health example
---------
Co-authored-by: Andi M <[email protected]>
Co-authored-by: fl0rianr <[email protected]>