@agents-inc/cli 0.35.0 → 0.38.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 (190) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/config/skills-matrix.yaml +17 -17
  3. package/dist/{chunk-HTTPKSL6.js → chunk-2XX4TMCI.js} +2 -2
  4. package/dist/{chunk-CEWNZQMH.js → chunk-3E2V5YL3.js} +8 -2
  5. package/dist/chunk-3E2V5YL3.js.map +1 -0
  6. package/dist/{chunk-IG7CUREJ.js → chunk-3NQJOJZL.js} +2 -2
  7. package/dist/chunk-54ZZCWN4.js +51 -0
  8. package/dist/chunk-54ZZCWN4.js.map +1 -0
  9. package/dist/{chunk-VEZ2GZEK.js → chunk-ATLRUR3B.js} +2 -2
  10. package/dist/{chunk-KWF6D7ZP.js → chunk-CYFU3ARY.js} +26 -16
  11. package/dist/chunk-CYFU3ARY.js.map +1 -0
  12. package/dist/{chunk-CXWPUVA7.js → chunk-DUQFF45G.js} +7 -7
  13. package/dist/{chunk-U36YCEBK.js → chunk-EISBUEBL.js} +32 -23
  14. package/dist/chunk-EISBUEBL.js.map +1 -0
  15. package/dist/chunk-EXFVAEPY.js +80 -0
  16. package/dist/chunk-EXFVAEPY.js.map +1 -0
  17. package/dist/{chunk-YN35L5NE.js → chunk-FWQK3HWB.js} +4 -4
  18. package/dist/chunk-FWQK3HWB.js.map +1 -0
  19. package/dist/{chunk-DC5AK3LW.js → chunk-GG4BSB6S.js} +5 -11
  20. package/dist/chunk-GG4BSB6S.js.map +1 -0
  21. package/dist/{chunk-GGHH3KR2.js → chunk-HKDE4LJW.js} +2 -2
  22. package/dist/{chunk-OGXSTJP2.js → chunk-HRMQ2RGY.js} +81 -26
  23. package/dist/chunk-HRMQ2RGY.js.map +1 -0
  24. package/dist/{chunk-YPJKOM42.js → chunk-HRW7BIDE.js} +2 -2
  25. package/dist/{chunk-LFHZBF6N.js → chunk-IVIK776Y.js} +4 -3
  26. package/dist/chunk-IVIK776Y.js.map +1 -0
  27. package/dist/{chunk-NVQEHRJY.js → chunk-IWNPFIGY.js} +38 -48
  28. package/dist/chunk-IWNPFIGY.js.map +1 -0
  29. package/dist/{chunk-YIKBNGE3.js → chunk-IZRVFC2Z.js} +7 -7
  30. package/dist/chunk-IZRVFC2Z.js.map +1 -0
  31. package/dist/{chunk-AQQVSNUX.js → chunk-K77I4XGL.js} +20 -6
  32. package/dist/chunk-K77I4XGL.js.map +1 -0
  33. package/dist/{chunk-BPD4VUAU.js → chunk-M6PGIZNS.js} +5 -5
  34. package/dist/{chunk-5LPPIT6H.js → chunk-NFV4SKH5.js} +4 -4
  35. package/dist/chunk-NI2RSNWB.js +156 -0
  36. package/dist/chunk-NI2RSNWB.js.map +1 -0
  37. package/dist/{chunk-NJ775OJ4.js → chunk-OEX5JDQD.js} +7 -7
  38. package/dist/chunk-OEX5JDQD.js.map +1 -0
  39. package/dist/{chunk-OKILA27U.js → chunk-TA6IIQI4.js} +86 -99
  40. package/dist/chunk-TA6IIQI4.js.map +1 -0
  41. package/dist/{chunk-PKUIO2Z7.js → chunk-TBDIR6LY.js} +8 -8
  42. package/dist/chunk-TBDIR6LY.js.map +1 -0
  43. package/dist/{chunk-XYCN2GCV.js → chunk-TNFACSWF.js} +3 -3
  44. package/dist/{chunk-ZE355C6C.js → chunk-TY5GELDB.js} +9 -4
  45. package/dist/chunk-TY5GELDB.js.map +1 -0
  46. package/dist/{chunk-WMVGRAFB.js → chunk-U5OB5ADP.js} +186 -109
  47. package/dist/chunk-U5OB5ADP.js.map +1 -0
  48. package/dist/{chunk-JXMRTHDT.js → chunk-UOMMQ5M6.js} +2 -2
  49. package/dist/{chunk-XNQJBQ5X.js → chunk-UV6JUGIY.js} +2 -2
  50. package/dist/{chunk-5YNZJ5TP.js → chunk-VAHVSQIG.js} +2 -2
  51. package/dist/{chunk-OGJ7DFCL.js → chunk-VAK5PX72.js} +5 -5
  52. package/dist/chunk-WSGGJKD5.js +113 -0
  53. package/dist/chunk-WSGGJKD5.js.map +1 -0
  54. package/dist/{chunk-BLLXNFWP.js → chunk-YHQNTBBN.js} +2 -2
  55. package/dist/{chunk-OI4WBRC7.js → chunk-YJIJTBSX.js} +77 -102
  56. package/dist/chunk-YJIJTBSX.js.map +1 -0
  57. package/dist/{chunk-YCS7GF6Y.js → chunk-ZBJQXDQN.js} +3 -1
  58. package/dist/{chunk-YCS7GF6Y.js.map → chunk-ZBJQXDQN.js.map} +1 -1
  59. package/dist/cli/defaults/agent-mappings.yaml +4 -4
  60. package/dist/commands/build/marketplace.js +3 -3
  61. package/dist/commands/build/plugins.js +5 -5
  62. package/dist/commands/build/stack.js +5 -5
  63. package/dist/commands/compile.js +12 -17
  64. package/dist/commands/compile.js.map +1 -1
  65. package/dist/commands/config/get.js +8 -8
  66. package/dist/commands/config/get.js.map +1 -1
  67. package/dist/commands/config/index.js +5 -5
  68. package/dist/commands/config/path.js +4 -4
  69. package/dist/commands/config/set-project.js +7 -7
  70. package/dist/commands/config/set-project.js.map +1 -1
  71. package/dist/commands/config/show.js +5 -5
  72. package/dist/commands/config/unset-project.js +5 -5
  73. package/dist/commands/config/unset-project.js.map +1 -1
  74. package/dist/commands/diff.js +8 -8
  75. package/dist/commands/diff.js.map +1 -1
  76. package/dist/commands/doctor.js +4 -4
  77. package/dist/commands/edit.js +30 -27
  78. package/dist/commands/edit.js.map +1 -1
  79. package/dist/commands/eject.js +6 -6
  80. package/dist/commands/eject.js.map +1 -1
  81. package/dist/commands/import/skill.js +16 -16
  82. package/dist/commands/import/skill.js.map +1 -1
  83. package/dist/commands/info.js +5 -5
  84. package/dist/commands/init.js +29 -26
  85. package/dist/commands/init.js.map +1 -1
  86. package/dist/commands/list.js +4 -4
  87. package/dist/commands/new/agent.js +5 -5
  88. package/dist/commands/new/skill.js +8 -8
  89. package/dist/commands/new/skill.js.map +1 -1
  90. package/dist/commands/outdated.js +4 -4
  91. package/dist/commands/search.js +7 -7
  92. package/dist/commands/uninstall.js +109 -102
  93. package/dist/commands/uninstall.js.map +1 -1
  94. package/dist/commands/update.js +6 -6
  95. package/dist/commands/validate.js +5 -5
  96. package/dist/commands/version/bump.js +4 -4
  97. package/dist/commands/version/index.js +4 -4
  98. package/dist/commands/version/set.js +4 -4
  99. package/dist/commands/version/show.js +4 -4
  100. package/dist/components/skill-search/skill-search.js +3 -3
  101. package/dist/components/wizard/category-grid.js +3 -3
  102. package/dist/components/wizard/category-grid.test.js +42 -21
  103. package/dist/components/wizard/category-grid.test.js.map +1 -1
  104. package/dist/components/wizard/checkbox-grid.js +10 -0
  105. package/dist/components/wizard/checkbox-grid.test.js +260 -0
  106. package/dist/components/wizard/checkbox-grid.test.js.map +1 -0
  107. package/dist/components/wizard/domain-selection.js +7 -5
  108. package/dist/components/wizard/help-modal.js +2 -2
  109. package/dist/components/wizard/menu-item.js +2 -2
  110. package/dist/components/wizard/search-modal.js +2 -2
  111. package/dist/components/wizard/search-modal.test.js +2 -2
  112. package/dist/components/wizard/section-progress.js +2 -2
  113. package/dist/components/wizard/section-progress.test.js +2 -2
  114. package/dist/components/wizard/source-grid.js +4 -4
  115. package/dist/components/wizard/source-grid.test.js +4 -4
  116. package/dist/components/wizard/stack-selection.js +8 -7
  117. package/dist/components/wizard/step-agents.js +16 -0
  118. package/dist/components/wizard/step-agents.js.map +1 -0
  119. package/dist/components/wizard/step-agents.test.js +185 -0
  120. package/dist/components/wizard/step-agents.test.js.map +1 -0
  121. package/dist/components/wizard/step-build.js +9 -8
  122. package/dist/components/wizard/step-build.test.js +25 -23
  123. package/dist/components/wizard/step-build.test.js.map +1 -1
  124. package/dist/components/wizard/step-confirm.js +2 -2
  125. package/dist/components/wizard/step-confirm.test.js +6 -5
  126. package/dist/components/wizard/step-confirm.test.js.map +1 -1
  127. package/dist/components/wizard/step-refine.js +2 -2
  128. package/dist/components/wizard/step-refine.test.js +2 -2
  129. package/dist/components/wizard/step-settings.js +5 -5
  130. package/dist/components/wizard/step-settings.test.js +8 -8
  131. package/dist/components/wizard/step-sources.js +11 -10
  132. package/dist/components/wizard/step-sources.test.js +13 -12
  133. package/dist/components/wizard/step-sources.test.js.map +1 -1
  134. package/dist/components/wizard/step-stack.js +11 -9
  135. package/dist/components/wizard/step-stack.test.js +12 -10
  136. package/dist/components/wizard/step-stack.test.js.map +1 -1
  137. package/dist/components/wizard/view-title.js +2 -2
  138. package/dist/components/wizard/wizard-layout.js +8 -7
  139. package/dist/components/wizard/wizard-tabs.js +2 -2
  140. package/dist/components/wizard/wizard-tabs.test.js +6 -4
  141. package/dist/components/wizard/wizard-tabs.test.js.map +1 -1
  142. package/dist/components/wizard/wizard.js +26 -23
  143. package/dist/config/skills-matrix.yaml +17 -17
  144. package/dist/hooks/init.js +3 -3
  145. package/dist/{source-manager-PTK4P6BF.js → source-manager-FEGVYDFZ.js} +4 -4
  146. package/dist/source-manager-FEGVYDFZ.js.map +1 -0
  147. package/dist/stores/wizard-store.js +5 -4
  148. package/dist/stores/wizard-store.test.js +287 -15
  149. package/dist/stores/wizard-store.test.js.map +1 -1
  150. package/package.json +1 -1
  151. package/src/schemas/agent.schema.json +3 -3
  152. package/src/schemas/metadata.schema.json +14 -14
  153. package/src/schemas/project-config.schema.json +43 -2
  154. package/src/schemas/project-source-config.schema.json +5 -5
  155. package/src/schemas/skills-matrix.schema.json +4 -4
  156. package/src/schemas/stack.schema.json +1 -1
  157. package/src/schemas/stacks.schema.json +42 -1
  158. package/dist/chunk-AQQVSNUX.js.map +0 -1
  159. package/dist/chunk-CEWNZQMH.js.map +0 -1
  160. package/dist/chunk-DC5AK3LW.js.map +0 -1
  161. package/dist/chunk-KWF6D7ZP.js.map +0 -1
  162. package/dist/chunk-LFHZBF6N.js.map +0 -1
  163. package/dist/chunk-NJ775OJ4.js.map +0 -1
  164. package/dist/chunk-NVQEHRJY.js.map +0 -1
  165. package/dist/chunk-OGXSTJP2.js.map +0 -1
  166. package/dist/chunk-OI4WBRC7.js.map +0 -1
  167. package/dist/chunk-OKILA27U.js.map +0 -1
  168. package/dist/chunk-PKUIO2Z7.js.map +0 -1
  169. package/dist/chunk-U36YCEBK.js.map +0 -1
  170. package/dist/chunk-UFUQUFV6.js +0 -256
  171. package/dist/chunk-UFUQUFV6.js.map +0 -1
  172. package/dist/chunk-WMVGRAFB.js.map +0 -1
  173. package/dist/chunk-YIKBNGE3.js.map +0 -1
  174. package/dist/chunk-YN35L5NE.js.map +0 -1
  175. package/dist/chunk-ZE355C6C.js.map +0 -1
  176. /package/dist/{chunk-HTTPKSL6.js.map → chunk-2XX4TMCI.js.map} +0 -0
  177. /package/dist/{chunk-IG7CUREJ.js.map → chunk-3NQJOJZL.js.map} +0 -0
  178. /package/dist/{chunk-VEZ2GZEK.js.map → chunk-ATLRUR3B.js.map} +0 -0
  179. /package/dist/{chunk-CXWPUVA7.js.map → chunk-DUQFF45G.js.map} +0 -0
  180. /package/dist/{chunk-GGHH3KR2.js.map → chunk-HKDE4LJW.js.map} +0 -0
  181. /package/dist/{chunk-YPJKOM42.js.map → chunk-HRW7BIDE.js.map} +0 -0
  182. /package/dist/{chunk-BPD4VUAU.js.map → chunk-M6PGIZNS.js.map} +0 -0
  183. /package/dist/{chunk-5LPPIT6H.js.map → chunk-NFV4SKH5.js.map} +0 -0
  184. /package/dist/{chunk-XYCN2GCV.js.map → chunk-TNFACSWF.js.map} +0 -0
  185. /package/dist/{chunk-JXMRTHDT.js.map → chunk-UOMMQ5M6.js.map} +0 -0
  186. /package/dist/{chunk-XNQJBQ5X.js.map → chunk-UV6JUGIY.js.map} +0 -0
  187. /package/dist/{chunk-5YNZJ5TP.js.map → chunk-VAHVSQIG.js.map} +0 -0
  188. /package/dist/{chunk-OGJ7DFCL.js.map → chunk-VAK5PX72.js.map} +0 -0
  189. /package/dist/{chunk-BLLXNFWP.js.map → chunk-YHQNTBBN.js.map} +0 -0
  190. /package/dist/{source-manager-PTK4P6BF.js.map → components/wizard/checkbox-grid.js.map} +0 -0
