import { GitRemoteConfig, GitPlatform } from "../workspace/types"; /** * Detect git platform from remote URL * 从远程 URL 检测 git 平台 */ export declare function detectPlatform(url: string): GitPlatform; /** * Build authenticated remote URL using stored credential * 使用已存储凭证构建认证远程 URL */ export declare function buildAuthUrl(url: string, platform: GitPlatform, credentialId?: string, credsDir?: string): string; /** * List all git remotes in the repository * 列出仓库中所有 git 远程仓库 */ export declare function listRemotes(cwd: string): GitRemoteConfig[]; /** * Add a new git remote with platform detection * 添加新的 git 远程仓库并自动检测平台 */ export declare function addRemote(cwd: string, name: string, url: string, credentialId?: string, credsDir?: string): GitRemoteConfig; /** * Push to a specific remote * 推送到指定远程仓库 */ export declare function pushToRemote(cwd: string, remote: string, branch: string, options?: { force?: boolean; setUpstream?: boolean; credentialId?: string; credsDir?: string; }): string; /** * Push to multiple remotes simultaneously * 同时推送到多个远程仓库 */ export declare function pushToAllRemotes(cwd: string, branch: string): Array<{ remote: string; success: boolean; output: string; }>; /** * Get the current branch name * 获取当前分支名 */ export declare function getCurrentBranch(cwd: string): string; /** * Check if directory is a git repository * 检查目录是否为 git 仓库 */ export declare function isGitRepo(cwd: string): boolean;