mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
Centralizes the premium-credits lifecycle for chat turns: * needs_premium_quota: gate check (premium user + non-fallback config). * PremiumReservation: dataclass capturing reservation state + token totals. * reserve_premium / finalize_premium / release_premium: idempotent reservation, commit, and rollback used by the orchestrators. Add-only; legacy stream_new_chat.py keeps its inline quota handling until cutover. |
||
|---|---|---|
| .. | ||
| agent | ||
| context | ||
| contract | ||
| errors | ||
| flows/shared | ||
| graph_stream | ||
| handlers | ||
| helpers | ||
| relay | ||
| shared | ||
| __init__.py | ||