repospend 0.1.7 → 0.1.8
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 +11 -0
- package/README.md +10 -8
- package/dist/cli.js +418 -109
- package/docs/llms.txt +2 -1
- package/docs/pricing.md +21 -6
- package/docs/token-accounting.md +19 -2
- package/package.json +25 -7
- package/web-dist/assets/{index-D4cLshng.js → index-BWVpHJSG.js} +88 -88
- package/web-dist/index.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to RepoSpend will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.1.8
|
|
8
|
+
|
|
9
|
+
- Add explicit GPT-6.1 Terra Standard API-equivalent pricing ($1 input / $0.05 cached input / $5 output per 1M) with alias, snapshot, and custom-override handling, and per-request long-context cards for GPT-6/6.1 models: a single request over 272,000 input tokens reprices that request at 2x input/cache rates and 1.5x output rates. The same per-request tiers now cover the GPT-5.x Standard cards (5.6 Sol/Terra/Luna, 5.5, 5.5 Pro, 5.4, 5.4 Pro); mini and nano have no published tier and stay flat.
|
|
10
|
+
- Price each Codex request with the model that was active for it instead of the session's first model, keep per-model token/cost slices on the session for accurate model rollups and filters without duplicating sessions, and fall back to session-level pricing with an explicit `assumed_short_context_rates` / `missing_long_context_pricing` assumption when per-request detail is unavailable.
|
|
11
|
+
- Normalize OpenAI nested cache usage (`input_tokens_details.cached_tokens`, `cache_write_tokens`) and 30-minute/12-hour cache-write TTLs through token aggregation, pricing, exports, and the pricing editor; unclassified writes keep billing at the generic cache-write rate, and the Codex parse cache is versioned (`parse-v2`/`codex-session-v2`) so older cached breakdowns are rebuilt.
|
|
12
|
+
- Protect the local dashboard, JSON, and CSV export endpoints against DNS-rebinding via non-local `Host` headers, while still allowing localhost, `127.0.0.1`, `[::1]`, health checks, and CLI requests without a Host header; no login or auth UX added. Encoded forms of those paths (for example `/api/%64ashboard`) are decoded the same way the router decodes them before the guard runs, so percent-encoded GET and HEAD requests cannot evade the check.
|
|
13
|
+
- Keep intentional flat custom prices for canonical GPT-6/6.1 and tiered GPT-5.x models at request sizes above 272K input tokens instead of silently switching to the bundled long-context card; a user-saved long-context card still re-enables tiered pricing for that model. Settings reads the engine's base→long-context mapping so alias bases such as `gpt-5.6` label their real long-context card correctly, and a shared card is only called "not applied" when every base that maps to it is a custom flat card.
|
|
14
|
+
- Project only the selected models' `modelUsage` slices into filtered accounting — tokens, costs, cache totals, model groups, repo/day/hour summaries, and exports — while preserving one session identity per filtered session, and rank each model's top repository by that model's own slices rather than whole-session spend.
|
|
15
|
+
- Refresh runtime dependencies within approved ranges (Fastify 5.12.7, @fastify/static 10.1.8) and patch transitive audit findings via scoped overrides (find-my-way, fast-uri 3.x, tinypool, postcss, nanoid, js-yaml, brace-expansion, vite 6.4.5 for the test toolchain). The public runtime floor is now Node >=22.12 because @fastify/static 10 requires `content-disposition` 3 (ESM-only) — the packaged CLI and dashboard were verified on Node 22.12.0, and CI checks Node 22.12.0 and 24.
|
|
16
|
+
- Bump Vitest to 3.2.7 and esbuild/sharp to their latest compatible patch releases; remaining audit findings are moderate and limited to Vitest's browser-mode mocker, which RepoSpend does not use.
|
|
17
|
+
|
|
7
18
|
## 0.1.7
|
|
8
19
|
|
|
9
20
|
- Correct Claude Sonnet 5.5 cache reads to $0.10 per million tokens following the October 7 price reduction, without changing Sonnet 5 or intentional custom overrides.
|
package/README.md
CHANGED
|
@@ -21,13 +21,15 @@ Project links:
|
|
|
21
21
|
|
|
22
22
|
## Model pricing and usage guides
|
|
23
23
|
|
|
24
|
-
The 0.1.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
request
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
The 0.1.8 update (October 27) adds explicit GPT-6.1 Terra rates, prices each
|
|
25
|
+
Codex request with the model that was active for it, applies OpenAI long-context
|
|
26
|
+
tiers per request when request sizes are recorded, and normalizes OpenAI
|
|
27
|
+
30-minute and 12-hour cache writes. Claude and Copilot inference records are
|
|
28
|
+
still priced per request; aggregate-only Haiku usage stays unpriced when request
|
|
29
|
+
lengths are unavailable, and aggregate-only OpenAI usage is flagged rather than
|
|
30
|
+
silently tiered. These are current API-equivalent estimates, not historical
|
|
31
|
+
invoices. See [pricing methodology](docs/pricing.md) for rates, promotion dates,
|
|
32
|
+
and custom overrides.
|
|
31
33
|
|
|
32
34
|
RepoSpend includes explicit **GPT-6.1 Sol** API-equivalent pricing: $2 input,
|
|
33
35
|
$0.10 cached input, $2.50 cache writes, and $10 output per million tokens at
|
|
@@ -127,7 +129,7 @@ files alone.
|
|
|
127
129
|
|
|
128
130
|
## Requirements
|
|
129
131
|
|
|
130
|
-
- Node.js `
|
|
132
|
+
- Node.js `22.12` or newer
|
|
131
133
|
- macOS, Linux, or Windows
|
|
132
134
|
- Local Codex, Claude Code, or GitHub Copilot data for usage analytics
|
|
133
135
|
- Optional RTK data if you want token-reduction workflow context
|