import { ShepherdError } from "../exit-codes.mts"; import type { RateLimitInfo } from "./http.mts"; export interface GitHubGraphQlError { message: string; path?: unknown; /** GitHub's GraphQL `type` field — `INTERNAL` on engine crashes. */ type?: string; /** GraphQL `extensions`; GitHub often sets `{ code: "INTERNAL" }`. */ extensions?: unknown; } /** GitHub GraphQL engine crash: HTTP 200, `data: null`, INTERNAL type/code or message. */ export declare function isRetryableGraphQlInternal(graphqlErrors?: GitHubGraphQlError[]): boolean; export declare class GitHubRequestError extends ShepherdError { readonly status: number; readonly rateLimit?: RateLimitInfo; readonly retryAfterSeconds?: number; readonly graphqlErrors?: GitHubGraphQlError[]; readonly authSource?: string; constructor(message: string, opts: { status: number; rateLimit?: RateLimitInfo; retryAfterSeconds?: number; graphqlErrors?: GitHubGraphQlError[]; authSource?: string; /** * Bypasses status-based classification entirely — for callers that already * know the failure kind better than the HTTP status can express (e.g. a * response that failed to parse at all, which is an internal failure, not * an availability or permission problem). */ exitCodeOverride?: number; }); }