skilluse 0.5.0 → 0.6.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 (2) hide show
  1. package/dist/cli.js +499 -214
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -69694,20 +69694,300 @@ function RepoList(_props) {
69694
69694
  }, undefined, true, undefined, this);
69695
69695
  }
69696
69696
 
69697
- // src/commands/repo/remove.tsx
69697
+ // src/commands/repo/skills.tsx
69698
69698
  var import_react41 = __toESM(require_react(), 1);
69699
69699
  var jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
69700
+ var options11 = exports_external.object({});
69701
+ function parseFrontmatter4(content) {
69702
+ const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
69703
+ if (!frontmatterMatch) {
69704
+ return {};
69705
+ }
69706
+ const yaml = frontmatterMatch[1];
69707
+ const result = {};
69708
+ for (const line of yaml.split(`
69709
+ `)) {
69710
+ const colonIndex = line.indexOf(":");
69711
+ if (colonIndex === -1)
69712
+ continue;
69713
+ const key = line.substring(0, colonIndex).trim();
69714
+ let value = line.substring(colonIndex + 1).trim();
69715
+ if (typeof value === "string" && value.startsWith("[") && value.endsWith("]")) {
69716
+ value = value.slice(1, -1).split(",").map((s) => s.trim());
69717
+ }
69718
+ if (key) {
69719
+ result[key] = value;
69720
+ }
69721
+ }
69722
+ return result;
69723
+ }
69724
+ async function fetchSkillsFromRepo(token, repoConfig, installedSkillNames) {
69725
+ const { repo, branch, paths: paths2 } = repoConfig;
69726
+ const skills = [];
69727
+ const searchPaths = paths2.length > 0 ? paths2 : [""];
69728
+ for (const basePath of searchPaths) {
69729
+ try {
69730
+ const apiPath = basePath ? `https://api.github.com/repos/${repo}/contents/${basePath}?ref=${branch}` : `https://api.github.com/repos/${repo}/contents?ref=${branch}`;
69731
+ const response = await fetch(apiPath, {
69732
+ headers: buildGitHubHeaders(token)
69733
+ });
69734
+ if (!response.ok) {
69735
+ if (isAuthRequired(response)) {
69736
+ return {
69737
+ authRequired: true,
69738
+ message: getGitHubErrorMessage(response)
69739
+ };
69740
+ }
69741
+ continue;
69742
+ }
69743
+ const contents = await response.json();
69744
+ const dirs = contents.filter((item) => item.type === "dir");
69745
+ for (const dir of dirs) {
69746
+ const skillMdUrl = `https://api.github.com/repos/${repo}/contents/${dir.path}/SKILL.md?ref=${branch}`;
69747
+ const skillResponse = await fetch(skillMdUrl, {
69748
+ headers: buildGitHubRawHeaders(token)
69749
+ });
69750
+ if (skillResponse.ok) {
69751
+ const content = await skillResponse.text();
69752
+ const frontmatter = parseFrontmatter4(content);
69753
+ if (frontmatter.name) {
69754
+ const skillName = String(frontmatter.name);
69755
+ skills.push({
69756
+ name: skillName,
69757
+ description: String(frontmatter.description || ""),
69758
+ type: frontmatter.type ? String(frontmatter.type) : undefined,
69759
+ version: frontmatter.version ? String(frontmatter.version) : undefined,
69760
+ repo,
69761
+ path: dir.path,
69762
+ installed: installedSkillNames.has(skillName)
69763
+ });
69764
+ }
69765
+ }
69766
+ }
69767
+ } catch {}
69768
+ }
69769
+ skills.sort((a, b) => {
69770
+ if (a.installed !== b.installed) {
69771
+ return a.installed ? -1 : 1;
69772
+ }
69773
+ return a.name.localeCompare(b.name);
69774
+ });
69775
+ return skills;
69776
+ }
69777
+ function RepoSkills(_props) {
69778
+ const { exit } = use_app_default();
69779
+ const [state, setState] = import_react41.useState({ phase: "checking" });
69780
+ const [outputItems, setOutputItems] = import_react41.useState([]);
69781
+ import_react41.useEffect(() => {
69782
+ async function loadSkills() {
69783
+ const config2 = getConfig();
69784
+ const currentAgent = getCurrentAgent();
69785
+ let repoConfig;
69786
+ if (config2.defaultRepo) {
69787
+ repoConfig = config2.repos.find((r) => r.repo === config2.defaultRepo);
69788
+ } else if (config2.repos.length > 0) {
69789
+ repoConfig = config2.repos[0];
69790
+ }
69791
+ if (!repoConfig) {
69792
+ setState({ phase: "no_repos" });
69793
+ return;
69794
+ }
69795
+ setState({ phase: "fetching", repo: repoConfig.repo });
69796
+ const installedSkillNames = new Set(config2.installed.filter((s) => s.agent === currentAgent || !s.agent).map((s) => s.name));
69797
+ const credentials = await getCredentials();
69798
+ const token = credentials?.token;
69799
+ const result = await fetchSkillsFromRepo(token, repoConfig, installedSkillNames);
69800
+ if ("authRequired" in result) {
69801
+ setState({ phase: "auth_required", message: result.message });
69802
+ return;
69803
+ }
69804
+ setState({
69805
+ phase: "success",
69806
+ skills: result,
69807
+ repoName: repoConfig.repo
69808
+ });
69809
+ }
69810
+ loadSkills().catch((err) => {
69811
+ setState({
69812
+ phase: "error",
69813
+ message: err instanceof Error ? err.message : "Failed to load skills"
69814
+ });
69815
+ });
69816
+ }, []);
69817
+ import_react41.useEffect(() => {
69818
+ const isFinalState = state.phase === "no_repos" || state.phase === "success" || state.phase === "auth_required" || state.phase === "error";
69819
+ if (isFinalState && outputItems.length === 0) {
69820
+ setOutputItems([{ id: "output" }]);
69821
+ }
69822
+ }, [state.phase, outputItems.length]);
69823
+ import_react41.useEffect(() => {
69824
+ if (outputItems.length > 0) {
69825
+ process.nextTick(() => exit());
69826
+ }
69827
+ }, [outputItems.length, exit]);
69828
+ const renderContent = () => {
69829
+ switch (state.phase) {
69830
+ case "auth_required":
69831
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
69832
+ type: "error",
69833
+ children: state.message
69834
+ }, undefined, false, undefined, this);
69835
+ case "no_repos":
69836
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69837
+ flexDirection: "column",
69838
+ children: [
69839
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
69840
+ type: "warning",
69841
+ children: "No repositories configured"
69842
+ }, undefined, false, undefined, this),
69843
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69844
+ dimColor: true,
69845
+ children: "Run 'skilluse repo add owner/repo' to add a skill repository."
69846
+ }, undefined, false, undefined, this)
69847
+ ]
69848
+ }, undefined, true, undefined, this);
69849
+ case "success": {
69850
+ const installedCount = state.skills.filter((s) => s.installed).length;
69851
+ if (state.skills.length === 0) {
69852
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69853
+ flexDirection: "column",
69854
+ children: [
69855
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69856
+ marginBottom: 1,
69857
+ children: [
69858
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69859
+ bold: true,
69860
+ children: "Skills in "
69861
+ }, undefined, false, undefined, this),
69862
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69863
+ color: "cyan",
69864
+ children: state.repoName
69865
+ }, undefined, false, undefined, this)
69866
+ ]
69867
+ }, undefined, true, undefined, this),
69868
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
69869
+ type: "warning",
69870
+ children: "No skills found"
69871
+ }, undefined, false, undefined, this)
69872
+ ]
69873
+ }, undefined, true, undefined, this);
69874
+ }
69875
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69876
+ flexDirection: "column",
69877
+ children: [
69878
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69879
+ marginBottom: 1,
69880
+ children: [
69881
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69882
+ bold: true,
69883
+ children: "Skills in "
69884
+ }, undefined, false, undefined, this),
69885
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69886
+ color: "cyan",
69887
+ children: state.repoName
69888
+ }, undefined, false, undefined, this),
69889
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69890
+ dimColor: true,
69891
+ children: [
69892
+ " ",
69893
+ "(",
69894
+ installedCount,
69895
+ "/",
69896
+ state.skills.length,
69897
+ " installed)"
69898
+ ]
69899
+ }, undefined, true, undefined, this)
69900
+ ]
69901
+ }, undefined, true, undefined, this),
69902
+ state.skills.map((skill) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69903
+ flexDirection: "column",
69904
+ marginBottom: 1,
69905
+ children: [
69906
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69907
+ children: [
69908
+ skill.installed ? /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69909
+ color: "green",
69910
+ children: "● "
69911
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69912
+ dimColor: true,
69913
+ children: "○ "
69914
+ }, undefined, false, undefined, this),
69915
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69916
+ color: skill.installed ? "green" : "cyan",
69917
+ bold: true,
69918
+ children: skill.name
69919
+ }, undefined, false, undefined, this),
69920
+ skill.version && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69921
+ dimColor: true,
69922
+ children: [
69923
+ " v",
69924
+ skill.version
69925
+ ]
69926
+ }, undefined, true, undefined, this),
69927
+ skill.installed && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69928
+ dimColor: true,
69929
+ children: " (installed)"
69930
+ }, undefined, false, undefined, this)
69931
+ ]
69932
+ }, undefined, true, undefined, this),
69933
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69934
+ marginLeft: 2,
69935
+ children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69936
+ dimColor: true,
69937
+ children: skill.description
69938
+ }, undefined, false, undefined, this)
69939
+ }, undefined, false, undefined, this)
69940
+ ]
69941
+ }, `${skill.repo}/${skill.path}`, true, undefined, this)),
69942
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69943
+ marginTop: 1,
69944
+ children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
69945
+ dimColor: true,
69946
+ children: "Run 'skilluse install skill-name' to install a skill."
69947
+ }, undefined, false, undefined, this)
69948
+ }, undefined, false, undefined, this)
69949
+ ]
69950
+ }, undefined, true, undefined, this);
69951
+ }
69952
+ case "error":
69953
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
69954
+ type: "error",
69955
+ children: state.message
69956
+ }, undefined, false, undefined, this);
69957
+ default:
69958
+ return null;
69959
+ }
69960
+ };
69961
+ return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
69962
+ children: [
69963
+ (state.phase === "checking" || state.phase === "fetching") && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Spinner2, {
69964
+ text: state.phase === "fetching" ? `Fetching skills from ${state.repo}...` : "Loading..."
69965
+ }, undefined, false, undefined, this),
69966
+ /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Static, {
69967
+ items: outputItems,
69968
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
69969
+ flexDirection: "column",
69970
+ children: renderContent()
69971
+ }, item.id, false, undefined, this)
69972
+ }, undefined, false, undefined, this)
69973
+ ]
69974
+ }, undefined, true, undefined, this);
69975
+ }
69976
+
69977
+ // src/commands/repo/remove.tsx
69978
+ var import_react42 = __toESM(require_react(), 1);
69979
+ var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
69700
69980
  var args5 = exports_external.tuple([
69701
69981
  exports_external.string().describe("Repository in owner/repo format")
69702
69982
  ]);
