@mcp-use/inspector 0.13.1-canary.0 → 0.13.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.
@@ -1,4 +1,4 @@
1
- import{F as Es,aK as Ra,aL as I,V as $a,U as Pa,y as $e,L as Jn,i as Xe,ad as Ea,ap as Ma,M as Na,I as Ms,J as Ns,B as Se,f as js,aM as ja,E as mn,aN as Kn,aO as Ua,aP as La,aQ as Da,K as Zn,aR as zn,aS as Fa,t as Ba,D as Gt}from"./index-B18K1oi4.js";import{c as Wa,j as qa,h as Ja,f as Us,S as Hn,J as Vn,R as Xn}from"./index-B9h0wA_l.js";import{k as Ka,m as Za,o as K,l as ee,i as Ls,n as J,d as At,s as Q,h as gn,q as za}from"./index-BDx3HgIR.js";import{J as Gn,c as Ha,p as Ds,m as at}from"./llms-CAvL3UTt.js";import"./embeddings-Dhc0WFm_.js";import"./index-Csl-S2aO.js";import"./index-DRz5BQNA.js";function Ge(t,e){return t.lc_error_code=e,t.message=`${t.message}
1
+ import{F as Es,aK as Ra,aL as I,V as $a,U as Pa,y as $e,L as Jn,i as Xe,ad as Ea,ap as Ma,M as Na,I as Ms,J as Ns,B as Se,f as js,aM as ja,E as mn,aN as Kn,aO as Ua,aP as La,aQ as Da,K as Zn,aR as zn,aS as Fa,t as Ba,D as Gt}from"./index-Dnlk3cN0.js";import{c as Wa,j as qa,h as Ja,f as Us,S as Hn,J as Vn,R as Xn}from"./index-JNCLaBht.js";import{k as Ka,m as Za,o as K,l as ee,i as Ls,n as J,d as At,s as Q,h as gn,q as za}from"./index-CTPvdefa.js";import{J as Gn,c as Ha,p as Ds,m as at}from"./llms-BLW_VGg4.js";import"./embeddings-B8aKgKJK.js";import"./index-DGjFeGIT.js";import"./index-DRz5BQNA.js";function Ge(t,e){return t.lc_error_code=e,t.message=`${t.message}
2
2
 
3
3
  Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/${e}/
4
4
  `,t}function O(t,e,n,s,r){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}function c(t,e,n,s){if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?s:n==="a"?s.call(t):s?s.value:e.get(t)}let Fs=function(){const{crypto:t}=globalThis;if(t?.randomUUID)return Fs=t.randomUUID.bind(t),t.randomUUID();const e=new Uint8Array(1),n=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,s=>(+s^n()&15>>+s/4).toString(16))};function Qt(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}const Yt=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){const e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)};class x extends Error{}class q extends x{constructor(e,n,s,r){super(`${q.makeMessage(e,n,s)}`),this.status=e,this.headers=r,this.requestID=r?.get("x-request-id"),this.error=n;const a=n;this.code=a?.code,this.param=a?.param,this.type=a?.type}static makeMessage(e,n,s){const r=n?.message?typeof n.message=="string"?n.message:JSON.stringify(n.message):n?JSON.stringify(n):s;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||"(no status code or body)"}static generate(e,n,s,r){if(!e||!r)return new Rt({message:s,cause:Yt(n)});const a=n?.error;return e===400?new Bs(e,a,s,r):e===401?new Ws(e,a,s,r):e===403?new qs(e,a,s,r):e===404?new Js(e,a,s,r):e===409?new Ks(e,a,s,r):e===422?new Zs(e,a,s,r):e===429?new zs(e,a,s,r):e>=500?new Hs(e,a,s,r):new q(e,a,s,r)}}class Y extends q{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class Rt extends q{constructor({message:e,cause:n}){super(void 0,void 0,e||"Connection error.",void 0),n&&(this.cause=n)}}class $t extends Rt{constructor({message:e}={}){super({message:e??"Request timed out."})}}class Bs extends q{}class Ws extends q{}class qs extends q{}class Js extends q{}class Ks extends q{}class Zs extends q{}class zs extends q{}class Hs extends q{}class Vs extends x{constructor(){super("Could not parse response content as the length limit was reached")}}class Xs extends x{constructor(){super("Could not parse response content as the request was rejected by the content filter")}}class Pe extends Error{constructor(e){super(e)}}const Va=/^[a-z][a-z0-9+.-]*:/i,Xa=t=>Va.test(t);let H=t=>(H=Array.isArray,H(t)),Qn=H;function Gs(t){return typeof t!="object"?{}:t??{}}function Ga(t){if(!t)return!0;for(const e in t)return!1;return!0}function Qa(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Wt(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}const Ya=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new x(`${t} must be an integer`);if(e<0)throw new x(`${t} must be a positive integer`);return e},ei=t=>{try{return JSON.parse(t)}catch{return}},Ke=t=>new Promise(e=>setTimeout(e,t)),Oe="6.10.0",ti=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function ni(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}const si=()=>{const t=ni();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oe,"X-Stainless-OS":es(Deno.build.os),"X-Stainless-Arch":Yn(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oe,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oe,"X-Stainless-OS":es(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Yn(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};const e=ri();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oe,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oe,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function ri(){if(typeof navigator>"u"||!navigator)return null;const t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(const{key:e,pattern:n}of t){const s=n.exec(navigator.userAgent);if(s){const r=s[1]||0,a=s[2]||0,i=s[3]||0;return{browser:e,version:`${r}.${a}.${i}`}}}return null}const Yn=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",es=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown");let ts;const ai=()=>ts??(ts=si());function ii(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function Qs(...t){const e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function Ys(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return Qs({start(){},async pull(n){const{done:s,value:r}=await e.next();s?n.close():n.enqueue(r)},async cancel(){await e.return?.()}})}function er(t){if(t[Symbol.asyncIterator])return t;const e=t.getReader();return{async next(){try{const n=await e.read();return n?.done&&e.releaseLock(),n}catch(n){throw e.releaseLock(),n}},async return(){const n=e.cancel();return e.releaseLock(),await n,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function oi(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}const e=t.getReader(),n=e.cancel();e.releaseLock(),await n}const ui=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)}),tr="RFC3986",nr=t=>String(t),ns={RFC1738:t=>String(t).replace(/%20/g,"+"),RFC3986:nr},li="RFC1738";let en=(t,e)=>(en=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),en(t,e));const re=(()=>{const t=[];for(let e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t})(),qt=1024,ci=(t,e,n,s,r)=>{if(t.length===0)return t;let a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(o){return"%26%23"+parseInt(o.slice(2),16)+"%3B"});let i="";for(let o=0;o<a.length;o+=qt){const l=a.length>=qt?a.slice(o,o+qt):a,u=[];for(let m=0;m<l.length;++m){let p=l.charCodeAt(m);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||r===li&&(p===40||p===41)){u[u.length]=l.charAt(m);continue}if(p<128){u[u.length]=re[p];continue}if(p<2048){u[u.length]=re[192|p>>6]+re[128|p&63];continue}if(p<55296||p>=57344){u[u.length]=re[224|p>>12]+re[128|p>>6&63]+re[128|p&63];continue}m+=1,p=65536+((p&1023)<<10|l.charCodeAt(m)&1023),u[u.length]=re[240|p>>18]+re[128|p>>12&63]+re[128|p>>6&63]+re[128|p&63]}i+=u.join("")}return i};function di(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function ss(t,e){if(H(t)){const n=[];for(let s=0;s<t.length;s+=1)n.push(e(t[s]));return n}return e(t)}const sr={brackets(t){return String(t)+"[]"},comma:"comma",indices(t,e){return String(t)+"["+e+"]"},repeat(t){return String(t)}},rr=function(t,e){Array.prototype.push.apply(t,H(e)?e:[e])};let rs;const j={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ci,encodeValuesOnly:!1,format:tr,formatter:nr,indices:!1,serializeDate(t){return(rs??(rs=Function.prototype.call.bind(Date.prototype.toISOString)))(t)},skipNulls:!1,strictNullHandling:!1};function pi(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"}const Jt={};function ar(t,e,n,s,r,a,i,o,l,u,m,p,f,d,b,w,$,h){let g=t,T=h,C=0,Z=!1;for(;(T=T.get(Jt))!==void 0&&!Z;){const P=T.get(t);if(C+=1,typeof P<"u"){if(P===C)throw new RangeError("Cyclic object value");Z=!0}typeof T.get(Jt)>"u"&&(C=0)}if(typeof u=="function"?g=u(e,g):g instanceof Date?g=f?.(g):n==="comma"&&H(g)&&(g=ss(g,function(P){return P instanceof Date?f?.(P):P})),g===null){if(a)return l&&!w?l(e,j.encoder,$,"key",d):e;g=""}if(pi(g)||di(g)){if(l){const P=w?e:l(e,j.encoder,$,"key",d);return[b?.(P)+"="+b?.(l(g,j.encoder,$,"value",d))]}return[b?.(e)+"="+b?.(String(g))]}const U=[];if(typeof g>"u")return U;let R;if(n==="comma"&&H(g))w&&l&&(g=ss(g,l)),R=[{value:g.length>0?g.join(",")||null:void 0}];else if(H(u))R=u;else{const P=Object.keys(g);R=m?P.sort(m):P}const F=o?String(e).replace(/\./g,"%2E"):String(e),L=s&&H(g)&&g.length===1?F+"[]":F;if(r&&H(g)&&g.length===0)return L+"[]";for(let P=0;P<R.length;++P){const M=R[P],Wn=typeof M=="object"&&typeof M.value<"u"?M.value:g[M];if(i&&Wn===null)continue;const Bt=p&&o?M.replace(/\./g,"%2E"):M,Aa=H(g)?typeof n=="function"?n(L,Bt):L:L+(p?"."+Bt:"["+Bt+"]");h.set(t,C);const qn=new WeakMap;qn.set(Jt,h),rr(U,ar(Wn,Aa,n,s,r,a,i,o,n==="comma"&&w&&H(g)?null:l,u,m,p,f,d,b,w,$,qn))}return U}function fi(t=j){if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");const e=t.charset||j.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let n=tr;if(typeof t.format<"u"){if(!en(ns,t.format))throw new TypeError("Unknown format option provided.");n=t.format}const s=ns[n];let r=j.filter;(typeof t.filter=="function"||H(t.filter))&&(r=t.filter);let a;if(t.arrayFormat&&t.arrayFormat in sr?a=t.arrayFormat:"indices"in t?a=t.indices?"indices":"repeat":a=j.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const i=typeof t.allowDots>"u"?t.encodeDotInKeys?!0:j.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:j.addQueryPrefix,allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:j.allowEmptyArrays,arrayFormat:a,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:j.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?j.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:j.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:j.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:j.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:j.encodeValuesOnly,filter:r,format:n,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:j.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:j.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:j.strictNullHandling}}function hi(t,e={}){let n=t;const s=fi(e);let r,a;typeof s.filter=="function"?(a=s.filter,n=a("",n)):H(s.filter)&&(a=s.filter,r=a);const i=[];if(typeof n!="object"||n===null)return"";const o=sr[s.arrayFormat],l=o==="comma"&&s.commaRoundTrip;r||(r=Object.keys(n)),s.sort&&r.sort(s.sort);const u=new WeakMap;for(let f=0;f<r.length;++f){const d=r[f];s.skipNulls&&n[d]===null||rr(i,ar(n[d],d,o,l,s.allowEmptyArrays,s.strictNullHandling,s.skipNulls,s.encodeDotInKeys,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,u))}const m=i.join(s.delimiter);let p=s.addQueryPrefix===!0?"?":"";return s.charsetSentinel&&(s.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),m.length>0?p+m:""}function mi(t){let e=0;for(const r of t)e+=r.length;const n=new Uint8Array(e);let s=0;for(const r of t)n.set(r,s),s+=r.length;return n}let as;function _n(t){let e;return(as??(e=new globalThis.TextEncoder,as=e.encode.bind(e)))(t)}let is;function os(t){let e;return(is??(e=new globalThis.TextDecoder,is=e.decode.bind(e)))(t)}var V,X;class Pt{constructor(){V.set(this,void 0),X.set(this,void 0),O(this,V,new Uint8Array),O(this,X,null)}decode(e){if(e==null)return[];const n=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?_n(e):e;O(this,V,mi([c(this,V,"f"),n]));const s=[];let r;for(;(r=gi(c(this,V,"f"),c(this,X,"f")))!=null;){if(r.carriage&&c(this,X,"f")==null){O(this,X,r.index);continue}if(c(this,X,"f")!=null&&(r.index!==c(this,X,"f")+1||r.carriage)){s.push(os(c(this,V,"f").subarray(0,c(this,X,"f")-1))),O(this,V,c(this,V,"f").subarray(c(this,X,"f"))),O(this,X,null);continue}const a=c(this,X,"f")!==null?r.preceding-1:r.preceding,i=os(c(this,V,"f").subarray(0,a));s.push(i),O(this,V,c(this,V,"f").subarray(r.index)),O(this,X,null)}return s}flush(){return c(this,V,"f").length?this.decode(`