namespace ClaudeDo.Worker.Runner;

public sealed record RunResult
{
    public required int ExitCode { get; init; }
    public string? ResultMarkdown { get; init; }
    public string? ErrorMarkdown { get; init; }
    public string? StructuredOutputJson { get; init; }
    public string? SessionId { get; init; }
    public int TurnCount { get; init; }
    public int TokensIn { get; init; }
    public int TokensOut { get; init; }
    public IReadOnlyList<string> Blocks { get; init; } = Array.Empty<string>();
    public string? ResultSubtype { get; init; }
    public string? TerminalReason { get; init; }
    public IReadOnlyList<string> Errors { get; init; } = Array.Empty<string>();
    public IReadOnlyList<string> PermissionDenials { get; init; } = Array.Empty<string>();

    public bool IsSuccess => ExitCode == 0 && ResultMarkdown is not null;
}
