def usage_from_ratelimit_headers
import cswap-bend-cli@0.1.0.0/usage/text.bend as Textimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
221# `anthropic-ratelimit-unified-*` response headers (the raw header block) in
222# the /api/oauth/usage shape; None when neither window is present.
223def usage_from_ratelimit_headers(+head: String) -> Maybe<&2, Json.Json>:
224 hdata.fin(hdata.set("seven_day", hwin("7d", head), hdata.set("five_hour", hwin("5h", head), Json.of_pairs([]))))