69703
- var options11 = exports_external.object({
69983
+ var options12 = exports_external.object({
69704
69984
  force: exports_external.boolean().default(false).describe("Skip confirmation prompt")
69705
69985
  });
69706
69986
  function RepoRemove({ args: [repoArg], options: opts }) {
69707
69987
  const { exit } = use_app_default();
69708
- const [state, setState] = import_react41.useState({ phase: "checking" });
69709
- const [outputItems, setOutputItems] = import_react41.useState([]);
69710
- import_react41.useEffect(() => {
69988
+ const [state, setState] = import_react42.useState({ phase: "checking" });
69989
+ const [outputItems, setOutputItems] = import_react42.useState([]);
69990
+ import_react42.useEffect(() => {
69711
69991
  function checkAndRemove() {
69712
69992
  const config2 = getConfig();
69713
69993
  if (!config2.repos.find((r) => r.repo === repoArg)) {
@@ -69736,13 +70016,13 @@ function RepoRemove({ args: [repoArg], options: opts }) {
69736
70016
  return;
69737
70017
  }
69738
70018
  }, { isActive: state.phase === "confirm" });
69739
- import_react41.useEffect(() => {
70019
+ import_react42.useEffect(() => {
69740
70020
  const isFinalState = state.phase === "not_found" || state.phase === "success" || state.phase === "cancelled" || state.phase === "error";
69741
70021
  if (isFinalState && outputItems.length === 0) {
69742
70022
  setOutputItems([{ id: "output" }]);
69743
70023
  }
69744
70024
  }, [state.phase, outputItems.length]);
69745
- import_react41.useEffect(() => {
70025
+ import_react42.useEffect(() => {
69746
70026
  if (outputItems.length > 0) {
69747
70027
  process.nextTick(() => exit());
69748
70028
  }
@@ -69750,10 +70030,10 @@ function RepoRemove({ args: [repoArg], options: opts }) {
69750
70030
  const renderContent = () => {
69751
70031
  switch (state.phase) {
69752
70032
  case "not_found":
69753
- return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
70033
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
69754
70034
  flexDirection: "column",
69755
70035
  children: [
69756
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
70036
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
69757
70037
  type: "error",
69758
70038
  children: [
69759
70039
  "Repository '",
@@ -69761,14 +70041,14 @@ function RepoRemove({ args: [repoArg], options: opts }) {
69761
70041
  "' not found in config"
69762
70042
  ]
69763
70043
  }, undefined, true, undefined, this),
69764
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
70044
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
69765
70045
  dimColor: true,
69766
70046
  children: "Run 'skilluse repo list' to see configured repos"
69767
70047
  }, undefined, false, undefined, this)
69768
70048
  ]
69769
70049
  }, undefined, true, undefined, this);
69770
70050
  case "success":
69771
- return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
70051
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
69772
70052
  type: "success",
69773
70053
  children: [
69774
70054
  "Removed ",
@@ -69776,12 +70056,12 @@ function RepoRemove({ args: [repoArg], options: opts }) {
69776
70056
  ]
69777
70057
  }, undefined, true, undefined, this);
69778
70058
  case "cancelled":
69779
- return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
70059
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
69780
70060
  dimColor: true,
69781
70061
  children: "Removal cancelled"
69782
70062
  }, undefined, false, undefined, this);
69783
70063
  case "error":
69784
- return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(StatusMessage, {
70064
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
69785
70065
  type: "error",
69786
70066
  children: state.message
69787
70067
  }, undefined, false, undefined, this);
@@ -69789,36 +70069,36 @@ function RepoRemove({ args: [repoArg], options: opts }) {
69789
70069
  return null;
69790
70070
  }
69791
70071
  };
69792
- return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(jsx_dev_runtime18.Fragment, {
70072
+ return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
69793
70073
  children: [
69794
- state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Spinner2, {
70074
+ state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Spinner2, {
69795
70075
  text: "Checking..."
69796
70076
  }, undefined, false, undefined, this),
69797
- state.phase === "confirm" && /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
70077
+ state.phase === "confirm" && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
69798
70078
  flexDirection: "column",
69799
70079
  children: [
69800
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
70080
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
69801
70081
  children: [
69802
70082
  "Remove repository ",
69803
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
70083
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
69804
70084
  color: "cyan",
69805
70085
  children: state.repo
69806
70086
  }, undefined, false, undefined, this),
69807
70087
  "?"
69808
70088
  ]
69809
70089
  }, undefined, true, undefined, this),
69810
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
70090
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
69811
70091
  marginTop: 1,
69812
- children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Text, {
70092
+ children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
69813
70093
  dimColor: true,
69814
70094
  children: "Press Y to confirm, N to cancel"
69815
70095
  }, undefined, false, undefined, this)
69816
70096
  }, undefined, false, undefined, this)
69817
70097
  ]
69818
70098
  }, undefined, true, undefined, this),
69819
- /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Static, {
70099
+ /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Static, {
69820
70100
  items: outputItems,
69821
- children: (item) => /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Box_default, {
70101
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
69822
70102
  flexDirection: "column",
69823
70103
  children: renderContent()
69824
70104
  }, item.id, false, undefined, this)
@@ -69828,17 +70108,17 @@ function RepoRemove({ args: [repoArg], options: opts }) {
69828
70108
  }
69829
70109
 
69830
70110
  // src/commands/repo/use.tsx
69831
- var import_react42 = __toESM(require_react(), 1);
69832
- var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
70111
+ var import_react43 = __toESM(require_react(), 1);
70112
+ var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
69833
70113
  var args6 = exports_external.tuple([
69834
70114
  exports_external.string().describe("Repository in owner/repo format")
69835
70115
  ]);
69836
- var options12 = exports_external.object({});
70116
+ var options13 = exports_external.object({});
69837
70117
  function RepoUse({ args: [repoArg], options: _opts }) {
69838
70118
  const { exit } = use_app_default();
69839
- const [state, setState] = import_react42.useState({ phase: "checking" });
69840
- const [outputItems, setOutputItems] = import_react42.useState([]);
69841
- import_react42.useEffect(() => {
70119
+ const [state, setState] = import_react43.useState({ phase: "checking" });
70120
+ const [outputItems, setOutputItems] = import_react43.useState([]);
70121
+ import_react43.useEffect(() => {
69842
70122
  const config2 = getConfig();
69843
70123
  if (!config2.repos.find((r) => r.repo === repoArg)) {
69844
70124
  setState({ phase: "not_found", repo: repoArg });
@@ -69851,12 +70131,12 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69851
70131
  setDefaultRepo(repoArg);
69852
70132
  setState({ phase: "success", repo: repoArg });
69853
70133
  }, [repoArg]);
69854
- import_react42.useEffect(() => {
70134
+ import_react43.useEffect(() => {
69855
70135
  if (state.phase !== "checking" && outputItems.length === 0) {
69856
70136
  setOutputItems([{ id: "output" }]);
69857
70137
  }
69858
70138
  }, [state.phase, outputItems.length]);
69859
- import_react42.useEffect(() => {
70139
+ import_react43.useEffect(() => {
69860
70140
  if (outputItems.length > 0) {
69861
70141
  process.nextTick(() => exit());
69862
70142
  }
@@ -69864,9 +70144,9 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69864
70144
  const renderContent = () => {
69865
70145
  switch (state.phase) {
69866
70146
  case "not_found":
69867
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
70147
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
69868
70148
  children: [
69869
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
70149
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
69870
70150
  type: "error",
69871
70151
  children: [
69872
70152
  "Repository ",
@@ -69874,7 +70154,7 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69874
70154
  " not found in config"
69875
70155
  ]
69876
70156
  }, undefined, true, undefined, this),
69877
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text, {
70157
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
69878
70158
  dimColor: true,
69879
70159
  children: [
69880
70160
  "Run 'skilluse repo add ",
@@ -69885,7 +70165,7 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69885
70165
  ]
69886
70166
  }, undefined, true, undefined, this);
69887
70167
  case "already_default":
69888
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
70168
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
69889
70169
  type: "success",
69890
70170
  children: [
69891
70171
  state.repo,
@@ -69893,7 +70173,7 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69893
70173
  ]
69894
70174
  }, undefined, true, undefined, this);
69895
70175
  case "success":
69896
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
70176
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
69897
70177
  type: "success",
69898
70178
  children: [
69899
70179
  "Default repo set to ",
@@ -69901,7 +70181,7 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69901
70181
  ]
69902
70182
  }, undefined, true, undefined, this);
69903
70183
  case "error":
69904
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(StatusMessage, {
70184
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
69905
70185
  type: "error",
69906
70186
  children: state.message
69907
70187
  }, undefined, false, undefined, this);
@@ -69909,14 +70189,14 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69909
70189
  return null;
69910
70190
  }
69911
70191
  };
69912
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
70192
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
69913
70193
  children: [
69914
- state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Spinner2, {
70194
+ state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Spinner2, {
69915
70195
  text: "Setting default..."
69916
70196
  }, undefined, false, undefined, this),
69917
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Static, {
70197
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Static, {
69918
70198
  items: outputItems,
69919
- children: (item) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
70199
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
69920
70200
  flexDirection: "column",
69921
70201
  children: renderContent()
69922
70202
  }, item.id, false, undefined, this)
@@ -69926,17 +70206,17 @@ function RepoUse({ args: [repoArg], options: _opts }) {
69926
70206
  }
69927
70207
 
69928
70208
  // src/commands/agent/index.tsx
69929
- var import_react43 = __toESM(require_react(), 1);
69930
- var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
70209
+ var import_react44 = __toESM(require_react(), 1);
70210
+ var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
69931
70211
  var args7 = exports_external.tuple([
69932
70212
  exports_external.string().optional().describe("Agent ID to switch to")
69933
70213
  ]);
69934
- var options13 = exports_external.object({});
70214
+ var options14 = exports_external.object({});
69935
70215
  function Agent({ args: [agentIdArg] }) {
69936
70216
  const { exit } = use_app_default();
69937
- const [state, setState] = import_react43.useState({ phase: "loading" });
69938
- const [outputItems, setOutputItems] = import_react43.useState([]);
69939
- import_react43.useEffect(() => {
70217
+ const [state, setState] = import_react44.useState({ phase: "loading" });
70218
+ const [outputItems, setOutputItems] = import_react44.useState([]);
70219
+ import_react44.useEffect(() => {
69940
70220
  if (agentIdArg) {
69941
70221
  const agent = getAgent(agentIdArg);
69942
70222
  if (!agent) {
@@ -69964,12 +70244,12 @@ function Agent({ args: [agentIdArg] }) {
69964
70244
  setState({ phase: "selecting", currentAgent, agents });
69965
70245
  }
69966
70246
  }, [agentIdArg]);
69967
- import_react43.useEffect(() => {
70247
+ import_react44.useEffect(() => {
69968
70248
  if (state.phase !== "loading" && state.phase !== "selecting" && outputItems.length === 0) {
69969
70249
  setOutputItems([{ id: "output" }]);
69970
70250
  }
69971
70251
  }, [state.phase, outputItems.length]);
69972
- import_react43.useEffect(() => {
70252
+ import_react44.useEffect(() => {
69973
70253
  if (outputItems.length > 0) {
69974
70254
  process.nextTick(() => exit());
69975
70255
  }
@@ -70001,17 +70281,17 @@ function Agent({ args: [agentIdArg] }) {
70001
70281
  label: agent.id === state.currentAgent ? `${agent.name} (current)` : agent.name,
70002
70282
  value: agent.id
70003
70283
  }));
70004
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70284
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70005
70285
  flexDirection: "column",
70006
70286
  children: [
70007
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70287
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70008
70288
  marginBottom: 1,
70009
- children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70289
+ children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70010
70290
  bold: true,
70011
70291
  children: "Select an agent:"
70012
70292
  }, undefined, false, undefined, this)
70013
70293
  }, undefined, false, undefined, this),
70014
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Select, {
70294
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Select, {
70015
70295
  items,
70016
70296
  onSelect: handleSelect
70017
70297
  }, undefined, false, undefined, this)
@@ -70019,23 +70299,23 @@ function Agent({ args: [agentIdArg] }) {
70019
70299
  }, undefined, true, undefined, this);
70020
70300
  }
70021
70301
  case "not_found":
70022
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
70302
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
70023
70303
  children: [
70024
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
70304
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70025
70305
  type: "error",
70026
70306
  children: [
70027
70307
  "Unknown agent: ",
70028
70308
  state.agentId
70029
70309
  ]
70030
70310
  }, undefined, true, undefined, this),
70031
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70311
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70032
70312
  dimColor: true,
70033
70313
  children: "Run 'skilluse agent' to see available agents."
70034
70314
  }, undefined, false, undefined, this)
70035
70315
  ]
70036
70316
  }, undefined, true, undefined, this);
70037
70317
  case "already_current":
70038
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
70318
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70039
70319
  type: "success",
70040
70320
  children: [
70041
70321
  state.agentName,
@@ -70043,18 +70323,18 @@ function Agent({ args: [agentIdArg] }) {
70043
70323
  ]
70044
70324
  }, undefined, true, undefined, this);
70045
70325
  case "switched":
70046
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(jsx_dev_runtime20.Fragment, {
70326
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
70047
70327
  children: [
70048
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(StatusMessage, {
70328
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70049
70329
  type: "success",
70050
70330
  children: [
70051
70331
  "Switched to ",
70052
70332
  state.agentName
70053
70333
  ]
70054
70334
  }, undefined, true, undefined, this),
70055
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70335
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70056
70336
  marginTop: 1,
70057
- children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text, {
70337
+ children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70058
70338
  dimColor: true,
70059
70339
  children: [
70060
70340
  "Skills will now be installed to ",
@@ -70070,16 +70350,16 @@ function Agent({ args: [agentIdArg] }) {
70070
70350
  }
70071
70351
  };
70072
70352
  if (state.phase === "loading") {
70073
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Spinner2, {
70353
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Spinner2, {
70074
70354
  text: "Loading..."
70075
70355
  }, undefined, false, undefined, this);
70076
70356
  }
70077
70357
  if (state.phase === "selecting") {
70078
70358
  return renderContent();
70079
70359
  }
70080
- return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Static, {
70360
+ return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Static, {
70081
70361
  items: outputItems,
70082
- children: (item) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
70362
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70083
70363
  flexDirection: "column",
70084
70364
  children: renderContent()
70085
70365
  }, item.id, false, undefined, this)
@@ -70087,13 +70367,13 @@ function Agent({ args: [agentIdArg] }) {
70087
70367
  }
70088
70368
 
70089
70369
  // src/commands/search.tsx
70090
- var import_react44 = __toESM(require_react(), 1);
70091
- var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
70370
+ var import_react45 = __toESM(require_react(), 1);
70371
+ var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
70092
70372
  var args8 = exports_external.tuple([exports_external.string().describe("Search keyword")]);
70093
- var options14 = exports_external.object({
70373
+ var options15 = exports_external.object({
70094
70374
  all: exports_external.boolean().default(false).describe("Search in all configured repos (not just default)")
70095
70375
  });
70096
- function parseFrontmatter4(content) {
70376
+ function parseFrontmatter5(content) {
70097
70377
  const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
70098
70378
  if (!frontmatterMatch) {
70099
70379
  return {};
@@ -70117,7 +70397,7 @@ function parseFrontmatter4(content) {
70117
70397
  }
70118
70398
  return result;
70119
70399
  }
70120
- async function fetchSkillsFromRepo(token, repoConfig) {
70400
+ async function fetchSkillsFromRepo2(token, repoConfig) {
70121
70401
  const { repo, branch, paths: paths2 } = repoConfig;
70122
70402
  const skills = [];
70123
70403
  const searchPaths = paths2.length > 0 ? paths2 : [""];
@@ -70145,7 +70425,7 @@ async function fetchSkillsFromRepo(token, repoConfig) {
70145
70425
  });
70146
70426
  if (skillResponse.ok) {
70147
70427
  const content = await skillResponse.text();
70148
- const frontmatter = parseFrontmatter4(content);
70428
+ const frontmatter = parseFrontmatter5(content);
70149
70429
  if (frontmatter.name) {
70150
70430
  skills.push({
70151
70431
  name: String(frontmatter.name),
@@ -70180,9 +70460,9 @@ function filterSkills(skills, keyword) {
70180
70460
  }
70181
70461
  function Search({ args: [keyword], options: opts }) {
70182
70462
  const { exit } = use_app_default();
70183
- const [state, setState] = import_react44.useState({ phase: "checking" });
70184
- const [outputItems, setOutputItems] = import_react44.useState([]);
70185
- import_react44.useEffect(() => {
70463
+ const [state, setState] = import_react45.useState({ phase: "checking" });
70464
+ const [outputItems, setOutputItems] = import_react45.useState([]);
70465
+ import_react45.useEffect(() => {
70186
70466
  async function search() {
70187
70467
  const config2 = getConfig();
70188
70468
  let reposToSearch = [];
@@ -70205,7 +70485,7 @@ function Search({ args: [keyword], options: opts }) {
70205
70485
  const allSkills = [];
70206
70486
  for (const repoConfig of reposToSearch) {
70207
70487
  setState({ phase: "searching", repo: repoConfig.repo });
70208
- const result = await fetchSkillsFromRepo(token, repoConfig);
70488
+ const result = await fetchSkillsFromRepo2(token, repoConfig);
70209
70489
  if ("authRequired" in result) {
70210
70490
  setState({ phase: "auth_required", message: result.message });
70211
70491
  return;
@@ -70222,13 +70502,13 @@ function Search({ args: [keyword], options: opts }) {
70222
70502
  });
70223
70503
  });
70224
70504
  }, [keyword, opts.all]);
70225
- import_react44.useEffect(() => {
70505
+ import_react45.useEffect(() => {
70226
70506
  const isFinalState = state.phase === "no_repos" || state.phase === "success" || state.phase === "auth_required" || state.phase === "error";
70227
70507
  if (isFinalState && outputItems.length === 0) {
70228
70508
  setOutputItems([{ id: "output" }]);
70229
70509
  }
70230
70510
  }, [state.phase, outputItems.length]);
70231
- import_react44.useEffect(() => {
70511
+ import_react45.useEffect(() => {
70232
70512
  if (outputItems.length > 0) {
70233
70513
  process.nextTick(() => exit());
70234
70514
  }
@@ -70236,22 +70516,22 @@ function Search({ args: [keyword], options: opts }) {
70236
70516
  const renderContent = () => {
70237
70517
  switch (state.phase) {
70238
70518
  case "auth_required":
70239
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70519
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70240
70520
  flexDirection: "column",
70241
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70521
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70242
70522
  type: "error",
70243
70523
  children: state.message
70244
70524
  }, undefined, false, undefined, this)
70245
70525
  }, undefined, false, undefined, this);
70246
70526
  case "no_repos":
70247
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70527
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70248
70528
  flexDirection: "column",
70249
70529
  children: [
70250
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70530
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70251
70531
  type: "warning",
70252
70532
  children: "No repositories configured"
70253
70533
  }, undefined, false, undefined, this),
70254
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70534
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70255
70535
  dimColor: true,
70256
70536
  children: "Run 'skilluse repo add owner/repo' to add a skill repository."
70257
70537
  }, undefined, false, undefined, this)
@@ -70259,31 +70539,31 @@ function Search({ args: [keyword], options: opts }) {
70259
70539
  }, undefined, true, undefined, this);
70260
70540
  case "success":
70261
70541
  if (state.skills.length === 0) {
70262
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70542
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70263
70543
  flexDirection: "column",
70264
70544
  children: [
70265
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70545
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70266
70546
  marginBottom: 1,
70267
70547
  children: [
70268
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70548
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70269
70549
  children: 'Search results for "'
70270
70550
  }, undefined, false, undefined, this),
70271
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70551
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70272
70552
  color: "cyan",
70273
70553
  children: state.keyword
70274
70554
  }, undefined, false, undefined, this),
70275
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70555
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70276
70556
  children: '"'
70277
70557
  }, undefined, false, undefined, this)
70278
70558
  ]
70279
70559
  }, undefined, true, undefined, this),
70280
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70560
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70281
70561
  type: "warning",
70282
70562
  children: "No skills found"
70283
70563
  }, undefined, false, undefined, this),
70284
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70564
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70285
70565
  marginTop: 1,
70286
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70566
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70287
70567
  dimColor: true,
70288
70568
  children: "Try a different search term or check your configured repos with 'skilluse repo list'."
70289
70569
  }, undefined, false, undefined, this)
@@ -70291,36 +70571,36 @@ function Search({ args: [keyword], options: opts }) {
70291
70571
  ]
70292
70572
  }, undefined, true, undefined, this);
70293
70573
  }
70294
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70574
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70295
70575
  flexDirection: "column",
70296
70576
  children: [
70297
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70577
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70298
70578
  marginBottom: 1,
70299
70579
  children: [
70300
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70580
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70301
70581
  children: 'Search results for "'
70302
70582
  }, undefined, false, undefined, this),
70303
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70583
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70304
70584
  color: "cyan",
70305
70585
  children: state.keyword
70306
70586
  }, undefined, false, undefined, this),
70307
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70587
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70308
70588
  children: '"'
70309
70589
  }, undefined, false, undefined, this)
70310
70590
  ]
70311
70591
  }, undefined, true, undefined, this),
70312
- state.skills.map((skill) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70592
+ state.skills.map((skill) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70313
70593
  flexDirection: "column",
70314
70594
  marginBottom: 1,
70315
70595
  children: [
70316
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70596
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70317
70597
  children: [
70318
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70598
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70319
70599
  color: "cyan",
70320
70600
  bold: true,
70321
70601
  children: skill.name
70322
70602
  }, undefined, false, undefined, this),
70323
- skill.version && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70603
+ skill.version && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70324
70604
  dimColor: true,
70325
70605
  children: [
70326
70606
  " v",
@@ -70329,15 +70609,15 @@ function Search({ args: [keyword], options: opts }) {
70329
70609
  }, undefined, true, undefined, this)
70330
70610
  ]
70331
70611
  }, undefined, true, undefined, this),
70332
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70612
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70333
70613
  marginLeft: 2,
70334
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70614
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70335
70615
  children: skill.description
70336
70616
  }, undefined, false, undefined, this)
