/** * Post-upload local state sync * * After a successful skillset upload, the local tree must be brought in line * with what the registry now holds: the skillset nori.json version and * registryURL, extracted skill/subagent versions (in `dependencies` and in * each package's own nori.json), local SKILL.md/SUBAGENT.md content for * packages the user linked against changed remote content, and the * `.nori-version` provenance file. * * Only SKILL.md is overwritten for linked skills because conflict detection * (and the diff UI) operate at SKILL.md granularity — sibling files in the * skill dir are not part of the user's "discard local changes" choice. The * same rule applies to subagents via SUBAGENT.md. * * This module contains no prompting and no process control. Non-fatal * problems are returned as warnings for the caller to surface. It must never * import from `src/cli/`. */ import type { ExtractedSkillsSummary, ExtractedSubagentsSummary } from "../api/registrar.js"; /** * Sync local state after a successful upload. * * Updates the local nori.json version and registryURL, writes a .nori-version * file, updates extracted skill versions in their nori.json files and in * the skillset's dependencies, and overwrites local SKILL.md/SUBAGENT.md * files for any skills/subagents the user resolved with "Use Existing" * against changed remote content (so the next upload doesn't re-detect the * same conflict). * * @param args - The function arguments * @param args.skillsetDir - The local skillset directory * @param args.uploadedVersion - The version that was uploaded * @param args.registryUrl - The registry URL * @param args.extractedSkills - Optional extracted skills info from the response * @param args.linkedSkillVersions - Optional map of linked skill IDs to their remote versions * @param args.extractedSubagents - Optional extracted subagents info from the response * @param args.linkedSubagentVersions - Optional map of linked subagent IDs to their remote versions * @param args.linkedSkillsToReplace - Optional map of linked skill IDs to the remote SKILL.md bytes the user agreed to use; sync overwrites the local file with this content * @param args.linkedSubagentsToReplace - Optional map of linked subagent IDs to the remote SUBAGENT.md bytes the user agreed to use * * @returns Non-fatal warnings for the caller to surface to the user */ export declare const syncLocalStateAfterUpload: (args: { skillsetDir: string; uploadedVersion: string; registryUrl: string; extractedSkills?: ExtractedSkillsSummary | null; extractedSubagents?: ExtractedSubagentsSummary | null; linkedSkillVersions?: Map | null; linkedSubagentVersions?: Map | null; linkedSkillsToReplace?: Map | null; linkedSubagentsToReplace?: Map | null; }) => Promise<{ warnings: Array; }>; //# sourceMappingURL=uploadSync.d.ts.map