export interface GhRepoInfo { name: string; fullName: string; url: string; sshUrl: string; isPrivate: boolean; exists: boolean; } export interface GhCreateResult { success: boolean; repo: GhRepoInfo | null; error: string | null; alreadyExists: boolean; } /** * Get current authenticated GitHub username. * Returns null if not authenticated or gh not installed. */ export declare function getGhUsername(): Promise; /** * Get git operations protocol preference (https or ssh). * Parses `gh auth status` output. Defaults to 'https'. */ export declare function getGhProtocol(): Promise<'https' | 'ssh'>; /** * Check if a repo exists under the authenticated user. * Returns GhRepoInfo if exists, null otherwise. */ export declare function checkRepoExists(repoName: string): Promise; /** * Create a private repo under the authenticated user. */ export declare function createPrivateRepo(repoName: string): Promise; /** * Find existing aigentry-brain-profile repo by searching the user's repo list. * Returns the first match or null. */ export declare function findExistingProfileRepo(): Promise; /** * Get the clone URL for a repo based on the user's protocol preference. */ export declare function getCloneUrl(repoName: string): Promise; /** * Run `gh auth setup-git` to configure the git credential helper. * Returns true on success, false otherwise. */ export declare function setupGitCredentials(): Promise; /** * Try to find profile repo URL without gh CLI using git credential manager. * Returns the HTTPS clone URL and username if accessible, null otherwise. */ export declare function findProfileRepoViaGit(repoName: string): Promise<{ url: string; username: string; } | null>;