@mcp-use/inspector 0.14.2 → 0.14.3-canary.1
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/cli.js +11 -3
- package/dist/server/{chunk-R5QBLPYB.js → chunk-7ILBF6EL.js} +1 -1
- package/dist/server/{chunk-OSJXVY3O.js → chunk-F2FWROJ2.js} +2 -2
- package/dist/server/{chunk-PUX4EJWH.js → chunk-O7EUTZ5E.js} +1 -1
- package/dist/server/{chunk-Z5QIR3IS.js → chunk-SFZ4CU6U.js} +10 -2
- package/dist/server/{chunk-GDZFYTRE.js → chunk-W5XB3CR5.js} +10 -2
- package/dist/server/{chunk-QCDOO2RF.js → chunk-Z2X4KZ3J.js} +3 -3
- package/dist/server/cli.js +5 -5
- package/dist/server/index.js +6 -6
- package/dist/server/middleware.js +6 -6
- package/dist/server/server.js +5 -5
- package/dist/server/shared-routes.js +3 -3
- package/dist/server/shared-static.js +2 -2
- package/dist/server/shared-utils-browser.d.ts.map +1 -1
- package/dist/server/shared-utils-browser.js +1 -1
- package/dist/server/shared-utils.d.ts.map +1 -1
- package/dist/server/shared-utils.js +1 -1
- package/dist/server/utils.d.ts.map +1 -1
- package/dist/server/utils.js +1 -1
- package/dist/web/assets/browser-Bwbzeqra.js +423 -0
- package/dist/web/assets/{client-D72CJBab.js → client-C_oXvQls.js} +6 -6
- package/dist/web/assets/{display-A5IEINAP-DWRfr5cj.js → display-A5IEINAP-jFT1ZrZv.js} +2 -2
- package/dist/web/assets/{embeddings-CVWvogFr.js → embeddings-C2wpTLdB.js} +1 -1
- package/dist/web/assets/{index-DdkxcTE2.js → index-5iKuctN5.js} +11 -11
- package/dist/web/assets/index-BAVnedrl.js +1783 -0
- package/dist/web/assets/index-CF8ue1E2.js +7 -0
- package/dist/web/assets/index-CzON1LlU.js +80 -0
- package/dist/web/assets/{index-D7_719w8.js → index-D8Ae6d9I.js} +1 -1
- package/dist/web/assets/{index-Cv4xpdR-.js → index-DAtu40Ij.js} +1 -1
- package/dist/web/assets/{index-CbPoLZEh.js → index-DEZvih5Y.js} +2 -2
- package/dist/web/assets/index-DlhqMiEp.css +1 -0
- package/dist/web/assets/{index-pQiGNlCj.js → index-YgJNrSvw.js} +6 -6
- package/dist/web/assets/{index-BDlTOMS5.js → index-oNOjaFj2.js} +14 -14
- package/dist/web/assets/{llms-xXlg9f0z.js → llms-DFXD7LY2.js} +1 -1
- package/dist/web/index.html +3 -3
- package/package.json +6 -6
- package/dist/web/assets/browser-BLnflEDD.js +0 -410
- package/dist/web/assets/index-BgQZjv_u.js +0 -40
- package/dist/web/assets/index-Bi42MNIH.js +0 -1753
- package/dist/web/assets/index-DdrkmeYH.js +0 -80
- package/dist/web/assets/index-G80eS8Oh.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{B as me,_ as v,g as Y,c as We,J as ze,d as Ge,e as _e,T as Ye,l as m,M as Xe,H as Ze,a as Qe,C as et,f as re,h as tt}from"./index-Bi42MNIH.js";var O,nt=(O=class extends me{mcpClient;_tools;constructor(e){super(),this.mcpClient=e,this.connected=!0,this._tools=this._createToolsList()}async connect(){this.connected=!0}async disconnect(){this.connected=!1}get publicIdentifier(){return{name:"code_mode",version:"1.0.0"}}_createToolsList(){return[{name:"execute_code",description:"Execute JavaScript/TypeScript code with access to MCP tools. This is the PRIMARY way to interact with MCP servers in code mode. Write code that discovers tools using search_tools(), calls tools as async functions (e.g., await github.get_pull_request(...)), processes data efficiently, and returns results. Use 'await' for async operations and 'return' to return values. Available in code: search_tools(), __tool_namespaces, and server.tool_name() functions.",inputSchema:{type:"object",properties:{code:{type:"string",description:"JavaScript/TypeScript code to execute. Use 'await' for async operations. Use 'return' to return a value. Available: search_tools(), server.tool_name(), __tool_namespaces"},timeout:{type:"number",description:"Execution timeout in milliseconds",default:3e4}},required:["code"]}},{name:"search_tools",description:"Search and discover available MCP tools across all servers. Use this to find out what tools are available before writing code. Returns tool information including names, descriptions, and schemas. Can filter by query and control detail level.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search query to filter tools by name or description",default:""},detail_level:{type:"string",description:"Detail level: 'names', 'descriptions', or 'full'",enum:["names","descriptions","full"],default:"full"}}}}]}get tools(){return this._tools}async initialize(){return this.toolsCache=this._tools,{capabilities:{},version:"1.0.0"}}async callTool(e,t){if(e==="execute_code"){const n=t.code,r=t.timeout||3e4,o=await this.mcpClient.executeCode(n,r);return{content:[{type:"text",text:JSON.stringify(o)}]}}else if(e==="search_tools"){const n=t.query||"",r=t.detail_level,o=await this.mcpClient.searchTools(n,r&&r in["names","descriptions","full"]?r:"full");return{content:[{type:"text",text:JSON.stringify(o)}]}}throw new Error(`Unknown tool: ${e}`)}},v(O,"CodeModeConnector"),O);function X(){throw new Error("fs.readFileSync is not available in browser environment")}function we(){throw new Error("fs.writeFileSync is not available in browser environment")}function ve(){return!1}function ge(){throw new Error("fs.readFile is not available in browser environment")}function ye(){throw new Error("fs.writeFile is not available in browser environment")}function be(){throw new Error("fs.mkdir is not available in browser environment")}function xe(){throw new Error("fs.readdir is not available in browser environment")}function Ce(){throw new Error("fs.stat is not available in browser environment")}function Se(){throw new Error("fs.unlink is not available in browser environment")}function Ee(){throw new Error("fs.rmdir is not available in browser environment")}const L={readFileSync:X,writeFileSync:we,existsSync:ve,readFile:ge,writeFile:ye,mkdir:be,readdir:xe,stat:Ce,unlink:Se,rmdir:Ee},rt=Object.freeze(Object.defineProperty({__proto__:null,default:L,existsSync:ve,mkdir:be,readFile:ge,readFileSync:X,readdir:xe,rmdir:Ee,stat:Ce,unlink:Se,writeFile:ye,writeFileSync:we},Symbol.toStringTag,{value:"Module"}));function Z(...s){return s.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/\/$/,"")}function Me(...s){return Z(...s)}function Q(s){const e=s.split("/");return e.pop(),e.join("/")||"/"}function q(s,e){const t=s.split("/");let n=t[t.length-1]||"";return e&&n.endsWith(e)&&(n=n.slice(0,-e.length)),n}function ee(s){const e=q(s),t=e.lastIndexOf(".");return t>0?e.slice(t):""}function Te(s){return s.replace(/\/+/g,"/")}function Pe(s){return s.startsWith("/")}function Oe(s){const e=s.startsWith("/")?"/":"",t=Q(s),n=q(s),r=ee(s),o=r?n.slice(0,-r.length):n;return{root:e,dir:t,base:n,ext:r,name:o}}const Ne="/",ke=":",$e={join:Z,resolve:Me,dirname:Q,basename:q,extname:ee,normalize:Te,isAbsolute:Pe,parse:Oe,sep:Ne,delimiter:ke},ot=Object.freeze(Object.defineProperty({__proto__:null,basename:q,default:$e,delimiter:ke,dirname:Q,extname:ee,isAbsolute:Pe,join:Z,normalize:Te,parse:Oe,resolve:Me,sep:Ne},Symbol.toStringTag,{value:"Module"})),st={},it="browser",ct="v18.0.0",at={node:"18.0.0"},lt=()=>"/",ut=(s,...e)=>queueMicrotask(()=>s(...e)),dt=!0,j={env:st,platform:it,version:ct,versions:at,cwd:lt,nextTick:ut,browser:dt};var T={exports:{}};function Ae(){throw new Error("child_process.spawn is not available in browser environment")}function Ie(){throw new Error("child_process.exec is not available in browser environment")}function Re(){throw new Error("child_process.execFile is not available in browser environment")}function Le(){throw new Error("child_process.fork is not available in browser environment")}function je(){throw new Error("child_process.execSync is not available in browser environment")}function qe(){throw new Error("child_process.spawnSync is not available in browser environment")}function Fe(){throw new Error("child_process.execFileSync is not available in browser environment")}const ht={spawn:Ae,exec:Ie,execFile:Re,fork:Le,execSync:je,spawnSync:qe,execFileSync:Fe},ft=Object.freeze(Object.defineProperty({__proto__:null,default:ht,exec:Ie,execFile:Re,execFileSync:Fe,execSync:je,fork:Le,spawn:Ae,spawnSync:qe},Symbol.toStringTag,{value:"Module"})),pt=Y(ft),Be=Y(ot),De=Y(rt);var D,oe;function mt(){if(oe)return D;oe=1;var s={};D=r,r.sync=o;var e=De;function t(i,a){var l=a.pathExt!==void 0?a.pathExt:s.PATHEXT;if(!l||(l=l.split(";"),l.indexOf("")!==-1))return!0;for(var c=0;c<l.length;c++){var u=l[c].toLowerCase();if(u&&i.substr(-u.length).toLowerCase()===u)return!0}return!1}function n(i,a,l){return!i.isSymbolicLink()&&!i.isFile()?!1:t(a,l)}function r(i,a,l){e.stat(i,function(c,u){l(c,c?!1:n(u,i,a))})}function o(i,a){return n(e.statSync(i),i,a)}return D}var J,se;function _t(){if(se)return J;se=1,J=e,e.sync=t;var s=De;function e(o,i,a){s.stat(o,function(l,c){a(l,l?!1:n(c,i))})}function t(o,i){return n(s.statSync(o),i)}function n(o,i){return o.isFile()&&r(o,i)}function r(o,i){var a=o.mode,l=o.uid,c=o.gid,u=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),d=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),h=parseInt("100",8),f=parseInt("010",8),p=parseInt("001",8),y=h|f,_=a&p||a&f&&c===d||a&h&&l===u||a&y&&u===0;return _}return J}var U,ie;function wt(){if(ie)return U;ie=1;var s;globalThis.TESTING_WINDOWS?s=mt():s=_t(),U=e,e.sync=t;function e(n,r,o){if(typeof r=="function"&&(o=r,r={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,a){e(n,r||{},function(l,c){l?a(l):i(c)})})}s(n,r||{},function(i,a){i&&(i.code==="EACCES"||r&&r.ignoreErrors)&&(i=null,a=!1),o(i,a)})}function t(n,r){try{return s.sync(n,r||{})}catch(o){if(r&&r.ignoreErrors||o.code==="EACCES")return!1;throw o}}return U}var V,ce;function vt(){if(ce)return V;ce=1;var s={};const e=s.OSTYPE==="cygwin"||s.OSTYPE==="msys",t=Be,n=e?";":":",r=wt(),o=c=>Object.assign(new Error(`not found: ${c}`),{code:"ENOENT"}),i=(c,u)=>{const d=u.colon||n,h=c.match(/\//)||e&&c.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(u.path||s.PATH||"").split(d)],f=e?u.pathExt||s.PATHEXT||".EXE;.CMD;.BAT;.COM":"",p=e?f.split(d):[""];return e&&c.indexOf(".")!==-1&&p[0]!==""&&p.unshift(""),{pathEnv:h,pathExt:p,pathExtExe:f}},a=(c,u,d)=>{typeof u=="function"&&(d=u,u={}),u||(u={});const{pathEnv:h,pathExt:f,pathExtExe:p}=i(c,u),y=[],_=w=>new Promise((b,g)=>{if(w===h.length)return u.all&&y.length?b(y):g(o(c));const x=h[w],S=/^".*"$/.test(x)?x.slice(1,-1):x,P=t.join(S,c),B=!S&&/^\.[\\\/]/.test(c)?c.slice(0,2)+P:P;b(C(B,w,0))}),C=(w,b,g)=>new Promise((x,S)=>{if(g===f.length)return x(_(b+1));const P=f[g];r(w+P,{pathExt:p},(B,Ke)=>{if(!B&&Ke)if(u.all)y.push(w+P);else return x(w+P);return x(C(w,b,g+1))})});return d?_(0).then(w=>d(null,w),d):_(0)},l=(c,u)=>{u=u||{};const{pathEnv:d,pathExt:h,pathExtExe:f}=i(c,u),p=[];for(let y=0;y<d.length;y++){const _=d[y],C=/^".*"$/.test(_)?_.slice(1,-1):_,w=t.join(C,c),b=!C&&/^\.[\\\/]/.test(c)?c.slice(0,2)+w:w;for(let g=0;g<h.length;g++){const x=b+h[g];try{if(r.sync(x,{pathExt:f}))if(u.all)p.push(x);else return x}catch{}}}if(u.all&&p.length)return p;if(u.nothrow)return null;throw o(c)};return V=a,a.sync=l,V}var R={exports:{}},ae;function gt(){if(ae)return R.exports;ae=1;var s={};const e=(t={})=>{const n=t.env||s;return(t.platform||"browser")!=="win32"?"PATH":Object.keys(n).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};return R.exports=e,R.exports.default=e,R.exports}var H,le;function yt(){if(le)return H;le=1;var s={};const e=Be,t=vt(),n=gt();function r(i,a){const l=i.options.env||s,c=process.cwd(),u=i.options.cwd!=null,d=u&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(i.options.cwd)}catch{}let h;try{h=t.sync(i.command,{path:l[n({env:l})],pathExt:a?e.delimiter:void 0})}catch{}finally{d&&process.chdir(c)}return h&&(h=e.resolve(u?i.options.cwd:"",h)),h}function o(i){return r(i)||r(i,!0)}return H=o,H}var K,ue;function bt(){if(ue)return K;ue=1,yt();function s(t){return t}function e(t,n,r){n&&!Array.isArray(n)&&(r=n,n=null),n=n?n.slice(0):[],r=Object.assign({},r);const o={command:t,args:n,options:r,file:void 0,original:{command:t,args:n}};return r.shell?o:o}return K=e,K}var W,de;function xt(){if(de)return W;de=1;function s(r,o){return Object.assign(new Error(`${o} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${o} ${r.command}`,path:r.command,spawnargs:r.args})}function e(r,o){}function t(r,o){return null}function n(r,o){return null}return W={hookChildProcess:e,verifyENOENT:t,verifyENOENTSync:n,notFoundError:s},W}var he;function Ct(){if(he)return T.exports;he=1;const s=pt,e=bt(),t=xt();function n(o,i,a){const l=e(o,i,a),c=s.spawn(l.command,l.args,l.options);return t.hookChildProcess(c,l),c}function r(o,i,a){const l=e(o,i,a),c=s.spawnSync(l.command,l.args,l.options);return c.error=c.error||t.verifyENOENTSync(c.status,l),c}return T.exports=n,T.exports.spawn=n,T.exports.sync=r,T.exports._parse=e,T.exports._enoent=t,T.exports}var St=Ct();const Et=We(St);class Mt{constructor(){console.warn("PassThrough stream is not available in browser environment")}}class Tt{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;const e=this._buffer.indexOf(`
|
|
1
|
+
import{bj as me,_ as w,bk as Y,bl as We,bm as ze,bn as Ge,bo as _e,bp as Ye,bq as m,br as Xe,bs as Ze,a as Qe,bt as et,bu as re,bv as tt}from"./index-BAVnedrl.js";var O,nt=(O=class extends me{mcpClient;_tools;constructor(e){super(),this.mcpClient=e,this.connected=!0,this._tools=this._createToolsList()}async connect(){this.connected=!0}async disconnect(){this.connected=!1}get publicIdentifier(){return{name:"code_mode",version:"1.0.0"}}_createToolsList(){return[{name:"execute_code",description:"Execute JavaScript/TypeScript code with access to MCP tools. This is the PRIMARY way to interact with MCP servers in code mode. Write code that discovers tools using search_tools(), calls tools as async functions (e.g., await github.get_pull_request(...)), processes data efficiently, and returns results. Use 'await' for async operations and 'return' to return values. Available in code: search_tools(), __tool_namespaces, and server.tool_name() functions.",inputSchema:{type:"object",properties:{code:{type:"string",description:"JavaScript/TypeScript code to execute. Use 'await' for async operations. Use 'return' to return a value. Available: search_tools(), server.tool_name(), __tool_namespaces"},timeout:{type:"number",description:"Execution timeout in milliseconds",default:3e4}},required:["code"]}},{name:"search_tools",description:"Search and discover available MCP tools across all servers. Use this to find out what tools are available before writing code. Returns tool information including names, descriptions, and schemas. Can filter by query and control detail level.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search query to filter tools by name or description",default:""},detail_level:{type:"string",description:"Detail level: 'names', 'descriptions', or 'full'",enum:["names","descriptions","full"],default:"full"}}}}]}get tools(){return this._tools}async initialize(){return this.toolsCache=this._tools,{capabilities:{},version:"1.0.0"}}async callTool(e,t){if(e==="execute_code"){const n=t.code,r=t.timeout||3e4,o=await this.mcpClient.executeCode(n,r);return{content:[{type:"text",text:JSON.stringify(o)}]}}else if(e==="search_tools"){const n=t.query||"",r=t.detail_level,o=await this.mcpClient.searchTools(n,r&&r in["names","descriptions","full"]?r:"full");return{content:[{type:"text",text:JSON.stringify(o)}]}}throw new Error(`Unknown tool: ${e}`)}},w(O,"CodeModeConnector"),O);function X(){throw new Error("fs.readFileSync is not available in browser environment")}function ve(){throw new Error("fs.writeFileSync is not available in browser environment")}function we(){return!1}function ge(){throw new Error("fs.readFile is not available in browser environment")}function be(){throw new Error("fs.writeFile is not available in browser environment")}function ye(){throw new Error("fs.mkdir is not available in browser environment")}function xe(){throw new Error("fs.readdir is not available in browser environment")}function Ce(){throw new Error("fs.stat is not available in browser environment")}function Se(){throw new Error("fs.unlink is not available in browser environment")}function Ee(){throw new Error("fs.rmdir is not available in browser environment")}const j={readFileSync:X,writeFileSync:ve,existsSync:we,readFile:ge,writeFile:be,mkdir:ye,readdir:xe,stat:Ce,unlink:Se,rmdir:Ee},rt=Object.freeze(Object.defineProperty({__proto__:null,default:j,existsSync:we,mkdir:ye,readFile:ge,readFileSync:X,readdir:xe,rmdir:Ee,stat:Ce,unlink:Se,writeFile:be,writeFileSync:ve},Symbol.toStringTag,{value:"Module"}));function Z(...s){return s.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/\/$/,"")}function Me(...s){return Z(...s)}function Q(s){const e=s.split("/");return e.pop(),e.join("/")||"/"}function q(s,e){const t=s.split("/");let n=t[t.length-1]||"";return e&&n.endsWith(e)&&(n=n.slice(0,-e.length)),n}function ee(s){const e=q(s),t=e.lastIndexOf(".");return t>0?e.slice(t):""}function Te(s){return s.replace(/\/+/g,"/")}function Pe(s){return s.startsWith("/")}function Oe(s){const e=s.startsWith("/")?"/":"",t=Q(s),n=q(s),r=ee(s),o=r?n.slice(0,-r.length):n;return{root:e,dir:t,base:n,ext:r,name:o}}const ke="/",Ne=":",$e={join:Z,resolve:Me,dirname:Q,basename:q,extname:ee,normalize:Te,isAbsolute:Pe,parse:Oe,sep:ke,delimiter:Ne},ot=Object.freeze(Object.defineProperty({__proto__:null,basename:q,default:$e,delimiter:Ne,dirname:Q,extname:ee,isAbsolute:Pe,join:Z,normalize:Te,parse:Oe,resolve:Me,sep:ke},Symbol.toStringTag,{value:"Module"})),st={},it="browser",ct="v18.0.0",at={node:"18.0.0"},lt=()=>"/",ut=(s,...e)=>queueMicrotask(()=>s(...e)),dt=!0,L={env:st,platform:it,version:ct,versions:at,cwd:lt,nextTick:ut,browser:dt};var T={exports:{}};function Ae(){throw new Error("child_process.spawn is not available in browser environment")}function Ie(){throw new Error("child_process.exec is not available in browser environment")}function Re(){throw new Error("child_process.execFile is not available in browser environment")}function je(){throw new Error("child_process.fork is not available in browser environment")}function Le(){throw new Error("child_process.execSync is not available in browser environment")}function qe(){throw new Error("child_process.spawnSync is not available in browser environment")}function Fe(){throw new Error("child_process.execFileSync is not available in browser environment")}const ht={spawn:Ae,exec:Ie,execFile:Re,fork:je,execSync:Le,spawnSync:qe,execFileSync:Fe},ft=Object.freeze(Object.defineProperty({__proto__:null,default:ht,exec:Ie,execFile:Re,execFileSync:Fe,execSync:Le,fork:je,spawn:Ae,spawnSync:qe},Symbol.toStringTag,{value:"Module"})),pt=Y(ft),Be=Y(ot),De=Y(rt);var D,oe;function mt(){if(oe)return D;oe=1;var s={};D=r,r.sync=o;var e=De;function t(i,a){var l=a.pathExt!==void 0?a.pathExt:s.PATHEXT;if(!l||(l=l.split(";"),l.indexOf("")!==-1))return!0;for(var c=0;c<l.length;c++){var u=l[c].toLowerCase();if(u&&i.substr(-u.length).toLowerCase()===u)return!0}return!1}function n(i,a,l){return!i.isSymbolicLink()&&!i.isFile()?!1:t(a,l)}function r(i,a,l){e.stat(i,function(c,u){l(c,c?!1:n(u,i,a))})}function o(i,a){return n(e.statSync(i),i,a)}return D}var J,se;function _t(){if(se)return J;se=1,J=e,e.sync=t;var s=De;function e(o,i,a){s.stat(o,function(l,c){a(l,l?!1:n(c,i))})}function t(o,i){return n(s.statSync(o),i)}function n(o,i){return o.isFile()&&r(o,i)}function r(o,i){var a=o.mode,l=o.uid,c=o.gid,u=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),d=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),h=parseInt("100",8),f=parseInt("010",8),p=parseInt("001",8),b=h|f,_=a&p||a&f&&c===d||a&h&&l===u||a&b&&u===0;return _}return J}var U,ie;function vt(){if(ie)return U;ie=1;var s;globalThis.TESTING_WINDOWS?s=mt():s=_t(),U=e,e.sync=t;function e(n,r,o){if(typeof r=="function"&&(o=r,r={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,a){e(n,r||{},function(l,c){l?a(l):i(c)})})}s(n,r||{},function(i,a){i&&(i.code==="EACCES"||r&&r.ignoreErrors)&&(i=null,a=!1),o(i,a)})}function t(n,r){try{return s.sync(n,r||{})}catch(o){if(r&&r.ignoreErrors||o.code==="EACCES")return!1;throw o}}return U}var V,ce;function wt(){if(ce)return V;ce=1;var s={};const e=s.OSTYPE==="cygwin"||s.OSTYPE==="msys",t=Be,n=e?";":":",r=vt(),o=c=>Object.assign(new Error(`not found: ${c}`),{code:"ENOENT"}),i=(c,u)=>{const d=u.colon||n,h=c.match(/\//)||e&&c.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(u.path||s.PATH||"").split(d)],f=e?u.pathExt||s.PATHEXT||".EXE;.CMD;.BAT;.COM":"",p=e?f.split(d):[""];return e&&c.indexOf(".")!==-1&&p[0]!==""&&p.unshift(""),{pathEnv:h,pathExt:p,pathExtExe:f}},a=(c,u,d)=>{typeof u=="function"&&(d=u,u={}),u||(u={});const{pathEnv:h,pathExt:f,pathExtExe:p}=i(c,u),b=[],_=v=>new Promise((y,g)=>{if(v===h.length)return u.all&&b.length?y(b):g(o(c));const x=h[v],S=/^".*"$/.test(x)?x.slice(1,-1):x,P=t.join(S,c),B=!S&&/^\.[\\\/]/.test(c)?c.slice(0,2)+P:P;y(C(B,v,0))}),C=(v,y,g)=>new Promise((x,S)=>{if(g===f.length)return x(_(y+1));const P=f[g];r(v+P,{pathExt:p},(B,He)=>{if(!B&&He)if(u.all)b.push(v+P);else return x(v+P);return x(C(v,y,g+1))})});return d?_(0).then(v=>d(null,v),d):_(0)},l=(c,u)=>{u=u||{};const{pathEnv:d,pathExt:h,pathExtExe:f}=i(c,u),p=[];for(let b=0;b<d.length;b++){const _=d[b],C=/^".*"$/.test(_)?_.slice(1,-1):_,v=t.join(C,c),y=!C&&/^\.[\\\/]/.test(c)?c.slice(0,2)+v:v;for(let g=0;g<h.length;g++){const x=y+h[g];try{if(r.sync(x,{pathExt:f}))if(u.all)p.push(x);else return x}catch{}}}if(u.all&&p.length)return p;if(u.nothrow)return null;throw o(c)};return V=a,a.sync=l,V}var R={exports:{}},ae;function gt(){if(ae)return R.exports;ae=1;var s={};const e=(t={})=>{const n=t.env||s;return(t.platform||"browser")!=="win32"?"PATH":Object.keys(n).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};return R.exports=e,R.exports.default=e,R.exports}var K,le;function bt(){if(le)return K;le=1;var s={};const e=Be,t=wt(),n=gt();function r(i,a){const l=i.options.env||s,c=process.cwd(),u=i.options.cwd!=null,d=u&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(i.options.cwd)}catch{}let h;try{h=t.sync(i.command,{path:l[n({env:l})],pathExt:a?e.delimiter:void 0})}catch{}finally{d&&process.chdir(c)}return h&&(h=e.resolve(u?i.options.cwd:"",h)),h}function o(i){return r(i)||r(i,!0)}return K=o,K}var H,ue;function yt(){if(ue)return H;ue=1,bt();function s(t){return t}function e(t,n,r){n&&!Array.isArray(n)&&(r=n,n=null),n=n?n.slice(0):[],r=Object.assign({},r);const o={command:t,args:n,options:r,file:void 0,original:{command:t,args:n}};return r.shell?o:o}return H=e,H}var W,de;function xt(){if(de)return W;de=1;function s(r,o){return Object.assign(new Error(`${o} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${o} ${r.command}`,path:r.command,spawnargs:r.args})}function e(r,o){}function t(r,o){return null}function n(r,o){return null}return W={hookChildProcess:e,verifyENOENT:t,verifyENOENTSync:n,notFoundError:s},W}var he;function Ct(){if(he)return T.exports;he=1;const s=pt,e=yt(),t=xt();function n(o,i,a){const l=e(o,i,a),c=s.spawn(l.command,l.args,l.options);return t.hookChildProcess(c,l),c}function r(o,i,a){const l=e(o,i,a),c=s.spawnSync(l.command,l.args,l.options);return c.error=c.error||t.verifyENOENTSync(c.status,l),c}return T.exports=n,T.exports.spawn=n,T.exports.sync=r,T.exports._parse=e,T.exports._enoent=t,T.exports}var St=Ct();const Et=We(St);class Mt{constructor(){console.warn("PassThrough stream is not available in browser environment")}}class Tt{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;const e=this._buffer.indexOf(`
|
|
2
2
|
`);if(e===-1)return null;const t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),Pt(t)}clear(){this._buffer=void 0}}function Pt(s){return ze.parse(JSON.parse(s))}function Ot(s){return JSON.stringify(s)+`
|
|
3
|
-
`}const
|
|
3
|
+
`}const kt=["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function Nt(){const s={};for(const e of kt){const t=L.env[e];t!==void 0&&(t.startsWith("()")||(s[e]=t))}return s}class $t{constructor(e){this._readBuffer=new Tt,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new Mt)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,t)=>{this._process=Et(this._serverParams.command,this._serverParams.args??[],{env:{...Nt(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:L.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",n=>{t(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{const e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){const e=this._process;this._process=void 0;const t=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([t,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([t,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(t=>{if(!this._process?.stdin)throw new Error("Not connected");const n=Ot(e);this._process.stdin.write(n)?t():this._process.stdin.once("drain",t)})}}var At={},k,te=(k=class{client;_connecting=!1;constructor(e){this.client=e}async ensureServersConnected(){const e=this.client.getServerNames(),t=Object.keys(this.client.getAllActiveSessions()),n=e.filter(r=>!t.includes(r));if(n.length>0&&!this._connecting){this._connecting=!0;try{m.debug(`Connecting to configured servers for code execution: ${n.join(", ")}`),await this.client.createAllSessions()}finally{this._connecting=!1}}else if(n.length>0&&this._connecting){m.debug("Waiting for ongoing server connection...");const r=Date.now();for(;this._connecting&&Date.now()-r<5e3;)await new Promise(o=>setTimeout(o,100))}}getToolNamespaces(){const e=[],t=this.client.getAllActiveSessions();for(const[n,r]of Object.entries(t))if(n!=="code_mode")try{const o=r.connector;let i;try{i=o.tools}catch(a){m.warn(`Tools not available for server ${n}: ${a}`);continue}if(!i||i.length===0)continue;e.push({serverName:n,tools:i,session:r})}catch(o){m.warn(`Failed to load tools for server ${n}: ${o}`)}return e}createSearchToolsFunction(){return async(e="",t="full")=>{const n=[],r=new Set,o=e.toLowerCase(),i=this.client.getAllActiveSessions();for(const[l,c]of Object.entries(i))if(l!=="code_mode")try{const u=c.connector.tools;u&&u.length>0&&r.add(l);for(const d of u)t==="names"?n.push({name:d.name,server:l}):t==="descriptions"?n.push({name:d.name,server:l,description:d.description}):n.push({name:d.name,server:l,description:d.description,input_schema:d.inputSchema})}catch(u){m.warn(`Failed to search tools in server ${l}: ${u}`)}let a=n;return e&&(a=n.filter(l=>{const c=l.name.toLowerCase().includes(o),u=l.description?.toLowerCase().includes(o),d=l.server.toLowerCase().includes(o);return c||u||d})),{meta:{total_tools:n.length,namespaces:Array.from(r).sort(),result_count:a.length},results:a}}}},w(k,"BaseCodeExecutor"),k),N,fe=(N=class extends te{e2bApiKey;codeExecSandbox=null;SandboxClass=null;timeoutMs;constructor(e,t){super(e),this.e2bApiKey=t.apiKey,this.timeoutMs=t.timeoutMs??3e5}async ensureSandboxClass(){if(!this.SandboxClass)try{const e=await Qe(()=>import("@e2b/code-interpreter"),[]);this.SandboxClass=e.Sandbox}catch{throw new Error("@e2b/code-interpreter is not installed. The E2B code executor requires this optional dependency. Install it with: yarn add @e2b/code-interpreter")}}async getOrCreateCodeExecSandbox(){return this.codeExecSandbox?this.codeExecSandbox:(await this.ensureSandboxClass(),m.debug("Starting E2B sandbox for code execution..."),this.codeExecSandbox=await this.SandboxClass.create("base",{apiKey:this.e2bApiKey,timeoutMs:this.timeoutMs}),this.codeExecSandbox)}generateShim(e){let t=`
|
|
4
4
|
// MCP Bridge Shim
|
|
5
5
|
global.__callMcpTool = async (server, tool, args) => {
|
|
6
6
|
const id = Math.random().toString(36).substring(7);
|
|
@@ -78,10 +78,10 @@ ${this.generateShim(l)}
|
|
|
78
78
|
process.exit(1);
|
|
79
79
|
}
|
|
80
80
|
})();
|
|
81
|
-
`,d=`exec_${Date.now()}.js`;await a.files.write(d,u);const h=await a.commands.run(`node ${d}`,{timeoutMs:t,onStdout:
|
|
82
|
-
`);for(const
|
|
81
|
+
`,d=`exec_${Date.now()}.js`;await a.files.write(d,u);const h=await a.commands.run(`node ${d}`,{timeoutMs:t,onStdout:w(async f=>{try{const p=f.split(`
|
|
82
|
+
`);for(const b of p)if(b.trim().startsWith('{"type":"__MCP_TOOL_CALL__"')){const _=JSON.parse(b);if(_.type==="__MCP_TOOL_CALL__")try{m.debug(`[E2B Bridge] Calling tool ${_.server}.${_.tool}`);const v=this.client.getAllActiveSessions()[_.server];if(!v)throw new Error(`Server ${_.server} not found`);const y=await v.connector.callTool(_.tool,_.args);let g=y;if(y.content&&y.content.length>0){const S=y.content[0];if(S.type==="text")try{g=JSON.parse(S.text)}catch{g=S.text}else g=S}const x=`/tmp/mcp_result_${_.id}.json`;await a.files.write(x,JSON.stringify({data:g}))}catch(C){m.error(`[E2B Bridge] Tool execution failed: ${C.message}`);const v=`/tmp/mcp_result_${_.id}.json`;await a.files.write(v,JSON.stringify({error:C.message||String(C)}))}}}catch{}},"onStdout")});if(i=[h.stdout,h.stderr].filter(Boolean),h.exitCode!==0)o=h.stderr||"Execution failed";else{const f=h.stdout,p="__MCP_RESULT_START__",b="__MCP_RESULT_END__",_=f.indexOf(p),C=f.indexOf(b);if(_!==-1&&C!==-1){const v=f.substring(_+p.length,C).trim();try{r=JSON.parse(v)}catch{r=v}i=i.map(y=>{let g=y.replace(new RegExp(p+"[\\s\\S]*?"+b),"[Result captured]");return g=g.split(`
|
|
83
83
|
`).filter(x=>!x.includes("__MCP_TOOL_CALL__")).join(`
|
|
84
|
-
`),g})}}}catch(a){o=a.message||String(a),o&&(o.includes("timeout")||o.includes("timed out"))&&(o="Script execution timed out")}return{result:r,logs:i,error:o,execution_time:(Date.now()-n)/1e3}}async cleanup(){if(this.codeExecSandbox)try{await this.codeExecSandbox.kill(),this.codeExecSandbox=null,m.debug("E2B code execution sandbox stopped")}catch(e){m.error("Failed to stop E2B code execution sandbox:",e)}}},
|
|
84
|
+
`),g})}}}catch(a){o=a.message||String(a),o&&(o.includes("timeout")||o.includes("timed out"))&&(o="Script execution timed out")}return{result:r,logs:i,error:o,execution_time:(Date.now()-n)/1e3}}async cleanup(){if(this.codeExecSandbox)try{await this.codeExecSandbox.kill(),this.codeExecSandbox=null,m.debug("E2B code execution sandbox stopped")}catch(e){m.error("Failed to stop E2B code execution sandbox:",e)}}},w(N,"E2BCodeExecutor"),N),E=null,z=!1;function ne(){return["node","vm"].join(":")}w(ne,"getVMModuleName");function F(){if(z)return E!==null;z=!0;try{const s=typeof re<"u"?re:null;if(s)return E=s(ne()),!0}catch{m.debug("node:vm module not available via require")}return!1}w(F,"tryLoadVM");async function Je(){if(E!==null||!z&&F())return!0;try{return E=await import(ne()),!0}catch{return m.debug("node:vm module not available in this environment (e.g., Deno)"),!1}}w(Je,"tryLoadVMAsync");function It(){return F(),E!==null}w(It,"isVMAvailable");var $,pe=($=class extends te{defaultTimeout;memoryLimitMb;constructor(e,t){super(e),this.defaultTimeout=t?.timeoutMs??3e4,this.memoryLimitMb=t?.memoryLimitMb,F()}async ensureVMLoaded(){if(E!==null)return;if(!await Je())throw new Error("node:vm module is not available in this environment. Please use E2B executor instead or run in a Node.js environment.")}async execute(e,t){const n=t??this.defaultTimeout;await this.ensureVMLoaded(),await this.ensureServersConnected();const r=[],o=Date.now();let i=null,a=null;try{const c=await this._buildContext(r),u=`
|
|
85
85
|
(async () => {
|
|
86
86
|
try {
|
|
87
87
|
${e}
|
|
@@ -89,4 +89,4 @@ ${this.generateShim(l)}
|
|
|
89
89
|
throw e;
|
|
90
90
|
}
|
|
91
91
|
})()
|
|
92
|
-
`;i=await new E.Script(u,{filename:"agent_code.js"}).runInNewContext(c,{timeout:n,displayErrors:!0})}catch(c){a=c.message||String(c),(c.code==="ERR_SCRIPT_EXECUTION_TIMEOUT"||c.message==="Script execution timed out."||typeof a=="string"&&(a.includes("timed out")||a.includes("timeout")))&&(a="Script execution timed out"),c.stack&&m.debug(`Code execution error stack: ${c.stack}`)}const l=(Date.now()-o)/1e3;return{result:i,logs:r,error:a,execution_time:l}}async _buildContext(e){const t=
|
|
92
|
+
`;i=await new E.Script(u,{filename:"agent_code.js"}).runInNewContext(c,{timeout:n,displayErrors:!0})}catch(c){a=c.message||String(c),(c.code==="ERR_SCRIPT_EXECUTION_TIMEOUT"||c.message==="Script execution timed out."||typeof a=="string"&&(a.includes("timed out")||a.includes("timeout")))&&(a="Script execution timed out"),c.stack&&m.debug(`Code execution error stack: ${c.stack}`)}const l=(Date.now()-o)/1e3;return{result:i,logs:r,error:a,execution_time:l}}async _buildContext(e){const t=w((...i)=>{e.push(i.map(a=>typeof a=="object"?JSON.stringify(a,null,2):String(a)).join(" "))},"logHandler"),n={console:{log:t,error:w((...i)=>{t("[ERROR]",...i)},"error"),warn:w((...i)=>{t("[WARN]",...i)},"warn"),info:t,debug:t},Object,Array,String,Number,Boolean,Date,Math,JSON,RegExp,Map,Set,Promise,parseInt,parseFloat,isNaN,isFinite,encodeURI,decodeURI,encodeURIComponent,decodeURIComponent,setTimeout,clearTimeout,search_tools:this.createSearchToolsFunction(),__tool_namespaces:[]},r={},o=this.getToolNamespaces();for(const{serverName:i,tools:a,session:l}of o){const c={};for(const u of a){const d=u.name;c[d]=async h=>{const f=await l.connector.callTool(d,h||{});if(f.content&&f.content.length>0){const p=f.content[0];if(p.type==="text")try{return JSON.parse(p.text)}catch{return p.text}return p}return f}}n[i]=c,r[i]=!0}return n.__tool_namespaces=Object.keys(r),E.createContext(n)}async cleanup(){}},w($,"VMCodeExecutor"),$),A,Rt=(A=class extends tt{serverParams;errlog;_transport=null;constructor(e,t=process.stderr){super(),this.serverParams=e,this.errlog=t}async establishConnection(){return this._transport=new $t(this.serverParams),this._transport.stderr&&typeof this._transport.stderr.pipe=="function"&&this._transport.stderr.pipe(this.errlog),m.debug(`${this.constructor.name} connected successfully`),this._transport}async closeConnection(e){if(this._transport)try{await this._transport.close()}catch(t){m.warn(`Error closing stdio transport: ${t}`)}finally{this._transport=null}}},w(A,"StdioConnectionManager"),A),I,jt=(I=class extends me{command;args;env;errlog;clientInfo;constructor({command:e="npx",args:t=[],env:n,errlog:r=L.stderr,...o}={}){super(o),this.command=e,this.args=t,this.env=n,this.errlog=r,this.clientInfo=o.clientInfo??{name:"stdio-connector",version:"1.0.0"}}async connect(){if(this.connected){m.debug("Already connected to MCP implementation");return}m.debug(`Connecting to MCP implementation via stdio: ${this.command}`);try{let e;if(this.env){e={};for(const[o,i]of Object.entries(L.env))i!==void 0&&(e[o]=i);Object.assign(e,this.env)}const t={command:this.command,args:this.args,env:e};this.connectionManager=new Rt(t,this.errlog);const n=await this.connectionManager.start(),r={...this.opts.clientOptions||{},capabilities:{...this.opts.clientOptions?.capabilities||{},roots:{listChanged:!0},...this.opts.onSampling??this.opts.samplingCallback?{sampling:{}}:{},...this.opts.elicitationCallback?{elicitation:{form:{},url:{}}}:{}}};this.client=new et(this.clientInfo,r),await this.client.connect(n),this.connected=!0,this.setupNotificationHandler(),this.setupRootsHandler(),this.setupSamplingHandler(),this.setupElicitationHandler(),m.debug(`Successfully connected to MCP implementation: ${this.command}`),this.trackConnectorInit({serverCommand:this.command,serverArgs:this.args,publicIdentifier:`${this.command} ${this.args.join(" ")}`})}catch(e){throw m.error(`Failed to connect to MCP implementation: ${e}`),await this.cleanupResources(),e}}get publicIdentifier(){return{type:"stdio","command&args":`${this.command} ${this.args.join(" ")}`}}},w(I,"StdioConnector"),I);function Ue(){return{name:"mcp-use",title:"mcp-use",version:_e(),description:"mcp-use is a complete TypeScript framework for building and using MCP",icons:[{src:"https://mcp-use.com/logo.png"}],websiteUrl:"https://mcp-use.com"}}w(Ue,"getDefaultClientInfo");function Ve(s){const e=Ue();if(!s||typeof s!="object")return e;const t=s;return!t.name||!t.version?e:{...e,...t}}w(Ve,"normalizeClientInfo");function G(s){const e=X();return JSON.parse(e)}w(G,"loadConfigFile");function Ke(s,e){const t=Ve(s.clientInfo);if("command"in s&&"args"in s)return new jt({command:s.command,args:s.args,env:s.env,clientInfo:t,...e});if("url"in s){const n=s.transport||"http";return new Ze(s.url,{headers:s.headers,authToken:s.auth_token||s.authToken,preferSse:s.preferSse||n==="sse",disableSseFallback:s.disableSseFallback,clientInfo:t,...e})}throw new Error("Cannot determine connector type from config")}w(Ke,"createConnectorFromConfig");var M,qt=(M=class extends Ge{static getPackageVersion(){return _e()}codeMode=!1;_codeExecutor=null;_customCodeExecutor=null;_codeExecutorConfig="vm";_executorOptions;_samplingCallback;_elicitationCallback;constructor(e,t){e?typeof e=="string"?super(G()):super(e):super();let n=!1,r="vm",o;t?.codeMode&&(typeof t.codeMode=="boolean"?n=t.codeMode:(n=t.codeMode.enabled,r=t.codeMode.executor??"vm",o=t.codeMode.executorOptions)),this.codeMode=n,this._codeExecutorConfig=r,this._executorOptions=o,this._samplingCallback=t?.onSampling??t?.samplingCallback,t?.samplingCallback&&!t?.onSampling&&console.warn('[MCPClient] The "samplingCallback" option is deprecated. Use "onSampling" instead.'),this._elicitationCallback=t?.elicitationCallback,this.codeMode&&this._setupCodeModeConnector(),this._trackClientInit()}_trackClientInit(){const e=Object.keys(this.config.mcpServers??{}),t=!!this._samplingCallback,n=!!this._elicitationCallback;Ye.getInstance().trackMCPClientInit({codeMode:this.codeMode,sandbox:!1,allCallbacks:t&&n,verify:!1,servers:e,numServers:e.length,isBrowser:!1}).catch(r=>m.debug(`Failed to track MCPClient init: ${r}`))}static fromDict(e,t){return new M(e,t)}static fromConfigFile(e,t){return new M(G(),t)}saveConfig(e){const t=$e.dirname(e);j.existsSync(t)||j.mkdirSync(t,{recursive:!0}),j.writeFileSync(e,JSON.stringify(this.config,null,2),"utf-8")}createConnectorFromConfig(e){return Ke(e,{samplingCallback:this._samplingCallback,elicitationCallback:this._elicitationCallback})}_setupCodeModeConnector(){m.debug("Code mode connector initialized as internal meta server");const e=new nt(this),t=new Xe(e);this.sessions.code_mode=t,this.activeSessions.push("code_mode")}_ensureCodeExecutor(){if(!this._codeExecutor){const e=this._codeExecutorConfig;if(e instanceof te)this._codeExecutor=e;else{if(typeof e=="function")throw this._customCodeExecutor=e,new Error("Custom executor function should be handled in executeCode");if(e==="e2b"){const t=this._executorOptions;if(t?.apiKey)this._codeExecutor=new fe(this,t);else{m.warn("E2B executor requires apiKey. Falling back to VM.");try{this._codeExecutor=new pe(this,this._executorOptions)}catch{throw new Error("VM executor is not available in this environment and E2B API key is not provided. Please provide an E2B API key or run in a Node.js environment.")}}}else try{this._codeExecutor=new pe(this,this._executorOptions)}catch{const n=this._executorOptions,r=n?.apiKey||At.E2B_API_KEY;if(r)m.info("VM executor not available in this environment. Falling back to E2B."),this._codeExecutor=new fe(this,{...n,apiKey:r});else throw new Error("VM executor is not available in this environment. Please provide an E2B API key via executorOptions or E2B_API_KEY environment variable, or run in a Node.js environment.")}}}return this._codeExecutor}async executeCode(e,t){if(!this.codeMode)throw new Error("Code execution mode is not enabled");return this._customCodeExecutor?this._customCodeExecutor(e,t):this._ensureCodeExecutor().execute(e,t)}async searchTools(e="",t="full"){if(!this.codeMode)throw new Error("Code execution mode is not enabled");return this._ensureCodeExecutor().createSearchToolsFunction()(e,t)}getServerNames(){const e=this.codeMode;return super.getServerNames().filter(t=>!e||t!=="code_mode")}async close(){this._codeExecutor&&(await this._codeExecutor.cleanup(),this._codeExecutor=null),await this.closeAllSessions()}},w(M,"MCPClient"),M);export{te as BaseCodeExecutor,fe as E2BCodeExecutor,qt as MCPClient,Xe as MCPSession,pe as VMCodeExecutor,It as isVMAvailable};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{_ as a,a as k}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DAtu40Ij.js","assets/index-BAVnedrl.js","assets/index-DlhqMiEp.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,a as k}from"./index-BAVnedrl.js";var y=null,L=null,O=null,J=!1,V=typeof process<"u"&&process.versions?.node;(async()=>{if(V)try{O=(await k(()=>import("./util-QmrWvrtn.js"),[])).stripVTControlCharacters}catch{}try{y=(await k(()=>import("./index-JiKw9JSs.js"),[])).default}catch{}try{L=(await k(()=>import("./index-DAtu40Ij.js").then(e=>e.i),__vite__mapDeps([0,1,2]))).highlight}catch{}V&&(!y||!L)&&(J||(J=!0,console.warn(`
|
|
3
3
|
✨ For enhanced console output with colors and syntax highlighting, install:
|
|
4
4
|
|
|
5
5
|
npm install chalk cli-highlight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as c,q as d}from"./index-
|
|
1
|
+
import{g as c,q as d}from"./index-CzON1LlU.js";var l={};c(l,{chunkArray:()=>u});const u=(r,s)=>r.reduce((a,n,o)=>{const e=Math.floor(o/s),t=a[e]||[];return a[e]=t.concat([n]),a},[]);var h={};c(h,{Embeddings:()=>i});var i=class{caller;constructor(r){this.caller=new d(r??{})}};export{i as E,l as c,h as e};
|