cadrumo.adapters.outbound.model_runtime.process_control module

Operating-system process control for starting and installing the model runtime.

Two operations, each over a fixed argv whose only variable element is the absolute path of an executable the application layer already located:

  • spawn_runtime_server() starts the runtime’s server so it outlives the Cadrumo process and holds none of its console or handles.

  • run_runtime_installer() runs one non-interactive package-manager install and returns its exit code.

Neither function inspects, signals or waits on any process it did not start.

spawn_runtime_server(executable, env)[source]

Start <executable> serve detached with env and return its process id.

The child is deliberately not retained: the runtime is a server the operator keeps using after this command exits, so Cadrumo neither waits on nor terminates it.

Return type:

int

Parameters:
run_runtime_installer(installer, executable, timeout_s)[source]

Run installer’s non-interactive runtime install and return its exit code.

executable is the package manager as located on PATH, so a Windows .exe shim runs without a shell.

Raises:
  • ValueError – When installer names no package manager.

  • TimeoutError – When the install does not finish within timeout_s.

Return type:

int

Parameters: