/**
 * Upload flow module
 *
 * Provides the complete interactive upload experience using @clack/prompts.
 * This flow handles:
 * - Spinner during version determination
 * - Skill conflict resolution prompts
 * - Spinner during upload
 * - Note display for upload summary
 */
import type { SkillConflict, SkillResolutionStrategy, SkillResolutionAction, ExtractedSkillsSummary, SubagentConflict, SubagentResolutionStrategy, ExtractedSubagentsSummary } from "../../../api/registrar.js";
/**
 * Result of the version determination callback
 */
export type DetermineVersionResult = {
    version: string;
    isNewPackage: boolean;
};
/**
 * Result of the upload callback
 */
export type UploadResult = {
    success: true;
    version: string;
    extractedSkills?: ExtractedSkillsSummary | null;
    extractedSubagents?: ExtractedSubagentsSummary | null;
} | {
    success: false;
    error: string;
} | {
    success: false;
    conflicts: Array<SkillConflict>;
} | {
    success: false;
    subagentConflicts: Array<SubagentConflict>;
};
/**
 * Callbacks for the upload flow
 */
export type UploadFlowCallbacks = {
    onDetermineVersion: () => Promise<DetermineVersionResult>;
    onUpload: (args: {
        resolutionStrategy?: SkillResolutionStrategy | null;
        subagentResolutionStrategy?: SubagentResolutionStrategy | null;
        inlineSkillIds?: Array<string> | null;
        inlineSubagentIds?: Array<string> | null;
    }) => Promise<UploadResult>;
    onReadLocalSkillMd?: ((args: {
        skillId: string;
    }) => Promise<string | null>) | null;
    onReadLocalSubagentMd?: ((args: {
        subagentId: string;
    }) => Promise<string | null>) | null;
};
/**
 * Result of the upload flow
 */
export type UploadFlowResult = {
    version: string;
    extractedSkills?: ExtractedSkillsSummary | null;
    extractedSubagents?: ExtractedSubagentsSummary | null;
    linkedSkillVersions: Map<string, string>;
    linkedSubagentVersions: Map<string, string>;
    /**
     * For linked skills whose local SKILL.md diverged from the registry's
     * version, the canonical SKILL.md content the user agreed to "use existing"
     * for. The sync layer overwrites the local file with this content so the
     * next upload doesn't re-detect the same conflict.
     */
    linkedSkillsToReplace: Map<string, string>;
    /** Same as linkedSkillsToReplace, for subagents (SUBAGENT.md). */
    linkedSubagentsToReplace: Map<string, string>;
    namespacedSkillIds: Set<string>;
    inlineSkillIds?: Array<string> | null;
    statusMessage: string;
} | null;
/**
 * Execute the interactive upload flow
 *
 * This function handles the complete upload UX:
 * 1. Shows spinner while determining version
 * 2. Attempts upload
 * 3. If conflicts detected, auto-resolves where possible and prompts for rest
 * 4. Shows upload summary in a note
 *
 * @param args - Flow configuration
 * @param args.profileDisplayName - Display name for the skillset (e.g., "dev/onboarding")
 * @param args.skillsetName - The package name (e.g., "onboarding")
 * @param args.registryUrl - The target registry URL
 * @param args.callbacks - Callback functions for version determination and upload
 * @param args.nonInteractive - If true, don't prompt for conflict resolution
 * @param args.resolve - Resolution strategy to apply to unresolved conflicts in non-interactive mode
 * @param args.inlineCandidates - Skill IDs without nori.json that need inline/extract decision
 * @param args.inlineSubagentCandidates - Subagent IDs without nori.json that need inline/extract decision
 *
 * @returns Upload result on success, null on failure or cancellation
 */
export declare const uploadFlow: (args: {
    profileDisplayName: string;
    skillsetName: string;
    registryUrl: string;
    callbacks: UploadFlowCallbacks;
    nonInteractive?: boolean | null;
    resolve?: SkillResolutionAction | null;
    inlineCandidates?: Array<string> | null;
    inlineSubagentCandidates?: Array<string> | null;
}) => Promise<UploadFlowResult>;
//# sourceMappingURL=upload.d.ts.map