/** * SMI-628: GitHubIndexer - Fetches skill repositories from GitHub * * Provides: * - Search GitHub for claude code skill repositories * - Rate limit handling * - Repository metadata extraction */ import type { SkillCreateInput } from '../types/skill.js'; import type { DependencyDeclaration } from '../types/dependencies.js'; /** * Skill metadata extracted from repository indexing * Used by IndexerRepository for database operations */ export interface SkillMetadata { name: string; description: string | null; author: string | null; version: string | null; tags: string[]; /** SMI-3135: Structured dependency declaration (replaces string[]) */ dependencies?: DependencyDeclaration; category: string | null; license: string | null; rawContent: string; repoUrl: string; filePath: string; sha: string; owner: string; repo: string; } /** * GitHub repository metadata */ export interface GitHubRepository { owner: string; name: string; fullName: string; description: string | null; url: string; stars: number; forks: number; topics: string[]; updatedAt: string; defaultBranch: string; } /** * Options for GitHub indexing */ export interface GitHubIndexerOptions { /** GitHub API token (optional but recommended for higher rate limits) */ token?: string; /** Maximum repositories to fetch per request */ perPage?: number; /** Delay between API calls in ms (default: 150) */ requestDelay?: number; /** Topics to search for */ topics?: string[]; } /** * Result of an indexing operation */ export interface IndexResult { /** Number of repositories found */ found: number; /** Number successfully indexed */ indexed: number; /** Number of failures */ failed: number; /** Error messages for failures */ errors: string[]; /** Indexed repositories */ repositories: GitHubRepository[]; } /** * Indexes skill repositories from GitHub */ export declare class GitHubIndexer { private token?; private perPage; private requestDelay; private topics; constructor(options?: GitHubIndexerOptions); /** * Delay between API calls to avoid rate limiting */ private delay; /** * Build GitHub API headers */ private buildHeaders; /** * Search GitHub for repositories by topic or query */ searchRepositories(query: string, page?: number): Promise; /** * Index all configured topics */ indexAllTopics(maxPagesPerTopic?: number): Promise; /** * Index repositories by first letter filter (A-F, G-L, etc.) */ indexByLetterRange(startLetter: string, endLetter: string, maxPages?: number): Promise; /** * Convert GitHub repository to SkillCreateInput */ repositoryToSkill(repo: GitHubRepository): SkillCreateInput; } //# sourceMappingURL=GitHubIndexer.d.ts.map