/**
 * Subagent download flow module
 *
 * Provides a flow for downloading subagent packages from the Nori registry.
 * This flow handles:
 * - Intro message
 * - Spinner while searching registries
 * - Version comparison and already-current detection
 * - Version list display
 * - Spinner while downloading
 * - Success note with install location and skillset update status
 * - Outro message
 */
/**
 * Result from the search callback
 */
export type SubagentSearchResult = {
    status: "ready";
    targetVersion: string;
    isUpdate: boolean;
    currentVersion?: string | null;
} | {
    status: "already-current";
    version: string;
} | {
    status: "list-versions";
    formattedVersionList: string;
    versionCount: number;
} | {
    status: "error";
    error: string;
    hint?: string | null;
};
/**
 * Result from the download callback
 */
export type SubagentDownloadActionResult = {
    success: true;
    version: string;
    isUpdate: boolean;
    installedTo: string;
    subagentDisplayName: string;
    profileUpdateMessage?: string | null;
    warnings: Array<string>;
} | {
    success: false;
    error: string;
};
/**
 * Callbacks for the subagent download flow
 */
export type SubagentDownloadFlowCallbacks = {
    onSearch: () => Promise<SubagentSearchResult>;
    onDownload: () => Promise<SubagentDownloadActionResult>;
};
/**
 * Result of the subagent download flow
 */
export type SubagentDownloadFlowResult = {
    version: string;
    isUpdate: boolean;
    statusMessage: string;
};
/**
 * Execute the subagent download flow
 *
 * This function handles the complete subagent download UX:
 * 1. Shows spinner while searching registries
 * 2. Handles search outcomes (error, already-current, list-versions, ready)
 * 3. Shows spinner while downloading
 * 4. Displays success note with install location and skillset status
 *
 * @param args - Flow configuration
 * @param args.subagentDisplayName - Display name of the subagent being downloaded
 * @param args.callbacks - Callback functions for searching and downloading
 * @param args.nonInteractive - If true, skip interactive prompts and use defaults
 *
 * @returns Download result on success, null on failure
 */
export declare const subagentDownloadFlow: (args: {
    subagentDisplayName: string;
    nonInteractive?: boolean | null;
    callbacks: SubagentDownloadFlowCallbacks;
}) => Promise<SubagentDownloadFlowResult | null>;
//# sourceMappingURL=subagentDownload.d.ts.map