eust-w c29f353177 refactor: drop invoices and settlement, keep usage metering and quotas
The invoice/settlement flow produced statements whose every monetary
field was null, behind a review/settle/void ceremony. Model charges are
billed by the provider directly, so the platform only needs to report
measured usage.

- apps/api/src/domain/usage.ts replaces billing.ts: per-month usage
  lines, totals, model-measurement coverage and a formula-safe CSV
  export. No invoice digest, settlement records or billing entities.
- Routes: GET /v1/usage/lines and /v1/usage/export (owner/admin),
  GET /v1/plans; platform-operator actions move to
  POST /v1/admin/members and /v1/admin/executions/:id/reconcile.
  The operator allow-list is now WF_OPERATOR_SUBJECTS.
- Contracts: UsageLine replaces BillingUsageLine/BillingInvoice; the
  billing_event and billing_period entity kinds are removed.
- Web usage page shows limits, occupancy, monthly totals and lines.
- npm script tenant:invite is renamed tenant:create (it provisions a
  tenant).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:42:15 +08:00
..