@mcp-use/inspector 11.0.0-canary.14 → 12.0.0-canary.0
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/cdn/inspector.js +417 -411
- package/dist/cli.js +2 -2
- package/dist/server/{chunk-KW7ITSHJ.js → chunk-3FL7XPEK.js} +2 -2
- package/dist/server/{chunk-ZW5ZQ5DO.js → chunk-6GW6OAU3.js} +1 -1
- package/dist/server/{chunk-XSRONP6K.js → chunk-FB46XEZP.js} +1 -1
- package/dist/server/{chunk-QIBWARX7.js → chunk-HJFORNIO.js} +1 -1
- package/dist/server/{chunk-IS23BSFO.js → chunk-LS7N3VYY.js} +1 -1
- package/dist/server/{chunk-JDZ5LD25.js → chunk-MQYQVZLC.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/server.js +2 -2
- package/dist/server/shared-static.js +2 -2
- package/dist/server/version.js +1 -1
- package/dist/web/assets/{1c-CuOmSwyZ.js → 1c-WWqZDUi0.js} +1 -1
- package/dist/web/assets/{abnf-BCBN4slN.js → abnf-809Skn4Z.js} +1 -1
- package/dist/web/assets/{accesslog-DVlUUb3U.js → accesslog-BQZ9CYA0.js} +1 -1
- package/dist/web/assets/{actionscript-CUTaPg6T.js → actionscript-C4IHFxfr.js} +1 -1
- package/dist/web/assets/{ada-CPAVtPdf.js → ada-CpTHgtRn.js} +1 -1
- package/dist/web/assets/{angelscript-C6aTbbXp.js → angelscript-BPyrgr7F.js} +1 -1
- package/dist/web/assets/{apache-aQ3xBl-K.js → apache-Bjmqo8ea.js} +1 -1
- package/dist/web/assets/{applescript-DVWpRV4t.js → applescript-_IMtUQAx.js} +1 -1
- package/dist/web/assets/{arcade-BPvpvZaM.js → arcade-BEfAuJ-n.js} +1 -1
- package/dist/web/assets/{arduino-fBYn33Cg.js → arduino-BTj1AC_h.js} +1 -1
- package/dist/web/assets/{armasm-DjKOtOgB.js → armasm-tWowMYjo.js} +1 -1
- package/dist/web/assets/{asciidoc--2FyYQJJ.js → asciidoc-Cu1VLIKu.js} +1 -1
- package/dist/web/assets/{aspectj-B1XaitzL.js → aspectj-BS1sByBm.js} +1 -1
- package/dist/web/assets/{autohotkey-CPcSwDGr.js → autohotkey-D8SRCkGW.js} +1 -1
- package/dist/web/assets/{autoit-DHMTZ5W6.js → autoit-Bnu_gieE.js} +1 -1
- package/dist/web/assets/{avrasm-DwQnzhPv.js → avrasm-VQoSW_mm.js} +1 -1
- package/dist/web/assets/{awk-QdpE4-IC.js → awk-BnA2skyb.js} +1 -1
- package/dist/web/assets/{axapta-BorAWmro.js → axapta-DnbMcDoo.js} +1 -1
- package/dist/web/assets/{bash-DX6FqIJk.js → bash-DWHSg_XE.js} +1 -1
- package/dist/web/assets/{basic-CbHR0W-D.js → basic-BxzXlD7c.js} +1 -1
- package/dist/web/assets/{bnf-BwvSyK4v.js → bnf-BjLUjADO.js} +1 -1
- package/dist/web/assets/{brainfuck-CENtTPOC.js → brainfuck-aSjxWjYT.js} +1 -1
- package/dist/web/assets/{c-C297QAHc.js → c-CIN1gy1n.js} +1 -1
- package/dist/web/assets/{c-like-BXfa3a0o.js → c-like-CLb0bWcw.js} +1 -1
- package/dist/web/assets/{cal-CMrsphMe.js → cal-BR3_s_cL.js} +1 -1
- package/dist/web/assets/{capnproto-Ds1JRpx6.js → capnproto-C2DcjtLF.js} +1 -1
- package/dist/web/assets/{ceylon-D-OcengP.js → ceylon-9PyS7NFY.js} +1 -1
- package/dist/web/assets/{clean-BhmEgCqp.js → clean-DXiS1A9O.js} +1 -1
- package/dist/web/assets/{clojure-Caw_eJhR.js → clojure-BQJRVnxh.js} +1 -1
- package/dist/web/assets/{clojure-repl-CdUvGE_X.js → clojure-repl-D1rdpwza.js} +1 -1
- package/dist/web/assets/{cmake-BfCFTpMp.js → cmake-b7BcTZlb.js} +1 -1
- package/dist/web/assets/{coffeescript-CzQM11PC.js → coffeescript-BkT5lJ2x.js} +1 -1
- package/dist/web/assets/{coq-CrOYIp2_.js → coq-DBVS8_9O.js} +1 -1
- package/dist/web/assets/{core-CwhzumFL.js → core-BkSmqDdR.js} +1 -1
- package/dist/web/assets/{cos-CYABDoSE.js → cos-48B3Zgz0.js} +1 -1
- package/dist/web/assets/{cpp-CLTzLX7V.js → cpp-D3reVCcg.js} +1 -1
- package/dist/web/assets/{crmsh-AVXryTty.js → crmsh-BCBx1wWk.js} +1 -1
- package/dist/web/assets/{crystal-BItM7Tk3.js → crystal-HzOA6UYV.js} +1 -1
- package/dist/web/assets/{csharp-CrBXRxDL.js → csharp-DqNDwmVo.js} +1 -1
- package/dist/web/assets/{csp-DUFPhSQy.js → csp-BBSwiHSV.js} +1 -1
- package/dist/web/assets/{css-BG0eWdH8.js → css-EbXfNXoY.js} +1 -1
- package/dist/web/assets/{d-Dipu9fjw.js → d-Ci7qF9Nv.js} +1 -1
- package/dist/web/assets/{dart-DdOG_ogq.js → dart-CuNd6OMU.js} +1 -1
- package/dist/web/assets/{delphi-CHT1K2zu.js → delphi-BhDQaGkR.js} +1 -1
- package/dist/web/assets/{diff-Be4Z7Px_.js → diff-C12QI4ui.js} +1 -1
- package/dist/web/assets/{django-C1Dfjl2O.js → django-DKU-xRnz.js} +1 -1
- package/dist/web/assets/{dns-_9kuMCUl.js → dns-wPLbNiwh.js} +1 -1
- package/dist/web/assets/{dockerfile-CB02VTQM.js → dockerfile-R-GkzY9u.js} +1 -1
- package/dist/web/assets/{dos-B4ArrirF.js → dos-B3YxxXZl.js} +1 -1
- package/dist/web/assets/{dsconfig-DMouMwz6.js → dsconfig-CNiIfBEr.js} +1 -1
- package/dist/web/assets/{dts-GWBD6k7y.js → dts-DarQhWJa.js} +1 -1
- package/dist/web/assets/{dust-OeKJmnos.js → dust-BGmWYuSv.js} +1 -1
- package/dist/web/assets/{ebnf-DDr0P5A6.js → ebnf-Fv-VKqhe.js} +1 -1
- package/dist/web/assets/{elixir-upOnpRzK.js → elixir-KzsyQkS3.js} +1 -1
- package/dist/web/assets/{elm-BXiNFAfh.js → elm-CzUGLWl9.js} +1 -1
- package/dist/web/assets/{erb-C-v4UL75.js → erb-DQGg71ha.js} +1 -1
- package/dist/web/assets/{erlang-f9Dz5B-T.js → erlang-E9foRaaY.js} +1 -1
- package/dist/web/assets/{erlang-repl-tePj18aS.js → erlang-repl-D2enlquO.js} +1 -1
- package/dist/web/assets/{excel-B1iGd7aV.js → excel-cPBgyWE9.js} +1 -1
- package/dist/web/assets/{fix-7RplEG8Z.js → fix-CHOpApZe.js} +1 -1
- package/dist/web/assets/{flix-B-mPmMNQ.js → flix-BMZsX6rB.js} +1 -1
- package/dist/web/assets/{fortran-Bk-iEhDb.js → fortran-Ce_7iP3N.js} +1 -1
- package/dist/web/assets/{fsharp-PCelvl6S.js → fsharp-JgNu4nIZ.js} +1 -1
- package/dist/web/assets/{gams-Bn49mcOg.js → gams-DQuEJ5ws.js} +1 -1
- package/dist/web/assets/{gauss-Ciwdw5h7.js → gauss-DuwjeVGF.js} +1 -1
- package/dist/web/assets/{gcode--TTXwk45.js → gcode-CSrGdfgf.js} +1 -1
- package/dist/web/assets/{gherkin-CZo_ZHnm.js → gherkin-BaQ5-RDU.js} +1 -1
- package/dist/web/assets/{glsl-CG8JJUw3.js → glsl-BRH4M0HB.js} +1 -1
- package/dist/web/assets/{gml-BNz9GNJI.js → gml-DIqNvV12.js} +1 -1
- package/dist/web/assets/{go-Brr59xMZ.js → go-DSGP9cn8.js} +1 -1
- package/dist/web/assets/{golo-CHbmMcfJ.js → golo-YE7YFKwq.js} +1 -1
- package/dist/web/assets/{gradle-CPeY7biM.js → gradle-DILlAgbW.js} +1 -1
- package/dist/web/assets/{groovy-mY0OspJA.js → groovy-B-wi6wLs.js} +1 -1
- package/dist/web/assets/{haml--rsIFZgz.js → haml-CflEixL4.js} +1 -1
- package/dist/web/assets/{handlebars-bFOfcU-2.js → handlebars-CNVjACR9.js} +1 -1
- package/dist/web/assets/{haskell-kNCYY0Av.js → haskell-BGD_MPKw.js} +1 -1
- package/dist/web/assets/{haxe-CyMMsru2.js → haxe-D_RrW1xe.js} +1 -1
- package/dist/web/assets/{hsp-Cwc97P48.js → hsp-DcNMZAG0.js} +1 -1
- package/dist/web/assets/{htmlbars-BAC6xOmw.js → htmlbars-MUHb7g0P.js} +1 -1
- package/dist/web/assets/{http-DiwNYBIV.js → http-DomPZqhu.js} +1 -1
- package/dist/web/assets/{hy-9srSurxZ.js → hy-BcpD06jC.js} +1 -1
- package/dist/web/assets/{index-DrDNEWeJ.js → index-Laxc9ocj.js} +108 -108
- package/dist/web/assets/{inform7-CSNt1EXe.js → inform7-ByhgjV2v.js} +1 -1
- package/dist/web/assets/{ini-B-Q45wmc.js → ini-DDpMiBxw.js} +1 -1
- package/dist/web/assets/{irpf90-B1RF7wuY.js → irpf90-CV7ZBXkc.js} +1 -1
- package/dist/web/assets/{isbl-Q7nUmd0Q.js → isbl-BUh_4hGk.js} +1 -1
- package/dist/web/assets/{java-CwnluJV6.js → java-Bt416jFE.js} +1 -1
- package/dist/web/assets/{javascript-CXVI8apT.js → javascript-CbB3A0uW.js} +1 -1
- package/dist/web/assets/{jboss-cli-YUTVdeZU.js → jboss-cli-B74CgF5_.js} +1 -1
- package/dist/web/assets/{json-TtE2eh1O.js → json-DFtfTfmJ.js} +1 -1
- package/dist/web/assets/{julia-ehV9n_zZ.js → julia-A4xwFJzD.js} +1 -1
- package/dist/web/assets/{julia-repl-C84RMt_5.js → julia-repl-CkI08dbl.js} +1 -1
- package/dist/web/assets/{kotlin-C3qSSriz.js → kotlin-Dd-TCFi_.js} +1 -1
- package/dist/web/assets/{lasso-Bq0UIz74.js → lasso-BvI_9mzs.js} +1 -1
- package/dist/web/assets/{latex-oVLTgE6x.js → latex-DOntcmTT.js} +1 -1
- package/dist/web/assets/{ldif-SrNvtcKs.js → ldif-CrfhdHfr.js} +1 -1
- package/dist/web/assets/{leaf-DS3jVZm3.js → leaf-Ed6PAmv6.js} +1 -1
- package/dist/web/assets/{less-uKCoP4-n.js → less-H3DIra-4.js} +1 -1
- package/dist/web/assets/{lisp-9RVzS8hN.js → lisp-6vq1Iylg.js} +1 -1
- package/dist/web/assets/{livecodeserver-Dyn88yOM.js → livecodeserver-DsUdPrv2.js} +1 -1
- package/dist/web/assets/{livescript-B0RXEu-t.js → livescript-CaFYYk1c.js} +1 -1
- package/dist/web/assets/{llvm-BGwj68b0.js → llvm-DXuNLIAr.js} +1 -1
- package/dist/web/assets/{lsl-B6LsUWGi.js → lsl-DyvIyNV2.js} +1 -1
- package/dist/web/assets/{lua-VJfnsrOk.js → lua-DG9tIfa6.js} +1 -1
- package/dist/web/assets/{makefile-BaTbI0SW.js → makefile-DuQRKBpX.js} +1 -1
- package/dist/web/assets/{markdown-BxdlDNsT.js → markdown-C1icNzgT.js} +1 -1
- package/dist/web/assets/{mathematica-DtD_vbWm.js → mathematica-xVKtHuAR.js} +1 -1
- package/dist/web/assets/{matlab-YA7m4JeS.js → matlab-DCNsZt4-.js} +1 -1
- package/dist/web/assets/{maxima-B0J96XwN.js → maxima-Bd0WBHJW.js} +1 -1
- package/dist/web/assets/{mel-BX2rcr_g.js → mel-CYBNMQYY.js} +1 -1
- package/dist/web/assets/{mercury-CMrBuuAR.js → mercury-RXKSSf5V.js} +1 -1
- package/dist/web/assets/{mipsasm-yQNQkiFP.js → mipsasm-NlEJdTGE.js} +1 -1
- package/dist/web/assets/{mizar-7o73MGO4.js → mizar-DFLhjAqr.js} +1 -1
- package/dist/web/assets/{mojolicious-CNgR3mAT.js → mojolicious-BVkeO2he.js} +1 -1
- package/dist/web/assets/{monkey-BBH6yi_X.js → monkey-ruWJPl1D.js} +1 -1
- package/dist/web/assets/{moonscript-BZ1JCYnn.js → moonscript-5ulG0vM-.js} +1 -1
- package/dist/web/assets/{n1ql-C1ebDbi5.js → n1ql-CKvuuc4t.js} +1 -1
- package/dist/web/assets/{nginx-voX9YzaC.js → nginx-CPFDEN4T.js} +1 -1
- package/dist/web/assets/{nim-uPK1vYOW.js → nim-utQqbuyE.js} +1 -1
- package/dist/web/assets/{nix-Bib-oO3k.js → nix-C2arovtw.js} +1 -1
- package/dist/web/assets/{node-repl-Db805zVI.js → node-repl-ZEy0cSvt.js} +1 -1
- package/dist/web/assets/{nsis-D_L2RXbV.js → nsis-Dyu-c7Mk.js} +1 -1
- package/dist/web/assets/{objectivec-DQzWD7d4.js → objectivec-DLirtxvG.js} +1 -1
- package/dist/web/assets/{ocaml-DSZv_NQG.js → ocaml-BxASNzW0.js} +1 -1
- package/dist/web/assets/{openscad-agm7zXxF.js → openscad-Dx1W0VZN.js} +1 -1
- package/dist/web/assets/{oxygene-DIWOUXCS.js → oxygene-jC4e00Yo.js} +1 -1
- package/dist/web/assets/{parser3-BC-e1kzl.js → parser3-DplkAawo.js} +1 -1
- package/dist/web/assets/{perl-DO7JGIC1.js → perl-Dlyjlw2Q.js} +1 -1
- package/dist/web/assets/{pf-DyEXa3m8.js → pf-X5G22_NV.js} +1 -1
- package/dist/web/assets/{pgsql-pVdPRQcL.js → pgsql-xwWV4D3R.js} +1 -1
- package/dist/web/assets/{php-Dmt692Rv.js → php-BPmACXye.js} +1 -1
- package/dist/web/assets/{php-template-zfRrD7lW.js → php-template-D3xLyFyD.js} +1 -1
- package/dist/web/assets/plaintext-DspTtZbe.js +1 -0
- package/dist/web/assets/{pony-BzwRE0wN.js → pony-DM6hWqMB.js} +1 -1
- package/dist/web/assets/{powershell-RbHg75uY.js → powershell-D11nXE09.js} +1 -1
- package/dist/web/assets/{processing-BLRsEs3X.js → processing-cP_naG6F.js} +1 -1
- package/dist/web/assets/{profile-_W5sF9zY.js → profile-BAuTMcTF.js} +1 -1
- package/dist/web/assets/{prolog-r7dfnUHa.js → prolog-B0v-lYgA.js} +1 -1
- package/dist/web/assets/{properties-CtwcscIf.js → properties-Dep8G-Jn.js} +1 -1
- package/dist/web/assets/{protobuf-DLql7Gy8.js → protobuf-A8zCcVw9.js} +1 -1
- package/dist/web/assets/{puppet-4j8S-2XW.js → puppet-BbFQGM6c.js} +1 -1
- package/dist/web/assets/{purebasic-GdVTGNDP.js → purebasic-DZtX7nbm.js} +1 -1
- package/dist/web/assets/{python-EKbucOzS.js → python-Kfcp6k1d.js} +1 -1
- package/dist/web/assets/{python-repl-BPjBm4wS.js → python-repl-fJUgCylz.js} +1 -1
- package/dist/web/assets/{q-Blz2tQsa.js → q-10RwJS-X.js} +1 -1
- package/dist/web/assets/{qml-KW-DsriT.js → qml-BBiWYcO6.js} +1 -1
- package/dist/web/assets/{r-BY0RN8FV.js → r-CibvCRbc.js} +1 -1
- package/dist/web/assets/{reasonml-X2obBbzs.js → reasonml-BqvP3NWm.js} +1 -1
- package/dist/web/assets/{rib-BmDJWrbD.js → rib-DoThcfz0.js} +1 -1
- package/dist/web/assets/{roboconf-uJ96upQy.js → roboconf-CGsi757U.js} +1 -1
- package/dist/web/assets/{routeros-BugfLp30.js → routeros-BL2S59PO.js} +1 -1
- package/dist/web/assets/rpc-logger-TPNV75J4-CyQPBUZm.js +1 -0
- package/dist/web/assets/{rsl-CF5diBdS.js → rsl-BkRulYW5.js} +1 -1
- package/dist/web/assets/{ruby-C-t7uCYH.js → ruby--iVrrb8b.js} +1 -1
- package/dist/web/assets/{ruleslanguage-B1iV825a.js → ruleslanguage-CBpDXrYc.js} +1 -1
- package/dist/web/assets/{rust-DpgbRIBK.js → rust-BGpeHwa9.js} +1 -1
- package/dist/web/assets/{sas-DJYAPQhp.js → sas-DICpnhcr.js} +1 -1
- package/dist/web/assets/{scala-B8_3VeKW.js → scala-USjDcrLf.js} +1 -1
- package/dist/web/assets/{scheme-Blr_CoS6.js → scheme-BNRyLGyi.js} +1 -1
- package/dist/web/assets/{scilab-CAuujsVv.js → scilab-DHJHoFKR.js} +1 -1
- package/dist/web/assets/{scss-9GjsfVCW.js → scss-CqdW3oDZ.js} +1 -1
- package/dist/web/assets/{shell-CzbUqSFx.js → shell-DPEOoRC5.js} +1 -1
- package/dist/web/assets/{smali-qK-WBxWR.js → smali-BfNOpnsd.js} +1 -1
- package/dist/web/assets/{smalltalk-JaS5HqLL.js → smalltalk-DmOmWplt.js} +1 -1
- package/dist/web/assets/{sml-Bts0Zhr_.js → sml-D0_-Xlf_.js} +1 -1
- package/dist/web/assets/{sqf-DewB6ZdA.js → sqf-CKksFc2b.js} +1 -1
- package/dist/web/assets/{sql-BzzctRtS.js → sql-9gRVSFml.js} +1 -1
- package/dist/web/assets/{sql_more-DL2TN6RT.js → sql_more-DMNAkN31.js} +1 -1
- package/dist/web/assets/{stan-CRm-fdI_.js → stan-BfwtQRpy.js} +1 -1
- package/dist/web/assets/{stata-kBBTBF2q.js → stata-MMt8yYTM.js} +1 -1
- package/dist/web/assets/{step21-B1AYd_b7.js → step21-DPwMwcNf.js} +1 -1
- package/dist/web/assets/{stylus-Di7obrlI.js → stylus-BkcKjfzU.js} +1 -1
- package/dist/web/assets/{subunit-BXuq0lII.js → subunit-BDB6dyts.js} +1 -1
- package/dist/web/assets/{swift-BRIBHR8z.js → swift-BaAV0tI6.js} +1 -1
- package/dist/web/assets/{taggerscript-ChJ8pE0t.js → taggerscript-3Bsf4iOq.js} +1 -1
- package/dist/web/assets/{tap-onS6zroG.js → tap-IWB5p3hi.js} +1 -1
- package/dist/web/assets/{tcl-Sr48WMz-.js → tcl-DnyCLM3S.js} +1 -1
- package/dist/web/assets/{thrift-DqNGebdv.js → thrift-GFLEn4na.js} +1 -1
- package/dist/web/assets/{tp-B9DSzsDA.js → tp-mT9twYMd.js} +1 -1
- package/dist/web/assets/{twig-BqhMJxO_.js → twig-KXM2Ir7s.js} +1 -1
- package/dist/web/assets/{typescript-BpQIBFZ_.js → typescript-DLsMyDVr.js} +1 -1
- package/dist/web/assets/{vala-BeA66D7t.js → vala-DC18dV87.js} +1 -1
- package/dist/web/assets/{vbnet-BV1GFcOL.js → vbnet-BTKoRTOY.js} +1 -1
- package/dist/web/assets/{vbscript-Bj6hIhyM.js → vbscript-CfyNPUKB.js} +1 -1
- package/dist/web/assets/{vbscript-html-2BkscS0h.js → vbscript-html-C1UQEg3Y.js} +1 -1
- package/dist/web/assets/{verilog-D7Oo7WpZ.js → verilog-BYvTR18N.js} +1 -1
- package/dist/web/assets/{vhdl-DnNkrEAu.js → vhdl-BzEGp3In.js} +1 -1
- package/dist/web/assets/{vim-DASYFp6B.js → vim-BAgmvZxe.js} +1 -1
- package/dist/web/assets/{x86asm-C3_K5IR6.js → x86asm-D8zXFi0O.js} +1 -1
- package/dist/web/assets/{xl-gf854eTq.js → xl-B5pdzb_1.js} +1 -1
- package/dist/web/assets/{xml-E0MP_Z2Y.js → xml-CevZSAlP.js} +1 -1
- package/dist/web/assets/{xquery-pLkSkWzC.js → xquery-ogVEcT2_.js} +1 -1
- package/dist/web/assets/{yaml-v3HCEqkV.js → yaml--bFUsTFO.js} +1 -1
- package/dist/web/assets/{zephir-B0e5L-by.js → zephir-C3iEI5I_.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +3 -3
- package/dist/web/assets/plaintext-CmHrRNdU.js +0 -1
- package/dist/web/assets/rpc-logger-TPNV75J4-CmXd8ADj.js +0 -1
package/dist/cdn/inspector.js
CHANGED
|
@@ -1974,7 +1974,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1974
1974
|
function Ye(e, t) {
|
|
1975
1975
|
e.pendingLanes |= t, t !== 268435456 && (e.suspendedLanes = 0, e.pingedLanes = 0, e.warmLanes = 0);
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1977
|
+
function Xe(e, t, n, r, i, a) {
|
|
1978
1978
|
var o = e.pendingLanes;
|
|
1979
1979
|
e.pendingLanes = n, e.suspendedLanes = 0, e.pingedLanes = 0, e.warmLanes = 0, e.expiredLanes &= n, e.entangledLanes &= n, e.errorRecoveryDisabledLanes &= n, e.shellSuspendCounter = 0;
|
|
1980
1980
|
var s = e.entanglements, c = e.expirationTimes, l = e.hiddenUpdates;
|
|
@@ -1988,9 +1988,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1988
1988
|
}
|
|
1989
1989
|
n &= ~d;
|
|
1990
1990
|
}
|
|
1991
|
-
r !== 0 &&
|
|
1991
|
+
r !== 0 && B(e, r, 0), a !== 0 && i === 0 && e.tag !== 0 && (e.suspendedLanes |= a & ~(o & ~t));
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function B(e, t, n) {
|
|
1994
1994
|
e.pendingLanes |= t, e.suspendedLanes &= ~t;
|
|
1995
1995
|
var r = 31 - Ie(t);
|
|
1996
1996
|
e.entangledLanes |= t, e.entanglements[r] = e.entanglements[r] | 1073741824 | n & 261930;
|
|
@@ -6534,7 +6534,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
6534
6534
|
var a = 31 - Ie(i), o = 1 << a;
|
|
6535
6535
|
r[a] = -1, i &= ~o;
|
|
6536
6536
|
}
|
|
6537
|
-
n !== 0 &&
|
|
6537
|
+
n !== 0 && B(e, n, t);
|
|
6538
6538
|
}
|
|
6539
6539
|
function Ou() {
|
|
6540
6540
|
return Hl & 6 ? !0 : (pd(0, !1), !1);
|
|
@@ -6765,7 +6765,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
6765
6765
|
if (Hl & 6) throw Error(i(327));
|
|
6766
6766
|
if (t !== null) {
|
|
6767
6767
|
if (t === e.current) throw Error(i(177));
|
|
6768
|
-
if (o = t.lanes | t.childLanes, o |= Yr,
|
|
6768
|
+
if (o = t.lanes | t.childLanes, o |= Yr, Xe(e, n, o, s, c, l), e === Ul && (Wl = Ul = null, Gl = 0), mu = t, pu = e, hu = n, gu = o, _u = a, vu = r, t.subtreeFlags & 10256 || t.flags & 10256 ? (e.callbackNode = null, e.callbackPriority = 0, ad(Oe, function() {
|
|
6769
6769
|
return Zu(), null;
|
|
6770
6770
|
})) : (e.callbackNode = null, e.callbackPriority = 0), r = (t.flags & 13878) != 0, t.subtreeFlags & 13878 || r) {
|
|
6771
6771
|
r = I.T, I.T = null, a = L.p, L.p = 2, s = Hl, Hl |= 4;
|
|
@@ -9787,7 +9787,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
9787
9787
|
return e = e.getAttribute(t), e === "" && !0 === n ? !0 : (ge(n, t), e === "" + n ? n : e);
|
|
9788
9788
|
}
|
|
9789
9789
|
}
|
|
9790
|
-
function
|
|
9790
|
+
function Xe(e, t, n) {
|
|
9791
9791
|
if (Je(t)) if (n === null) e.removeAttribute(t);
|
|
9792
9792
|
else {
|
|
9793
9793
|
switch (typeof n) {
|
|
@@ -9806,7 +9806,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
9806
9806
|
ge(n, t), e.setAttribute(t, "" + n);
|
|
9807
9807
|
}
|
|
9808
9808
|
}
|
|
9809
|
-
function
|
|
9809
|
+
function B(e, t, n) {
|
|
9810
9810
|
if (n === null) e.removeAttribute(t);
|
|
9811
9811
|
else {
|
|
9812
9812
|
switch (typeof n) {
|
|
@@ -16124,23 +16124,23 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
16124
16124
|
typeof r == "string" ? (Lt(r, t, !1), t === "body" || t === "textarea" && r === "" || H(e, r)) : (typeof r == "number" || typeof r == "bigint") && (Lt("" + r, t, !1), t !== "body" && H(e, "" + r));
|
|
16125
16125
|
break;
|
|
16126
16126
|
case "className":
|
|
16127
|
-
|
|
16127
|
+
B(e, "class", r);
|
|
16128
16128
|
break;
|
|
16129
16129
|
case "tabIndex":
|
|
16130
|
-
|
|
16130
|
+
B(e, "tabindex", r);
|
|
16131
16131
|
break;
|
|
16132
16132
|
case "dir":
|
|
16133
16133
|
case "role":
|
|
16134
16134
|
case "viewBox":
|
|
16135
16135
|
case "width":
|
|
16136
16136
|
case "height":
|
|
16137
|
-
|
|
16137
|
+
B(e, n, r);
|
|
16138
16138
|
break;
|
|
16139
16139
|
case "style":
|
|
16140
16140
|
Bt(e, r, a);
|
|
16141
16141
|
break;
|
|
16142
16142
|
case "data": if (t !== "object") {
|
|
16143
|
-
|
|
16143
|
+
B(e, "data", r);
|
|
16144
16144
|
break;
|
|
16145
16145
|
}
|
|
16146
16146
|
case "src":
|
|
@@ -16255,7 +16255,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
16255
16255
|
r == null || typeof r == "function" || typeof r == "symbol" || isNaN(r) ? e.removeAttribute(n) : (ge(r, n), e.setAttribute(n, r));
|
|
16256
16256
|
break;
|
|
16257
16257
|
case "popover":
|
|
16258
|
-
iu("beforetoggle", e), iu("toggle", e),
|
|
16258
|
+
iu("beforetoggle", e), iu("toggle", e), Xe(e, "popover", r);
|
|
16259
16259
|
break;
|
|
16260
16260
|
case "xlinkActuate":
|
|
16261
16261
|
Ze(e, cS, "xlink:actuate", r);
|
|
@@ -16285,12 +16285,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
16285
16285
|
Ze(e, lS, "xml:space", r);
|
|
16286
16286
|
break;
|
|
16287
16287
|
case "is":
|
|
16288
|
-
a != null && console.error("Cannot update the \"is\" prop after it has been initialized."),
|
|
16288
|
+
a != null && console.error("Cannot update the \"is\" prop after it has been initialized."), Xe(e, "is", r);
|
|
16289
16289
|
break;
|
|
16290
16290
|
case "innerText":
|
|
16291
16291
|
case "textContent": break;
|
|
16292
16292
|
case "popoverTarget": iS || typeof r != "object" || !r || (iS = !0, console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.", r));
|
|
16293
|
-
default: !(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N" ? (n = Ht(n),
|
|
16293
|
+
default: !(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N" ? (n = Ht(n), Xe(e, n, r)) : Qp.hasOwnProperty(n) && r != null && typeof r != "function" && gu(n, r);
|
|
16294
16294
|
}
|
|
16295
16295
|
}
|
|
16296
16296
|
function xu(e, t, n, r, i, a) {
|
|
@@ -16331,7 +16331,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
16331
16331
|
typeof a != "function" && a !== null && (n in e ? e[n] = null : e.hasAttribute(n) && e.removeAttribute(n)), e.addEventListener(t, r, i);
|
|
16332
16332
|
break a;
|
|
16333
16333
|
}
|
|
16334
|
-
n in e ? e[n] = r : !0 === r ? e.setAttribute(n, "") :
|
|
16334
|
+
n in e ? e[n] = r : !0 === r ? e.setAttribute(n, "") : Xe(e, n, r);
|
|
16335
16335
|
}
|
|
16336
16336
|
}
|
|
16337
16337
|
}
|
|
@@ -20708,7 +20708,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
20708
20708
|
}, Ve = [], He = (e) => {
|
|
20709
20709
|
let t = (t) => t[e] || Ve;
|
|
20710
20710
|
return t.isThemeGetter = !0, t;
|
|
20711
|
-
}, Ue = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, We = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ge = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Ke = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, qe = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Je = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ye = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,
|
|
20711
|
+
}, Ue = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, We = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ge = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Ke = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, qe = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Je = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ye = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Xe = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, B = (e) => Ge.test(e), Ze = (e) => !!e && !Number.isNaN(Number(e)), Qe = (e) => !!e && Number.isInteger(Number(e)), $e = (e) => e.endsWith("%") && Ze(e.slice(0, -1)), et = (e) => Ke.test(e), tt = () => !0, nt = (e) => qe.test(e) && !Je.test(e), rt = () => !1, it = (e) => Ye.test(e), at = (e) => Xe.test(e), ot = (e) => !ct(e) && !gt(e), st = (e) => wt(e, Ot, rt), ct = (e) => Ue.test(e), lt = (e) => wt(e, kt, nt), ut = (e) => wt(e, At, Ze), dt = (e) => wt(e, Mt, tt), ft = (e) => wt(e, jt, rt), pt = (e) => wt(e, Et, rt), mt = (e) => wt(e, Dt, at), ht = (e) => wt(e, Nt, it), gt = (e) => We.test(e), _t = (e) => Tt(e, kt), vt = (e) => Tt(e, jt), yt = (e) => Tt(e, Et), bt = (e) => Tt(e, Ot), xt = (e) => Tt(e, Dt), St = (e) => Tt(e, Nt, !0), Ct = (e) => Tt(e, Mt, !0), wt = (e, t, n) => {
|
|
20712
20712
|
let r = Ue.exec(e);
|
|
20713
20713
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
20714
20714
|
}, Tt = (e, t, n = !1) => {
|
|
@@ -20757,7 +20757,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
20757
20757
|
ct,
|
|
20758
20758
|
c
|
|
20759
20759
|
], T = () => [
|
|
20760
|
-
|
|
20760
|
+
B,
|
|
20761
20761
|
"full",
|
|
20762
20762
|
"auto",
|
|
20763
20763
|
...w()
|
|
@@ -20809,7 +20809,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
20809
20809
|
"center-safe",
|
|
20810
20810
|
"end-safe"
|
|
20811
20811
|
], M = () => ["auto", ...w()], N = () => [
|
|
20812
|
-
|
|
20812
|
+
B,
|
|
20813
20813
|
"auto",
|
|
20814
20814
|
"full",
|
|
20815
20815
|
"dvw",
|
|
@@ -20823,7 +20823,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
20823
20823
|
"fit",
|
|
20824
20824
|
...w()
|
|
20825
20825
|
], P = () => [
|
|
20826
|
-
|
|
20826
|
+
B,
|
|
20827
20827
|
"screen",
|
|
20828
20828
|
"full",
|
|
20829
20829
|
"dvw",
|
|
@@ -20834,7 +20834,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
20834
20834
|
"fit",
|
|
20835
20835
|
...w()
|
|
20836
20836
|
], F = () => [
|
|
20837
|
-
|
|
20837
|
+
B,
|
|
20838
20838
|
"screen",
|
|
20839
20839
|
"full",
|
|
20840
20840
|
"lh",
|
|
@@ -20931,7 +20931,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
20931
20931
|
gt,
|
|
20932
20932
|
ct
|
|
20933
20933
|
], ue = () => [
|
|
20934
|
-
|
|
20934
|
+
B,
|
|
20935
20935
|
"full",
|
|
20936
20936
|
...w()
|
|
20937
20937
|
];
|
|
@@ -21002,7 +21002,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
21002
21002
|
aspect: [{ aspect: [
|
|
21003
21003
|
"auto",
|
|
21004
21004
|
"square",
|
|
21005
|
-
|
|
21005
|
+
B,
|
|
21006
21006
|
ct,
|
|
21007
21007
|
gt,
|
|
21008
21008
|
g
|
|
@@ -21114,7 +21114,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
21114
21114
|
ct
|
|
21115
21115
|
] }],
|
|
21116
21116
|
basis: [{ basis: [
|
|
21117
|
-
|
|
21117
|
+
B,
|
|
21118
21118
|
"full",
|
|
21119
21119
|
"auto",
|
|
21120
21120
|
s,
|
|
@@ -21133,7 +21133,7 @@ var se = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ce = oe, le
|
|
|
21133
21133
|
] }],
|
|
21134
21134
|
flex: [{ flex: [
|
|
21135
21135
|
Ze,
|
|
21136
|
-
|
|
21136
|
+
B,
|
|
21137
21137
|
"auto",
|
|
21138
21138
|
"initial",
|
|
21139
21139
|
"none",
|
|
@@ -26903,7 +26903,7 @@ var Ud = class {
|
|
|
26903
26903
|
//#region src/client/telemetry/utils.ts
|
|
26904
26904
|
function of() {
|
|
26905
26905
|
try {
|
|
26906
|
-
return "
|
|
26906
|
+
return "12.0.0-canary.0";
|
|
26907
26907
|
} catch {
|
|
26908
26908
|
return "0.0.0";
|
|
26909
26909
|
}
|
|
@@ -48446,9 +48446,9 @@ var TM, EM, DM, OM, kM, AM, jM, MM, NM, PM, FM, IM, LM, RM, zM, BM, VM, HM, UM,
|
|
|
48446
48446
|
}(), uce);
|
|
48447
48447
|
}));
|
|
48448
48448
|
//#endregion
|
|
48449
|
-
//#region ../mcp-use/dist/chunk-
|
|
48449
|
+
//#region ../mcp-use/dist/chunk-E5HANIXF.js
|
|
48450
48450
|
Xp();
|
|
48451
|
-
var hce = "1.
|
|
48451
|
+
var hce = "1.34.0-canary.0";
|
|
48452
48452
|
function _R() {
|
|
48453
48453
|
return hce;
|
|
48454
48454
|
}
|
|
@@ -56971,7 +56971,7 @@ function Nde(e) {
|
|
|
56971
56971
|
}
|
|
56972
56972
|
W(Nde, "deriveOAuthProxyUrl");
|
|
56973
56973
|
function bB(e) {
|
|
56974
|
-
let t = Nde(e.gatewayUrl);
|
|
56974
|
+
let t = e.oauthProxyUrl ?? Nde(e.gatewayUrl);
|
|
56975
56975
|
return {
|
|
56976
56976
|
provider: new mde(e.effectiveOAuthUrl, {
|
|
56977
56977
|
storageKeyPrefix: e.storageKeyPrefix,
|
|
@@ -57025,231 +57025,232 @@ function Pde(e) {
|
|
|
57025
57025
|
W(Pde, "startConnectionHealthMonitoring");
|
|
57026
57026
|
var xB = 3e3, Fde = 5e3;
|
|
57027
57027
|
function Ide(e) {
|
|
57028
|
-
let { url: t, enabled: n = !0, callbackUrl: r = typeof window < "u" ? iB(new URL("/oauth/callback", window.location.origin).toString()) : "/oauth/callback", storageKeyPrefix: i = "mcp:auth", clientConfig: a = {}, authProvider: o, headers: s, customHeaders: c, proxyConfig: l,
|
|
57029
|
-
client_id:
|
|
57030
|
-
...
|
|
57031
|
-
} : void 0, [
|
|
57028
|
+
let { url: t, enabled: n = !0, callbackUrl: r = typeof window < "u" ? iB(new URL("/oauth/callback", window.location.origin).toString()) : "/oauth/callback", storageKeyPrefix: i = "mcp:auth", clientConfig: a = {}, authProvider: o, headers: s, customHeaders: c, proxyConfig: l, oauthProxyUrl: u, autoProxyFallback: d = !0, debug: f = !1, logLevel: p, autoRetry: m = !1, autoReconnect: h = xB, reconnectionOptions: g, transportType: _ = "auto", preventAutoAuth: v = !0, useRedirectFlow: y = !1, onPopupWindow: b, timeout: x = 3e4, sseReadTimeout: S = 3e5, wrapTransport: C, fetch: w, clientOptions: T, onNotification: E, onSampling: D, samplingCallback: O, onElicitation: k, elicitationCallback: j, oauth: M } = e, N = M?.clientId?.trim() || void 0, P = M?.clientSecret?.trim() || void 0, F = M?.scope?.trim() || void 0, I = (0, A.useMemo)(() => N ? {
|
|
57029
|
+
client_id: N,
|
|
57030
|
+
...P ? { client_secret: P } : {}
|
|
57031
|
+
} : void 0, [N, P]), L = (0, A.useMemo)(() => {
|
|
57032
57032
|
let e = `useMcp:${t || "no-url"}`, n = tm.get(e);
|
|
57033
|
-
return
|
|
57033
|
+
return p ? n.level = p : f && (n.level = "debug"), n;
|
|
57034
57034
|
}, [
|
|
57035
57035
|
t,
|
|
57036
|
-
|
|
57037
|
-
|
|
57038
|
-
]),
|
|
57039
|
-
c && !s &&
|
|
57040
|
-
let
|
|
57041
|
-
|
|
57042
|
-
let
|
|
57043
|
-
|
|
57044
|
-
let
|
|
57036
|
+
p,
|
|
57037
|
+
f
|
|
57038
|
+
]), ee = s ?? c ?? {};
|
|
57039
|
+
c && !s && L.warn("[useMcp] The \"customHeaders\" option is deprecated. Use \"headers\" instead.");
|
|
57040
|
+
let te = D ?? O;
|
|
57041
|
+
O && !D && L.warn("[useMcp] The \"samplingCallback\" option is deprecated. Use \"onSampling\" instead.");
|
|
57042
|
+
let ne = k ?? j;
|
|
57043
|
+
j && !k && nm.warn("[useMcp] The \"elicitationCallback\" option is deprecated. Use \"onElicitation\" instead.");
|
|
57044
|
+
let re = (0, A.useMemo)(() => ({
|
|
57045
57045
|
name: "mcp-use",
|
|
57046
57046
|
title: "mcp-use",
|
|
57047
57047
|
version: _R(),
|
|
57048
57048
|
description: "mcp-use is a complete TypeScript framework for building and using MCP",
|
|
57049
57049
|
icons: [{ src: "https://mcp-use.com/logo.png" }],
|
|
57050
57050
|
websiteUrl: "https://mcp-use.com"
|
|
57051
|
-
}), []),
|
|
57052
|
-
...
|
|
57051
|
+
}), []), ie = (0, A.useMemo)(() => e.clientInfo ? {
|
|
57052
|
+
...re,
|
|
57053
57053
|
...e.clientInfo
|
|
57054
|
-
} :
|
|
57055
|
-
...
|
|
57054
|
+
} : re, [e.clientInfo, re]), R = (0, A.useMemo)(() => jde(ie), [ie]), z = (0, A.useMemo)(() => a && Object.keys(a).length > 0 ? (L.warn("[useMcp] The 'clientConfig' option is deprecated and will be removed in a future version. Use 'clientInfo' instead. The clientConfig will be automatically derived from clientInfo."), {
|
|
57055
|
+
...R,
|
|
57056
57056
|
...a
|
|
57057
|
-
}) :
|
|
57058
|
-
enabled:
|
|
57057
|
+
}) : R, [a, R]), ae = (0, A.useMemo)(() => d ? typeof d == "boolean" ? {
|
|
57058
|
+
enabled: d,
|
|
57059
57059
|
proxyAddress: "https://inspector.mcp-use.com/inspector/api/proxy"
|
|
57060
57060
|
} : {
|
|
57061
|
-
enabled:
|
|
57062
|
-
proxyAddress:
|
|
57061
|
+
enabled: d.enabled !== !1,
|
|
57062
|
+
proxyAddress: d.proxyAddress || "https://inspector.mcp-use.com/inspector/api/proxy"
|
|
57063
57063
|
} : {
|
|
57064
57064
|
enabled: !1,
|
|
57065
57065
|
proxyAddress: void 0
|
|
57066
|
-
}, [
|
|
57066
|
+
}, [d]), oe = (0, A.useMemo)(() => h === !1 ? {
|
|
57067
57067
|
enabled: !1,
|
|
57068
57068
|
initialDelay: 0,
|
|
57069
57069
|
healthCheckInterval: !1,
|
|
57070
57070
|
healthCheckTimeout: 3e4
|
|
57071
|
-
} :
|
|
57071
|
+
} : h === !0 ? {
|
|
57072
57072
|
enabled: !0,
|
|
57073
57073
|
initialDelay: xB,
|
|
57074
57074
|
healthCheckInterval: 1e4,
|
|
57075
57075
|
healthCheckTimeout: 3e4
|
|
57076
|
-
} : typeof
|
|
57076
|
+
} : typeof h == "number" ? {
|
|
57077
57077
|
enabled: !0,
|
|
57078
|
-
initialDelay:
|
|
57078
|
+
initialDelay: h,
|
|
57079
57079
|
healthCheckInterval: 1e4,
|
|
57080
57080
|
healthCheckTimeout: 3e4
|
|
57081
57081
|
} : {
|
|
57082
|
-
enabled:
|
|
57083
|
-
initialDelay:
|
|
57084
|
-
healthCheckInterval:
|
|
57085
|
-
healthCheckTimeout:
|
|
57086
|
-
}, [
|
|
57082
|
+
enabled: h.enabled !== !1,
|
|
57083
|
+
initialDelay: h.initialDelay ?? xB,
|
|
57084
|
+
healthCheckInterval: h.healthCheckInterval ?? 1e4,
|
|
57085
|
+
healthCheckTimeout: h.healthCheckTimeout ?? 3e4
|
|
57086
|
+
}, [h]), [se, ce] = (0, A.useState)(void 0);
|
|
57087
57087
|
(0, A.useEffect)(() => {
|
|
57088
|
-
|
|
57088
|
+
ce(void 0);
|
|
57089
57089
|
}, [t, l]);
|
|
57090
|
-
let
|
|
57091
|
-
if (!
|
|
57090
|
+
let le = (0, A.useMemo)(() => {
|
|
57091
|
+
if (!se?.proxyAddress) return l;
|
|
57092
57092
|
let e = l?.headers ?? l?.customHeaders ?? {};
|
|
57093
57093
|
return {
|
|
57094
|
-
...
|
|
57094
|
+
...se,
|
|
57095
57095
|
headers: {
|
|
57096
57096
|
...e,
|
|
57097
|
-
...
|
|
57097
|
+
...se.headers ?? se.customHeaders ?? {}
|
|
57098
57098
|
}
|
|
57099
57099
|
};
|
|
57100
|
-
}, [
|
|
57101
|
-
let e = Ade(t || "",
|
|
57100
|
+
}, [se, l]), { gatewayUrl: ue, proxyHeaders: de } = (0, A.useMemo)(() => {
|
|
57101
|
+
let e = Ade(t || "", le);
|
|
57102
57102
|
return {
|
|
57103
|
-
gatewayUrl:
|
|
57103
|
+
gatewayUrl: le?.proxyAddress,
|
|
57104
57104
|
proxyHeaders: e.headers
|
|
57105
57105
|
};
|
|
57106
|
-
}, [t,
|
|
57107
|
-
...
|
|
57108
|
-
...
|
|
57109
|
-
}), [
|
|
57106
|
+
}, [t, le]), fe = (0, A.useMemo)(() => t || "", [t]), pe = (0, A.useMemo)(() => ({
|
|
57107
|
+
...de,
|
|
57108
|
+
...ee
|
|
57109
|
+
}), [de, ee]), [me, he] = (0, A.useState)("discovering"), [ge, _e] = (0, A.useState)([]), [ve, ye] = (0, A.useState)([]), [be, xe] = (0, A.useState)([]), [Se, Ce] = (0, A.useState)([]), [we, Te] = (0, A.useState)(e._initialServerInfo?.name ? e._initialServerInfo : void 0), [Ee, De] = (0, A.useState)(), [Oe, ke] = (0, A.useState)(void 0), [Ae, je] = (0, A.useState)([]), [Me, Ne] = (0, A.useState)(void 0), [Pe, Fe] = (0, A.useState)(void 0), Ie = (0, A.useRef)(null), Le = (0, A.useRef)(o ?? null), Re = (0, A.useRef)(null), ze = (0, A.useRef)(!1), Be = (0, A.useRef)(!0), Ve = (0, A.useRef)(0), He = (0, A.useRef)(0), Ue = (0, A.useRef)(null), We = (0, A.useRef)(!1), Ge = (0, A.useRef)(!1), Ke = (0, A.useRef)(me), qe = (0, A.useRef)(h), Je = (0, A.useRef)(null), Ye = (0, A.useRef)(null), Xe = (0, A.useRef)(null);
|
|
57110
57110
|
(0, A.useEffect)(() => {
|
|
57111
|
-
|
|
57112
|
-
}, [
|
|
57113
|
-
|
|
57111
|
+
Ke.current = me, qe.current = h;
|
|
57112
|
+
}, [me, h]), (0, A.useEffect)(() => {
|
|
57113
|
+
Le.current = o ?? null;
|
|
57114
57114
|
}, [o]);
|
|
57115
57115
|
let B = (0, A.useCallback)((e, t, ...n) => {
|
|
57116
57116
|
let r = n.length > 0 ? `${t} ${n.map((e) => JSON.stringify(e)).join(" ")}` : t, i = `[useMcp] ${r}`;
|
|
57117
57117
|
switch (e) {
|
|
57118
57118
|
case "error":
|
|
57119
|
-
|
|
57119
|
+
L.error(i);
|
|
57120
57120
|
break;
|
|
57121
57121
|
case "warn":
|
|
57122
|
-
|
|
57122
|
+
L.warn(i);
|
|
57123
57123
|
break;
|
|
57124
57124
|
case "info":
|
|
57125
|
-
|
|
57125
|
+
L.info(i);
|
|
57126
57126
|
break;
|
|
57127
57127
|
case "debug":
|
|
57128
|
-
|
|
57128
|
+
L.debug(i);
|
|
57129
57129
|
break;
|
|
57130
|
-
default:
|
|
57130
|
+
default: L.info(i);
|
|
57131
57131
|
}
|
|
57132
|
-
|
|
57132
|
+
Be.current && je((t) => [...t.slice(-100), {
|
|
57133
57133
|
level: e,
|
|
57134
57134
|
message: r,
|
|
57135
57135
|
timestamp: Date.now()
|
|
57136
57136
|
}]);
|
|
57137
|
-
}, [
|
|
57138
|
-
e || B("info", "Disconnecting..."),
|
|
57139
|
-
let t =
|
|
57137
|
+
}, [L]), Ze = (0, A.useCallback)(async (e = !1) => {
|
|
57138
|
+
e || B("info", "Disconnecting..."), ze.current = !1, Ue.current && clearTimeout(Ue.current), Ue.current = null;
|
|
57139
|
+
let t = He.current, n = Ie.current;
|
|
57140
57140
|
if (n) try {
|
|
57141
57141
|
let e = vB, t = n.getSession(e);
|
|
57142
57142
|
t && t._healthCheckCleanup && (t._healthCheckCleanup(), t._healthCheckCleanup = null), t && await n.closeSession(e);
|
|
57143
57143
|
} catch (t) {
|
|
57144
57144
|
e || B("warn", "Error closing session:", t);
|
|
57145
57145
|
}
|
|
57146
|
-
let r =
|
|
57147
|
-
|
|
57148
|
-
}, [B]),
|
|
57146
|
+
let r = He.current !== t;
|
|
57147
|
+
Ie.current === n && !r && (Ie.current = null), Be.current && !e && !r && (he("discovering"), _e([]), ye([]), xe([]), Ce([]), ke(void 0), Ne(void 0));
|
|
57148
|
+
}, [B]), Qe = (0, A.useCallback)((e, n) => {
|
|
57149
57149
|
B("error", e, n ?? "");
|
|
57150
|
-
let r = n && "code" in n ? n.code : void 0, i =
|
|
57151
|
-
if (i && (a || s || typeof r == "number" && r >= 404 && r < 500) && !(r === 401 || r === 403)) return B("info", `Direct connection failed with ${a ? "CORS error" : s ? "HTTP 400 (Bad Request)" : "HTTP 4xx error"}. Trying with proxy...`),
|
|
57152
|
-
|
|
57150
|
+
let r = n && "code" in n ? n.code : void 0, i = ae.enabled && !le?.proxyAddress, a = e.includes("CORS") || e.includes("blocked by CORS policy") || e.includes("Failed to fetch"), s = r === 400;
|
|
57151
|
+
if (i && (a || s || typeof r == "number" && r >= 404 && r < 500) && !(r === 401 || r === 403)) return B("info", `Direct connection failed with ${a ? "CORS error" : s ? "HTTP 400 (Bad Request)" : "HTTP 4xx error"}. Trying with proxy...`), Ie.current = null, o || (Le.current = null), B("debug", "Cleared client and auth provider for proxy fallback"), ce({ proxyAddress: ae.proxyAddress }), Be.current && he("discovering"), setTimeout(() => {
|
|
57152
|
+
Be.current && Ye.current?.();
|
|
57153
57153
|
}, 1e3), !0;
|
|
57154
|
-
if (
|
|
57155
|
-
B("info", "Setting state to FAILED:", e),
|
|
57156
|
-
let t =
|
|
57157
|
-
t && (
|
|
57154
|
+
if (Be.current) {
|
|
57155
|
+
B("info", "Setting state to FAILED:", e), he("failed"), ke(e);
|
|
57156
|
+
let t = Le.current?.getLastAttemptedAuthUrl?.();
|
|
57157
|
+
t && (Ne(t), B("info", "Manual authentication URL may be available.", t));
|
|
57158
57158
|
}
|
|
57159
|
-
return
|
|
57159
|
+
return ze.current = !1, t && CR.getInstance().trackUseMcpConnection({
|
|
57160
57160
|
url: t,
|
|
57161
|
-
transportType:
|
|
57161
|
+
transportType: _,
|
|
57162
57162
|
success: !1,
|
|
57163
57163
|
errorType: n?.name || "UnknownError",
|
|
57164
|
-
hasOAuth: !!
|
|
57165
|
-
hasSampling: !!
|
|
57166
|
-
hasElicitation: !!
|
|
57164
|
+
hasOAuth: !!Le.current,
|
|
57165
|
+
hasSampling: !!te,
|
|
57166
|
+
hasElicitation: !!ne
|
|
57167
57167
|
}).catch(() => {}), !1;
|
|
57168
57168
|
}, [
|
|
57169
57169
|
B,
|
|
57170
57170
|
t,
|
|
57171
|
-
|
|
57172
|
-
ee,
|
|
57171
|
+
_,
|
|
57173
57172
|
te,
|
|
57174
|
-
|
|
57175
|
-
|
|
57173
|
+
ne,
|
|
57174
|
+
ae,
|
|
57175
|
+
le,
|
|
57176
57176
|
o
|
|
57177
|
-
]),
|
|
57177
|
+
]), $e = (0, A.useCallback)(async () => {
|
|
57178
57178
|
if (!n || !t) {
|
|
57179
57179
|
B("debug", n ? "No server URL provided, skipping connection." : "Connection disabled via enabled flag.");
|
|
57180
57180
|
return;
|
|
57181
57181
|
}
|
|
57182
|
-
if (
|
|
57182
|
+
if (ze.current) {
|
|
57183
57183
|
B("debug", "Connection attempt already in progress.");
|
|
57184
57184
|
return;
|
|
57185
57185
|
}
|
|
57186
|
-
if (!
|
|
57186
|
+
if (!Be.current) {
|
|
57187
57187
|
B("debug", "Connect called after unmount, aborting.");
|
|
57188
57188
|
return;
|
|
57189
57189
|
}
|
|
57190
|
-
if (
|
|
57190
|
+
if (ze.current = !0, He.current += 1, Ve.current += 1, ke(void 0), Ne(void 0), Je.current = null, he("discovering"), B("info", `Connecting attempt #${Ve.current} to ${t}...`), !Le.current) {
|
|
57191
57191
|
let { provider: e, oauthProxyUrl: t } = bB({
|
|
57192
|
-
effectiveOAuthUrl:
|
|
57192
|
+
effectiveOAuthUrl: fe,
|
|
57193
57193
|
storageKeyPrefix: i,
|
|
57194
|
-
oauthClientConfig:
|
|
57194
|
+
oauthClientConfig: z,
|
|
57195
57195
|
callbackUrl: r,
|
|
57196
|
-
preventAutoAuth:
|
|
57197
|
-
useRedirectFlow:
|
|
57198
|
-
gatewayUrl:
|
|
57199
|
-
|
|
57196
|
+
preventAutoAuth: v,
|
|
57197
|
+
useRedirectFlow: y,
|
|
57198
|
+
gatewayUrl: ue,
|
|
57199
|
+
oauthProxyUrl: u,
|
|
57200
|
+
onPopupWindow: b,
|
|
57200
57201
|
proxyOAuthRequests: !0,
|
|
57201
|
-
staticClientInfo:
|
|
57202
|
-
scope:
|
|
57202
|
+
staticClientInfo: I,
|
|
57203
|
+
scope: F
|
|
57203
57204
|
});
|
|
57204
|
-
|
|
57205
|
+
Le.current = e, t && B("debug", `OAuth proxy URL in effect: ${t}`), B("debug", `BrowserOAuthClientProvider initialized with URL: ${fe}, proxy: ${t ? "enabled" : "disabled"}, gateway: ${ue ? "enabled" : "disabled"}`);
|
|
57205
57206
|
}
|
|
57206
|
-
|
|
57207
|
+
Ie.current ? B("debug", "BrowserMCPClient already exists, reusing.") : (Ie.current = new lde(), B("debug", "BrowserMCPClient initialized in connect."));
|
|
57207
57208
|
let e = /* @__PURE__ */ W(async (n) => {
|
|
57208
|
-
if (!
|
|
57209
|
-
B("info", `Attempting connection with transport: ${n}`), B("debug", `Client ref status at start of tryConnectWithTransport: ${
|
|
57209
|
+
if (!Be.current) return B("debug", "Connection attempt aborted - component unmounted"), "failed";
|
|
57210
|
+
B("info", `Attempting connection with transport: ${n}`), B("debug", `Client ref status at start of tryConnectWithTransport: ${Ie.current ? "initialized" : "NULL"}`);
|
|
57210
57211
|
try {
|
|
57211
57212
|
let e = vB, r = {
|
|
57212
57213
|
url: t,
|
|
57213
57214
|
transport: n === "sse" ? "http" : n,
|
|
57214
|
-
timeout:
|
|
57215
|
-
sseReadTimeout:
|
|
57216
|
-
disableSseFallback:
|
|
57215
|
+
timeout: x,
|
|
57216
|
+
sseReadTimeout: S,
|
|
57217
|
+
disableSseFallback: _ === "http",
|
|
57217
57218
|
preferSse: n === "sse",
|
|
57218
|
-
clientInfo:
|
|
57219
|
+
clientInfo: ie,
|
|
57219
57220
|
...(() => {
|
|
57220
|
-
let e =
|
|
57221
|
+
let e = Le.current?.getProxyFetch?.(w) ?? w;
|
|
57221
57222
|
return e ? { fetch: e } : {};
|
|
57222
57223
|
})(),
|
|
57223
|
-
...
|
|
57224
|
-
...
|
|
57224
|
+
...T && { clientOptions: T },
|
|
57225
|
+
...g ? { reconnectionOptions: g } : h === !1 ? { reconnectionOptions: { maxRetries: 0 } } : {}
|
|
57225
57226
|
};
|
|
57226
|
-
if (
|
|
57227
|
-
if (!
|
|
57227
|
+
if (ue && (r.gatewayUrl = ue, B("debug", `Using proxy gateway: ${ue} for target: ${t}`)), pe && Object.keys(pe).length > 0 && (r.headers = pe), !Ie.current) {
|
|
57228
|
+
if (!Be.current) return B("debug", "Connection aborted - component unmounted, client cleaned up"), "failed";
|
|
57228
57229
|
let e = /* @__PURE__ */ Error("Client not initialized - this is a bug in the connection flow");
|
|
57229
57230
|
throw B("error", "Client ref is null in tryConnectWithTransport but component is still mounted"), e;
|
|
57230
57231
|
}
|
|
57231
|
-
|
|
57232
|
+
Ie.current.addServer(e, {
|
|
57232
57233
|
...r,
|
|
57233
|
-
authProvider:
|
|
57234
|
-
onSampling:
|
|
57235
|
-
onElicitation:
|
|
57236
|
-
wrapTransport:
|
|
57234
|
+
authProvider: Le.current,
|
|
57235
|
+
onSampling: te,
|
|
57236
|
+
onElicitation: ne,
|
|
57237
|
+
wrapTransport: C ? (n) => (B("debug", "Applying transport wrapper for server:", e, "url:", t), C(n, t)) : void 0
|
|
57237
57238
|
});
|
|
57238
|
-
let i = await
|
|
57239
|
-
if (!
|
|
57239
|
+
let i = await Ie.current.createSession(e, !1);
|
|
57240
|
+
if (!Be.current) return B("debug", "Connection aborted after session creation - component unmounted"), "failed";
|
|
57240
57241
|
if (i.on("notification", (e) => {
|
|
57241
|
-
B("debug", "Notification received:", e.method, e),
|
|
57242
|
+
B("debug", "Notification received:", e.method, e), E?.(e), e.method === "notifications/tools/list_changed" ? (B("info", "Tools list changed, auto-refreshing..."), st().catch((e) => {
|
|
57242
57243
|
B("warn", "Auto-refresh tools failed:", e);
|
|
57243
|
-
})) : e.method === "notifications/resources/list_changed" ? (B("info", "Resources list changed, auto-refreshing..."),
|
|
57244
|
-
}), await i.initialize(), !
|
|
57245
|
-
if (B("info", "✅ Successfully connected to MCP server"), B("info", "Server info:", i.connector.serverInfo), B("info", "Server capabilities:", i.connector.serverCapabilities), !
|
|
57246
|
-
|
|
57247
|
-
gatewayUrl:
|
|
57244
|
+
})) : e.method === "notifications/resources/list_changed" ? (B("info", "Resources list changed, auto-refreshing..."), ct().catch((e) => B("warn", "Auto-refresh resources failed:", e))) : e.method === "notifications/prompts/list_changed" && (B("info", "Prompts list changed, auto-refreshing..."), lt().catch((e) => B("warn", "Auto-refresh prompts failed:", e)));
|
|
57245
|
+
}), await i.initialize(), !Be.current) return B("debug", "Connection completed but component unmounted, aborting"), "failed";
|
|
57246
|
+
if (B("info", "✅ Successfully connected to MCP server"), B("info", "Server info:", i.connector.serverInfo), B("info", "Server capabilities:", i.connector.serverCapabilities), !Be.current) return B("debug", "Skipping state update - component unmounted"), "failed";
|
|
57247
|
+
he("ready"), Je.current = n, oe.enabled && oe.healthCheckInterval !== !1 && (i._healthCheckCleanup = Pde({
|
|
57248
|
+
gatewayUrl: ue,
|
|
57248
57249
|
url: t,
|
|
57249
|
-
allHeaders:
|
|
57250
|
+
allHeaders: pe,
|
|
57250
57251
|
getAuthHeaders: /* @__PURE__ */ W(async () => {
|
|
57251
57252
|
try {
|
|
57252
|
-
let e = await
|
|
57253
|
+
let e = await Le.current?.tokens?.();
|
|
57253
57254
|
if (e?.access_token) {
|
|
57254
57255
|
let t = e.token_type || "bearer";
|
|
57255
57256
|
return { Authorization: `${t.charAt(0).toUpperCase() + t.slice(1)} ${e.access_token}` };
|
|
@@ -57257,37 +57258,37 @@ function Ide(e) {
|
|
|
57257
57258
|
} catch {}
|
|
57258
57259
|
return {};
|
|
57259
57260
|
}, "getAuthHeaders"),
|
|
57260
|
-
isMountedRef:
|
|
57261
|
-
stateRef:
|
|
57262
|
-
autoReconnectRef:
|
|
57263
|
-
setState:
|
|
57261
|
+
isMountedRef: Be,
|
|
57262
|
+
stateRef: Ke,
|
|
57263
|
+
autoReconnectRef: qe,
|
|
57264
|
+
setState: he,
|
|
57264
57265
|
addLog: B,
|
|
57265
|
-
connect:
|
|
57266
|
-
defaultReconnectDelay:
|
|
57267
|
-
healthCheckIntervalMs:
|
|
57268
|
-
healthCheckTimeoutMs:
|
|
57266
|
+
connect: $e,
|
|
57267
|
+
defaultReconnectDelay: oe.initialDelay,
|
|
57268
|
+
healthCheckIntervalMs: oe.healthCheckInterval,
|
|
57269
|
+
healthCheckTimeoutMs: oe.healthCheckTimeout
|
|
57269
57270
|
})), CR.getInstance().trackUseMcpConnection({
|
|
57270
57271
|
url: t,
|
|
57271
57272
|
transportType: n,
|
|
57272
57273
|
success: !0,
|
|
57273
|
-
hasOAuth: !!
|
|
57274
|
-
hasSampling: !!
|
|
57275
|
-
hasElicitation: !!
|
|
57276
|
-
}).catch(() => {}),
|
|
57274
|
+
hasOAuth: !!Le.current,
|
|
57275
|
+
hasSampling: !!te,
|
|
57276
|
+
hasElicitation: !!ne
|
|
57277
|
+
}).catch(() => {}), _e(i.connector.tools || []);
|
|
57277
57278
|
let a = await i.connector.listAllResources();
|
|
57278
|
-
if (!
|
|
57279
|
-
|
|
57279
|
+
if (!Be.current) return B("debug", "Connection aborted after listing resources - component unmounted"), "failed";
|
|
57280
|
+
ye(a.resources || []);
|
|
57280
57281
|
let o = await i.connector.listPrompts();
|
|
57281
|
-
if (!
|
|
57282
|
-
if (
|
|
57282
|
+
if (!Be.current) return B("debug", "Connection aborted after listing prompts - component unmounted"), "failed";
|
|
57283
|
+
if (Ce(o.prompts || []), i.connector.serverCapabilities?.resourceTemplates) {
|
|
57283
57284
|
let e = await i.connector.listResourceTemplates();
|
|
57284
|
-
if (!
|
|
57285
|
-
|
|
57286
|
-
} else
|
|
57285
|
+
if (!Be.current) return B("debug", "Connection aborted after listing resource templates - component unmounted"), "failed";
|
|
57286
|
+
xe(e.resourceTemplates || []);
|
|
57287
|
+
} else xe([]);
|
|
57287
57288
|
let s = i.connector.serverInfo, c = i.connector.serverCapabilities;
|
|
57288
57289
|
if (s) {
|
|
57289
|
-
if (B("debug", "Server info:", s), !
|
|
57290
|
-
|
|
57290
|
+
if (B("debug", "Server info:", s), !Be.current) return B("debug", "Skipping state update - component unmounted"), "failed";
|
|
57291
|
+
Te(s), Re.current = (async () => {
|
|
57291
57292
|
try {
|
|
57292
57293
|
let e = s.icons;
|
|
57293
57294
|
if (e && Array.isArray(e) && e.length > 0) {
|
|
@@ -57298,7 +57299,7 @@ function Ide(e) {
|
|
|
57298
57299
|
let r = new FileReader();
|
|
57299
57300
|
r.onloadend = () => t(r.result), r.onerror = n, r.readAsDataURL(e);
|
|
57300
57301
|
});
|
|
57301
|
-
return
|
|
57302
|
+
return Be.current && (Te((e) => e ? {
|
|
57302
57303
|
...e,
|
|
57303
57304
|
icon: n
|
|
57304
57305
|
} : void 0), B("debug", "Server icon converted to base64")), n;
|
|
@@ -57306,8 +57307,8 @@ function Ide(e) {
|
|
|
57306
57307
|
}
|
|
57307
57308
|
if (t) {
|
|
57308
57309
|
let e = await kde(t);
|
|
57309
|
-
if (!
|
|
57310
|
-
if (e) return
|
|
57310
|
+
if (!Be.current) return B("debug", "Connection aborted after favicon detection - component unmounted"), null;
|
|
57311
|
+
if (e) return Te((t) => t ? {
|
|
57311
57312
|
...t,
|
|
57312
57313
|
icon: e
|
|
57313
57314
|
} : void 0), B("debug", "Favicon detected and added to serverInfo"), e;
|
|
@@ -57319,26 +57320,26 @@ function Ide(e) {
|
|
|
57319
57320
|
})();
|
|
57320
57321
|
}
|
|
57321
57322
|
if (c) {
|
|
57322
|
-
if (B("debug", "Server capabilities:", c), !
|
|
57323
|
-
|
|
57323
|
+
if (B("debug", "Server capabilities:", c), !Be.current) return B("debug", "Skipping state update - component unmounted"), "failed";
|
|
57324
|
+
De(c);
|
|
57324
57325
|
}
|
|
57325
|
-
if (
|
|
57326
|
-
let e = await
|
|
57327
|
-
if (!
|
|
57326
|
+
if (Le.current) {
|
|
57327
|
+
let e = await Le.current.tokens?.();
|
|
57328
|
+
if (!Be.current) return B("debug", "Connection aborted after token fetch for auth tokens - component unmounted"), "failed";
|
|
57328
57329
|
if (e?.access_token) {
|
|
57329
57330
|
let t = e.expires_in ? Date.now() + e.expires_in * 1e3 : void 0, n = null, r = null;
|
|
57330
57331
|
try {
|
|
57331
|
-
n = await
|
|
57332
|
+
n = await Le.current.getTokenEndpoint?.() ?? null;
|
|
57332
57333
|
} catch {
|
|
57333
57334
|
n = null;
|
|
57334
57335
|
}
|
|
57335
57336
|
try {
|
|
57336
|
-
r = await
|
|
57337
|
+
r = await Le.current.getClientCredentials?.() ?? null;
|
|
57337
57338
|
} catch {
|
|
57338
57339
|
r = null;
|
|
57339
57340
|
}
|
|
57340
|
-
if (!
|
|
57341
|
-
|
|
57341
|
+
if (!Be.current) return B("debug", "Skipping state update - component unmounted"), "failed";
|
|
57342
|
+
Fe({
|
|
57342
57343
|
access_token: e.access_token,
|
|
57343
57344
|
token_type: e.token_type || "Bearer",
|
|
57344
57345
|
expires_at: t,
|
|
@@ -57352,91 +57353,94 @@ function Ide(e) {
|
|
|
57352
57353
|
}
|
|
57353
57354
|
return "success";
|
|
57354
57355
|
} catch (r) {
|
|
57355
|
-
let i = r, a = i?.message || String(r), o =
|
|
57356
|
-
if (o &&
|
|
57357
|
-
|
|
57358
|
-
if (s)
|
|
57359
|
-
|
|
57360
|
-
|
|
57361
|
-
|
|
57362
|
-
|
|
57363
|
-
|
|
57364
|
-
|
|
57356
|
+
let i = r, a = i?.message || String(r), o = Le.current?.getLastAttemptedAuthUrl?.();
|
|
57357
|
+
if (o && Le.current && v) return B("info", "OAuth already discovered (stored auth URL present); awaiting manual authentication."), Be.current && (he("pending_auth"), Ne(o)), ze.current = !1, "auth_redirect";
|
|
57358
|
+
let s = Mde(r), c = i.code === 401 || a.includes("401") || a.includes("Unauthorized");
|
|
57359
|
+
if (s && ee && Object.keys(ee).length > 0) return Qe("Authentication failed (HTTP 401). Server does not support OAuth. Check your Authorization header value is correct."), "failed";
|
|
57360
|
+
if (s && (!ee || Object.keys(ee).length === 0)) return Qe("Authentication required (HTTP 401). Server does not support OAuth. Add an Authorization header in the Custom Headers section (e.g., Authorization: Bearer YOUR_API_KEY)."), "failed";
|
|
57361
|
+
if (c) {
|
|
57362
|
+
if (s) return Qe("Authentication required (HTTP 401). Server does not support OAuth. Add an Authorization header in the Custom Headers section (e.g., Authorization: Bearer YOUR_API_KEY)."), "failed";
|
|
57363
|
+
if (Le.current) if (B("info", "Authentication required. OAuth provider available."), v) {
|
|
57364
|
+
if (B("info", "Waiting for user to initiate authentication flow..."), Be.current) {
|
|
57365
|
+
he("pending_auth");
|
|
57366
|
+
let e = Le.current?.getLastAttemptedAuthUrl?.();
|
|
57367
|
+
e && (Ne(e), B("info", "Retrieved stored auth URL for manual authentication"));
|
|
57365
57368
|
}
|
|
57366
|
-
return
|
|
57369
|
+
return ze.current = !1, "auth_redirect";
|
|
57367
57370
|
} else {
|
|
57368
57371
|
B("info", "Triggering automatic OAuth authentication flow...");
|
|
57369
57372
|
try {
|
|
57370
57373
|
let { resourceMetadataUrl: r, scope: i } = await Tde(t);
|
|
57371
|
-
if (await vz(
|
|
57374
|
+
if (await vz(Le.current, {
|
|
57372
57375
|
serverUrl: t,
|
|
57373
57376
|
...r && { resourceMetadataUrl: r },
|
|
57374
57377
|
...i && { scope: i },
|
|
57375
|
-
fetchFn:
|
|
57378
|
+
fetchFn: Le.current.getProxyFetch?.()
|
|
57376
57379
|
}) === "REDIRECT") {
|
|
57377
|
-
let e = await
|
|
57380
|
+
let e = await Le.current.getAuthorizationCode?.();
|
|
57378
57381
|
if (!e) throw Error("Authorization code not captured by headless provider");
|
|
57379
|
-
await vz(
|
|
57382
|
+
await vz(Le.current, {
|
|
57380
57383
|
serverUrl: t,
|
|
57381
57384
|
...r && { resourceMetadataUrl: r },
|
|
57382
57385
|
...i && { scope: i },
|
|
57383
57386
|
authorizationCode: e,
|
|
57384
|
-
fetchFn:
|
|
57387
|
+
fetchFn: Le.current.getProxyFetch?.()
|
|
57385
57388
|
});
|
|
57386
57389
|
}
|
|
57387
57390
|
return B("info", "OAuth flow completed, reconnecting..."), await e(n);
|
|
57388
57391
|
} catch (e) {
|
|
57389
|
-
return
|
|
57392
|
+
return Qe(`Automatic OAuth authentication failed: ${e instanceof Error ? e.message : String(e)}`, e instanceof Error ? e : Error(String(e))), "failed";
|
|
57390
57393
|
}
|
|
57391
57394
|
}
|
|
57392
|
-
return
|
|
57395
|
+
return ee && Object.keys(ee).length > 0 ? (Qe("Authentication failed: Server returned 401 Unauthorized. Check your Authorization header value is correct."), "failed") : (Qe("Authentication required: Server returned 401 Unauthorized. Add an Authorization header in the Custom Headers section (e.g., Authorization: Bearer YOUR_API_KEY)."), "failed");
|
|
57393
57396
|
}
|
|
57394
|
-
return
|
|
57397
|
+
return Qe(a, i instanceof Error ? i : Error(String(i))) ? "auth_redirect" : "failed";
|
|
57395
57398
|
}
|
|
57396
57399
|
}, "tryConnectWithTransport"), a = "failed";
|
|
57397
|
-
if (
|
|
57398
|
-
else if (
|
|
57400
|
+
if (_ === "sse") B("debug", "Using SSE-only transport mode"), a = await e("sse");
|
|
57401
|
+
else if (_ === "http") B("debug", "Using HTTP-only transport mode"), a = await e("http");
|
|
57399
57402
|
else {
|
|
57400
57403
|
B("debug", "Using auto transport mode (HTTP with SSE fallback)");
|
|
57401
57404
|
let t = await e("http");
|
|
57402
|
-
t === "fallback" &&
|
|
57405
|
+
t === "fallback" && Be.current && Ke.current !== "authenticating" ? (B("info", "HTTP failed, attempting SSE fallback..."), a = await e("sse")) : a = t;
|
|
57403
57406
|
}
|
|
57404
|
-
(a === "success" || a === "failed" || a === "auth_redirect") && (
|
|
57407
|
+
(a === "success" || a === "failed" || a === "auth_redirect") && (ze.current = !1), B("debug", `Connection sequence finished with status: ${a}`);
|
|
57405
57408
|
}, [
|
|
57406
57409
|
B,
|
|
57410
|
+
Qe,
|
|
57407
57411
|
Ze,
|
|
57408
|
-
Xe,
|
|
57409
57412
|
t,
|
|
57410
57413
|
i,
|
|
57411
57414
|
r,
|
|
57412
|
-
|
|
57413
|
-
|
|
57414
|
-
|
|
57415
|
-
|
|
57415
|
+
z.name,
|
|
57416
|
+
z.version,
|
|
57417
|
+
z.uri,
|
|
57418
|
+
z.logo_uri,
|
|
57419
|
+
I,
|
|
57416
57420
|
F,
|
|
57417
|
-
|
|
57418
|
-
L,
|
|
57419
|
-
g,
|
|
57421
|
+
ee,
|
|
57420
57422
|
_,
|
|
57421
57423
|
v,
|
|
57422
57424
|
y,
|
|
57423
|
-
n,
|
|
57424
57425
|
b,
|
|
57426
|
+
n,
|
|
57425
57427
|
x,
|
|
57426
|
-
|
|
57427
|
-
|
|
57428
|
-
|
|
57429
|
-
|
|
57428
|
+
S,
|
|
57429
|
+
ie,
|
|
57430
|
+
ue,
|
|
57431
|
+
u,
|
|
57432
|
+
pe,
|
|
57433
|
+
fe
|
|
57430
57434
|
]);
|
|
57431
57435
|
(0, A.useEffect)(() => {
|
|
57432
|
-
|
|
57433
|
-
}, [
|
|
57434
|
-
let
|
|
57435
|
-
if (
|
|
57436
|
+
Ye.current = $e, Xe.current = Qe;
|
|
57437
|
+
}, [$e, Qe]);
|
|
57438
|
+
let et = (0, A.useCallback)(async (e, t, n) => {
|
|
57439
|
+
if (Ke.current !== "ready" || !Ie.current) throw Error(`MCP client is not ready (${yB(Ke.current, !!Ie.current)}). Cannot call tool "${e}".`);
|
|
57436
57440
|
B("info", `Calling tool: ${e}`, t);
|
|
57437
57441
|
let r = Date.now();
|
|
57438
57442
|
try {
|
|
57439
|
-
let i = vB, a =
|
|
57443
|
+
let i = vB, a = Ie.current.getSession(i);
|
|
57440
57444
|
if (!a) throw Error("No active session found");
|
|
57441
57445
|
let o = await a.connector.callTool(e, t || {}, n);
|
|
57442
57446
|
return B("info", `Tool "${e}" call successful:`, o), CR.getInstance().trackUseMcpToolCall({
|
|
@@ -57452,45 +57456,46 @@ function Ide(e) {
|
|
|
57452
57456
|
executionTimeMs: Date.now() - r
|
|
57453
57457
|
}).catch(() => {}), t;
|
|
57454
57458
|
}
|
|
57455
|
-
}, [
|
|
57456
|
-
|
|
57457
|
-
}, [B]),
|
|
57459
|
+
}, [me]), tt = (0, A.useCallback)(() => {
|
|
57460
|
+
Ke.current === "failed" ? (B("info", "Retry requested..."), Ye.current?.()) : B("warn", `Retry called but state is not 'failed' (state: ${Ke.current}). Ignoring.`);
|
|
57461
|
+
}, [B]), nt = (0, A.useCallback)(async () => {
|
|
57458
57462
|
B("info", "Manual authentication requested...");
|
|
57459
|
-
let e =
|
|
57460
|
-
if (e === "failed") B("info", "Attempting to reconnect and authenticate via retry..."),
|
|
57463
|
+
let e = Ke.current;
|
|
57464
|
+
if (e === "failed") B("info", "Attempting to reconnect and authenticate via retry..."), tt();
|
|
57461
57465
|
else if (e === "pending_auth") {
|
|
57462
57466
|
B("info", "Proceeding with authentication from pending state...");
|
|
57463
57467
|
try {
|
|
57464
|
-
if (_B(
|
|
57468
|
+
if (_B(Le.current, "Auth Provider not available for manual auth"), _B(t, "Server URL is required for authentication"), o) {
|
|
57465
57469
|
B("info", "Using provided authProvider for manual authentication");
|
|
57466
57470
|
let e = new URL(t), n = e.origin + e.pathname.replace(/\/+$/, "");
|
|
57467
|
-
await vz(
|
|
57471
|
+
await vz(Le.current, {
|
|
57468
57472
|
serverUrl: n,
|
|
57469
|
-
fetchFn:
|
|
57470
|
-
}),
|
|
57473
|
+
fetchFn: Le.current.getProxyFetch?.()
|
|
57474
|
+
}), Ye.current?.();
|
|
57471
57475
|
return;
|
|
57472
57476
|
}
|
|
57473
|
-
B("info", `Cleared ${
|
|
57477
|
+
B("info", `Cleared ${Le.current.clearStorage?.() ?? 0} OAuth storage item(s) for fresh authentication`), he("authenticating");
|
|
57474
57478
|
let e = null, n = null, { provider: a, oauthProxyUrl: s } = bB({
|
|
57475
|
-
effectiveOAuthUrl:
|
|
57479
|
+
effectiveOAuthUrl: fe,
|
|
57476
57480
|
storageKeyPrefix: i,
|
|
57477
|
-
oauthClientConfig:
|
|
57481
|
+
oauthClientConfig: z,
|
|
57478
57482
|
callbackUrl: r,
|
|
57479
57483
|
preventAutoAuth: !1,
|
|
57480
|
-
useRedirectFlow:
|
|
57481
|
-
gatewayUrl:
|
|
57484
|
+
useRedirectFlow: y,
|
|
57485
|
+
gatewayUrl: ue,
|
|
57486
|
+
oauthProxyUrl: u,
|
|
57482
57487
|
onPopupWindow: /* @__PURE__ */ W((t, r, i) => {
|
|
57483
57488
|
e = i;
|
|
57484
57489
|
try {
|
|
57485
57490
|
n = new URL(t).searchParams.get("state");
|
|
57486
57491
|
} catch {}
|
|
57487
|
-
|
|
57492
|
+
b?.(t, r, i);
|
|
57488
57493
|
}, "captureOnPopupWindow"),
|
|
57489
|
-
proxyOAuthRequests: !
|
|
57490
|
-
staticClientInfo:
|
|
57491
|
-
scope:
|
|
57494
|
+
proxyOAuthRequests: !0,
|
|
57495
|
+
staticClientInfo: I,
|
|
57496
|
+
scope: F
|
|
57492
57497
|
});
|
|
57493
|
-
s &&
|
|
57498
|
+
s && B("info", "Scoped OAuth proxy fetch enabled for manual auth"), Le.current = a, B("info", "Triggering fresh OAuth authorization...");
|
|
57494
57499
|
let c = new URL(t), l = c.origin + c.pathname.replace(/\/+$/, "");
|
|
57495
57500
|
try {
|
|
57496
57501
|
await vz(a, {
|
|
@@ -57500,90 +57505,90 @@ function Ide(e) {
|
|
|
57500
57505
|
} catch (e) {
|
|
57501
57506
|
B("info", "OAuth flow initiated (popup/redirect):", e instanceof Error ? e.message : "Redirecting...");
|
|
57502
57507
|
}
|
|
57503
|
-
let
|
|
57504
|
-
if (
|
|
57505
|
-
n = new URL(
|
|
57508
|
+
let d = a.getLastAttemptedAuthUrl?.();
|
|
57509
|
+
if (d && (Ne(d), B("info", "Updated auth URL for fallback:", d), !n)) try {
|
|
57510
|
+
n = new URL(d).searchParams.get("state");
|
|
57506
57511
|
} catch {}
|
|
57507
|
-
if (
|
|
57508
|
-
let
|
|
57509
|
-
if (!
|
|
57512
|
+
if (y) return;
|
|
57513
|
+
let f = a.getKey?.("tokens");
|
|
57514
|
+
if (!f) {
|
|
57510
57515
|
B("warn", "Could not derive tokens storage key; relying on callback listener.");
|
|
57511
57516
|
return;
|
|
57512
57517
|
}
|
|
57513
|
-
|
|
57514
|
-
let
|
|
57518
|
+
Ge.current = !0;
|
|
57519
|
+
let p;
|
|
57515
57520
|
try {
|
|
57516
|
-
|
|
57521
|
+
p = await gde({
|
|
57517
57522
|
popup: e,
|
|
57518
57523
|
state: n,
|
|
57519
|
-
tokensKey:
|
|
57524
|
+
tokensKey: f
|
|
57520
57525
|
});
|
|
57521
57526
|
} finally {
|
|
57522
|
-
|
|
57527
|
+
Ge.current = !1;
|
|
57523
57528
|
}
|
|
57524
|
-
if (!
|
|
57525
|
-
switch (
|
|
57529
|
+
if (!Be.current) return;
|
|
57530
|
+
switch (p.kind) {
|
|
57526
57531
|
case "success":
|
|
57527
|
-
B("info", "Authentication succeeded; reconnecting to MCP server..."),
|
|
57532
|
+
B("info", "Authentication succeeded; reconnecting to MCP server..."), ze.current = !1, Ye.current?.();
|
|
57528
57533
|
break;
|
|
57529
57534
|
case "cancelled":
|
|
57530
|
-
B("warn", "Authentication popup was closed before completing. Returning to pending_auth."),
|
|
57535
|
+
B("warn", "Authentication popup was closed before completing. Returning to pending_auth."), he("pending_auth");
|
|
57531
57536
|
break;
|
|
57532
57537
|
case "timeout":
|
|
57533
|
-
B("warn", "Authentication timed out waiting for the popup. Returning to pending_auth."),
|
|
57538
|
+
B("warn", "Authentication timed out waiting for the popup. Returning to pending_auth."), he("pending_auth");
|
|
57534
57539
|
break;
|
|
57535
57540
|
case "error":
|
|
57536
|
-
|
|
57541
|
+
Qe(`Authentication failed: ${p.error}`);
|
|
57537
57542
|
break;
|
|
57538
57543
|
default: break;
|
|
57539
57544
|
}
|
|
57540
57545
|
} catch (e) {
|
|
57541
|
-
if (!
|
|
57542
|
-
|
|
57546
|
+
if (!Be.current) return;
|
|
57547
|
+
he("pending_auth"), B("error", `Manual authentication failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
57543
57548
|
}
|
|
57544
57549
|
} else if (e === "authenticating") {
|
|
57545
57550
|
B("warn", "Already attempting authentication. Check for blocked popups or wait for timeout.");
|
|
57546
|
-
let e =
|
|
57547
|
-
e && !
|
|
57551
|
+
let e = Le.current?.getLastAttemptedAuthUrl?.();
|
|
57552
|
+
e && !Me && (Ne(e), B("info", "Manual authentication URL retrieved:", e));
|
|
57548
57553
|
} else B("info", `Client not in a state requiring manual authentication trigger (state: ${e}). If needed, try disconnecting and reconnecting.`);
|
|
57549
57554
|
}, [
|
|
57550
57555
|
B,
|
|
57551
|
-
|
|
57552
|
-
|
|
57553
|
-
|
|
57556
|
+
tt,
|
|
57557
|
+
Qe,
|
|
57558
|
+
Me,
|
|
57554
57559
|
t,
|
|
57555
|
-
v,
|
|
57556
57560
|
y,
|
|
57561
|
+
b,
|
|
57557
57562
|
i,
|
|
57558
|
-
|
|
57559
|
-
|
|
57560
|
-
|
|
57563
|
+
z.name,
|
|
57564
|
+
z.uri,
|
|
57565
|
+
z.logo_uri,
|
|
57566
|
+
I,
|
|
57561
57567
|
F,
|
|
57562
|
-
P,
|
|
57563
57568
|
r,
|
|
57564
|
-
|
|
57569
|
+
ie,
|
|
57565
57570
|
o
|
|
57566
|
-
]),
|
|
57567
|
-
|
|
57571
|
+
]), rt = (0, A.useCallback)(() => {
|
|
57572
|
+
Le.current?.clearStorage ? (B("info", `Cleared ${Le.current.clearStorage()} item(s) from localStorage for ${t}.`), Ne(void 0), Ze()) : B("warn", "Auth provider not initialized, cannot clear storage.");
|
|
57568
57573
|
}, [
|
|
57569
57574
|
t,
|
|
57570
57575
|
B,
|
|
57571
|
-
|
|
57572
|
-
]),
|
|
57573
|
-
if (
|
|
57576
|
+
Ze
|
|
57577
|
+
]), it = (0, A.useCallback)(async () => {
|
|
57578
|
+
if (Ke.current !== "ready" || !Ie.current) throw Error(`MCP client is not ready (${yB(Ke.current, !!Ie.current)}). Cannot list resources.`);
|
|
57574
57579
|
B("info", "Listing resources");
|
|
57575
57580
|
try {
|
|
57576
|
-
let e = vB, t =
|
|
57581
|
+
let e = vB, t = Ie.current.getSession(e);
|
|
57577
57582
|
if (!t) throw Error("No active session found");
|
|
57578
|
-
|
|
57583
|
+
ye((await t.connector.listAllResources()).resources || []), B("info", "Resources listed successfully");
|
|
57579
57584
|
} catch (e) {
|
|
57580
57585
|
throw B("error", "List resources failed:", e), e;
|
|
57581
57586
|
}
|
|
57582
|
-
}, [
|
|
57583
|
-
if (
|
|
57587
|
+
}, [me]), at = (0, A.useCallback)(async (e) => {
|
|
57588
|
+
if (Ke.current !== "ready" || !Ie.current) throw Error(`MCP client is not ready (${yB(Ke.current, !!Ie.current)}). Cannot read resource.`);
|
|
57584
57589
|
B("info", `Reading resource: ${e}`);
|
|
57585
57590
|
try {
|
|
57586
|
-
let t = vB, n =
|
|
57591
|
+
let t = vB, n = Ie.current.getSession(t);
|
|
57587
57592
|
if (!n) throw Error("No active session found");
|
|
57588
57593
|
let r = await n.connector.readResource(e);
|
|
57589
57594
|
return B("info", "Resource read successful:", r), CR.getInstance().trackUseMcpResourceRead({
|
|
@@ -57597,136 +57602,136 @@ function Ide(e) {
|
|
|
57597
57602
|
errorType: t instanceof Error ? t.name : "UnknownError"
|
|
57598
57603
|
}).catch(() => {}), t;
|
|
57599
57604
|
}
|
|
57600
|
-
}, [
|
|
57601
|
-
if (
|
|
57605
|
+
}, [me]), ot = (0, A.useCallback)(async () => {
|
|
57606
|
+
if (Ke.current !== "ready" || !Ie.current) throw Error(`MCP client is not ready (${yB(Ke.current, !!Ie.current)}). Cannot list prompts.`);
|
|
57602
57607
|
B("info", "Listing prompts");
|
|
57603
57608
|
try {
|
|
57604
|
-
let e = vB, t =
|
|
57609
|
+
let e = vB, t = Ie.current.getSession(e);
|
|
57605
57610
|
if (!t) throw Error("No active session found");
|
|
57606
|
-
|
|
57611
|
+
Ce((await t.connector.listPrompts()).prompts || []), B("info", "Prompts listed successfully");
|
|
57607
57612
|
} catch (e) {
|
|
57608
57613
|
throw B("error", "List prompts failed:", e), e;
|
|
57609
57614
|
}
|
|
57610
|
-
}, [
|
|
57611
|
-
if (
|
|
57612
|
-
B("debug", "Cannot refresh tools - client not ready. State:",
|
|
57615
|
+
}, [me]), st = (0, A.useCallback)(async () => {
|
|
57616
|
+
if (Ke.current !== "ready" || !Ie.current) {
|
|
57617
|
+
B("debug", "Cannot refresh tools - client not ready. State:", Ke.current);
|
|
57613
57618
|
return;
|
|
57614
57619
|
}
|
|
57615
57620
|
B("debug", "Refreshing tools list");
|
|
57616
57621
|
try {
|
|
57617
|
-
let e = vB, t =
|
|
57622
|
+
let e = vB, t = Ie.current.getSession(e);
|
|
57618
57623
|
if (!t) {
|
|
57619
57624
|
B("warn", "No active session found for tools refresh");
|
|
57620
57625
|
return;
|
|
57621
57626
|
}
|
|
57622
57627
|
B("debug", "Calling listTools...");
|
|
57623
57628
|
let n = await t.connector.listTools();
|
|
57624
|
-
B("debug", "listTools returned:", n?.length, "tools"),
|
|
57629
|
+
B("debug", "listTools returned:", n?.length, "tools"), _e(n || []), B("info", "Tools list refreshed successfully");
|
|
57625
57630
|
} catch (e) {
|
|
57626
57631
|
B("error", "Failed to refresh tools:", e);
|
|
57627
57632
|
}
|
|
57628
|
-
}, [B]),
|
|
57629
|
-
if (
|
|
57633
|
+
}, [B]), ct = (0, A.useCallback)(async () => {
|
|
57634
|
+
if (Ke.current !== "ready" || !Ie.current) {
|
|
57630
57635
|
B("debug", "Cannot refresh resources - client not ready");
|
|
57631
57636
|
return;
|
|
57632
57637
|
}
|
|
57633
57638
|
B("debug", "Refreshing resources list");
|
|
57634
57639
|
try {
|
|
57635
|
-
let e = vB, t =
|
|
57640
|
+
let e = vB, t = Ie.current.getSession(e);
|
|
57636
57641
|
if (!t) {
|
|
57637
57642
|
B("warn", "No active session found for resources refresh");
|
|
57638
57643
|
return;
|
|
57639
57644
|
}
|
|
57640
|
-
|
|
57645
|
+
ye((await t.connector.listAllResources()).resources || []), B("info", "Resources list refreshed successfully");
|
|
57641
57646
|
} catch (e) {
|
|
57642
57647
|
B("warn", "Failed to refresh resources:", e);
|
|
57643
57648
|
}
|
|
57644
|
-
}, [B]),
|
|
57645
|
-
if (
|
|
57649
|
+
}, [B]), lt = (0, A.useCallback)(async () => {
|
|
57650
|
+
if (Ke.current !== "ready" || !Ie.current) {
|
|
57646
57651
|
B("debug", "Cannot refresh prompts - client not ready");
|
|
57647
57652
|
return;
|
|
57648
57653
|
}
|
|
57649
57654
|
B("debug", "Refreshing prompts list");
|
|
57650
57655
|
try {
|
|
57651
|
-
let e = vB, t =
|
|
57656
|
+
let e = vB, t = Ie.current.getSession(e);
|
|
57652
57657
|
if (!t) {
|
|
57653
57658
|
B("warn", "No active session found for prompts refresh");
|
|
57654
57659
|
return;
|
|
57655
57660
|
}
|
|
57656
|
-
|
|
57661
|
+
Ce((await t.connector.listPrompts()).prompts || []), B("info", "Prompts list refreshed successfully");
|
|
57657
57662
|
} catch (e) {
|
|
57658
57663
|
B("warn", "Failed to refresh prompts:", e);
|
|
57659
57664
|
}
|
|
57660
|
-
}, [B]),
|
|
57661
|
-
if (
|
|
57665
|
+
}, [B]), ut = (0, A.useCallback)(async () => {
|
|
57666
|
+
if (Ke.current !== "ready" || !Ie.current) {
|
|
57662
57667
|
B("debug", "Cannot refresh resource templates - client not ready");
|
|
57663
57668
|
return;
|
|
57664
57669
|
}
|
|
57665
57670
|
B("debug", "Refreshing resource templates list");
|
|
57666
57671
|
try {
|
|
57667
|
-
let e = vB, t =
|
|
57672
|
+
let e = vB, t = Ie.current.getSession(e);
|
|
57668
57673
|
if (!t) throw Error("No active session found");
|
|
57669
57674
|
let n = await t.connector.listResourceTemplates();
|
|
57670
|
-
|
|
57675
|
+
Be.current && (xe(n.resourceTemplates || []), B("info", `Resource templates refreshed: ${n.resourceTemplates?.length || 0} templates`));
|
|
57671
57676
|
} catch (e) {
|
|
57672
57677
|
throw B("error", "Failed to refresh resource templates:", e), e;
|
|
57673
57678
|
}
|
|
57674
|
-
}, [B]),
|
|
57679
|
+
}, [B]), dt = (0, A.useCallback)(async () => {
|
|
57675
57680
|
B("info", "Refreshing all lists (tools, resources, resource templates, prompts)"), await Promise.all([
|
|
57676
|
-
ot(),
|
|
57677
57681
|
st(),
|
|
57678
|
-
|
|
57679
|
-
|
|
57682
|
+
ct(),
|
|
57683
|
+
ut(),
|
|
57684
|
+
lt()
|
|
57680
57685
|
]);
|
|
57681
57686
|
}, [
|
|
57682
|
-
ot,
|
|
57683
57687
|
st,
|
|
57684
|
-
lt,
|
|
57685
57688
|
ct,
|
|
57689
|
+
ut,
|
|
57690
|
+
lt,
|
|
57686
57691
|
B
|
|
57687
|
-
]),
|
|
57688
|
-
if (
|
|
57692
|
+
]), ft = (0, A.useCallback)(async (e, t) => {
|
|
57693
|
+
if (Ke.current !== "ready" || !Ie.current) throw Error(`MCP client is not ready (${yB(Ke.current, !!Ie.current)}). Cannot get prompt.`);
|
|
57689
57694
|
B("info", `Getting prompt: ${e}`, t);
|
|
57690
57695
|
try {
|
|
57691
|
-
let n = vB, r =
|
|
57696
|
+
let n = vB, r = Ie.current.getSession(n);
|
|
57692
57697
|
if (!r) throw Error("No active session found");
|
|
57693
57698
|
let i = await r.connector.getPrompt(e, t || {});
|
|
57694
57699
|
return B("info", `Prompt "${e}" retrieved successfully:`, i), i;
|
|
57695
57700
|
} catch (t) {
|
|
57696
57701
|
throw B("error", `Prompt "${e}" retrieval failed:`, t), t;
|
|
57697
57702
|
}
|
|
57698
|
-
}, [
|
|
57699
|
-
if (
|
|
57703
|
+
}, [me, B]), pt = (0, A.useCallback)(async (e) => {
|
|
57704
|
+
if (Ke.current !== "ready" || !Ie.current) throw Error(`MCP client is not ready (${yB(Ke.current, !!Ie.current)}). Cannot request completion.`);
|
|
57700
57705
|
B("info", `Requesting completions for ${e.ref.type === "ref/prompt" ? "prompt" : "resource template"} "${e.ref.type === "ref/prompt" ? e.ref.name : e.ref.uri}"`);
|
|
57701
57706
|
try {
|
|
57702
|
-
let t = vB, n =
|
|
57707
|
+
let t = vB, n = Ie.current.getSession(t);
|
|
57703
57708
|
if (!n) throw Error("No active session found");
|
|
57704
57709
|
let r = await n.complete(e);
|
|
57705
57710
|
return B("info", `Received ${r.completion.values.length} completion suggestions`), r;
|
|
57706
57711
|
} catch (e) {
|
|
57707
57712
|
throw B("error", "Completion request failed:", e), e;
|
|
57708
57713
|
}
|
|
57709
|
-
}, [
|
|
57714
|
+
}, [me, B]);
|
|
57710
57715
|
(0, A.useEffect)(() => {
|
|
57711
57716
|
let e = /* @__PURE__ */ W((e, t) => {
|
|
57712
|
-
if (
|
|
57717
|
+
if (Ge.current) {
|
|
57713
57718
|
B("debug", `Ignoring auth callback via ${t}; manual popup flow owns this result.`);
|
|
57714
57719
|
return;
|
|
57715
57720
|
}
|
|
57716
|
-
let n =
|
|
57721
|
+
let n = Le.current?.serverUrlHash;
|
|
57717
57722
|
if (e?.serverUrlHash && n && e.serverUrlHash !== n) {
|
|
57718
57723
|
B("debug", `Ignoring auth callback via ${t} for a different server.`);
|
|
57719
57724
|
return;
|
|
57720
57725
|
}
|
|
57721
|
-
if (B("info", `Received auth callback via ${t}.`, e),
|
|
57722
|
-
|
|
57726
|
+
if (B("info", `Received auth callback via ${t}.`, e), Ue.current && clearTimeout(Ue.current), Ue.current = null, e?.success) B("info", "Authentication successful via popup. Reconnecting client..."), ze.current && B("debug", "Connection attempt already in progress, resetting flag to allow reconnection."), ze.current = !1, setTimeout(() => {
|
|
57727
|
+
Be.current && (B("debug", "Initiating reconnection after successful auth callback."), Ye.current?.());
|
|
57723
57728
|
}, 100);
|
|
57724
57729
|
else {
|
|
57725
|
-
if (
|
|
57726
|
-
B("debug", `Ignoring stale auth failure callback (state=${
|
|
57730
|
+
if (Ke.current !== "authenticating" && Ke.current !== "pending_auth") {
|
|
57731
|
+
B("debug", `Ignoring stale auth failure callback (state=${Ke.current}).`);
|
|
57727
57732
|
return;
|
|
57728
57733
|
}
|
|
57729
|
-
|
|
57734
|
+
Xe.current?.(`Authentication failed in callback: ${e?.error || "Unknown reason."}`);
|
|
57730
57735
|
}
|
|
57731
57736
|
}, "handleCallbackPayload"), t = /* @__PURE__ */ W((t) => {
|
|
57732
57737
|
t.origin === window.location.origin && t.data?.type === "mcp_auth_callback" && e(t.data, "postMessage");
|
|
@@ -57747,98 +57752,99 @@ function Ide(e) {
|
|
|
57747
57752
|
} catch {}
|
|
57748
57753
|
B("debug", "Auth callback BroadcastChannel listener removed.");
|
|
57749
57754
|
}
|
|
57750
|
-
|
|
57755
|
+
Ue.current && clearTimeout(Ue.current);
|
|
57751
57756
|
};
|
|
57752
57757
|
}, [B]), (0, A.useEffect)(() => {
|
|
57753
|
-
if (
|
|
57754
|
-
|
|
57758
|
+
if (Be.current = !0, !n || !t) return B("debug", n ? "No server URL provided, skipping connection." : "Connection disabled via enabled flag."), he("discovering"), () => {
|
|
57759
|
+
Be.current = !1;
|
|
57755
57760
|
};
|
|
57756
|
-
if (B("debug", "useMcp mounted, initiating connection."),
|
|
57757
|
-
else if (!
|
|
57761
|
+
if (B("debug", "useMcp mounted, initiating connection."), Ve.current = 0, o) Le.current = o, B("debug", "Using externally provided authProvider");
|
|
57762
|
+
else if (!Le.current || Le.current.serverUrl !== fe) {
|
|
57758
57763
|
let { provider: e, oauthProxyUrl: t } = bB({
|
|
57759
|
-
effectiveOAuthUrl:
|
|
57764
|
+
effectiveOAuthUrl: fe,
|
|
57760
57765
|
storageKeyPrefix: i,
|
|
57761
|
-
oauthClientConfig:
|
|
57766
|
+
oauthClientConfig: z,
|
|
57762
57767
|
callbackUrl: r,
|
|
57763
|
-
preventAutoAuth:
|
|
57764
|
-
useRedirectFlow:
|
|
57765
|
-
gatewayUrl:
|
|
57766
|
-
|
|
57768
|
+
preventAutoAuth: v,
|
|
57769
|
+
useRedirectFlow: y,
|
|
57770
|
+
gatewayUrl: ue,
|
|
57771
|
+
oauthProxyUrl: u,
|
|
57772
|
+
onPopupWindow: b,
|
|
57767
57773
|
proxyOAuthRequests: !0,
|
|
57768
|
-
staticClientInfo:
|
|
57769
|
-
scope:
|
|
57774
|
+
staticClientInfo: I,
|
|
57775
|
+
scope: F
|
|
57770
57776
|
});
|
|
57771
|
-
|
|
57777
|
+
Le.current = e, t && B("debug", `OAuth proxy URL in effect: ${t}`), B("debug", `BrowserOAuthClientProvider initialized/updated with URL: ${fe}, proxy: ${t ? "enabled" : "disabled"}, gateway: ${ue ? "enabled" : "disabled"}`);
|
|
57772
57778
|
}
|
|
57773
|
-
return
|
|
57774
|
-
|
|
57779
|
+
return $e(), () => {
|
|
57780
|
+
Be.current = !1, B("debug", "useMcp unmounting, disconnecting."), Ze(!0);
|
|
57775
57781
|
};
|
|
57776
57782
|
}, [
|
|
57777
57783
|
t,
|
|
57778
57784
|
n,
|
|
57779
57785
|
i,
|
|
57780
57786
|
r,
|
|
57781
|
-
|
|
57782
|
-
|
|
57783
|
-
|
|
57784
|
-
|
|
57787
|
+
z.name,
|
|
57788
|
+
z.version,
|
|
57789
|
+
z.uri,
|
|
57790
|
+
z.logo_uri,
|
|
57791
|
+
I,
|
|
57785
57792
|
F,
|
|
57786
|
-
|
|
57787
|
-
|
|
57788
|
-
|
|
57789
|
-
de,
|
|
57793
|
+
y,
|
|
57794
|
+
ie,
|
|
57795
|
+
fe,
|
|
57790
57796
|
l,
|
|
57791
57797
|
o
|
|
57792
57798
|
]);
|
|
57793
|
-
let
|
|
57799
|
+
let mt = (0, A.useRef)(tt), ht = (0, A.useRef)(B);
|
|
57794
57800
|
(0, A.useEffect)(() => {
|
|
57795
|
-
|
|
57796
|
-
}, [
|
|
57801
|
+
mt.current = tt, ht.current = B;
|
|
57802
|
+
}, [tt, B]), (0, A.useEffect)(() => {
|
|
57797
57803
|
let e = null;
|
|
57798
|
-
if (
|
|
57799
|
-
if (!
|
|
57800
|
-
|
|
57801
|
-
let t = typeof
|
|
57802
|
-
|
|
57803
|
-
|
|
57804
|
+
if (me === "failed" && m && Ve.current > 0) {
|
|
57805
|
+
if (!We.current) {
|
|
57806
|
+
We.current = !0;
|
|
57807
|
+
let t = typeof m == "number" ? m : Fde;
|
|
57808
|
+
ht.current("info", `Connection failed, auto-retrying in ${t}ms...`), e = setTimeout(() => {
|
|
57809
|
+
We.current = !1, Be.current && Ke.current === "failed" && mt.current();
|
|
57804
57810
|
}, t);
|
|
57805
57811
|
}
|
|
57806
|
-
} else
|
|
57812
|
+
} else me !== "failed" && (We.current = !1);
|
|
57807
57813
|
return () => {
|
|
57808
|
-
e && (clearTimeout(e),
|
|
57814
|
+
e && (clearTimeout(e), We.current = !1);
|
|
57809
57815
|
};
|
|
57810
|
-
}, [
|
|
57811
|
-
let
|
|
57816
|
+
}, [me, m]);
|
|
57817
|
+
let gt = (0, A.useCallback)(async () => Ke.current === "ready" ? we?.icon ? we.icon : Re.current ? (B("debug", "Waiting for icon to finish loading..."), await Re.current) : (B("debug", "No icon available and no loading in progress"), null) : (B("warn", "Cannot ensure icon loaded - not connected"), null), [we, B]);
|
|
57812
57818
|
return {
|
|
57813
|
-
state:
|
|
57814
|
-
name:
|
|
57815
|
-
tools:
|
|
57816
|
-
resources:
|
|
57817
|
-
resourceTemplates:
|
|
57818
|
-
prompts:
|
|
57819
|
-
serverInfo:
|
|
57820
|
-
capabilities:
|
|
57821
|
-
error:
|
|
57822
|
-
log:
|
|
57823
|
-
authUrl:
|
|
57824
|
-
authTokens:
|
|
57825
|
-
client:
|
|
57826
|
-
callTool:
|
|
57827
|
-
readResource:
|
|
57828
|
-
listResources:
|
|
57829
|
-
listPrompts:
|
|
57830
|
-
getPrompt:
|
|
57831
|
-
complete:
|
|
57832
|
-
refreshTools:
|
|
57833
|
-
refreshResources:
|
|
57834
|
-
refreshResourceTemplates:
|
|
57835
|
-
refreshPrompts:
|
|
57836
|
-
refreshAll:
|
|
57837
|
-
retry:
|
|
57838
|
-
disconnect:
|
|
57839
|
-
authenticate:
|
|
57840
|
-
clearStorage:
|
|
57841
|
-
ensureIconLoaded:
|
|
57819
|
+
state: me,
|
|
57820
|
+
name: we?.name || t || "",
|
|
57821
|
+
tools: ge,
|
|
57822
|
+
resources: ve,
|
|
57823
|
+
resourceTemplates: be,
|
|
57824
|
+
prompts: Se,
|
|
57825
|
+
serverInfo: we,
|
|
57826
|
+
capabilities: Ee,
|
|
57827
|
+
error: Oe,
|
|
57828
|
+
log: Ae,
|
|
57829
|
+
authUrl: Me,
|
|
57830
|
+
authTokens: Pe,
|
|
57831
|
+
client: Ie.current,
|
|
57832
|
+
callTool: et,
|
|
57833
|
+
readResource: at,
|
|
57834
|
+
listResources: it,
|
|
57835
|
+
listPrompts: ot,
|
|
57836
|
+
getPrompt: ft,
|
|
57837
|
+
complete: pt,
|
|
57838
|
+
refreshTools: st,
|
|
57839
|
+
refreshResources: ct,
|
|
57840
|
+
refreshResourceTemplates: ut,
|
|
57841
|
+
refreshPrompts: lt,
|
|
57842
|
+
refreshAll: dt,
|
|
57843
|
+
retry: tt,
|
|
57844
|
+
disconnect: Ze,
|
|
57845
|
+
authenticate: nt,
|
|
57846
|
+
clearStorage: rt,
|
|
57847
|
+
ensureIconLoaded: gt
|
|
57842
57848
|
};
|
|
57843
57849
|
}
|
|
57844
57850
|
W(Ide, "useMcp");
|
|
@@ -69121,12 +69127,12 @@ var sge = /* @__PURE__ */ s(((e, t) => {
|
|
|
69121
69127
|
}), Object.defineProperty(e, "tomorrowNightBright", {
|
|
69122
69128
|
enumerable: !0,
|
|
69123
69129
|
get: function() {
|
|
69124
|
-
return
|
|
69130
|
+
return Xe.default;
|
|
69125
69131
|
}
|
|
69126
69132
|
}), Object.defineProperty(e, "tomorrowNightEighties", {
|
|
69127
69133
|
enumerable: !0,
|
|
69128
69134
|
get: function() {
|
|
69129
|
-
return
|
|
69135
|
+
return B.default;
|
|
69130
69136
|
}
|
|
69131
69137
|
}), Object.defineProperty(e, "vs", {
|
|
69132
69138
|
enumerable: !0,
|
|
@@ -69154,7 +69160,7 @@ var sge = /* @__PURE__ */ s(((e, t) => {
|
|
|
69154
69160
|
return rt.default;
|
|
69155
69161
|
}
|
|
69156
69162
|
});
|
|
69157
|
-
var n = t(cge()), r = t(lge()), i = t(uge()), a = t(dge()), o = t(fge()), s = t(pge()), c = t(mge()), l = t(hge()), u = t(gge()), d = t(_ge()), f = t(vge()), p = t(yge()), m = t(bge()), h = t(xge()), g = t(Sge()), _ = t(Cge()), v = t(wge()), y = t(Tge()), b = t(Ege()), x = t(Dge()), S = t(Oge()), C = t(kge()), w = t(Age()), T = t(jge()), E = t(Mge()), D = t(Nge()), O = t(Pge()), k = t(Fge()), A = t(Ige()), j = t(Lge()), M = t(Rge()), N = t(zge()), P = t(Bge()), F = t(Vge()), I = t(Hge()), L = t(Uge()), ee = t(Wge()), te = t(Gge()), ne = t(Kge()), re = t(qge()), ie = t(Jge()), R = t(Yge()), z = t(Xge()), ae = t(Zge()), oe = t(Qge()), se = t($ge()), ce = t(e_e()), le = t(t_e()), ue = t(n_e()), de = t(r_e()), fe = t(i_e()), pe = t(a_e()), me = t(o_e()), he = t(s_e()), ge = t(c_e()), _e = t(l_e()), ve = t(u_e()), ye = t(d_e()), be = t(f_e()), xe = t(p_e()), Se = t(m_e()), Ce = t(h_e()), we = t(g_e()), Te = t(__e()), Ee = t(v_e()), De = t(y_e()), Oe = t(b_e()), ke = t(x_e()), Ae = t(S_e()), je = t(C_e()), Me = t(w_e()), Ne = t(T_e()), Pe = t(E_e()), Fe = t(D_e()), Ie = t(O_e()), Le = t(k_e()), Re = t(A_e()), ze = t(j_e()), Be = t(M_e()), Ve = t(N_e()), He = t(P_e()), Ue = t(F_e()), We = t(I_e()), Ge = t(L_e()), Ke = t(R_e()), qe = t(z_e()), Je = t(B_e()), Ye = t(V_e()),
|
|
69163
|
+
var n = t(cge()), r = t(lge()), i = t(uge()), a = t(dge()), o = t(fge()), s = t(pge()), c = t(mge()), l = t(hge()), u = t(gge()), d = t(_ge()), f = t(vge()), p = t(yge()), m = t(bge()), h = t(xge()), g = t(Sge()), _ = t(Cge()), v = t(wge()), y = t(Tge()), b = t(Ege()), x = t(Dge()), S = t(Oge()), C = t(kge()), w = t(Age()), T = t(jge()), E = t(Mge()), D = t(Nge()), O = t(Pge()), k = t(Fge()), A = t(Ige()), j = t(Lge()), M = t(Rge()), N = t(zge()), P = t(Bge()), F = t(Vge()), I = t(Hge()), L = t(Uge()), ee = t(Wge()), te = t(Gge()), ne = t(Kge()), re = t(qge()), ie = t(Jge()), R = t(Yge()), z = t(Xge()), ae = t(Zge()), oe = t(Qge()), se = t($ge()), ce = t(e_e()), le = t(t_e()), ue = t(n_e()), de = t(r_e()), fe = t(i_e()), pe = t(a_e()), me = t(o_e()), he = t(s_e()), ge = t(c_e()), _e = t(l_e()), ve = t(u_e()), ye = t(d_e()), be = t(f_e()), xe = t(p_e()), Se = t(m_e()), Ce = t(h_e()), we = t(g_e()), Te = t(__e()), Ee = t(v_e()), De = t(y_e()), Oe = t(b_e()), ke = t(x_e()), Ae = t(S_e()), je = t(C_e()), Me = t(w_e()), Ne = t(T_e()), Pe = t(E_e()), Fe = t(D_e()), Ie = t(O_e()), Le = t(k_e()), Re = t(A_e()), ze = t(j_e()), Be = t(M_e()), Ve = t(N_e()), He = t(P_e()), Ue = t(F_e()), We = t(I_e()), Ge = t(L_e()), Ke = t(R_e()), qe = t(z_e()), Je = t(B_e()), Ye = t(V_e()), Xe = t(H_e()), B = t(U_e()), Ze = t(W_e()), Qe = t(G_e()), $e = t(K_e()), et = t(q_e()), tt = t(J_e()), nt = t(Y_e()), rt = t(X_e());
|
|
69158
69164
|
})))(), Z_e = {
|
|
69159
69165
|
...kU.githubGist,
|
|
69160
69166
|
hljs: {
|
|
@@ -116445,8 +116451,8 @@ function yze(e, t, n, r) {
|
|
|
116445
116451
|
}
|
|
116446
116452
|
var Ke = A.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), qe = Ke ? Ke[2] : "div", Je = Ke ? Ke[1] === "/" : !1, Ye = A;
|
|
116447
116453
|
if (Je) {
|
|
116448
|
-
var
|
|
116449
|
-
|
|
116454
|
+
var Xe = A.indexOf(">");
|
|
116455
|
+
Xe !== -1 && (Ye = A.slice(Xe + 1));
|
|
116450
116456
|
}
|
|
116451
116457
|
return {
|
|
116452
116458
|
node: {
|
|
@@ -116464,24 +116470,24 @@ function yze(e, t, n, r) {
|
|
|
116464
116470
|
end: j
|
|
116465
116471
|
};
|
|
116466
116472
|
}
|
|
116467
|
-
var
|
|
116468
|
-
if (!
|
|
116469
|
-
var Ze =
|
|
116473
|
+
var B = n4(e, a);
|
|
116474
|
+
if (!B) return null;
|
|
116475
|
+
var Ze = B.tag, Qe = Ze.toLowerCase(), $e = Ze.charCodeAt(0), et = $e >= N2 && $e <= P2;
|
|
116470
116476
|
if (!et && !S4.has(Qe) && !t4.has(Qe) && !Qe.includes("-")) return null;
|
|
116471
|
-
if (
|
|
116477
|
+
if (B.isClosing) return {
|
|
116472
116478
|
node: {
|
|
116473
116479
|
type: z2.htmlSelfClosing,
|
|
116474
116480
|
tag: Ze,
|
|
116475
116481
|
attrs: {},
|
|
116476
|
-
endPos:
|
|
116482
|
+
endPos: B.end,
|
|
116477
116483
|
b: !0,
|
|
116478
|
-
a: e.slice(a,
|
|
116484
|
+
a: e.slice(a, B.end)
|
|
116479
116485
|
},
|
|
116480
|
-
end:
|
|
116486
|
+
end: B.end
|
|
116481
116487
|
};
|
|
116482
|
-
var tt = vze(e,
|
|
116488
|
+
var tt = vze(e, B.end, Ze), nt = [];
|
|
116483
116489
|
if (tt !== -1) {
|
|
116484
|
-
var rt = T4, it = e.slice(
|
|
116490
|
+
var rt = T4, it = e.slice(B.end, rt), at = it.trim();
|
|
116485
116491
|
if (at) {
|
|
116486
116492
|
var ot = it.indexOf("\n\n") !== -1, st = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(at), ct = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(at), lt = n.inline, ut = n.inHTML, dt = n.c;
|
|
116487
116493
|
n.inHTML = !0, n.c = (n.c || 0) + 1, ot || st || ct ? (n.inline = !1, nt = M4(it, n, r)) : (n.inline = !0, nt = j4(at, 0, at.length, n, r)), n.inline = lt, n.inHTML = ut, n.c = dt;
|
|
@@ -116491,8 +116497,8 @@ function yze(e, t, n, r) {
|
|
|
116491
116497
|
node: {
|
|
116492
116498
|
type: z2.htmlBlock,
|
|
116493
116499
|
tag: Ze,
|
|
116494
|
-
attrs: C4(
|
|
116495
|
-
e:
|
|
116500
|
+
attrs: C4(B.attrs, Ze, r),
|
|
116501
|
+
e: B.whitespaceBeforeAttrs + B.rawAttrs,
|
|
116496
116502
|
children: nt,
|
|
116497
116503
|
a: mt,
|
|
116498
116504
|
text: et ? it : mt,
|
|
@@ -116504,18 +116510,18 @@ function yze(e, t, n, r) {
|
|
|
116504
116510
|
end: pt
|
|
116505
116511
|
};
|
|
116506
116512
|
}
|
|
116507
|
-
var gt = lze(e,
|
|
116513
|
+
var gt = lze(e, B.end), _t = gt < e.length ? f4(e, gt) : gt, vt = e.slice(B.end, gt);
|
|
116508
116514
|
if (vt.trim()) {
|
|
116509
116515
|
var { inline: yt, inHTML: bt, c: xt } = n;
|
|
116510
116516
|
n.inline = !1, n.inHTML = !0, n.c = (n.c || 0) + 1, nt = M4(vt, n, r), n.inline = yt, n.inHTML = bt, n.c = xt;
|
|
116511
116517
|
}
|
|
116512
|
-
var St = e.slice(
|
|
116518
|
+
var St = e.slice(B.end, gt);
|
|
116513
116519
|
return {
|
|
116514
116520
|
node: {
|
|
116515
116521
|
type: z2.htmlBlock,
|
|
116516
116522
|
tag: Ze,
|
|
116517
|
-
attrs: C4(
|
|
116518
|
-
e:
|
|
116523
|
+
attrs: C4(B.attrs, Ze, r),
|
|
116524
|
+
e: B.whitespaceBeforeAttrs + B.rawAttrs,
|
|
116519
116525
|
children: nt,
|
|
116520
116526
|
a: St,
|
|
116521
116527
|
text: vt,
|
|
@@ -130002,7 +130008,7 @@ function XXe({ serverId: e, toolCallId: t, toolName: n, toolInput: r, toolOutput
|
|
|
130002
130008
|
}, [E, n])
|
|
130003
130009
|
});
|
|
130004
130010
|
(0, A.useEffect)(() => {
|
|
130005
|
-
ae.current = !1,
|
|
130011
|
+
ae.current = !1, B.current = !1;
|
|
130006
130012
|
}, [t, l]), (0, A.useEffect)(() => {
|
|
130007
130013
|
(async () => {
|
|
130008
130014
|
try {
|
|
@@ -130337,16 +130343,16 @@ function XXe({ serverId: e, toolCallId: t, toolName: n, toolInput: r, toolOutput
|
|
|
130337
130343
|
originalPolicy: c,
|
|
130338
130344
|
timestamp: l || Date.now()
|
|
130339
130345
|
}), console.warn(`[MCP Apps CSP Violation] ${n}: Blocked ${r}`, i ? `at ${i}:${a}:${o}` : "");
|
|
130340
|
-
}, [t, M]),
|
|
130346
|
+
}, [t, M]), Xe = F > 0 || re && !ae.current, B = (0, A.useRef)(!1);
|
|
130341
130347
|
if ((0, A.useEffect)(() => {
|
|
130342
|
-
|
|
130348
|
+
B.current || F > 0 && (B.current = !0, y?.());
|
|
130343
130349
|
}, [F, y]), (0, A.useEffect)(() => {
|
|
130344
|
-
if (!
|
|
130350
|
+
if (!Xe || !R) return;
|
|
130345
130351
|
let e = setTimeout(() => {
|
|
130346
130352
|
z(!1), ae.current = !0;
|
|
130347
130353
|
}, 300);
|
|
130348
130354
|
return () => clearTimeout(e);
|
|
130349
|
-
}, [
|
|
130355
|
+
}, [Xe, R]), L) return /* @__PURE__ */ (0, O.jsx)(O7, {
|
|
130350
130356
|
className: f,
|
|
130351
130357
|
noWrapper: h,
|
|
130352
130358
|
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
@@ -135727,13 +135733,13 @@ function c$e({ connection: e, isConnected: t, useClientSide: n = !0, enableKeybo
|
|
|
135727
135733
|
onDismiss: We
|
|
135728
135734
|
}) : null, qe = (0, A.useCallback)(() => {
|
|
135729
135735
|
He?.(), Ce(!0), ue(!0);
|
|
135730
|
-
}, [He, ue]), [Je, Ye] = (0, A.useState)(!1),
|
|
135736
|
+
}, [He, ue]), [Je, Ye] = (0, A.useState)(!1), Xe = (0, A.useCallback)(() => {
|
|
135731
135737
|
ue(!1), Ye(!0);
|
|
135732
|
-
}, [ue]), { user:
|
|
135738
|
+
}, [ue]), { user: B } = KIe(f ? c : void 0), Ze = GIe({
|
|
135733
135739
|
isManaged: Ee,
|
|
135734
135740
|
enableFreeTierUpgrade: f,
|
|
135735
|
-
isAuthenticated:
|
|
135736
|
-
}) ? { onLoginClick:
|
|
135741
|
+
isAuthenticated: B != null
|
|
135742
|
+
}) ? { onLoginClick: Xe } : void 0, Qe = !!d && !!h, $e = Qe || !!h && !we, { filteredPrompts: et, setSelectedPrompt: tt, selectedPrompt: nt, setPromptArgs: rt, executePrompt: it, results: at, handleDeleteResult: ot, clearPromptResults: st } = qIe({
|
|
135737
135743
|
prompts: i,
|
|
135738
135744
|
callPrompt: o,
|
|
135739
135745
|
serverId: a
|