burnwatch 0.12.1 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ All notable changes to burnwatch will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.13.1] - 2026-03-25
9
+
10
+ ### Fixed
11
+
12
+ - **OpenAI NaN spend / NaN% budget**: The OpenAI connector didn't guard against non-numeric `amount.value` responses. One NaN from OpenAI poisoned the entire brief total. Added type checking in the connector and a global NaN guard in `buildSnapshot()` — no single bad connector can ever corrupt the display again.
13
+ - **Excluded services still showing in status**: Stripe, AWS, and other excluded services appeared in `burnwatch status` with ~$0.00 CALC. Now filtered out before polling — excluded services never appear in the brief.
14
+ - **Anthropic shows BLIND despite having admin key stored**: The LIVE API call fails (endpoint/auth issue), and the CALC fallback requires `planCost` which was never set due to shell `$` variable expansion eating plan names like `"Max ($200/mo)"` → `"Max (/mo)"`. Three-part fix:
15
+ 1. **Shell-safe plan matching**: Configure command now strips `$` amounts before fuzzy matching, so `"Max (/mo)"` correctly matches `"Max ($200/mo)"`.
16
+ 2. **Registry plan fallback**: `pollService()` now resolves `planCost` from the registry plan's `monthlyBase` when `planCost` is missing but `planName` is set — so LIVE failures gracefully degrade to CALC instead of BLIND.
17
+ 3. **Prorated CALC spend on failure**: When LIVE fails and falls back to CALC, spend is now prorated to day-of-month instead of showing $0.
18
+ - **CALC services all showing $0 spend**: Flat-fee services (Vercel Pro, Browserbase Startup, etc.) had `planCost: 0` because the configure command's plan match failed silently. The shell-safe matching fix above prevents this for future configurations.
19
+
20
+ ## [0.13.0] - 2026-03-25
21
+
22
+ ### Added
23
+
24
+ - **Utilization Engine** — Code-derived cost projection system that tracks SDK call sites across the project, persists them to `.burnwatch/data/utilization.json`, and projects monthly utilization and overage costs. This is the forward-looking early warning system: it tells you what your code *will* cost before you ship it.
25
+ - **`burnwatch scan` command** — Full project scan for utilization patterns. Shows a table of services, call site counts, projected monthly units, plan inclusions, and overage costs. Use `--verbose` to see individual call sites per file.
26
+ - **Incremental utilization tracking in hooks** — The PostToolUse hook now updates the utilization model after every file change. Overage warnings are injected into Claude's context when projected overage exceeds $5/mo.
27
+ - **Utilization in session brief** — The SessionStart hook appends utilization data to the spend brief, showing projected usage alongside billing API data.
28
+ - **LIVE vs utilization divergence alerting** — For services with billing API data (LIVE tier), the utilization model runs silently unless projected cost exceeds current spend by >50% AND >$5 (both thresholds required to avoid noise).
29
+ - **Auto-scan on init** — `burnwatch init` now runs a full utilization scan after service detection. The utilization model is populated from day one.
30
+ - **Utilization in interview JSON** — `burnwatch interview --json` now includes a `utilization` field with projected monthly units, plan inclusions, overage costs, and top call sites per service. Enables agents to say "your code projects 1,060 sessions/month, 960 over your plan."
31
+ - **6 new `unitRate` values in registry** — Browserbase ($0.10/session), Resend ($0.001/email), Inngest ($0.01/fn run), SendGrid ($0.001/email), Replicate ($0.001/prediction). LLM services intentionally omitted (model variance too high for single rate).
32
+ - **22 new tests** (70 → 92): Model operations, overage math, divergence alerting, file analysis, brief formatting, round-trip persistence.
33
+
8
34
  ## [0.12.1] - 2026-03-25
9
35
 
10
36
  ### Fixed