import type { ApiClient } from './api-client'; import type { ProjectConfigResponse } from './types'; export interface GitCredentialResult { env: Record; cleanup: () => void; } /** * リポジトリURLからホスト名を抽出する * SSH: git@gitlab.com:org/repo.git → gitlab.com * HTTPS: https://github.com/org/repo.git → github.com */ export declare function extractHostFromUrl(url: string): string; /** * リポジトリURLからパスを抽出する(credential helper のマッチング用) * SSH: git@gitlab.com:org/repo.git → org/repo.git * HTTPS: https://github.com/org/repo.git → org/repo.git */ export declare function extractPathFromUrl(url: string): string; /** * SSHラッパースクリプトを生成する * ホスト名に応じて適切なSSH鍵を選択する */ export declare function buildSshWrapperScript(entries: { host: string; keyPath: string; knownHostsPath: string | undefined; }[], fallbackKnownHostsPath: string | undefined): string; /** * Git credential helper スクリプトを生成する * stdin から protocol/host/path を読み取り、一致するリポジトリのトークンを返す */ export declare function buildCredentialHelperScript(entries: { host: string; pathPrefix: string; token: string; }[]): string; /** * プロジェクトのリポジトリ認証情報をセットアップし、 * Claude Code サブプロセスに渡す環境変数とクリーンアップ関数を返す */ export declare function buildGitCredentialEnv(client: ApiClient, repositories: NonNullable): Promise; //# sourceMappingURL=git-credential-setup.d.ts.map