pub fn run_script(
path: &Path,
args: &HashMap<String, String>,
) -> Result<ScriptRun, Box<dyn Error>>Expand description
Run a tool script directly, passing each argument as an environment variable.
Captures combined stdout/stderr; a non-zero exit is reported via
ScriptRun::success, not as an Err (only a failure to launch is an
Err). The script must be executable and carry a shebang.
Before running, SP_OUTPUT_PATH is set to a fresh temp file (workflow-dsl
ยง3); a tool writes its structured JSON result there. After the script exits
the file is read into ScriptRun::structured_output and removed. stdout
and stderr stay ordinary logs and are not parsed.