```python
"""The cheapest set of travel passes covering every trip day."""


def _validate_plan(trip_days, passes):
    for day in trip_days:
        if isinstance(day, bool) or not isinstance(day, int) or day < 1:
            raise ValueError("trip days must be positive integers")
    for earlier, later in zip(trip_days, trip_days[1:]):
        if later <= earlier:
            raise ValueError("trip days must be strictly increasing")
    if not passes:
        raise ValueError("at least one pass kind is required")
    for cover in passes:
        span = cover["span"]
        cost = cover["cost"]
        if isinstance(span, bool) or not isinstance(span, int) or span < 1:
            raise ValueError("pass span must be a positive integer")
        if isinstance(cost, bool) or not isinstance(cost, int) or cost < 0:
            raise ValueError("pass cost must be a non-negative integer")


def cheapest_pass_plan(trip_days: list, passes: list) -> dict:
    _validate_plan(trip_days, passes)
    
    n = len(trip_days)
    dp = [float('inf')] * (n + 1)
    dp[0] = 0
    prev_indices = [-1] * (n + 1)
    
    for i in range(1, n + 1):
        for pass_ in passes:
            span = pass_["span"]
            cost = pass_["cost"]
            if trip_days[i - 1] >= trip_days[i - span]:
                new_cost = dp[i - span] + cost
                if new_cost < dp[i]:
                    dp[i] = new_cost
                    prev_indices[i] = i - span
    
    purchases = []
    i = n
    while i > 0:
        j = prev_indices[i]
        if j != -1:
            purchases.append([trip_days[j], trip_days[i - 1] - trip_days[j] + 1])
            i = j
        else:
            break
    
    return {"total": dp[n], "purchases": purchases[::-1]}
```