export declare class GitHubFetchError extends Error { status: number; body: string; constructor(status: number, body: string, message: string); } export interface GitHubFetchOptions { /** Returns the current token or null. Defaults to the OS keychain. */ tokenProvider?: () => string | null; /** Fetch impl (DI for tests). Defaults to globalThis.fetch. */ fetchImpl?: typeof fetch; /** Sleep impl (DI for tests). Defaults to setTimeout. */ sleep?: (ms: number) => Promise; /** vskill CLI version; used in User-Agent. Defaults to "vskill". */ version?: string; /** Override allowed hostname set (testing only). */ allowedHosts?: Set; } export type GitHubFetch = (url: string, init?: RequestInit) => Promise; export declare function resolveGitHubEnvToken(env?: NodeJS.ProcessEnv): string | null; export declare function createGitHubFetch(opts?: GitHubFetchOptions): GitHubFetch; export declare function githubFetch(url: string, init?: RequestInit): Promise; /** Test-only reset hook. */ export declare function _resetDefaultGitHubFetchForTests(): void;