feat(extensions): cost-tracker for per-agent cost aggregation#73
Merged
dgarson merged 3 commits intodgarson/forkfrom Feb 23, 2026
Merged
feat(extensions): cost-tracker for per-agent cost aggregation#73dgarson merged 3 commits intodgarson/forkfrom
dgarson merged 3 commits intodgarson/forkfrom
Conversation
…IdempotencyGuard)
- New extensions/cost-tracker module that reads telemetry JSONL - Tracks per-agent API spend using token counts × model pricing - Per-run cost (agent × wave) and daily/weekly rollups - Budget guardrail alerts (configurable threshold) - Model pricing table: MiniMax M2.5, GLM-5, Grok 4, Claude Sonnet, Haiku - scripts/cost-report.ts CLI for last 24h cost summary This is an additive extension with minimal impact to upstream code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new
cost-trackerextension that provides per-agent cost tracking from telemetry JSONL.Problem
15 discovery agents running 3 waves/day with zero per-agent cost/spend visibility.
Solution
extensions/cost-tracker/that reads from telemetry JSONL sink (additive, no upstream changes)Deliverables
extensions/cost-tracker/extension scaffold (package.json, index.ts, cost-aggregator.ts)scripts/cost-report.ts— CLI script to print last 24h cost summaryfeat/cost-tracker-2Testing
Notes
anytypescron_usage_report.ts)