Repository navigation
Releases
Releases · IndianOpinion/spend-meter
spend-meter 0.1.0
Added
- Pre-spend filter
spend_meter_pre_spendandspend_meter_check(): global and purpose kill switches, intent validation, price lookup and estimate, reserve-then-sum caps (site, purpose, network; day and month), decision filter that can only deny. Contract versionSPEND_METER_API1. - Record action
spend_meter_recordandspend_meter_record(): one row per attempt, settle in place, linked retries, unreserved records, idempotentcall_id, cost source precedence, account errors, fallback model, shutdown retry buffer. - Release action
spend_meter_release, reservation lifetime with an hourly expiry task. spend_meter_usage_from_response()for both common usage shapes, with cached and reasoning tokens as subsets.- Unpriced models denied by default (
unpriced_model); theallow_unpricedsetting lets them through, flagged and logged. - Price table: shipped format with no prices, operator overrides, import and export with dry-run diff, prefix rows,
price_version, staleness,repricefor unpriced rows. - Cap alerts
spend_meter_cap_warningandspend_meter_cap_reached, once per scope per window. - Dashboard widget, network widget, settings screen, admin notices.
- WP-CLI
wp spend-meter: status, report, check, caps, kill, prices, reprice, reservations, export, prune. - Retention, uninstall with an option to keep the ledger, must-use loader.
Install: composer require indianopinion/spend-meter