/** GitHub endpoints derived from an optional Enterprise base URI, with no trailing slashes. */ export interface IGitHubEndpoints { /** REST API base (e.g. `https://api.github.com`). */ readonly apiBaseUri: string; /** Raw-content base when known. */ readonly rawBaseUri?: string; /** GraphQL endpoint (distinct from `apiBaseUri` for on-prem: `/api/graphql`, not `/api/v3/graphql`). */ readonly graphQlUri: string; /** OAuth authorization server URI. */ readonly oauthServer: string; /** The configured GitHub Enterprise authority (e.g. `acme.ghe.com`), or `undefined` for github.com. */ readonly enterpriseHost: string | undefined; } /** * The github.com Copilot API host, distinct from `api.github.com`. * Enterprise overrides come from the Copilot token's `endpoints.api`, not the enterprise URI. */ export declare const GITHUB_DOT_COM_COPILOT_API_BASE_URI = "https://api.githubcopilot.com"; /** * Derives GitHub endpoints from an optional enterprise URI, matching the github-authentication extension. * Invalid or github.com URIs use the github.com defaults. */ export declare function deriveGitHubEndpoints(enterpriseUri: string | undefined): IGitHubEndpoints; /** * Derives the official GitHub MCP server URL from the per-user Copilot API * endpoint returned by `/copilot_internal/user`. */ export declare function gitHubMcpServerUrl(copilotApiBaseUri: string | undefined): string | undefined; /** Normalizes a trusted HTTPS API base without permitting URL credentials, queries, or fragments. */ export declare function normalizeReadApiBaseUri(apiBaseUri: string): string; /** Resolves an API-relative read path and rejects URLs that escape the configured GitHub API endpoint. */ export declare function resolveReadApiUrl(apiBaseUri: string, path: string): { url: URL; apiBasePath: string; }; /** Confines public raw downloads and redirects to one repository and immutable commit. */ export declare function resolveRawContentUrl(rawBaseUri: string, path: string): { url: URL; basePath: string; };