/** * SMI-860: GitHub API client with retry logic * SMI-1445: Added GitHub App authentication support */ import { SearchQuery, ImportedSkill } from './types.js'; import { getGitHubHeaders, getInstallationToken } from './github-auth.js'; export { getGitHubHeaders, getInstallationToken }; export interface RateLimitInfo { remaining: number; limit: number; resetTime: Date; used: number; } export interface RateLimitStatus { core: RateLimitInfo | null; search: RateLimitInfo | null; } /** * Display rate limit status from response headers (lightweight, no API call). */ export declare function displayRateLimitFromHeaders(response: Response, label?: string): void; /** * Fetches a URL with exponential backoff retry logic. * Handles rate limiting (429) and server errors (5xx). * * @param url - The URL to fetch * @param options - Fetch options including headers * @returns The fetch Response * @throws Error after max retries exceeded */ export declare function fetchWithRetry(url: string, options?: RequestInit): Promise; /** * Get current rate limit status from GitHub API. * Returns structured data for monitoring. */ export declare function getRateLimitStatus(): Promise; /** * Initialize rate limit tracking at the start of an import. */ export declare function initRateLimitTracking(): Promise; /** * Display a summary of rate limit usage during the import session. */ export declare function displayRateLimitSummary(): Promise; /** Check and display GitHub rate limit status */ export declare function checkRateLimit(): Promise; /** * Fetches repositories from GitHub search API for a given query. * Handles pagination automatically up to GitHub's 1000 result limit. * * @param searchQuery - The search query configuration * @param startPage - Starting page for resume support * @param onProgress - Progress callback * @returns Array of imported skill metadata */ export declare function fetchGitHubSearch(searchQuery: SearchQuery, startPage?: number, onProgress?: (current: number, total: number) => void): Promise; //# sourceMappingURL=github-client.d.ts.map