Files
opencode/packages/agent-core
Artur Do Lago ed332849ba feat(auth): add proactive OAuth token refresh
- Add Auth.refreshToken() to refresh a specific provider's token
- Add Auth.refreshAllExpiring() to refresh all tokens expiring within 10 min
- Add Auth.status() to get token validity info for all providers
- Add Auth.isExpiringSoon() and Auth.isExpired() helpers
- Call refreshAllExpiring() during provider initialization

Supported providers: anthropic, openai
Note: google/antigravity uses plugin-handled custom flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
..

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.