Repository navigation
fix(desktop): parse the usage-window layout so Nous rows survive - #56
Conversation
Hermes renders an account metered by usage windows (no monthly credit
grant) as a plan-name header plus one gauge line per window:
Hermes Plus
Today [| ] 1% used · resets in 23h
This week [| ] <1% used · resets in 6d 23h
Top-up credits: $24.27
Renews: Nov 3, 2026
parseUsageOutput only matched the account-limits layout
("Label: N% remaining (M% used)") and the fixed "Account limits" /
"Nous credits" headers, so a window block parsed to zero windows and the
Nous rows disappeared silently.
Those rows have no other source: usage.bars and subscription.state both
return available:false for a window plan (build_usage_model short-circuits
when _window_seed_fields() is not None), so the slash.exec usage text is
the only path that can carry them.
Accept the plan-name header as a group opener and parse the gauge lines,
reading "<1% used" as zero used. The account-limits layout is unchanged.
|
Merged, thank you @jorisquintano, and welcome! You traced the missing rows past the plugin to I kept the plan-name list as you wrote it. Hermes has no fixed list of plan names, because the header is whatever plan name the Portal returns. A plan missing from the list behaves as it did before this change, with no Nous rows and no error. If you run into one, a comment with the header line is all I need to add it. I also kept reading I don't have a window-plan account, so I couldn't check it in Desktop. Could you try it from Catalog installs get it once the catalog pin is bumped upstream. Until then, you can copy |
|
Thanks, and thanks for the fast merge. The window-plan check you asked for — done, from
Cards the plugin builds from it:
Four windows, provider What that does not prove: the Desktop pixels. My backend is headless, so I verified the card payload the page renders, not the rendered page. I'll report back here if the user sees anything off after reloading, since it's their account and their Desktop. Two notes from deploying it:
|
|
Follow-up from the reporter's Desktop (the account in the reproduction above), a few minutes after the merge. Deployment + refresh, measured gateway-side. The Desktop plugin files were replaced with the merged build and the app reloaded; the gateway then recorded a fresh probe pass — {"provider": "opencode-go", "plan": "Go", "windows": [
{"label": "5h", "used_percent": 2.0, "remaining_percent": 98.0},
{"label": "Weekly", "used_percent": 9.0, "remaining_percent": 91.0},
{"label": "Monthly", "used_percent": 25.0, "remaining_percent": 75.0}],
"disabled_providers": []}The
What is measured and what is not: the gateway side is measured end to end (the text above comes from the same Still worth a 0.2.27 bump for the reason in my previous comment: |
|
Visual confirmation from the Desktop, closing the loop on your question. The Resetwatch page renders the four Nous Portal cards, and they match
Two extras worth noting, since they came along for free:
No error banner, and opencode-go renders normally alongside (5h / Weekly / Monthly), so the fix adds the rows without disturbing the probe path. I did not attach the screenshot: it carries the account's billing surface (plan, top-up balance, renewal), and the numbers already in this thread are enough to check the mapping. So, from your side: nothing left to confirm — the window plan renders, the reset texts come from the same |
|
Thanks @jorisquintano. Checking the parser against the live On the version string, the updater doesn't work that way here. The in-app check reads Your fix is now in catalog-v0.2.27, with credit to you in the notes. I'm opening the re-pin in NousResearch/hermes-agent next. Catalog users get the fix once a maintainer merges that PR and they run |
|
The catalog re-pin to 0.2.27 is open as NousResearch/hermes-agent#146839. |
|
Correction to my previous comment, before it misleads anyone: the version-string warning I gave was wrong. I assumed the in-app updater would offer Related, and measurable: you cut
Hermes's catalog index still pins One thing from that comment is still true but harmless, so I'll restate it narrowly: |
|
Thanks @jorisquintano for the correction, and for re-running the checks on the installed 0.2.27 build. 44/44 and matching cards from the release itself are good to have on the thread before the re-pin is reviewed. You're right about |
Credits @jorisquintano for Adolanium#56 and @Iversondwx for Adolanium#57.
Symptom
The Nous Portal rows disappear from the Resetwatch page while every other provider still renders. No error banner is shown — the block silently parses to zero windows.
Cause (measured)
For an account metered by usage windows (no monthly credit grant),
agent/billing_usage.py::build_usage_model()short-circuits:so the two RPC paths Resetwatch uses for Nous (
usage.bars, thensubscription.state) returnavailable: falseand produce no cards. The only path left is theslash.exec usagetext, parsed byparseUsageOutput().That text, for such an account, is (verbatim from a real gateway, only the numbers are this reporter's):
parseUsageOutput()matches neither the plan-name header (Hermes Plusis notAccount limits/Nous credits) nor the gauge lines (it expectsLabel: N% remaining (M% used)), sogroupsis empty and the row is silently dropped. Reproduced againstmain(5b6c9c6) and the 0.2.26 catalog package.Fix
Two additions to
parseUsageOutput(), nothing else changes:Nous Portal,Nous credits,Hermes Free|Plus|Pro|Max|Team|Business,Insider) opens a group withprovider: 'Nous Portal';remaining = 100 - used, and<1% usedis read as 0 used (it is a rounding floor, not a measurement).The existing account-limits layout (
Label: N% remaining (M% used),Provider: …) is untouched.Tests
Two tests added to
test_quick_usage.cjs(the harness now exportsparseUsageOutput): the window layout yields 4 Nous windows with the right remaining/used/reset text and keeps the detail lines, and the account-limits layout still parses as before.Measured locally on Linux, Node 22.23.1:
node --test test_quick_usage.cjs→ 44/44 passnode --test test_profile_routing.cjs test_probe_pagination.cjs test_quick_usage.cjs test_i18n.cjs test_shell_exec_session.cjs→ 103/103 passHERMES_TEST_CATALOG=1 node --test test_profile_routing.cjs test_quick_usage.cjs test_i18n.cjs→ 75/75 passpython scripts/build_catalog.py --check→Catalog package verifiednode --check plugin.jsandnode --check catalog/desktop/plugin.js→ cleancatalog/desktop/plugin.jsis the regenerated artifact (python scripts/build_catalog.py), as the release commits do.Not verified
vmharness only; the reproduction above is from a Linux gateway, not from a Windows Desktop.Used locally as a patch on 0.2.26 before opening this; happy to adjust the header list if you'd rather match the plan names strictly, and to drop the plan-name group in favour of an explicit "no windows parsed" error if you prefer surfacing the failure over guessing the provider.