fix: enrich hermes local usage from state db#100
Conversation
|
Refreshed/audited PR state against current
No code changes were made in this refresh; this is a verification/status update only. |
|
Final pre-merge review from Hermes Agent:
Verdict: no blockers found; ready for maintainer merge. |
|
Refreshed final status check after latest sweep.
Local verification on fresh checkout:
No functional changes were made during this sweep. |
|
Maintainer handoff / refresh status:
Ready for maintainer review/merge from my side. |
|
This PR is still mergeable and has no reported checks/blockers from GitHub. Current status:
Looks ready for maintainer review/merge when convenient. |
|
Maintainer handoff:
From my side this is ready for maintainer review/merge. |
|
Quick follow-up: this PR is still mergeable and has no failing checks reported. Current status:
Happy to adjust if anything is blocking review or merge. |
|
Friendly maintainer ping: this PR is still clean and mergeable, with no failing checks reported. Current status:
Could a maintainer please take a look when you have a chance? Happy to adjust anything that would make this easier to review or merge. |
|
Friendly maintainer ping after rechecking current state:
Still looks ready for maintainer review/merge from my side. |
Summary
$HERMES_HOME/state.dbresultJson.hermes_usagemetadata while populating Paperclipusage,costUsd, provider, model, and billing type when availableWhy
Hermes quiet CLI output currently exposes the answer and
session_id, but not a stable machine-readable usage/cost block. Paperclip only persists run accounting when the adapter returnsusageand/orcostUsd, so hermes_local runs were showingusageJson: nulland zero spend despite Hermes recording token/cost data in its own state DB.Safety / compatibility
python3/sqlite, or query errors returnnulland do not fail the Hermes runconfig.hermesHome, thenHERMES_HOME, then~/.hermesTests
npm run typechecknpm run buildnode --test test/*.test.mjsnpm run lintis not currently runnable in this checkout becauseeslintis not installed/listed as a dev dependency.Lab evidence
Verified in an isolated Paperclip/Hermes lab with no production Hermes home or production
.envmounted into the container.Final smoke run:
e57a355b-4666-4314-90dd-80f97486b63220260502_005214_d854d5succeededusageJson: non-nullresultJson.cost_usd:0.0011862resultJson.hermes_usage.usage_source:hermes_state_dbhermesCostStatus:estimatedactual_cost_usd:nullopenrouteropenai/gpt-5.4-miniObserved usage in Paperclip after the patch:
4383792160.0011862