@smithery/cli 1.0.3 → 1.0.4

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
@@ -58,7 +58,7 @@ Calls to async() callback can have unexpected results.`),d=!0,function(y,b){y?c(
58
58
  `+Hi.red(">> ")+e),this.firstRender=!1,this.screen.render(t,n)}onSubmit(e){let t=e||this.rl.line;if(this.opt.suggestOnly&&!t&&(t=this.opt.default===null?"":this.opt.default),typeof this.opt.validate=="function"){let n=a=>{a!==!0?this.render(a||"Enter something, tab to autocomplete!"):this.onSubmitAfterValidation(t)},i;if(this.opt.suggestOnly)i=this.opt.validate(t,this.answers);else{let a=this.currentChoices.getChoice(this.selected);i=this.opt.validate(a,this.answers)}_oe(i)?i.then(n):n(i)}else this.onSubmitAfterValidation(t)}onSubmitAfterValidation(e){let t={};if(this.nbChoices<=this.selected&&!this.opt.suggestOnly){this.rl.write(e),this.search(e);return}if(this.opt.suggestOnly)t.value=e||this.rl.line,this.answer=e||this.rl.line,this.answerName=e||this.rl.line,this.shortAnswer=e||this.rl.line,this.rl.line="";else if(this.nbChoices)t=this.currentChoices.getChoice(this.selected),this.answer=t.value,this.answerName=t.name,this.shortAnswer=t.short;else{this.rl.write(e),this.search(e);return}moe(this.opt.filter,(n,i)=>{t.value=i,this.answer=i,this.opt.suggestOnly&&(this.shortAnswer=i),this.status="answered",this.render(),this.screen.done(),this.done(t.value)})(t.value)}search(e){this.selected=0,this.searchedOnce?(this.searching=!0,this.currentChoices=new Iv([]),this.render()):this.searchedOnce=!0,this.lastSearchTerm=e;let t;try{let n=this.opt.source(this.answers,e);t=Promise.resolve(n)}catch(n){t=Promise.reject(n)}return this.lastPromise=t,t.then(n=>{if(t!==this.lastPromise)return;this.currentChoices=new Iv(n);let i=n.filter(o=>yoe(o));this.nbChoices=i.length;let a=i.findIndex(o=>o===this.initialValue||o.value===this.initialValue);a>=0&&(this.selected=a),this.searching=!1,this.render()})}ensureSelectedInRange(){let e=Math.min(this.selected,this.nbChoices);this.selected=Math.max(e,0)}onKeypress(e){let t,n=e.key&&e.key.name||void 0;if(n==="tab"&&this.opt.suggestOnly){if(this.currentChoices.getChoice(this.selected)){this.rl.write(GC.cursorLeft);let i=this.currentChoices.getChoice(this.selected).value;this.rl.write(GC.cursorForward(i.length)),this.rl.line=i,this.render()}}else n==="down"||n==="n"&&e.key.ctrl?(t=this.nbChoices,this.selected=this.selected<t-1?this.selected+1:0,this.ensureSelectedInRange(),this.render(),voe.up(this.rl,2)):n==="up"||n==="p"&&e.key.ctrl?(t=this.nbChoices,this.selected=this.selected>0?this.selected-1:t-1,this.ensureSelectedInRange(),this.render()):(this.render(),this.lastSearchTerm!==this.rl.line&&this.search(this.rl.line))}};function goe(r,e){let t="",n=0;return r.forEach((i,a)=>{if(i.type==="separator"){n++,t+=" "+i+`
59
59
  `;return}if(i.disabled){n++,t+=" - "+i.name,t+=" ("+(typeof i.disabled=="string"?i.disabled:"Disabled")+")",t+=`
60
60
  `;return}let o=a-n===e,s=(o?hoe.pointer+" ":" ")+i.name;o&&(s=Hi.cyan(s)),t+=s+`
61
- `}),t.replace(/\n$/,"")}function _oe(r){return typeof r=="object"&&typeof r.then=="function"}ZC.exports=kv});var Dl=Z(K());var _n=Z(require("node:fs")),Pb=Z(require("node:os")),Ee=Z(require("node:path")),te=class te{static getConfigPath(e){let t=(e==null?void 0:e.toLowerCase())||"claude";return te.clientPaths[t]||Ee.default.join(Ee.default.dirname(te.configPath),"..",e||"claude",`${t}_config.json`)}static readConfig(e){try{let t=te.getConfigPath(e);return _n.default.existsSync(t)?{mcpServers:JSON.parse(_n.default.readFileSync(t,"utf8")).mcpServers||{}}:{mcpServers:{}}}catch{return{mcpServers:{}}}}static writeConfig(e,t){let n=te.getConfigPath(t),i=Ee.default.dirname(n);if(_n.default.existsSync(i)||_n.default.mkdirSync(i,{recursive:!0}),!e.mcpServers||typeof e.mcpServers!="object")throw new Error("Invalid config structure");_n.default.writeFileSync(n,JSON.stringify(e,null,2))}static isServerInstalled(e,t){let n=te.readConfig(t);return te.normalizeServerId(e)in n.mcpServers}static async installServer(e,t,n){let i=te.normalizeServerId(e),a=te.readConfig(n);a.mcpServers[i]=t,te.writeConfig(a,n)}static async uninstallServer(e,t){let n=te.normalizeServerId(e),i=te.readConfig(t);if(!i.mcpServers[n]){console.log(`Server ${n} not found in configuration`);return}delete i.mcpServers[n],te.writeConfig(i,t)}static getServerConfig(e,t){return te.readConfig(t).mcpServers[e]||null}static envVarsToArgs(e){return Object.entries(e).flatMap(([t,n])=>[`--${t.toLowerCase().replace(/_/g,"-")}`,n])}static normalizeServerId(e){if(e.startsWith("@")){let t=e.indexOf("/");if(t!==-1)return`${e.substring(0,t)}-${e.substring(t+1)}`}return e}static denormalizeServerId(e){if(e.startsWith("@")){let t=e.indexOf("-");if(t!==-1)return`${e.substring(0,t)}/${e.substring(t+1)}`}return e}static getInstalledServerIds(e){let t=te.readConfig(e);return Object.keys(t.mcpServers||{})}};(()=>{let e=Pb.default.homedir(),t={win32:{baseDir:process.env.APPDATA||Ee.default.join(e,"AppData","Roaming"),vscodePath:Ee.default.join("Code","User","globalStorage")},darwin:{baseDir:Ee.default.join(e,"Library","Application Support"),vscodePath:Ee.default.join("Code","User","globalStorage")},linux:{baseDir:process.env.XDG_CONFIG_HOME||Ee.default.join(e,".config"),vscodePath:Ee.default.join("Code/User/globalStorage")}},n=process.platform,{baseDir:i,vscodePath:a}=t[n],o={claude:Ee.default.join(i,"Claude","claude_desktop_config.json"),cline:Ee.default.join(i,a,"saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),"roo-cline":Ee.default.join(i,a,"rooveterinaryinc.roo-cline","settings","cline_mcp_settings.json")};te.configPath=o.claude,te.clientPaths=o})();var De=te;var Bb=Z(Rb());Bb.default.config();var Mb=process.env.REGISTRY_ENDPOINT||"https://registry.smithery.ai";async function Nb(r,e=[]){try{if(e.length===0)return[];let t=e.map(i=>la(i,r));return(await Promise.all(t)).filter(i=>i!==null)}catch(t){throw new Error(`Failed to resolve servers: ${t instanceof Error?t.message:String(t)}`)}}async function la(r,e){try{let t=De.isServerInstalled(r,e),n=await fetch(`${Mb}/servers/${r}`);if(!n.ok)return t?{id:r,name:r,connections:[],isInstalled:!0,client:e}:null;let i=await n.json();return{id:i.id,name:i.name,connections:i.connections,isInstalled:t,client:e}}catch{return null}}async function Lb(r,e,t="stdio"){try{let n={connectionType:t,config:e},a=await(await fetch(`${Mb}/servers/${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).text();if(!a)throw new Error("Empty response received from registry");try{return JSON.parse(a).result}catch(o){let s=o instanceof Error?o.message:"Unknown parsing error";throw new Error(`Invalid JSON response from registry: ${s}`)}}catch(n){return console.error("Error getting server configuration:",n),null}}var kC=require("node:child_process"),RC=require("node:util"),BC=Z(vt()),Ar=(0,RC.promisify)(kC.exec);async function ooe(r){if(!r)return!1;try{let e=process.platform,t={claude:"Claude"}[r]||r;if(e==="win32"){let{stdout:n}=await Ar(`tasklist /FI "IMAGENAME eq ${t}.exe" /NH`);return n.includes(`${t}.exe`)}else if(e==="darwin"){let{stdout:n}=await Ar(`pgrep -x "${t}"`);return!!n.trim()}else if(e==="linux"){let{stdout:n}=await Ar(`pgrep -f "${t.toLowerCase()}"`);return!!n.trim()}return!1}catch{return!1}}async function soe(r){let e={claude:"Claude",jan:"Jan"}[r]||r;try{let t=process.platform;t==="win32"?await Ar(`taskkill /F /IM "${e}.exe" && start "" "${e}.exe"`):t==="darwin"?await Ar(`killall "${e}" && open -a "${e}"`):t==="linux"&&await Ar(`pkill -f "${e.toLowerCase()}" && ${e.toLowerCase()}`),await new Promise(n=>setTimeout(n,2e3)),t==="win32"?await Ar(`start "" "${e}.exe"`):t==="darwin"?await Ar(`open -a "${e}"`):t==="linux"&&await Ar(e.toLowerCase()),console.log(`${e} has been restarted.`)}catch(t){console.error(`Failed to restart ${e}:`,t)}}async function Av(r){if(!r||!await ooe(r))return!1;let{shouldRestart:t}=await BC.default.prompt([{type:"confirm",name:"shouldRestart",message:`Would you like to restart the ${r} app to apply changes?`,default:!0}]);return t&&(console.log(`Restarting ${r} app...`),await soe(r)),t}var MC=require("node:child_process"),NC=require("node:util"),Pv=Z(vt()),jv=Z(K()),tbe=(0,NC.promisify)(MC.exec);async function LC(r){var i;let e=new Map;if((i=r.configSchema)!=null&&i.properties){let a=new Set(r.configSchema.required||[]);Object.entries(r.configSchema.properties).forEach(([o,s])=>{let u=s;e.set(o,{key:o,description:u.description||`Enter value for ${o}`,required:a.has(o),default:u.default,type:u.type})})}let t={};function n(a,o){if(!o)return a;if(a==="")switch(o){case"array":return[];case"number":case"integer":return null;default:return a}if(!a)return a;switch(o){case"boolean":return String(a).toLowerCase()==="true";case"number":return Number(a);case"integer":return Number.parseInt(String(a),10);case"array":return String(a).split(",").map(s=>s.trim()).filter(s=>s!=="");default:return a}}for(let a of e.values()){if(process.env[a.key]&&!a.required){let{reuseExisting:c}=await Pv.default.prompt([{type:"confirm",name:"reuseExisting",message:`Found ${a.key} in environment. Use it?`,default:!0}]);if(c){t[a.key]=n(process.env[a.key],a.type);continue}}let o=a.required?jv.default.red(" (required)"):jv.default.gray(" (optional)"),s=a.key.toLowerCase().includes("key")?"password":a.type==="boolean"?"confirm":a.type==="array"?"input":a.type==="number"||a.type==="integer"?"number":"input",{value:u}=await Pv.default.prompt([{type:s,name:"value",message:`${a.description}${o}${a.type==="array"?" (comma-separated)":""}`,default:a.default,mask:s==="password"?"*":void 0,validate:c=>a.required&&!c?!1:a.type==="number"||a.type==="integer"?!Number.isNaN(Number(c))||"Please enter a valid number":!0}]);(u!==void 0||a.default!==void 0)&&(t[a.key]=n(u??a.default,a.type))}return t}var bt=class{constructor(e=De){this.configManager=e}validateConnection(e){var n;let t=(n=e.connections)==null?void 0:n[0];if(!t)throw new Error("No connection configuration found");return t}async installServer(e,t){let n=this.validateConnection(e),i=await LC(n),a=await Lb(e.id,i,n.type);if(!a)throw new Error(`Unable to fetch server configuration for server ${e.id}`);await this.configManager.installServer(e.id,a,t),await Av(t)}async uninstallServer(e,t){try{await this.configManager.uninstallServer(e,t),console.log(`
61
+ `}),t.replace(/\n$/,"")}function _oe(r){return typeof r=="object"&&typeof r.then=="function"}ZC.exports=kv});var Dl=Z(K());var _n=Z(require("node:fs")),Pb=Z(require("node:os")),Ee=Z(require("node:path")),te=class te{static getConfigPath(e){let t=(e==null?void 0:e.toLowerCase())||"claude";return te.clientPaths[t]||Ee.default.join(Ee.default.dirname(te.configPath),"..",e||"claude",`${t}_config.json`)}static readConfig(e){try{let t=te.getConfigPath(e);return _n.default.existsSync(t)?{mcpServers:JSON.parse(_n.default.readFileSync(t,"utf8")).mcpServers||{}}:{mcpServers:{}}}catch{return{mcpServers:{}}}}static writeConfig(e,t){let n=te.getConfigPath(t),i=Ee.default.dirname(n);if(_n.default.existsSync(i)||_n.default.mkdirSync(i,{recursive:!0}),!e.mcpServers||typeof e.mcpServers!="object")throw new Error("Invalid config structure");_n.default.writeFileSync(n,JSON.stringify(e,null,2))}static isServerInstalled(e,t){let n=te.readConfig(t);return te.normalizeServerId(e)in n.mcpServers}static async installServer(e,t,n){let i=te.normalizeServerId(e),a=te.readConfig(n);a.mcpServers[i]=t,te.writeConfig(a,n)}static async uninstallServer(e,t){let n=te.normalizeServerId(e),i=te.readConfig(t);if(!i.mcpServers[n]){console.log(`Server ${n} not found in configuration`);return}delete i.mcpServers[n],te.writeConfig(i,t)}static getServerConfig(e,t){return te.readConfig(t).mcpServers[e]||null}static envVarsToArgs(e){return Object.entries(e).flatMap(([t,n])=>[`--${t.toLowerCase().replace(/_/g,"-")}`,n])}static normalizeServerId(e){if(e.startsWith("@")){let t=e.indexOf("/");if(t!==-1)return`${e.substring(0,t)}-${e.substring(t+1)}`}return e}static denormalizeServerId(e){if(e.startsWith("@")){let t=e.indexOf("-");if(t!==-1)return`${e.substring(0,t)}/${e.substring(t+1)}`}return e}static getInstalledServerIds(e){let t=te.readConfig(e);return Object.keys(t.mcpServers||{})}};(()=>{let e=Pb.default.homedir(),t={win32:{baseDir:process.env.APPDATA||Ee.default.join(e,"AppData","Roaming"),vscodePath:Ee.default.join("Code","User","globalStorage")},darwin:{baseDir:Ee.default.join(e,"Library","Application Support"),vscodePath:Ee.default.join("Code","User","globalStorage")},linux:{baseDir:process.env.XDG_CONFIG_HOME||Ee.default.join(e,".config"),vscodePath:Ee.default.join("Code/User/globalStorage")}},n=process.platform,{baseDir:i,vscodePath:a}=t[n],o={claude:Ee.default.join(i,"Claude","claude_desktop_config.json"),cline:Ee.default.join(i,a,"saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),"roo-cline":Ee.default.join(i,a,"rooveterinaryinc.roo-cline","settings","cline_mcp_settings.json")};te.configPath=o.claude,te.clientPaths=o})();var De=te;var Bb=Z(Rb());Bb.default.config();var Mb=process.env.REGISTRY_ENDPOINT||"https://registry.smithery.ai";async function Nb(r,e=[]){try{if(e.length===0)return[];let t=e.map(i=>la(i,r));return(await Promise.all(t)).filter(i=>i!==null)}catch(t){throw new Error(`Failed to resolve servers: ${t instanceof Error?t.message:String(t)}`)}}async function la(r,e){try{let t=De.isServerInstalled(r,e),n=await fetch(`${Mb}/servers/${r}`);if(!n.ok)return t?{id:r,name:r,connections:[],isInstalled:!0,client:e}:null;let i=await n.json();return{id:i.qualifiedName,name:i.displayName,connections:i.connections,isInstalled:t,client:e}}catch{return null}}async function Lb(r,e,t="stdio"){try{let n={connectionType:t,config:e},i=await fetch(`${Mb}/servers/${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});try{return(await i.json()).result}catch(a){let o=a instanceof Error?a.message:"Unknown parsing error";throw new Error(`Invalid JSON response from registry: ${o}`)}}catch(n){return console.error("Error getting server configuration:",n),null}}var kC=require("node:child_process"),RC=require("node:util"),BC=Z(vt()),Ar=(0,RC.promisify)(kC.exec);async function ooe(r){if(!r)return!1;try{let e=process.platform,t={claude:"Claude"}[r]||r;if(e==="win32"){let{stdout:n}=await Ar(`tasklist /FI "IMAGENAME eq ${t}.exe" /NH`);return n.includes(`${t}.exe`)}else if(e==="darwin"){let{stdout:n}=await Ar(`pgrep -x "${t}"`);return!!n.trim()}else if(e==="linux"){let{stdout:n}=await Ar(`pgrep -f "${t.toLowerCase()}"`);return!!n.trim()}return!1}catch{return!1}}async function soe(r){let e={claude:"Claude",jan:"Jan"}[r]||r;try{let t=process.platform;t==="win32"?await Ar(`taskkill /F /IM "${e}.exe" && start "" "${e}.exe"`):t==="darwin"?await Ar(`killall "${e}" && open -a "${e}"`):t==="linux"&&await Ar(`pkill -f "${e.toLowerCase()}" && ${e.toLowerCase()}`),await new Promise(n=>setTimeout(n,2e3)),t==="win32"?await Ar(`start "" "${e}.exe"`):t==="darwin"?await Ar(`open -a "${e}"`):t==="linux"&&await Ar(e.toLowerCase()),console.log(`${e} has been restarted.`)}catch(t){console.error(`Failed to restart ${e}:`,t)}}async function Av(r){if(!r||!await ooe(r))return!1;let{shouldRestart:t}=await BC.default.prompt([{type:"confirm",name:"shouldRestart",message:`Would you like to restart the ${r} app to apply changes?`,default:!0}]);return t&&(console.log(`Restarting ${r} app...`),await soe(r)),t}var MC=require("node:child_process"),NC=require("node:util"),Pv=Z(vt()),jv=Z(K()),tbe=(0,NC.promisify)(MC.exec);async function LC(r){var i;let e=new Map;if((i=r.configSchema)!=null&&i.properties){let a=new Set(r.configSchema.required||[]);Object.entries(r.configSchema.properties).forEach(([o,s])=>{let u=s;e.set(o,{key:o,description:u.description||`Enter value for ${o}`,required:a.has(o),default:u.default,type:u.type})})}let t={};function n(a,o){if(!o)return a;if(a==="")switch(o){case"array":return[];case"number":case"integer":return null;default:return a}if(!a)return a;switch(o){case"boolean":return String(a).toLowerCase()==="true";case"number":return Number(a);case"integer":return Number.parseInt(String(a),10);case"array":return String(a).split(",").map(s=>s.trim()).filter(s=>s!=="");default:return a}}for(let a of e.values()){if(process.env[a.key]&&!a.required){let{reuseExisting:c}=await Pv.default.prompt([{type:"confirm",name:"reuseExisting",message:`Found ${a.key} in environment. Use it?`,default:!0}]);if(c){t[a.key]=n(process.env[a.key],a.type);continue}}let o=a.required?jv.default.red(" (required)"):jv.default.gray(" (optional)"),s=a.key.toLowerCase().includes("key")?"password":a.type==="boolean"?"confirm":a.type==="array"?"input":a.type==="number"||a.type==="integer"?"number":"input",{value:u}=await Pv.default.prompt([{type:s,name:"value",message:`${a.description}${o}${a.type==="array"?" (comma-separated)":""}`,default:a.default,mask:s==="password"?"*":void 0,validate:c=>a.required&&!c?!1:a.type==="number"||a.type==="integer"?!Number.isNaN(Number(c))||"Please enter a valid number":!0}]);(u!==void 0||a.default!==void 0)&&(t[a.key]=n(u??a.default,a.type))}return t}var bt=class{constructor(e=De){this.configManager=e}validateConnection(e){var n;let t=(n=e.connections)==null?void 0:n[0];if(!t)throw new Error("No connection configuration found");return t}async installServer(e,t){let n=this.validateConnection(e),i=await LC(n),a=await Lb(e.id,i,n.type);if(!a)throw new Error(`Unable to fetch server configuration for server ${e.id}`);await this.configManager.installServer(e.id,a,t),await Av(t)}async uninstallServer(e,t){try{await this.configManager.uninstallServer(e,t),console.log(`
62
62
  Uninstalled ${e}`),await Av(t)}catch(n){throw console.error("Failed to uninstall server:",n),n}}};var pe=["claude","cline","roo-cline"];var uoe=new bt;async function UC(r,e){e&&!pe.includes(e)&&(console.error(Dl.default.red(`Invalid client: ${e}
63
63
  Valid clients are: ${pe.join(", ")}`)),process.exit(1));let t=await la(r,e);t||(console.error(Dl.default.red(`Server '${r}' not found in registry`)),process.exit(1)),await uoe.installServer(t,e),console.log(Dl.default.green(`\u2713 Successfully installed package '${r}' for ${e}`))}var Jt=Z(K()),WC=Z(vt());var coe=new bt;async function VC(r,e){try{e&&!pe.includes(e)&&(console.error(Jt.default.red(`Invalid client: ${e}
64
64
  Valid clients are: ${pe.join(", ")}`)),process.exit(1)),r||(console.error(Jt.default.red("Error: Server ID is required")),console.log("Usage: @smithery/cli uninstall <server-id>"),process.exit(1));let{confirmUninstall:t}=await WC.default.prompt([{type:"confirm",name:"confirmUninstall",message:`Are you sure you want to uninstall ${r}?`,default:!1}]);if(!t){console.log("Uninstallation cancelled.");return}await coe.uninstallServer(r,e),console.log(Jt.default.green(`
@@ -5,7 +5,8 @@ import path from "node:path";
5
5
  export class ConfigManager {
6
6
  static getConfigPath(client) {
7
7
  const normalizedClient = client?.toLowerCase() || "claude";
8
- return ConfigManager.clientPaths[normalizedClient] || path.join(path.dirname(ConfigManager.configPath), "..", client || "claude", `${normalizedClient}_config.json`);
8
+ return (ConfigManager.clientPaths[normalizedClient] ||
9
+ path.join(path.dirname(ConfigManager.configPath), "..", client || "claude", `${normalizedClient}_config.json`));
9
10
  }
10
11
  static readConfig(client) {
11
12
  try {
@@ -95,16 +96,16 @@ export class ConfigManager {
95
96
  const platformPaths = {
96
97
  win32: {
97
98
  baseDir: process.env.APPDATA || path.join(homeDir, "AppData", "Roaming"),
98
- vscodePath: path.join("Code", "User", "globalStorage")
99
+ vscodePath: path.join("Code", "User", "globalStorage"),
99
100
  },
100
101
  darwin: {
101
102
  baseDir: path.join(homeDir, "Library", "Application Support"),
102
- vscodePath: path.join("Code", "User", "globalStorage")
103
+ vscodePath: path.join("Code", "User", "globalStorage"),
103
104
  },
104
105
  linux: {
105
106
  baseDir: process.env.XDG_CONFIG_HOME || path.join(homeDir, ".config"),
106
- vscodePath: path.join("Code/User/globalStorage")
107
- }
107
+ vscodePath: path.join("Code/User/globalStorage"),
108
+ },
108
109
  };
109
110
  const platform = process.platform;
110
111
  const { baseDir, vscodePath } = platformPaths[platform];
@@ -112,7 +113,7 @@ export class ConfigManager {
112
113
  const clientPaths = {
113
114
  claude: path.join(baseDir, "Claude", "claude_desktop_config.json"),
114
115
  cline: path.join(baseDir, vscodePath, "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
115
- "roo-cline": path.join(baseDir, vscodePath, "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json")
116
+ "roo-cline": path.join(baseDir, vscodePath, "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"),
116
117
  };
117
118
  ConfigManager.configPath = clientPaths.claude;
118
119
  ConfigManager.clientPaths = clientPaths;
@@ -40,8 +40,8 @@ export async function resolveServer(serverId, client) {
40
40
  }
41
41
  const registryServer = await response.json();
42
42
  const resolvedServer = {
43
- id: registryServer.id,
44
- name: registryServer.name,
43
+ id: registryServer.qualifiedName,
44
+ name: registryServer.displayName,
45
45
  connections: registryServer.connections,
46
46
  isInstalled: isInstalled, // Use the checked installation status
47
47
  client: client,
@@ -65,12 +65,8 @@ export async function getServerConfiguration(serverId, configValues, connectionT
65
65
  },
66
66
  body: JSON.stringify(requestBody),
67
67
  });
68
- const text = await response.text();
69
- if (!text) {
70
- throw new Error("Empty response received from registry");
71
- }
72
68
  try {
73
- const parsed = JSON.parse(text);
69
+ const parsed = await response.json();
74
70
  return parsed.result;
75
71
  }
76
72
  catch (parseError) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithery/cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "type": "commonjs",
5
5
  "private": false,
6
6
  "homepage": "https://smithery.ai/",