@mcp-use/inspector 0.14.0-canary.0 → 0.14.0-canary.2
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 +10 -54
- package/dist/client/assets/base-Bnm339-a.js +2 -0
- package/dist/client/assets/{index-pqhVKjyB.js → base-RWAdy9P6.js} +33 -36
- package/dist/client/assets/browser-9kmymM9X.js +12 -0
- package/dist/client/assets/embeddings-C7cRBw1j.js +1 -0
- package/dist/client/assets/{index-CTUcNdQF.js → index-Apq2pBJl.js} +2 -2
- package/dist/client/assets/index-BsLLCsBP.js +1701 -0
- package/dist/client/assets/index-C2UfjD9L.js +4 -0
- package/dist/client/assets/index-C69r9Nt9.js +34 -0
- package/dist/client/assets/index-CtpnfKmY.js +7 -0
- package/dist/client/assets/{index-DorqJhTq.js → index-DIa0UgbZ.js} +1 -1
- package/dist/client/assets/index-DKR-Owed.js +70 -0
- package/dist/client/assets/{index-DvTyGyQK.js → index-DXrgZUfu.js} +3 -3
- package/dist/client/index.html +2 -2
- package/dist/server/{chunk-YLX7JQDX.js → chunk-BC23UV5D.js} +3 -1
- package/dist/server/{chunk-XGILHZOF.js → chunk-F7YWZTWJ.js} +4 -48
- package/dist/server/{chunk-JEKCWLHD.js → chunk-NOEIHEAG.js} +2 -2
- package/dist/server/{chunk-MCMZDGO6.js → chunk-Z5QIR3IS.js} +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/index.js +4 -4
- package/dist/server/middleware.js +4 -4
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +29 -6
- package/dist/server/shared-routes.d.ts.map +1 -1
- package/dist/server/shared-routes.js +2 -2
- package/dist/server/shared-static.d.ts.map +1 -1
- package/dist/server/shared-static.js +1 -1
- package/dist/server/shared-utils-browser.d.ts.map +1 -1
- package/dist/server/shared-utils-browser.js +1 -1
- package/package.json +2 -2
- package/dist/client/assets/browser-2Ez00ml2.js +0 -501
- package/dist/client/assets/display-A5IEINAP-D2Zkswj8.js +0 -17
- package/dist/client/assets/embeddings-SLmbAVWP.js +0 -1
- package/dist/client/assets/fs-u42MReIY.js +0 -1
- package/dist/client/assets/index-BFXh5irY.js +0 -1701
- package/dist/client/assets/index-DDOzs1PG.js +0 -20
- package/dist/client/assets/index-DF_VhD4l.js +0 -33
- package/dist/client/assets/index-DRz5BQNA.js +0 -1
- package/dist/client/assets/index-JiKw9JSs.js +0 -5
- package/dist/client/assets/index-ZoGs-72y.js +0 -7
- package/dist/client/assets/index-jWGWxByD.js +0 -71
- package/dist/client/assets/llms-Og3hdOaD.js +0 -2
- package/dist/client/assets/path-BX1ROoWV.js +0 -1
- package/dist/client/assets/path-MNZaYwxc.js +0 -1
- package/dist/client/assets/posthog-node-CuYhrq1Q.js +0 -1
- package/dist/client/assets/util-t-trnxQI.js +0 -1
- package/dist/client/assets/winston-CYVymxcI.js +0 -37
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DDOzs1PG.js","assets/index-BFXh5irY.js","assets/index-cMXsdFDY.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as a,a as k}from"./index-BFXh5irY.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-t-trnxQI.js").then(e=>e.u),[])).stripVTControlCharacters}catch{}try{y=(await k(()=>import("./index-JiKw9JSs.js"),[])).default}catch{}try{L=(await k(()=>import("./index-DDOzs1PG.js").then(e=>e.i),__vite__mapDeps([0,1,2]))).highlight}catch{}V&&(!y||!L)&&(J||(J=!0,console.warn(`
|
|
3
|
-
✨ For enhanced console output with colors and syntax highlighting, install:
|
|
4
|
-
|
|
5
|
-
npm install chalk cli-highlight
|
|
6
|
-
# or
|
|
7
|
-
pnpm add chalk cli-highlight
|
|
8
|
-
`)))})();var B=process.stdout.columns||120,p={gray:a(t=>y?.gray(t)??t,"gray"),bold:{white:a(t=>y?.bold?.white(t)??t,"white")},bgGray:a(t=>y?.bgGray(t)??t,"bgGray"),cyan:a(t=>y?.cyan(t)??t,"cyan"),dim:a(t=>y?.dim(t)??t,"dim"),red:a(t=>y?.red(t)??t,"red"),green:a(t=>y?.green(t)??t,"green")};function D(t,e){if(!L)return t;try{return L(t,{language:e??"javascript",ignoreIllegals:!0})}catch{return t}}a(D,"highlightCode");function w(t){return O?O(t):t.replace(/\x1b\[[0-9;]*m/g,"")}a(w,"stripAnsi");function G(t,e){if(w(t).length<=e)return[t];const o=[];let r=0,s="",c=0;for(;c<t.length;){const i=t[c];if(i==="\x1B"){let n=i;for(c++;c<t.length;){const d=t[c];if(n+=d,c++,d==="m")break}s+=n;continue}s+=i,r++,c++,r>=e&&(o.push(s),s="",r=0)}return s&&o.push(s),o}a(G,"wrapAnsiLine");function g(t,e,l,o=!1){const r=B;let s=t;if(l)try{s=D(t,l)}catch{}const c=s.split(`
|
|
9
|
-
`).flatMap(i=>G(i,r-4));if(console.log(p.gray("┌"+"─".repeat(r-2)+"┐")),e){const i=w(e),n=`${e} `,d=Math.max(0,r-4-i.length-2);console.log(p.gray("│ ")+p.bold.white(n)+" ".repeat(d)+p.gray(" │")),console.log(p.gray("├"+"─".repeat(r-2)+"┤"))}c.forEach(i=>{const n=w(i),d=Math.max(0,r-4-n.length),$=o?p.bgGray(i+" ".repeat(d)):i+" ".repeat(d);console.log(p.gray("│ ")+$+p.gray(" │"))}),console.log(p.gray("└"+"─".repeat(r-2)+"┘"))}a(g,"printBox");function H(t){if(typeof t=="object"&&t!==null&&"code"in t){const e=t;return typeof e.code=="string"?e.code:null}return null}a(H,"extractCodeFromToolInput");function I(t){if(typeof t!="object"||t===null)return!1;const e=t;return"result"in e&&"logs"in e&&Array.isArray(e.logs)&&"execution_time"in e&&typeof e.execution_time=="number"&&"error"in e&&(typeof e.error=="string"||e.error===null)}a(I,"isExecuteCodeResult");function N(t){try{if(typeof t=="string"){const e=JSON.parse(t);if(I(e))return e}if(I(t))return t}catch{}return null}a(N,"parseExecuteCodeResult");function _(t){return t==null?"null":typeof t=="object"?JSON.stringify(t,null,2):String(t)}a(_,"renderContent");function W(t){if(typeof t=="object"&&t!==null&&"input"in t){const e=t;if(typeof e.input=="string")try{return JSON.parse(e.input)}catch{return e.input}}return t}a(W,"unwrapToolInput");function q(t){const e=t.name||"unknown";let l=t.data?.input||{};l=W(l);const o=H(l);if(o){g(o,`${e} - input`,"javascript",!1);const r={...l};delete r.code,Object.keys(r).length>0&&g(_(r),"Other Parameters","json",!1)}else g(_(l),`${e} - input`,"json",!1)}a(q,"handleToolStart");function K(t){try{if(typeof t=="object"&&t!==null&&"name"in t&&"content"in t){const e=t,l=(typeof e.name=="string"?e.name:null)||"unknown",r=e.lc_kwargs?.status||e.status||"unknown";let s=e.content;if(typeof s=="string")try{s=JSON.parse(s)}catch{}return{toolName:l,status:r,content:s}}}catch{}return null}a(K,"extractToolMessageContent");function P(t,e,l){const o=[];if(e&&(e.total_tools!==void 0&&o.push(`Total tools: ${e.total_tools}`),e.namespaces&&e.namespaces.length>0&&o.push(`Namespaces: ${e.namespaces.join(", ")}`),e.result_count!==void 0&&o.push(`Results: ${e.result_count}`)),!Array.isArray(t)||t.length===0){const i=l?`No tools found for query "${l}"`:"(no tools found)";return o.length>0?`${o.join(`
|
|
10
|
-
`)}
|
|
11
|
-
|
|
12
|
-
${i}`:i}const r={};for(const i of t){const n=i.server||"unknown";r[n]||(r[n]=[]),r[n].push(i)}const s=[];e&&(e.total_tools!==void 0&&s.push(`Total tools: ${e.total_tools}`),e.namespaces&&e.namespaces.length>0&&s.push(`Namespaces: ${e.namespaces.join(", ")}`),e.result_count!==void 0&&s.push(`Results: ${e.result_count}`),s.length>0&&s.push(""));const c=Object.keys(r).sort();for(let i=0;i<c.length;i++){const n=c[i],d=r[n],$=i===c.length-1,m=$?"└─":"├─";s.push(`${m} ${p.cyan(n)} (${d.length} tools)`);for(let j=0;j<d.length;j++){const A=d[j],R=j===d.length-1,E=$?" ":"│ ",u=`${E}${R?"└─":"├─"} ${A.name}`;if(s.push(u),A.description){const h=`${E}${R?" ":"│ "}`,C=w(h).length,v=Math.max(40,B-C-4),T=A.description.split(/(\s+)/),b=[];let x="";for(const M of T){const F=x+M;w(F).length<=v?x=F:(x&&b.push(x.trimEnd()),x=M.trimStart())}x&&b.push(x.trimEnd());for(const M of b)s.push(`${h}${p.dim(M)}`)}}}return s.join(`
|
|
13
|
-
`)}a(P,"formatSearchToolsAsTree");function z(t){const e=t.data?.output,l=K(e);if(l){const{toolName:c,status:i,content:n}=l;if(c==="execute_code"){let S=n;if(typeof n=="object"&&n!==null&&"content"in n){const f=n.content;Array.isArray(f)&&f.length>0&&f[0].type==="text"&&f[0].text&&(S=f[0].text)}const u=N(S);if(u){const h=`${u.execution_time?Math.round(u.execution_time*1e3):0}ms`,v=u.error!==null&&u.error!==void 0&&u.error!==""?p.red("error"):p.green("success"),T=`${c} - ${v} - ${h}`;if(u.result!==null&&u.result!==void 0){const b=_(u.result),x=typeof u.result=="object"?"json":void 0;g(b,T,x,!1)}else g("(no result)",T,void 0,!1);u.logs&&u.logs.length>0&&g(u.logs.join(`
|
|
14
|
-
`),"Logs",void 0,!1),u.error&&g(u.error,p.red("Error"),void 0,!1);return}}if(c==="search_tools"){const u=t.data?.input?.query;let f=n;if(typeof n=="object"&&n!==null&&!Array.isArray(n)&&"content"in n){const h=n.content;if(Array.isArray(h)&&h.length>0&&h[0].type==="text"&&h[0].text)try{f=JSON.parse(h[0].text)}catch{f=h[0].text}}if(typeof f=="object"&&f!==null&&!Array.isArray(f)&&"results"in f&&Array.isArray(f.results)){const h=f.results,v=f.meta,T=P(h,v,u),x=`${i==="success"?y.green("Success"):y.red("Error")}: ${c} - Result`;g(T,x,void 0,!1);return}if(Array.isArray(f)){const h=P(f,void 0,u),v=`${i==="success"?y.green("Success"):y.red("Error")}: ${c} - Result`;g(h,v,void 0,!1);return}}const d=typeof n=="object"&&n!==null?n:null,$=d&&"isError"in d&&d.isError===!0||i==="error";let m=n;typeof n=="object"&&n!==null&&"content"in n&&(m=n.content,Array.isArray(m)&&m.length>0&&m[0].type==="text"&&m[0].text&&(m=m[0].text));const j=_(m),A=typeof m=="object"?"json":void 0,E=`${i==="success"?p.green("Success"):$?p.red("Error"):"Result"}: ${c} - Result`;g(j,E,A,!1);return}const o=N(e);if(o){const i=`${o.execution_time?Math.round(o.execution_time*1e3):0}ms`;if(o.result!==null&&o.result!==void 0){const n=_(o.result),d=typeof o.result=="object"?"json":void 0;g(n,`Result - ${i}`,d,!1)}o.logs&&o.logs.length>0&&g(o.logs.join(`
|
|
15
|
-
`),"Logs",void 0,!1),o.error&&g(o.error,p.red("Error"),void 0,!1);return}const r=_(e);g(r,"Result",typeof e=="object"?"json":void 0,!1)}a(z,"handleToolEnd");async function*Q(t){let e="",l=!0,o=!1;for await(const r of t){if(r.event==="on_tool_start")o&&(process.stdout.write(`
|
|
16
|
-
`),o=!1,l=!0),q(r);else if(r.event==="on_tool_end")z(r);else if(r.event==="on_chat_model_stream"&&r.data?.chunk?.text){const s=r.data.chunk.text;typeof s=="string"&&s.length>0&&(l&&(process.stdout.write(`
|
|
17
|
-
🤖 `),l=!1),process.stdout.write(s),e+=s,o=!0)}yield}return e}a(Q,"prettyStreamEvents");export{H as extractCodeFromToolInput,K as extractToolMessageContent,P as formatSearchToolsAsTree,z as handleToolEnd,q as handleToolStart,N as parseExecuteCodeResult,Q as prettyStreamEvents,g as printBox,_ as renderContent,W as unwrapToolInput};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as c,q as d}from"./index-pqhVKjyB.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function r(){throw new Error("fs.readFileSync is not available in browser environment")}function n(){throw new Error("fs.writeFileSync is not available in browser environment")}function e(){return!1}function i(){throw new Error("fs.readFile is not available in browser environment")}function o(){throw new Error("fs.writeFile is not available in browser environment")}function t(){throw new Error("fs.mkdir is not available in browser environment")}function a(){throw new Error("fs.readdir is not available in browser environment")}function s(){throw new Error("fs.stat is not available in browser environment")}function l(){throw new Error("fs.unlink is not available in browser environment")}function w(){throw new Error("fs.rmdir is not available in browser environment")}const f={readFileSync:r,writeFileSync:n,existsSync:e,readFile:i,writeFile:o,mkdir:t,readdir:a,stat:s,unlink:l,rmdir:w},b=Object.freeze(Object.defineProperty({__proto__:null,default:f,existsSync:e,mkdir:t,readFile:i,readFileSync:r,readdir:a,rmdir:w,stat:s,unlink:l,writeFile:o,writeFileSync:n},Symbol.toStringTag,{value:"Module"}));export{f as a,b as f,r};
|