import { type IncomingHttpHeaders, type IncomingMessage, type ServerResponse } from "node:http"; import type { ProjectCreator } from "../protocol/index.js"; export interface GitAuthentication { environment: Readonly>; loopbackPort: number; } export interface GitCommandAuthentication extends GitAuthentication { activate(): GitCommandAuthenticationLease; } export interface GitCommandAuthenticationLease extends GitAuthentication { release(): void; } export interface RegisterGitCredential { creator: ProjectCreator; projectId: string; repository: string; token: string; } export declare function redactGitAuthenticationText(text: string, environment: Readonly): string; export interface ForwardGitRequest { headers: IncomingHttpHeaders; method: "GET" | "POST"; path: string; repository: string; request: IncomingMessage; response: ServerResponse; token: string; } export declare class GitCredentialBroker { #private; constructor(options?: { forward?: (request: ForwardGitRequest) => Promise; }); register(input: RegisterGitCredential): Promise; authentication(projectId: string, creator: ProjectCreator): GitCommandAuthentication | undefined; daemonAuthentication(projectId: string, creator: ProjectCreator): GitAuthentication | undefined; revoke(projectId: string): void; close(): void; }