Reusable token and cost accounting capability for FlossWare.
This repository provides usage tracking, cost estimation, and budget primitives.
Budget is a hard constraint, not an optimization strategy.
The reusable capability may calculate usage, cost, remaining allowance, and budget status. Authoritative enforcement of model-call feasibility belongs at the model-gateway boundary so no learned strategy can bypass a budget.
request
|
v
model-gateway
|
+--> budget constraint
|
+--> other hard constraints
|
v
feasible candidates -> strategy -> invocation
Per-Intent/task budgets may be supplied by Loom and evaluated by the gateway. Budget state must never contain provider secrets.
Active supporting capability. Keep accounting and constraint mechanics here; do not add model routing, orchestration, or learned optimization.
MIT