Repository navigation
Add a Grok collector for the agents usage panel - #9840
Closed
MahdiHedhli wants to merge 2 commits into
Closed
MahdiHedhli wants to merge 2 commits into
MahdiHedhli wants to merge 2 commits into
Conversation
Setup already offers Grok as a default coding agent, but the bar widget only lights up for Claude, Codex, and Fireworks. Scan billed turn_completed rows under $GROK_HOME/sessions, merge pi/omp/OpenCode xAI usage (including omp xai-oauth), and pull the SuperGrok weekly pool from grok agent stdio _x.ai/billing. ACP Money.val is cents.
Skip task-completed prompt ids and fall back to cli-chat-proxy billing when ACP omits the Grok Build / Chat / Imagine split.
5 tasks done
2 of 3 tasks
3 of 4 tasks
Member
|
Automated duplication check: this pull request looks similar to #9498, which covers the same Grok usage collector. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
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.
Setup already offers Grok as a first-party default coding agent, but
omarchy.agentsnever lights up for it. Collectors are discovered from$OMARCHY_PATH/bin/omarchy-agent-usage-*; there was no Grok one.This adds
omarchy-agent-usage-grok. It prints the same record contract the panel already understands — no QML changes.Preferred channel: this gap is already tracked as suggestion #7198. Related collector PRs: #7200, #6902, #7393, #6485. Happy to treat this as extra verification / a source of patches (omp
xai-oauth, ACPMoney.valas cents) rather than a competing merge.$GROK_HOME/sessionsbilledupdates.jsonlturn_completedrows (nestedusage, or flat token fields /event_name). Cache read is split out of input.session_kindvalues that start withsubagentare skipped._x.ai/billing(grok agent --no-leader stdio). Weekly/monthly pool →limits[]. Non-zero prepaid/on-demand leftover →balance. ACPMoney.valis integer cents.xai,xai-auth,xai-oauth) and OpenCode (providerID=xai) sessions are merged.assets/grok.svg/grok-light.svgfrom the official Grok mark.Tests
test/shell.d/agent-usage-grok-scanner-test.shStandalone drop-in (user-space installer until this ships): https://github.com/MahdiHedhli/omarchy-agent-usage-grok