@agents-inc/cli 0.42.0 → 0.45.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.
Files changed (166) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +128 -113
  3. package/assets/logo.png +0 -0
  4. package/assets/logo.svg +75 -0
  5. package/config/stacks.yaml +0 -321
  6. package/dist/{chunk-J73KIP6Z.js → chunk-3JRWNWBF.js} +66 -4
  7. package/dist/chunk-3JRWNWBF.js.map +1 -0
  8. package/dist/{chunk-MHET2RG2.js → chunk-3S4GIO4B.js} +2 -2
  9. package/dist/{chunk-UXNHU7Y7.js → chunk-473YHDYQ.js} +3 -12
  10. package/dist/chunk-473YHDYQ.js.map +1 -0
  11. package/dist/{chunk-GVRZY5KI.js → chunk-5BDYODWP.js} +3 -3
  12. package/dist/{chunk-53K3URKF.js → chunk-ABE55TEU.js} +5 -3
  13. package/dist/chunk-ABE55TEU.js.map +1 -0
  14. package/dist/{chunk-2TWELY5M.js → chunk-ARET3NYO.js} +3 -3
  15. package/dist/{chunk-X34RGEFX.js → chunk-CLHBKFHU.js} +2 -2
  16. package/dist/{chunk-ORJPGZVD.js → chunk-DAVOSI4M.js} +7 -7
  17. package/dist/chunk-DAVOSI4M.js.map +1 -0
  18. package/dist/{chunk-IUYU2TP6.js → chunk-ELRGSZHZ.js} +7 -7
  19. package/dist/{chunk-MI4NWOWD.js → chunk-ENWMWIHP.js} +7 -7
  20. package/dist/{chunk-52SI5XJH.js → chunk-F3O5YHSI.js} +2 -7
  21. package/dist/chunk-F3O5YHSI.js.map +1 -0
  22. package/dist/{chunk-PP7NDFFE.js → chunk-FVN5PFFY.js} +8 -1
  23. package/dist/{chunk-PP7NDFFE.js.map → chunk-FVN5PFFY.js.map} +1 -1
  24. package/dist/{chunk-XRA4LHTJ.js → chunk-FYNMNY4P.js} +6 -8
  25. package/dist/chunk-FYNMNY4P.js.map +1 -0
  26. package/dist/{chunk-GCN7GGWE.js → chunk-GUIRWCKI.js} +3 -3
  27. package/dist/{chunk-AQANPOLS.js → chunk-HKRLWERR.js} +2 -2
  28. package/dist/{chunk-EPJ2GJNJ.js → chunk-KCYNTAAF.js} +9 -9
  29. package/dist/{chunk-33D24DAF.js → chunk-KVHLKPYB.js} +10 -10
  30. package/dist/{chunk-MMD26LKJ.js → chunk-KWWLPPHF.js} +2 -2
  31. package/dist/{chunk-FDY6SGSA.js → chunk-KZNPPUQG.js} +2 -2
  32. package/dist/{chunk-GIZ6DENW.js → chunk-M2XPTQDT.js} +4 -4
  33. package/dist/{chunk-BKW34TKI.js → chunk-M3AGB4TR.js} +3 -3
  34. package/dist/{chunk-ZHJEZ7AU.js → chunk-NTPHCNJO.js} +2 -2
  35. package/dist/{chunk-44QCEK7E.js → chunk-OALQWRLG.js} +2 -2
  36. package/dist/{chunk-PEAPABFI.js → chunk-OLZBZAW4.js} +2 -2
  37. package/dist/{chunk-FF4Z7MHY.js → chunk-Q5BSIARS.js} +26 -18
  38. package/dist/chunk-Q5BSIARS.js.map +1 -0
  39. package/dist/{chunk-UVVNWF43.js → chunk-SBWMSNS2.js} +2 -2
  40. package/dist/{chunk-ALWLM5MC.js → chunk-SRFNNOLC.js} +2 -2
  41. package/dist/{chunk-KA253GGY.js → chunk-SYGEV3KV.js} +4 -4
  42. package/dist/{chunk-HMGWGWFT.js → chunk-V43QDMYQ.js} +2 -2
  43. package/dist/{chunk-WMAALRQI.js → chunk-VTDEENSP.js} +4 -4
  44. package/dist/{chunk-VHGIQN5O.js → chunk-WWSKP5SR.js} +4 -4
  45. package/dist/{chunk-EFZN22TO.js → chunk-YQFU2KZ5.js} +3 -3
  46. package/dist/{chunk-SYHRJG5G.js → chunk-ZECXM7LP.js} +162 -278
  47. package/dist/chunk-ZECXM7LP.js.map +1 -0
  48. package/dist/commands/build/marketplace.js +3 -3
  49. package/dist/commands/build/plugins.js +5 -5
  50. package/dist/commands/build/stack.js +5 -5
  51. package/dist/commands/compile.js +6 -6
  52. package/dist/commands/config/get.js +4 -4
  53. package/dist/commands/config/index.js +5 -5
  54. package/dist/commands/config/path.js +4 -4
  55. package/dist/commands/config/set-project.js +4 -4
  56. package/dist/commands/config/show.js +5 -5
  57. package/dist/commands/config/unset-project.js +4 -4
  58. package/dist/commands/diff.js +4 -4
  59. package/dist/commands/doctor.js +4 -4
  60. package/dist/commands/edit.js +33 -30
  61. package/dist/commands/edit.js.map +1 -1
  62. package/dist/commands/eject.js +39 -14
  63. package/dist/commands/eject.js.map +1 -1
  64. package/dist/commands/import/skill.js +5 -5
  65. package/dist/commands/info.js +5 -5
  66. package/dist/commands/init.js +31 -36
  67. package/dist/commands/init.js.map +1 -1
  68. package/dist/commands/list.js +4 -4
  69. package/dist/commands/new/agent.js +5 -5
  70. package/dist/commands/new/skill.js +4 -5
  71. package/dist/commands/new/skill.js.map +1 -1
  72. package/dist/commands/outdated.js +4 -4
  73. package/dist/commands/search.js +7 -7
  74. package/dist/commands/uninstall.js +6 -6
  75. package/dist/commands/update.js +6 -6
  76. package/dist/commands/validate.js +5 -5
  77. package/dist/components/skill-search/skill-search.js +3 -3
  78. package/dist/components/wizard/category-grid.js +2 -2
  79. package/dist/components/wizard/category-grid.test.js +184 -98
  80. package/dist/components/wizard/category-grid.test.js.map +1 -1
  81. package/dist/components/wizard/checkbox-grid.js +3 -3
  82. package/dist/components/wizard/checkbox-grid.test.js +3 -3
  83. package/dist/components/wizard/domain-selection.js +8 -8
  84. package/dist/components/wizard/help-modal.js +2 -2
  85. package/dist/components/wizard/menu-item.js +1 -1
  86. package/dist/components/wizard/search-modal.js +2 -2
  87. package/dist/components/wizard/search-modal.test.js +2 -11
  88. package/dist/components/wizard/search-modal.test.js.map +1 -1
  89. package/dist/components/wizard/section-progress.js +2 -2
  90. package/dist/components/wizard/section-progress.test.js +2 -2
  91. package/dist/components/wizard/selection-card.js +2 -2
  92. package/dist/components/wizard/source-grid.js +3 -3
  93. package/dist/components/wizard/source-grid.test.js +5 -9
  94. package/dist/components/wizard/source-grid.test.js.map +1 -1
  95. package/dist/components/wizard/stack-selection.js +8 -8
  96. package/dist/components/wizard/step-agents.js +7 -7
  97. package/dist/components/wizard/step-agents.test.js +7 -7
  98. package/dist/components/wizard/step-build.js +8 -8
  99. package/dist/components/wizard/step-build.test.js +25 -40
  100. package/dist/components/wizard/step-build.test.js.map +1 -1
  101. package/dist/components/wizard/step-confirm.js +3 -3
  102. package/dist/components/wizard/step-confirm.test.js +7 -7
  103. package/dist/components/wizard/step-refine.js +2 -2
  104. package/dist/components/wizard/step-refine.test.js +2 -2
  105. package/dist/components/wizard/step-settings.js +5 -5
  106. package/dist/components/wizard/step-settings.test.js +8 -8
  107. package/dist/components/wizard/step-sources.js +11 -11
  108. package/dist/components/wizard/step-sources.test.js +14 -20
  109. package/dist/components/wizard/step-sources.test.js.map +1 -1
  110. package/dist/components/wizard/step-stack.js +11 -11
  111. package/dist/components/wizard/step-stack.test.js +17 -26
  112. package/dist/components/wizard/step-stack.test.js.map +1 -1
  113. package/dist/components/wizard/view-title.js +2 -2
  114. package/dist/components/wizard/wizard-layout.js +8 -8
  115. package/dist/components/wizard/wizard-tabs.js +2 -2
  116. package/dist/components/wizard/wizard-tabs.test.js +2 -2
  117. package/dist/components/wizard/wizard.js +26 -26
  118. package/dist/config/stacks.yaml +0 -321
  119. package/dist/hooks/init.js +3 -3
  120. package/dist/{source-manager-ABK5COKX.js → source-manager-HXFXBZJU.js} +4 -4
  121. package/dist/stores/wizard-store.js +5 -5
  122. package/dist/stores/wizard-store.test.js +29 -49
  123. package/dist/stores/wizard-store.test.js.map +1 -1
  124. package/package.json +3 -1
  125. package/src/schemas/metadata.schema.json +0 -5
  126. package/dist/chunk-52SI5XJH.js.map +0 -1
  127. package/dist/chunk-53K3URKF.js.map +0 -1
  128. package/dist/chunk-FF4Z7MHY.js.map +0 -1
  129. package/dist/chunk-J73KIP6Z.js.map +0 -1
  130. package/dist/chunk-ORJPGZVD.js.map +0 -1
  131. package/dist/chunk-SYHRJG5G.js.map +0 -1
  132. package/dist/chunk-UXNHU7Y7.js.map +0 -1
  133. package/dist/chunk-XRA4LHTJ.js.map +0 -1
  134. package/dist/commands/version/bump.js +0 -79
  135. package/dist/commands/version/bump.js.map +0 -1
  136. package/dist/commands/version/index.js +0 -54
  137. package/dist/commands/version/index.js.map +0 -1
  138. package/dist/commands/version/set.js +0 -86
  139. package/dist/commands/version/set.js.map +0 -1
  140. package/dist/commands/version/show.js +0 -54
  141. package/dist/commands/version/show.js.map +0 -1
  142. /package/dist/{chunk-MHET2RG2.js.map → chunk-3S4GIO4B.js.map} +0 -0
  143. /package/dist/{chunk-GVRZY5KI.js.map → chunk-5BDYODWP.js.map} +0 -0
  144. /package/dist/{chunk-2TWELY5M.js.map → chunk-ARET3NYO.js.map} +0 -0
  145. /package/dist/{chunk-X34RGEFX.js.map → chunk-CLHBKFHU.js.map} +0 -0
  146. /package/dist/{chunk-IUYU2TP6.js.map → chunk-ELRGSZHZ.js.map} +0 -0
  147. /package/dist/{chunk-MI4NWOWD.js.map → chunk-ENWMWIHP.js.map} +0 -0
  148. /package/dist/{chunk-GCN7GGWE.js.map → chunk-GUIRWCKI.js.map} +0 -0
  149. /package/dist/{chunk-AQANPOLS.js.map → chunk-HKRLWERR.js.map} +0 -0
  150. /package/dist/{chunk-EPJ2GJNJ.js.map → chunk-KCYNTAAF.js.map} +0 -0
  151. /package/dist/{chunk-33D24DAF.js.map → chunk-KVHLKPYB.js.map} +0 -0
  152. /package/dist/{chunk-MMD26LKJ.js.map → chunk-KWWLPPHF.js.map} +0 -0
  153. /package/dist/{chunk-FDY6SGSA.js.map → chunk-KZNPPUQG.js.map} +0 -0
  154. /package/dist/{chunk-GIZ6DENW.js.map → chunk-M2XPTQDT.js.map} +0 -0
  155. /package/dist/{chunk-BKW34TKI.js.map → chunk-M3AGB4TR.js.map} +0 -0
  156. /package/dist/{chunk-ZHJEZ7AU.js.map → chunk-NTPHCNJO.js.map} +0 -0
  157. /package/dist/{chunk-44QCEK7E.js.map → chunk-OALQWRLG.js.map} +0 -0
  158. /package/dist/{chunk-PEAPABFI.js.map → chunk-OLZBZAW4.js.map} +0 -0
  159. /package/dist/{chunk-UVVNWF43.js.map → chunk-SBWMSNS2.js.map} +0 -0
  160. /package/dist/{chunk-ALWLM5MC.js.map → chunk-SRFNNOLC.js.map} +0 -0
  161. /package/dist/{chunk-KA253GGY.js.map → chunk-SYGEV3KV.js.map} +0 -0
  162. /package/dist/{chunk-HMGWGWFT.js.map → chunk-V43QDMYQ.js.map} +0 -0
  163. /package/dist/{chunk-WMAALRQI.js.map → chunk-VTDEENSP.js.map} +0 -0
  164. /package/dist/{chunk-VHGIQN5O.js.map → chunk-WWSKP5SR.js.map} +0 -0
  165. /package/dist/{chunk-EFZN22TO.js.map → chunk-YQFU2KZ5.js.map} +0 -0
  166. /package/dist/{source-manager-ABK5COKX.js.map → source-manager-HXFXBZJU.js.map} +0 -0
