feat(opencode): add OpenCode Go quota tracking provider#109
Open
hiyukoim wants to merge 3 commits into
Open
Conversation
Rebuild PR work cleanly from upstream (keeps kimi/moonshot/deepseek). Hardened scrape client, tracker wiring, typed errors, dashboard/UI, limit-field contract test, and empty-state/history frontend fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent DetectCodexCredentials from reading the host OpenCode auth.json when CODEX_HOME auth is empty. Co-authored-by: Cursor <cursoragent@cursor.com>
Pin OPENCODE_HOME to a temp dir in tests so host auth.json cannot leak on macOS. Add menubar/tab/historyBoth/settings and document OPENCODE_GO_* in .env.example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces closed #102 since it got messy. Rebuilds OpenCode Go as a quota provider on current
upstream/main(keeps Kimi / Moonshot / DeepSeek), following the existing provider pattern from CONTRIBUTING.md. Related: #100.OPENCODE_GO_WORKSPACE_ID+OPENCODE_GO_AUTH_COOKIE(seedocs/OPENCODE_SETUP.md)OPENCODE_ENABLEDremains the separate Codex-via-OpenCode-auth pathlimit(notlimitValue); empty-state re-render guarded; dedicated history routingWhy a new PR
#102 was closed after an unrelated-histories merge onto the harden branch corrupted history /
app.js. This branch starts clean fromupstream/mainand ports OpenCode-only changes.Provider checklist
Per CONTRIBUTING "Adding a New Provider":
internal/api/opencode*.gointernal/store/opencode_store.go(+ schema instore.go)internal/tracker/opencode_tracker.gointernal/agent/opencode_agent.gointernal/web/handlers.go/opencode_handlers.gointernal/web/static/app.jsTest plan
api,web,agent,store,tracker,configgo vet ./...OPENCODE_GO_WORKSPACE_ID+OPENCODE_GO_AUTH_COOKIEset: OpenCode tab appears, quotas poll, charts update./app.sh --smoke # optional full suite: ./app.sh --test