70337
70617
  }, undefined, false, undefined, this),
70338
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70618
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70339
70619
  marginLeft: 2,
70340
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70620
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70341
70621
  dimColor: true,
70342
70622
  children: [
70343
70623
  skill.repo,
@@ -70347,9 +70627,9 @@ function Search({ args: [keyword], options: opts }) {
70347
70627
  }, undefined, false, undefined, this)
70348
70628
  ]
70349
70629
  }, `${skill.repo}/${skill.path}`, true, undefined, this)),
70350
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70630
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70351
70631
  marginTop: 1,
70352
- children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text, {
70632
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70353
70633
  dimColor: true,
70354
70634
  children: [
70355
70635
  state.skills.length,
@@ -70363,7 +70643,7 @@ function Search({ args: [keyword], options: opts }) {
70363
70643
  ]
70364
70644
  }, undefined, true, undefined, this);
70365
70645
  case "error":
70366
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(StatusMessage, {
70646
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70367
70647
  type: "error",
70368
70648
  children: state.message
70369
70649
  }, undefined, false, undefined, this);
@@ -70371,14 +70651,14 @@ function Search({ args: [keyword], options: opts }) {
70371
70651
  return null;
70372
70652
  }
70373
70653
  };
70374
- return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(jsx_dev_runtime21.Fragment, {
70654
+ return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(jsx_dev_runtime22.Fragment, {
70375
70655
  children: [
70376
- (state.phase === "checking" || state.phase === "searching") && /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Spinner2, {
70656
+ (state.phase === "checking" || state.phase === "searching") && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
70377
70657
  text: state.phase === "searching" ? `Searching ${state.repo}...` : "Initializing..."
70378
70658
  }, undefined, false, undefined, this),
70379
- /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Static, {
70659
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Static, {
70380
70660
  items: outputItems,
70381
- children: (item) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
70661
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70382
70662
  flexDirection: "column",
70383
70663
  children: renderContent()
70384
70664
  }, item.id, false, undefined, this)
@@ -70389,10 +70669,10 @@ function Search({ args: [keyword], options: opts }) {
70389
70669
 
70390
70670
  // src/commands/uninstall.tsx
70391
70671
  import { rm } from "node:fs/promises";
70392
- var import_react45 = __toESM(require_react(), 1);
70393
- var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
70672
+ var import_react46 = __toESM(require_react(), 1);
70673
+ var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
70394
70674
  var args9 = exports_external.tuple([exports_external.string().describe("Skill name to uninstall")]);
70395
- var options15 = exports_external.object({
70675
+ var options16 = exports_external.object({
70396
70676
  force: exports_external.boolean().default(false).describe("Skip confirmation prompt")
70397
70677
  });
70398
70678
  function ConfirmPrompt({
@@ -70407,20 +70687,20 @@ function ConfirmPrompt({
70407
70687
  onCancel();
70408
70688
  }
70409
70689
  });
70410
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70690
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70411
70691
  flexDirection: "column",
70412
70692
  children: [
70413
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70693
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70414
70694
  children: [
70415
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70695
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70416
70696
  children: "Uninstall "
70417
70697
  }, undefined, false, undefined, this),
70418
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70698
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70419
70699
  color: "cyan",
70420
70700
  bold: true,
70421
70701
  children: skill.name
70422
70702
  }, undefined, false, undefined, this),
70423
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70703
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70424
70704
  children: [
70425
70705
  " v",
70426
70706
  skill.version,
@@ -70429,9 +70709,9 @@ function ConfirmPrompt({
70429
70709
  }, undefined, true, undefined, this)
70430
70710
  ]
70431
70711
  }, undefined, true, undefined, this),
70432
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70712
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70433
70713
  marginLeft: 2,
70434
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70714
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70435
70715
  dimColor: true,
70436
70716
  children: [
70437
70717
  "Location: ",
@@ -70439,26 +70719,26 @@ function ConfirmPrompt({
70439
70719
  ]
70440
70720
  }, undefined, true, undefined, this)
70441
70721
  }, undefined, false, undefined, this),
70442
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70722
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70443
70723
  marginTop: 1,
70444
70724
  children: [
70445
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70725
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70446
70726
  dimColor: true,
70447
70727
  children: "Press "
70448
70728
  }, undefined, false, undefined, this),
70449
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70729
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70450
70730
  color: "green",
70451
70731
  children: "Y"
70452
70732
  }, undefined, false, undefined, this),
