joyskills-cli 0.3.5 → 0.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joyskills-cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "JoySkills CLI v2.0 - Multi-agent skill management with JoyCode native support",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -236,10 +236,11 @@ async function resolveAndInstall(skillInput, targetDir, projectRoot, options) {
236
236
  const pathPart = skillInput.slice(7); // Remove team://
237
237
  const parts = pathPart.split('/');
238
238
  const registryName = parts[0];
239
- const skillName = parts[1];
239
+ // Support sub-path skills: team://registry/subdir/skill-name
240
+ const skillName = parts.slice(1).join('/');
240
241
 
241
242
  if (!registryName || !skillName) {
242
- throw new Error(`Invalid team:// URL format: ${skillInput}. Expected: team://<registry>/<skill>`);
243
+ throw new Error(`Invalid team:// URL format: ${skillInput}. Expected: team://<registry>/<skill> or team://<registry>/<subdir>/<skill>`);
243
244
  }
244
245
 
245
246
  // Get registry path with auto-prompt for missing registries
@@ -386,7 +387,8 @@ async function tryInstallFromRegistryDir(skillName, registryDirPath, targetDir,
386
387
 
387
388
  if (!skill) return false;
388
389
 
389
- const targetPath = path.join(targetDir, skillName);
390
+ // Use skill.name for target path to maintain subdirectory structure
391
+ const targetPath = path.join(targetDir, skill.name);
390
392
  copyRecursive(skill.path, targetPath);
391
393
 
392
394
  // Get git commit for the skill source
@@ -396,7 +398,7 @@ async function tryInstallFromRegistryDir(skillName, registryDirPath, targetDir,
396
398
  if (!options.global) {
397
399
  const lockfileManager = new LockfileManager(projectRoot);
398
400
  await lockfileManager.load();
399
- lockfileManager.updateSkill(skillName, {
401
+ lockfileManager.updateSkill(skill.name, {
400
402
  version: skill.version || '1.0.0',
401
403
  source: sourceLabel,
402
404
  commit: commitHash,
@@ -405,7 +407,7 @@ async function tryInstallFromRegistryDir(skillName, registryDirPath, targetDir,
405
407
  await lockfileManager.save();
406
408
  }
407
409
 
408
- console.log(chalk.green(`✅ Installed ${skillName} v${skill.version || '1.0.0'} from ${sourceLabel}`));
410
+ console.log(chalk.green(`✅ Installed ${skill.name} v${skill.version || '1.0.0'} from ${sourceLabel}`));
409
411
  return true;
410
412
  }
411
413
  }
@@ -846,7 +848,7 @@ export async function findSkills(basePath) {
846
848
  const { name, description, version } = parseSkillMd(skillMdContent);
847
849
 
848
850
  skills.push({
849
- name: relativePath.split('/').pop() || name || path.basename(dir),
851
+ name: relativePath || name || path.basename(dir),
850
852
  path: skillPath,
851
853
  relativePath,
852
854
  description,