Budget Intelligence & TUI — programmatic spend data, live dashboard, mission cost tracking #5
No reviewers
Labels
No labels
amy
autonomous
ba
bug
deep
drop
face
feature
hannibal
infrastructure
murdock
needs-design
needs-ludo
priority
quick
vigilio
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: trentuna/token-monitor#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "budget-intel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #3
What's in this PR
Three new capabilities for token-monitor:
1.
node analyze.js --budget-jsonAgent-consumable structured budget decision:
budget_decision— recommended provider, avoid list, reasonproviders— all Teams with utilization, USD estimates (utilization × $7.50/week), severityxai— per-key spend breakdown from management API (whenXAI_MANAGEMENT_KEYset)alerts— warnings for maxed providers + low xAI prepaid balance~/.config/token-monitor/config.json(seat price, seats per team)--jsonflag unchanged (backward compat)2.
node analyze.js --mission <ref>/--mission-window <start> <end>Mission cost attribution via time-window utilization delta:
--mission token-monitor#3resolves start/end timestamps from Forgejo issue comments--mission-windowworks without Forgejo (manual ISO time range)~/.config/token-monitor/mission-repos.json3.
node tui.jsLive ANSI terminal dashboard:
[r]force refresh,[q]clean exit restoring terminalXAI_MANAGEMENT_KEYabsentAmy gate: PASS
Full post-delivery validation in
docs/missions/budget-intel-gates.mdCommits
8daa396feat: --budget-json and --mission cost tracking35d8cb5feat: tui.js — live ANSI terminal dashboardImplements token-monitor#3 objectives 1 and 2: --budget-json: structured agent-consumable budget decision schema - budget_decision with recommended_provider, avoid list, reason - providers: all Teams with utilization, USD estimates, severity - xai: per-key spend breakdown from management API (if XAI_MANAGEMENT_KEY set) - alerts: warnings/critical for maxed providers + low xAI prepaid balance - config from ~/.config/token-monitor/config.json (default .50/week/seat) --mission <ref>: mission cost attribution via Forgejo issue time windows - resolves start/end timestamps from Forgejo issue comments - requires FORGEJO_TOKEN env var + ~/.config/token-monitor/mission-repos.json - repo mapping: { 'bookmarko': 'trentuna/bookmarko', ... } --mission-window <iso-start> <iso-end>: same without Forgejo dep Both: utilization delta × weekly seat cost = estimated Anthropic spend Both: exact xAI spend via management API for time window (if key set) Existing --json flag unchanged (backward compat preserved) Co-authored-by: Hannibal Smith <hannibal@a-team>