70453
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70733
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70454
70734
  dimColor: true,
70455
70735
  children: " to confirm, "
70456
70736
  }, undefined, false, undefined, this),
70457
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70737
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70458
70738
  color: "red",
70459
70739
  children: "N"
70460
70740
  }, undefined, false, undefined, this),
70461
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70741
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70462
70742
  dimColor: true,
70463
70743
  children: " to cancel"
70464
70744
  }, undefined, false, undefined, this)
@@ -70469,9 +70749,9 @@ function ConfirmPrompt({
70469
70749
  }
70470
70750
  function Uninstall({ args: [skillName], options: opts }) {
70471
70751
  const { exit } = use_app_default();
70472
- const [state, setState] = import_react45.useState({ phase: "checking" });
70473
- const [outputItems, setOutputItems] = import_react45.useState([]);
70474
- const performUninstall = import_react45.useCallback(async (skill) => {
70752
+ const [state, setState] = import_react46.useState({ phase: "checking" });
70753
+ const [outputItems, setOutputItems] = import_react46.useState([]);
70754
+ const performUninstall = import_react46.useCallback(async (skill) => {
70475
70755
  setState({ phase: "uninstalling", skill });
70476
70756
  try {
70477
70757
  await rm(skill.installedPath, { recursive: true, force: true });
@@ -70484,7 +70764,7 @@ function Uninstall({ args: [skillName], options: opts }) {
70484
70764
  });
70485
70765
  }
70486
70766
  }, []);
70487
- import_react45.useEffect(() => {
70767
+ import_react46.useEffect(() => {
70488
70768
  const config2 = getConfig();
70489
70769
  const currentAgentId = getCurrentAgent();
70490
70770
  const agentInfo = getAgent(currentAgentId);
@@ -70500,13 +70780,13 @@ function Uninstall({ args: [skillName], options: opts }) {
70500
70780
  setState({ phase: "confirming", skill });
70501
70781
  }
70502
70782
  }, [skillName, opts.force, performUninstall]);
70503
- import_react45.useEffect(() => {
70783
+ import_react46.useEffect(() => {
70504
70784
  const isFinalState = state.phase === "not_found" || state.phase === "success" || state.phase === "cancelled" || state.phase === "error";
70505
70785
  if (isFinalState && outputItems.length === 0) {
70506
70786
  setOutputItems([{ id: "output" }]);
70507
70787
  }
70508
70788
  }, [state.phase, outputItems.length]);
70509
- import_react45.useEffect(() => {
70789
+ import_react46.useEffect(() => {
70510
70790
  if (outputItems.length > 0) {
70511
70791
  process.nextTick(() => exit());
70512
70792
  }
@@ -70522,10 +70802,10 @@ function Uninstall({ args: [skillName], options: opts }) {
70522
70802
  const renderContent = () => {
70523
70803
  switch (state.phase) {
70524
70804
  case "not_found":
70525
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70805
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70526
70806
  flexDirection: "column",
70527
70807
  children: [
70528
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70808
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
70529
70809
  type: "error",
70530
70810
  children: [
70531
70811
  'Skill "',
@@ -70534,9 +70814,9 @@ function Uninstall({ args: [skillName], options: opts }) {
70534
70814
  state.agentName
70535
70815
  ]
70536
70816
  }, undefined, true, undefined, this),
70537
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70817
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70538
70818
  marginTop: 1,
70539
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text, {
70819
+ children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
70540
70820
  dimColor: true,
70541
70821
  children: "Run 'skilluse list' to see installed skills."
70542
70822
  }, undefined, false, undefined, this)
@@ -70544,7 +70824,7 @@ function Uninstall({ args: [skillName], options: opts }) {
70544
70824
  ]
70545
70825
  }, undefined, true, undefined, this);
70546
70826
  case "success":
70547
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70827
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
70548
70828
  type: "success",
70549
70829
  children: [
70550
70830
  'Uninstalled "',
@@ -70553,12 +70833,12 @@ function Uninstall({ args: [skillName], options: opts }) {
70553
70833
  ]
70554
70834
  }, undefined, true, undefined, this);
70555
70835
  case "cancelled":
70556
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70836
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
70557
70837
  type: "warning",
70558
70838
  children: "Uninstall cancelled"
70559
70839
  }, undefined, false, undefined, this);
70560
70840
  case "error":
70561
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(StatusMessage, {
70841
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
70562
70842
  type: "error",
70563
70843
  children: state.message
70564
70844
  }, undefined, false, undefined, this);
@@ -70566,22 +70846,22 @@ function Uninstall({ args: [skillName], options: opts }) {
70566
70846
  return null;
70567
70847
  }
70568
70848
  };
70569
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(jsx_dev_runtime22.Fragment, {
70849
+ return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(jsx_dev_runtime23.Fragment, {
70570
70850
  children: [
70571
- state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
70851
+ state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Spinner2, {
70572
70852
  text: "Loading..."
70573
70853
  }, undefined, false, undefined, this),
70574
- state.phase === "confirming" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ConfirmPrompt, {
70854
+ state.phase === "confirming" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(ConfirmPrompt, {
70575
70855
  skill: state.skill,
70576
70856
  onConfirm: handleConfirm,
70577
70857
  onCancel: handleCancel
70578
70858
  }, undefined, false, undefined, this),
70579
- state.phase === "uninstalling" && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Spinner2, {
70859
+ state.phase === "uninstalling" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Spinner2, {
70580
70860
  text: `Uninstalling ${state.skill.name}...`
70581
70861
  }, undefined, false, undefined, this),
70582
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Static, {
70862
+ /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Static, {
70583
70863
  items: outputItems,
70584
- children: (item) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
70864
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
70585
70865
  flexDirection: "column",
70586
70866
  children: renderContent()
70587
70867
  }, item.id, false, undefined, this)
@@ -70593,13 +70873,13 @@ function Uninstall({ args: [skillName], options: opts }) {
70593
70873
  // src/commands/upgrade.tsx
70594
70874
  import { mkdir as mkdir2, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
70595
70875
  import { join as join4 } from "node:path";
70596
- var import_react46 = __toESM(require_react(), 1);
70597
- var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
70876
+ var import_react47 = __toESM(require_react(), 1);
70877
+ var jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
70598
70878
  var args10 = exports_external.tuple([
70599
70879
  exports_external.string().optional().describe("Skill name to upgrade (optional, upgrades all if omitted)")
70600
70880
  ]);
70601
- var options16 = exports_external.object({});
70602
- function parseFrontmatter5(content) {
70881
+ var options17 = exports_external.object({});
70882
+ function parseFrontmatter6(content) {
70603
70883
  const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
70604
70884
  if (!frontmatterMatch)
70605
70885
  return {};
@@ -70645,7 +70925,7 @@ async function checkForUpdate2(token, skill, repoConfig) {
70645
70925
  let latestVersion = skill.version;
70646
70926
  if (skillResponse.ok) {
70647
70927
  const content = await skillResponse.text();
70648
- const frontmatter = parseFrontmatter5(content);
70928
+ const frontmatter = parseFrontmatter6(content);
70649
70929
  if (frontmatter.version) {
70650
70930
  latestVersion = String(frontmatter.version);
70651
70931
  }
@@ -70707,9 +70987,9 @@ async function downloadSkillFiles2(token, repo, skillPath, branch, targetDir) {
70707
70987
  }
70708
70988
  function Upgrade({ args: [skillName] }) {
70709
70989
  const { exit } = use_app_default();
70710
- const [state, setState] = import_react46.useState({ phase: "checking" });
70711
- const [outputItems, setOutputItems] = import_react46.useState([]);
70712
- import_react46.useEffect(() => {
70990
+ const [state, setState] = import_react47.useState({ phase: "checking" });
70991
+ const [outputItems, setOutputItems] = import_react47.useState([]);
70992
+ import_react47.useEffect(() => {
70713
70993
  async function upgrade() {
70714
70994
  const config2 = getConfig();
70715
70995
  let skillsToCheck = [];
@@ -70796,13 +71076,13 @@ function Upgrade({ args: [skillName] }) {
70796
71076
  });
70797
71077
  });
70798
71078
  }, [skillName]);
70799
- import_react46.useEffect(() => {
71079
+ import_react47.useEffect(() => {
70800
71080
  const isFinalState = state.phase === "not_found" || state.phase === "no_updates" || state.phase === "success" || state.phase === "auth_required" || state.phase === "error";
70801
71081
  if (isFinalState && outputItems.length === 0) {
70802
71082
  setOutputItems([{ id: "output" }]);
70803
71083
  }
70804
71084
  }, [state.phase, outputItems.length]);
70805
- import_react46.useEffect(() => {
71085
+ import_react47.useEffect(() => {
70806
71086
  if (outputItems.length > 0) {
70807
71087
  process.nextTick(() => exit());
70808
71088
  }
@@ -70810,18 +71090,18 @@ function Upgrade({ args: [skillName] }) {
70810
71090
  const renderContent = () => {
70811
71091
  switch (state.phase) {
70812
71092
  case "auth_required":
70813
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71093
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70814
71094
  flexDirection: "column",
70815
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
71095
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(StatusMessage, {
70816
71096
  type: "error",
70817
71097
  children: state.message
70818
71098
  }, undefined, false, undefined, this)
70819
71099
  }, undefined, false, undefined, this);
70820
71100
  case "not_found":
70821
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71101
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70822
71102
  flexDirection: "column",
70823
71103
  children: [
70824
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
71104
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(StatusMessage, {
70825
71105
  type: "error",
70826
71106
  children: [
70827
71107
  'Skill "',
@@ -70829,9 +71109,9 @@ function Upgrade({ args: [skillName] }) {
70829
71109
  '" is not installed'
70830
71110
  ]
70831
71111
  }, undefined, true, undefined, this),
70832
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71112
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70833
71113
  marginTop: 1,
70834
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71114
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70835
71115
  dimColor: true,
70836
71116
  children: "Run 'skilluse list' to see installed skills."
70837
71117
  }, undefined, false, undefined, this)
@@ -70839,15 +71119,15 @@ function Upgrade({ args: [skillName] }) {
70839
71119
  ]
70840
71120
  }, undefined, true, undefined, this);
70841
71121
  case "no_updates":
70842
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
71122
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(StatusMessage, {
70843
71123
  type: "success",
70844
71124
  children: "All skills are up to date"
70845
71125
  }, undefined, false, undefined, this);
70846
71126
  case "success":
70847
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71127
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70848
71128
  flexDirection: "column",
70849
71129
  children: [
70850
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
71130
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(StatusMessage, {
70851
71131
  type: "success",
70852
71132
  children: [
70853
71133
  "Upgraded ",
@@ -70855,10 +71135,10 @@ function Upgrade({ args: [skillName] }) {
70855
71135
  " skill(s)"
70856
71136
  ]
70857
71137
  }, undefined, true, undefined, this),
70858
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71138
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70859
71139
  flexDirection: "column",
70860
71140
  marginLeft: 2,
70861
- children: state.upgraded.map((name) => /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71141
+ children: state.upgraded.map((name) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70862
71142
  dimColor: true,
70863
71143
  children: name
70864
71144
  }, name, false, undefined, this))
@@ -70866,7 +71146,7 @@ function Upgrade({ args: [skillName] }) {
70866
71146
  ]
70867
71147
  }, undefined, true, undefined, this);
70868
71148
  case "error":
70869
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(StatusMessage, {
71149
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(StatusMessage, {
70870
71150
  type: "error",
70871
71151
  children: state.message
70872
71152
  }, undefined, false, undefined, this);
@@ -70874,49 +71154,49 @@ function Upgrade({ args: [skillName] }) {
70874
71154
  return null;
70875
71155
  }
70876
71156
  };
70877
- return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(jsx_dev_runtime23.Fragment, {
71157
+ return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(jsx_dev_runtime24.Fragment, {
70878
71158
  children: [
70879
- state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Spinner2, {
71159
+ state.phase === "checking" && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Spinner2, {
70880
71160
  text: "Initializing..."
70881
71161
  }, undefined, false, undefined, this),
70882
- state.phase === "checking_updates" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Spinner2, {
71162
+ state.phase === "checking_updates" && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Spinner2, {
70883
71163
  text: `Checking for updates (${state.current}/${state.total})...`
70884
71164
  }, undefined, false, undefined, this),
70885
- state.phase === "upgrading" && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71165
+ state.phase === "upgrading" && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70886
71166
  flexDirection: "column",
70887
71167
  children: [
70888
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71168
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70889
71169
  marginBottom: 1,
70890
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71170
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70891
71171
  bold: true,
70892
71172
  children: "Upgrading skills..."
70893
71173
  }, undefined, false, undefined, this)
70894
71174
  }, undefined, false, undefined, this),
70895
- state.upgrades.map((upgrade, i) => /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71175
+ state.upgrades.map((upgrade, i) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70896
71176
  children: [
70897
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71177
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70898
71178
  children: [
70899
- i < state.current && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71179
+ i < state.current && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70900
71180
  color: "green",
70901
71181
  children: "✔"
70902
71182
  }, undefined, false, undefined, this),
70903
- i === state.current && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71183
+ i === state.current && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70904
71184
  color: "yellow",
70905
71185
  children: "◐"
70906
71186
  }, undefined, false, undefined, this),
70907
- i > state.current && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71187
+ i > state.current && /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70908
71188
  dimColor: true,
70909
71189
  children: "○"
70910
71190
  }, undefined, false, undefined, this)
70911
71191
  ]
70912
71192
  }, undefined, true, undefined, this),
70913
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71193
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70914
71194
  children: [
70915
71195
  " ",
70916
71196
  upgrade.skill.name
70917
71197
  ]
70918
71198
  }, undefined, true, undefined, this),
70919
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text, {
71199
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text, {
70920
71200
  dimColor: true,
70921
71201
  children: [
70922
71202
  " ",
@@ -70928,18 +71208,18 @@ function Upgrade({ args: [skillName] }) {
70928
71208
  }, undefined, true, undefined, this)
70929
71209
  ]
70930
71210
  }, upgrade.skill.name, true, undefined, this)),
70931
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71211
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70932
71212
  marginTop: 1,
70933
- children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(ProgressBar, {
71213
+ children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(ProgressBar, {
70934
71214
  percent: state.progress,
70935
71215
  width: 30
70936
71216
  }, undefined, false, undefined, this)
70937
71217
  }, undefined, false, undefined, this)
70938
71218
  ]
70939
71219
  }, undefined, true, undefined, this),
70940
- /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Static, {
71220
+ /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Static, {
70941
71221
  items: outputItems,
70942
- children: (item) => /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
71222
+ children: (item) => /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
70943
71223
  flexDirection: "column",
70944
71224
  children: renderContent()
70945
71225
  }, item.id, false, undefined, this)
@@ -70950,7 +71230,7 @@ function Upgrade({ args: [skillName] }) {
70950
71230
  // package.json
70951
71231
  var package_default = {
70952
71232
  name: "skilluse",
70953
- version: "0.5.0",
71233
+ version: "0.6.0",
70954
71234
  description: "CLI tool for managing and installing AI Coding Agent Skills",
70955
71235
  main: "dist/cli.js",
70956
71236
  bin: {
@@ -71020,7 +71300,7 @@ var package_default = {
71020
71300
  };
71021
71301
 
71022
71302
  // src/cli.tsx
71023
- var jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
71303
+ var jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
71024
71304
  var VERSION = process.env.VERSION || package_default.version;
71025
71305
  var BUILD_TIME = process.env.BUILD_TIME || new Date().toISOString();
71026
71306
  var program2 = new Command;
@@ -71030,110 +71310,115 @@ program2.name("skilluse").description("CLI tool for managing and installing AI C
71030
71310
  process.exit(0);
71031
71311
  });
71032
71312
  program2.command("login").description("Authenticate with GitHub").action(() => {
71033
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Login, {
71313
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Login, {
71034
71314
  options: {}
71035
71315
  }, undefined, false, undefined, this));
71036
71316
  });
71037
71317
  program2.command("logout").description("Clear stored credentials").action(() => {
71038
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Logout, {
71318
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Logout, {
71039
71319
  options: {}
71040
71320
  }, undefined, false, undefined, this));
71041
71321
  });
71042
71322
  program2.command("list").description("List installed skills").option("-o, --outdated", "Show only outdated skills").action((opts) => {
71043
- const options17 = options4.parse(opts);
71044
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(List, {
71045
- options: options17
71323
+ const options18 = options4.parse(opts);
71324
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(List, {
71325
+ options: options18
71046
71326
  }, undefined, false, undefined, this));
71047
71327
  });
71048
71328
  program2.command("search <keyword>").description("Search for skills").option("-a, --all", "Search in all configured repos").action((keyword, opts) => {
71049
71329
  const args11 = args8.parse([keyword]);
71050
- const options17 = options14.parse(opts);
71051
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Search, {
71330
+ const options18 = options15.parse(opts);
71331
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Search, {
71052
71332
  args: args11,
71053
- options: options17
71333
+ options: options18
71054
71334
  }, undefined, false, undefined, this));
71055
71335
  });
71056
71336
  program2.command("install <skill-name>").description("Install a skill").option("-g, --global", "Install globally to agent's global skills path").option("-a, --agent <agent>", "Override current agent (e.g., cursor, claude)").action((skillName, opts) => {
71057
71337
  const args11 = args2.parse([skillName]);
71058
- const options17 = options3.parse(opts);
71059
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Install, {
71338
+ const options18 = options3.parse(opts);
71339
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Install, {
71060
71340
  args: args11,
71061
- options: options17
71341
+ options: options18
71062
71342
  }, undefined, false, undefined, this));
71063
71343
  });
71064
71344
  program2.command("uninstall <skill-name>").description("Uninstall a skill").option("-f, --force", "Skip confirmation").action((skillName, opts) => {
71065
71345
  const args11 = args9.parse([skillName]);
71066
- const options17 = options15.parse(opts);
71067
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Uninstall, {
71346
+ const options18 = options16.parse(opts);
71347
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Uninstall, {
71068
71348
  args: args11,
71069
- options: options17
71349
+ options: options18
71070
71350
  }, undefined, false, undefined, this));
71071
71351
  });
71072
71352
  program2.command("upgrade [skill-name]").description("Upgrade skill(s) to latest version").action((skillName) => {
71073
71353
  const args11 = args10.parse([skillName]);
71074
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Upgrade, {
71354
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Upgrade, {
71075
71355
  args: args11,
71076
71356
  options: {}
71077
71357
  }, undefined, false, undefined, this));
71078
71358
  });
71079
71359
  program2.command("info <skill-name>").description("Show skill details").action((skillName) => {
71080
71360
  const args11 = args.parse([skillName]);
71081
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Info, {
71361
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Info, {
71082
71362
  args: args11,
71083
71363
  options: {}
71084
71364
  }, undefined, false, undefined, this));
71085
71365
  });
71086
71366
  var repoCmd = program2.command("repo").description("Manage skill repositories");
71087
71367
  repoCmd.command("list").description("List configured repositories").action(() => {
71088
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(RepoList, {
71368
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RepoList, {
71369
+ options: {}
71370
+ }, undefined, false, undefined, this));
71371
+ });
71372
+ repoCmd.command("skills").description("List all skills in current repository").action(() => {
71373
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RepoSkills, {
71089
71374
  options: {}
71090
71375
  }, undefined, false, undefined, this));
71091
71376
  });
71092
71377
  repoCmd.command("add <url>").description("Add a skill repository").option("-p, --path <path>", "Skill path within the repo").option("-b, --branch <branch>", "Branch to use").option("-d, --default", "Set as default repository").action((url2, opts) => {
71093
71378
  const args11 = args3.parse([url2]);
71094
- const options17 = options7.parse(opts);
71095
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(RepoAdd, {
71379
+ const options18 = options7.parse(opts);
71380
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RepoAdd, {
71096
71381
  args: args11,
71097
- options: options17
71382
+ options: options18
71098
71383
  }, undefined, false, undefined, this));
71099
71384
  });
71100
71385
  repoCmd.command("remove <name>").description("Remove a repository").option("-f, --force", "Skip confirmation").action((name, opts) => {
71101
71386
  const args11 = args5.parse([name]);
71102
- const options17 = options11.parse(opts);
71103
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(RepoRemove, {
71387
+ const options18 = options12.parse(opts);
71388
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RepoRemove, {
71104
71389
  args: args11,
71105
- options: options17
71390
+ options: options18
71106
71391
  }, undefined, false, undefined, this));
71107
71392
  });
71108
71393
  repoCmd.command("edit <name>").description("Edit repository settings").option("-p, --path <path>", "New skill path").option("-b, --branch <branch>", "New branch").action((name, opts) => {
71109
71394
  const args11 = args4.parse([name]);
71110
- const options17 = options8.parse(opts);
71111
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(RepoEdit, {
71395
+ const options18 = options8.parse(opts);
71396
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RepoEdit, {
71112
71397
  args: args11,
71113
- options: options17
71398
+ options: options18
71114
71399
  }, undefined, false, undefined, this));
71115
71400
  });
71116
71401
  repoCmd.command("use <name>").description("Set default repository").action((name, _opts) => {
71117
71402
  const args11 = args6.parse([name]);
71118
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(RepoUse, {
71403
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(RepoUse, {
71119
71404
  args: args11,
71120
71405
  options: {}
71121
71406
  }, undefined, false, undefined, this));
71122
71407
  });
71123
71408
  repoCmd.action(() => {
71124
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Repo, {
71409
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Repo, {
71125
71410
  options: {}
71126
71411
  }, undefined, false, undefined, this));
71127
71412
  });
71128
71413
  program2.command("agent [agent-id]").description("Switch agent or select interactively").action((agentId) => {
71129
71414
  const args11 = args7.parse([agentId]);
71130
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Agent, {
71415
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Agent, {
71131
71416
  args: args11,
71132
71417
  options: {}
71133
71418
  }, undefined, false, undefined, this));
71134
71419
  });
71135
71420
  program2.action(() => {
71136
- render_default(/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Index, {
71421
+ render_default(/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Index, {
71137
71422
  options: {}
71138
71423
  }, undefined, false, undefined, this));
71139
71424
  });