Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Hermes as a supported provider in the agents bar widget by introducing a Hermes usage collector (local-only) plus supporting UI/assets and tests.
Changes:
- Added
omarchy-agent-usage-hermescollector to scan Hermesstate.db, aggregate tokens/prompts/sessions, and cache results. - Enabled Hermes by default in the agents plugin manifest and documented Hermes behavior/configuration.
- Added a shell-based integration test and a Hermes icon asset.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/shell.d/agent-usage-hermes-scanner-test.sh | Adds end-to-end shell test covering Hermes session aggregation and cache behavior. |
| shell/plugins/agents/manifest.json | Enables Hermes provider by default and updates plugin description. |
| shell/plugins/agents/assets/hermes.svg | Adds Hermes icon asset for the UI. |
| shell/plugins/agents/README.md | Documents Hermes provider semantics and configuration. |
| bin/omarchy-agent-usage-hermes | Implements Hermes local usage collector with caching/locking. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| touched in the last 30 days, and Fireworks requests the last 30 days from its | ||
| billing API, so their totals and day counts cover that window. Claude's cover | ||
| every transcript still on disk. | ||
| every transcript still on disk, and Hermes' every session row in its store. |
Comment on lines
+75
to
+80
| [[ $(jq -c '.modelUsage["hermes-4-405b"]' <<<"$result") == '{"inputTokens":100,"outputTokens":28,"cacheReadInputTokens":30,"cacheCreationInputTokens":5}' ]] || | ||
| fail "Hermes collector folds reasoning into output and keeps cache separate" "$result" | ||
| pass "Hermes collector folds reasoning into output and keeps cache separate" | ||
|
|
||
| # Provider prefixes are stripped from model ids, like the Hermes dashboard. | ||
| [[ $(jq -c '.modelUsage["hermes-3-70b"]' <<<"$result") == '{"inputTokens":300,"outputTokens":62,"cacheReadInputTokens":0,"cacheCreationInputTokens":0}' ]] || |
Comment on lines
+75
to
+80
| [[ $(jq -c '.modelUsage["hermes-4-405b"]' <<<"$result") == '{"inputTokens":100,"outputTokens":28,"cacheReadInputTokens":30,"cacheCreationInputTokens":5}' ]] || | ||
| fail "Hermes collector folds reasoning into output and keeps cache separate" "$result" | ||
| pass "Hermes collector folds reasoning into output and keeps cache separate" | ||
|
|
||
| # Provider prefixes are stripped from model ids, like the Hermes dashboard. | ||
| [[ $(jq -c '.modelUsage["hermes-3-70b"]' <<<"$result") == '{"inputTokens":300,"outputTokens":62,"cacheReadInputTokens":0,"cacheCreationInputTokens":0}' ]] || |
|
|
||
| [[ $(jq -r '.activeDays' <<<"$result") == "2" ]] || | ||
| fail "Hermes collector counts distinct active days" "$result" | ||
| [[ $(jq -r '.activeDates[0]' <<<"$result") == "$(date -d yesterday +%Y-%m-%d)" ]] || |
| cache_file=$(ls "$cache_home/.cache/omarchy/agent-usage/"/hermes-scan-*.json 2>/dev/null | head -n 1) | ||
| [[ -n $cache_file && -s $cache_file ]] || | ||
| fail "Hermes collector leaves a cache file behind" "$result" | ||
| [[ $(stat -c %a "$cache_file") == "644" ]] || |
The omarchy-agent-usage-hermes collector sums the Hermes session store (~/.hermes/state.db, honored via HERMES_HOME) into the shared record contract, the same way Hermes itself counts: root sessions with at least one message that are not archived, attributed to the day each session started. Reasoning tokens count as output and each API call is one prompt, so the panel shows the same token and pace story as the other agents. Hermes runs on whatever providers you sign in to, so there is no account to probe for limits — the record carries an empty limits list and local stats only. The panel needs nothing new: it discovers the record by convention, resolves the caduceus mark from assets/hermes.svg, and draws the tab. The manifest and README list Hermes alongside the other collectors, and a scanner test pins the record shape, cache, and --force/--limits-only behavior.
Salt-555
force-pushed
the
add-hermes-agent
branch
from
August 14, 2026 21:12
45c5ba3 to
455a18b
Compare
Author
|
Closing this in favor of #6645 by @okurmustafa, which already covers local Hermes usage attribution (and more — per-model and auxiliary-task attribution) with its own collector and scanner test. No value in two PRs for the same surface. Thanks for the great work on this. |
7 tasks done
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
Adds a
omarchy-agent-usage-hermescollector so the agents panel shows Hermes Agent usage alongside Claude, Codex, and Fireworks.What it does
bin/omarchy-agent-usage-hermes: sums the Hermes session store (~/.hermes/state.db, honored viaHERMES_HOME) into the shared record contract, matching how Hermes itself counts — root sessions with at least one message that are not archived, attributed to the day each session started. Reasoning tokens count as output; each API call is one prompt.limitslist and local stats only.assets/hermes.svg, and draws the tab.agent-usage-hermes-scanner-test.shpins the record shape (reasoning folded into output, cache split, provider-prefix stripping, prompt counting), the child/archived/empty session exclusions, day attribution, the local-stats cache, and--force/--limits-onlybehavior.Validation
test/shell.d/agent-usage-hermes-scanner-test.shpasses (12 assertions), as do the existingagent-usage-update-test.sh,agents-panel-test.sh, andagents-default-migration-test.sh.