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

View file

@ -20,10 +20,13 @@ uv run finhub runway --balance 12000 --monthly-burn 2100,2200,2000
uv run finhub import-cloud tests/fixtures/cloud-costs.csv
uv run finhub import-anthropic tests/fixtures/anthropic-billing.csv
uv run finhub import-hosteurope tests/fixtures/hosteurope.csv
uv run finhub import-ai-plan tests/fixtures/ai-plans.csv
# CLI — ledger (SQLite at .fin-hub/ledger.db)
uv run finhub ledger set-balance 12000
uv run finhub ledger import cloud tests/fixtures/cloud-costs.csv
uv run finhub ledger import ai-plan tests/fixtures/ai-plans.csv
uv run finhub ledger commitments
uv run finhub ledger summary
# CLI — scheduled evaluation (cron/systemd friendly)