import type { GitHubRepoSnapshot, SourceDefinition } from "./types.js"; interface GitHubSourceHealthEntry { sourceId: string; owner: string; repo: string; lastAttemptAt: string; lastSuccessAt: string | null; lastFailureAt: string | null; consecutiveFailures: number; degradedMode: boolean; degradedReason: string | null; usedCacheLastAttempt: boolean; lastError: string | null; } interface GitHubSourceHealthState { schemaVersion: 1; updatedAt: string; entries: Record; } declare function assertGitHubSourceHealthState(value: unknown): asserts value is GitHubSourceHealthState; /** * Clears process-local GitHub throttling and health-update state between CLI * invocations that run in the same Node.js process. */ export declare function clearGitHubState(): void; /** * Returns whether the provided value matches git hub repo source. */ export declare function isGitHubRepoSource(source: SourceDefinition): boolean; /** * Provides parse git hub repo coordinates for the lifecycle pipeline. */ export declare function parseGitHubRepoCoordinates(repoUrl: string): { owner: string; repo: string; } | null; /** * Fetches git hub repo snapshot with the configured runtime safeguards. */ export declare function fetchGitHubRepoSnapshot(source: SourceDefinition, projectRoot: string): Promise; /** * Fetches git hub repo snapshot by repo url with the configured runtime safeguards. */ export declare function fetchGitHubRepoSnapshotByRepoUrl(options: { repoUrl: string; projectRoot: string; sourceId: string; }): Promise; /** * Builds git hub raw file url from the provided inputs. */ export declare function buildGitHubRawFileUrl(options: { owner: string; repo: string; branch: string; filePath: string; }): string; declare function fetchGitHubJson(path: string): Promise; declare function fetchGitHubJsonOptional(path: string): Promise; declare function parseGitHubJsonResponse(response: Response, path: string): Promise; declare function fetchGitHubResponse(path: string): Promise; declare function captureRateLimit(response: Response): void; declare function isRateLimited(): boolean; declare function updateGitHubSourceHealth(projectRoot: string, key: string, nextEntry: Partial & Pick): Promise; declare function readGitHubRepoSnapshotCache(cachePath: string): Promise; declare function waitForRetry(attempt: number, response?: Response): Promise; declare function buildRateLimitMessage(): string; declare function getErrorMessage(error: unknown): string; /** * Exposes narrow GitHub internals for focused behavioral coverage. */ export declare const githubInternals: { assertGitHubSourceHealthState: typeof assertGitHubSourceHealthState; fetchGitHubJson: typeof fetchGitHubJson; fetchGitHubJsonOptional: typeof fetchGitHubJsonOptional; parseGitHubJsonResponse: typeof parseGitHubJsonResponse; fetchGitHubResponse: typeof fetchGitHubResponse; captureRateLimit: typeof captureRateLimit; isRateLimited: typeof isRateLimited; updateGitHubSourceHealth: typeof updateGitHubSourceHealth; readGitHubRepoSnapshotCache: typeof readGitHubRepoSnapshotCache; waitForRetry: typeof waitForRetry; buildRateLimitMessage: typeof buildRateLimitMessage; getErrorMessage: typeof getErrorMessage; }; export {};