/**
 * /delegate Command - Automated PR Creation (GitHub Copilot CLI inspired)
 *
 * Delegates a task to run in the background:
 * 1. Creates a new branch from current HEAD
 * 2. Commits any unstaged changes
 * 3. Creates a draft PR
 * 4. Agent works on the task
 * 5. Requests review when done
 *
 * Usage: /delegate Fix all TypeScript errors
 */
/**
 * Configuration for a delegation task.
 */
export interface DelegateConfig {
    /** Description of the task to perform. */
    task: string;
    /** Base branch to target (defaults to current branch). */
    baseBranch?: string;
    /** Whether to create a draft PR (default: true). */
    draft?: boolean;
    /** List of GitHub usernames to request review from. */
    reviewers?: string[];
    /** Labels to apply to the PR. */
    labels?: string[];
    /** Whether to enable auto-merge (if supported). */
    autoMerge?: boolean;
}
/**
 * Result of a delegation operation.
 */
export interface DelegateResult {
    /** Whether the delegation started successfully. */
    success: boolean;
    /** The name of the created branch. */
    branchName?: string;
    /** The URL of the created Pull Request. */
    prUrl?: string;
    /** The number of the created Pull Request. */
    prNumber?: number;
    /** Error message if failed. */
    error?: string;
}
/**
 * Generates a unique branch name based on the task description.
 * Format: grok/<slugged-task>-<random-hash>
 *
 * @param task - The task description.
 * @returns The generated branch name.
 */
export declare function generateBranchName(task: string): string;
/**
 * Checks if the current directory is inside a git repository.
 *
 * @returns True if in a git repo.
 */
export declare function isGitRepo(): Promise<boolean>;
/**
 * Gets the name of the current git branch.
 *
 * @returns The current branch name.
 */
export declare function getCurrentBranch(): Promise<string>;
/**
 * Checks if there are any uncommitted changes (staged or unstaged).
 *
 * @returns True if changes exist.
 */
export declare function hasUncommittedChanges(): Promise<boolean>;
/**
 * Creates a new git branch.
 *
 * @param branchName - Name of the new branch.
 */
export declare function createBranch(branchName: string): Promise<void>;
/**
 * Commits all changes (staged and unstaged) with a message.
 *
 * @param message - The commit message.
 */
export declare function commitChanges(message: string): Promise<void>;
/**
 * Pushes the specified branch to the remote origin.
 *
 * @param branchName - The branch to push.
 */
export declare function pushBranch(branchName: string): Promise<void>;
/**
 * Checks if the GitHub CLI (gh) is installed and available.
 *
 * @returns True if gh is available.
 */
export declare function hasGhCli(): Promise<boolean>;
/**
 * Creates a Pull Request using the GitHub CLI.
 *
 * @param title - PR title.
 * @param body - PR description.
 * @param baseBranch - Base branch to merge into.
 * @param draft - Whether to create as draft.
 * @param labels - Labels to apply.
 * @param reviewers - Reviewers to request.
 * @returns Object containing PR URL and number.
 */
export declare function createPullRequest(title: string, body: string, baseBranch: string, draft?: boolean, labels?: string[], reviewers?: string[]): Promise<{
    url: string;
    number: number;
}>;
/**
 * Adds a comment to an existing Pull Request.
 *
 * @param prNumber - The PR number.
 * @param comment - The comment text.
 */
export declare function addPRComment(prNumber: number, comment: string): Promise<void>;
/**
 * Requests review from specified users on a Pull Request.
 *
 * @param prNumber - The PR number.
 * @param reviewers - Array of GitHub usernames.
 */
export declare function requestReview(prNumber: number, reviewers: string[]): Promise<void>;
/**
 * Marks a Pull Request as ready for review (removes draft status).
 *
 * @param prNumber - The PR number.
 */
export declare function markReady(prNumber: number): Promise<void>;
/**
 * Main entry point for delegating a task.
 * Orchestrates branch creation, committing, pushing, and PR creation.
 *
 * @param config - Delegation configuration.
 * @returns Result of the delegation process.
 */
export declare function delegate(config: DelegateConfig): Promise<DelegateResult>;
/**
 * Completes a delegation task.
 * Marks the PR as ready and requests review.
 *
 * @param prNumber - The PR number.
 * @param summary - Summary of work completed.
 * @param reviewers - Optional list of reviewers to request.
 */
export declare function completeDelegate(prNumber: number, summary: string, reviewers?: string[]): Promise<void>;
/**
 * Aborts a delegation task.
 * Adds a comment explaining why, closes the PR, and deletes the branch.
 *
 * @param prNumber - The PR number.
 * @param reason - Reason for abortion.
 */
export declare function abortDelegate(prNumber: number, reason: string): Promise<void>;
