/*
* ThreadPilot - process execution seam.
*/
namespace ThreadPilot.Services.Abstractions
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
///
/// Runs external processes with a bounded timeout and captured output.
///
public interface IProcessRunner
{
///
/// Executes a process and returns its exit code with captured output streams.
///
/// Executable path.
/// Argument list passed verbatim to the process.
/// Maximum execution time before the process is treated as timed out.
/// The captured process result.
Task RunAsync(string fileName, IReadOnlyList arguments, TimeSpan timeout);
}
///
/// Immutable result returned by .
///
/// Process exit code, or a synthetic failure code when launch/timeout fails.
/// Captured standard output.
/// Captured standard error.
public readonly record struct ProcessRunResult(int ExitCode, string StandardOutput, string StandardError);
}