@involvex/super-agent-cli 0.0.89 → 0.0.91

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/dist/index.js CHANGED
@@ -1731,7 +1731,7 @@ var init_indexer = __esm(() => {
1731
1731
  var require_package = __commonJS((exports, module) => {
1732
1732
  module.exports = {
1733
1733
  name: "@involvex/super-agent-cli",
1734
- version: "0.0.89",
1734
+ version: "0.0.91",
1735
1735
  description: "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
1736
1736
  keywords: [
1737
1737
  "cli",
@@ -1794,9 +1794,12 @@ var require_package = __commonJS((exports, module) => {
1794
1794
  "test:watch": "vitest",
1795
1795
  typecheck: "tsc --noEmit"
1796
1796
  },
1797
+ overrides: {
1798
+ "@modelcontextprotocol/sdk": "^1.26.0"
1799
+ },
1797
1800
  dependencies: {
1798
1801
  "@google/generative-ai": "^0.24.1",
1799
- "@modelcontextprotocol/sdk": "^1.25.3",
1802
+ "@modelcontextprotocol/sdk": "^1.26.0",
1800
1803
  "@types/mime": "^4.0.0",
1801
1804
  axios: "^1.13.4",
1802
1805
  bcrypt: "^6.0.0",
@@ -1804,8 +1807,8 @@ var require_package = __commonJS((exports, module) => {
1804
1807
  chalk: "^5.6.2",
1805
1808
  commander: "^14.0.3",
1806
1809
  "conventional-changelog-cli": "^5.0.0",
1807
- dotenv: "^17.2.3",
1808
- firebase: "^12.8.0",
1810
+ dotenv: "^17.2.4",
1811
+ firebase: "^12.9.0",
1809
1812
  "fs-extra": "^11.3.3",
1810
1813
  ignore: "^7.0.5",
1811
1814
  ink: "^6.6.0",
@@ -1814,7 +1817,7 @@ var require_package = __commonJS((exports, module) => {
1814
1817
  "marked-terminal": "^7.3.0",
1815
1818
  mime: "^4.1.0",
1816
1819
  open: "^11.0.0",
1817
- openai: "^6.17.0",
1820
+ openai: "^6.18.0",
1818
1821
  react: "^19.2.4",
1819
1822
  "ripgrep-node": "^1.0.0",
1820
1823
  "shell-quote": "^1.8.3",
@@ -1823,7 +1826,7 @@ var require_package = __commonJS((exports, module) => {
1823
1826
  },
1824
1827
  devDependencies: {
1825
1828
  "@types/fs-extra": "^11.0.4",
1826
- "@types/node": "^25.1.0",
1829
+ "@types/node": "^25.2.1",
1827
1830
  "@types/react": "18.3.27",
1828
1831
  "@types/ws": "^8.18.1",
1829
1832
  "@typescript-eslint/eslint-plugin": "^8.54.0",
@@ -1833,7 +1836,7 @@ var require_package = __commonJS((exports, module) => {
1833
1836
  prettier: "^3.8.1",
1834
1837
  "prettier-plugin-organize-imports": "^4.3.0",
1835
1838
  "prettier-plugin-packagejson": "^3.0.0",
1836
- "prettier-plugin-sort-imports": "^1.8.9",
1839
+ "prettier-plugin-sort-imports": "^1.8.10",
1837
1840
  "react-devtools-core": "^7.0.1",
1838
1841
  tsx: "^4.21.0",
1839
1842
  typescript: "^5.9.3",
@@ -1991,11 +1994,9 @@ var BANNER = `
1991
1994
  `;
1992
1995
 
1993
1996
  // src/utils/confirmation-service.ts
1994
- import { exec, spawn } from "child_process";
1995
1997
  import { strict as assert } from "assert";
1998
+ import { spawn } from "child_process";
1996
1999
  import { EventEmitter } from "events";
1997
- import { promisify } from "util";
1998
- var execAsync = promisify(exec);
1999
2000
 
2000
2001
  class ConfirmationService extends EventEmitter {
2001
2002
  static instance;
@@ -2910,11 +2911,53 @@ init_config();
2910
2911
 
2911
2912
  // src/plugins/manager.ts
2912
2913
  init_settings_manager();
2913
- import { exec as exec2 } from "child_process";
2914
- import { promisify as promisify2 } from "util";
2914
+
2915
+ // src/utils/exec.ts
2916
+ import { spawn as spawn2 } from "child_process";
2917
+ async function runSafeCommand(command, args, options = {}) {
2918
+ return new Promise((resolve, reject) => {
2919
+ const child = spawn2(command, args, {
2920
+ cwd: options.cwd || process.cwd(),
2921
+ env: { ...process.env, ...options.env },
2922
+ shell: false
2923
+ });
2924
+ let stdout = "";
2925
+ let stderr = "";
2926
+ if (child.stdout) {
2927
+ child.stdout.on("data", (data) => {
2928
+ stdout += data.toString();
2929
+ });
2930
+ }
2931
+ if (child.stderr) {
2932
+ child.stderr.on("data", (data) => {
2933
+ stderr += data.toString();
2934
+ });
2935
+ }
2936
+ if (options.input && child.stdin) {
2937
+ child.stdin.write(options.input);
2938
+ child.stdin.end();
2939
+ }
2940
+ child.on("close", (code) => {
2941
+ if (code === 0) {
2942
+ resolve({ stdout, stderr });
2943
+ } else {
2944
+ const error = new Error(`Command "${command} ${args.join(" ")}" failed with exit code ${code}.
2945
+ Stderr: ${stderr}`);
2946
+ error.code = code;
2947
+ error.stdout = stdout;
2948
+ error.stderr = stderr;
2949
+ reject(error);
2950
+ }
2951
+ });
2952
+ child.on("error", (err) => {
2953
+ reject(err);
2954
+ });
2955
+ });
2956
+ }
2957
+
2958
+ // src/plugins/manager.ts
2915
2959
  import * as path4 from "path";
2916
2960
  import fs4 from "fs-extra";
2917
- var execAsync2 = promisify2(exec2);
2918
2961
 
2919
2962
  class PluginManager {
2920
2963
  static instance;
@@ -3015,12 +3058,14 @@ class PluginManager {
3015
3058
  if (await fs4.pathExists(targetDir)) {
3016
3059
  console.log(`Repository already cloned at ${targetDir}. Pulling latest...`);
3017
3060
  try {
3018
- await execAsync2(`cd "${targetDir}" && git pull`);
3061
+ await runSafeCommand("git", ["pull"], {
3062
+ cwd: targetDir
3063
+ });
3019
3064
  } catch (error) {
3020
3065
  console.warn(`Failed to pull updates: ${error}`);
3021
3066
  }
3022
3067
  } else {
3023
- await execAsync2(`git clone "${gitUrl}" "${targetDir}"`);
3068
+ await runSafeCommand("git", ["clone", gitUrl, targetDir]);
3024
3069
  }
3025
3070
  const packageJsonPath = path4.join(targetDir, "package.json");
3026
3071
  if (await fs4.pathExists(packageJsonPath)) {
@@ -3028,11 +3073,17 @@ class PluginManager {
3028
3073
  try {
3029
3074
  const hasBun = await fs4.pathExists(path4.join(targetDir, "bun.lockb"));
3030
3075
  const hasYarn = await fs4.pathExists(path4.join(targetDir, "yarn.lock"));
3031
- const installCmd = hasBun ? "bun install" : hasYarn ? "yarn install" : "npm install";
3032
- await execAsync2(`cd "${targetDir}" && ${installCmd}`);
3076
+ const installCmd = hasBun ? "bun" : hasYarn ? "yarn" : "npm";
3077
+ const installArgs = ["install"];
3078
+ await runSafeCommand(installCmd, installArgs, {
3079
+ cwd: targetDir
3080
+ });
3033
3081
  console.log("\uD83D\uDD28 Building plugin...");
3034
- const buildCmd = hasBun ? "bun run build" : hasYarn ? "yarn build" : "npm run build";
3035
- await execAsync2(`cd "${targetDir}" && ${buildCmd}`);
3082
+ const buildCmd = hasBun ? "bun" : hasYarn ? "yarn" : "npm";
3083
+ const buildArgs = ["run", "build"];
3084
+ await runSafeCommand(buildCmd, buildArgs, {
3085
+ cwd: targetDir
3086
+ });
3036
3087
  } catch (error) {
3037
3088
  console.warn(`Build failed: ${error.message}`);
3038
3089
  }
@@ -3055,11 +3106,17 @@ class PluginManager {
3055
3106
  try {
3056
3107
  const hasBun = await fs4.pathExists(path4.join(absolutePath, "bun.lockb"));
3057
3108
  const hasYarn = await fs4.pathExists(path4.join(absolutePath, "yarn.lock"));
3058
- const installCmd = hasBun ? "bun install" : hasYarn ? "yarn install" : "npm install";
3059
- await execAsync2(`cd "${absolutePath}" && ${installCmd}`);
3109
+ const installCmd = hasBun ? "bun" : hasYarn ? "yarn" : "npm";
3110
+ const installArgs = ["install"];
3111
+ await runSafeCommand(installCmd, installArgs, {
3112
+ cwd: absolutePath
3113
+ });
3060
3114
  console.log("\uD83D\uDD28 Building plugin...");
3061
- const buildCmd = hasBun ? "bun run build" : hasYarn ? "yarn build" : "npm run build";
3062
- await execAsync2(`cd "${absolutePath}" && ${buildCmd}`);
3115
+ const buildCmd = hasBun ? "bun" : hasYarn ? "yarn" : "npm";
3116
+ const buildArgs = ["run", "build"];
3117
+ await runSafeCommand(buildCmd, buildArgs, {
3118
+ cwd: absolutePath
3119
+ });
3063
3120
  } catch (error) {
3064
3121
  console.warn(`Build failed: ${error.message}`);
3065
3122
  }
@@ -3476,11 +3533,8 @@ async function getAllSuperAgentTools() {
3476
3533
  }
3477
3534
 
3478
3535
  // src/plugins/repository-manager.ts
3479
- import { exec as exec3 } from "child_process";
3480
- import { promisify as promisify3 } from "util";
3481
3536
  import * as path5 from "path";
3482
3537
  import fs5 from "fs-extra";
3483
- var execAsync3 = promisify3(exec3);
3484
3538
  var BUILTIN_REPOSITORIES = {
3485
3539
  agents: {
3486
3540
  type: "agents",
@@ -3534,21 +3588,21 @@ class RepositoryManager {
3534
3588
  const gitRoot = process.cwd();
3535
3589
  const gitDirPath = path5.join(gitRoot, ".git");
3536
3590
  if (!await fs5.pathExists(gitDirPath)) {
3537
- await execAsync3(`git clone ${repoConfig.url} ${targetDir}`, {
3591
+ await runSafeCommand("git", ["clone", repoConfig.url, targetDir], {
3538
3592
  cwd: process.cwd()
3539
3593
  });
3540
3594
  } else {
3541
3595
  try {
3542
- await execAsync3(`git submodule add ${repoConfig.url} ${targetDir}`, {
3596
+ await runSafeCommand("git", ["submodule", "add", repoConfig.url, targetDir], {
3543
3597
  cwd: process.cwd()
3544
3598
  });
3545
3599
  } catch (submoduleError) {
3546
- await execAsync3(`git clone ${repoConfig.url} ${targetDir}`, {
3600
+ await runSafeCommand("git", ["clone", repoConfig.url, targetDir], {
3547
3601
  cwd: process.cwd()
3548
3602
  });
3549
3603
  }
3550
3604
  try {
3551
- await execAsync3(`git submodule update --init --recursive`, {
3605
+ await runSafeCommand("git", ["submodule", "update", "--init", "--recursive"], {
3552
3606
  cwd: process.cwd()
3553
3607
  });
3554
3608
  } catch {}
@@ -3566,7 +3620,7 @@ class RepositoryManager {
3566
3620
  const targetDir = path5.join(this.reposDir, config.type);
3567
3621
  try {
3568
3622
  if (await fs5.pathExists(targetDir)) {
3569
- await execAsync3(`git pull origin ${config.branch || "main"}`, {
3623
+ await runSafeCommand("git", ["pull", "origin", config.branch || "main"], {
3570
3624
  cwd: targetDir
3571
3625
  });
3572
3626
  updated.push(key);
@@ -4246,8 +4300,16 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
4246
4300
  if (key.tab || key.return) {
4247
4301
  const safeIndex = Math.min(selectedCommandIndex, filteredSuggestions.length - 1);
4248
4302
  const selectedCommand = filteredSuggestions[safeIndex];
4249
- let completedCommand = selectedCommand.command;
4250
- completedCommand = completedCommand.replace(/\s*<[^>]+>/g, "").replace(/\s*\[[^\]]+\]/g, "");
4303
+ const stripCommandPlaceholders = (command) => {
4304
+ let previous;
4305
+ let current = command;
4306
+ do {
4307
+ previous = current;
4308
+ current = current.replace(/\s*<[^>]+>/g, "").replace(/\s*\[[^\]]+\]/g, "");
4309
+ } while (current !== previous);
4310
+ return current;
4311
+ };
4312
+ let completedCommand = stripCommandPlaceholders(selectedCommand.command);
4251
4313
  if (!completedCommand.endsWith(" ") && selectedCommand.command.includes("<")) {
4252
4314
  completedCommand += " ";
4253
4315
  } else if (!completedCommand.endsWith(" ")) {
@@ -7811,7 +7873,7 @@ init_settings_manager();
7811
7873
 
7812
7874
  // src/tools/bash.ts
7813
7875
  import * as shellQuote from "shell-quote";
7814
- import { spawn as spawn2 } from "child_process";
7876
+ import { spawn as spawn3 } from "child_process";
7815
7877
  class BashTool {
7816
7878
  currentDirectory = process.cwd();
7817
7879
  confirmationService = ConfirmationService.getInstance();
@@ -7824,7 +7886,7 @@ class BashTool {
7824
7886
  const cmd = argv[0];
7825
7887
  const args = argv.slice(1);
7826
7888
  return await new Promise((resolve2, reject) => {
7827
- const child = spawn2(cmd, args, {
7889
+ const child = spawn3(cmd, args, {
7828
7890
  cwd: options.cwd,
7829
7891
  shell: false
7830
7892
  });
@@ -8467,7 +8529,7 @@ Important Files:
8467
8529
  }
8468
8530
  // src/tools/search.ts
8469
8531
  init_indexer();
8470
- import { spawn as spawn3 } from "child_process";
8532
+ import { spawn as spawn4 } from "child_process";
8471
8533
  import * as path16 from "path";
8472
8534
  import fs16 from "fs-extra";
8473
8535
 
@@ -8568,7 +8630,7 @@ class SearchTool {
8568
8630
  }
8569
8631
  args.push("--no-require-git", "--follow", "--glob", "!.git/**", "--glob", "!node_modules/**", "--glob", "!.DS_Store", "--glob", "!*.log");
8570
8632
  args.push(query, this.currentDirectory);
8571
- const rg = spawn3("rg", args);
8633
+ const rg = spawn4("rg", args);
8572
8634
  let output = "";
8573
8635
  let errorOutput = "";
8574
8636
  rg.stdout.on("data", (data) => {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@involvex/super-agent-cli",
3
- "version": "0.0.89",
3
+ "version": "0.0.91",
4
4
  "description": "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
5
5
  "keywords": [
6
6
  "cli",
@@ -63,9 +63,12 @@
63
63
  "test:watch": "vitest",
64
64
  "typecheck": "tsc --noEmit"
65
65
  },
66
+ "overrides": {
67
+ "@modelcontextprotocol/sdk": "^1.26.0"
68
+ },
66
69
  "dependencies": {
67
70
  "@google/generative-ai": "^0.24.1",
68
- "@modelcontextprotocol/sdk": "^1.25.3",
71
+ "@modelcontextprotocol/sdk": "^1.26.0",
69
72
  "@types/mime": "^4.0.0",
70
73
  "axios": "^1.13.4",
71
74
  "bcrypt": "^6.0.0",
@@ -73,8 +76,8 @@
73
76
  "chalk": "^5.6.2",
74
77
  "commander": "^14.0.3",
75
78
  "conventional-changelog-cli": "^5.0.0",
76
- "dotenv": "^17.2.3",
77
- "firebase": "^12.8.0",
79
+ "dotenv": "^17.2.4",
80
+ "firebase": "^12.9.0",
78
81
  "fs-extra": "^11.3.3",
79
82
  "ignore": "^7.0.5",
80
83
  "ink": "^6.6.0",
@@ -83,7 +86,7 @@
83
86
  "marked-terminal": "^7.3.0",
84
87
  "mime": "^4.1.0",
85
88
  "open": "^11.0.0",
86
- "openai": "^6.17.0",
89
+ "openai": "^6.18.0",
87
90
  "react": "^19.2.4",
88
91
  "ripgrep-node": "^1.0.0",
89
92
  "shell-quote": "^1.8.3",
@@ -92,7 +95,7 @@
92
95
  },
93
96
  "devDependencies": {
94
97
  "@types/fs-extra": "^11.0.4",
95
- "@types/node": "^25.1.0",
98
+ "@types/node": "^25.2.1",
96
99
  "@types/react": "18.3.27",
97
100
  "@types/ws": "^8.18.1",
98
101
  "@typescript-eslint/eslint-plugin": "^8.54.0",
@@ -102,7 +105,7 @@
102
105
  "prettier": "^3.8.1",
103
106
  "prettier-plugin-organize-imports": "^4.3.0",
104
107
  "prettier-plugin-packagejson": "^3.0.0",
105
- "prettier-plugin-sort-imports": "^1.8.9",
108
+ "prettier-plugin-sort-imports": "^1.8.10",
106
109
  "react-devtools-core": "^7.0.1",
107
110
  "tsx": "^4.21.0",
108
111
  "typescript": "^5.9.3",
Binary file
@@ -124,23 +124,22 @@ function renderMessages() {
124
124
  }
125
125
 
126
126
  function formatContent(content) {
127
- // Simple markdown-like formatting
128
- let formatted = content;
127
+ // First escape everything to prevent XSS
128
+ let formatted = escapeHtml(content);
129
129
 
130
+ // Now apply formatting on the escaped content
130
131
  // Code blocks
131
132
  formatted = formatted.replace(
132
133
  /```(\w+)?\n([\s\S]*?)```/g,
133
134
  (match, lang, code) => {
134
- return `<pre><code class="language-${lang || "text"}">${escapeHtml(
135
- code.trim(),
136
- )}</code></pre>`;
135
+ return `<pre><code class="language-${lang || "text"}">${code.trim()}</code></pre>`;
137
136
  },
138
137
  );
139
138
 
140
139
  // Inline code
141
140
  formatted = formatted.replace(
142
141
  /`([^`]+)`/g,
143
- (match, code) => `<code>${escapeHtml(code)}</code>`,
142
+ (match, code) => `<code>${code}</code>`,
144
143
  );
145
144
 
146
145
  // Bold
Binary file
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
2
+ <defs>
3
+ <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#6366f1;stop-opacity:1" />
5
+ <stop offset="100%" style="stop-color:#8b5cf6;stop-opacity:1" />
6
+ </linearGradient>
7
+ </defs>
8
+ <rect width="24" height="24" rx="4" fill="url(#grad1)"/>
9
+ <path d="M7 8h10M7 12h7M7 16h10" stroke="white" stroke-width="2" stroke-linecap="round"/>
10
+ <circle cx="18" cy="6" r="2" fill="#22c55e"/>
11
+ </svg>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "super-agent-vscode",
3
3
  "displayName": "Super Agent AI",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "description": "AI-powered coding assistant with file context from Super Agent CLI",
6
6
  "categories": [
7
7
  "Machine Learning",
@@ -17,13 +17,13 @@
17
17
  "publisher": "involvex",
18
18
  "main": "./dist/extension.js",
19
19
  "scripts": {
20
- "build": "npm run compile && npm run copy-assets",
20
+ "build": "bun run compile && bun run copy-assets",
21
21
  "compile": "tsc -p ./",
22
22
  "copy-assets": "node build.js",
23
23
  "lint": "eslint src --ext ts",
24
- "package": "bun run build && vsce package --no-dependencies -o dist/",
24
+ "package": "npx vsce package --no-dependencies -o dist/",
25
25
  "typecheck": "tsc --noEmit",
26
- "vscode:prepublish": "npm run compile && npm run copy-assets",
26
+ "vscode:prepublish": "bun run compile && bun run copy-assets",
27
27
  "watch": "tsc -w -p ./"
28
28
  },
29
29
  "contributes": {
@@ -31,17 +31,17 @@
31
31
  {
32
32
  "command": "super-agent.openChat",
33
33
  "title": "Open Super Agent Chat",
34
- "icon": "icon.png"
34
+ "icon": "icon.svg"
35
35
  },
36
36
  {
37
37
  "command": "super-agent.reconnect",
38
38
  "title": "Reconnect to CLI",
39
- "icon": "icon.png"
39
+ "icon": "icon.svg"
40
40
  },
41
41
  {
42
42
  "command": "super-agent.startServer",
43
43
  "title": "Start CLI Server",
44
- "icon": "icon.png"
44
+ "icon": "icon.svg"
45
45
  },
46
46
  {
47
47
  "command": "super-agent.mentionFile",
@@ -58,7 +58,7 @@
58
58
  "type": "webview",
59
59
  "id": "super-agent.chat",
60
60
  "name": "Chat",
61
- "icon": "icon.png"
61
+ "icon": "icon.svg"
62
62
  }
63
63
  ]
64
64
  },
@@ -67,7 +67,7 @@
67
67
  {
68
68
  "id": "super-agent-sidebar",
69
69
  "title": "Super Agent",
70
- "icon": "icon.png"
70
+ "icon": "icon.svg"
71
71
  }
72
72
  ]
73
73
  }
@@ -82,7 +82,7 @@
82
82
  "@types/node": "^20.17.6",
83
83
  "@types/vscode": "^1.80.0",
84
84
  "@types/ws": "^8.5.13",
85
- "@vscode/vsce": "^3.2.1",
85
+ "@vscode/vsce": "^3.7.1",
86
86
  "typescript": "^5.7.2"
87
87
  },
88
88
  "engines": {