@wix/evalforge-evaluator 0.37.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.
package/build/index.js CHANGED
@@ -37722,12 +37722,13 @@ Stack: ${errorStack.split("\n").slice(0, 5).join("\n")}` : "")
37722
37722
  llmTrace
37723
37723
  };
37724
37724
  }
37725
- function sanitizeSkillFolderName(name18) {
37726
- return name18.trim().replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_]/g, "").replace(/-+/g, "-").replace(/^-|-$/g, "") || "skill";
37727
- }
37728
37725
  async function writeSkillToFilesystem(cwd, skill) {
37729
- const skillFolderName = sanitizeSkillFolderName(skill.name);
37730
- const skillDir = (0, import_path5.join)(cwd, ".claude", "skills", skillFolderName);
37726
+ if (!(0, import_evalforge_types.isValidSkillFolderName)(skill.name)) {
37727
+ throw new Error(
37728
+ `Invalid skill name "${skill.name}": must be kebab-case (lowercase letters, numbers, hyphens only, e.g. my-skill)`
37729
+ );
37730
+ }
37731
+ const skillDir = (0, import_path5.join)(cwd, ".claude", "skills", skill.name.trim());
37731
37732
  await (0, import_promises3.mkdir)(skillDir, { recursive: true });
37732
37733
  const skillPath = (0, import_path5.join)(skillDir, "SKILL.md");
37733
37734
  await (0, import_promises3.writeFile)(skillPath, skill.skillMd, "utf-8");