import type { ProcessRequest, ProcessResult, ProcessRunner } from "../providers/process.js"; import { type GithubObservation, type GithubSyncStream } from "./types.js"; export declare const MAX_GITHUB_GRAPHQL_OUTPUT_BYTES: number; export interface GithubSyncTarget { readonly repository: string; readonly owner: string; readonly name: string; } export interface GithubObservationPage { readonly stream: GithubSyncStream; readonly observations: readonly GithubObservation[]; readonly has_next_page: boolean; readonly next_cursor: string | null; } export declare class GithubContactError extends Error { constructor(message?: string); } export declare class GithubRateLimitError extends Error { constructor(); } export declare class GithubParseError extends Error { constructor(message: string); } export declare function normalizeGithubSyncTarget(repository: string): GithubSyncTarget; export declare function normalizeGithubRemoteRepository(value: string): string; export declare function assertGithubSyncTarget(value: unknown): asserts value is GithubSyncTarget; /** Builds the only allowed gh invocation. Repository and cursor are JSON stdin, never argv or path data. */ export declare function buildGithubGraphqlRequest(options: { readonly target: GithubSyncTarget; readonly stream: GithubSyncStream; readonly cursor: string | null; readonly cwd: string; readonly env?: NodeJS.ProcessEnv; }): ProcessRequest; export declare function fetchGithubObservationPage(options: { readonly target: GithubSyncTarget; readonly stream: GithubSyncStream; readonly cursor: string | null; readonly observedAt: string; readonly cwd: string; readonly env?: NodeJS.ProcessEnv; readonly runner?: ProcessRunner; }): GithubObservationPage; export declare function parseGithubGraphqlResult(result: ProcessResult, target: GithubSyncTarget, stream: GithubSyncStream, observedAt: string): GithubObservationPage;