feat: book monthly AI-plan invoices as facts and commitments

Add ai-plan ingest that stores one current booked fact per
provider-account × plan × period. Subscriptions become recurring
commitments; usage top-ups do not. Session-level rows are rejected.
This commit is contained in:
tegwick 2026-08-15 19:09:14 +02:00
parent 38d0bf21c9
commit ce4f791a63
11 changed files with 511 additions and 5 deletions

3
tests/fixtures/ai-plans.csv vendored Normal file
View file

@ -0,0 +1,3 @@
provider,provider_account,plan,charge_kind,amount,currency,period_month,ongoing
anthropic,,claude-max,subscription,200.00,EUR,2026-08,true
openai,org-demo,api-prepaid,usage_topup,40.00,EUR,2026-08,false
1 provider provider_account plan charge_kind amount currency period_month ongoing
2 anthropic claude-max subscription 200.00 EUR 2026-08 true
3 openai org-demo api-prepaid usage_topup 40.00 EUR 2026-08 false