import type { Settings } from "../config/settings.js"; import { type PrDiffPayload } from "./gh-pr-diff.js"; import type { ViewLookupResult } from "./gh-view.js"; /** * GitLab project refs are `//` (host lowercased). * glab's `-R` accepts a full URL, which disambiguates nested groups and * self-managed hosts. */ export declare function formatGitlabProjectArg(project: string): string; /** One namespace or project path segment of a GitLab project ref. */ export declare const GITLAB_PATH_SEGMENT_PATTERN: RegExp; /** A GitLab host with optional port; rejects userinfo, paths, and control characters. */ export declare const GITLAB_HOST_PATTERN: RegExp; /** Parse a GitLab project web URL into a `//` ref. */ export declare function parseGitlabProjectWebUrl(webUrl: string): string | undefined; /** `glab repo view` for `cwd`, memoized per absolute cwd. */ export declare function resolveDefaultGitlabProjectMemoized(cwd: string, signal?: AbortSignal): Promise; export declare function resetDefaultGitlabProjectMemoForTests(): void; export declare function fetchMrDiffFresh(cwd: string, project: string, iid: number, signal: AbortSignal | undefined): Promise<{ rendered: string; sourceUrl: string | undefined; payload: PrDiffPayload; }>; export interface MrDiffLookupOptions { cwd: string; /** `//`. */ project: string; iid: number; signal?: AbortSignal; settings?: Settings; /** `null` bypasses the cache; `undefined` derives the key from glab credentials. */ cacheAuthKey?: string | null; } /** * Cache-aware MR diff fetcher; one `mr-diff` cache row backs the listing, * full-diff, and per-file slice variants of `mr://…/diff`. */ export declare function getOrFetchMrDiff(options: MrDiffLookupOptions): Promise>;