Skip to content

feat: list reports banked limit resets, and reset spends one - #56

Merged
deathemperor merged 4 commits into
mainfrom
feat/reset
Sep 23, 2026
Merged

deathemperor merged 4 commits into
mainfrom
feat/reset

Conversation

@deathemperor

Copy link
Copy Markdown
Owner

Claude banks a few usage-limit resets per account (the CLI's /reset, program cedar_ember). swapd read the windows and never the bank, so Infinitus (deathemperor/infinitus#1554) could not show or spend one per fleet account.

The usage request now asks for the bank (cedar_ember=1) under Claude Code's own agent string, which is the only surface the endpoint reports it to, and the store keeps the block beside the windows. list judges it at list time: resets on a row is what is left across the live grants, the grant the provider spends next and the hold on it (notAtLimit, cooldown with until, blocked); absent from a row with no live grant. reset <ident> re-reads the bank as that slot, refuses a spent bank or a hold before any claim, spends the named grant with the CLI's own request, and answers with a forced fetch. The provider's refusal comes back as the error's message.

Tests: driver-level httpmock (query, agent string, bank parse and hold judgement, the claim), and two end-to-end verb tests. cargo test, cargo clippy --all-targets, cargo fmt --check all clean.

Claude Fable 5.1 via Claude Code.

🤖 Generated with Claude Code

deathemperor and others added 4 commits September 23, 2026 14:38
…ds one

Claude banks a few usage-limit resets per account (the CLI's /reset,
program cedar_ember). The usage request now asks for them
(cedar_ember=1) under Claude Code's own agent string — the endpoint
reports the bank to no other surface — and the store keeps the block
beside the windows. list judges it at list time: resets left across the
live grants, the grant the provider spends next, and the hold on it
(not at a limit, cooling down, no spendable grant).

reset <ident> reads the bank fresh as that slot, spends the named grant
with the CLI's own claim, and answers with a forced fetch so the board
shows the cleared windows. The provider's refusal comes back as the
error's message; a hold is refused before any claim is sent.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@deathemperor
deathemperor merged commit 480749d into main Sep 23, 2026
6 checks passed
deathemperor added a commit to deathemperor/infinitus that referenced this pull request Sep 23, 2026
…and redeem from Accounts (#1558)

* feat(mac,web,mobile): each fleet account's banked Claude resets show and redeem from Accounts

Claude banks a few usage-limit resets per account, and #1555 could
only read and spend them for the server's own Claude login. The fleet
now carries them: swapd reads the bank beside the windows and spends
one with `reset <ident>` (deathemperor/swapd#56); the Mac passes
`resets` through per account, declares the `reset` capability and
answers `reset <fleet> <n>` on the control socket; the contract gains
`InfinitusAccount.resets`; the row model derives the count, the next
grant's wording and expiry, and what holds the next one.

On web the row shows a ticket count beside the plan that opens the
bank and a Use reset button, confirmed before the claim; on the phone
the row carries the same line and the menu offers the action while
nothing holds it. Upstream's "Usage providers" hub section is no
longer mounted: the Accounts page reads every hub through the Mac app.

Closes #1554.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* build(mac): pin swapd at #56, which reads and spends banked resets

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* chore(web): knip ignores the unmounted hub section files

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant