Skip to content

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 27 Oct 17:09
· 5 commits to main since this release
3e6f1e3

Highlights

agentstat 0.1.1 adds OpenCode Go account quotas and local OpenCode CLI activity, expands OpenCode Zen and Ollama usage reporting, and improves documentation and release checks.

OpenCode CLI activity

  • Enable the opt-in opencode-local feature to read 30-day session statistics from the installed OpenCode CLI on Unix.
  • Newer CLI versions provide structured token counts, recorded USD cost, and per-model details. Older versions fall back to rounded text totals and return an IncompleteData warning.
  • Local statistics cover the CLI's recorded sessions across providers. Free-model sessions can still report tokens with zero recorded model cost. This source does not report account quota, remaining credits, or balance.

OpenCode Go and Console

  • The opencodego adapter accepts an OpenCode Go API key and reports five-hour, weekly, and monthly utilization percentages and reset times.
  • The Console cookie adapter can include a Zen prepaid balance alongside a Go subscription's quota when optional data is requested. Confirmed pay-as-you-go accounts continue to report 30-day spend and prepaid balance when available.

Ollama Cloud

  • Report the included monthly USD credit window and reset for current plans, or session and weekly percentage windows for legacy plans, together with the purchased-credit balance when reported.

Getting started

cargo add agentstat@0.1.1

For local OpenCode CLI statistics, enable opencode-local, opt in to local probes through Client::builder().allow_local_probes(true), and request ProviderId::OpenCode with Credentials::None and Source::LocalProbe. From a source checkout, the example can be run with:

cargo run --features opencode-local --example real_usage -- opencode-cli

See the usage guide for credentials and examples, and provider coverage for available data and restrictions.

Other changes

  • Improved legacy OpenCode CLI number parsing to avoid reporting malformed or locale-dependent counts as valid usage.
  • Added OpenCode live-test entry points and expanded synthetic fixtures, including free-model and legacy CLI cases. Live OpenCode account tests require explicit credentials and are ignored by default.
  • Refreshed the README, provider coverage, roadmap, contribution guidance, and release documentation.
  • Added Google Rust Style Guide checks and updated dependencies, including TLS-related security updates.

Provider APIs and private response formats can change. Fixture tests do not guarantee live-account compatibility; compare results with the provider's own usage page.

Full changelog: v0.1.0...v0.1.1