You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 11, 2026. It is now read-only.
OpenCode Go limits, model prices, and catalogs can change. Hermes/provider responses may expose token usage but AWCMS-Mini has no guaranteed authoritative OpenCode account-quota API. Operations must distinguish provider-reported data, locally observed usage, configured tariff estimates, and unknown values.
Never label a local estimate as provider billing truth.
Policies and jobs
Per tenant/agent/model warning and critical thresholds.
Configurable windows including five-hour, weekly, monthly, and custom operational windows; defaults must not pretend to mirror a live provider contract.
Versioned tariff/config metadata with effective dates.
Rollups by tenant/agent/model/channel/source and time window.
Alert/incident types for unavailable agent, auth failure, model mismatch, repeated timeout, circuit open, Telegram mismatch, budget warning/critical, and telemetry stale.
Acknowledgement/resolution with actor, reason, and audit.
bun run hermes:usage:rollup
bun run hermes:telemetry:purge
Retention defaults for health snapshots, run events, usage, and incidents.
Privacy/security requirements
No prompts, responses, memory, Telegram content, raw credentials, or full upstream error bodies in rollups/incidents.
Parent epic: #668
Depends on: #672, #675, #676
Context
OpenCode Go limits, model prices, and catalogs can change. Hermes/provider responses may expose token usage but AWCMS-Mini has no guaranteed authoritative OpenCode account-quota API. Operations must distinguish provider-reported data, locally observed usage, configured tariff estimates, and unknown values.
Objective
Add provenance-aware usage rollups, configurable budget policies, alert/incident records, and privacy-safe retention/purge jobs.
Scope
Tables
awcms_mini_hermes_usage_rollupsawcms_mini_hermes_budget_policiesawcms_mini_hermes_incidentsUsage provenance
Every metric is tagged as one of:
provider_reportedhermes_reportedlocally_observedconfigured_estimateunknownNever label a local estimate as provider billing truth.
Policies and jobs
bun run hermes:usage:rollupbun run hermes:telemetry:purgePrivacy/security requirements
Acceptance criteria
bun run checkpasses.Out of scope