Includes provider integrations, settings, NSStatusItem UI, tests, Makefile, and README with screenshot. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
525 B
Swift
16 lines
525 B
Swift
import Foundation
|
|
|
|
enum AuthCredentials: Sendable {
|
|
case cursorSession(cookieValue: String)
|
|
case cursorAdminAPI(apiKey: String)
|
|
case claudeCLI
|
|
case claudeOAuth(accessToken: String)
|
|
case claudeAdminAPI(apiKey: String)
|
|
}
|
|
|
|
protocol UsageProvider: Sendable {
|
|
var id: ProviderID { get }
|
|
var displayName: String { get }
|
|
func fetchUsage(credentials: AuthCredentials, cache: UsageCache) async throws -> ProviderUsageSnapshot
|
|
func resolveCredentials(authMode: AuthMode) throws -> AuthCredentials
|
|
}
|