agents-inc 0.154.0 → 0.156.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/chunk-2H7UWE2G.js +246 -0
- package/dist/chunk-2H7UWE2G.js.map +1 -0
- package/dist/{chunk-LA3JPESW.js → chunk-4A4L3YIW.js} +5 -5
- package/dist/chunk-4G2YHZIM.js +132 -0
- package/dist/chunk-4G2YHZIM.js.map +1 -0
- package/dist/{chunk-BZ4CZBOM.js → chunk-5F2YR5XV.js} +3 -3
- package/dist/{chunk-CHNA5RVS.js → chunk-5OKLCVM4.js} +3 -3
- package/dist/{chunk-ZU6DAR4S.js → chunk-5QZAK6J7.js} +7 -7
- package/dist/{chunk-ZU6DAR4S.js.map → chunk-5QZAK6J7.js.map} +1 -1
- package/dist/{chunk-NFH6SA62.js → chunk-6RLV45HN.js} +10 -10
- package/dist/{chunk-NFH6SA62.js.map → chunk-6RLV45HN.js.map} +1 -1
- package/dist/{chunk-GUDGCFSF.js → chunk-CLFHC2DK.js} +15 -106
- package/dist/chunk-CLFHC2DK.js.map +1 -0
- package/dist/chunk-D2CAV7MG.js +61 -0
- package/dist/chunk-D2CAV7MG.js.map +1 -0
- package/dist/{chunk-UW44KSYL.js → chunk-F2AMBBIA.js} +6 -6
- package/dist/{chunk-UW44KSYL.js.map → chunk-F2AMBBIA.js.map} +1 -1
- package/dist/{chunk-QQTYMW7N.js → chunk-F5T6TV4Z.js} +206 -73
- package/dist/chunk-F5T6TV4Z.js.map +1 -0
- package/dist/{chunk-K3O3YQYG.js → chunk-G47TDUK3.js} +2 -2
- package/dist/{chunk-AURY6RT6.js → chunk-GS2NZ3GD.js} +8 -8
- package/dist/chunk-GS2NZ3GD.js.map +1 -0
- package/dist/{chunk-5MFJ24VM.js → chunk-H6UTKTLK.js} +104 -250
- package/dist/chunk-H6UTKTLK.js.map +1 -0
- package/dist/{chunk-MJFIO5SX.js → chunk-HG4JPXJT.js} +11 -11
- package/dist/chunk-HG4JPXJT.js.map +1 -0
- package/dist/{chunk-IXEDSKMH.js → chunk-HTYH7CKN.js} +3 -3
- package/dist/{chunk-JC7DBPRD.js → chunk-HXKOIWLU.js} +2 -2
- package/dist/chunk-HXKOIWLU.js.map +1 -0
- package/dist/{chunk-NSJ2S7R5.js → chunk-ILUVL7WM.js} +2 -2
- package/dist/{chunk-R54KIGN2.js → chunk-IO5YBKHV.js} +13 -2
- package/dist/chunk-IO5YBKHV.js.map +1 -0
- package/dist/chunk-IXRZAHZF.js +53 -0
- package/dist/chunk-IXRZAHZF.js.map +1 -0
- package/dist/chunk-JCPANDNR.js +35 -0
- package/dist/chunk-JCPANDNR.js.map +1 -0
- package/dist/{chunk-NKCY2ULI.js → chunk-LJCNUP6M.js} +2 -2
- package/dist/{chunk-PRJD5MMQ.js → chunk-MHRC3KRX.js} +5 -5
- package/dist/chunk-MHRC3KRX.js.map +1 -0
- package/dist/chunk-MO5FGLVS.js +142 -0
- package/dist/chunk-MO5FGLVS.js.map +1 -0
- package/dist/{chunk-Q5FLW4JG.js → chunk-OKH64JZE.js} +2 -2
- package/dist/{chunk-WRRP47PY.js → chunk-PCC4LBKB.js} +2 -2
- package/dist/chunk-PMUABBPG.js +258 -0
- package/dist/chunk-PMUABBPG.js.map +1 -0
- package/dist/{chunk-2IMYK4WN.js → chunk-PNMM5HNX.js} +5 -5
- package/dist/{chunk-AKQ5QISO.js → chunk-QWVXOCXO.js} +6 -6
- package/dist/{chunk-IPJOMAWC.js → chunk-RWOYPOMR.js} +12 -2
- package/dist/{chunk-IPJOMAWC.js.map → chunk-RWOYPOMR.js.map} +1 -1
- package/dist/{chunk-ONWEOS77.js → chunk-SY4X2LND.js} +4 -4
- package/dist/{chunk-XGMOXMS4.js → chunk-TBOVYLQJ.js} +2 -2
- package/dist/{chunk-R7JV22QK.js → chunk-TNGMF4UX.js} +20 -20
- package/dist/{chunk-R7JV22QK.js.map → chunk-TNGMF4UX.js.map} +1 -1
- package/dist/{chunk-7VZV4O6B.js → chunk-UMH2YZKG.js} +14 -5
- package/dist/chunk-UMH2YZKG.js.map +1 -0
- package/dist/{chunk-6CNRMCFM.js → chunk-VPASBA7P.js} +2 -2
- package/dist/{chunk-CBF4ZYV3.js → chunk-WCAUUBHO.js} +1376 -741
- package/dist/chunk-WCAUUBHO.js.map +1 -0
- package/dist/{chunk-V3ENMW7G.js → chunk-WFRTHH3A.js} +3 -3
- package/dist/{chunk-DRKSYJZ2.js → chunk-WTJ3AY33.js} +1 -1
- package/dist/{chunk-DRKSYJZ2.js.map → chunk-WTJ3AY33.js.map} +1 -1
- package/dist/{chunk-XMEIVWAS.js → chunk-WUQ3MTPF.js} +11 -5
- package/dist/{chunk-XMEIVWAS.js.map → chunk-WUQ3MTPF.js.map} +1 -1
- package/dist/{chunk-4VCWL2IG.js → chunk-XAXJWXI4.js} +92 -59
- package/dist/chunk-XAXJWXI4.js.map +1 -0
- package/dist/{chunk-B66SC72V.js → chunk-Y5Y7XHVU.js} +4 -4
- package/dist/{chunk-FMYHWKGG.js → chunk-YO2LTXB4.js} +66 -16
- package/dist/chunk-YO2LTXB4.js.map +1 -0
- package/dist/{chunk-TUQF577Z.js → chunk-ZUAZHDKP.js} +40 -41
- package/dist/chunk-ZUAZHDKP.js.map +1 -0
- package/dist/commands/build/marketplace.js +98 -121
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +8 -8
- package/dist/commands/compile.js +19 -24
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.js +220 -79
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +549 -75
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +26 -21
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/init.js +41 -39
- package/dist/commands/list.js +11 -11
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/marketplace.js +243 -0
- package/dist/commands/new/marketplace.js.map +1 -0
- package/dist/commands/search.js +16 -14
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/share.js +67 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/uninstall.js +61 -74
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +9 -9
- package/dist/commands/update.js.map +1 -1
- package/dist/components/common/prompt-confirm.js +1 -1
- package/dist/components/common/removal-plan-confirm.js +10 -0
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/wizard/category-grid.js +5 -5
- package/dist/components/wizard/checkbox-grid.js +5 -5
- package/dist/components/wizard/domain-selection.js +11 -11
- package/dist/components/wizard/run-wizard-session.js +29 -28
- package/dist/components/wizard/scroll-affordance.js +2 -2
- package/dist/components/wizard/skill-agent-summary.js +6 -6
- package/dist/components/wizard/source-grid.js +6 -6
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +10 -11
- package/dist/components/wizard/step-build.js +9 -9
- package/dist/components/wizard/step-confirm.js +10 -10
- package/dist/components/wizard/step-sources.js +10 -10
- package/dist/components/wizard/step-stack.js +9 -9
- package/dist/components/wizard/summary-panel.js +9 -9
- package/dist/components/wizard/toast.js +2 -2
- package/dist/components/wizard/wizard-layout.js +14 -14
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard.js +27 -27
- package/dist/copy-local-skills-NSUTBVLJ.js +14 -0
- package/dist/hooks/init.js +42 -62
- package/dist/hooks/init.js.map +1 -1
- package/dist/load-agent-defs-X4E57I2U.js +15 -0
- package/dist/{loader-JIZDTR4G.js → loader-G6BFG2VA.js} +3 -3
- package/dist/recompile-project-agents-JE4MM72I.js +20 -0
- package/dist/{source-loader-OE6EJFPU.js → source-loader-3DL3NYUX.js} +7 -5
- package/dist/source-loader-3DL3NYUX.js.map +1 -0
- package/dist/src/agents/developer/ai-developer/critical-reminders.md +1 -1
- package/dist/src/agents/developer/ai-developer/critical-requirements.md +1 -1
- package/dist/src/agents/developer/ai-developer/identity.md +1 -1
- package/dist/src/agents/developer/ai-developer/playbook.md +1 -1
- package/dist/src/agents/developer/api-developer/identity.md +1 -1
- package/dist/src/agents/developer/cli-developer/identity.md +1 -1
- package/dist/src/agents/developer/web-developer/identity.md +1 -1
- package/dist/src/agents/meta/codex-keeper/identity.md +1 -1
- package/dist/src/agents/meta/convention-keeper/identity.md +1 -1
- package/dist/src/agents/meta/skill-summoner/identity.md +1 -1
- package/dist/src/agents/researcher/ai-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/api-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/cli-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/web-researcher/identity.md +1 -1
- package/dist/src/agents/reviewer/reviewer/playbook.md +1 -1
- package/dist/src/agents/tester/ai-tester/identity.md +1 -1
- package/dist/src/agents/tester/api-tester/critical-reminders.md +1 -1
- package/dist/src/agents/tester/api-tester/critical-requirements.md +1 -1
- package/dist/src/agents/tester/api-tester/identity.md +2 -2
- package/dist/src/agents/tester/cli-tester/identity.md +1 -1
- package/dist/src/agents/tester/web-tester/identity.md +3 -3
- package/dist/stores/wizard-store.js +7 -5
- package/package.json +10 -7
- package/src/agents/developer/ai-developer/critical-reminders.md +1 -1
- package/src/agents/developer/ai-developer/critical-requirements.md +1 -1
- package/src/agents/developer/ai-developer/identity.md +1 -1
- package/src/agents/developer/ai-developer/playbook.md +1 -1
- package/src/agents/developer/api-developer/identity.md +1 -1
- package/src/agents/developer/cli-developer/identity.md +1 -1
- package/src/agents/developer/web-developer/identity.md +1 -1
- package/src/agents/meta/codex-keeper/identity.md +1 -1
- package/src/agents/meta/convention-keeper/identity.md +1 -1
- package/src/agents/meta/skill-summoner/identity.md +1 -1
- package/src/agents/researcher/ai-researcher/identity.md +1 -1
- package/src/agents/researcher/api-researcher/identity.md +1 -1
- package/src/agents/researcher/cli-researcher/identity.md +1 -1
- package/src/agents/researcher/web-researcher/identity.md +1 -1
- package/src/agents/reviewer/reviewer/playbook.md +1 -1
- package/src/agents/tester/ai-tester/identity.md +1 -1
- package/src/agents/tester/api-tester/critical-reminders.md +1 -1
- package/src/agents/tester/api-tester/critical-requirements.md +1 -1
- package/src/agents/tester/api-tester/identity.md +2 -2
- package/src/agents/tester/cli-tester/identity.md +1 -1
- package/src/agents/tester/web-tester/identity.md +3 -3
- package/src/schemas/custom-metadata.schema.json +3 -0
- package/src/schemas/metadata.schema.json +3 -0
- package/src/schemas/project-config.schema.json +4 -8
- package/src/schemas/project-source-config.schema.json +2 -2
- package/dist/chunk-4VCWL2IG.js.map +0 -1
- package/dist/chunk-5MFJ24VM.js.map +0 -1
- package/dist/chunk-7VZV4O6B.js.map +0 -1
- package/dist/chunk-AURY6RT6.js.map +0 -1
- package/dist/chunk-CBF4ZYV3.js.map +0 -1
- package/dist/chunk-FMYHWKGG.js.map +0 -1
- package/dist/chunk-GUDGCFSF.js.map +0 -1
- package/dist/chunk-JC7DBPRD.js.map +0 -1
- package/dist/chunk-MJFIO5SX.js.map +0 -1
- package/dist/chunk-OJJLYHM3.js +0 -34
- package/dist/chunk-OJJLYHM3.js.map +0 -1
- package/dist/chunk-PRJD5MMQ.js.map +0 -1
- package/dist/chunk-QQTYMW7N.js.map +0 -1
- package/dist/chunk-QUDQTO3O.js +0 -41
- package/dist/chunk-QUDQTO3O.js.map +0 -1
- package/dist/chunk-R54KIGN2.js.map +0 -1
- package/dist/chunk-TUQF577Z.js.map +0 -1
- package/dist/copy-local-skills-WVHJFRPK.js +0 -14
- package/dist/load-agent-defs-5OT54J5M.js +0 -15
- package/dist/recompile-project-agents-VREEPBDV.js +0 -20
- /package/dist/{chunk-LA3JPESW.js.map → chunk-4A4L3YIW.js.map} +0 -0
- /package/dist/{chunk-BZ4CZBOM.js.map → chunk-5F2YR5XV.js.map} +0 -0
- /package/dist/{chunk-CHNA5RVS.js.map → chunk-5OKLCVM4.js.map} +0 -0
- /package/dist/{chunk-K3O3YQYG.js.map → chunk-G47TDUK3.js.map} +0 -0
- /package/dist/{chunk-IXEDSKMH.js.map → chunk-HTYH7CKN.js.map} +0 -0
- /package/dist/{chunk-NSJ2S7R5.js.map → chunk-ILUVL7WM.js.map} +0 -0
- /package/dist/{chunk-NKCY2ULI.js.map → chunk-LJCNUP6M.js.map} +0 -0
- /package/dist/{chunk-Q5FLW4JG.js.map → chunk-OKH64JZE.js.map} +0 -0
- /package/dist/{chunk-WRRP47PY.js.map → chunk-PCC4LBKB.js.map} +0 -0
- /package/dist/{chunk-2IMYK4WN.js.map → chunk-PNMM5HNX.js.map} +0 -0
- /package/dist/{chunk-AKQ5QISO.js.map → chunk-QWVXOCXO.js.map} +0 -0
- /package/dist/{chunk-ONWEOS77.js.map → chunk-SY4X2LND.js.map} +0 -0
- /package/dist/{chunk-XGMOXMS4.js.map → chunk-TBOVYLQJ.js.map} +0 -0
- /package/dist/{chunk-6CNRMCFM.js.map → chunk-VPASBA7P.js.map} +0 -0
- /package/dist/{chunk-V3ENMW7G.js.map → chunk-WFRTHH3A.js.map} +0 -0
- /package/dist/{chunk-B66SC72V.js.map → chunk-Y5Y7XHVU.js.map} +0 -0
- /package/dist/{copy-local-skills-WVHJFRPK.js.map → components/common/removal-plan-confirm.js.map} +0 -0
- /package/dist/{load-agent-defs-5OT54J5M.js.map → copy-local-skills-NSUTBVLJ.js.map} +0 -0
- /package/dist/{loader-JIZDTR4G.js.map → load-agent-defs-X4E57I2U.js.map} +0 -0
- /package/dist/{recompile-project-agents-VREEPBDV.js.map → loader-G6BFG2VA.js.map} +0 -0
- /package/dist/{source-loader-OE6EJFPU.js.map → recompile-project-agents-JE4MM72I.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/uninstall.tsx"],"sourcesContent":["import React from \"react\";\nimport { partition } from \"remeda\";\nimport path from \"path\";\n\nimport { Flags } from \"@oclif/core\";\nimport { Box, Text, useApp } from \"ink\";\n\nimport { BaseCommand } from \"../base-command\";\nimport { Confirm } from \"../components/common/confirm\";\nimport { promptConfirm } from \"../components/common/prompt-confirm.js\";\nimport { getErrorMessage } from \"../utils/errors\";\nimport {\n directoryExists,\n fileExists,\n listDirectories,\n remove,\n removeDirIfEmpty,\n} from \"../utils/fs\";\nimport { listAgentMdFiles } from \"../lib/agents\";\nimport { claudePluginUninstallBestEffort, isClaudeCLIAvailable } from \"../utils/exec\";\nimport {\n listPluginNames,\n getProjectPluginsDir,\n buildMarketplacePluginRef,\n parseMarketplacePluginRef,\n toClaudePluginScope,\n} from \"../lib/plugins/index\";\nimport { readForkedFromMetadata } from \"../lib/skills/index\";\nimport { isHomeDirectory, resolveInstallPaths } from \"../lib/installation/index\";\nimport { lazyGateDeps, mutateGlobal, propagateGlobalRemoval } from \"../lib/config-gate/index.js\";\nimport { loadSkillsMatrixFromSource } from \"../lib/loading\";\nimport { loadAgentDefs } from \"../lib/operations\";\nimport { ConfigLoadError, loadProjectConfigFromDir } from \"../lib/configuration/project-config\";\nimport {\n CLAUDE_DIR,\n CLAUDE_SRC_DIR,\n CLI_COLORS,\n DEFAULT_BRANDING,\n EJECT_SOURCE,\n STANDARD_FILES,\n} from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\nimport {\n SUCCESS_MESSAGES,\n INFO_MESSAGES,\n UNINSTALL_PLAN,\n compiledAgentsKept,\n compiledAgentsRemoval,\n localSkillsRemoval,\n registeredProjectsUpdated,\n registeredProjectUpdateSkipped,\n registeredProjectsUpdateFailed,\n} from \"../utils/messages\";\nimport type { AgentDefinition, AgentName, MergedSkillsMatrix, ProjectConfig } from \"../types/index\";\n\n/** A grouped section of the uninstall removal plan (header label + item lines). */\ntype RemovalPlanSection = {\n label: string;\n items: string[];\n};\n\n/**\n * One removal this run promises AND makes. Each entry carries what its remover needs\n * — paths and names, never display strings — so the preview and the removal are two\n * readings of one value rather than two derivations of the same target.\n */\ntype RemovalEntry =\n | { kind: \"plugins\"; pluginsDir: string; names: string[] }\n | { kind: \"skills\"; skillsDir: string }\n | { kind: \"agents\"; agentsDir: string; agentNames: AgentName[] }\n | { kind: \"config\"; claudeSrcDir: string; fileNames: string[] };\n\n/** The single entry of a kind, for the remover that consumes it. */\ntype PluginRemoval = Extract<RemovalEntry, { kind: \"plugins\" }>;\ntype SkillsRemoval = Extract<RemovalEntry, { kind: \"skills\" }>;\ntype AgentsRemoval = Extract<RemovalEntry, { kind: \"agents\" }>;\ntype ConfigManifestRemoval = Extract<RemovalEntry, { kind: \"config\" }>;\n\n/**\n * The uninstall removal plan: what this run removes, and what it deliberately leaves\n * behind. Built once per run — the confirm UI renders it, the executor consumes the\n * same value, so the plan cannot name a removal the run declines to make.\n */\ntype RemovalPlan = {\n entries: RemovalEntry[];\n /** Statements naming content that stays, and why — see {@link keptStatements}. */\n kept: string[];\n};\n\n/**\n * Pure builder for the uninstall removal plan — the one place that decides what this\n * run removes. Every removal downstream is driven by an entry from here, and nothing\n * downstream re-reads the target to decide whether to act.\n */\nfunction buildRemovalPlan(target: UninstallTarget): RemovalPlan {\n const agents = compiledAgentsEntry(target);\n\n return {\n entries: [\n ...pluginsEntry(target),\n ...localSkillsEntry(target),\n ...agents,\n ...configManifestEntry(target),\n ],\n kept: keptStatements(target, agents),\n };\n}\n\n/** The plan carries at least one removal — the only thing that makes this run an uninstall. */\nfunction hasAnythingToRemove(plan: RemovalPlan): boolean {\n return plan.entries.length > 0;\n}\n\nfunction pluginsEntry(target: UninstallTarget): PluginRemoval[] {\n if (!target.hasPlugins) return [];\n return [{ kind: \"plugins\", pluginsDir: target.pluginsDir, names: [...target.cliPluginNames] }];\n}\n\nfunction localSkillsEntry(target: UninstallTarget): SkillsRemoval[] {\n if (!target.hasLocalSkills) return [];\n return [{ kind: \"skills\", skillsDir: target.skillsDir }];\n}\n\n/**\n * Removal matches on-disk agent basenames against the configured agent names, so with\n * no configuration to name them there is nothing it could match and the plan carries no\n * entry — one decision, made here, rather than a predicate mirrored into the renderer.\n */\nfunction compiledAgentsEntry(target: UninstallTarget): AgentsRemoval[] {\n if (!target.hasLocalAgents) return [];\n if (target.configuredAgents.length === 0) return [];\n return [{ kind: \"agents\", agentsDir: target.agentsDir, agentNames: target.configuredAgents }];\n}\n\n/** The CLI config manifest (config.ts + config-types.ts) is always removed. */\nfunction configManifestEntry(target: UninstallTarget): ConfigManifestRemoval[] {\n const fileNames = [\n ...(target.hasClaudeSrcConfig ? [STANDARD_FILES.CONFIG_TS] : []),\n ...(target.hasClaudeSrcConfigTypes ? [STANDARD_FILES.CONFIG_TYPES_TS] : []),\n ];\n if (fileNames.length === 0) return [];\n return [{ kind: \"config\", claudeSrcDir: target.claudeSrcDir, fileNames }];\n}\n\n/**\n * The plan's kept half. Compiled agents are the one thing a run cannot promise without\n * the configuration, so when they are on disk and the plan carries no removal for them,\n * it says they stay — and why — in place of the removal it would otherwise name.\n */\nfunction keptStatements(target: UninstallTarget, agentRemovals: AgentsRemoval[]): string[] {\n if (!target.hasLocalAgents) return [];\n if (agentRemovals.length > 0) return [];\n return [compiledAgentsKept(target.agentsDir)];\n}\n\n/** The plan's entry of a kind, for the remover that consumes it. At most one exists. */\nfunction planEntry<K extends RemovalEntry[\"kind\"]>(\n plan: RemovalPlan,\n kind: K,\n): Extract<RemovalEntry, { kind: K }> | undefined {\n return plan.entries.find(\n (entry): entry is Extract<RemovalEntry, { kind: K }> => entry.kind === kind,\n );\n}\n\n/** The heading an entry prints under, and the lines it contributes beneath it. */\nfunction describeEntry(entry: RemovalEntry): RemovalPlanSection {\n switch (entry.kind) {\n case \"plugins\":\n return { label: UNINSTALL_PLAN.PLUGINS_HEADING, items: entry.names };\n case \"skills\":\n return {\n label: UNINSTALL_PLAN.CLI_MANAGED_FILES_HEADING,\n items: [localSkillsRemoval(entry.skillsDir)],\n };\n case \"agents\":\n return {\n label: UNINSTALL_PLAN.CLI_MANAGED_FILES_HEADING,\n items: [compiledAgentsRemoval(entry.agentsDir)],\n };\n case \"config\":\n return {\n label: UNINSTALL_PLAN.CONFIG_HEADING,\n items: entry.fileNames.map((fileName) => `${entry.claudeSrcDir}/${fileName}`),\n };\n default: {\n const _exhaustive: never = entry;\n return _exhaustive;\n }\n }\n}\n\nconst PLAN_SECTION_ORDER = [\n UNINSTALL_PLAN.PLUGINS_HEADING,\n UNINSTALL_PLAN.CLI_MANAGED_FILES_HEADING,\n UNINSTALL_PLAN.CONFIG_HEADING,\n] as const;\n\n/**\n * The plan's display half: entries grouped under their heading, in printing order —\n * skills and compiled agents share one. A heading is a promise about the lines beneath\n * it, so a heading no entry contributed to is not printed at all. The single source of\n * the strings shared by printRemovalPlan (plain text) and the UninstallConfirm Ink\n * component; each renderer only adds its own indentation and styling.\n */\nfunction planSections(entries: readonly RemovalEntry[]): RemovalPlanSection[] {\n const described = entries.map(describeEntry);\n\n return PLAN_SECTION_ORDER.flatMap((label) =>\n sectionWithItems(label, itemsUnder(described, label)),\n );\n}\n\n/** Every line the described entries contributed under one heading, in plan order. */\nfunction itemsUnder(described: readonly RemovalPlanSection[], label: string): string[] {\n return described.filter((section) => section.label === label).flatMap((section) => section.items);\n}\n\nfunction sectionWithItems(label: string, items: string[]): RemovalPlanSection[] {\n if (items.length === 0) return [];\n return [{ label, items }];\n}\n\ntype UninstallConfirmProps = {\n plan: RemovalPlan;\n onConfirm: () => void;\n onCancel: () => void;\n};\n\nconst UninstallConfirm: React.FC<UninstallConfirmProps> = ({ plan, onConfirm, onCancel }) => {\n const { exit } = useApp();\n\n return (\n <Box flexDirection=\"column\">\n <Text bold>{UNINSTALL_PLAN.PREVIEW_HEADING}</Text>\n <Text> </Text>\n\n {planSections(plan.entries).map((section) => (\n <Box key={section.label} flexDirection=\"column\">\n <Text color={CLI_COLORS.ERROR}> {section.label}</Text>\n {section.items.map((item) => (\n <Text key={item} dimColor>\n {\" \"}\n {item}\n </Text>\n ))}\n </Box>\n ))}\n\n {plan.kept.map((statement) => (\n <Box key={statement} flexDirection=\"column\">\n <Text> </Text>\n <Text dimColor>{statement}</Text>\n </Box>\n ))}\n\n <Text> </Text>\n <Confirm\n message=\"Are you sure you want to uninstall?\"\n onConfirm={() => {\n onConfirm();\n exit();\n }}\n onCancel={() => {\n onCancel();\n exit();\n }}\n defaultValue={false}\n />\n </Box>\n );\n};\n\nexport default class Uninstall extends BaseCommand {\n static summary = `Remove ${DEFAULT_BRANDING.NAME} from this project`;\n\n static description = `Uninstall ${DEFAULT_BRANDING.NAME} from this project. Removes CLI-managed skills (matched by source), compiled agents, plugins, and the .claude-src/ config manifest (config.ts + config-types.ts). User-created content is preserved.`;\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> --yes\",\n ];\n\n static flags = {\n yes: Flags.boolean({\n char: \"y\",\n description: \"Skip confirmation prompt\",\n default: false,\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Uninstall);\n const projectDir = process.cwd();\n\n this.printHeader();\n\n const target = await detectUninstallTarget(projectDir, (reason) =>\n this.warn(\n `Could not read the project config — plugins and compiled agents it lists may be left behind: ${reason}`,\n ),\n );\n const plan = buildRemovalPlan(target);\n if (!hasAnythingToRemove(plan)) {\n this.reportNothingToUninstall();\n return;\n }\n\n const confirmed = flags.yes ? this.printRemovalPlan(plan) : await this.confirmRemoval(plan);\n if (!confirmed) {\n this.log(\"\");\n this.log(\"Uninstall cancelled\");\n this.exit(EXIT_CODES.CANCELLED);\n }\n\n await this.executeUninstall(plan, target, projectDir);\n this.reportSuccess();\n }\n\n private printHeader(): void {\n this.log(\"\");\n this.log(`${DEFAULT_BRANDING.NAME} Uninstall`);\n this.log(\"\");\n }\n\n private reportNothingToUninstall(): void {\n this.warn(\"Nothing to uninstall.\");\n this.log(\"\");\n this.log(INFO_MESSAGES.NOT_INSTALLED);\n this.log(\"\");\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n }\n\n private printRemovalPlan(plan: RemovalPlan): true {\n this.log(UNINSTALL_PLAN.PREVIEW_HEADING);\n this.log(\"\");\n\n for (const section of planSections(plan.entries)) {\n this.log(` ${section.label}`);\n for (const item of section.items) {\n this.log(` ${item}`);\n }\n }\n\n for (const statement of plan.kept) {\n this.log(\"\");\n this.log(statement);\n }\n\n this.log(\"\");\n return true;\n }\n\n private async confirmRemoval(plan: RemovalPlan): Promise<boolean> {\n const outcome = await promptConfirm(({ onConfirm, onCancel }) => (\n <UninstallConfirm plan={plan} onConfirm={onConfirm} onCancel={onCancel} />\n ));\n return outcome === \"confirmed\";\n }\n\n private async executeUninstall(\n plan: RemovalPlan,\n target: UninstallTarget,\n projectDir: string,\n ): Promise<void> {\n const isGlobalUninstall = isHomeDirectory(projectDir);\n // Prepared BEFORE any removal: the projects[] registry and the source used\n // to regenerate each project's config-types.ts both live in the global\n // config this uninstall is about to delete.\n const propagation = isGlobalUninstall\n ? await this.prepareGlobalPropagation(target, projectDir)\n : null;\n\n await this.removePlannedPlugins(planEntry(plan, \"plugins\"), target.config, projectDir);\n\n try {\n await this.removeLocalFiles(plan, target);\n } catch (error) {\n this.log(\"Failed to remove local files\");\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n if (isGlobalUninstall) {\n // The global manifest is gone — prune the inlined global-scoped entries the\n // registered projects still carry so they stop referencing removed content.\n if (propagation) {\n await this.updateRegisteredProjects(propagation);\n }\n return;\n }\n\n // Deregister this project from the global config's tracked projects so future\n // global edits stop propagating back into it. Best-effort by nature: a missing,\n // project-less, or corrupt global config (ConfigLoadError) must never fail the\n // uninstall — warn and move on.\n try {\n // Registration bookkeeping only: nothing inlines the `projects[]` list into a\n // project config, so this loads neither the matrix nor the agent definitions\n // and the uninstall stays offline.\n await mutateGlobal({ kind: \"deregister-project\", projectDir }, lazyGateDeps(projectDir));\n } catch (error) {\n this.warn(`Could not update the global project registry: ${getErrorMessage(error)}`);\n }\n }\n\n /**\n * Loads what updating registered projects needs (global config with its\n * projects[] registry, skills matrix, agent definitions) BEFORE the global\n * .claude-src manifest is deleted — source resolution reads that config.\n * Returns null when nothing is registered or loading fails; a load failure\n * warns and never aborts the uninstall.\n *\n * `skipExtraSources: true` is NOT a divergence from the wizard's full\n * multi-source load: extra-source loading only annotates each skill's\n * `availableSources`/`activeSource` for wizard UI tagging — it never adds\n * skills or categories to the matrix, and the config-types writer never reads\n * those annotations, so the regenerated project types are byte-identical\n * either way (pinned by the skipExtraSources parity test in\n * local-installer.test.ts). Skipping avoids fetching every registered extra\n * source (network on a cold cache, plus unreachable-remote warnings) during\n * an uninstall that must never hang or noise-fail on remote state.\n */\n private async prepareGlobalPropagation(\n target: UninstallTarget,\n projectDir: string,\n ): Promise<GlobalPropagationData | null> {\n const globalConfig = target.config;\n if (!globalConfig?.projects?.length) return null;\n\n try {\n const [sourceResult, agentDefs] = await Promise.all([\n loadSkillsMatrixFromSource({\n projectDir,\n skipExtraSources: true,\n matrixOnly: true,\n }),\n loadAgentDefs({ projectDir }),\n ]);\n return { globalConfig, matrix: sourceResult.matrix, agents: agentDefs.agents };\n } catch (error) {\n this.warn(registeredProjectsUpdateFailed(getErrorMessage(error)));\n return null;\n }\n }\n\n /**\n * Prunes the inlined global-scoped config entries from every registered\n * project and regenerates its config-types.ts. Runs AFTER the global manifest\n * removal so the regenerated project types fall back to the standalone form\n * instead of importing from the deleted global config-types.ts. Best-effort:\n * unreachable projects are warned and skipped, and no failure here may abort\n * the uninstall.\n */\n private async updateRegisteredProjects(propagation: GlobalPropagationData): Promise<void> {\n try {\n const report = await propagateGlobalRemoval(propagation.globalConfig, {\n matrix: propagation.matrix,\n agents: propagation.agents,\n });\n for (const skippedPath of report.propagated.skipped) {\n this.warn(registeredProjectUpdateSkipped(skippedPath));\n }\n if (report.propagated.updated.length === 0) return;\n\n this.logSuccess(registeredProjectsUpdated(report.propagated.updated.length));\n\n // The pruned projects' compiled agents were built from the global rows this\n // uninstall just removed, so the prune owes them a recompile too.\n this.reportPropagatedRecompile(report);\n } catch (error) {\n this.warn(registeredProjectsUpdateFailed(getErrorMessage(error)));\n }\n }\n\n private reportSuccess(): void {\n this.log(\"\");\n this.log(`${DEFAULT_BRANDING.NAME} has been uninstalled.`);\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.UNINSTALL_COMPLETE);\n this.log(\"\");\n }\n\n /**\n * Each step acts only when the plan carries its entry, so what the user was shown and\n * what this run removes are the same list read twice.\n */\n private async removeLocalFiles(plan: RemovalPlan, target: UninstallTarget): Promise<void> {\n await this.removePlannedSkills(planEntry(plan, \"skills\"));\n await this.removePlannedAgents(planEntry(plan, \"agents\"));\n\n const cleanup = await cleanupEmptyDirs(target, planEntry(plan, \"config\"));\n\n if (cleanup.claudeSrcDirRemoved) {\n this.logSuccess(`Removed ${CLAUDE_SRC_DIR}/`);\n } else if (cleanup.claudeSrcManifestRemoved) {\n this.logSuccess(`Removed CLI config from ${CLAUDE_SRC_DIR}/`);\n }\n\n if (cleanup.claudeDirRemoved) {\n this.logSuccess(`Removed ${CLAUDE_DIR}/`);\n } else if (cleanup.claudeDirKept) {\n this.log(`Kept ${CLAUDE_DIR}/ (contains user content)`);\n }\n }\n\n private async removePlannedPlugins(\n entry: PluginRemoval | undefined,\n config: ProjectConfig | null,\n projectDir: string,\n ): Promise<void> {\n if (!entry) return;\n\n this.log(\"Uninstalling plugins...\");\n\n try {\n const pluginResult = await uninstallPlugins(entry, config, projectDir, (name) =>\n this.log(` Uninstalled plugin '${name}'`),\n );\n\n this.logSuccess(\n `Uninstalled ${pluginResult.totalUninstalled} ${pluginResult.totalUninstalled === 1 ? \"plugin\" : \"plugins\"}`,\n );\n } catch (error) {\n this.log(\"Plugin uninstall failed\");\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n\n private async removePlannedSkills(entry: SkillsRemoval | undefined): Promise<void> {\n if (!entry) return;\n\n const result = await removeMatchingSkills(\n entry,\n (dirName) => this.log(` Uninstalled skill '${dirName}'`),\n (dirName) => this.warn(`Skipping '${dirName}': not created by ${DEFAULT_BRANDING.NAME} CLI`),\n );\n if (result.removedCount === 0) return;\n\n this.logSuccess(\n `Removed ${result.removedCount} CLI-installed ${result.removedCount === 1 ? \"skill\" : \"skills\"}`,\n );\n }\n\n private async removePlannedAgents(entry: AgentsRemoval | undefined): Promise<void> {\n if (!entry) return;\n\n const result = await removeMatchingAgents(entry, (agentName) =>\n this.log(` Uninstalled agent '${agentName}'`),\n );\n if (result.removedCount === 0) return;\n\n this.logSuccess(\n `Removed ${result.removedCount} compiled ${result.removedCount === 1 ? \"agent\" : \"agents\"}`,\n );\n }\n}\n\n/** @internal Exported for testing */\nexport type UninstallTarget = {\n hasPlugins: boolean;\n pluginNames: string[];\n /** Plugin names filtered to only those installed by this CLI (matched against config skills) */\n cliPluginNames: string[];\n hasLocalSkills: boolean;\n hasLocalAgents: boolean;\n hasClaudeDir: boolean;\n /** Whether .claude-src/config.ts exists (the CLI config manifest). */\n hasClaudeSrcConfig: boolean;\n /** Whether .claude-src/config-types.ts exists (companion to config.ts). */\n hasClaudeSrcConfigTypes: boolean;\n pluginsDir: string;\n skillsDir: string;\n agentsDir: string;\n claudeDir: string;\n claudeSrcDir: string;\n /** Resolved project source config from .claude-src/config.ts */\n config: ProjectConfig | null;\n /** Agent names from the generated config (e.g., [\"web-developer\"]) */\n configuredAgents: AgentName[];\n};\n\n/**\n * Everything a global uninstall needs to update the registered projects after\n * the global manifest is removed — captured before removal because it is\n * sourced from the config being deleted.\n */\ntype GlobalPropagationData = {\n globalConfig: ProjectConfig;\n matrix: MergedSkillsMatrix;\n agents: Partial<Record<AgentName, AgentDefinition>>;\n};\n\ntype SkillRemovalResult = {\n removedCount: number;\n skippedCount: number;\n removedNames: string[];\n skippedNames: string[];\n /** Whether the skills directory was cleaned up (empty after removal) */\n dirCleaned: boolean;\n};\n\ntype AgentRemovalResult = {\n removedCount: number;\n removedNames: string[];\n /** Whether the agents directory was cleaned up (empty after removal) */\n dirCleaned: boolean;\n};\n\ntype UninstallPluginsResult = {\n uninstalledNames: string[];\n totalUninstalled: number;\n};\n\ntype CleanupResult = {\n claudeDirRemoved: boolean;\n /** Whether config.ts/config-types.ts were removed from .claude-src/ */\n claudeSrcManifestRemoved: boolean;\n /** Whether the emptied .claude-src/ directory itself was removed */\n claudeSrcDirRemoved: boolean;\n /** Whether .claude/ still exists with user content after cleanup */\n claudeDirKept: boolean;\n};\n\nfunction collectConfiguredAgents(config: Partial<ProjectConfig> | null): AgentName[] {\n if (!config?.agents) return [];\n return config.agents.map((a) => a.name);\n}\n\n/** @internal Exported for testing */\nexport function getCliInstalledPluginKeys(config: Partial<ProjectConfig> | null): Set<string> {\n if (!config?.skills) return new Set();\n const { marketplace } = config;\n return new Set(\n config.skills.flatMap((skill) => [\n // Primary key: skill.id@skill.source\n buildMarketplacePluginRef(skill.id, skill.source),\n // Marketplace variant for plugins installed via marketplace where\n // skill.source may differ (e.g., \"eject\" vs the marketplace name)\n ...(marketplace && skill.source !== marketplace && skill.source !== EJECT_SOURCE\n ? [buildMarketplacePluginRef(skill.id, marketplace)]\n : []),\n ]),\n );\n}\n\n/**\n * Loads the config that drives the removal plan. A config file that exists but\n * cannot be parsed (`ConfigLoadError`) is reported through `onLoadFailed` and\n * then treated exactly like a missing one — an unreadable config is precisely\n * when a user needs to uninstall, so it must never fail the run. Same posture as\n * the `deregisterProjectPath` call site. Only the plan degrades: the plugins and\n * compiled agents the config named can no longer be identified, while file\n * removal proceeds. Any other failure is a real fault and still propagates.\n */\nasync function loadUninstallConfig(\n projectDir: string,\n onLoadFailed: (reason: string) => void,\n): Promise<ProjectConfig | null> {\n try {\n const result = await loadProjectConfigFromDir(projectDir);\n return result?.config ?? null;\n } catch (error) {\n if (!(error instanceof ConfigLoadError)) throw error;\n onLoadFailed(getErrorMessage(error));\n return null;\n }\n}\n\n/**\n * Detects what's installed in a project directory for uninstallation.\n *\n * Checks for plugins, local skills, agents, config directories, and\n * resolves which plugins were installed by this CLI.\n */\nasync function detectUninstallTarget(\n projectDir: string,\n onConfigLoadFailed: (reason: string) => void,\n): Promise<UninstallTarget> {\n const pluginsDir = getProjectPluginsDir(projectDir);\n const { skillsDir, agentsDir } = resolveInstallPaths(projectDir);\n const claudeDir = path.join(projectDir, CLAUDE_DIR);\n const claudeSrcDir = path.join(projectDir, CLAUDE_SRC_DIR);\n\n const claudeSrcConfigPath = path.join(claudeSrcDir, STANDARD_FILES.CONFIG_TS);\n const claudeSrcConfigTypesPath = path.join(claudeSrcDir, STANDARD_FILES.CONFIG_TYPES_TS);\n\n const [\n hasLocalSkills,\n hasLocalAgents,\n hasClaudeDir,\n hasClaudeSrcConfig,\n hasClaudeSrcConfigTypes,\n config,\n ] = await Promise.all([\n directoryExists(skillsDir),\n directoryExists(agentsDir),\n directoryExists(claudeDir),\n fileExists(claudeSrcConfigPath),\n fileExists(claudeSrcConfigTypesPath),\n loadUninstallConfig(projectDir, onConfigLoadFailed),\n ]);\n\n let pluginNames: string[] = [];\n try {\n pluginNames = await listPluginNames(projectDir);\n } catch {\n // Best-effort: plugin detection may fail\n }\n\n const activeConfig = config\n ? {\n ...config,\n skills: config.skills.filter((s) => !s.excluded),\n agents: config.agents.filter((a) => !a.excluded),\n }\n : null;\n const configuredAgents = collectConfiguredAgents(activeConfig);\n const cliInstalledKeys = getCliInstalledPluginKeys(activeConfig);\n const cliPluginNames = pluginNames.filter((name) => cliInstalledKeys.has(name));\n\n return {\n hasPlugins: cliPluginNames.length > 0,\n pluginNames,\n cliPluginNames,\n hasLocalSkills,\n hasLocalAgents,\n hasClaudeDir,\n hasClaudeSrcConfig,\n hasClaudeSrcConfigTypes,\n pluginsDir,\n skillsDir,\n agentsDir,\n claudeDir,\n claudeSrcDir,\n config,\n configuredAgents,\n };\n}\n\nfunction shouldRemoveSkill(forkedFrom: { source?: string } | null): boolean {\n return forkedFrom !== null;\n}\n\nasync function removeMatchingSkills(\n entry: SkillsRemoval,\n onRemoved?: (dirName: string) => void,\n onSkipped?: (dirName: string) => void,\n): Promise<SkillRemovalResult> {\n const classified = await classifySkillDirs(entry.skillsDir);\n const removedNames = await removeClassifiedSkills(\n classified.toRemove,\n entry.skillsDir,\n onRemoved,\n );\n classified.toSkip.forEach((name) => onSkipped?.(name));\n const dirCleaned = await cleanupSkillsDir(entry.skillsDir, classified.toSkip.length === 0);\n\n return {\n removedCount: removedNames.length,\n skippedCount: classified.toSkip.length,\n removedNames,\n skippedNames: classified.toSkip,\n dirCleaned,\n };\n}\n\nasync function classifySkillDirs(\n skillsDir: string,\n): Promise<{ toRemove: string[]; toSkip: string[] }> {\n const dirNames = await listDirectories(skillsDir);\n const entries = await Promise.all(\n dirNames.map(async (name) => ({\n name,\n forkedFrom: await readForkedFromMetadata(path.join(skillsDir, name)),\n })),\n );\n const [removable, skippable] = partition(entries, (entry) => shouldRemoveSkill(entry.forkedFrom));\n return { toRemove: removable.map((e) => e.name), toSkip: skippable.map((e) => e.name) };\n}\n\nasync function removeClassifiedSkills(\n names: string[],\n skillsDir: string,\n onRemoved?: (name: string) => void,\n): Promise<string[]> {\n for (const name of names) {\n await remove(path.join(skillsDir, name));\n onRemoved?.(name);\n }\n return names;\n}\n\nasync function cleanupSkillsDir(dir: string, allRemoved: boolean): Promise<boolean> {\n if (!allRemoved) return false;\n return removeDirIfEmpty(dir);\n}\n\n/**\n * Removes the compiled agent .md files the plan's agents entry names.\n *\n * A file is removed only when its basename matches one of the entry's agent names\n * (taken from config.agents); agents absent from config are preserved. Cleans up the\n * agents directory if empty after removal. Whether to act at all is the plan's\n * decision, not this function's — no entry, no call.\n *\n * @param onRemoved - Called for each removed agent name (for logging)\n */\nasync function removeMatchingAgents(\n entry: AgentsRemoval,\n onRemoved?: (agentName: string) => void,\n): Promise<AgentRemovalResult> {\n const agentFiles = await listAgentFiles(entry.agentsDir);\n const removedNames = agentFiles\n .map((agentFile) => agentFile.replace(/\\.md$/, \"\"))\n // Array<AgentName>.includes rejects a plain string; widen the configured\n // list to readonly string[] so the on-disk basename can be tested for\n // membership in config.agents.\n .filter((agentName) => (entry.agentNames as readonly string[]).includes(agentName));\n\n for (const agentName of removedNames) {\n await remove(path.join(entry.agentsDir, `${agentName}.md`));\n onRemoved?.(agentName);\n }\n\n const dirCleaned = await removeDirIfEmpty(entry.agentsDir);\n\n return {\n removedCount: removedNames.length,\n removedNames,\n dirCleaned,\n };\n}\n\n/**\n * Uninstalls the plugins the plan's plugins entry names, by removing them from the\n * Claude CLI and deleting their local directories. The entry decides WHICH plugins go;\n * `config` only answers HOW to ask the Claude CLI — the scope its registry filed each\n * one under, per-skill where the config says, project-level otherwise.\n *\n * @param onUninstalled - Called for each successfully uninstalled plugin name (for logging)\n * @internal Exported for testing\n */\nexport async function uninstallPlugins(\n entry: PluginRemoval,\n config: ProjectConfig | null,\n projectDir: string,\n onUninstalled?: (pluginName: string) => void,\n): Promise<UninstallPluginsResult> {\n const cliAvailable = await isClaudeCLIAvailable();\n\n for (const pluginName of entry.names) {\n if (cliAvailable) {\n // Derive primary scope from per-skill config; shared helper tries both scopes\n // to handle re-scoped plugins where the registry entry may be under the\n // original scope rather than the currently-configured one.\n const skillId = parseMarketplacePluginRef(pluginName);\n const skillConfig = config?.skills.find((s) => s.id === skillId);\n const primaryScope = toClaudePluginScope(skillConfig?.scope);\n await claudePluginUninstallBestEffort(pluginName, primaryScope, projectDir);\n }\n\n const pluginPath = path.join(entry.pluginsDir, pluginName);\n await remove(pluginPath);\n onUninstalled?.(pluginName);\n }\n\n // Every iteration either completes or throws (aborting the whole uninstall),\n // so reaching this return means every plugin the plan named was removed.\n return {\n uninstalledNames: entry.names,\n totalUninstalled: entry.names.length,\n };\n}\n\n/**\n * Removes exactly the manifest files the plan's config entry names from .claude-src/,\n * then the .claude-src/ directory itself when it has nothing else left. User-owned\n * content in .claude-src/ (e.g. ejected templates) keeps the directory alive. No entry\n * means the plan promised no manifest removal, so none is made.\n */\nasync function removeConfigManifest(\n entry: ConfigManifestRemoval | undefined,\n): Promise<{ manifestRemoved: boolean; dirRemoved: boolean }> {\n if (!entry) return { manifestRemoved: false, dirRemoved: false };\n\n await Promise.all(\n entry.fileNames.map((fileName) => remove(path.join(entry.claudeSrcDir, fileName))),\n );\n\n return { manifestRemoved: true, dirRemoved: await removeDirIfEmpty(entry.claudeSrcDir) };\n}\n\n/**\n * Removes the CLI config manifest the plan named, then cleans up the emptied .claude/\n * and .claude-src/ directories.\n *\n * The directories themselves are not plan entries — they are the user's, and are removed\n * only when nothing of theirs is left in them once the CLI-managed contents are gone.\n */\nasync function cleanupEmptyDirs(\n target: Pick<UninstallTarget, \"hasClaudeDir\" | \"claudeDir\">,\n manifestEntry: ConfigManifestRemoval | undefined,\n): Promise<CleanupResult> {\n const manifest = await removeConfigManifest(manifestEntry);\n\n const claudeDirRemoved = target.hasClaudeDir && (await removeDirIfEmpty(target.claudeDir));\n // Nothing else removes .claude itself, so \"kept\" is exactly \"present but not removed\".\n const claudeDirKept =\n !claudeDirRemoved && target.hasClaudeDir && (await directoryExists(target.claudeDir));\n\n return {\n claudeDirRemoved,\n claudeSrcManifestRemoved: manifest.manifestRemoved,\n claudeSrcDirRemoved: manifest.dirRemoved,\n claudeDirKept,\n };\n}\n\nasync function listAgentFiles(agentsDir: string): Promise<string[]> {\n try {\n return await listAgentMdFiles(agentsDir);\n } catch {\n return [];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAkB;AAClB,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AAEjB,SAAS,aAAa;AACtB,SAAS,KAAK,MAAM,cAAc;AAqO5B,cAKI,YALJ;AA5IN,SAAS,iBAAiB,QAAsC;AAC9D,QAAM,SAAS,oBAAoB,MAAM;AAEzC,SAAO;AAAA,IACL,SAAS;AAAA,MACP,GAAG,aAAa,MAAM;AAAA,MACtB,GAAG,iBAAiB,MAAM;AAAA,MAC1B,GAAG;AAAA,MACH,GAAG,oBAAoB,MAAM;AAAA,IAC/B;AAAA,IACA,MAAM,eAAe,QAAQ,MAAM;AAAA,EACrC;AACF;AAGA,SAAS,oBAAoB,MAA4B;AACvD,SAAO,KAAK,QAAQ,SAAS;AAC/B;AAEA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AAM,UAAU,0BAA0B,UAAU;AACpD,YAAM,cAAc,QAAQ,OAAO,KAAK,CAAC,MAAM,EAAE,OAAO,OAAO;AAC/D,YAAM,eAAe,oBAAoB,aAAa,KAAK;AAC3D,YAAM,gCAAgC,YAAY,cAAc,UAAU;AAAA,IAC5E;AAEA,UAAM,aAAa,KAAK,KAAK,MAAM,YAAY,UAAU;AACzD,UAAM,OAAO,UAAU;AACvB,oBAAgB,UAAU;AAAA,EAC5B;AAIA,SAAO;AAAA,IACL,kBAAkB,MAAM;AAAA,IACxB,kBAAkB,MAAM,MAAM;AAAA,EAChC;AACF;AAQA,eAAe,qBACb,OAC4D;AAC5D,MAAI,CAAC,MAAO,QAAO,EAAE,iBAAiB,OAAO,YAAY,MAAM;AAE/D,QAAM,QAAQ;AAAA,IACZ,MAAM,UAAU,IAAI,CAAC,aAAa,OAAO,KAAK,KAAK,MAAM,cAAc,QAAQ,CAAC,CAAC;AAAA,EACnF;AAEA,SAAO,EAAE,iBAAiB,MAAM,YAAY,MAAM,iBAAiB,MAAM,YAAY,EAAE;AACzF;AASA,eAAe,iBACb,QACA,eACwB;AACxB,QAAM,WAAW,MAAM,qBAAqB,aAAa;AAEzD,QAAM,mBAAmB,OAAO,gBAAiB,MAAM,iBAAiB,OAAO,SAAS;AAExF,QAAM,gBACJ,CAAC,oBAAoB,OAAO,gBAAiB,MAAM,gBAAgB,OAAO,SAAS;AAErF,SAAO;AAAA,IACL;AAAA,IACA,0BAA0B,SAAS;AAAA,IACnC,qBAAqB,SAAS;AAAA,IAC9B;AAAA,EACF;AACF;AAEA,eAAe,eAAe,WAAsC;AAClE,MAAI;AACF,WAAO,MAAM,iBAAiB,SAAS;AAAA,EACzC,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/uninstall.tsx"],"sourcesContent":["import React from \"react\";\nimport { partition } from \"remeda\";\nimport path from \"path\";\n\nimport { Flags } from \"@oclif/core\";\n\nimport { BaseCommand } from \"../base-command\";\nimport {\n RemovalPlanConfirm,\n type RemovalPlanSection,\n} from \"../components/common/removal-plan-confirm.js\";\nimport { promptConfirm } from \"../components/common/prompt-confirm.js\";\nimport { getErrorMessage } from \"../utils/errors\";\nimport {\n directoryExists,\n fileExists,\n listDirectories,\n remove,\n removeDirIfEmpty,\n} from \"../utils/fs\";\nimport { listAgentMdFiles, splitAgentsByProvenance } from \"../lib/agents\";\nimport { claudePluginUninstallBestEffort, isClaudeCLIAvailable } from \"../utils/exec\";\nimport {\n listPluginNames,\n getProjectPluginsDir,\n buildMarketplacePluginRef,\n parseMarketplacePluginRef,\n toClaudePluginScope,\n} from \"../lib/plugins/index\";\nimport { readForkedFromMetadata } from \"../lib/skills/index\";\nimport { isHomeDirectory, resolveInstallPaths } from \"../lib/installation/index\";\nimport { lazyGateDeps, mutateGlobal, propagateGlobalRemoval } from \"../lib/config-gate/index.js\";\nimport { loadSkillsMatrixFromSource } from \"../lib/loading\";\nimport { loadAgentDefs } from \"../lib/operations\";\nimport { ConfigLoadError, loadProjectConfigFromDir } from \"../lib/configuration/project-config\";\nimport {\n CLAUDE_DIR,\n CLAUDE_SRC_DIR,\n DEFAULT_BRANDING,\n EJECT_SOURCE,\n STANDARD_FILES,\n} from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\nimport {\n SUCCESS_MESSAGES,\n INFO_MESSAGES,\n UNINSTALL_PLAN,\n compiledAgentsRemoval,\n localSkillsRemoval,\n unmarkedAgentsKept,\n registeredProjectsUpdated,\n registeredProjectUpdateSkipped,\n registeredProjectsUpdateFailed,\n} from \"../utils/messages\";\nimport type { AgentDefinition, AgentName, MergedSkillsMatrix, ProjectConfig } from \"../types/index\";\n\n/**\n * One removal this run promises AND makes. Each entry carries what its remover needs\n * — paths and names, never display strings — so the preview and the removal are two\n * readings of one value rather than two derivations of the same target.\n */\ntype RemovalEntry =\n | { kind: \"plugins\"; pluginsDir: string; names: string[] }\n | { kind: \"skills\"; skillsDir: string }\n | { kind: \"agents\"; agentsDir: string; agentNames: string[] }\n | { kind: \"config\"; claudeSrcDir: string; fileNames: string[] };\n\n/** The single entry of a kind, for the remover that consumes it. */\ntype PluginRemoval = Extract<RemovalEntry, { kind: \"plugins\" }>;\ntype SkillsRemoval = Extract<RemovalEntry, { kind: \"skills\" }>;\ntype AgentsRemoval = Extract<RemovalEntry, { kind: \"agents\" }>;\ntype ConfigManifestRemoval = Extract<RemovalEntry, { kind: \"config\" }>;\n\n/**\n * The uninstall removal plan: what this run removes, and what it deliberately leaves\n * behind. Built once per run — the confirm UI renders it, the executor consumes the\n * same value, so the plan cannot name a removal the run declines to make.\n */\ntype RemovalPlan = {\n entries: RemovalEntry[];\n /** Statements naming content that stays, and why — see {@link keptStatements}. */\n kept: string[];\n};\n\n/**\n * Pure builder for the uninstall removal plan — the one place that decides what this\n * run removes. Every removal downstream is driven by an entry from here, and nothing\n * downstream re-reads the target to decide whether to act.\n */\nfunction buildRemovalPlan(target: UninstallTarget): RemovalPlan {\n const agents = compiledAgentsEntry(target);\n\n return {\n entries: [\n ...pluginsEntry(target),\n ...localSkillsEntry(target),\n ...agents,\n ...configManifestEntry(target),\n ],\n kept: keptStatements(target, agents),\n };\n}\n\n/** The plan carries at least one removal — the only thing that makes this run an uninstall. */\nfunction hasAnythingToRemove(plan: RemovalPlan): boolean {\n return plan.entries.length > 0;\n}\n\nfunction pluginsEntry(target: UninstallTarget): PluginRemoval[] {\n if (!target.hasPlugins) return [];\n return [{ kind: \"plugins\", pluginsDir: target.pluginsDir, names: [...target.cliPluginNames] }];\n}\n\nfunction localSkillsEntry(target: UninstallTarget): SkillsRemoval[] {\n if (!target.hasLocalSkills) return [];\n return [{ kind: \"skills\", skillsDir: target.skillsDir }];\n}\n\nfunction compiledAgentsEntry(target: UninstallTarget): AgentsRemoval[] {\n if (!target.hasLocalAgents) return [];\n\n const agentNames = identifiableAgents(target);\n if (agentNames.length === 0) return [];\n\n return [{ kind: \"agents\", agentsDir: target.agentsDir, agentNames }];\n}\n\n/**\n * The agent files this run can say are its own, and on whose authority.\n *\n * The configuration is the first: it names the agents this install compiled, and a marker-less\n * file it names is still this CLI's — every install predating the marker is in exactly that\n * state. The provenance marker the compiler stamps into every agent is the second, reached\n * when there is no configuration left to read: provably ours, whoever lost the config. With\n * neither, nothing here is identifiable and the plan carries no removal for it.\n */\nfunction identifiableAgents(target: UninstallTarget): string[] {\n if (target.configuredAgents.length > 0) return target.configuredAgents;\n return target.markedAgents;\n}\n\n/** The CLI config manifest (config.ts + config-types.ts) is always removed. */\nfunction configManifestEntry(target: UninstallTarget): ConfigManifestRemoval[] {\n const fileNames = [\n ...(target.hasClaudeSrcConfig ? [STANDARD_FILES.CONFIG_TS] : []),\n ...(target.hasClaudeSrcConfigTypes ? [STANDARD_FILES.CONFIG_TYPES_TS] : []),\n ];\n if (fileNames.length === 0) return [];\n return [{ kind: \"config\", claudeSrcDir: target.claudeSrcDir, fileNames }];\n}\n\n/**\n * The plan's kept half: the agent files carrying no provenance marker that the removal above\n * does not claim anyway. Derived FROM the removal rather than from a second reading of the\n * target, so the two halves of the plan cannot contradict each other — an agent named in both\n * lists would be a promise to remove a file the same plan calls kept.\n */\nfunction keptStatements(target: UninstallTarget, agentRemovals: AgentsRemoval[]): string[] {\n const removing = new Set(agentRemovals.flatMap((entry) => entry.agentNames));\n const kept = target.unmarkedAgents.filter((name) => !removing.has(name));\n if (kept.length === 0) return [];\n return [unmarkedAgentsKept(target.agentsDir, kept.length)];\n}\n\n/** The plan's entry of a kind, for the remover that consumes it. At most one exists. */\nfunction planEntry<K extends RemovalEntry[\"kind\"]>(\n plan: RemovalPlan,\n kind: K,\n): Extract<RemovalEntry, { kind: K }> | undefined {\n return plan.entries.find(\n (entry): entry is Extract<RemovalEntry, { kind: K }> => entry.kind === kind,\n );\n}\n\n/** The heading an entry prints under, and the lines it contributes beneath it. */\nfunction describeEntry(entry: RemovalEntry): RemovalPlanSection {\n switch (entry.kind) {\n case \"plugins\":\n return { label: UNINSTALL_PLAN.PLUGINS_HEADING, items: entry.names };\n case \"skills\":\n return {\n label: UNINSTALL_PLAN.CLI_MANAGED_FILES_HEADING,\n items: [localSkillsRemoval(entry.skillsDir)],\n };\n case \"agents\":\n return {\n label: UNINSTALL_PLAN.CLI_MANAGED_FILES_HEADING,\n items: [compiledAgentsRemoval(entry.agentsDir)],\n };\n case \"config\":\n return {\n label: UNINSTALL_PLAN.CONFIG_HEADING,\n items: entry.fileNames.map((fileName) => `${entry.claudeSrcDir}/${fileName}`),\n };\n default: {\n const _exhaustive: never = entry;\n return _exhaustive;\n }\n }\n}\n\nconst PLAN_SECTION_ORDER = [\n UNINSTALL_PLAN.PLUGINS_HEADING,\n UNINSTALL_PLAN.CLI_MANAGED_FILES_HEADING,\n UNINSTALL_PLAN.CONFIG_HEADING,\n] as const;\n\n/**\n * The plan's display half: entries grouped under their heading, in printing order —\n * skills and compiled agents share one. A heading is a promise about the lines beneath\n * it, so a heading no entry contributed to is not printed at all. The single source of\n * the strings shared by printRemovalPlan (plain text) and the UninstallConfirm Ink\n * component; each renderer only adds its own indentation and styling.\n */\nfunction planSections(entries: readonly RemovalEntry[]): RemovalPlanSection[] {\n const described = entries.map(describeEntry);\n\n return PLAN_SECTION_ORDER.flatMap((label) =>\n sectionWithItems(label, itemsUnder(described, label)),\n );\n}\n\n/** Every line the described entries contributed under one heading, in plan order. */\nfunction itemsUnder(described: readonly RemovalPlanSection[], label: string): string[] {\n return described.filter((section) => section.label === label).flatMap((section) => section.items);\n}\n\nfunction sectionWithItems(label: string, items: string[]): RemovalPlanSection[] {\n if (items.length === 0) return [];\n return [{ label, items }];\n}\n\nconst UNINSTALL_CONFIRM_MESSAGE = \"Are you sure you want to uninstall?\";\n\nexport default class Uninstall extends BaseCommand {\n static summary = `Remove ${DEFAULT_BRANDING.NAME} from this project`;\n\n static description = `Uninstall ${DEFAULT_BRANDING.NAME} from this project. Removes CLI-managed skills (matched by marketplace), compiled agents, plugins, and the .claude-src/ config manifest (config.ts + config-types.ts). User-created content is preserved.`;\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> --yes\",\n ];\n\n static flags = {\n yes: Flags.boolean({\n char: \"y\",\n description: \"Skip confirmation prompt\",\n default: false,\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Uninstall);\n const projectDir = process.cwd();\n\n this.printHeader();\n\n const target = await detectUninstallTarget(projectDir, (reason) =>\n this.warn(\n `Could not read the project config — plugins and compiled agents it lists may be left behind: ${reason}`,\n ),\n );\n const plan = buildRemovalPlan(target);\n if (!hasAnythingToRemove(plan)) {\n this.reportNothingToUninstall();\n return;\n }\n\n const confirmed = flags.yes ? this.printRemovalPlan(plan) : await this.confirmRemoval(plan);\n if (!confirmed) {\n this.log(\"\");\n this.log(\"Uninstall cancelled\");\n this.exit(EXIT_CODES.CANCELLED);\n }\n\n await this.executeUninstall(plan, target, projectDir);\n this.reportSuccess();\n }\n\n private printHeader(): void {\n this.log(\"\");\n this.log(`${DEFAULT_BRANDING.NAME} Uninstall`);\n this.log(\"\");\n }\n\n private reportNothingToUninstall(): void {\n this.warn(\"Nothing to uninstall.\");\n this.log(\"\");\n this.log(INFO_MESSAGES.NOT_INSTALLED);\n this.log(\"\");\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n }\n\n private printRemovalPlan(plan: RemovalPlan): true {\n this.log(UNINSTALL_PLAN.PREVIEW_HEADING);\n this.log(\"\");\n\n for (const section of planSections(plan.entries)) {\n this.log(` ${section.label}`);\n for (const item of section.items) {\n this.log(` ${item}`);\n }\n }\n\n for (const statement of plan.kept) {\n this.log(\"\");\n this.log(statement);\n }\n\n this.log(\"\");\n return true;\n }\n\n private async confirmRemoval(plan: RemovalPlan): Promise<boolean> {\n const outcome = await promptConfirm(({ onConfirm, onCancel }) => (\n <RemovalPlanConfirm\n heading={UNINSTALL_PLAN.PREVIEW_HEADING}\n sections={planSections(plan.entries)}\n statements={plan.kept}\n message={UNINSTALL_CONFIRM_MESSAGE}\n onConfirm={onConfirm}\n onCancel={onCancel}\n />\n ));\n return outcome === \"confirmed\";\n }\n\n private async executeUninstall(\n plan: RemovalPlan,\n target: UninstallTarget,\n projectDir: string,\n ): Promise<void> {\n const isGlobalUninstall = isHomeDirectory(projectDir);\n // Prepared BEFORE any removal: the projects[] registry and the source used\n // to regenerate each project's config-types.ts both live in the global\n // config this uninstall is about to delete.\n const propagation = isGlobalUninstall\n ? await this.prepareGlobalPropagation(target, projectDir)\n : null;\n\n await this.removePlannedPlugins(planEntry(plan, \"plugins\"), target.config, projectDir);\n\n try {\n await this.removeLocalFiles(plan, target);\n } catch (error) {\n this.log(\"Failed to remove local files\");\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n if (isGlobalUninstall) {\n // The global manifest is gone — prune the inlined global-scoped entries the\n // registered projects still carry so they stop referencing removed content.\n if (propagation) {\n await this.updateRegisteredProjects(propagation);\n }\n return;\n }\n\n // Deregister this project from the global config's tracked projects so future\n // global edits stop propagating back into it. Best-effort by nature: a missing,\n // project-less, or corrupt global config (ConfigLoadError) must never fail the\n // uninstall — warn and move on.\n try {\n // Registration bookkeeping only: nothing inlines the `projects[]` list into a\n // project config, so this loads neither the matrix nor the agent definitions\n // and the uninstall stays offline.\n await mutateGlobal({ kind: \"deregister-project\", projectDir }, lazyGateDeps(projectDir));\n } catch (error) {\n this.warn(`Could not update the global project registry: ${getErrorMessage(error)}`);\n }\n }\n\n /**\n * Loads what updating registered projects needs (global config with its\n * projects[] registry, skills matrix, agent definitions) BEFORE the global\n * .claude-src manifest is deleted — source resolution reads that config.\n * Returns null when nothing is registered or loading fails; a load failure\n * warns and never aborts the uninstall.\n *\n * `skipExtraSources: true` is NOT a divergence from the wizard's full\n * multi-source load: extra-source loading only annotates each skill's\n * `availableSources`/`activeSource` for wizard UI tagging — it never adds\n * skills or categories to the matrix, and the config-types writer never reads\n * those annotations, so the regenerated project types are byte-identical\n * either way (pinned by the skipExtraSources parity test in\n * local-installer.test.ts). Skipping avoids fetching every registered extra\n * source (network on a cold cache, plus unreachable-remote warnings) during\n * an uninstall that must never hang or noise-fail on remote state.\n */\n private async prepareGlobalPropagation(\n target: UninstallTarget,\n projectDir: string,\n ): Promise<GlobalPropagationData | null> {\n const globalConfig = target.config;\n if (!globalConfig?.projects?.length) return null;\n\n try {\n const [sourceResult, agentDefs] = await Promise.all([\n loadSkillsMatrixFromSource({\n projectDir,\n skipExtraSources: true,\n matrixOnly: true,\n }),\n loadAgentDefs(),\n ]);\n return { globalConfig, matrix: sourceResult.matrix, agents: agentDefs.agents };\n } catch (error) {\n this.warn(registeredProjectsUpdateFailed(getErrorMessage(error)));\n return null;\n }\n }\n\n /**\n * Prunes the inlined global-scoped config entries from every registered\n * project and regenerates its config-types.ts. Runs AFTER the global manifest\n * removal so the regenerated project types fall back to the standalone form\n * instead of importing from the deleted global config-types.ts. Best-effort:\n * unreachable projects are warned and skipped, and no failure here may abort\n * the uninstall.\n */\n private async updateRegisteredProjects(propagation: GlobalPropagationData): Promise<void> {\n try {\n const report = await propagateGlobalRemoval(propagation.globalConfig, {\n matrix: propagation.matrix,\n agents: propagation.agents,\n });\n for (const skippedPath of report.propagated.skipped) {\n this.warn(registeredProjectUpdateSkipped(skippedPath));\n }\n if (report.propagated.updated.length === 0) return;\n\n this.logSuccess(registeredProjectsUpdated(report.propagated.updated.length));\n\n // The pruned projects' compiled agents were built from the global rows this\n // uninstall just removed, so the prune owes them a recompile too.\n this.reportPropagatedRecompile(report);\n } catch (error) {\n this.warn(registeredProjectsUpdateFailed(getErrorMessage(error)));\n }\n }\n\n private reportSuccess(): void {\n this.log(\"\");\n this.log(`${DEFAULT_BRANDING.NAME} has been uninstalled.`);\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.UNINSTALL_COMPLETE);\n this.log(\"\");\n }\n\n /**\n * Each step acts only when the plan carries its entry, so what the user was shown and\n * what this run removes are the same list read twice.\n */\n private async removeLocalFiles(plan: RemovalPlan, target: UninstallTarget): Promise<void> {\n await this.removePlannedSkills(planEntry(plan, \"skills\"));\n await this.removePlannedAgents(planEntry(plan, \"agents\"));\n\n // The same statements the preview showed, from the same plan: what the user approved and\n // what this run reports are one value read twice, never two derivations that agree today.\n for (const statement of plan.kept) {\n this.log(statement);\n }\n\n const cleanup = await cleanupEmptyDirs(target, planEntry(plan, \"config\"));\n\n if (cleanup.claudeSrcDirRemoved) {\n this.logSuccess(`Removed ${CLAUDE_SRC_DIR}/`);\n } else if (cleanup.claudeSrcManifestRemoved) {\n this.logSuccess(`Removed CLI config from ${CLAUDE_SRC_DIR}/`);\n }\n\n if (cleanup.claudeDirRemoved) {\n this.logSuccess(`Removed ${CLAUDE_DIR}/`);\n } else if (cleanup.claudeDirKept) {\n this.log(`Kept ${CLAUDE_DIR}/ (contains user content)`);\n }\n }\n\n private async removePlannedPlugins(\n entry: PluginRemoval | undefined,\n config: ProjectConfig | null,\n projectDir: string,\n ): Promise<void> {\n if (!entry) return;\n\n this.log(\"Uninstalling plugins...\");\n\n try {\n const pluginResult = await uninstallPlugins(entry, config, projectDir, (name) =>\n this.log(` Uninstalled plugin '${name}'`),\n );\n\n this.logSuccess(\n `Uninstalled ${pluginResult.totalUninstalled} ${pluginResult.totalUninstalled === 1 ? \"plugin\" : \"plugins\"}`,\n );\n } catch (error) {\n this.log(\"Plugin uninstall failed\");\n this.error(getErrorMessage(error), {\n exit: EXIT_CODES.ERROR,\n });\n }\n }\n\n private async removePlannedSkills(entry: SkillsRemoval | undefined): Promise<void> {\n if (!entry) return;\n\n const result = await removeMatchingSkills(\n entry,\n (dirName) => this.log(` Uninstalled skill '${dirName}'`),\n (dirName) => this.warn(`Skipping '${dirName}': not created by ${DEFAULT_BRANDING.NAME} CLI`),\n );\n if (result.removedCount === 0) return;\n\n this.logSuccess(\n `Removed ${result.removedCount} CLI-installed ${result.removedCount === 1 ? \"skill\" : \"skills\"}`,\n );\n }\n\n private async removePlannedAgents(entry: AgentsRemoval | undefined): Promise<void> {\n if (!entry) return;\n\n const result = await removeMatchingAgents(entry, (agentName) =>\n this.log(` Uninstalled agent '${agentName}'`),\n );\n if (result.removedCount === 0) return;\n\n this.logSuccess(\n `Removed ${result.removedCount} compiled ${result.removedCount === 1 ? \"agent\" : \"agents\"}`,\n );\n }\n}\n\n/** @internal Exported for testing */\nexport type UninstallTarget = {\n hasPlugins: boolean;\n pluginNames: string[];\n /** Plugin names filtered to only those installed by this CLI (matched against config skills) */\n cliPluginNames: string[];\n hasLocalSkills: boolean;\n hasLocalAgents: boolean;\n hasClaudeDir: boolean;\n /** Whether .claude-src/config.ts exists (the CLI config manifest). */\n hasClaudeSrcConfig: boolean;\n /** Whether .claude-src/config-types.ts exists (companion to config.ts). */\n hasClaudeSrcConfigTypes: boolean;\n pluginsDir: string;\n skillsDir: string;\n agentsDir: string;\n claudeDir: string;\n claudeSrcDir: string;\n /** Resolved project source config from .claude-src/config.ts */\n config: ProjectConfig | null;\n /** Agent names from the generated config (e.g., [\"web-developer\"]) */\n configuredAgents: AgentName[];\n /** On-disk agent basenames carrying this CLI's provenance marker. */\n markedAgents: string[];\n /** On-disk agent basenames carrying no marker — the user's, unless the config claims them. */\n unmarkedAgents: string[];\n};\n\n/**\n * Everything a global uninstall needs to update the registered projects after\n * the global manifest is removed — captured before removal because it is\n * sourced from the config being deleted.\n */\ntype GlobalPropagationData = {\n globalConfig: ProjectConfig;\n matrix: MergedSkillsMatrix;\n agents: Partial<Record<AgentName, AgentDefinition>>;\n};\n\ntype SkillRemovalResult = {\n removedCount: number;\n skippedCount: number;\n removedNames: string[];\n skippedNames: string[];\n /** Whether the skills directory was cleaned up (empty after removal) */\n dirCleaned: boolean;\n};\n\ntype AgentRemovalResult = {\n removedCount: number;\n removedNames: string[];\n /** Whether the agents directory was cleaned up (empty after removal) */\n dirCleaned: boolean;\n};\n\ntype UninstallPluginsResult = {\n uninstalledNames: string[];\n totalUninstalled: number;\n};\n\ntype CleanupResult = {\n claudeDirRemoved: boolean;\n /** Whether config.ts/config-types.ts were removed from .claude-src/ */\n claudeSrcManifestRemoved: boolean;\n /** Whether the emptied .claude-src/ directory itself was removed */\n claudeSrcDirRemoved: boolean;\n /** Whether .claude/ still exists with user content after cleanup */\n claudeDirKept: boolean;\n};\n\nfunction collectConfiguredAgents(config: Partial<ProjectConfig> | null): AgentName[] {\n if (!config?.agents) return [];\n return config.agents.map((a) => a.name);\n}\n\n/** @internal Exported for testing */\nexport function getCliInstalledPluginKeys(config: Partial<ProjectConfig> | null): Set<string> {\n if (!config?.skills) return new Set();\n const { marketplaceName } = config;\n return new Set(\n config.skills.flatMap((skill) => [\n // Primary key: skill.id@skill.origin\n buildMarketplacePluginRef(skill.id, skill.origin),\n // Marketplace variant for plugins installed via marketplace where\n // skill.origin may differ (e.g., \"eject\" vs the marketplace name)\n ...(marketplaceName && skill.origin !== marketplaceName && skill.origin !== EJECT_SOURCE\n ? [buildMarketplacePluginRef(skill.id, marketplaceName)]\n : []),\n ]),\n );\n}\n\n/**\n * Loads the config that drives the removal plan. A config file that exists but\n * cannot be parsed (`ConfigLoadError`) is reported through `onLoadFailed` and\n * then treated exactly like a missing one — an unreadable config is precisely\n * when a user needs to uninstall, so it must never fail the run. Same posture as\n * the `deregisterProjectPath` call site. Only the plan degrades: the plugins and\n * compiled agents the config named can no longer be identified, while file\n * removal proceeds. Any other failure is a real fault and still propagates.\n */\nasync function loadUninstallConfig(\n projectDir: string,\n onLoadFailed: (reason: string) => void,\n): Promise<ProjectConfig | null> {\n try {\n const result = await loadProjectConfigFromDir(projectDir);\n return result?.config ?? null;\n } catch (error) {\n if (!(error instanceof ConfigLoadError)) throw error;\n onLoadFailed(getErrorMessage(error));\n return null;\n }\n}\n\n/**\n * Detects what's installed in a project directory for uninstallation.\n *\n * Checks for plugins, local skills, agents, config directories, and\n * resolves which plugins were installed by this CLI.\n */\nasync function detectUninstallTarget(\n projectDir: string,\n onConfigLoadFailed: (reason: string) => void,\n): Promise<UninstallTarget> {\n const pluginsDir = getProjectPluginsDir(projectDir);\n const { skillsDir, agentsDir } = resolveInstallPaths(projectDir);\n const claudeDir = path.join(projectDir, CLAUDE_DIR);\n const claudeSrcDir = path.join(projectDir, CLAUDE_SRC_DIR);\n\n const claudeSrcConfigPath = path.join(claudeSrcDir, STANDARD_FILES.CONFIG_TS);\n const claudeSrcConfigTypesPath = path.join(claudeSrcDir, STANDARD_FILES.CONFIG_TYPES_TS);\n\n const [\n hasLocalSkills,\n hasLocalAgents,\n hasClaudeDir,\n hasClaudeSrcConfig,\n hasClaudeSrcConfigTypes,\n config,\n agentProvenance,\n ] = await Promise.all([\n directoryExists(skillsDir),\n directoryExists(agentsDir),\n directoryExists(claudeDir),\n fileExists(claudeSrcConfigPath),\n fileExists(claudeSrcConfigTypesPath),\n loadUninstallConfig(projectDir, onConfigLoadFailed),\n splitAgentsByProvenance(agentsDir),\n ]);\n\n let pluginNames: string[] = [];\n try {\n pluginNames = await listPluginNames(projectDir);\n } catch {\n // Best-effort: plugin detection may fail\n }\n\n const activeConfig = config\n ? {\n ...config,\n skills: config.skills.filter((s) => !s.excluded),\n agents: config.agents.filter((a) => !a.excluded),\n }\n : null;\n const configuredAgents = collectConfiguredAgents(activeConfig);\n const cliInstalledKeys = getCliInstalledPluginKeys(activeConfig);\n const cliPluginNames = pluginNames.filter((name) => cliInstalledKeys.has(name));\n\n return {\n hasPlugins: cliPluginNames.length > 0,\n pluginNames,\n cliPluginNames,\n hasLocalSkills,\n hasLocalAgents,\n hasClaudeDir,\n hasClaudeSrcConfig,\n hasClaudeSrcConfigTypes,\n pluginsDir,\n skillsDir,\n agentsDir,\n claudeDir,\n claudeSrcDir,\n config,\n configuredAgents,\n markedAgents: agentProvenance.marked,\n unmarkedAgents: agentProvenance.unmarked,\n };\n}\n\nfunction shouldRemoveSkill(forkedFrom: { source?: string } | null): boolean {\n return forkedFrom !== null;\n}\n\nasync function removeMatchingSkills(\n entry: SkillsRemoval,\n onRemoved?: (dirName: string) => void,\n onSkipped?: (dirName: string) => void,\n): Promise<SkillRemovalResult> {\n const classified = await classifySkillDirs(entry.skillsDir);\n const removedNames = await removeClassifiedSkills(\n classified.toRemove,\n entry.skillsDir,\n onRemoved,\n );\n classified.toSkip.forEach((name) => onSkipped?.(name));\n const dirCleaned = await cleanupSkillsDir(entry.skillsDir, classified.toSkip.length === 0);\n\n return {\n removedCount: removedNames.length,\n skippedCount: classified.toSkip.length,\n removedNames,\n skippedNames: classified.toSkip,\n dirCleaned,\n };\n}\n\nasync function classifySkillDirs(\n skillsDir: string,\n): Promise<{ toRemove: string[]; toSkip: string[] }> {\n const dirNames = await listDirectories(skillsDir);\n const entries = await Promise.all(\n dirNames.map(async (name) => ({\n name,\n forkedFrom: await readForkedFromMetadata(path.join(skillsDir, name)),\n })),\n );\n const [removable, skippable] = partition(entries, (entry) => shouldRemoveSkill(entry.forkedFrom));\n return { toRemove: removable.map((e) => e.name), toSkip: skippable.map((e) => e.name) };\n}\n\nasync function removeClassifiedSkills(\n names: string[],\n skillsDir: string,\n onRemoved?: (name: string) => void,\n): Promise<string[]> {\n for (const name of names) {\n await remove(path.join(skillsDir, name));\n onRemoved?.(name);\n }\n return names;\n}\n\nasync function cleanupSkillsDir(dir: string, allRemoved: boolean): Promise<boolean> {\n if (!allRemoved) return false;\n return removeDirIfEmpty(dir);\n}\n\n/**\n * Removes the compiled agent .md files the plan's agents entry names.\n *\n * A file is removed only when its basename is one the entry names; every other agent file\n * is preserved. Cleans up the agents directory if empty after removal. Which names those are\n * — the configured roster, or the files carrying the provenance marker — is the plan's\n * decision, not this function's, and so is whether to act at all: no entry, no call.\n *\n * @param onRemoved - Called for each removed agent name (for logging)\n */\nasync function removeMatchingAgents(\n entry: AgentsRemoval,\n onRemoved?: (agentName: string) => void,\n): Promise<AgentRemovalResult> {\n const agentFiles = await listAgentFiles(entry.agentsDir);\n const removedNames = agentFiles\n .map((agentFile) => agentFile.replace(/\\.md$/, \"\"))\n .filter((agentName) => entry.agentNames.includes(agentName));\n\n for (const agentName of removedNames) {\n await remove(path.join(entry.agentsDir, `${agentName}.md`));\n onRemoved?.(agentName);\n }\n\n const dirCleaned = await removeDirIfEmpty(entry.agentsDir);\n\n return {\n removedCount: removedNames.length,\n removedNames,\n dirCleaned,\n };\n}\n\n/**\n * Uninstalls the plugins the plan's plugins entry names, by removing them from the\n * Claude CLI and deleting their local directories. The entry decides WHICH plugins go;\n * `config` only answers HOW to ask the Claude CLI — the scope its registry filed each\n * one under, per-skill where the config says, project-level otherwise.\n *\n * @param onUninstalled - Called for each successfully uninstalled plugin name (for logging)\n * @internal Exported for testing\n */\nexport async function uninstallPlugins(\n entry: PluginRemoval,\n config: ProjectConfig | null,\n projectDir: string,\n onUninstalled?: (pluginName: string) => void,\n): Promise<UninstallPluginsResult> {\n const cliAvailable = await isClaudeCLIAvailable();\n\n for (const pluginName of entry.names) {\n if (cliAvailable) {\n // Derive primary scope from per-skill config; shared helper tries both scopes\n // to handle re-scoped plugins where the registry entry may be under the\n // original scope rather than the currently-configured one.\n const skillId = parseMarketplacePluginRef(pluginName);\n const skillConfig = config?.skills.find((s) => s.id === skillId);\n const primaryScope = toClaudePluginScope(skillConfig?.scope);\n await claudePluginUninstallBestEffort(pluginName, primaryScope, projectDir);\n }\n\n const pluginPath = path.join(entry.pluginsDir, pluginName);\n await remove(pluginPath);\n onUninstalled?.(pluginName);\n }\n\n // Every iteration either completes or throws (aborting the whole uninstall),\n // so reaching this return means every plugin the plan named was removed.\n return {\n uninstalledNames: entry.names,\n totalUninstalled: entry.names.length,\n };\n}\n\n/**\n * Removes exactly the manifest files the plan's config entry names from .claude-src/,\n * then the .claude-src/ directory itself when it has nothing else left. User-owned\n * content in .claude-src/ (e.g. ejected templates) keeps the directory alive. No entry\n * means the plan promised no manifest removal, so none is made.\n */\nasync function removeConfigManifest(\n entry: ConfigManifestRemoval | undefined,\n): Promise<{ manifestRemoved: boolean; dirRemoved: boolean }> {\n if (!entry) return { manifestRemoved: false, dirRemoved: false };\n\n await Promise.all(\n entry.fileNames.map((fileName) => remove(path.join(entry.claudeSrcDir, fileName))),\n );\n\n return { manifestRemoved: true, dirRemoved: await removeDirIfEmpty(entry.claudeSrcDir) };\n}\n\n/**\n * Removes the CLI config manifest the plan named, then cleans up the emptied .claude/\n * and .claude-src/ directories.\n *\n * The directories themselves are not plan entries — they are the user's, and are removed\n * only when nothing of theirs is left in them once the CLI-managed contents are gone.\n */\nasync function cleanupEmptyDirs(\n target: Pick<UninstallTarget, \"hasClaudeDir\" | \"claudeDir\">,\n manifestEntry: ConfigManifestRemoval | undefined,\n): Promise<CleanupResult> {\n const manifest = await removeConfigManifest(manifestEntry);\n\n const claudeDirRemoved = target.hasClaudeDir && (await removeDirIfEmpty(target.claudeDir));\n // Nothing else removes .claude itself, so \"kept\" is exactly \"present but not removed\".\n const claudeDirKept =\n !claudeDirRemoved && target.hasClaudeDir && (await directoryExists(target.claudeDir));\n\n return {\n claudeDirRemoved,\n claudeSrcManifestRemoved: manifest.manifestRemoved,\n claudeSrcDirRemoved: manifest.dirRemoved,\n claudeDirKept,\n };\n}\n\nasync function listAgentFiles(agentsDir: string): Promise<string[]> {\n try {\n return await listAgentMdFiles(agentsDir);\n } catch {\n return [];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAkB;AAClB,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AAEjB,SAAS,aAAa;AAwThB;AAnON,SAAS,iBAAiB,QAAsC;AAC9D,QAAM,SAAS,oBAAoB,MAAM;AAEzC,SAAO;AAAA,IACL,SAAS;AAAA,MACP,GAAG,aAAa,MAAM;AAAA,MACtB,GAAG,iBAAiB,MAAM;AAAA,MAC1B,GAAG;AAAA,MACH,GAAG,oBAAoB,MAAM;AAAA,IAC/B;AAAA,IACA,MAAM,eAAe,QAAQ,MAAM;AAAA,EACrC;AACF;AAGA,SAAS,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AAA,IACxB,kBAAkB,MAAM,MAAM;AAAA,EAChC;AACF;AAQA,eAAe,qBACb,OAC4D;AAC5D,MAAI,CAAC,MAAO,QAAO,EAAE,iBAAiB,OAAO,YAAY,MAAM;AAE/D,QAAM,QAAQ;AAAA,IACZ,MAAM,UAAU,IAAI,CAAC,aAAa,OAAO,KAAK,KAAK,MAAM,cAAc,QAAQ,CAAC,CAAC;AAAA,EACnF;AAEA,SAAO,EAAE,iBAAiB,MAAM,YAAY,MAAM,iBAAiB,MAAM,YAAY,EAAE;AACzF;AASA,eAAe,iBACb,QACA,eACwB;AACxB,QAAM,WAAW,MAAM,qBAAqB,aAAa;AAEzD,QAAM,mBAAmB,OAAO,gBAAiB,MAAM,iBAAiB,OAAO,SAAS;AAExF,QAAM,gBACJ,CAAC,oBAAoB,OAAO,gBAAiB,MAAM,gBAAgB,OAAO,SAAS;AAErF,SAAO;AAAA,IACL;AAAA,IACA,0BAA0B,SAAS;AAAA,IACnC,qBAAqB,SAAS;AAAA,IAC9B;AAAA,EACF;AACF;AAEA,eAAe,eAAe,WAAsC;AAClE,MAAI;AACF,WAAO,MAAM,iBAAiB,SAAS;AAAA,EACzC,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;","names":[]}
|
package/dist/commands/update.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-YO2LTXB4.js";
|
|
6
|
+
import "../chunk-UMH2YZKG.js";
|
|
7
|
+
import "../chunk-G47TDUK3.js";
|
|
8
8
|
import {
|
|
9
9
|
ERROR_MESSAGES,
|
|
10
10
|
INFO_MESSAGES,
|
|
@@ -14,27 +14,27 @@ import {
|
|
|
14
14
|
marketplaceRefreshFailed,
|
|
15
15
|
marketplacesRefreshFailed,
|
|
16
16
|
marketplacesRefreshed
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-WCAUUBHO.js";
|
|
18
18
|
import {
|
|
19
19
|
getErrorMessage
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-XAXJWXI4.js";
|
|
21
|
+
import "../chunk-RWOYPOMR.js";
|
|
22
22
|
import "../chunk-VASLW636.js";
|
|
23
23
|
import {
|
|
24
24
|
EJECT_SOURCE
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-IO5YBKHV.js";
|
|
26
26
|
import "../chunk-VZRO7RYT.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/commands/update.ts
|
|
29
29
|
import { unique } from "remeda";
|
|
30
30
|
function isEjected(skill) {
|
|
31
|
-
return skill.
|
|
31
|
+
return skill.origin === EJECT_SOURCE;
|
|
32
32
|
}
|
|
33
33
|
function activeSkills(skills) {
|
|
34
34
|
return skills.filter((skill) => !skill.excluded);
|
|
35
35
|
}
|
|
36
36
|
function configuredMarketplaces(skills) {
|
|
37
|
-
return unique(skills.filter((skill) => !isEjected(skill)).map((skill) => skill.
|
|
37
|
+
return unique(skills.filter((skill) => !isEjected(skill)).map((skill) => skill.origin));
|
|
38
38
|
}
|
|
39
39
|
var Update = class _Update extends BaseCommand {
|
|
40
40
|
static summary = "Refresh the marketplaces this installation uses";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/update.ts"],"sourcesContent":["import { unique } from \"remeda\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { EJECT_SOURCE } from \"../consts.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { loadProjectConfig } from \"../lib/configuration/index.js\";\nimport { claudePluginMarketplaceUpdate, isClaudeCLIAvailable } from \"../utils/exec.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport {\n ERROR_MESSAGES,\n INFO_MESSAGES,\n marketplaceRefreshFailed,\n marketplacesRefreshFailed,\n marketplacesRefreshed,\n} from \"../utils/messages.js\";\nimport type { ProjectConfig, SkillConfig } from \"../types/index.js\";\n\n/** A copy the user owns rather than a plugin the marketplace serves. */\nfunction isEjected(skill: SkillConfig): boolean {\n return skill.
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/update.ts"],"sourcesContent":["import { unique } from \"remeda\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { EJECT_SOURCE } from \"../consts.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { loadProjectConfig } from \"../lib/configuration/index.js\";\nimport { claudePluginMarketplaceUpdate, isClaudeCLIAvailable } from \"../utils/exec.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport {\n ERROR_MESSAGES,\n INFO_MESSAGES,\n marketplaceRefreshFailed,\n marketplacesRefreshFailed,\n marketplacesRefreshed,\n} from \"../utils/messages.js\";\nimport type { ProjectConfig, SkillConfig } from \"../types/index.js\";\n\n/** A copy the user owns rather than a plugin the marketplace serves. */\nfunction isEjected(skill: SkillConfig): boolean {\n return skill.origin === EJECT_SOURCE;\n}\n\n/** Entries the installation actually has — an excluded entry is a tombstone, not an install. */\nfunction activeSkills(skills: SkillConfig[]): SkillConfig[] {\n return skills.filter((skill) => !skill.excluded);\n}\n\n/** The marketplaces this installation actually uses, deduplicated, in config order. */\nfunction configuredMarketplaces(skills: SkillConfig[]): string[] {\n return unique(skills.filter((skill) => !isEjected(skill)).map((skill) => skill.origin));\n}\n\nexport default class Update extends BaseCommand {\n static summary = \"Refresh the marketplaces this installation uses\";\n\n static description =\n \"Runs Claude's own marketplace update for every marketplace this installation's config names. Ejected skills are copies you own and are never touched. Sub-agents reference plugin skills by pointer, so refreshed content lands without recompiling anything.\";\n\n static flags = {};\n\n static examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n async run(): Promise<void> {\n await this.parse(Update);\n\n const config = await this.loadInstalledConfig(process.cwd());\n if (!config) {\n this.warn(ERROR_MESSAGES.NO_INSTALLATION);\n return;\n }\n\n const skills = activeSkills(config.skills);\n this.reportEjectedSkills(skills);\n\n const marketplaces = configuredMarketplaces(skills);\n if (marketplaces.length === 0) {\n this.log(INFO_MESSAGES.NO_PLUGIN_MARKETPLACES);\n return;\n }\n\n await this.requireClaudeCli();\n await this.refreshMarketplaces(marketplaces);\n }\n\n /**\n * The config this directory's installation runs on — the project's own, or the\n * global one it inherits from. A config file that exists but cannot be loaded is\n * a fault, not an absence, so it is reported rather than read as \"not installed\".\n */\n private async loadInstalledConfig(projectDir: string): Promise<ProjectConfig | null> {\n try {\n const loaded = await loadProjectConfig(projectDir);\n return loaded?.config ?? null;\n } catch (error) {\n this.error(getErrorMessage(error), { exit: EXIT_CODES.ERROR });\n }\n }\n\n /** States the ownership rule once, and only where there is an ejected skill it applies to. */\n private reportEjectedSkills(skills: SkillConfig[]): void {\n if (!skills.some(isEjected)) return;\n this.log(INFO_MESSAGES.EJECTED_SKILLS_USER_OWNED);\n }\n\n /**\n * Gated on there being a marketplace to refresh, so an eject-only installation\n * never fails on a Claude CLI it had no reason to call.\n */\n private async requireClaudeCli(): Promise<void> {\n if (await isClaudeCLIAvailable()) return;\n this.error(ERROR_MESSAGES.CLAUDE_CLI_NOT_FOUND, { exit: EXIT_CODES.ERROR });\n }\n\n /**\n * One `claude plugin marketplace update` per marketplace, in sequence: they write\n * to the same registry, and interleaved progress lines would not say which\n * marketplace each belongs to. A failure is collected rather than thrown, so one\n * unreachable marketplace cannot hide the state of the others.\n */\n private async refreshMarketplaces(marketplaces: string[]): Promise<void> {\n const failed: string[] = [];\n\n for (const marketplace of marketplaces) {\n this.log(`Refreshing marketplace ${marketplace}...`);\n try {\n await claudePluginMarketplaceUpdate(marketplace);\n this.log(` Updated marketplace ${marketplace}`);\n } catch (error) {\n failed.push(marketplace);\n this.warn(marketplaceRefreshFailed(marketplace, getErrorMessage(error)));\n }\n }\n\n if (failed.length > 0) {\n this.error(marketplacesRefreshFailed(failed), { exit: EXIT_CODES.ERROR });\n }\n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AC/D;AAAA,EACF;AAAA;AAAA,EAGQ,oBAAoB,QAA6B;AACvD,QAAI,CAAC,OAAO,KAAK,SAAS,EAAG;AAC7B,SAAK,IAAI,cAAc,yBAAyB;AAAA,EAClD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAc,mBAAkC;AAC9C,QAAI,MAAM,qBAAqB,EAAG;AAClC,SAAK,MAAM,eAAe,sBAAsB,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,EAC5E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAc,oBAAoB,cAAuC;AACvE,UAAM,SAAmB,CAAC;AAE1B,eAAW,eAAe,cAAc;AACtC,WAAK,IAAI,0BAA0B,WAAW,KAAK;AACnD,UAAI;AACF,cAAM,8BAA8B,WAAW;AAC/C,aAAK,IAAI,yBAAyB,WAAW,EAAE;AAAA,MACjD,SAAS,OAAO;AACd,eAAO,KAAK,WAAW;AACvB,aAAK,KAAK,yBAAyB,aAAa,gBAAgB,KAAK,CAAC,CAAC;AAAA,MACzE;AAAA,IACF;AAEA,QAAI,OAAO,SAAS,GAAG;AACrB,WAAK,MAAM,0BAA0B,MAAM,GAAG,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,IAC1E;AAEA,SAAK,WAAW,sBAAsB,aAAa,MAAM,CAAC;AAAA,EAC5D;AACF;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CategoryGrid
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-4A4L3YIW.js";
|
|
5
5
|
import "../../chunk-J27W6TXS.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-WTJ3AY33.js";
|
|
7
|
+
import "../../chunk-OKH64JZE.js";
|
|
8
|
+
import "../../chunk-RWOYPOMR.js";
|
|
9
9
|
import "../../chunk-VASLW636.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-IO5YBKHV.js";
|
|
11
11
|
export {
|
|
12
12
|
CategoryGrid
|
|
13
13
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CheckboxGrid
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-SY4X2LND.js";
|
|
5
|
+
import "../../chunk-WFRTHH3A.js";
|
|
6
|
+
import "../../chunk-WTJ3AY33.js";
|
|
7
|
+
import "../../chunk-OKH64JZE.js";
|
|
8
|
+
import "../../chunk-IO5YBKHV.js";
|
|
9
9
|
export {
|
|
10
10
|
CheckboxGrid
|
|
11
11
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
DomainSelection
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-QWVXOCXO.js";
|
|
5
|
+
import "../../chunk-5OKLCVM4.js";
|
|
6
|
+
import "../../chunk-SY4X2LND.js";
|
|
7
|
+
import "../../chunk-WFRTHH3A.js";
|
|
8
|
+
import "../../chunk-WTJ3AY33.js";
|
|
9
|
+
import "../../chunk-OKH64JZE.js";
|
|
10
|
+
import "../../chunk-F5T6TV4Z.js";
|
|
11
|
+
import "../../chunk-WCAUUBHO.js";
|
|
12
|
+
import "../../chunk-XAXJWXI4.js";
|
|
13
|
+
import "../../chunk-RWOYPOMR.js";
|
|
14
14
|
import "../../chunk-VASLW636.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-IO5YBKHV.js";
|
|
16
16
|
import "../../chunk-VZRO7RYT.js";
|
|
17
17
|
export {
|
|
18
18
|
DomainSelection
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runWizardSession
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-IXRZAHZF.js";
|
|
5
|
+
import "../../chunk-TNGMF4UX.js";
|
|
6
|
+
import "../../chunk-LJCNUP6M.js";
|
|
7
|
+
import "../../chunk-HTYH7CKN.js";
|
|
8
|
+
import "../../chunk-PCC4LBKB.js";
|
|
9
|
+
import "../../chunk-HG4JPXJT.js";
|
|
10
|
+
import "../../chunk-6RLV45HN.js";
|
|
11
|
+
import "../../chunk-ILUVL7WM.js";
|
|
12
|
+
import "../../chunk-HXKOIWLU.js";
|
|
13
|
+
import "../../chunk-QWVXOCXO.js";
|
|
14
|
+
import "../../chunk-GS2NZ3GD.js";
|
|
15
|
+
import "../../chunk-VPASBA7P.js";
|
|
16
|
+
import "../../chunk-PNMM5HNX.js";
|
|
17
|
+
import "../../chunk-CLFHC2DK.js";
|
|
18
|
+
import "../../chunk-5OKLCVM4.js";
|
|
19
|
+
import "../../chunk-5F2YR5XV.js";
|
|
17
20
|
import "../../chunk-TSIU7DME.js";
|
|
18
21
|
import "../../chunk-XVAQG2CV.js";
|
|
19
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-4A4L3YIW.js";
|
|
20
23
|
import "../../chunk-J27W6TXS.js";
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
23
|
-
import "../../chunk-
|
|
24
|
-
import "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
27
|
-
import "../../chunk-6CNRMCFM.js";
|
|
28
|
-
import "../../chunk-B66SC72V.js";
|
|
24
|
+
import "../../chunk-SY4X2LND.js";
|
|
25
|
+
import "../../chunk-WFRTHH3A.js";
|
|
26
|
+
import "../../chunk-WTJ3AY33.js";
|
|
27
|
+
import "../../chunk-OKH64JZE.js";
|
|
28
|
+
import "../../chunk-JCPANDNR.js";
|
|
29
|
+
import "../../chunk-Y5Y7XHVU.js";
|
|
29
30
|
import "../../chunk-JFLVEFFP.js";
|
|
30
|
-
import "../../chunk-
|
|
31
|
-
import "../../chunk-
|
|
32
|
-
import "../../chunk-
|
|
33
|
-
import "../../chunk-
|
|
34
|
-
import "../../chunk-
|
|
31
|
+
import "../../chunk-F5T6TV4Z.js";
|
|
32
|
+
import "../../chunk-G47TDUK3.js";
|
|
33
|
+
import "../../chunk-WCAUUBHO.js";
|
|
34
|
+
import "../../chunk-XAXJWXI4.js";
|
|
35
|
+
import "../../chunk-RWOYPOMR.js";
|
|
35
36
|
import "../../chunk-VASLW636.js";
|
|
36
|
-
import "../../chunk-
|
|
37
|
+
import "../../chunk-IO5YBKHV.js";
|
|
37
38
|
import "../../chunk-VZRO7RYT.js";
|
|
38
39
|
export {
|
|
39
40
|
runWizardSession
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
SkillAgentSummary
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-Y5Y7XHVU.js";
|
|
5
|
+
import "../../chunk-F5T6TV4Z.js";
|
|
6
|
+
import "../../chunk-WCAUUBHO.js";
|
|
7
|
+
import "../../chunk-XAXJWXI4.js";
|
|
8
|
+
import "../../chunk-RWOYPOMR.js";
|
|
9
9
|
import "../../chunk-VASLW636.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-IO5YBKHV.js";
|
|
11
11
|
import "../../chunk-VZRO7RYT.js";
|
|
12
12
|
export {
|
|
13
13
|
SkillAgentSummary
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SourceGrid,
|
|
4
4
|
isRowInert
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-GS2NZ3GD.js";
|
|
6
|
+
import "../../chunk-VPASBA7P.js";
|
|
6
7
|
import "../../chunk-J27W6TXS.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-IPJOMAWC.js";
|
|
8
|
+
import "../../chunk-WTJ3AY33.js";
|
|
9
|
+
import "../../chunk-OKH64JZE.js";
|
|
10
|
+
import "../../chunk-RWOYPOMR.js";
|
|
11
11
|
import "../../chunk-VASLW636.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-IO5YBKHV.js";
|
|
13
13
|
export {
|
|
14
14
|
SourceGrid,
|
|
15
15
|
isRowInert
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StackSelection
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-PNMM5HNX.js";
|
|
5
5
|
import "../../chunk-TSIU7DME.js";
|
|
6
6
|
import "../../chunk-XVAQG2CV.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-WFRTHH3A.js";
|
|
8
|
+
import "../../chunk-OKH64JZE.js";
|
|
9
|
+
import "../../chunk-F5T6TV4Z.js";
|
|
10
|
+
import "../../chunk-WCAUUBHO.js";
|
|
11
|
+
import "../../chunk-XAXJWXI4.js";
|
|
12
|
+
import "../../chunk-RWOYPOMR.js";
|
|
13
13
|
import "../../chunk-VASLW636.js";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-IO5YBKHV.js";
|
|
15
15
|
import "../../chunk-VZRO7RYT.js";
|
|
16
16
|
export {
|
|
17
17
|
StackSelection
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepAgents
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-CLFHC2DK.js";
|
|
5
|
+
import "../../chunk-5OKLCVM4.js";
|
|
5
6
|
import "../../chunk-TSIU7DME.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-4VCWL2IG.js";
|
|
14
|
-
import "../../chunk-IPJOMAWC.js";
|
|
7
|
+
import "../../chunk-WFRTHH3A.js";
|
|
8
|
+
import "../../chunk-WTJ3AY33.js";
|
|
9
|
+
import "../../chunk-OKH64JZE.js";
|
|
10
|
+
import "../../chunk-F5T6TV4Z.js";
|
|
11
|
+
import "../../chunk-WCAUUBHO.js";
|
|
12
|
+
import "../../chunk-XAXJWXI4.js";
|
|
13
|
+
import "../../chunk-RWOYPOMR.js";
|
|
15
14
|
import "../../chunk-VASLW636.js";
|
|
16
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-IO5YBKHV.js";
|
|
17
16
|
import "../../chunk-VZRO7RYT.js";
|
|
18
17
|
export {
|
|
19
18
|
StepAgents
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepBuild
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-5F2YR5XV.js";
|
|
5
5
|
import "../../chunk-TSIU7DME.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-4A4L3YIW.js";
|
|
7
7
|
import "../../chunk-J27W6TXS.js";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-WTJ3AY33.js";
|
|
9
|
+
import "../../chunk-OKH64JZE.js";
|
|
10
|
+
import "../../chunk-F5T6TV4Z.js";
|
|
11
|
+
import "../../chunk-WCAUUBHO.js";
|
|
12
|
+
import "../../chunk-XAXJWXI4.js";
|
|
13
|
+
import "../../chunk-RWOYPOMR.js";
|
|
14
14
|
import "../../chunk-VASLW636.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-IO5YBKHV.js";
|
|
16
16
|
import "../../chunk-VZRO7RYT.js";
|
|
17
17
|
export {
|
|
18
18
|
StepBuild
|