@@ -42,7 +42,7 @@ import {
42
42
  warn,
43
43
  warnUnknownFields,
44
44
  writeFile
45
- } from "./chunk-UXNHU7Y7.js";
45
+ } from "./chunk-473YHDYQ.js";
46
46
  import {
47
47
  ARCHIVED_SKILLS_DIR_NAME,
48
48
  CACHE_DIR,
@@ -76,7 +76,7 @@ import {
76
76
  STANDARD_FILES,
77
77
  YAML_FORMATTING,
78
78
  yamlSchemaComment
79
- } from "./chunk-PP7NDFFE.js";
79
+ } from "./chunk-FVN5PFFY.js";
80
80
  import {
81
81
  init_esm_shims
82
82
  } from "./chunk-DHET7RCE.js";
@@ -415,7 +415,7 @@ init_esm_shims();
415
415
  import { createHash as createHash2 } from "crypto";
416
416
  import { downloadTemplate } from "giget";
417
417
  import os2 from "os";
418
- import path25 from "path";
418
+ import path23 from "path";
419
419
 
420
420
  // src/cli/lib/configuration/index.ts
421
421
  init_esm_shims();
@@ -600,7 +600,7 @@ async function loadPluginSkills(pluginDir) {
600
600
 
601
601
  // src/cli/lib/loading/source-loader.ts
602
602
  init_esm_shims();
603
- import path22 from "path";
603
+ import path20 from "path";
604
604
 
605
605
  // src/cli/lib/metadata-keys.ts
606
606
  init_esm_shims();
@@ -914,7 +914,7 @@ async function copySkillsToLocalFlattened(selectedSkillIds, localSkillsDir, matr
914
914
 
915
915
  // src/cli/lib/skills/skill-plugin-compiler.ts
916
916
  init_esm_shims();
917
- import path17 from "path";
917
+ import path15 from "path";
918
918
  import { parse as parseYaml6 } from "yaml";
919
919
 
920
920
  // src/cli/lib/plugins/index.ts
@@ -998,35 +998,19 @@ async function writePluginManifest(outputDir, manifest) {
998
998
  return manifestPath;
999
999
  }
1000
1000
 
1001
- // src/cli/lib/plugins/plugin-manifest-finder.ts
1002
- init_esm_shims();
1003
- import path7 from "path";
1004
- async function findPluginManifest(startDir) {
1005
- let currentDir = startDir;
1006
- const root = path7.parse(currentDir).root;
1007
- while (currentDir !== root) {
1008
- const manifestPath = path7.join(currentDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
1009
- if (await fileExists(manifestPath)) {
1010
- return manifestPath;
1011
- }
1012
- currentDir = path7.dirname(currentDir);
1013
- }
1014
- return null;
1015
- }
1016
-
1017
1001
  // src/cli/lib/plugins/plugin-finder.ts
1018
1002
  init_esm_shims();
1019
- import path8 from "path";
1003
+ import path7 from "path";
1020
1004
  import { last, zip } from "remeda";
1021
1005
  function getProjectPluginsDir(projectDir) {
1022
1006
  const dir = projectDir ?? process.cwd();
1023
- return path8.join(dir, CLAUDE_DIR, PLUGINS_SUBDIR);
1007
+ return path7.join(dir, CLAUDE_DIR, PLUGINS_SUBDIR);
1024
1008
  }
1025
1009
  function getPluginAgentsDir(pluginDir) {
1026
- return path8.join(pluginDir, "agents");
1010
+ return path7.join(pluginDir, "agents");
1027
1011
  }
1028
1012
  function getPluginManifestPath(pluginDir) {
1029
- return path8.join(pluginDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
1013
+ return path7.join(pluginDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
1030
1014
  }
1031
1015
 
1032
1016
  // src/cli/lib/plugins/plugin-info.ts
@@ -1038,10 +1022,10 @@ init_esm_shims();
1038
1022
 
1039
1023
  // src/cli/lib/installation/installation.ts
1040
1024
  init_esm_shims();
1041
- import path9 from "path";
1025
+ import path8 from "path";
1042
1026
  async function detectInstallation(projectDir = process.cwd()) {
1043
- const srcConfigPath = path9.join(projectDir, CLAUDE_SRC_DIR, STANDARD_FILES.CONFIG_YAML);
1044
- const legacyConfigPath = path9.join(projectDir, CLAUDE_DIR, STANDARD_FILES.CONFIG_YAML);
1027
+ const srcConfigPath = path8.join(projectDir, CLAUDE_SRC_DIR, STANDARD_FILES.CONFIG_YAML);
1028
+ const legacyConfigPath = path8.join(projectDir, CLAUDE_DIR, STANDARD_FILES.CONFIG_YAML);
1045
1029
  const localConfigPath = await fileExists(srcConfigPath) ? srcConfigPath : await fileExists(legacyConfigPath) ? legacyConfigPath : null;
1046
1030
  if (!localConfigPath) {
1047
1031
  return null;
@@ -1052,23 +1036,23 @@ async function detectInstallation(projectDir = process.cwd()) {
1052
1036
  return {
1053
1037
  mode: "local",
1054
1038
  configPath: localConfigPath,
1055
- agentsDir: path9.join(projectDir, CLAUDE_DIR, "agents"),
1056
- skillsDir: path9.join(projectDir, CLAUDE_DIR, "skills"),
1039
+ agentsDir: path8.join(projectDir, CLAUDE_DIR, "agents"),
1040
+ skillsDir: path8.join(projectDir, CLAUDE_DIR, "skills"),
1057
1041
  projectDir
1058
1042
  };
1059
1043
  }
1060
1044
  return {
1061
1045
  mode: "plugin",
1062
1046
  configPath: localConfigPath,
1063
- agentsDir: path9.join(projectDir, CLAUDE_DIR, "agents"),
1064
- skillsDir: path9.join(projectDir, CLAUDE_DIR, PLUGINS_SUBDIR),
1047
+ agentsDir: path8.join(projectDir, CLAUDE_DIR, "agents"),
1048
+ skillsDir: path8.join(projectDir, CLAUDE_DIR, PLUGINS_SUBDIR),
1065
1049
  projectDir
1066
1050
  };
1067
1051
  }
1068
1052
 
1069
1053
  // src/cli/lib/installation/local-installer.ts
1070
1054
  init_esm_shims();
1071
- import path13 from "path";
1055
+ import path12 from "path";
1072
1056
  import { stringify as stringifyYaml3 } from "yaml";
1073
1057
 
1074
1058
  // src/cli/lib/stacks/index.ts
@@ -1077,7 +1061,7 @@ init_esm_shims();
1077
1061
  // src/cli/lib/stacks/stacks-loader.ts
1078
1062
  init_esm_shims();
1079
1063
  import { parse as parseYaml4 } from "yaml";
1080
- import path10 from "path";
1064
+ import path9 from "path";
1081
1065
  import { mapValues, pipe, flatMap, unique as unique2 } from "remeda";
1082
1066
  var stacksCache = /* @__PURE__ */ new Map();
1083
1067
  function normalizeAgentConfig(agentConfig) {
@@ -1096,7 +1080,7 @@ async function loadStacks(configDir, stacksFile) {
1096
1080
  const cacheKey = `${configDir}:${resolvedStacksFile}`;
1097
1081
  const cached = stacksCache.get(cacheKey);
1098
1082
  if (cached) return cached;
1099
- const stacksPath = path10.join(configDir, resolvedStacksFile);
1083
+ const stacksPath = path9.join(configDir, resolvedStacksFile);
1100
1084
  if (!await fileExists(stacksPath)) {
1101
1085
  verbose(`No stacks file found at ${stacksPath}`);
1102
1086
  return [];
@@ -1167,12 +1151,12 @@ function getStackSkillIds(stack) {
1167
1151
 
1168
1152
  // src/cli/lib/stacks/stack-plugin-compiler.ts
1169
1153
  init_esm_shims();
1170
- import path12 from "path";
1154
+ import path11 from "path";
1171
1155
 
1172
1156
  // src/cli/lib/compiler.ts
1173
1157
  init_esm_shims();
1174
1158
  import { Liquid } from "liquidjs";
1175
- import path11 from "path";
1159
+ import path10 from "path";
1176
1160
  import { pipe as pipe2, flatMap as flatMap2, filter, uniqueBy } from "remeda";
1177
1161
 
1178
1162
  // src/cli/lib/resolver.ts
@@ -1346,18 +1330,18 @@ function sanitizeCompiledAgentData(data) {
1346
1330
  async function createLiquidEngine(projectDir) {
1347
1331
  const roots = [];
1348
1332
  if (projectDir) {
1349
- const srcTemplatesDir = path11.join(projectDir, CLAUDE_SRC_DIR, "agents", "_templates");
1333
+ const srcTemplatesDir = path10.join(projectDir, CLAUDE_SRC_DIR, "agents", "_templates");
1350
1334
  if (await directoryExists(srcTemplatesDir)) {
1351
1335
  roots.push(srcTemplatesDir);
1352
1336
  verbose(`Using local templates from: ${srcTemplatesDir}`);
1353
1337
  }
1354
- const legacyTemplatesDir = path11.join(projectDir, CLAUDE_DIR, "templates");
1338
+ const legacyTemplatesDir = path10.join(projectDir, CLAUDE_DIR, "templates");
1355
1339
  if (await directoryExists(legacyTemplatesDir)) {
1356
1340
  roots.push(legacyTemplatesDir);
1357
1341
  verbose(`Using legacy templates from: ${legacyTemplatesDir}`);
1358
1342
  }
1359
1343
  }
1360
- roots.push(path11.join(PROJECT_ROOT, DIRS.templates));
1344
+ roots.push(path10.join(PROJECT_ROOT, DIRS.templates));
1361
1345
  return new Liquid({
1362
1346
  root: roots,
1363
1347
  extname: ".liquid",
@@ -1382,31 +1366,31 @@ async function compileAgentForPlugin(name, agent, fallbackRoot, engine, installM
1382
1366
  verbose(`Compiling agent: ${name}`);
1383
1367
  const agentSourceRoot = agent.sourceRoot || fallbackRoot;
1384
1368
  const agentBaseDir = agent.agentBaseDir || DIRS.agents;
1385
- const agentDir = path12.join(agentSourceRoot, agentBaseDir, agent.path || name);
1386
- const intro = await readFile(path12.join(agentDir, STANDARD_FILES.INTRO_MD));
1387
- const workflow = await readFile(path12.join(agentDir, STANDARD_FILES.WORKFLOW_MD));
1369
+ const agentDir = path11.join(agentSourceRoot, agentBaseDir, agent.path || name);
1370
+ const intro = await readFile(path11.join(agentDir, STANDARD_FILES.INTRO_MD));
1371
+ const workflow = await readFile(path11.join(agentDir, STANDARD_FILES.WORKFLOW_MD));
1388
1372
  const examples = await readFileOptional(
1389
- path12.join(agentDir, STANDARD_FILES.EXAMPLES_MD),
1373
+ path11.join(agentDir, STANDARD_FILES.EXAMPLES_MD),
1390
1374
  "## Examples\n\n_No examples defined._"
1391
1375
  );
1392
1376
  const criticalRequirementsTop = await readFileOptional(
1393
- path12.join(agentDir, STANDARD_FILES.CRITICAL_REQUIREMENTS_MD),
1377
+ path11.join(agentDir, STANDARD_FILES.CRITICAL_REQUIREMENTS_MD),
1394
1378
  ""
1395
1379
  );
1396
1380
  const criticalReminders = await readFileOptional(
1397
- path12.join(agentDir, STANDARD_FILES.CRITICAL_REMINDERS_MD),
1381
+ path11.join(agentDir, STANDARD_FILES.CRITICAL_REMINDERS_MD),
1398
1382
  ""
1399
1383
  );
1400
1384
  const agentPath = agent.path || name;
1401
1385
  const category = agentPath.split("/")[0];
1402
- const categoryDir = path12.join(agentSourceRoot, agentBaseDir, category);
1386
+ const categoryDir = path11.join(agentSourceRoot, agentBaseDir, category);
1403
1387
  let outputFormat = await readFileOptional(
1404
- path12.join(agentDir, STANDARD_FILES.OUTPUT_FORMAT_MD),
1388
+ path11.join(agentDir, STANDARD_FILES.OUTPUT_FORMAT_MD),
1405
1389
  ""
1406
1390
  );
1407
1391
  if (!outputFormat) {
1408
1392
  outputFormat = await readFileOptional(
1409
- path12.join(categoryDir, STANDARD_FILES.OUTPUT_FORMAT_MD),
1393
+ path11.join(categoryDir, STANDARD_FILES.OUTPUT_FORMAT_MD),
1410
1394
  ""
1411
1395
  );
1412
1396
  }
@@ -1519,19 +1503,19 @@ async function compileStackPlugin(options) {
1519
1503
  );
1520
1504
  const compileConfig = convertStackToCompileConfig(stackId, stack);
1521
1505
  const resolvedAgents = await resolveAgents(agents, skills, compileConfig, projectRoot, newStack);
1522
- const pluginDir = path12.join(outputDir, stackId);
1523
- const agentsDir = path12.join(pluginDir, "agents");
1506
+ const pluginDir = path11.join(outputDir, stackId);
1507
+ const agentsDir = path11.join(pluginDir, "agents");
1524
1508
  await ensureDir(pluginDir);
1525
1509
  await ensureDir(agentsDir);
1526
- const pluginSkillsDir = path12.join(pluginDir, "skills");
1510
+ const pluginSkillsDir = path11.join(pluginDir, "skills");
1527
1511
  await ensureDir(pluginSkillsDir);
1528
1512
  const copiedSourcePaths = /* @__PURE__ */ new Set();
1529
1513
  for (const resolvedSkill of Object.values(skills)) {
1530
- const sourceSkillDir = path12.join(projectRoot, resolvedSkill.path);
1514
+ const sourceSkillDir = path11.join(projectRoot, resolvedSkill.path);
1531
1515
  if (copiedSourcePaths.has(resolvedSkill.path)) {
1532
1516
  continue;
1533
1517
  }
1534
- const destSkillDir = path12.join(pluginSkillsDir, resolvedSkill.id);
1518
+ const destSkillDir = path11.join(pluginSkillsDir, resolvedSkill.id);
1535
1519
  if (await directoryExists(sourceSkillDir)) {
1536
1520
  await copy(sourceSkillDir, destSkillDir);
1537
1521
  copiedSourcePaths.add(resolvedSkill.path);
@@ -1545,18 +1529,18 @@ async function compileStackPlugin(options) {
1545
1529
  const allSkillPlugins = [];
1546
1530
  for (const [name, agent] of typedEntries(resolvedAgents)) {
1547
1531
  const output = await compileAgentForPlugin(name, agent, PROJECT_ROOT, engine);
1548
- await writeFile(path12.join(agentsDir, `${name}.md`), output);
1532
+ await writeFile(path11.join(agentsDir, `${name}.md`), output);
1549
1533
  compiledAgentNames.push(name);
1550
1534
  for (const skill of agent.skills) {
1551
1535
  allSkillPlugins.push(skill.id);
1552
1536
  }
1553
1537
  verbose(` Compiled agent: ${name}`);
1554
1538
  }
1555
- const stackDir = path12.join(projectRoot, DIRS.stacks, stackId);
1556
- const claudeMdPath = path12.join(stackDir, STANDARD_FILES.CLAUDE_MD);
1539
+ const stackDir = path11.join(projectRoot, DIRS.stacks, stackId);
1540
+ const claudeMdPath = path11.join(stackDir, STANDARD_FILES.CLAUDE_MD);
1557
1541
  if (await fileExists(claudeMdPath)) {
1558
1542
  const claudeContent = await readFile(claudeMdPath);
1559
- await writeFile(path12.join(pluginDir, STANDARD_FILES.CLAUDE_MD), claudeContent);
1543
+ await writeFile(path11.join(pluginDir, STANDARD_FILES.CLAUDE_MD), claudeContent);
1560
1544
  verbose(` Copied ${STANDARD_FILES.CLAUDE_MD}`);
1561
1545
  }
1562
1546
  const newHash = hashStackConfig(stack);
@@ -1580,7 +1564,7 @@ async function compileStackPlugin(options) {
1580
1564
  await writeContentHash(pluginDir, contentHash, getPluginManifestPath);
1581
1565
  verbose(` Wrote plugin.json (v${version})`);
1582
1566
  const readme = generateStackReadme(stackId, stack, compiledAgentNames, uniqueSkillPlugins);
1583
- await writeFile(path12.join(pluginDir, "README.md"), readme);
1567
+ await writeFile(path11.join(pluginDir, "README.md"), readme);
1584
1568
  verbose(" Generated README.md");
1585
1569
  return {
1586
1570
  pluginPath: pluginDir,
@@ -1613,15 +1597,15 @@ Stack plugin compiled: ${result.stackName}`);
1613
1597
  // src/cli/lib/installation/local-installer.ts
1614
1598
  function resolveInstallPaths(projectDir) {
1615
1599
  return {
1616
- skillsDir: path13.join(projectDir, LOCAL_SKILLS_PATH),
1617
- agentsDir: path13.join(projectDir, CLAUDE_DIR, "agents"),
1618
- configPath: path13.join(projectDir, CLAUDE_SRC_DIR, STANDARD_FILES.CONFIG_YAML)
1600
+ skillsDir: path12.join(projectDir, LOCAL_SKILLS_PATH),
1601
+ agentsDir: path12.join(projectDir, CLAUDE_DIR, "agents"),
1602
+ configPath: path12.join(projectDir, CLAUDE_SRC_DIR, STANDARD_FILES.CONFIG_YAML)
1619
1603
  };
1620
1604
  }
1621
1605
  async function prepareDirectories(paths) {
1622
1606
  await ensureDir(paths.skillsDir);
1623
1607
  await ensureDir(paths.agentsDir);
1624
- await ensureDir(path13.dirname(paths.configPath));
1608
+ await ensureDir(path12.dirname(paths.configPath));
1625
1609
  }
1626
1610
  async function archiveAndCopySkills(wizardResult, sourceResult, projectDir, skillsDir) {
1627
1611
  for (const skillId of wizardResult.selectedSkills) {
@@ -1734,6 +1718,9 @@ function setConfigMetadata(config, wizardResult, sourceResult, sourceFlag) {
1734
1718
  if (wizardResult.selectedDomains && wizardResult.selectedDomains.length > 0) {
1735
1719
  config.domains = wizardResult.selectedDomains;
1736
1720
  }
1721
+ if (wizardResult.selectedAgents && wizardResult.selectedAgents.length > 0) {
1722
+ config.selectedAgents = wizardResult.selectedAgents;
1723
+ }
1737
1724
  if (sourceFlag) {
1738
1725
  config.source = sourceFlag;
1739
1726
  } else if (sourceResult.sourceConfig.source) {
@@ -1812,7 +1799,7 @@ async function compileAndWriteAgents(compileConfig, agents, localSkills, sourceR
1812
1799
  engine,
1813
1800
  installMode
1814
1801
  );
1815
- await writeFile(path13.join(agentsDir, `${name}.md`), output);
1802
+ await writeFile(path12.join(agentsDir, `${name}.md`), output);
1816
1803
  compiledAgentNames.push(name);
1817
1804
  }
1818
1805
  return compiledAgentNames;
@@ -1821,7 +1808,7 @@ async function installPluginConfig(options) {
1821
1808
  const { wizardResult, sourceResult, projectDir, sourceFlag } = options;
1822
1809
  const paths = resolveInstallPaths(projectDir);
1823
1810
  await ensureDir(paths.agentsDir);
1824
- await ensureDir(path13.dirname(paths.configPath));
1811
+ await ensureDir(path12.dirname(paths.configPath));
1825
1812
  const agents = await loadMergedAgents(sourceResult.sourcePath);
1826
1813
  const mergeResult = await buildAndMergeConfig(wizardResult, sourceResult, projectDir, sourceFlag);
1827
1814
  const finalConfig = mergeResult.config;
@@ -1902,7 +1889,7 @@ init_esm_shims();
1902
1889
 
1903
1890
  // src/cli/lib/plugins/plugin-settings.ts
1904
1891
  init_esm_shims();
1905
- import path14 from "path";
1892
+ import path13 from "path";
1906
1893
  import os from "os";
1907
1894
  import { z } from "zod";
1908
1895
  var pluginSettingsSchema = z.object({
@@ -1924,7 +1911,7 @@ var installedPluginsSchema = z.object({
1924
1911
  var SETTINGS_FILE = "settings.json";
1925
1912
  var INSTALLED_PLUGINS_FILE = "installed_plugins.json";
1926
1913
  async function getEnabledPluginKeys(projectDir) {
1927
- const settingsPath = path14.join(projectDir, CLAUDE_DIR, SETTINGS_FILE);
1914
+ const settingsPath = path13.join(projectDir, CLAUDE_DIR, SETTINGS_FILE);
1928
1915
  if (!await fileExists(settingsPath)) {
1929
1916
  verbose(`No settings.json found at '${settingsPath}'`);
1930
1917
  return [];
@@ -1954,7 +1941,7 @@ async function resolvePluginInstallPaths(pluginKeys, projectDir) {
1954
1941
  if (pluginKeys.length === 0) {
1955
1942
  return [];
1956
1943
  }
1957
- const registryPath = path14.join(os.homedir(), CLAUDE_DIR, PLUGINS_SUBDIR, INSTALLED_PLUGINS_FILE);
1944
+ const registryPath = path13.join(os.homedir(), CLAUDE_DIR, PLUGINS_SUBDIR, INSTALLED_PLUGINS_FILE);
1958
1945
  if (!await fileExists(registryPath)) {
1959
1946
  verbose(`Plugin registry not found at '${registryPath}'`);
1960
1947
  return [];
@@ -2008,7 +1995,7 @@ async function getVerifiedPluginInstallPaths(projectDir) {
2008
1995
  const resolvedPaths = await resolvePluginInstallPaths(enabledKeys, projectDir);
2009
1996
  const verified = [];
2010
1997
  for (const { pluginKey, installPath } of resolvedPaths) {
2011
- const pluginJsonPath = path14.join(installPath, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
1998
+ const pluginJsonPath = path13.join(installPath, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
2012
1999
  if (await fileExists(pluginJsonPath)) {
2013
2000
  verified.push({ pluginKey, installPath });
2014
2001
  } else {
@@ -2126,49 +2113,10 @@ function formatInstallationDisplay(info) {
2126
2113
  Agents: ${info.agentsDir}`;
2127
2114
  }
2128
2115
 
2129
- // src/cli/lib/plugins/plugin-version.ts
2130
- init_esm_shims();
2131
- import path15 from "path";
2132
- function parseVersion(version) {
2133
- const parts = version.split(".").map(Number);
2134
- return [parts[0] || 1, parts[1] || 0, parts[2] || 0];
2135
- }
2136
- async function bumpPluginVersion(pluginDir, type) {
2137
- const manifestPath = path15.join(pluginDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
2138
- const content = await readFileSafe(manifestPath, MAX_PLUGIN_FILE_SIZE);
2139
- const manifest = pluginManifestSchema.parse(JSON.parse(content));
2140
- const [major, minor, patch] = parseVersion(manifest.version || DEFAULT_VERSION);
2141
- let newVersion;
2142
- switch (type) {
2143
- case "major":
2144
- newVersion = `${major + 1}.0.0`;
2145
- break;
2146
- case "minor":
2147
- newVersion = `${major}.${minor + 1}.0`;
2148
- break;
2149
- case "patch":
2150
- newVersion = `${major}.${minor}.${patch + 1}`;
2151
- break;
2152
- default: {
2153
- const exhaustiveCheck = type;
2154
- throw new Error(`Unknown version bump type: ${exhaustiveCheck}`);
2155
- }
2156
- }
2157
- manifest.version = newVersion;
2158
- await writeFile(manifestPath, JSON.stringify(manifest, null, 2));
2159
- return newVersion;
2160
- }
2161
- async function getPluginVersion(pluginDir) {
2162
- const manifestPath = path15.join(pluginDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
2163
- const content = await readFileSafe(manifestPath, MAX_PLUGIN_FILE_SIZE);
2164
- const manifest = pluginManifestSchema.parse(JSON.parse(content));
2165
- return manifest.version || DEFAULT_VERSION;
2166
- }
2167
-
2168
2116
  // src/cli/lib/plugins/plugin-validator.ts
2169
2117
  init_esm_shims();
2170
2118
  import { z as z2 } from "zod";
2171
- import path16 from "path";
2119
+ import path14 from "path";
2172
2120
  import fg from "fast-glob";
2173
2121
  import { countBy } from "remeda";
2174
2122
  var PLUGIN_DIR = PLUGIN_MANIFEST_DIR;
@@ -2188,11 +2136,11 @@ var pluginManifestValidationSchema = z2.object({
2188
2136
  }).strict();
2189
2137
  function formatZodErrors2(error) {
2190
2138
  return error.issues.map((issue) => {
2191
- const path26 = issue.path.join(".");
2139
+ const path24 = issue.path.join(".");
2192
2140
  if (issue.code === "unrecognized_keys") {
2193
2141
  return `Unrecognized key: "${issue.keys.join('", "')}"`;
2194
2142
  }
2195
- return path26 ? `${path26}: ${issue.message}` : issue.message;
2143
+ return path24 ? `${path24}: ${issue.message}` : issue.message;
2196
2144
  });
2197
2145
  }
2198
2146
  function isKebabCase(str) {
@@ -2211,15 +2159,15 @@ async function validatePluginStructure(pluginPath) {
2211
2159
  warnings: []
2212
2160
  };
2213
2161
  }
2214
- const pluginDir = path16.join(pluginPath, PLUGIN_DIR);
2162
+ const pluginDir = path14.join(pluginPath, PLUGIN_DIR);
2215
2163
  if (!await directoryExists(pluginDir)) {
2216
2164
  errors.push(`Missing ${PLUGIN_DIR}/ directory`);
2217
2165
  }
2218
- const manifestPath = path16.join(pluginDir, PLUGIN_MANIFEST);
2166
+ const manifestPath = path14.join(pluginDir, PLUGIN_MANIFEST);
2219
2167
  if (!await fileExists(manifestPath)) {
2220
2168
  errors.push(`Missing ${PLUGIN_DIR}/${PLUGIN_MANIFEST}`);
2221
2169
  }
2222
- const readmePath = path16.join(pluginPath, "README.md");
2170
+ const readmePath = path14.join(pluginPath, "README.md");
2223
2171
  if (!await fileExists(readmePath)) {
2224
2172
  warnings.push("Missing README.md (recommended for documentation)");
2225
2173
  }
@@ -2269,15 +2217,15 @@ async function validatePluginManifest(manifestPath) {
2269
2217
  if (!manifest.description) {
2270
2218
  warnings.push("Missing description field (recommended for discoverability)");
2271
2219
  }
2272
- const pluginDir = path16.dirname(path16.dirname(manifestPath));
2220
+ const pluginDir = path14.dirname(path14.dirname(manifestPath));
2273
2221
  if (manifest.skills && typeof manifest.skills === "string") {
2274
- const skillsPath = path16.join(pluginDir, manifest.skills);
2222
+ const skillsPath = path14.join(pluginDir, manifest.skills);
2275
2223
  if (!await directoryExists(skillsPath)) {
2276
2224
  errors.push(`Skills path does not exist: ${manifest.skills}`);
2277
2225
  }
2278
2226
  }
2279
2227
  if (manifest.agents && typeof manifest.agents === "string") {
2280
- const agentsPath = path16.join(pluginDir, manifest.agents);
2228
+ const agentsPath = path14.join(pluginDir, manifest.agents);
2281
2229
  if (!await directoryExists(agentsPath)) {
2282
2230
  errors.push(`Agents path does not exist: ${manifest.agents}`);
2283
2231
  }
@@ -2366,7 +2314,7 @@ function prefixResult(result, prefix) {
2366
2314
  };
2367
2315
  }
2368
2316
  async function validatePluginSkillFiles(pluginPath, skillsRelPath) {
2369
- const skillsDir = path16.join(pluginPath, skillsRelPath);
2317
+ const skillsDir = path14.join(pluginPath, skillsRelPath);
2370
2318
  if (!await directoryExists(skillsDir)) return EMPTY_RESULT;
2371
2319
  const files = await fg("**/SKILL.md", { cwd: skillsDir, absolute: true });
2372
2320
  if (files.length === 0) {
@@ -2378,13 +2326,13 @@ async function validatePluginSkillFiles(pluginPath, skillsRelPath) {
2378
2326
  }
2379
2327
  const results = await Promise.all(
2380
2328
  files.map(
2381
- async (f) => prefixResult(await validateSkillFrontmatter(f), path16.relative(pluginPath, f))
2329
+ async (f) => prefixResult(await validateSkillFrontmatter(f), path14.relative(pluginPath, f))
2382
2330
  )
2383
2331
  );
2384
2332
  return mergeResults(results);
2385
2333
  }
2386
2334
  async function validatePluginAgentFiles(pluginPath, agentsRelPath) {
2387
- const agentsDir = path16.join(pluginPath, agentsRelPath);
2335
+ const agentsDir = path14.join(pluginPath, agentsRelPath);
2388
2336
  if (!await directoryExists(agentsDir)) return EMPTY_RESULT;
2389
2337
  const files = await fg("*.md", { cwd: agentsDir, absolute: true });
2390
2338
  if (files.length === 0) {
@@ -2396,7 +2344,7 @@ async function validatePluginAgentFiles(pluginPath, agentsRelPath) {
2396
2344
  }
2397
2345
  const results = await Promise.all(
2398
2346
  files.map(
2399
- async (f) => prefixResult(await validateAgentFrontmatter(f), path16.relative(pluginPath, f))
2347
+ async (f) => prefixResult(await validateAgentFrontmatter(f), path14.relative(pluginPath, f))
2400
2348
  )
2401
2349
  );
2402
2350
  return mergeResults(results);
@@ -2412,7 +2360,7 @@ async function loadManifestForValidation(manifestPath) {
2412
2360
  async function validatePlugin(pluginPath) {
2413
2361
  const structureResult = await validatePluginStructure(pluginPath);
2414
2362
  if (!structureResult.valid) return structureResult;
2415
- const manifestPath = path16.join(pluginPath, PLUGIN_DIR, PLUGIN_MANIFEST);
2363
+ const manifestPath = path14.join(pluginPath, PLUGIN_DIR, PLUGIN_MANIFEST);
2416
2364
  const manifestResult = await validatePluginManifest(manifestPath);
2417
2365
  const manifest = await loadManifestForValidation(manifestPath);
2418
2366
  const skillsResult = manifest?.skills && typeof manifest.skills === "string" ? await validatePluginSkillFiles(pluginPath, manifest.skills) : EMPTY_RESULT;
@@ -2440,7 +2388,7 @@ async function validateAllPlugins(pluginsDir) {
2440
2388
  const allDirs = await listDirectories(pluginsDir);
2441
2389
  const pluginDirs = [];
2442
2390
  for (const dirName of allDirs) {
2443
- const potentialPluginDir = path16.join(pluginsDir, dirName, PLUGIN_DIR);
2391
+ const potentialPluginDir = path14.join(pluginsDir, dirName, PLUGIN_DIR);
2444
2392
  if (await directoryExists(potentialPluginDir)) {
2445
2393
  pluginDirs.push(dirName);
2446
2394
  }
@@ -2464,7 +2412,7 @@ async function validateAllPlugins(pluginsDir) {
2464
2412
  };
2465
2413
  }
2466
2414
  for (const pluginName of pluginDirs) {
2467
- const pluginPath = path16.join(pluginsDir, pluginName);
2415
+ const pluginPath = path14.join(pluginsDir, pluginName);
2468
2416
  const result = await validatePlugin(pluginPath);
2469
2417
  results.push({ name: pluginName, result });
2470
2418
  }
@@ -2502,7 +2450,7 @@ function sanitizeSkillName(name) {
2502
2450
  return name.replace(/\+/g, "-");
2503
2451
  }
2504
2452
  async function readSkillMetadata(skillPath) {
2505
- const metadataPath = path17.join(skillPath, STANDARD_FILES.METADATA_YAML);
2453
+ const metadataPath = path15.join(skillPath, STANDARD_FILES.METADATA_YAML);
2506
2454
  if (!await fileExists(metadataPath)) {
2507
2455
  return null;
2508
2456
  }
@@ -2559,8 +2507,8 @@ function generateReadme(skillName, frontmatter, metadata) {
2559
2507
  }
2560
2508
  async function compileSkillPlugin(options) {
2561
2509
  const { skillPath, outputDir, skillName: overrideName } = options;
2562
- const dirBasename = path17.basename(skillPath);
2563
- const skillMdPath = path17.join(skillPath, STANDARD_FILES.SKILL_MD);
2510
+ const dirBasename = path15.basename(skillPath);
2511
+ const skillMdPath = path15.join(skillPath, STANDARD_FILES.SKILL_MD);
2564
2512
  if (!await fileExists(skillMdPath)) {
2565
2513
  throw new Error(
2566
2514
  `Skill '${dirBasename}' is missing required ${STANDARD_FILES.SKILL_MD} file. Expected at: ${skillMdPath}`
@@ -2576,8 +2524,8 @@ async function compileSkillPlugin(options) {
2576
2524
  const skillName = overrideName ?? sanitizeSkillName(frontmatter.name);
2577
2525
  verbose(`Compiling skill plugin: ${skillName} from ${skillPath}`);
2578
2526
  const metadata = await readSkillMetadata(skillPath);
2579
- const pluginDir = path17.join(outputDir, skillName);
2580
- const skillsDir = path17.join(pluginDir, "skills", skillName);
2527
+ const pluginDir = path15.join(outputDir, skillName);
2528
+ const skillsDir = path15.join(pluginDir, "skills", skillName);
2581
2529
  await ensureDir(pluginDir);
2582
2530
  await ensureDir(skillsDir);
2583
2531
  const newHash = await computeSkillFolderHash(skillPath);
@@ -2596,26 +2544,26 @@ async function compileSkillPlugin(options) {
2596
2544
  await writePluginManifest(pluginDir, manifest);
2597
2545
  await writeContentHash(pluginDir, contentHash, getPluginManifestPath);
2598
2546
  verbose(` Wrote plugin.json for ${skillName} (v${version})`);
2599
- await writeFile(path17.join(skillsDir, STANDARD_FILES.SKILL_MD), skillMdContent);
2547
+ await writeFile(path15.join(skillsDir, STANDARD_FILES.SKILL_MD), skillMdContent);
2600
2548
  verbose(` Copied ${STANDARD_FILES.SKILL_MD}`);
2601
2549
  for (const fileName of SKILL_CONTENT_FILES) {
2602
2550
  if (fileName === STANDARD_FILES.SKILL_MD) continue;
2603
- const sourcePath = path17.join(skillPath, fileName);
2551
+ const sourcePath = path15.join(skillPath, fileName);
2604
2552
  if (await fileExists(sourcePath)) {
2605
2553
  const content = await readFile(sourcePath);
2606
- await writeFile(path17.join(skillsDir, fileName), content);
2554
+ await writeFile(path15.join(skillsDir, fileName), content);
2607
2555
  verbose(` Copied ${fileName}`);
2608
2556
  }
2609
2557
  }
2610
2558
  for (const dirName of SKILL_CONTENT_DIRS) {
2611
- const sourceDir = path17.join(skillPath, dirName);
2559
+ const sourceDir = path15.join(skillPath, dirName);
2612
2560
  if (await fileExists(sourceDir)) {
2613
- await copy(sourceDir, path17.join(skillsDir, dirName));
2561
+ await copy(sourceDir, path15.join(skillsDir, dirName));
2614
2562
  verbose(` Copied ${dirName}/`);
2615
2563
  }
2616
2564
  }
2617
2565
  const readme = generateReadme(skillName, frontmatter, metadata);
2618
- await writeFile(path17.join(pluginDir, "README.md"), readme);
2566
+ await writeFile(path15.join(pluginDir, "README.md"), readme);
2619
2567
  verbose(" Generated README.md");
2620
2568
  return {
2621
2569
  pluginPath: pluginDir,
@@ -2627,7 +2575,7 @@ async function compileAllSkillPlugins(skillsDir, outputDir) {
2627
2575
  const results = [];
2628
2576
  const skillMdFiles = await glob(`**/${STANDARD_FILES.SKILL_MD}`, skillsDir);
2629
2577
  for (const skillMdFile of skillMdFiles) {
2630
- const skillPath = path17.join(skillsDir, path17.dirname(skillMdFile));
2578
+ const skillPath = path15.join(skillsDir, path15.dirname(skillMdFile));
2631
2579
  try {
2632
2580
  const result = await compileSkillPlugin({
2633
2581
  skillPath,
@@ -2637,7 +2585,7 @@ async function compileAllSkillPlugins(skillsDir, outputDir) {
2637
2585
  log(` [OK] ${result.skillName}`);
2638
2586
  } catch (error) {
2639
2587
  const errorMessage = getErrorMessage(error);
2640
- const dirBasename = path17.basename(skillPath);
2588
+ const dirBasename = path15.basename(skillPath);
2641
2589
  warn(`Failed to compile skill from '${dirBasename}': ${errorMessage}`);
2642
2590
  }
2643
2591
  }
@@ -2654,9 +2602,9 @@ Compiled ${results.length} skill plugins:`);
2654
2602
  // src/cli/lib/skills/local-skill-loader.ts
2655
2603
  init_esm_shims();
2656
2604
  import { parse as parseYaml7 } from "yaml";
2657
- import path18 from "path";
2605
+ import path16 from "path";
2658
2606
  async function discoverLocalSkills(projectDir) {
2659
- const localSkillsPath = path18.join(projectDir, LOCAL_SKILLS_PATH);
2607
+ const localSkillsPath = path16.join(projectDir, LOCAL_SKILLS_PATH);
2660
2608
  if (!await directoryExists(localSkillsPath)) {
2661
2609
  verbose(`Local skills directory not found: ${localSkillsPath}`);
2662
2610
  return null;
@@ -2676,9 +2624,9 @@ async function discoverLocalSkills(projectDir) {
2676
2624
  };
2677
2625
  }
2678
2626
  async function extractLocalSkill(localSkillsPath, skillDirName) {
2679
- const skillDir = path18.join(localSkillsPath, skillDirName);
2680
- const metadataPath = path18.join(skillDir, STANDARD_FILES.METADATA_YAML);
2681
- const skillMdPath = path18.join(skillDir, STANDARD_FILES.SKILL_MD);
2627
+ const skillDir = path16.join(localSkillsPath, skillDirName);
2628
+ const metadataPath = path16.join(skillDir, STANDARD_FILES.METADATA_YAML);
2629
+ const skillMdPath = path16.join(skillDir, STANDARD_FILES.SKILL_MD);
2682
2630
  if (!await fileExists(metadataPath)) {
2683
2631
  verbose(`Skipping local skill '${skillDirName}': No metadata.yaml found`);
2684
2632
  return null;
@@ -2740,7 +2688,7 @@ async function extractLocalSkill(localSkillsPath, skillDirName) {
2740
2688
 
2741
2689
  // src/cli/lib/skills/source-switcher.ts
2742
2690
  init_esm_shims();
2743
- import path19 from "path";
2691
+ import path17 from "path";
2744
2692
  function validateSkillId(skillId) {
2745
2693
  if (!SKILL_ID_PATTERN.test(skillId)) {
2746
2694
  return false;
@@ -2748,19 +2696,19 @@ function validateSkillId(skillId) {
2748
2696
  return !(skillId.includes("\0") || skillId.includes("..") || skillId.includes("/") || skillId.includes("\\"));
2749
2697
  }
2750
2698
  function validatePathBoundary(resolvedPath, expectedParent) {
2751
- const normalizedPath = path19.resolve(resolvedPath);
2752
- const normalizedParent = path19.resolve(expectedParent);
2753
- return normalizedPath.startsWith(normalizedParent + path19.sep);
2699
+ const normalizedPath = path17.resolve(resolvedPath);
2700
+ const normalizedParent = path17.resolve(expectedParent);
2701
+ return normalizedPath.startsWith(normalizedParent + path17.sep);
2754
2702
  }
2755
2703
  async function archiveLocalSkill(projectDir, skillId) {
2756
2704
  if (!validateSkillId(skillId)) {
2757
2705
  warn(`Invalid skill ID for archiving: '${skillId}'`);
2758
2706
  return;
2759
2707
  }
2760
- const skillsDir = path19.resolve(path19.join(projectDir, LOCAL_SKILLS_PATH));
2761
- const skillPath = path19.resolve(path19.join(skillsDir, skillId));
2762
- const archivedDir = path19.resolve(path19.join(skillsDir, ARCHIVED_SKILLS_DIR_NAME));
2763
- const archivedSkillPath = path19.resolve(path19.join(archivedDir, skillId));
2708
+ const skillsDir = path17.resolve(path17.join(projectDir, LOCAL_SKILLS_PATH));
2709
+ const skillPath = path17.resolve(path17.join(skillsDir, skillId));
2710
+ const archivedDir = path17.resolve(path17.join(skillsDir, ARCHIVED_SKILLS_DIR_NAME));
2711
+ const archivedSkillPath = path17.resolve(path17.join(archivedDir, skillId));
2764
2712
  if (!validatePathBoundary(skillPath, skillsDir) || !validatePathBoundary(archivedSkillPath, archivedDir)) {
2765
2713
  warn(`Skill ID '${skillId}' resolves outside the skills directory.`);
2766
2714
  return;
@@ -2780,10 +2728,10 @@ async function restoreArchivedSkill(projectDir, skillId) {
2780
2728
  warn(`Invalid skill ID for restoring: '${skillId}'`);
2781
2729
  return false;
2782
2730
  }
2783
- const skillsDir = path19.resolve(path19.join(projectDir, LOCAL_SKILLS_PATH));
2784
- const skillPath = path19.resolve(path19.join(skillsDir, skillId));
2785
- const archivedDir = path19.resolve(path19.join(skillsDir, ARCHIVED_SKILLS_DIR_NAME));
2786
- const archivedSkillPath = path19.resolve(path19.join(archivedDir, skillId));
2731
+ const skillsDir = path17.resolve(path17.join(projectDir, LOCAL_SKILLS_PATH));
2732
+ const skillPath = path17.resolve(path17.join(skillsDir, skillId));
2733
+ const archivedDir = path17.resolve(path17.join(skillsDir, ARCHIVED_SKILLS_DIR_NAME));
2734
+ const archivedSkillPath = path17.resolve(path17.join(archivedDir, skillId));
2787
2735
  if (!validatePathBoundary(skillPath, skillsDir) || !validatePathBoundary(archivedSkillPath, archivedDir)) {
2788
2736
  warn(`Skill ID '${skillId}' resolves outside the skills directory.`);
2789
2737
  return false;
@@ -2804,13 +2752,12 @@ init_esm_shims();
2804
2752
  // src/cli/lib/matrix/matrix-loader.ts
2805
2753
  init_esm_shims();
2806
2754
  import { parse as parseYaml8 } from "yaml";
2807
- import path20 from "path";
2755
+ import path18 from "path";
2808
2756
  import { z as z3 } from "zod";
2809
2757
  var rawMetadataSchema = z3.object({
2810
2758
  category: categoryPathSchema,
2811
2759
  categoryExclusive: z3.boolean().optional(),
2812
2760
  author: z3.string(),
2813
- version: z3.coerce.string(),
2814
2761
  cliName: z3.string().optional(),
2815
2762
  cliDescription: z3.string().optional(),
2816
2763
  usageGuidance: z3.string().optional(),
@@ -2838,9 +2785,9 @@ async function extractAllSkills(skillsDir) {
2838
2785
  const skills = [];
2839
2786
  const metadataFiles = await glob(`**/${STANDARD_FILES.METADATA_YAML}`, skillsDir);
2840
2787
  for (const metadataFile of metadataFiles) {
2841
- const skillDir = path20.dirname(metadataFile);
2842
- const skillMdPath = path20.join(skillsDir, skillDir, STANDARD_FILES.SKILL_MD);
2843
- const metadataPath = path20.join(skillsDir, metadataFile);
2788
+ const skillDir = path18.dirname(metadataFile);
2789
+ const skillMdPath = path18.join(skillsDir, skillDir, STANDARD_FILES.SKILL_MD);
2790
+ const metadataPath = path18.join(skillsDir, metadataFile);
2844
2791
  if (!await fileExists(skillMdPath)) {
2845
2792
  verbose(`Skipping ${metadataFile}: No ${STANDARD_FILES.SKILL_MD} found`);
2846
2793
  continue;
@@ -3430,87 +3377,14 @@ function getAvailableSkills(categoryId, currentSelections, matrix, options) {
3430
3377
  init_esm_shims();
3431
3378
  function checkMatrixHealth(matrix) {
3432
3379
  const issues = [];
3433
- const skillIds = new Set(typedKeys(matrix.skills));
3434
- checkRelationshipTargets(matrix, skillIds, issues);
3435
3380
  checkSubcategoryDomains(matrix, issues);
3436
3381
  checkSkillCategories(matrix, issues);
3437
- checkCompatibleWithTargets(matrix, skillIds, issues);
3438
- checkStackSkillIds(matrix, skillIds, issues);
3382
+ checkSkillRelationRefs(matrix, issues);
3439
3383
  for (const issue of issues) {
3440
3384
  warn(`[matrix] ${issue.details}`);
3441
3385
  }
3442
3386
  return issues;
3443
3387
  }
3444
- function checkRelationshipTargets(matrix, skillIds, issues) {
3445
- for (const [skillId, skill] of typedEntries(matrix.skills)) {
3446
- if (!skill) continue;
3447
- for (const conflict of skill.conflictsWith) {
3448
- if (!skillIds.has(conflict.skillId)) {
3449
- issues.push({
3450
- severity: "warning",
3451
- finding: "ghost-relationship-target",
3452
- details: `Skill '${skillId}' conflicts with '${conflict.skillId}' which does not exist in the matrix`
3453
- });
3454
- }
3455
- }
3456
- for (const recommend of skill.recommends) {
3457
- if (!skillIds.has(recommend.skillId)) {
3458
- issues.push({
3459
- severity: "warning",
3460
- finding: "ghost-relationship-target",
3461
- details: `Skill '${skillId}' recommends '${recommend.skillId}' which does not exist in the matrix`
3462
- });
3463
- }
3464
- }
3465
- for (const requirement of skill.requires) {
3466
- for (const reqId of requirement.skillIds) {
3467
- if (!skillIds.has(reqId)) {
3468
- issues.push({
3469
- severity: "error",
3470
- finding: "ghost-requirement-target",
3471
- details: `Skill '${skillId}' requires '${reqId}' which does not exist in the matrix`
3472
- });
3473
- }
3474
- }
3475
- }
3476
- for (const alt of skill.alternatives) {
3477
- if (!skillIds.has(alt.skillId)) {
3478
- issues.push({
3479
- severity: "warning",
3480
- finding: "ghost-alternative-target",
3481
- details: `Skill '${skillId}' lists alternative '${alt.skillId}' which does not exist in the matrix`
3482
- });
3483
- }
3484
- }
3485
- for (const discourage of skill.discourages) {
3486
- if (!skillIds.has(discourage.skillId)) {
3487
- issues.push({
3488
- severity: "warning",
3489
- finding: "ghost-relationship-target",
3490
- details: `Skill '${skillId}' discourages '${discourage.skillId}' which does not exist in the matrix`
3491
- });
3492
- }
3493
- }
3494
- for (const setupId of skill.requiresSetup) {
3495
- if (!skillIds.has(setupId)) {
3496
- issues.push({
3497
- severity: "warning",
3498
- finding: "ghost-setup-target",
3499
- details: `Skill '${skillId}' requiresSetup '${setupId}' which does not exist in the matrix`
3500
- });
3501
- }
3502
- }
3503
- for (const providesId of skill.providesSetupFor) {
3504
- if (!skillIds.has(providesId)) {
3505
- issues.push({
3506
- severity: "warning",
3507
- finding: "ghost-setup-target",
3508
- details: `Skill '${skillId}' providesSetupFor '${providesId}' which does not exist in the matrix`
3509
- });
3510
- }
3511
- }
3512
- }
3513
- }
3514
3388
  function checkSubcategoryDomains(matrix, issues) {
3515
3389
  for (const [catId, cat] of typedEntries(matrix.categories)) {
3516
3390
  if (!cat) continue;
@@ -3535,37 +3409,51 @@ function checkSkillCategories(matrix, issues) {
3535
3409
  }
3536
3410
  }
3537
3411
  }
3538
- function checkCompatibleWithTargets(matrix, skillIds, issues) {
3412
+ var RELATION_FIELDS_SKILL_ID_ARRAY = [
3413
+ "compatibleWith",
3414
+ "requiresSetup",
3415
+ "providesSetupFor"
3416
+ ];
3417
+ function checkSkillRelationRefs(matrix, issues) {
3539
3418
  for (const [skillId, skill] of typedEntries(matrix.skills)) {
3540
3419
  if (!skill) continue;
3541
- for (const compatId of skill.compatibleWith) {
3542
- if (!skillIds.has(compatId)) {
3543
- issues.push({
3544
- severity: "warning",
3545
- finding: "ghost-compatible-with-target",
3546
- details: `Skill '${skillId}' has compatibleWith '${compatId}' which does not exist in the matrix`
3547
- });
3420
+ for (const field of RELATION_FIELDS_SKILL_ID_ARRAY) {
3421
+ for (const ref of skill[field]) {
3422
+ if (!matrix.skills[ref]) {
3423
+ issues.push({
3424
+ severity: "warning",
3425
+ finding: "skill-unresolved-relation-ref",
3426
+ details: `Skill '${skillId}' has unresolved reference '${ref}' in '${field}'`
3427
+ });
3428
+ }
3548
3429
  }
3549
3430
  }
3550
- }
3551
- }
3552
- function checkStackSkillIds(matrix, skillIds, issues) {
3553
- for (const stack of matrix.suggestedStacks) {
3554
- for (const stackSkillId of stack.allSkillIds) {
3555
- if (!skillIds.has(stackSkillId)) {
3431
+ for (const relation of skill.conflictsWith) {
3432
+ if (!matrix.skills[relation.skillId]) {
3556
3433
  issues.push({
3557
3434
  severity: "warning",
3558
- finding: "stack-ghost-skill",
3559
- details: `Stack '${stack.id}' references skill '${stackSkillId}' which does not exist in the matrix`
3435
+ finding: "skill-unresolved-relation-ref",
3436
+ details: `Skill '${skillId}' has unresolved reference '${relation.skillId}' in 'conflictsWith'`
3560
3437
  });
3561
3438
  }
3562
3439
  }
3440
+ for (const requirement of skill.requires) {
3441
+ for (const ref of requirement.skillIds) {
3442
+ if (!matrix.skills[ref]) {
3443
+ issues.push({
3444
+ severity: "warning",
3445
+ finding: "skill-unresolved-relation-ref",
3446
+ details: `Skill '${skillId}' has unresolved reference '${ref}' in 'requires'`
3447
+ });
3448
+ }
3449
+ }
3450
+ }
3563
3451
  }
3564
3452
  }
3565
3453
 
3566
3454
  // src/cli/lib/loading/multi-source-loader.ts
3567
3455
  init_esm_shims();
3568
- import path21 from "path";
3456
+ import path19 from "path";
3569
3457
  async function loadSkillsFromAllSources(primaryMatrix, sourceConfig, projectDir, forceRefresh = false, marketplace) {
3570
3458
  const resolvedMarketplace = marketplace ?? sourceConfig.marketplace;
3571
3459
  const isDefaultPublicSource = sourceConfig.source === DEFAULT_SOURCE;
@@ -3586,7 +3474,6 @@ function tagPrimarySourceSkills(matrix, sourceName, sourceType) {
3586
3474
  const source = {
3587
3475
  name: sourceName,
3588
3476
  type: sourceType,
3589
- version: skill.version,
3590
3477
  installed: false,
3591
3478
  primary: true
3592
3479
  };
@@ -3628,7 +3515,6 @@ async function tagPluginSkills(matrix, projectDir, primarySourceName, primarySou
3628
3515
  skill.availableSources.push({
3629
3516
  name: primarySourceName,
3630
3517
  type: primarySourceType,
3631
- version: skill.version,
3632
3518
  installed: true,
3633
3519
  installMode: "plugin",
3634
3520
  primary: true
@@ -3656,7 +3542,7 @@ async function tagPublicSourceSkills(matrix, forceRefresh) {
3656
3542
  }
3657
3543
  try {
3658
3544
  const fetchResult = await fetchFromSource(DEFAULT_SOURCE, { forceRefresh });
3659
- const skillsDir = path21.join(fetchResult.path, SKILLS_DIR_PATH);
3545
+ const skillsDir = path19.join(fetchResult.path, SKILLS_DIR_PATH);
3660
3546
  const publicSkills = await extractAllSkills(skillsDir);
3661
3547
  let matchCount = 0;
3662
3548
  for (const publicSkill of publicSkills) {
@@ -3694,7 +3580,7 @@ async function tagExtraSources(matrix, projectDir, forceRefresh) {
3694
3580
  verbose(`Loading extra source: ${extraSource.name} (${extraSource.url})`);
3695
3581
  try {
3696
3582
  const fetchResult = await fetchFromSource(extraSource.url, { forceRefresh });
3697
- const skillsDir = path21.join(fetchResult.path, SKILLS_DIR_PATH);
3583
+ const skillsDir = path19.join(fetchResult.path, SKILLS_DIR_PATH);
3698
3584
  const skills = await extractAllSkills(skillsDir);
3699
3585
  let matchCount = 0;
3700
3586
  for (const extractedSkill of skills) {
@@ -3737,7 +3623,7 @@ async function searchExtraSources(alias, configuredSources) {
3737
3623
  for (const source of configuredSources) {
3738
3624
  try {
3739
3625
  const fetchResult = await fetchFromSource(source.url, { forceRefresh: false });
3740
- const skillsDir = path21.join(fetchResult.path, SKILLS_DIR_PATH);
3626
+ const skillsDir = path19.join(fetchResult.path, SKILLS_DIR_PATH);
3741
3627
  const skills = await extractAllSkills(skillsDir);
3742
3628
  for (const skill of skills) {
3743
3629
  const segments = skill.directoryPath.split("/");
@@ -3795,7 +3681,7 @@ async function loadSkillsMatrixFromSource(options = {}) {
3795
3681
  async function loadFromLocal(source, sourceConfig) {
3796
3682
  let skillsPath;
3797
3683
  if (isLocalSource(source)) {
3798
- skillsPath = path22.isAbsolute(source) ? source : path22.resolve(process.cwd(), source);
3684
+ skillsPath = path20.isAbsolute(source) ? source : path20.resolve(process.cwd(), source);
3799
3685
  } else {
3800
3686
  skillsPath = PROJECT_ROOT;
3801
3687
  }
@@ -3837,8 +3723,8 @@ async function loadAndMergeFromBasePath(basePath) {
3837
3723
  const matrixRelPath = sourceProjectConfig?.matrixFile ?? SKILLS_MATRIX_PATH;
3838
3724
  const skillsDirRelPath = sourceProjectConfig?.skillsDir ?? SKILLS_DIR_PATH;
3839
3725
  const stacksRelFile = sourceProjectConfig?.stacksFile;
3840
- const sourceMatrixPath = path22.join(basePath, matrixRelPath);
3841
- const cliMatrixPath = path22.join(PROJECT_ROOT, SKILLS_MATRIX_PATH);
3726
+ const sourceMatrixPath = path20.join(basePath, matrixRelPath);
3727
+ const cliMatrixPath = path20.join(PROJECT_ROOT, SKILLS_MATRIX_PATH);
3842
3728
  let matrixPath;
3843
3729
  if (await fileExists(sourceMatrixPath)) {
3844
3730
  matrixPath = sourceMatrixPath;
@@ -3847,7 +3733,7 @@ async function loadAndMergeFromBasePath(basePath) {
3847
3733
  matrixPath = cliMatrixPath;
3848
3734
  verbose(`Matrix from CLI (source has no matrix): ${matrixPath}`);
3849
3735
  }
3850
- const skillsDir = path22.join(basePath, skillsDirRelPath);
3736
+ const skillsDir = path20.join(basePath, skillsDirRelPath);
3851
3737
  verbose(`Skills from source: ${skillsDir}`);
3852
3738
  const matrix = await loadSkillsMatrix(matrixPath);
3853
3739
  const skills = await extractAllSkills(skillsDir);
@@ -3943,13 +3829,13 @@ function mergeLocalSkillsIntoMatrix(matrix, localResult) {
3943
3829
 
3944
3830
  // src/cli/lib/loading/defaults-loader.ts
3945
3831
  init_esm_shims();
3946
- import path23 from "path";
3832
+ import path21 from "path";
3947
3833
  import { fileURLToPath } from "url";
3948
3834
  var cachedDefaults = null;
3949
3835
  function getDefaultsPath() {
3950
- const currentDir = path23.dirname(fileURLToPath(import.meta.url));
3836
+ const currentDir = path21.dirname(fileURLToPath(import.meta.url));
3951
3837
  const isInDist = currentDir.includes("/dist");
3952
- return isInDist ? path23.join(currentDir, "cli", "defaults", "agent-mappings.yaml") : path23.join(currentDir, "../..", "defaults", "agent-mappings.yaml");
3838
+ return isInDist ? path21.join(currentDir, "cli", "defaults", "agent-mappings.yaml") : path21.join(currentDir, "../..", "defaults", "agent-mappings.yaml");
3953
3839
  }
3954
3840
  async function loadDefaultMappings() {
3955
3841
  if (cachedDefaults !== null) {
@@ -4123,12 +4009,12 @@ import { difference } from "remeda";
4123
4009
 
4124
4010
  // src/cli/lib/configuration/project-config.ts
4125
4011
  init_esm_shims();
4126
- import path24 from "path";
4012
+ import path22 from "path";
4127
4013
  var CONFIG_PATH = `${CLAUDE_SRC_DIR}/config.yaml`;
4128
4014
  var LEGACY_CONFIG_PATH = `${CLAUDE_DIR}/config.yaml`;
4129
4015
  async function loadProjectConfig(projectDir) {
4130
- const srcConfigPath = path24.join(projectDir, CONFIG_PATH);
4131
- const legacyConfigPath = path24.join(projectDir, LEGACY_CONFIG_PATH);
4016
+ const srcConfigPath = path22.join(projectDir, CONFIG_PATH);
4017
+ const legacyConfigPath = path22.join(projectDir, LEGACY_CONFIG_PATH);
4132
4018
  let configPath = srcConfigPath;
4133
4019
  if (!await fileExists(srcConfigPath)) {
4134
4020
  if (await fileExists(legacyConfigPath)) {
@@ -4151,7 +4037,7 @@ async function loadProjectConfig(projectDir) {
4151
4037
  warn(
4152
4038
  `Project config at '${configPath}' is missing required 'name' field \u2014 defaulting to directory name`
4153
4039
  );
4154
- config.name = path24.basename(projectDir);
4040
+ config.name = path22.basename(projectDir);
4155
4041
  }
4156
4042
  if (!config.skills) {
4157
4043
  warn(`Project config at '${configPath}' is missing 'skills' array \u2014 defaulting to empty`);
@@ -4262,7 +4148,7 @@ function sanitizeSourceForCache(source) {
4262
4148
  }
4263
4149
  function getCacheDir(source) {
4264
4150
  const sanitized = sanitizeSourceForCache(source) || "unknown";
4265
- return path25.join(CACHE_DIR, "sources", sanitized);
4151
+ return path23.join(CACHE_DIR, "sources", sanitized);
4266
4152
  }
4267
4153
  async function fetchFromSource(source, options = {}) {
4268
4154
  const { forceRefresh = false, subdir } = options;
@@ -4272,8 +4158,8 @@ async function fetchFromSource(source, options = {}) {
4272
4158
  return fetchFromRemoteSource(source, { forceRefresh, subdir });
4273
4159
  }
4274
4160
  async function fetchFromLocalSource(source, subdir) {
4275
- const fullPath = subdir ? path25.join(source, subdir) : source;
4276
- const absolutePath = path25.isAbsolute(fullPath) ? fullPath : path25.resolve(process.cwd(), fullPath);
4161
+ const fullPath = subdir ? path23.join(source, subdir) : source;
4162
+ const absolutePath = path23.isAbsolute(fullPath) ? fullPath : path23.resolve(process.cwd(), fullPath);
4277
4163
  if (!await directoryExists(absolutePath)) {
4278
4164
  throw new Error(`Local source not found: '${absolutePath}'`);
4279
4165
  }
@@ -4300,8 +4186,8 @@ function getGigetCacheDir(source) {
4300
4186
  return void 0;
4301
4187
  }
4302
4188
  const templateName = uriMatch.groups.repo.replace("/", "-").replace(/[^\da-z-]/gi, "-");
4303
- const gigetCacheRoot = process.env.XDG_CACHE_HOME ? path25.resolve(process.env.XDG_CACHE_HOME, "giget") : path25.resolve(os2.homedir(), ".cache", "giget");
4304
- return path25.join(gigetCacheRoot, providerName, templateName);
4189
+ const gigetCacheRoot = process.env.XDG_CACHE_HOME ? path23.resolve(process.env.XDG_CACHE_HOME, "giget") : path23.resolve(os2.homedir(), ".cache", "giget");
4190
+ return path23.join(gigetCacheRoot, providerName, templateName);
4305
4191
  }
4306
4192
  async function clearGigetCache(source) {
4307
4193
  const gigetDir = getGigetCacheDir(source);
@@ -4327,8 +4213,9 @@ async function fetchFromRemoteSource(source, options) {
4327
4213
  }
4328
4214
  if (forceRefresh) {
4329
4215
  await clearGigetCache(source);
4216
+ await remove(cacheDir);
4330
4217
  }
4331
- await ensureDir(path25.dirname(cacheDir));
4218
+ await ensureDir(path23.dirname(cacheDir));
4332
4219
  try {
4333
4220
  const result = await downloadTemplate(fullSource, {
4334
4221
  dir: cacheDir,
@@ -4398,8 +4285,8 @@ async function fetchMarketplace(source, options = {}) {
4398
4285
  subdir: ""
4399
4286
  // Root of repo
4400
4287
  });
4401
- const marketplacePath = path25.join(result.path, PLUGIN_MANIFEST_DIR, "marketplace.json");
4402
- if (!await directoryExists(path25.dirname(marketplacePath))) {
4288
+ const marketplacePath = path23.join(result.path, PLUGIN_MANIFEST_DIR, "marketplace.json");
4289
+ if (!await directoryExists(path23.dirname(marketplacePath))) {
4403
4290
  throw new Error(
4404
4291
  `Marketplace not found for source: ${source}
4405
4292
 
@@ -4539,7 +4426,6 @@ async function getSourceSummary(projectDir) {
4539
4426
  export {
4540
4427
  generateAgentPluginManifest,
4541
4428
  writePluginManifest,
4542
- findPluginManifest,
4543
4429
  getProjectPluginsDir,
4544
4430
  getPluginAgentsDir,
4545
4431
  getPluginManifestPath,
@@ -4605,10 +4491,8 @@ export {
4605
4491
  installLocal,
4606
4492
  getInstallationInfo,
4607
4493
  formatInstallationDisplay,
4608
- bumpPluginVersion,
4609
- getPluginVersion,
4610
4494
  validatePlugin,
4611
4495
  validateAllPlugins,
4612
4496
  printPluginValidationResult
4613
4497
  };
4614
- //# sourceMappingURL=chunk-SYHRJG5G.js.map
4498
+ //# sourceMappingURL=chunk-ZECXM7LP.js.map