Skip to content

feat: expose Go and Zen usage - #41824

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
go-usage-api
Open

feat: expose Go and Zen usage#41824
opencode-agent[bot] wants to merge 1 commit into
v2from
go-usage-api

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • add an authenticated Console endpoint for normalized Go quota windows and Zen billing usage
  • expose the account data through the OpenCode server at GET /api/usage using the active OpenCode credential
  • generate Promise and Effect client methods under client.usage.get()
  • return { connected: false } when no OpenCode account is configured and sanitize upstream failures as service-unavailable errors

Validation

  • typechecked schema, protocol, core, server, client, and Console app packages
  • core OpenCode provider tests (14 passed)
  • server usage endpoint test (1 passed)
  • client contract tests (26 passed)

Requested by: @kitlangton (Kit via Slack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant