/** * 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 { SkillResolutionStrategy, SkillResolutionAction, ExtractedSkillsSummary, SubagentResolutionStrategy, ExtractedSubagentsSummary } from "../../../api/registrar.js"; import type { UploadResult } from "../../../core/uploadPolicy.js"; /** * Result of the version determination callback */ export type DetermineVersionResult = { version: string; isNewPackage: boolean; }; /** * Callbacks for the upload flow */ export type UploadFlowCallbacks = { onDetermineVersion: () => Promise; onUpload: (args: { resolutionStrategy?: SkillResolutionStrategy | null; subagentResolutionStrategy?: SubagentResolutionStrategy | null; inlineSkillIds?: Array | null; inlineSubagentIds?: Array | null; }) => Promise; onReadLocalSkillMd?: ((args: { skillId: string; }) => Promise) | null; onReadLocalSubagentMd?: ((args: { subagentId: string; }) => Promise) | null; }; /** * Result of the upload flow */ export type UploadFlowResult = { version: string; extractedSkills?: ExtractedSkillsSummary | null; extractedSubagents?: ExtractedSubagentsSummary | null; linkedSkillVersions: Map; linkedSubagentVersions: Map; /** * 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; /** Same as linkedSkillsToReplace, for subagents (SUBAGENT.md). */ linkedSubagentsToReplace: Map; namespacedSkillIds: Set; inlineSkillIds?: Array | 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 | null; inlineSubagentCandidates?: Array | null; }) => Promise; //# sourceMappingURL=upload.d.ts.map