import type { AuthInfo, FetchLike, OAuthInfo, ProviderInfo } from "../constants" export interface ResolvedCredential { providerID: string provider?: ProviderInfo authInfo?: AuthInfo apiKey?: string fetch?: FetchLike mode: "apiKey" | "oauth" | "default" } export interface AuthDependencies { fetchImpl?: FetchLike now?: () => number sleep?: (ms: number) => Promise readFile?: (filePath: string, encoding: BufferEncoding) => Promise packageVersion?: string } export type AuthRuntime = Required> export type OAuthResolver = (providerID: string) => Promise export interface CodexBodyRewrite { body: BodyInit | null | undefined originalStream: boolean }