namespace ClaudeDo.Worker.Usage;

public sealed record UsageBucket(double Utilization, DateTimeOffset? ResetsAt);

public sealed record UsageLimitRow(
    string Kind,
    string Group,
    double Percent,
    string Severity,
    DateTimeOffset? ResetsAt,
    string? ScopeModelDisplayName,
    bool IsActive);

public sealed record UsageSnapshot(
    UsageBucket? FiveHour,
    UsageBucket? SevenDay,
    IReadOnlyList<UsageLimitRow> Limits,
    DateTime FetchedAtUtc);

/// <summary>Cumulative raw token usage for one Claude Code session (all its transcript
/// lines to date), synthetic messages excluded. Not a per-run delta.</summary>
public sealed record SessionUsageTotals(
    long InputTokens,
    long OutputTokens,
    long CacheReadTokens,
    long CacheCreationTokens);
