diff options
| author | Claude <noreply@anthropic.com> | 2026-05-26 20:27:36 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-26 20:27:36 +0000 |
| commit | 39f74dbbc7adca0e2058112408bb99694deefcaf (patch) | |
| tree | fb657954c1eba928567403b0e320b976e23f734a /internal/cli/create.go | |
| parent | 561915c5182c3fb39cd6a8b6613c489b35b7c1bf (diff) | |
feat(budget,storage,config): per-provider spend accounting substrate (Phase 6)
Adds the budget accountant foundation:
- storage: a per-execution `agent` column (additive migration, populated by the
dispatcher) and SpendByProviderSince(since), summing cost_usd per provider in
a window. Accurate attribution survives a task running on different providers
across retries.
- internal/budget: Accountant over a SpendSource + Limits, exposing Headroom
(remaining/fraction per provider), Allow (would estCost breach the cap), and
All (one query, sorted). Unconfigured/local providers are unlimited.
- config: a [budget] section (window + provider_5h_usd map). No default cap —
gating is opt-in by configuring limits.
Fully unit-tested; dispatcher gating and the API/UI surface follow.
https://claude.ai/code/session_01SESwn7kQ7oP62trWw6pc39
Diffstat (limited to 'internal/cli/create.go')
0 files changed, 0 insertions, 0 deletions
