Skip to content

feat: make intents explicit in tempo() — remove implicit ChargeIntent default#22

Merged
brendanjryan merged 3 commits intomainfrom
explicit-intents
Feb 8, 2026
Merged

feat: make intents explicit in tempo() — remove implicit ChargeIntent default#22
brendanjryan merged 3 commits intomainfrom
explicit-intents

Conversation

@brendanjryan
Copy link
Collaborator

Breaking Change

tempo() now requires an explicit intents parameter. Previously it silently injected a ChargeIntent as a default, making it non-obvious which intents were active.

Before

method = tempo(account=account)
# charge intent silently included

After

method = tempo(
    account=account,
    intents={"charge": ChargeIntent()},
)

Why

  • The implicit default was a footgun — passing intents={"stream": StreamIntent(...)} silently merged with the hidden charge intent
  • No way to opt out of charge
  • Non-obvious what intents were active

Changes

  • Removed implicit ChargeIntent in TempoMethod.__post_init__
  • Made intents a required parameter in tempo() factory
  • Updated all call sites across tests, examples, and docs

… default

BREAKING CHANGE: tempo() now requires an explicit intents parameter.

Previously, tempo() silently injected a ChargeIntent as a default, making
it non-obvious which intents were active. Now callers must explicitly
opt into each intent:

  # Before
  method = tempo(account=account)

  # After
  method = tempo(account=account, intents={"charge": ChargeIntent()})

This makes the API surface explicit and removes the footgun where
additional intents passed via the intents dict were silently merged
with the hidden default.
@brendanjryan brendanjryan merged commit 209c084 into main Feb 8, 2026
2 checks passed
@brendanjryan brendanjryan deleted the explicit-intents branch February 8, 2026 05:48
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