/** * GitHub Source Adapter (SMI-590) * * Implements the ISourceAdapter interface for GitHub repositories. * Provides search, repository metadata, and skill content fetching. */ import { BaseSourceAdapter } from './BaseSourceAdapter.js'; import type { SourceConfig, SourceLocation, SourceRepository, SourceSearchOptions, SourceSearchResult, SkillContent, SourceHealth } from './types.js'; /** * GitHub Source Adapter * * Connects to GitHub API to search for and fetch skill repositories. * * @example * ```typescript * const adapter = new GitHubSourceAdapter({ * id: 'github', * name: 'GitHub', * type: 'github', * baseUrl: 'https://api.github.com', * enabled: true, * auth: { * type: 'token', * credentials: process.env.GITHUB_TOKEN * } * }) * * await adapter.initialize() * const result = await adapter.search({ topics: ['claude-skill'] }) * ``` */ export declare class GitHubSourceAdapter extends BaseSourceAdapter { private readonly apiBaseUrl; constructor(config: SourceConfig); /** * Check GitHub API health via rate limit endpoint */ protected doHealthCheck(): Promise>; /** * Search GitHub for skill repositories */ search(options?: SourceSearchOptions): Promise; /** * Get repository metadata by location */ getRepository(location: SourceLocation): Promise; /** * Fetch skill content from repository */ fetchSkillContent(location: SourceLocation): Promise; /** * Check if skill file exists */ skillExists(location: SourceLocation): Promise; /** * Get skill file SHA for change detection */ getSkillSha(location: SourceLocation): Promise; /** * Paginated search with cursor */ searchWithCursor(options: SourceSearchOptions, page: number): Promise; /** * Map GitHub API repository to SourceRepository */ private mapApiRepository; } /** * Configuration for createGitHubAdapter factory */ export interface GitHubAdapterConfig { /** Unique identifier for this source instance */ id: string; /** Human-readable name */ name: string; /** Whether this source is enabled */ enabled: boolean; /** Base URL for API requests (default: https://api.github.com) */ baseUrl?: string; /** Rate limiting configuration */ rateLimit?: { maxRequests: number; windowMs: number; minDelayMs: number; }; /** Authentication configuration */ auth?: { type: 'token' | 'basic' | 'oauth' | 'none'; credentials?: string; }; /** Additional source-specific options */ options?: Record; } /** * Factory function for creating GitHub adapters */ export declare function createGitHubAdapter(config: GitHubAdapterConfig): GitHubSourceAdapter; //# sourceMappingURL=GitHubSourceAdapter.d.ts.map