install-agent-skill 1.2.7 → 1.2.9

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.
@@ -5,7 +5,9 @@
5
5
  import fs from "fs";
6
6
  import path from "path";
7
7
  import os from "os";
8
- import { execSync } from "child_process";
8
+ import { exec } from "child_process";
9
+ import util from "util";
10
+ const execAsync = util.promisify(exec);
9
11
  import prompts from "prompts";
10
12
 
11
13
  import boxen from "boxen";
@@ -42,11 +44,10 @@ export async function run(spec) {
42
44
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "add-skill-"));
43
45
 
44
46
  try {
45
- execSync(`git clone --depth=1 ${url} "${tmp}"`, { stdio: "pipe" });
46
- if (ref) execSync(`git -C "${tmp}" checkout ${ref}`, { stdio: "pipe" });
47
+ await execAsync(`git clone --depth=1 ${url} "${tmp}"`);
48
+ if (ref) await execAsync(`git -C "${tmp}" checkout ${ref}`);
47
49
  } catch {
48
- s.stop("Failed to clone");
49
- step(c.red("Failed to clone"), S.cross, "red");
50
+ s.fail("Failed to clone");
50
51
  fs.rmSync(tmp, { recursive: true, force: true });
51
52
  return;
52
53
  }
@@ -118,6 +119,9 @@ export async function run(spec) {
118
119
  selectedSkills = skillsR.skills;
119
120
  }
120
121
 
122
+ // Ensure newline after prompt to fix tree alignment
123
+ console.log();
124
+
121
125
  // Agent selection
122
126
  stepLine();
123
127
  step("Detected 5 agents", S.diamond);
@@ -41,15 +41,15 @@ export async function run(skillName) {
41
41
  const spec = `${meta.repo}#${meta.skill}${meta.ref ? "@" + meta.ref : ""}`;
42
42
 
43
43
  if (DRY) {
44
- s.stop();
44
+ s.stop("Dry run analysis complete");
45
45
  step(`Would update: ${skillName}`);
46
46
  } else {
47
+ s.stop("Preparing update...");
47
48
  // Dynamically import install command
48
49
  const { run: install } = await import("./install.js");
49
50
  await install(spec);
50
- s.stop();
51
51
  }
52
52
  } catch (err) {
53
- s.stop(`Failed: ${err.message}`);
53
+ s.fail(`Failed: ${err.message}`);
54
54
  }
55
55
  }
package/bin/lib/ui.js CHANGED
@@ -3,9 +3,46 @@
3
3
  */
4
4
 
5
5
  import kleur from "kleur";
6
- import { intro, outro, spinner, multiselect, select, confirm, isCancel, cancel, text } from "@clack/prompts";
6
+ import { intro, outro, multiselect, select, confirm, isCancel, cancel, text } from "@clack/prompts";
7
+ import ora from "ora";
7
8
 
8
- export { intro, outro, spinner, multiselect, select, confirm, isCancel, cancel, text };
9
+ export { intro, outro, multiselect, select, confirm, isCancel, cancel, text };
10
+
11
+ /**
12
+ * Create a spinner
13
+ */
14
+ export function spinner() {
15
+ return {
16
+ _s: null,
17
+ start(msg) {
18
+ this._s = ora({
19
+ text: msg,
20
+ prefixText: ` ${c.gray(S.branch)} `,
21
+ color: "magenta",
22
+ spinner: "dots"
23
+ }).start();
24
+ },
25
+ stop(msg) {
26
+ if (this._s) {
27
+ this._s.stopAndPersist({
28
+ symbol: c.green(S.check),
29
+ text: msg
30
+ });
31
+ }
32
+ },
33
+ fail(msg) {
34
+ if (this._s) {
35
+ this._s.stopAndPersist({
36
+ symbol: c.red(S.cross),
37
+ text: msg
38
+ });
39
+ }
40
+ },
41
+ message(msg) {
42
+ if (this._s) this._s.text = msg;
43
+ }
44
+ };
45
+ }
9
46
 
10
47
  // --- Symbols ---
11
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "install-agent-skill",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
5
5
  "license": "MIT",
6
6
  "author": "DataGuruIn <contact@dataguruin.com>",