library-skills 0.0.13 → 0.0.14

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": "library-skills",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Library Skills, AI Agents using libraries, as intended, always up to date.",
5
5
  "type": "module",
6
6
  "exports": {
package/ts/dist/cli.d.ts CHANGED
@@ -53,6 +53,7 @@ interface GlobalOptions {
53
53
  check?: boolean;
54
54
  all?: boolean;
55
55
  skill?: string[];
56
+ copy?: boolean;
56
57
  }
57
58
  interface ListOptions {
58
59
  installed?: boolean;
package/ts/dist/cli.js CHANGED
@@ -696,7 +696,14 @@ function installSkill(skill, targetDir, options = {}) {
696
696
  if (options.copy) {
697
697
  cpSync(source, dest, { recursive: true });
698
698
  } else {
699
- symlinkSync(getSymlinkTarget({ source, dest }), dest, "dir");
699
+ try {
700
+ symlinkSync(getSymlinkTarget({ source, dest }), dest, "dir");
701
+ } catch (error) {
702
+ const message = error instanceof Error ? error.message : String(error);
703
+ throw new InstallError(
704
+ `Could not create symlink: ${message}. Use --copy if your system does not support symlinks.`
705
+ );
706
+ }
700
707
  }
701
708
  return dest;
702
709
  }
@@ -1697,7 +1704,8 @@ async function sync(options) {
1697
1704
  const installedCount = installSelected({
1698
1705
  skills: selected,
1699
1706
  targets,
1700
- projectRoot: context.projectRoot
1707
+ projectRoot: context.projectRoot,
1708
+ copy: options.copy
1701
1709
  });
1702
1710
  console.log();
1703
1711
  console.log(`Installed ${installedCount} skill target(s).`);
@@ -1839,7 +1847,7 @@ function createProgram() {
1839
1847
  const program = new Command().enablePositionalOptions();
1840
1848
  program.name("library-skills").description(
1841
1849
  "Discover and reconcile agent skills from installed library packages."
1842
- ).option("--claude", "Also manage .claude/skills alongside .agents/skills").option("-y, --yes", "Skip confirmation prompts").option("--check", "Validate only; exit 1 if installs drift").option("--all", "Install all newly discovered unmanaged skills").option(
1850
+ ).option("--claude", "Also manage .claude/skills alongside .agents/skills").option("-y, --yes", "Skip confirmation prompts").option("--check", "Validate only; exit 1 if installs drift").option("--all", "Install all newly discovered unmanaged skills").option("--copy", "Copy files instead of creating symlinks").option(
1843
1851
  "-s, --skill <name>",
1844
1852
  "Install a specific discovered skill by name",
1845
1853
  collect,
@@ -91,7 +91,14 @@ function installSkill(skill, targetDir, options = {}) {
91
91
  if (options.copy) {
92
92
  (0, import_node_fs.cpSync)(source, dest, { recursive: true });
93
93
  } else {
94
- (0, import_node_fs.symlinkSync)(getSymlinkTarget({ source, dest }), dest, "dir");
94
+ try {
95
+ (0, import_node_fs.symlinkSync)(getSymlinkTarget({ source, dest }), dest, "dir");
96
+ } catch (error) {
97
+ const message = error instanceof Error ? error.message : String(error);
98
+ throw new InstallError(
99
+ `Could not create symlink: ${message}. Use --copy if your system does not support symlinks.`
100
+ );
101
+ }
95
102
  }
96
103
  return dest;
97
104
  }
@@ -67,7 +67,14 @@ function installSkill(skill, targetDir, options = {}) {
67
67
  if (options.copy) {
68
68
  cpSync(source, dest, { recursive: true });
69
69
  } else {
70
- symlinkSync(getSymlinkTarget({ source, dest }), dest, "dir");
70
+ try {
71
+ symlinkSync(getSymlinkTarget({ source, dest }), dest, "dir");
72
+ } catch (error) {
73
+ const message = error instanceof Error ? error.message : String(error);
74
+ throw new InstallError(
75
+ `Could not create symlink: ${message}. Use --copy if your system does not support symlinks.`
76
+ );
77
+ }
71
78
  }
72
79
  return dest;
73
80
  }