sra-skills 0.20.2 → 0.20.3

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 (2) hide show
  1. package/index.mjs +16 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -583,8 +583,18 @@ if (cmd === 'add') {
583
583
  const srcLabel = profileSource === 'manual' ? 'manual' : 'auto';
584
584
  console.log(` ${C.b}Profile:${C.x} ${C.g}${profileKeyUsed}${C.x} (${srcLabel})`);
585
585
  }
586
+ if (isLocal) {
587
+ console.log(` ${C.b}Mode:${C.x} ${C.y}local${C.x} → ${repoPath}`);
588
+ }
586
589
  console.log(` ${C.b}Tools:${C.x} ${tools.join(', ')}`);
587
590
  console.log(` ${C.b}Skills:${C.x} ${C.g}${skills.length} enabled${C.x}, ${C.d}${disabledList.length} disabled${C.x}`);
591
+ if (isLocal) {
592
+ let localRemoteUrl = '';
593
+ try { localRemoteUrl = execSync('git remote get-url origin', { cwd: repoPath, encoding: 'utf8' }).trim(); } catch {}
594
+ console.log(`\n ${C.r}⚠ Local mode will NOT auto-update with new releases.${C.x}`);
595
+ console.log(` ${C.d}To switch to clone mode (recommended):${C.x}`);
596
+ console.log(` ${C.d} npx sra-skills add ${localRemoteUrl || '<git-url>'} --name ${name}${C.x}`);
597
+ }
588
598
  await promptSkillDeps([{ repoPath, skills }]);
589
599
  warnMissingCredentials(skills, credPath || DEFAULT_CRED_PATH, repoPath);
590
600
  console.log('');
@@ -692,15 +702,16 @@ if (cmd === 'add') {
692
702
  }
693
703
  console.log(` Updated ${prevRev.slice(0, 7)} → ${newRev.slice(0, 7)}`);
694
704
  } else {
695
- console.log(` ⚠ Local install detected — git update skipped.`);
696
- console.log(` ~/.sra/manifest.json is missing the "url" field for "${name}".`);
705
+ let localBranch = '';
706
+ try { localBranch = execSync('git rev-parse --abbrev-ref HEAD', { cwd: repo.path, encoding: 'utf8' }).trim(); } catch {}
707
+ console.log(` ${C.y}⚠ Local mode → ${repo.path}${localBranch ? ` (branch: ${localBranch})` : ''}${C.x}`);
708
+ console.log(` ${C.r}Will NOT auto-update — skills stay at the version on disk.${C.x}`);
697
709
  let remoteUrl = '';
698
710
  try {
699
711
  remoteUrl = execSync('git remote get-url origin', { cwd: repo.path, encoding: 'utf8' }).trim();
700
712
  } catch {}
701
- console.log(` To enable auto-update, add "url" to the "${name}" entry in ~/.sra/manifest.json:`);
702
- console.log(` "url": "${remoteUrl || '<git-remote-url>'}",`);
703
- console.log(` Or: git -C ${repo.path} pull, then re-run ./scripts/install.sh`);
713
+ console.log(` ${C.d}To switch to clone mode (recommended):${C.x}`);
714
+ console.log(` ${C.d}npx sra-skills add ${remoteUrl || '<git-url>'} --name ${name}${C.x}`);
704
715
  repo.updated_at = new Date().toISOString();
705
716
  }
706
717
  const allSkills = discoverSkills(repo.path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sra-skills",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "SRA agent skills installer — manage AI skill repos",
5
5
  "bin": {
6
6
  "sra": "index.mjs",