@@ -42,7 +42,7 @@ import {
42
42
  warn,
43
43
  warnUnknownFields,
44
44
  writeFile
45
- } from "./chunk-OI4WBRC7.js";
45
+ } from "./chunk-YJIJTBSX.js";
46
46
  import {
47
47
  ARCHIVED_SKILLS_DIR_NAME,
48
48
  CACHE_DIR,
@@ -53,6 +53,7 @@ import {
53
53
  DEFAULT_BRANDING,
54
54
  DEFAULT_DISPLAY_VERSION,
55
55
  DEFAULT_PLUGIN_NAME,
56
+ DEFAULT_PUBLIC_SOURCE_NAME,
56
57
  DEFAULT_VERSION,
57
58
  DIRS,
58
59
  GITHUB_SOURCE,
@@ -75,7 +76,7 @@ import {
75
76
  STANDARD_FILES,
76
77
  YAML_FORMATTING,
77
78
  yamlSchemaComment
78
- } from "./chunk-YCS7GF6Y.js";
79
+ } from "./chunk-ZBJQXDQN.js";
79
80
  import {
80
81
  init_esm_shims
81
82
  } from "./chunk-DHET7RCE.js";
@@ -196,10 +197,10 @@ async function resolveAgentsSource(flagValue, projectDir) {
196
197
  return { agentsSource: flagValue, agentsSourceOrigin: "flag" };
197
198
  }
198
199
  const projectConfig = projectDir ? await loadProjectSourceConfig(projectDir) : null;
199
- if (projectConfig?.agents_source) {
200
- verbose(`Agents source from project config: ${projectConfig.agents_source}`);
200
+ if (projectConfig?.agentsSource) {
201
+ verbose(`Agents source from project config: ${projectConfig.agentsSource}`);
201
202
  return {
202
- agentsSource: projectConfig.agents_source,
203
+ agentsSource: projectConfig.agentsSource,
203
204
  agentsSourceOrigin: "project"
204
205
  };
205
206
  }
@@ -413,6 +414,7 @@ function isLocalSource(source) {
413
414
  init_esm_shims();
414
415
  import { createHash as createHash2 } from "crypto";
415
416
  import { downloadTemplate } from "giget";
417
+ import os2 from "os";
416
418
  import path25 from "path";
417
419
 
418
420
  // src/cli/lib/configuration/index.ts
@@ -603,12 +605,12 @@ import path22 from "path";
603
605
  // src/cli/lib/metadata-keys.ts
604
606
  init_esm_shims();
605
607
  var METADATA_KEYS = {
606
- CLI_NAME: "cli_name",
607
- CLI_DESCRIPTION: "cli_description",
608
+ CLI_NAME: "cliName",
609
+ CLI_DESCRIPTION: "cliDescription",
608
610
  CATEGORY: "category",
609
- FORKED_FROM: "forked_from",
610
- CONTENT_HASH: "content_hash",
611
- USAGE_GUIDANCE: "usage_guidance"
611
+ FORKED_FROM: "forkedFrom",
612
+ CONTENT_HASH: "contentHash",
613
+ USAGE_GUIDANCE: "usageGuidance"
612
614
  };
613
615
  var IMPORT_DEFAULTS = {
614
616
  CATEGORY: "imported",
@@ -739,20 +741,7 @@ async function readForkedFromMetadata(skillDir) {
739
741
  warn(`Invalid metadata.yaml at ${metadataPath}: ${formatZodErrors(result.error.issues)}`);
740
742
  return null;
741
743
  }
742
- return result.data.forked_from ?? null;
743
- }
744
- async function readLocalSkillMetadata(skillDir) {
745
- const metadataPath = path4.join(skillDir, STANDARD_FILES.METADATA_YAML);
746
- if (!await fileExists(metadataPath)) {
747
- return null;
748
- }
749
- const content = await readFile(metadataPath);
750
- const result = localSkillMetadataSchema.safeParse(parseYaml3(content));
751
- if (!result.success) {
752
- warn(`Invalid metadata.yaml at ${metadataPath}: ${formatZodErrors(result.error.issues)}`);
753
- return null;
754
- }
755
- return result.data;
744
+ return result.data.forkedFrom ?? null;
756
745
  }
757
746
  async function getLocalSkillsWithMetadata(projectDir) {
758
747
  const localSkillsPath = path4.join(projectDir, LOCAL_SKILLS_PATH);
@@ -764,7 +753,7 @@ async function getLocalSkillsWithMetadata(projectDir) {
764
753
  for (const dirName of skillDirs) {
765
754
  const skillDir = path4.join(localSkillsPath, dirName);
766
755
  const forkedFrom = await readForkedFromMetadata(skillDir);
767
- const skillId = forkedFrom?.skill_id ?? dirName;
756
+ const skillId = forkedFrom?.skillId ?? dirName;
768
757
  result.set(skillId, { dirName, forkedFrom });
769
758
  }
770
759
  return result;
@@ -790,11 +779,11 @@ async function compareLocalSkillsWithSource(projectDir, sourcePath, sourceSkills
790
779
  });
791
780
  continue;
792
781
  }
793
- const localHash = forkedFrom.content_hash;
794
- const sourceSkill = sourceSkills[forkedFrom.skill_id];
782
+ const localHash = forkedFrom.contentHash;
783
+ const sourceSkill = sourceSkills[forkedFrom.skillId];
795
784
  if (!sourceSkill) {
796
785
  results.push({
797
- id: forkedFrom.skill_id,
786
+ id: forkedFrom.skillId,
798
787
  localHash,
799
788
  sourceHash: null,
800
789
  status: "local-only",
@@ -805,7 +794,7 @@ async function compareLocalSkillsWithSource(projectDir, sourcePath, sourceSkills
805
794
  const sourceHash = await computeSourceHash(sourcePath, sourceSkill.path);
806
795
  if (sourceHash === null) {
807
796
  results.push({
808
- id: forkedFrom.skill_id,
797
+ id: forkedFrom.skillId,
809
798
  localHash,
810
799
  sourceHash: null,
811
800
  status: "local-only",
@@ -815,7 +804,7 @@ async function compareLocalSkillsWithSource(projectDir, sourcePath, sourceSkills
815
804
  }
816
805
  const status = localHash === sourceHash ? "current" : "outdated";
817
806
  results.push({
818
- id: forkedFrom.skill_id,
807
+ id: forkedFrom.skillId,
819
808
  localHash,
820
809
  sourceHash,
821
810
  status,
@@ -825,7 +814,7 @@ async function compareLocalSkillsWithSource(projectDir, sourcePath, sourceSkills
825
814
  }
826
815
  return sortBy(results, (r) => r.id);
827
816
  }
828
- async function injectForkedFromMetadata(destPath, skillId, contentHash) {
817
+ async function injectForkedFromMetadata(destPath, skillId, contentHash, source) {
829
818
  const metadataPath = path4.join(destPath, STANDARD_FILES.METADATA_YAML);
830
819
  const rawContent = await readFile(metadataPath);
831
820
  const lines = rawContent.split("\n");
@@ -837,13 +826,13 @@ async function injectForkedFromMetadata(destPath, skillId, contentHash) {
837
826
  if (!parseResult.success) {
838
827
  warn(`Malformed metadata.yaml at '${metadataPath}' \u2014 existing fields may be lost`);
839
828
  }
840
- const metadata = parseResult.success ? parseResult.data : { forked_from: void 0 };
841
- metadata.forked_from = {
842
- skill_id: skillId,
843
- content_hash: contentHash,
844
- date: getCurrentDate()
829
+ const metadata = parseResult.success ? parseResult.data : { forkedFrom: void 0 };
830
+ metadata.forkedFrom = {
831
+ skillId,
832
+ contentHash,
833
+ date: getCurrentDate(),
834
+ ...source ? { source } : {}
845
835
  };
846
- metadata.generatedByAgentsInc = true;
847
836
  const schemaComment = `${yamlSchemaComment(SCHEMA_PATHS.metadata)}
848
837
  `;
849
838
  const newYamlContent = stringifyYaml2(metadata, { lineWidth: YAML_FORMATTING.LINE_WIDTH_NONE });
@@ -888,7 +877,7 @@ async function copySkillToLocalFlattened(skill, localSkillsDir, sourceResult) {
888
877
  const contentHash = await generateSkillHash(sourcePath);
889
878
  await ensureDir(path5.dirname(destPath));
890
879
  await copy(sourcePath, destPath);
891
- await injectForkedFromMetadata(destPath, skill.id, contentHash);
880
+ await injectForkedFromMetadata(destPath, skill.id, contentHash, sourceResult.sourceConfig.source);
892
881
  return {
893
882
  skillId: skill.id,
894
883
  contentHash,
@@ -1324,11 +1313,11 @@ function sanitizeCompiledAgentData(data) {
1324
1313
  title: sanitizeLiquidSyntax(data.agent.title, "agent.title"),
1325
1314
  description: sanitizeLiquidSyntax(data.agent.description, "agent.description"),
1326
1315
  tools: sanitizeStringArray(data.agent.tools, "agent.tools") ?? data.agent.tools,
1327
- disallowed_tools: sanitizeStringArray(data.agent.disallowed_tools, "agent.disallowed_tools"),
1316
+ disallowedTools: sanitizeStringArray(data.agent.disallowedTools, "agent.disallowedTools"),
1328
1317
  model: sanitizeString(data.agent.model, "agent.model"),
1329
- permission_mode: sanitizeString(
1330
- data.agent.permission_mode,
1331
- "agent.permission_mode"
1318
+ permissionMode: sanitizeString(
1319
+ data.agent.permissionMode,
1320
+ "agent.permissionMode"
1332
1321
  )
1333
1322
  };
1334
1323
  const sanitizedSkills = sanitizeSkills(data.skills);
@@ -1749,16 +1738,16 @@ var CONFIG_OPTIONS_COMMENT = [
1749
1738
  "# Additional config options:",
1750
1739
  `# source: ${DEFAULT_SOURCE}`,
1751
1740
  "# marketplace: my-company",
1752
- "# agents_source: github:my-org/agents",
1741
+ "# agentsSource: github:my-org/agents",
1753
1742
  ""
1754
1743
  ].join("\n");
1755
1744
  var PATH_OVERRIDES_COMMENT = [
1756
1745
  "",
1757
1746
  "# Custom paths (for marketplace repos with non-standard layouts):",
1758
- `# skills_dir: ${SKILLS_DIR_PATH}`,
1759
- `# agents_dir: ${DIRS.agents}`,
1760
- `# stacks_file: ${STACKS_FILE_PATH}`,
1761
- `# matrix_file: ${SKILLS_MATRIX_PATH}`,
1747
+ `# skillsDir: ${SKILLS_DIR_PATH}`,
1748
+ `# agentsDir: ${DIRS.agents}`,
1749
+ `# stacksFile: ${STACKS_FILE_PATH}`,
1750
+ `# matrixFile: ${SKILLS_MATRIX_PATH}`,
1762
1751
  ""
1763
1752
  ].join("\n");
1764
1753
  async function writeConfigFile(config, configPath) {
@@ -2685,7 +2674,7 @@ async function extractLocalSkill(localSkillsPath, skillDirName) {
2685
2674
  return null;
2686
2675
  }
2687
2676
  const metadata = parsed.data;
2688
- if (!metadata.cli_name) {
2677
+ if (!metadata.cliName) {
2689
2678
  warn(
2690
2679
  `Skipping local skill '${skillDirName}': missing required '${METADATA_KEYS.CLI_NAME}' in metadata.yaml`
2691
2680
  );
@@ -2708,17 +2697,17 @@ async function extractLocalSkill(localSkillsPath, skillDirName) {
2708
2697
  const extracted = {
2709
2698
  id: skillId,
2710
2699
  directoryPath: skillDirName,
2711
- description: metadata.cli_description || frontmatter.description,
2712
- usageGuidance: metadata.usage_guidance,
2700
+ description: metadata.cliDescription || frontmatter.description,
2701
+ usageGuidance: metadata.usageGuidance,
2713
2702
  category,
2714
- categoryExclusive: metadata.category_exclusive ?? false,
2703
+ categoryExclusive: metadata.categoryExclusive ?? false,
2715
2704
  author: LOCAL_DEFAULTS.AUTHOR,
2716
2705
  tags: metadata.tags ?? [],
2717
- compatibleWith: metadata.compatible_with ?? [],
2718
- conflictsWith: metadata.conflicts_with ?? [],
2706
+ compatibleWith: metadata.compatibleWith ?? [],
2707
+ conflictsWith: metadata.conflictsWith ?? [],
2719
2708
  requires: metadata.requires ?? [],
2720
- requiresSetup: metadata.requires_setup ?? [],
2721
- providesSetupFor: metadata.provides_setup_for ?? [],
2709
+ requiresSetup: metadata.requiresSetup ?? [],
2710
+ providesSetupFor: metadata.providesSetupFor ?? [],
2722
2711
  path: relativePath,
2723
2712
  local: true,
2724
2713
  localPath: relativePath
@@ -2797,19 +2786,19 @@ import path20 from "path";
2797
2786
  import { z as z3 } from "zod";
2798
2787
  var rawMetadataSchema = z3.object({
2799
2788
  category: categoryPathSchema,
2800
- category_exclusive: z3.boolean().optional(),
2789
+ categoryExclusive: z3.boolean().optional(),
2801
2790
  author: z3.string(),
2802
2791
  version: z3.coerce.string(),
2803
- cli_name: z3.string().optional(),
2804
- cli_description: z3.string().optional(),
2805
- usage_guidance: z3.string().optional(),
2792
+ cliName: z3.string().optional(),
2793
+ cliDescription: z3.string().optional(),
2794
+ usageGuidance: z3.string().optional(),
2806
2795
  tags: z3.array(z3.string()).optional(),
2807
2796
  // Lenient: accepts display names and skill IDs from YAML, resolved to canonical IDs during matrix merge
2808
- compatible_with: z3.array(z3.string()).optional(),
2809
- conflicts_with: z3.array(z3.string()).optional(),
2797
+ compatibleWith: z3.array(z3.string()).optional(),
2798
+ conflictsWith: z3.array(z3.string()).optional(),
2810
2799
  requires: z3.array(z3.string()).optional(),
2811
- requires_setup: z3.array(z3.string()).optional(),
2812
- provides_setup_for: z3.array(z3.string()).optional()
2800
+ requiresSetup: z3.array(z3.string()).optional(),
2801
+ providesSetupFor: z3.array(z3.string()).optional()
2813
2802
  });
2814
2803
  async function loadSkillsMatrix(configPath) {
2815
2804
  const content = await readFile(configPath);
@@ -2850,7 +2839,7 @@ async function extractAllSkills(skillsDir) {
2850
2839
  verbose(`Skipping ${metadataFile}: Invalid SKILL.md frontmatter`);
2851
2840
  continue;
2852
2841
  }
2853
- if (!metadata.cli_name) {
2842
+ if (!metadata.cliName) {
2854
2843
  throw new Error(
2855
2844
  `Skill at ${metadataFile} is missing required '${METADATA_KEYS.CLI_NAME}' field in metadata.yaml`
2856
2845
  );
@@ -2859,17 +2848,17 @@ async function extractAllSkills(skillsDir) {
2859
2848
  const extracted = {
2860
2849
  id: skillId,
2861
2850
  directoryPath: skillDir,
2862
- description: metadata.cli_description || frontmatter.description,
2863
- usageGuidance: metadata.usage_guidance,
2851
+ description: metadata.cliDescription || frontmatter.description,
2852
+ usageGuidance: metadata.usageGuidance,
2864
2853
  category: metadata.category,
2865
- categoryExclusive: metadata.category_exclusive ?? true,
2854
+ categoryExclusive: metadata.categoryExclusive ?? true,
2866
2855
  author: metadata.author,
2867
2856
  tags: metadata.tags ?? [],
2868
- compatibleWith: metadata.compatible_with ?? [],
2869
- conflictsWith: metadata.conflicts_with ?? [],
2857
+ compatibleWith: metadata.compatibleWith ?? [],
2858
+ conflictsWith: metadata.conflictsWith ?? [],
2870
2859
  requires: metadata.requires ?? [],
2871
- requiresSetup: metadata.requires_setup ?? [],
2872
- providesSetupFor: metadata.provides_setup_for ?? [],
2860
+ requiresSetup: metadata.requiresSetup ?? [],
2861
+ providesSetupFor: metadata.providesSetupFor ?? [],
2873
2862
  path: `skills/${skillDir}/`
2874
2863
  };
2875
2864
  skills.push(extracted);
@@ -2943,7 +2932,7 @@ function resolveToCanonicalId(nameOrId, displayNameToId, directoryPathToId = {},
2943
2932
  return nameOrId;
2944
2933
  }
2945
2934
  async function mergeMatrixWithSkills(matrix, skills) {
2946
- const displayNameToId = matrix.skill_aliases;
2935
+ const displayNameToId = matrix.skillAliases;
2947
2936
  const displayNames = buildReverseDisplayNames(displayNameToId);
2948
2937
  const directoryPathToId = buildDirectoryPathToIdMap(skills);
2949
2938
  const aliasTargetToSkillId = buildAliasTargetToSkillIdMap(displayNameToId, skills);
@@ -3022,7 +3011,7 @@ function resolveRequirements(skillId, metadataRequires, requireRules, resolve) {
3022
3011
  if (resolve(rule.skill, "requires.skill") !== skillId) continue;
3023
3012
  requires.push({
3024
3013
  skillIds: rule.needs.map((id) => resolve(id, "requires.needs")),
3025
- needsAny: rule.needs_any ?? false,
3014
+ needsAny: rule.needsAny ?? false,
3026
3015
  reason: rule.reason
3027
3016
  });
3028
3017
  }
@@ -3287,7 +3276,7 @@ function validateRequirements(resolvedSelections, selectedSet, matrix) {
3287
3276
  const hasAny = requirement.skillIds.some((reqId) => selectedSet.has(reqId));
3288
3277
  if (!hasAny) {
3289
3278
  errors.push({
3290
- type: "missing_requirement",
3279
+ type: "missingRequirement",
3291
3280
  message: `${getLabel(skill, skillId)} requires one of: ${requirement.skillIds.map((id) => getLabel(matrix.skills[id], id)).join(", ")}`,
3292
3281
  skills: [skillId, ...requirement.skillIds]
3293
3282
  });
@@ -3296,7 +3285,7 @@ function validateRequirements(resolvedSelections, selectedSet, matrix) {
3296
3285
  const missingIds = requirement.skillIds.filter((reqId) => !selectedSet.has(reqId));
3297
3286
  if (missingIds.length > 0) {
3298
3287
  errors.push({
3299
- type: "missing_requirement",
3288
+ type: "missingRequirement",
3300
3289
  message: `${getLabel(skill, skillId)} requires: ${missingIds.map((id) => getLabel(matrix.skills[id], id)).join(", ")}`,
3301
3290
  skills: [skillId, ...missingIds]
3302
3291
  });
@@ -3316,7 +3305,7 @@ function validateExclusivity(resolvedSelections, matrix) {
3316
3305
  const category = matrix.categories[categoryId];
3317
3306
  if (category?.exclusive) {
3318
3307
  errors.push({
3319
- type: "category_exclusive",
3308
+ type: "categoryExclusive",
3320
3309
  message: `Category "${category.displayName}" only allows one selection, but multiple selected: ${skillIds.map((id) => getLabel(matrix.skills[id], id)).join(", ")}`,
3321
3310
  skills: skillIds
3322
3311
  });
@@ -3555,22 +3544,29 @@ function checkStackSkillIds(matrix, skillIds, issues) {
3555
3544
  // src/cli/lib/loading/multi-source-loader.ts
3556
3545
  init_esm_shims();
3557
3546
  import path21 from "path";
3558
- var PUBLIC_SOURCE_NAME = "public";
3559
- async function loadSkillsFromAllSources(primaryMatrix, _sourceConfig, projectDir) {
3560
- tagPrimarySourceSkills(primaryMatrix);
3547
+ async function loadSkillsFromAllSources(primaryMatrix, sourceConfig, projectDir, forceRefresh = false, marketplace) {
3548
+ const resolvedMarketplace = marketplace ?? sourceConfig.marketplace;
3549
+ const isDefaultPublicSource = sourceConfig.source === DEFAULT_SOURCE;
3550
+ const primarySourceName = resolvedMarketplace ?? DEFAULT_PUBLIC_SOURCE_NAME;
3551
+ const primarySourceType = isDefaultPublicSource ? "public" : "private";
3552
+ tagPrimarySourceSkills(primaryMatrix, primarySourceName, primarySourceType);
3561
3553
  tagLocalSkills(primaryMatrix);
3562
- await tagPluginSkills(primaryMatrix, projectDir);
3563
- await tagExtraSources(primaryMatrix, projectDir);
3554
+ await tagPluginSkills(primaryMatrix, projectDir, primarySourceName, primarySourceType);
3555
+ if (!isDefaultPublicSource) {
3556
+ await tagPublicSourceSkills(primaryMatrix, forceRefresh);
3557
+ }
3558
+ await tagExtraSources(primaryMatrix, projectDir, forceRefresh);
3564
3559
  setActiveSources(primaryMatrix);
3565
3560
  }
3566
- function tagPrimarySourceSkills(matrix) {
3561
+ function tagPrimarySourceSkills(matrix, sourceName, sourceType) {
3567
3562
  for (const [, skill] of typedEntries(matrix.skills)) {
3568
3563
  if (!skill) continue;
3569
3564
  const source = {
3570
- name: PUBLIC_SOURCE_NAME,
3571
- type: "public",
3565
+ name: sourceName,
3566
+ type: sourceType,
3572
3567
  version: skill.version,
3573
- installed: false
3568
+ installed: false,
3569
+ primary: true
3574
3570
  };
3575
3571
  skill.availableSources = skill.availableSources ?? [];
3576
3572
  skill.availableSources.push(source);
@@ -3593,7 +3589,7 @@ function tagLocalSkills(matrix) {
3593
3589
  }
3594
3590
  verbose(`Tagged ${count} local skills with local source`);
3595
3591
  }
3596
- async function tagPluginSkills(matrix, projectDir) {
3592
+ async function tagPluginSkills(matrix, projectDir, primarySourceName, primarySourceType) {
3597
3593
  const allPluginSkillIds = await collectPluginSkillIds(matrix, projectDir);
3598
3594
  if (allPluginSkillIds.length === 0) {
3599
3595
  return;
@@ -3602,17 +3598,18 @@ async function tagPluginSkills(matrix, projectDir) {
3602
3598
  const skill = matrix.skills[skillId];
3603
3599
  if (!skill) continue;
3604
3600
  skill.availableSources = skill.availableSources ?? [];
3605
- const existingSource = skill.availableSources.find((s) => s.type === "public");
3601
+ const existingSource = skill.availableSources.find((s) => s.name === primarySourceName);
3606
3602
  if (existingSource && !existingSource.installMode) {
3607
3603
  existingSource.installed = true;
3608
3604
  existingSource.installMode = "plugin";
3609
3605
  } else if (!skill.availableSources.some((s) => s.installMode === "plugin")) {
3610
3606
  skill.availableSources.push({
3611
- name: PUBLIC_SOURCE_NAME,
3612
- type: "public",
3607
+ name: primarySourceName,
3608
+ type: primarySourceType,
3613
3609
  version: skill.version,
3614
3610
  installed: true,
3615
- installMode: "plugin"
3611
+ installMode: "plugin",
3612
+ primary: true
3616
3613
  });
3617
3614
  }
3618
3615
  }
@@ -3620,18 +3617,51 @@ async function tagPluginSkills(matrix, projectDir) {
3620
3617
  }
3621
3618
  async function collectPluginSkillIds(_matrix, projectDir) {
3622
3619
  const pluginSkills = await discoverAllPluginSkills(projectDir);
3623
- const skillIds = Object.keys(pluginSkills);
3620
+ const skillIds = typedKeys(pluginSkills);
3624
3621
  if (skillIds.length === 0) {
3625
3622
  verbose("No plugin skills discovered from settings.json");
3626
3623
  }
3627
3624
  return skillIds;
3628
3625
  }
3629
- async function tagExtraSources(matrix, projectDir) {
3626
+ async function tagPublicSourceSkills(matrix, forceRefresh) {
3627
+ let publicSourceName = DEFAULT_PUBLIC_SOURCE_NAME;
3628
+ try {
3629
+ const marketplaceResult = await fetchMarketplace(DEFAULT_SOURCE, { forceRefresh });
3630
+ publicSourceName = marketplaceResult.marketplace.name;
3631
+ verbose(`Public marketplace name from marketplace.json: ${publicSourceName}`);
3632
+ } catch {
3633
+ verbose("Public source has no marketplace.json -- using default label");
3634
+ }
3635
+ try {
3636
+ const fetchResult = await fetchFromSource(DEFAULT_SOURCE, { forceRefresh });
3637
+ const skillsDir = path21.join(fetchResult.path, SKILLS_DIR_PATH);
3638
+ const publicSkills = await extractAllSkills(skillsDir);
3639
+ let matchCount = 0;
3640
+ for (const publicSkill of publicSkills) {
3641
+ const matrixSkill = matrix.skills[publicSkill.id];
3642
+ if (!matrixSkill) continue;
3643
+ const source = {
3644
+ name: publicSourceName,
3645
+ type: "public",
3646
+ installed: false
3647
+ };
3648
+ matrixSkill.availableSources = matrixSkill.availableSources ?? [];
3649
+ matrixSkill.availableSources.push(source);
3650
+ matchCount++;
3651
+ }
3652
+ verbose(
3653
+ `Public source: ${publicSkills.length} skills found, ${matchCount} matching primary matrix`
3654
+ );
3655
+ } catch (error) {
3656
+ warn(`Failed to load public source for alternative tagging: ${getErrorMessage(error)}`);
3657
+ }
3658
+ }
3659
+ async function tagExtraSources(matrix, projectDir, forceRefresh) {
3630
3660
  let allSources;
3631
3661
  try {
3632
3662
  allSources = await resolveAllSources(projectDir);
3633
3663
  } catch (error) {
3634
- verbose(`Failed to resolve extra sources: ${error}`);
3664
+ verbose(`Failed to resolve extra sources: ${getErrorMessage(error)}`);
3635
3665
  return;
3636
3666
  }
3637
3667
  if (allSources.extras.length === 0) {
@@ -3641,7 +3671,7 @@ async function tagExtraSources(matrix, projectDir) {
3641
3671
  for (const extraSource of allSources.extras) {
3642
3672
  verbose(`Loading extra source: ${extraSource.name} (${extraSource.url})`);
3643
3673
  try {
3644
- const fetchResult = await fetchFromSource(extraSource.url, { forceRefresh: false });
3674
+ const fetchResult = await fetchFromSource(extraSource.url, { forceRefresh });
3645
3675
  const skillsDir = path21.join(fetchResult.path, SKILLS_DIR_PATH);
3646
3676
  const skills = await extractAllSkills(skillsDir);
3647
3677
  let matchCount = 0;
@@ -3662,7 +3692,9 @@ async function tagExtraSources(matrix, projectDir) {
3662
3692
  `Extra source '${extraSource.name}': ${skills.length} skills found, ${matchCount} matching`
3663
3693
  );
3664
3694
  } catch (error) {
3665
- warn(`Failed to load extra source '${extraSource.name}' ('${extraSource.url}'): ${error}`);
3695
+ warn(
3696
+ `Failed to load extra source '${extraSource.name}' ('${extraSource.url}'): ${getErrorMessage(error)}`
3697
+ );
3666
3698
  }
3667
3699
  }
3668
3700
  }
@@ -3699,7 +3731,9 @@ async function searchExtraSources(alias, configuredSources) {
3699
3731
  }
3700
3732
  }
3701
3733
  } catch (error) {
3702
- warn(`Failed to search extra source '${source.name}' ('${source.url}'): ${error}`);
3734
+ warn(
3735
+ `Failed to search extra source '${source.name}' ('${source.url}'): ${getErrorMessage(error)}`
3736
+ );
3703
3737
  }
3704
3738
  }
3705
3739
  return candidates;
@@ -3726,7 +3760,13 @@ async function loadSkillsMatrixFromSource(options = {}) {
3726
3760
  );
3727
3761
  result.matrix = mergeLocalSkillsIntoMatrix(result.matrix, localSkillsResult);
3728
3762
  }
3729
- await loadSkillsFromAllSources(result.matrix, sourceConfig, resolvedProjectDir);
3763
+ await loadSkillsFromAllSources(
3764
+ result.matrix,
3765
+ sourceConfig,
3766
+ resolvedProjectDir,
3767
+ forceRefresh,
3768
+ result.marketplace
3769
+ );
3730
3770
  checkMatrixHealth(result.matrix);
3731
3771
  return result;
3732
3772
  }
@@ -3772,9 +3812,9 @@ async function loadFromRemote(source, sourceConfig, forceRefresh) {
3772
3812
  }
3773
3813
  async function loadAndMergeFromBasePath(basePath) {
3774
3814
  const sourceProjectConfig = await loadProjectSourceConfig(basePath);
3775
- const matrixRelPath = sourceProjectConfig?.matrix_file ?? SKILLS_MATRIX_PATH;
3776
- const skillsDirRelPath = sourceProjectConfig?.skills_dir ?? SKILLS_DIR_PATH;
3777
- const stacksRelFile = sourceProjectConfig?.stacks_file;
3815
+ const matrixRelPath = sourceProjectConfig?.matrixFile ?? SKILLS_MATRIX_PATH;
3816
+ const skillsDirRelPath = sourceProjectConfig?.skillsDir ?? SKILLS_DIR_PATH;
3817
+ const stacksRelFile = sourceProjectConfig?.stacksFile;
3778
3818
  const sourceMatrixPath = path22.join(basePath, matrixRelPath);
3779
3819
  const cliMatrixPath = path22.join(PROJECT_ROOT, SKILLS_MATRIX_PATH);
3780
3820
  let matrixPath;
@@ -3906,13 +3946,16 @@ async function loadDefaultMappings() {
3906
3946
  function getCachedDefaults() {
3907
3947
  return cachedDefaults;
3908
3948
  }
3949
+ function clearDefaultsCache() {
3950
+ cachedDefaults = null;
3951
+ }
3909
3952
 
3910
3953
  // src/cli/lib/configuration/config-generator.ts
3911
3954
  var DEFAULT_AGENTS = ["agent-summoner", "skill-summoner", "documentor"];
3912
3955
  function getEffectiveSkillToAgents() {
3913
3956
  const defaults = getCachedDefaults();
3914
- if (defaults?.skill_to_agents) {
3915
- return defaults.skill_to_agents;
3957
+ if (defaults?.skillToAgents) {
3958
+ return defaults.skillToAgents;
3916
3959
  }
3917
3960
  return {};
3918
3961
  }
@@ -3964,9 +4007,10 @@ function generateProjectConfigFromSkills(name, selectedSkillIds, matrix, options
3964
4007
  }
3965
4008
  }
3966
4009
  }
4010
+ const agentList = options?.selectedAgents ? [...options.selectedAgents].sort() : Array.from(neededAgents).sort();
3967
4011
  const config = {
3968
4012
  name,
3969
- agents: Array.from(neededAgents).sort(),
4013
+ agents: agentList,
3970
4014
  skills: [...selectedSkillIds]
3971
4015
  };
3972
4016
  if (Object.keys(stackProperty).length > 0) {
@@ -4131,8 +4175,8 @@ async function mergeWithExistingConfig(newConfig, context) {
4131
4175
  if (existingConfig.author) {
4132
4176
  localConfig.author = existingConfig.author;
4133
4177
  }
4134
- if (existingConfig.agents_source) {
4135
- localConfig.agents_source = existingConfig.agents_source;
4178
+ if (existingConfig.agentsSource) {
4179
+ localConfig.agentsSource = existingConfig.agentsSource;
4136
4180
  }
4137
4181
  if (existingConfig.marketplace) {
4138
4182
  localConfig.marketplace = existingConfig.marketplace;
@@ -4147,8 +4191,8 @@ async function mergeWithExistingConfig(newConfig, context) {
4147
4191
  if (existingProjectConfig?.author) {
4148
4192
  localConfig.author = existingProjectConfig.author;
4149
4193
  }
4150
- if (existingProjectConfig?.agents_source) {
4151
- localConfig.agents_source = existingProjectConfig.agents_source;
4194
+ if (existingProjectConfig?.agentsSource) {
4195
+ localConfig.agentsSource = existingProjectConfig.agentsSource;
4152
4196
  }
4153
4197
  return { config: localConfig, merged: false };
4154
4198
  }
@@ -4163,6 +4207,8 @@ async function saveSourceToProjectConfig(projectDir, source) {
4163
4207
  // src/cli/lib/loading/source-fetcher.ts
4164
4208
  var SAFE_NAME_PATTERN = /^[a-zA-Z0-9@._/ -]+$/;
4165
4209
  var MAX_NAME_LENGTH = 200;
4210
+ var SOURCE_PROTO_RE = /^([\w-.]+):/;
4211
+ var GIT_URI_RE = /^(?<repo>[\w.-]+\/[\w.-]+)(?<subdir>[^#]+)?(?<ref>#[\w./@-]+)?/;
4166
4212
  function sanitizeSourceForCache(source) {
4167
4213
  const hash = createHash2("sha256").update(source).digest("hex").slice(0, CACHE_HASH_LENGTH);
4168
4214
  const readable = source.replace(/[^a-zA-Z0-9]/g, "-").replace(/--+/g, "-").replace(/^-|-$/g, "").slice(0, CACHE_READABLE_PREFIX_LENGTH);
@@ -4192,6 +4238,33 @@ async function fetchFromLocalSource(source, subdir) {
4192
4238
  source
4193
4239
  };
4194
4240
  }
4241
+ function getGigetCacheDir(source) {
4242
+ let providerName = "github";
4243
+ let rawSource = source;
4244
+ const protoMatch = source.match(SOURCE_PROTO_RE);
4245
+ if (protoMatch) {
4246
+ providerName = protoMatch[1];
4247
+ rawSource = source.slice(protoMatch[0].length);
4248
+ if (providerName === "http" || providerName === "https") {
4249
+ return void 0;
4250
+ }
4251
+ }
4252
+ const uriMatch = rawSource.match(GIT_URI_RE);
4253
+ if (!uriMatch?.groups?.repo) {
4254
+ return void 0;
4255
+ }
4256
+ const templateName = uriMatch.groups.repo.replace("/", "-").replace(/[^\da-z-]/gi, "-");
4257
+ const gigetCacheRoot = process.env.XDG_CACHE_HOME ? path25.resolve(process.env.XDG_CACHE_HOME, "giget") : path25.resolve(os2.homedir(), ".cache", "giget");
4258
+ return path25.join(gigetCacheRoot, providerName, templateName);
4259
+ }
4260
+ async function clearGigetCache(source) {
4261
+ const gigetDir = getGigetCacheDir(source);
4262
+ if (!gigetDir) return;
4263
+ if (await directoryExists(gigetDir)) {
4264
+ verbose(`Clearing giget cache: ${gigetDir}`);
4265
+ await remove(gigetDir);
4266
+ }
4267
+ }
4195
4268
  async function fetchFromRemoteSource(source, options) {
4196
4269
  const { forceRefresh = false, subdir } = options;
4197
4270
  const cacheDir = getCacheDir(source);
@@ -4206,6 +4279,9 @@ async function fetchFromRemoteSource(source, options) {
4206
4279
  source: fullSource
4207
4280
  };
4208
4281
  }
4282
+ if (forceRefresh) {
4283
+ await clearGigetCache(source);
4284
+ }
4209
4285
  await ensureDir(path25.dirname(cacheDir));
4210
4286
  try {
4211
4287
  const result = await downloadTemplate(fullSource, {
@@ -4442,7 +4518,6 @@ export {
4442
4518
  determinePluginVersion,
4443
4519
  writeContentHash,
4444
4520
  readForkedFromMetadata,
4445
- readLocalSkillMetadata,
4446
4521
  compareLocalSkillsWithSource,
4447
4522
  injectForkedFromMetadata,
4448
4523
  copySkillsToLocalFlattened,
@@ -4470,6 +4545,8 @@ export {
4470
4545
  loadSkillsMatrixFromSource,
4471
4546
  getMarketplaceLabel,
4472
4547
  loadDefaultMappings,
4548
+ getCachedDefaults,
4549
+ clearDefaultsCache,
4473
4550
  loadProjectConfig,
4474
4551
  validateProjectConfig,
4475
4552
  saveSourceToProjectConfig,
@@ -4490,4 +4567,4 @@ export {
4490
4567
  validateAllPlugins,
4491
4568
  printPluginValidationResult
4492
4569
  };
4493
- //# sourceMappingURL=chunk-WMVGRAFB.js.map
4570
+ //# sourceMappingURL=chunk-U5OB5ADP.js.map