/**
 * Repo Connect — post-scaffold project setup helpers
 *
 * Handles parsing GitHub repo inputs (org/repo shorthand, HTTPS URLs, SSH URLs),
 * prompting for project setup choice, and cloning repos into workspace.
 */
import type { SupportedLanguage } from '../../../core/i18n/types.js';
export type ProjectSetupChoice = 'clone-repos' | 'add-later';
export interface ParsedRepo {
    org: string;
    name: string;
    cloneUrl: string;
}
export interface RepoConnectResult {
    repos: Array<{
        org: string;
        name: string;
        path: string;
        success: boolean;
        error?: string;
    }>;
    totalCloned: number;
    totalFailed: number;
}
/**
 * Parse user input into structured repo descriptors.
 *
 * Accepts space/comma/newline-separated tokens:
 * - `org/repo` shorthand
 * - `https://github.com/org/repo[.git]`
 * - `git@github.com:org/repo[.git]`
 */
export declare function parseRepoInput(rawInput: string): ParsedRepo[];
export type RepoInputErrorType = 'org-only' | 'invalid-chars' | 'malformed-url' | 'empty';
export interface RepoInputError {
    token: string;
    type: RepoInputErrorType;
    message: string;
    suggestion?: string;
}
export interface RepoInputValidation {
    repos: ParsedRepo[];
    errors: RepoInputError[];
}
/**
 * Validate + parse with error reporting.
 *
 * Returns both successfully parsed repos AND typed errors for invalid tokens.
 * Existing `parseRepoInput()` is unchanged for backward compatibility.
 */
export declare function validateAndParseRepoInput(rawInput: string): RepoInputValidation;
/**
 * Format validation errors for console display.
 */
export declare function formatRepoInputErrors(errors: RepoInputError[]): string;
/**
 * Prompt user for how they want to set up their code.
 */
export declare function promptProjectSetup(language: SupportedLanguage): Promise<ProjectSetupChoice>;
/**
 * Prompt for repo URLs and return parsed repos.
 */
export declare function promptRepoUrls(language: SupportedLanguage): Promise<ParsedRepo[]>;
export interface RepoUrlsLoopResult {
    foregroundResults: RepoConnectResult[];
    jobIds: string[];
}
/**
 * Prompt for repo URLs with pattern support and an add-more loop.
 *
 * Accepts individual repos (org/repo, URLs, SSH) and glob patterns (org/*, org/prefix-*).
 * Individual repos (≤3) clone in foreground; bulk patterns launch background jobs.
 * After each batch, asks "Do you want to add more?" to support multi-org workflows.
 */
export declare function promptRepoUrlsLoop(projectPath: string, language: SupportedLanguage): Promise<RepoUrlsLoopResult>;
/** Threshold: repos at or below this count clone foreground (blocking); above clone as background job */
export declare const FOREGROUND_CLONE_THRESHOLD = 3;
/**
 * Map ParsedRepo[] to the format expected by launchCloneJob().
 */
export declare function mapParsedReposToCloneOptions(repos: ParsedRepo[]): Array<{
    owner: string;
    name: string;
    path: string;
    cloneUrl: string;
}>;
/**
 * Clone repos foreground (blocking) with inline progress.
 * Used for small batches (≤ FOREGROUND_CLONE_THRESHOLD) during init.
 * For larger batches, use launchCloneJob() in background mode.
 */
export declare function runForegroundClone(projectPath: string, repos: Array<{
    owner: string;
    name: string;
    path: string;
    cloneUrl: string;
}>): Promise<RepoConnectResult>;
/**
 * Clone repos into `repositories/{org}/{name}/` under the target directory.
 * @deprecated Use launchCloneJob() with mapParsedReposToCloneOptions() instead
 */
export declare function cloneReposIntoWorkspace(targetDir: string, repos: ParsedRepo[]): RepoConnectResult;
//# sourceMappingURL=repo-connect.d.ts.map