namespace ClaudeDo.Installer.Core;

public interface IInstallStep
{
    string Name { get; }
    Task<StepResult> ExecuteAsync(InstallContext ctx, IProgress<string> progress, CancellationToken ct);
}

public sealed class StepResult
{
    public bool Success { get; init; }
    public string? ErrorMessage { get; init; }

    public static StepResult Ok() => new() { Success = true };
    public static StepResult Fail(string error) => new() { Success = false, ErrorMessage = error };
}

public enum StepStatus { Pending, Running, Done, Failed, Skipped }

public sealed record StepProgress(string StepName, StepStatus Status, string? Message = null);
