Collect.should_escalate: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/daemon/collect.bend as Collect Lines 41-49 of cswap-bend-cli@0.1.0.0/daemon/collect.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/daemon/collect.bend&start_line=41&end_line=49 import Base import cswap-bend-cli@0.1.0.0/policy/types.bend as T import cswap-bend-cli@0.1.0.0/policy/usage.bend as PU # Fetch every candidate too when the active account's headroom is unknown (and # the token is not just expired on an idle Claude Code), or it is within 15 # points of the threshold. def should_escalate(+m: Maybe<&2, T.Usage>, +now: Nat, +thr: U32, +ms: List<&2, String>) -> Bool: match m: case None{}: False{} case Some{u}: escalate2(PU.headroom(u, now, ms), is_token_expired(u), thr) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/collect.bend&name=escalate2 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/collect.bend&name=is_token_expired https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Usage https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/usage.bend&name=headroom