namespace w4c_workflows.Services;
/// A workflow definition file discovered in the git source.
public sealed record WorkflowFile(string Path);
/// Current git state of the workflow source (for "sync status vs git").
public sealed record WorkflowSourceState(string? HeadSha, bool Dirty);
///
/// Reads workflow YAML definitions from the tenant's authoritative source. In
/// Forgejo-backed mode this is a local clone of the tenant's private repo; in
/// filesystem-only mode it is the tenant directory under
/// WorkflowSource:CopiesRoot. See for
/// the two modes and for the implementation.
///
public interface IWorkflowSource
{
Task> ListAsync(CancellationToken ct);
Task ReadAsync(string path, CancellationToken ct);
///
/// HEAD sha + dirty flag of the backing working tree. Backed by
/// (one cached git call), so it is safe
/// to call from a per-request listing.
///
Task GetStateAsync(CancellationToken ct = default);
}