Spawn a process and wait for it to exit.
the command and its arguments, e.g. ["bun", "add", "some-package"].
the working directory for the spawned process.
OptionaltimeoutMs?: numberif specified, the process is killed and SpawnResult.timedOut is set if it has not exited within this many milliseconds. Defaults to unbounded.
the SpawnResult. Never rejects.
Allows a host application to supply its own process-spawning implementation (e.g. one which integrates with a CLI framework's shutdown handling and output rendering) instead of a PluginManager shelling out directly.