type tool = Git | Jj type status = Exited of int | Signaled of int | Stopped of int type output = { stdout : string; stderr : string; status : status } type failure = | Unavailable | Timed_out | Output_limit_exceeded | Io_error of string val run : tool -> args:string list -> timeout_s:float -> max_output_bytes:int -> (output, failure) result