@mcp-use/inspector 11.0.0 → 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.
Files changed (209) hide show
  1. package/dist/cdn/inspector.js +417 -411
  2. package/dist/cli.js +2 -2
  3. package/dist/server/chunk-3FL7XPEK.js +164 -0
  4. package/dist/server/chunk-6GW6OAU3.js +322 -0
  5. package/dist/server/chunk-FB46XEZP.js +71 -0
  6. package/dist/server/cli.js +2 -2
  7. package/dist/server/index.js +3 -3
  8. package/dist/server/middleware.js +3 -3
  9. package/dist/server/server.js +2 -2
  10. package/dist/server/shared-static.js +2 -2
  11. package/dist/server/version.js +1 -1
  12. package/dist/web/assets/{1c-V6dKK06p.js → 1c-WWqZDUi0.js} +1 -1
  13. package/dist/web/assets/{abnf-DiECLBuq.js → abnf-809Skn4Z.js} +1 -1
  14. package/dist/web/assets/{accesslog-DsG_-rEl.js → accesslog-BQZ9CYA0.js} +1 -1
  15. package/dist/web/assets/{actionscript-sO4lDx1i.js → actionscript-C4IHFxfr.js} +1 -1
  16. package/dist/web/assets/{ada-B-zvTXhn.js → ada-CpTHgtRn.js} +1 -1
  17. package/dist/web/assets/{angelscript-lXQgeBTa.js → angelscript-BPyrgr7F.js} +1 -1
  18. package/dist/web/assets/{apache-B1OzB3hp.js → apache-Bjmqo8ea.js} +1 -1
  19. package/dist/web/assets/{applescript-DQtCnERW.js → applescript-_IMtUQAx.js} +1 -1
  20. package/dist/web/assets/{arcade-BQ-MoAgJ.js → arcade-BEfAuJ-n.js} +1 -1
  21. package/dist/web/assets/{arduino-Dn7qhi9r.js → arduino-BTj1AC_h.js} +1 -1
  22. package/dist/web/assets/{armasm-DWs-XJT7.js → armasm-tWowMYjo.js} +1 -1
  23. package/dist/web/assets/{asciidoc-CfsNwaVC.js → asciidoc-Cu1VLIKu.js} +1 -1
  24. package/dist/web/assets/{aspectj-BHkLsRBH.js → aspectj-BS1sByBm.js} +1 -1
  25. package/dist/web/assets/{autohotkey-BTNnUYIq.js → autohotkey-D8SRCkGW.js} +1 -1
  26. package/dist/web/assets/{autoit-Bl9IObpI.js → autoit-Bnu_gieE.js} +1 -1
  27. package/dist/web/assets/{avrasm-DPb2Vw8d.js → avrasm-VQoSW_mm.js} +1 -1
  28. package/dist/web/assets/{awk-pHhyq8y5.js → awk-BnA2skyb.js} +1 -1
  29. package/dist/web/assets/{axapta-DzFD8b1T.js → axapta-DnbMcDoo.js} +1 -1
  30. package/dist/web/assets/{bash-Bz7PPHtm.js → bash-DWHSg_XE.js} +1 -1
  31. package/dist/web/assets/{basic-COtnj1QN.js → basic-BxzXlD7c.js} +1 -1
  32. package/dist/web/assets/{bnf-BgmJ8Hxc.js → bnf-BjLUjADO.js} +1 -1
  33. package/dist/web/assets/{brainfuck-Dqej0J1y.js → brainfuck-aSjxWjYT.js} +1 -1
  34. package/dist/web/assets/{c-n_HseCb3.js → c-CIN1gy1n.js} +1 -1
  35. package/dist/web/assets/{c-like-11FNsa8z.js → c-like-CLb0bWcw.js} +1 -1
  36. package/dist/web/assets/{cal-DDiqQGbk.js → cal-BR3_s_cL.js} +1 -1
  37. package/dist/web/assets/{capnproto-rudSB4XC.js → capnproto-C2DcjtLF.js} +1 -1
  38. package/dist/web/assets/{ceylon-BTTpwXfR.js → ceylon-9PyS7NFY.js} +1 -1
  39. package/dist/web/assets/{clean-fmHhBXKl.js → clean-DXiS1A9O.js} +1 -1
  40. package/dist/web/assets/{clojure-hoqOuyud.js → clojure-BQJRVnxh.js} +1 -1
  41. package/dist/web/assets/{clojure-repl-WdwXp7Ks.js → clojure-repl-D1rdpwza.js} +1 -1
  42. package/dist/web/assets/{cmake-By6WRXQs.js → cmake-b7BcTZlb.js} +1 -1
  43. package/dist/web/assets/{coffeescript-7FmKXUAn.js → coffeescript-BkT5lJ2x.js} +1 -1
  44. package/dist/web/assets/{coq-CGfdqi9A.js → coq-DBVS8_9O.js} +1 -1
  45. package/dist/web/assets/{core-BrZxtzfN.js → core-BkSmqDdR.js} +1 -1
  46. package/dist/web/assets/{cos-D9ZKmCnQ.js → cos-48B3Zgz0.js} +1 -1
  47. package/dist/web/assets/{cpp-Bo6Edxkt.js → cpp-D3reVCcg.js} +1 -1
  48. package/dist/web/assets/{crmsh-CtyJWaXd.js → crmsh-BCBx1wWk.js} +1 -1
  49. package/dist/web/assets/{crystal-DjUgPVAf.js → crystal-HzOA6UYV.js} +1 -1
  50. package/dist/web/assets/{csharp-DK8a9_Z8.js → csharp-DqNDwmVo.js} +1 -1
  51. package/dist/web/assets/{csp-FQ6T1zue.js → csp-BBSwiHSV.js} +1 -1
  52. package/dist/web/assets/{css-C-iQPVQx.js → css-EbXfNXoY.js} +1 -1
  53. package/dist/web/assets/{d-OG-W_D0P.js → d-Ci7qF9Nv.js} +1 -1
  54. package/dist/web/assets/{dart-CIfW6oZE.js → dart-CuNd6OMU.js} +1 -1
  55. package/dist/web/assets/{delphi-CtBGKLrg.js → delphi-BhDQaGkR.js} +1 -1
  56. package/dist/web/assets/{diff-fBgd28XW.js → diff-C12QI4ui.js} +1 -1
  57. package/dist/web/assets/{django-5XITyBzL.js → django-DKU-xRnz.js} +1 -1
  58. package/dist/web/assets/{dns-D4mulml2.js → dns-wPLbNiwh.js} +1 -1
  59. package/dist/web/assets/{dockerfile-FqbOoTjP.js → dockerfile-R-GkzY9u.js} +1 -1
  60. package/dist/web/assets/{dos-DC-zkX6n.js → dos-B3YxxXZl.js} +1 -1
  61. package/dist/web/assets/{dsconfig-BtmpCDAg.js → dsconfig-CNiIfBEr.js} +1 -1
  62. package/dist/web/assets/{dts-ObnZ30Ti.js → dts-DarQhWJa.js} +1 -1
  63. package/dist/web/assets/{dust-CK4_dVwa.js → dust-BGmWYuSv.js} +1 -1
  64. package/dist/web/assets/{ebnf-DqrkUlJk.js → ebnf-Fv-VKqhe.js} +1 -1
  65. package/dist/web/assets/{elixir-DJu6-TgZ.js → elixir-KzsyQkS3.js} +1 -1
  66. package/dist/web/assets/{elm-DDS7eYrJ.js → elm-CzUGLWl9.js} +1 -1
  67. package/dist/web/assets/{erb-CqXKsKFB.js → erb-DQGg71ha.js} +1 -1
  68. package/dist/web/assets/{erlang-6ziaGXna.js → erlang-E9foRaaY.js} +1 -1
  69. package/dist/web/assets/{erlang-repl-DRX3Vh_x.js → erlang-repl-D2enlquO.js} +1 -1
  70. package/dist/web/assets/{excel-CVIW0aVy.js → excel-cPBgyWE9.js} +1 -1
  71. package/dist/web/assets/{fix-lXlx5leo.js → fix-CHOpApZe.js} +1 -1
  72. package/dist/web/assets/{flix-BsA3-UeT.js → flix-BMZsX6rB.js} +1 -1
  73. package/dist/web/assets/{fortran-B5qPSbaz.js → fortran-Ce_7iP3N.js} +1 -1
  74. package/dist/web/assets/{fsharp-CFcpjWDW.js → fsharp-JgNu4nIZ.js} +1 -1
  75. package/dist/web/assets/{gams-BHb6nHTk.js → gams-DQuEJ5ws.js} +1 -1
  76. package/dist/web/assets/{gauss-DFqc9loS.js → gauss-DuwjeVGF.js} +1 -1
  77. package/dist/web/assets/{gcode-CEaWhDhx.js → gcode-CSrGdfgf.js} +1 -1
  78. package/dist/web/assets/{gherkin-Ze7DfpOY.js → gherkin-BaQ5-RDU.js} +1 -1
  79. package/dist/web/assets/{glsl-C6cKE1Dw.js → glsl-BRH4M0HB.js} +1 -1
  80. package/dist/web/assets/{gml-CQz__1WM.js → gml-DIqNvV12.js} +1 -1
  81. package/dist/web/assets/{go-DP_WGdZb.js → go-DSGP9cn8.js} +1 -1
  82. package/dist/web/assets/{golo-BZ84Aac9.js → golo-YE7YFKwq.js} +1 -1
  83. package/dist/web/assets/{gradle-WocHUll-.js → gradle-DILlAgbW.js} +1 -1
  84. package/dist/web/assets/{groovy-BCwQ-Q60.js → groovy-B-wi6wLs.js} +1 -1
  85. package/dist/web/assets/{haml-qc-e67YW.js → haml-CflEixL4.js} +1 -1
  86. package/dist/web/assets/{handlebars-9LjKsesX.js → handlebars-CNVjACR9.js} +1 -1
  87. package/dist/web/assets/{haskell-B8XD4N5m.js → haskell-BGD_MPKw.js} +1 -1
  88. package/dist/web/assets/{haxe-DjYuidXM.js → haxe-D_RrW1xe.js} +1 -1
  89. package/dist/web/assets/{hsp-CTU-7FqB.js → hsp-DcNMZAG0.js} +1 -1
  90. package/dist/web/assets/{htmlbars-DbnX2qWo.js → htmlbars-MUHb7g0P.js} +1 -1
  91. package/dist/web/assets/{http-BDhkmFHg.js → http-DomPZqhu.js} +1 -1
  92. package/dist/web/assets/{hy-H1Co6lHc.js → hy-BcpD06jC.js} +1 -1
  93. package/dist/web/assets/{index-ByBmc9gx.js → index-Laxc9ocj.js} +108 -108
  94. package/dist/web/assets/{inform7-Bm7EbxuB.js → inform7-ByhgjV2v.js} +1 -1
  95. package/dist/web/assets/{ini-CknAzwSN.js → ini-DDpMiBxw.js} +1 -1
  96. package/dist/web/assets/{irpf90-D629MPJ6.js → irpf90-CV7ZBXkc.js} +1 -1
  97. package/dist/web/assets/{isbl-DsXTaiU6.js → isbl-BUh_4hGk.js} +1 -1
  98. package/dist/web/assets/{java-CDVjTytT.js → java-Bt416jFE.js} +1 -1
  99. package/dist/web/assets/{javascript-BTme1kdi.js → javascript-CbB3A0uW.js} +1 -1
  100. package/dist/web/assets/{jboss-cli-BW0BHb99.js → jboss-cli-B74CgF5_.js} +1 -1
  101. package/dist/web/assets/{json-CA9MD97k.js → json-DFtfTfmJ.js} +1 -1
  102. package/dist/web/assets/{julia-D5EpTWzz.js → julia-A4xwFJzD.js} +1 -1
  103. package/dist/web/assets/{julia-repl-Dh5j0Q1S.js → julia-repl-CkI08dbl.js} +1 -1
  104. package/dist/web/assets/{kotlin-DOCVK6Up.js → kotlin-Dd-TCFi_.js} +1 -1
  105. package/dist/web/assets/{lasso-BwgJl-gg.js → lasso-BvI_9mzs.js} +1 -1
  106. package/dist/web/assets/{latex-Bupo0K3S.js → latex-DOntcmTT.js} +1 -1
  107. package/dist/web/assets/{ldif-D0UF_Wq8.js → ldif-CrfhdHfr.js} +1 -1
  108. package/dist/web/assets/{leaf-DjMM95Xe.js → leaf-Ed6PAmv6.js} +1 -1
  109. package/dist/web/assets/{less-CiqUDSnX.js → less-H3DIra-4.js} +1 -1
  110. package/dist/web/assets/{lisp-DKdCu5MD.js → lisp-6vq1Iylg.js} +1 -1
  111. package/dist/web/assets/{livecodeserver-83fvEH34.js → livecodeserver-DsUdPrv2.js} +1 -1
  112. package/dist/web/assets/{livescript-CI1NCtj5.js → livescript-CaFYYk1c.js} +1 -1
  113. package/dist/web/assets/{llvm-DPi_UJY1.js → llvm-DXuNLIAr.js} +1 -1
  114. package/dist/web/assets/{lsl-BjUxmx2W.js → lsl-DyvIyNV2.js} +1 -1
  115. package/dist/web/assets/{lua-C9KReo5a.js → lua-DG9tIfa6.js} +1 -1
  116. package/dist/web/assets/{makefile-CKPyw5IQ.js → makefile-DuQRKBpX.js} +1 -1
  117. package/dist/web/assets/{markdown-D1kuyXda.js → markdown-C1icNzgT.js} +1 -1
  118. package/dist/web/assets/{mathematica-BANHxPi6.js → mathematica-xVKtHuAR.js} +1 -1
  119. package/dist/web/assets/{matlab-C-YBD8zQ.js → matlab-DCNsZt4-.js} +1 -1
  120. package/dist/web/assets/{maxima-DyOZEN67.js → maxima-Bd0WBHJW.js} +1 -1
  121. package/dist/web/assets/{mel-7G61viju.js → mel-CYBNMQYY.js} +1 -1
  122. package/dist/web/assets/{mercury-Cn32vjcW.js → mercury-RXKSSf5V.js} +1 -1
  123. package/dist/web/assets/{mipsasm-CuSTrgga.js → mipsasm-NlEJdTGE.js} +1 -1
  124. package/dist/web/assets/{mizar-BQRj3c25.js → mizar-DFLhjAqr.js} +1 -1
  125. package/dist/web/assets/{mojolicious-C7IGl5mo.js → mojolicious-BVkeO2he.js} +1 -1
  126. package/dist/web/assets/{monkey-SjGLZfGB.js → monkey-ruWJPl1D.js} +1 -1
  127. package/dist/web/assets/{moonscript-CsdIvtlr.js → moonscript-5ulG0vM-.js} +1 -1
  128. package/dist/web/assets/{n1ql-MDb2SQga.js → n1ql-CKvuuc4t.js} +1 -1
  129. package/dist/web/assets/{nginx--vtn9nay.js → nginx-CPFDEN4T.js} +1 -1
  130. package/dist/web/assets/{nim-B6-QGnhP.js → nim-utQqbuyE.js} +1 -1
  131. package/dist/web/assets/{nix-D2y8iETS.js → nix-C2arovtw.js} +1 -1
  132. package/dist/web/assets/{node-repl-CfrIElvj.js → node-repl-ZEy0cSvt.js} +1 -1
  133. package/dist/web/assets/{nsis-DCVo0_ix.js → nsis-Dyu-c7Mk.js} +1 -1
  134. package/dist/web/assets/{objectivec-DQJzdeNW.js → objectivec-DLirtxvG.js} +1 -1
  135. package/dist/web/assets/{ocaml-Bkc6qeiw.js → ocaml-BxASNzW0.js} +1 -1
  136. package/dist/web/assets/{openscad-D1rFBEE6.js → openscad-Dx1W0VZN.js} +1 -1
  137. package/dist/web/assets/{oxygene-DWaFbMj8.js → oxygene-jC4e00Yo.js} +1 -1
  138. package/dist/web/assets/{parser3-KwhQEgrf.js → parser3-DplkAawo.js} +1 -1
  139. package/dist/web/assets/{perl-BWw2XyK3.js → perl-Dlyjlw2Q.js} +1 -1
  140. package/dist/web/assets/{pf-uT6QGDsv.js → pf-X5G22_NV.js} +1 -1
  141. package/dist/web/assets/{pgsql-DwdDSrwo.js → pgsql-xwWV4D3R.js} +1 -1
  142. package/dist/web/assets/{php-DoK7JPEq.js → php-BPmACXye.js} +1 -1
  143. package/dist/web/assets/{php-template-BvLmYtNo.js → php-template-D3xLyFyD.js} +1 -1
  144. package/dist/web/assets/plaintext-DspTtZbe.js +1 -0
  145. package/dist/web/assets/{pony-Da4wRw8T.js → pony-DM6hWqMB.js} +1 -1
  146. package/dist/web/assets/{powershell-BMKNTfKD.js → powershell-D11nXE09.js} +1 -1
  147. package/dist/web/assets/{processing-UpbofOA1.js → processing-cP_naG6F.js} +1 -1
  148. package/dist/web/assets/{profile-CRJnD0Wf.js → profile-BAuTMcTF.js} +1 -1
  149. package/dist/web/assets/{prolog-DaPU9hwZ.js → prolog-B0v-lYgA.js} +1 -1
  150. package/dist/web/assets/{properties-DziTuUvb.js → properties-Dep8G-Jn.js} +1 -1
  151. package/dist/web/assets/{protobuf-CfVuF4s-.js → protobuf-A8zCcVw9.js} +1 -1
  152. package/dist/web/assets/{puppet-DeG7yU_A.js → puppet-BbFQGM6c.js} +1 -1
  153. package/dist/web/assets/{purebasic-Di5opO31.js → purebasic-DZtX7nbm.js} +1 -1
  154. package/dist/web/assets/{python-B6cnkfVG.js → python-Kfcp6k1d.js} +1 -1
  155. package/dist/web/assets/{python-repl-CswsLfvI.js → python-repl-fJUgCylz.js} +1 -1
  156. package/dist/web/assets/{q-Sdfypmuy.js → q-10RwJS-X.js} +1 -1
  157. package/dist/web/assets/{qml-BJswObgS.js → qml-BBiWYcO6.js} +1 -1
  158. package/dist/web/assets/{r-DUF1ex-x.js → r-CibvCRbc.js} +1 -1
  159. package/dist/web/assets/{reasonml-BPXjcrRH.js → reasonml-BqvP3NWm.js} +1 -1
  160. package/dist/web/assets/{rib-Bb8epcYr.js → rib-DoThcfz0.js} +1 -1
  161. package/dist/web/assets/{roboconf-DPW3m5IK.js → roboconf-CGsi757U.js} +1 -1
  162. package/dist/web/assets/{routeros-D0y0YtuP.js → routeros-BL2S59PO.js} +1 -1
  163. package/dist/web/assets/rpc-logger-TPNV75J4-CyQPBUZm.js +1 -0
  164. package/dist/web/assets/{rsl-Cp0imbs8.js → rsl-BkRulYW5.js} +1 -1
  165. package/dist/web/assets/{ruby-DDppAVXC.js → ruby--iVrrb8b.js} +1 -1
  166. package/dist/web/assets/{ruleslanguage-B27wQn4n.js → ruleslanguage-CBpDXrYc.js} +1 -1
  167. package/dist/web/assets/{rust-CB0MsBAL.js → rust-BGpeHwa9.js} +1 -1
  168. package/dist/web/assets/{sas-Dvme5Rnv.js → sas-DICpnhcr.js} +1 -1
  169. package/dist/web/assets/{scala-XYFdR0OQ.js → scala-USjDcrLf.js} +1 -1
  170. package/dist/web/assets/{scheme-4PpXGQxX.js → scheme-BNRyLGyi.js} +1 -1
  171. package/dist/web/assets/{scilab-DZ_gY0N3.js → scilab-DHJHoFKR.js} +1 -1
  172. package/dist/web/assets/{scss-2YiPUv9j.js → scss-CqdW3oDZ.js} +1 -1
  173. package/dist/web/assets/{shell-DNvTPCw3.js → shell-DPEOoRC5.js} +1 -1
  174. package/dist/web/assets/{smali-CSWkZ6ir.js → smali-BfNOpnsd.js} +1 -1
  175. package/dist/web/assets/{smalltalk-Dfdn6idV.js → smalltalk-DmOmWplt.js} +1 -1
  176. package/dist/web/assets/{sml-DxhmPKFB.js → sml-D0_-Xlf_.js} +1 -1
  177. package/dist/web/assets/{sqf-Dcb_rWPJ.js → sqf-CKksFc2b.js} +1 -1
  178. package/dist/web/assets/{sql-MHTZgM8W.js → sql-9gRVSFml.js} +1 -1
  179. package/dist/web/assets/{sql_more-BdwVRL7c.js → sql_more-DMNAkN31.js} +1 -1
  180. package/dist/web/assets/{stan-DLwrIeDn.js → stan-BfwtQRpy.js} +1 -1
  181. package/dist/web/assets/{stata-Cqb9osjd.js → stata-MMt8yYTM.js} +1 -1
  182. package/dist/web/assets/{step21-B3c4_EbS.js → step21-DPwMwcNf.js} +1 -1
  183. package/dist/web/assets/{stylus-D56xFHiU.js → stylus-BkcKjfzU.js} +1 -1
  184. package/dist/web/assets/{subunit-CdyIqnP0.js → subunit-BDB6dyts.js} +1 -1
  185. package/dist/web/assets/{swift-MjoMflYh.js → swift-BaAV0tI6.js} +1 -1
  186. package/dist/web/assets/{taggerscript-CjaeDZg_.js → taggerscript-3Bsf4iOq.js} +1 -1
  187. package/dist/web/assets/{tap-DdELBHex.js → tap-IWB5p3hi.js} +1 -1
  188. package/dist/web/assets/{tcl-BpZwSOMS.js → tcl-DnyCLM3S.js} +1 -1
  189. package/dist/web/assets/{thrift-Di7yN0MD.js → thrift-GFLEn4na.js} +1 -1
  190. package/dist/web/assets/{tp-BgMl817r.js → tp-mT9twYMd.js} +1 -1
  191. package/dist/web/assets/{twig-N1h50Na4.js → twig-KXM2Ir7s.js} +1 -1
  192. package/dist/web/assets/{typescript-VJ0iKKOt.js → typescript-DLsMyDVr.js} +1 -1
  193. package/dist/web/assets/{vala-CnhO-CJB.js → vala-DC18dV87.js} +1 -1
  194. package/dist/web/assets/{vbnet-DQw7sttK.js → vbnet-BTKoRTOY.js} +1 -1
  195. package/dist/web/assets/{vbscript-BtJtOCz_.js → vbscript-CfyNPUKB.js} +1 -1
  196. package/dist/web/assets/{vbscript-html-DDLv6USX.js → vbscript-html-C1UQEg3Y.js} +1 -1
  197. package/dist/web/assets/{verilog-CprJXXMB.js → verilog-BYvTR18N.js} +1 -1
  198. package/dist/web/assets/{vhdl-Du74I4Mk.js → vhdl-BzEGp3In.js} +1 -1
  199. package/dist/web/assets/{vim-tDC61dJj.js → vim-BAgmvZxe.js} +1 -1
  200. package/dist/web/assets/{x86asm-BJOjKOyX.js → x86asm-D8zXFi0O.js} +1 -1
  201. package/dist/web/assets/{xl-BYcNbBXV.js → xl-B5pdzb_1.js} +1 -1
  202. package/dist/web/assets/{xml-D3dAF1Qb.js → xml-CevZSAlP.js} +1 -1
  203. package/dist/web/assets/{xquery-18wB4H3g.js → xquery-ogVEcT2_.js} +1 -1
  204. package/dist/web/assets/{yaml-8iNDRNdT.js → yaml--bFUsTFO.js} +1 -1
  205. package/dist/web/assets/{zephir-CnbrmwIj.js → zephir-C3iEI5I_.js} +1 -1
  206. package/dist/web/index.html +2 -2
  207. package/package.json +3 -3
  208. package/dist/web/assets/plaintext-CSApwtHq.js +0 -1
  209. package/dist/web/assets/rpc-logger-TPNV75J4-C2Hzk9gi.js +0 -1
@@ -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 B(e, t, n, r, i, a) {
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 && Xe(e, r, 0), a !== 0 && i === 0 && e.tag !== 0 && (e.suspendedLanes |= a & ~(o & ~t));
1991
+ r !== 0 && B(e, r, 0), a !== 0 && i === 0 && e.tag !== 0 && (e.suspendedLanes |= a & ~(o & ~t));
1992
1992
  }
1993
- function Xe(e, t, n) {
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 && Xe(e, n, t);
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, B(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() {
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 B(e, t, n) {
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 Xe(e, t, n) {
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
- Xe(e, "class", r);
16127
+ B(e, "class", r);
16128
16128
  break;
16129
16129
  case "tabIndex":
16130
- Xe(e, "tabindex", r);
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
- Xe(e, n, r);
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
- Xe(e, "data", r);
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), B(e, "popover", r);
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."), B(e, "is", r);
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), B(e, n, r)) : Qp.hasOwnProperty(n) && r != null && typeof r != "function" && gu(n, r);
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, "") : B(e, n, r);
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)/, B = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Xe = (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) => B.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) => {
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
- Xe,
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
- Xe,
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
- Xe,
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
- Xe,
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
- Xe,
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
- Xe,
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
- Xe,
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
- Xe,
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 "11.0.0";
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-D2NNKAES.js
48449
+ //#region ../mcp-use/dist/chunk-E5HANIXF.js
48450
48450
  Xp();
48451
- var hce = "1.33.0";
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, autoProxyFallback: u = !0, debug: d = !1, logLevel: f, autoRetry: p = !1, autoReconnect: m = xB, reconnectionOptions: h, transportType: g = "auto", preventAutoAuth: _ = !0, useRedirectFlow: v = !1, onPopupWindow: y, timeout: b = 3e4, sseReadTimeout: x = 3e5, wrapTransport: S, fetch: C, clientOptions: w, onNotification: T, onSampling: E, samplingCallback: D, onElicitation: O, elicitationCallback: k, oauth: j } = e, M = j?.clientId?.trim() || void 0, N = j?.clientSecret?.trim() || void 0, P = j?.scope?.trim() || void 0, F = (0, A.useMemo)(() => M ? {
57029
- client_id: M,
57030
- ...N ? { client_secret: N } : {}
57031
- } : void 0, [M, N]), I = (0, A.useMemo)(() => {
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 f ? n.level = f : d && (n.level = "debug"), n;
57033
+ return p ? n.level = p : f && (n.level = "debug"), n;
57034
57034
  }, [
57035
57035
  t,
57036
- f,
57037
- d
57038
- ]), L = s ?? c ?? {};
57039
- c && !s && I.warn("[useMcp] The \"customHeaders\" option is deprecated. Use \"headers\" instead.");
57040
- let ee = E ?? D;
57041
- D && !E && I.warn("[useMcp] The \"samplingCallback\" option is deprecated. Use \"onSampling\" instead.");
57042
- let te = O ?? k;
57043
- k && !O && nm.warn("[useMcp] The \"elicitationCallback\" option is deprecated. Use \"onElicitation\" instead.");
57044
- let ne = (0, A.useMemo)(() => ({
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
- }), []), re = (0, A.useMemo)(() => e.clientInfo ? {
57052
- ...ne,
57051
+ }), []), ie = (0, A.useMemo)(() => e.clientInfo ? {
57052
+ ...re,
57053
57053
  ...e.clientInfo
57054
- } : ne, [e.clientInfo, ne]), ie = (0, A.useMemo)(() => jde(re), [re]), R = (0, A.useMemo)(() => a && Object.keys(a).length > 0 ? (I.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
- ...ie,
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
- }) : ie, [a, ie]), z = (0, A.useMemo)(() => u ? typeof u == "boolean" ? {
57058
- enabled: u,
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: u.enabled !== !1,
57062
- proxyAddress: u.proxyAddress || "https://inspector.mcp-use.com/inspector/api/proxy"
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
- }, [u]), ae = (0, A.useMemo)(() => m === !1 ? {
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
- } : m === !0 ? {
57071
+ } : h === !0 ? {
57072
57072
  enabled: !0,
57073
57073
  initialDelay: xB,
57074
57074
  healthCheckInterval: 1e4,
57075
57075
  healthCheckTimeout: 3e4
57076
- } : typeof m == "number" ? {
57076
+ } : typeof h == "number" ? {
57077
57077
  enabled: !0,
57078
- initialDelay: m,
57078
+ initialDelay: h,
57079
57079
  healthCheckInterval: 1e4,
57080
57080
  healthCheckTimeout: 3e4
57081
57081
  } : {
57082
- enabled: m.enabled !== !1,
57083
- initialDelay: m.initialDelay ?? xB,
57084
- healthCheckInterval: m.healthCheckInterval ?? 1e4,
57085
- healthCheckTimeout: m.healthCheckTimeout ?? 3e4
57086
- }, [m]), [oe, se] = (0, A.useState)(void 0);
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
- se(void 0);
57088
+ ce(void 0);
57089
57089
  }, [t, l]);
57090
- let ce = (0, A.useMemo)(() => {
57091
- if (!oe?.proxyAddress) return l;
57090
+ let le = (0, A.useMemo)(() => {
57091
+ if (!se?.proxyAddress) return l;
57092
57092
  let e = l?.headers ?? l?.customHeaders ?? {};
57093
57093
  return {
57094
- ...oe,
57094
+ ...se,
57095
57095
  headers: {
57096
57096
  ...e,
57097
- ...oe.headers ?? oe.customHeaders ?? {}
57097
+ ...se.headers ?? se.customHeaders ?? {}
57098
57098
  }
57099
57099
  };
57100
- }, [oe, l]), { gatewayUrl: le, proxyHeaders: ue } = (0, A.useMemo)(() => {
57101
- let e = Ade(t || "", ce);
57100
+ }, [se, l]), { gatewayUrl: ue, proxyHeaders: de } = (0, A.useMemo)(() => {
57101
+ let e = Ade(t || "", le);
57102
57102
  return {
57103
- gatewayUrl: ce?.proxyAddress,
57103
+ gatewayUrl: le?.proxyAddress,
57104
57104
  proxyHeaders: e.headers
57105
57105
  };
57106
- }, [t, ce]), de = (0, A.useMemo)(() => t || "", [t]), fe = (0, A.useMemo)(() => ({
57107
- ...ue,
57108
- ...L
57109
- }), [ue, L]), [pe, me] = (0, A.useState)("discovering"), [he, ge] = (0, A.useState)([]), [_e, ve] = (0, A.useState)([]), [ye, be] = (0, A.useState)([]), [xe, Se] = (0, A.useState)([]), [Ce, we] = (0, A.useState)(e._initialServerInfo?.name ? e._initialServerInfo : void 0), [Te, Ee] = (0, A.useState)(), [De, Oe] = (0, A.useState)(void 0), [ke, Ae] = (0, A.useState)([]), [je, Me] = (0, A.useState)(void 0), [Ne, Pe] = (0, A.useState)(void 0), Fe = (0, A.useRef)(null), Ie = (0, A.useRef)(o ?? null), Le = (0, A.useRef)(null), Re = (0, A.useRef)(!1), ze = (0, A.useRef)(!0), Be = (0, A.useRef)(0), Ve = (0, A.useRef)(0), He = (0, A.useRef)(null), Ue = (0, A.useRef)(!1), We = (0, A.useRef)(!1), Ge = (0, A.useRef)(pe), Ke = (0, A.useRef)(m), qe = (0, A.useRef)(null), Je = (0, A.useRef)(null), Ye = (0, A.useRef)(null);
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
- Ge.current = pe, Ke.current = m;
57112
- }, [pe, m]), (0, A.useEffect)(() => {
57113
- Ie.current = o ?? null;
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
- I.error(i);
57119
+ L.error(i);
57120
57120
  break;
57121
57121
  case "warn":
57122
- I.warn(i);
57122
+ L.warn(i);
57123
57123
  break;
57124
57124
  case "info":
57125
- I.info(i);
57125
+ L.info(i);
57126
57126
  break;
57127
57127
  case "debug":
57128
- I.debug(i);
57128
+ L.debug(i);
57129
57129
  break;
57130
- default: I.info(i);
57130
+ default: L.info(i);
57131
57131
  }
57132
- ze.current && Ae((t) => [...t.slice(-100), {
57132
+ Be.current && je((t) => [...t.slice(-100), {
57133
57133
  level: e,
57134
57134
  message: r,
57135
57135
  timestamp: Date.now()
57136
57136
  }]);
57137
- }, [I]), Xe = (0, A.useCallback)(async (e = !1) => {
57138
- e || B("info", "Disconnecting..."), Re.current = !1, He.current && clearTimeout(He.current), He.current = null;
57139
- let t = Ve.current, n = Fe.current;
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 = Ve.current !== t;
57147
- Fe.current === n && !r && (Fe.current = null), ze.current && !e && !r && (me("discovering"), ge([]), ve([]), be([]), Se([]), Oe(void 0), Me(void 0));
57148
- }, [B]), Ze = (0, A.useCallback)((e, n) => {
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 = z.enabled && !ce?.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...`), Fe.current = null, o || (Ie.current = null), B("debug", "Cleared client and auth provider for proxy fallback"), se({ proxyAddress: z.proxyAddress }), ze.current && me("discovering"), setTimeout(() => {
57152
- ze.current && Je.current?.();
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 (ze.current) {
57155
- B("info", "Setting state to FAILED:", e), me("failed"), Oe(e);
57156
- let t = Ie.current?.getLastAttemptedAuthUrl?.();
57157
- t && (Me(t), B("info", "Manual authentication URL may be available.", 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 Re.current = !1, t && CR.getInstance().trackUseMcpConnection({
57159
+ return ze.current = !1, t && CR.getInstance().trackUseMcpConnection({
57160
57160
  url: t,
57161
- transportType: g,
57161
+ transportType: _,
57162
57162
  success: !1,
57163
57163
  errorType: n?.name || "UnknownError",
57164
- hasOAuth: !!Ie.current,
57165
- hasSampling: !!ee,
57166
- hasElicitation: !!te
57164
+ hasOAuth: !!Le.current,
57165
+ hasSampling: !!te,
57166
+ hasElicitation: !!ne
57167
57167
  }).catch(() => {}), !1;
57168
57168
  }, [
57169
57169
  B,
57170
57170
  t,
57171
- g,
57172
- ee,
57171
+ _,
57173
57172
  te,
57174
- z,
57175
- ce,
57173
+ ne,
57174
+ ae,
57175
+ le,
57176
57176
  o
57177
- ]), Qe = (0, A.useCallback)(async () => {
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 (Re.current) {
57182
+ if (ze.current) {
57183
57183
  B("debug", "Connection attempt already in progress.");
57184
57184
  return;
57185
57185
  }
57186
- if (!ze.current) {
57186
+ if (!Be.current) {
57187
57187
  B("debug", "Connect called after unmount, aborting.");
57188
57188
  return;
57189
57189
  }
57190
- if (Re.current = !0, Ve.current += 1, Be.current += 1, Oe(void 0), Me(void 0), qe.current = null, me("discovering"), B("info", `Connecting attempt #${Be.current} to ${t}...`), !Ie.current) {
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: de,
57192
+ effectiveOAuthUrl: fe,
57193
57193
  storageKeyPrefix: i,
57194
- oauthClientConfig: R,
57194
+ oauthClientConfig: z,
57195
57195
  callbackUrl: r,
57196
- preventAutoAuth: _,
57197
- useRedirectFlow: v,
57198
- gatewayUrl: le,
57199
- onPopupWindow: y,
57196
+ preventAutoAuth: v,
57197
+ useRedirectFlow: y,
57198
+ gatewayUrl: ue,
57199
+ oauthProxyUrl: u,
57200
+ onPopupWindow: b,
57200
57201
  proxyOAuthRequests: !0,
57201
- staticClientInfo: F,
57202
- scope: P
57202
+ staticClientInfo: I,
57203
+ scope: F
57203
57204
  });
57204
- Ie.current = e, t && B("debug", `OAuth proxy URL derived from gateway: ${t}`), B("debug", `BrowserOAuthClientProvider initialized with URL: ${de}, proxy: ${t ? "enabled" : "disabled"}, gateway: ${le ? "enabled" : "disabled"}`);
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
- Fe.current ? B("debug", "BrowserMCPClient already exists, reusing.") : (Fe.current = new lde(), B("debug", "BrowserMCPClient initialized in connect."));
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 (!ze.current) return B("debug", "Connection attempt aborted - component unmounted"), "failed";
57209
- B("info", `Attempting connection with transport: ${n}`), B("debug", `Client ref status at start of tryConnectWithTransport: ${Fe.current ? "initialized" : "NULL"}`);
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: b,
57215
- sseReadTimeout: x,
57216
- disableSseFallback: g === "http",
57215
+ timeout: x,
57216
+ sseReadTimeout: S,
57217
+ disableSseFallback: _ === "http",
57217
57218
  preferSse: n === "sse",
57218
- clientInfo: re,
57219
+ clientInfo: ie,
57219
57220
  ...(() => {
57220
- let e = Ie.current?.getProxyFetch?.(C) ?? C;
57221
+ let e = Le.current?.getProxyFetch?.(w) ?? w;
57221
57222
  return e ? { fetch: e } : {};
57222
57223
  })(),
57223
- ...w && { clientOptions: w },
57224
- ...h ? { reconnectionOptions: h } : m === !1 ? { reconnectionOptions: { maxRetries: 0 } } : {}
57224
+ ...T && { clientOptions: T },
57225
+ ...g ? { reconnectionOptions: g } : h === !1 ? { reconnectionOptions: { maxRetries: 0 } } : {}
57225
57226
  };
57226
- if (le && (r.gatewayUrl = le, B("debug", `Using proxy gateway: ${le} for target: ${t}`)), fe && Object.keys(fe).length > 0 && (r.headers = fe), !Fe.current) {
57227
- if (!ze.current) return B("debug", "Connection aborted - component unmounted, client cleaned up"), "failed";
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
- Fe.current.addServer(e, {
57232
+ Ie.current.addServer(e, {
57232
57233
  ...r,
57233
- authProvider: Ie.current,
57234
- onSampling: ee,
57235
- onElicitation: te,
57236
- wrapTransport: S ? (n) => (B("debug", "Applying transport wrapper for server:", e, "url:", t), S(n, t)) : void 0
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 Fe.current.createSession(e, !1);
57239
- if (!ze.current) return B("debug", "Connection aborted after session creation - component unmounted"), "failed";
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), T?.(e), e.method === "notifications/tools/list_changed" ? (B("info", "Tools list changed, auto-refreshing..."), ot().catch((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..."), st().catch((e) => B("warn", "Auto-refresh resources failed:", e))) : e.method === "notifications/prompts/list_changed" && (B("info", "Prompts list changed, auto-refreshing..."), ct().catch((e) => B("warn", "Auto-refresh prompts failed:", e)));
57244
- }), await i.initialize(), !ze.current) return B("debug", "Connection completed but component unmounted, aborting"), "failed";
57245
- if (B("info", "✅ Successfully connected to MCP server"), B("info", "Server info:", i.connector.serverInfo), B("info", "Server capabilities:", i.connector.serverCapabilities), !ze.current) return B("debug", "Skipping state update - component unmounted"), "failed";
57246
- me("ready"), qe.current = n, ae.enabled && ae.healthCheckInterval !== !1 && (i._healthCheckCleanup = Pde({
57247
- gatewayUrl: le,
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: fe,
57250
+ allHeaders: pe,
57250
57251
  getAuthHeaders: /* @__PURE__ */ W(async () => {
57251
57252
  try {
57252
- let e = await Ie.current?.tokens?.();
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: ze,
57261
- stateRef: Ge,
57262
- autoReconnectRef: Ke,
57263
- setState: me,
57261
+ isMountedRef: Be,
57262
+ stateRef: Ke,
57263
+ autoReconnectRef: qe,
57264
+ setState: he,
57264
57265
  addLog: B,
57265
- connect: Qe,
57266
- defaultReconnectDelay: ae.initialDelay,
57267
- healthCheckIntervalMs: ae.healthCheckInterval,
57268
- healthCheckTimeoutMs: ae.healthCheckTimeout
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: !!Ie.current,
57274
- hasSampling: !!ee,
57275
- hasElicitation: !!te
57276
- }).catch(() => {}), ge(i.connector.tools || []);
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 (!ze.current) return B("debug", "Connection aborted after listing resources - component unmounted"), "failed";
57279
- ve(a.resources || []);
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 (!ze.current) return B("debug", "Connection aborted after listing prompts - component unmounted"), "failed";
57282
- if (Se(o.prompts || []), i.connector.serverCapabilities?.resourceTemplates) {
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 (!ze.current) return B("debug", "Connection aborted after listing resource templates - component unmounted"), "failed";
57285
- be(e.resourceTemplates || []);
57286
- } else be([]);
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), !ze.current) return B("debug", "Skipping state update - component unmounted"), "failed";
57290
- we(s), Le.current = (async () => {
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 ze.current && (we((e) => e ? {
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 (!ze.current) return B("debug", "Connection aborted after favicon detection - component unmounted"), null;
57310
- if (e) return we((t) => t ? {
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), !ze.current) return B("debug", "Skipping state update - component unmounted"), "failed";
57323
- Ee(c);
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 (Ie.current) {
57326
- let e = await Ie.current.tokens?.();
57327
- if (!ze.current) return B("debug", "Connection aborted after token fetch for auth tokens - component unmounted"), "failed";
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 Ie.current.getTokenEndpoint?.() ?? null;
57332
+ n = await Le.current.getTokenEndpoint?.() ?? null;
57332
57333
  } catch {
57333
57334
  n = null;
57334
57335
  }
57335
57336
  try {
57336
- r = await Ie.current.getClientCredentials?.() ?? null;
57337
+ r = await Le.current.getClientCredentials?.() ?? null;
57337
57338
  } catch {
57338
57339
  r = null;
57339
57340
  }
57340
- if (!ze.current) return B("debug", "Skipping state update - component unmounted"), "failed";
57341
- Pe({
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 = Mde(r), s = i.code === 401 || a.includes("401") || a.includes("Unauthorized");
57356
- if (o && L && Object.keys(L).length > 0) return Ze("Authentication failed (HTTP 401). Server does not support OAuth. Check your Authorization header value is correct."), "failed";
57357
- if (o && (!L || Object.keys(L).length === 0)) return Ze("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";
57358
- if (s) {
57359
- if (o) return Ze("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";
57360
- if (Ie.current) if (B("info", "Authentication required. OAuth provider available."), _) {
57361
- if (B("info", "Waiting for user to initiate authentication flow..."), ze.current) {
57362
- me("pending_auth");
57363
- let e = Ie.current?.getLastAttemptedAuthUrl?.();
57364
- e && (Me(e), B("info", "Retrieved stored auth URL for manual authentication"));
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 Re.current = !1, "auth_redirect";
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(Ie.current, {
57374
+ if (await vz(Le.current, {
57372
57375
  serverUrl: t,
57373
57376
  ...r && { resourceMetadataUrl: r },
57374
57377
  ...i && { scope: i },
57375
- fetchFn: Ie.current.getProxyFetch?.()
57378
+ fetchFn: Le.current.getProxyFetch?.()
57376
57379
  }) === "REDIRECT") {
57377
- let e = await Ie.current.getAuthorizationCode?.();
57380
+ let e = await Le.current.getAuthorizationCode?.();
57378
57381
  if (!e) throw Error("Authorization code not captured by headless provider");
57379
- await vz(Ie.current, {
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: Ie.current.getProxyFetch?.()
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 Ze(`Automatic OAuth authentication failed: ${e instanceof Error ? e.message : String(e)}`, e instanceof Error ? e : Error(String(e))), "failed";
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 L && Object.keys(L).length > 0 ? (Ze("Authentication failed: Server returned 401 Unauthorized. Check your Authorization header value is correct."), "failed") : (Ze("Authentication required: Server returned 401 Unauthorized. Add an Authorization header in the Custom Headers section (e.g., Authorization: Bearer YOUR_API_KEY)."), "failed");
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 Ze(a, i instanceof Error ? i : Error(String(i))) ? "auth_redirect" : "failed";
57397
+ return Qe(a, i instanceof Error ? i : Error(String(i))) ? "auth_redirect" : "failed";
57395
57398
  }
57396
57399
  }, "tryConnectWithTransport"), a = "failed";
57397
- if (g === "sse") B("debug", "Using SSE-only transport mode"), a = await e("sse");
57398
- else if (g === "http") B("debug", "Using HTTP-only transport mode"), a = await e("http");
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" && ze.current && Ge.current !== "authenticating" ? (B("info", "HTTP failed, attempting SSE fallback..."), a = await e("sse")) : a = t;
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") && (Re.current = !1), B("debug", `Connection sequence finished with status: ${a}`);
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
- R.name,
57413
- R.version,
57414
- R.uri,
57415
- R.logo_uri,
57415
+ z.name,
57416
+ z.version,
57417
+ z.uri,
57418
+ z.logo_uri,
57419
+ I,
57416
57420
  F,
57417
- P,
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
- re,
57427
- le,
57428
- fe,
57429
- de
57428
+ S,
57429
+ ie,
57430
+ ue,
57431
+ u,
57432
+ pe,
57433
+ fe
57430
57434
  ]);
57431
57435
  (0, A.useEffect)(() => {
57432
- Je.current = Qe, Ye.current = Ze;
57433
- }, [Qe, Ze]);
57434
- let $e = (0, A.useCallback)(async (e, t, n) => {
57435
- if (Ge.current !== "ready" || !Fe.current) throw Error(`MCP client is not ready (${yB(Ge.current, !!Fe.current)}). Cannot call tool "${e}".`);
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 = Fe.current.getSession(i);
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
- }, [pe]), et = (0, A.useCallback)(() => {
57456
- Ge.current === "failed" ? (B("info", "Retry requested..."), Je.current?.()) : B("warn", `Retry called but state is not 'failed' (state: ${Ge.current}). Ignoring.`);
57457
- }, [B]), tt = (0, A.useCallback)(async () => {
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 = Ge.current;
57460
- if (e === "failed") B("info", "Attempting to reconnect and authenticate via retry..."), et();
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(Ie.current, "Auth Provider not available for manual auth"), _B(t, "Server URL is required for authentication"), o) {
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(Ie.current, {
57471
+ await vz(Le.current, {
57468
57472
  serverUrl: n,
57469
- fetchFn: Ie.current.getProxyFetch?.()
57470
- }), Je.current?.();
57473
+ fetchFn: Le.current.getProxyFetch?.()
57474
+ }), Ye.current?.();
57471
57475
  return;
57472
57476
  }
57473
- B("info", `Cleared ${Ie.current.clearStorage?.() ?? 0} OAuth storage item(s) for fresh authentication`), me("authenticating");
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: de,
57479
+ effectiveOAuthUrl: fe,
57476
57480
  storageKeyPrefix: i,
57477
- oauthClientConfig: R,
57481
+ oauthClientConfig: z,
57478
57482
  callbackUrl: r,
57479
57483
  preventAutoAuth: !1,
57480
- useRedirectFlow: v,
57481
- gatewayUrl: le,
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
- y?.(t, r, i);
57492
+ b?.(t, r, i);
57488
57493
  }, "captureOnPopupWindow"),
57489
- proxyOAuthRequests: !le,
57490
- staticClientInfo: F,
57491
- scope: P
57494
+ proxyOAuthRequests: !0,
57495
+ staticClientInfo: I,
57496
+ scope: F
57492
57497
  });
57493
- s && !le ? B("info", "Scoped OAuth proxy fetch enabled for manual auth") : s && le && B("info", "Using MCP gateway proxy for OAuth (no scoped OAuth fetch needed)"), Ie.current = a, B("info", "Triggering fresh OAuth authorization...");
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 u = a.getLastAttemptedAuthUrl?.();
57504
- if (u && (Me(u), B("info", "Updated auth URL for fallback:", u), !n)) try {
57505
- n = new URL(u).searchParams.get("state");
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 (v) return;
57508
- let d = a.getKey?.("tokens");
57509
- if (!d) {
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
- We.current = !0;
57514
- let f;
57518
+ Ge.current = !0;
57519
+ let p;
57515
57520
  try {
57516
- f = await gde({
57521
+ p = await gde({
57517
57522
  popup: e,
57518
57523
  state: n,
57519
- tokensKey: d
57524
+ tokensKey: f
57520
57525
  });
57521
57526
  } finally {
57522
- We.current = !1;
57527
+ Ge.current = !1;
57523
57528
  }
57524
- if (!ze.current) return;
57525
- switch (f.kind) {
57529
+ if (!Be.current) return;
57530
+ switch (p.kind) {
57526
57531
  case "success":
57527
- B("info", "Authentication succeeded; reconnecting to MCP server..."), Re.current = !1, Je.current?.();
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."), me("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."), me("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
- Ze(`Authentication failed: ${f.error}`);
57541
+ Qe(`Authentication failed: ${p.error}`);
57537
57542
  break;
57538
57543
  default: break;
57539
57544
  }
57540
57545
  } catch (e) {
57541
- if (!ze.current) return;
57542
- me("pending_auth"), B("error", `Manual authentication failed: ${e instanceof Error ? e.message : String(e)}`);
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 = Ie.current?.getLastAttemptedAuthUrl?.();
57547
- e && !je && (Me(e), B("info", "Manual authentication URL retrieved:", 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
- et,
57552
- Ze,
57553
- je,
57556
+ tt,
57557
+ Qe,
57558
+ Me,
57554
57559
  t,
57555
- v,
57556
57560
  y,
57561
+ b,
57557
57562
  i,
57558
- R.name,
57559
- R.uri,
57560
- R.logo_uri,
57563
+ z.name,
57564
+ z.uri,
57565
+ z.logo_uri,
57566
+ I,
57561
57567
  F,
57562
- P,
57563
57568
  r,
57564
- re,
57569
+ ie,
57565
57570
  o
57566
- ]), nt = (0, A.useCallback)(() => {
57567
- Ie.current?.clearStorage ? (B("info", `Cleared ${Ie.current.clearStorage()} item(s) from localStorage for ${t}.`), Me(void 0), Xe()) : B("warn", "Auth provider not initialized, cannot clear storage.");
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
- Xe
57572
- ]), rt = (0, A.useCallback)(async () => {
57573
- if (Ge.current !== "ready" || !Fe.current) throw Error(`MCP client is not ready (${yB(Ge.current, !!Fe.current)}). Cannot list resources.`);
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 = Fe.current.getSession(e);
57581
+ let e = vB, t = Ie.current.getSession(e);
57577
57582
  if (!t) throw Error("No active session found");
57578
- ve((await t.connector.listAllResources()).resources || []), B("info", "Resources listed successfully");
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
- }, [pe]), it = (0, A.useCallback)(async (e) => {
57583
- if (Ge.current !== "ready" || !Fe.current) throw Error(`MCP client is not ready (${yB(Ge.current, !!Fe.current)}). Cannot read resource.`);
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 = Fe.current.getSession(t);
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
- }, [pe]), at = (0, A.useCallback)(async () => {
57601
- if (Ge.current !== "ready" || !Fe.current) throw Error(`MCP client is not ready (${yB(Ge.current, !!Fe.current)}). Cannot list prompts.`);
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 = Fe.current.getSession(e);
57609
+ let e = vB, t = Ie.current.getSession(e);
57605
57610
  if (!t) throw Error("No active session found");
57606
- Se((await t.connector.listPrompts()).prompts || []), B("info", "Prompts listed successfully");
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
- }, [pe]), ot = (0, A.useCallback)(async () => {
57611
- if (Ge.current !== "ready" || !Fe.current) {
57612
- B("debug", "Cannot refresh tools - client not ready. State:", Ge.current);
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 = Fe.current.getSession(e);
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"), ge(n || []), B("info", "Tools list refreshed successfully");
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]), st = (0, A.useCallback)(async () => {
57629
- if (Ge.current !== "ready" || !Fe.current) {
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 = Fe.current.getSession(e);
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
- ve((await t.connector.listAllResources()).resources || []), B("info", "Resources list refreshed successfully");
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]), ct = (0, A.useCallback)(async () => {
57645
- if (Ge.current !== "ready" || !Fe.current) {
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 = Fe.current.getSession(e);
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
- Se((await t.connector.listPrompts()).prompts || []), B("info", "Prompts list refreshed successfully");
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]), lt = (0, A.useCallback)(async () => {
57661
- if (Ge.current !== "ready" || !Fe.current) {
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 = Fe.current.getSession(e);
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
- ze.current && (be(n.resourceTemplates || []), B("info", `Resource templates refreshed: ${n.resourceTemplates?.length || 0} templates`));
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]), ut = (0, A.useCallback)(async () => {
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
- lt(),
57679
- ct()
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
- ]), dt = (0, A.useCallback)(async (e, t) => {
57688
- if (Ge.current !== "ready" || !Fe.current) throw Error(`MCP client is not ready (${yB(Ge.current, !!Fe.current)}). Cannot get prompt.`);
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 = Fe.current.getSession(n);
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
- }, [pe, B]), ft = (0, A.useCallback)(async (e) => {
57699
- if (Ge.current !== "ready" || !Fe.current) throw Error(`MCP client is not ready (${yB(Ge.current, !!Fe.current)}). Cannot request completion.`);
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 = Fe.current.getSession(t);
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
- }, [pe, B]);
57714
+ }, [me, B]);
57710
57715
  (0, A.useEffect)(() => {
57711
57716
  let e = /* @__PURE__ */ W((e, t) => {
57712
- if (We.current) {
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 = Ie.current?.serverUrlHash;
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), He.current && clearTimeout(He.current), He.current = null, e?.success) B("info", "Authentication successful via popup. Reconnecting client..."), Re.current && B("debug", "Connection attempt already in progress, resetting flag to allow reconnection."), Re.current = !1, setTimeout(() => {
57722
- ze.current && (B("debug", "Initiating reconnection after successful auth callback."), Je.current?.());
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 (Ge.current !== "authenticating" && Ge.current !== "pending_auth") {
57726
- B("debug", `Ignoring stale auth failure callback (state=${Ge.current}).`);
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
- Ye.current?.(`Authentication failed in callback: ${e?.error || "Unknown reason."}`);
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
- He.current && clearTimeout(He.current);
57755
+ Ue.current && clearTimeout(Ue.current);
57751
57756
  };
57752
57757
  }, [B]), (0, A.useEffect)(() => {
57753
- if (ze.current = !0, !n || !t) return B("debug", n ? "No server URL provided, skipping connection." : "Connection disabled via enabled flag."), me("discovering"), () => {
57754
- ze.current = !1;
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."), Be.current = 0, o) Ie.current = o, B("debug", "Using externally provided authProvider");
57757
- else if (!Ie.current || Ie.current.serverUrl !== de) {
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: de,
57764
+ effectiveOAuthUrl: fe,
57760
57765
  storageKeyPrefix: i,
57761
- oauthClientConfig: R,
57766
+ oauthClientConfig: z,
57762
57767
  callbackUrl: r,
57763
- preventAutoAuth: _,
57764
- useRedirectFlow: v,
57765
- gatewayUrl: le,
57766
- onPopupWindow: y,
57768
+ preventAutoAuth: v,
57769
+ useRedirectFlow: y,
57770
+ gatewayUrl: ue,
57771
+ oauthProxyUrl: u,
57772
+ onPopupWindow: b,
57767
57773
  proxyOAuthRequests: !0,
57768
- staticClientInfo: F,
57769
- scope: P
57774
+ staticClientInfo: I,
57775
+ scope: F
57770
57776
  });
57771
- Ie.current = e, t && B("debug", `OAuth proxy URL derived from gateway: ${t}`), B("debug", `BrowserOAuthClientProvider initialized/updated with URL: ${de}, proxy: ${t ? "enabled" : "disabled"}, gateway: ${le ? "enabled" : "disabled"}`);
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 Qe(), () => {
57774
- ze.current = !1, B("debug", "useMcp unmounting, disconnecting."), Xe(!0);
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
- R.name,
57782
- R.version,
57783
- R.uri,
57784
- R.logo_uri,
57787
+ z.name,
57788
+ z.version,
57789
+ z.uri,
57790
+ z.logo_uri,
57791
+ I,
57785
57792
  F,
57786
- P,
57787
- v,
57788
- re,
57789
- de,
57793
+ y,
57794
+ ie,
57795
+ fe,
57790
57796
  l,
57791
57797
  o
57792
57798
  ]);
57793
- let pt = (0, A.useRef)(et), mt = (0, A.useRef)(B);
57799
+ let mt = (0, A.useRef)(tt), ht = (0, A.useRef)(B);
57794
57800
  (0, A.useEffect)(() => {
57795
- pt.current = et, mt.current = B;
57796
- }, [et, B]), (0, A.useEffect)(() => {
57801
+ mt.current = tt, ht.current = B;
57802
+ }, [tt, B]), (0, A.useEffect)(() => {
57797
57803
  let e = null;
57798
- if (pe === "failed" && p && Be.current > 0) {
57799
- if (!Ue.current) {
57800
- Ue.current = !0;
57801
- let t = typeof p == "number" ? p : Fde;
57802
- mt.current("info", `Connection failed, auto-retrying in ${t}ms...`), e = setTimeout(() => {
57803
- Ue.current = !1, ze.current && Ge.current === "failed" && pt.current();
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 pe !== "failed" && (Ue.current = !1);
57812
+ } else me !== "failed" && (We.current = !1);
57807
57813
  return () => {
57808
- e && (clearTimeout(e), Ue.current = !1);
57814
+ e && (clearTimeout(e), We.current = !1);
57809
57815
  };
57810
- }, [pe, p]);
57811
- let ht = (0, A.useCallback)(async () => Ge.current === "ready" ? Ce?.icon ? Ce.icon : Le.current ? (B("debug", "Waiting for icon to finish loading..."), await Le.current) : (B("debug", "No icon available and no loading in progress"), null) : (B("warn", "Cannot ensure icon loaded - not connected"), null), [Ce, B]);
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: pe,
57814
- name: Ce?.name || t || "",
57815
- tools: he,
57816
- resources: _e,
57817
- resourceTemplates: ye,
57818
- prompts: xe,
57819
- serverInfo: Ce,
57820
- capabilities: Te,
57821
- error: De,
57822
- log: ke,
57823
- authUrl: je,
57824
- authTokens: Ne,
57825
- client: Fe.current,
57826
- callTool: $e,
57827
- readResource: it,
57828
- listResources: rt,
57829
- listPrompts: at,
57830
- getPrompt: dt,
57831
- complete: ft,
57832
- refreshTools: ot,
57833
- refreshResources: st,
57834
- refreshResourceTemplates: lt,
57835
- refreshPrompts: ct,
57836
- refreshAll: ut,
57837
- retry: et,
57838
- disconnect: Xe,
57839
- authenticate: tt,
57840
- clearStorage: nt,
57841
- ensureIconLoaded: ht
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 B.default;
69130
+ return Xe.default;
69125
69131
  }
69126
69132
  }), Object.defineProperty(e, "tomorrowNightEighties", {
69127
69133
  enumerable: !0,
69128
69134
  get: function() {
69129
- return Xe.default;
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()), B = t(H_e()), Xe = 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());
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 B = A.indexOf(">");
116449
- B !== -1 && (Ye = A.slice(B + 1));
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 Xe = n4(e, a);
116468
- if (!Xe) return null;
116469
- var Ze = Xe.tag, Qe = Ze.toLowerCase(), $e = Ze.charCodeAt(0), et = $e >= N2 && $e <= P2;
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 (Xe.isClosing) return {
116477
+ if (B.isClosing) return {
116472
116478
  node: {
116473
116479
  type: z2.htmlSelfClosing,
116474
116480
  tag: Ze,
116475
116481
  attrs: {},
116476
- endPos: Xe.end,
116482
+ endPos: B.end,
116477
116483
  b: !0,
116478
- a: e.slice(a, Xe.end)
116484
+ a: e.slice(a, B.end)
116479
116485
  },
116480
- end: Xe.end
116486
+ end: B.end
116481
116487
  };
116482
- var tt = vze(e, Xe.end, Ze), nt = [];
116488
+ var tt = vze(e, B.end, Ze), nt = [];
116483
116489
  if (tt !== -1) {
116484
- var rt = T4, it = e.slice(Xe.end, rt), at = it.trim();
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(Xe.attrs, Ze, r),
116495
- e: Xe.whitespaceBeforeAttrs + Xe.rawAttrs,
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, Xe.end), _t = gt < e.length ? f4(e, gt) : gt, vt = e.slice(Xe.end, gt);
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(Xe.end, gt);
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(Xe.attrs, Ze, r),
116518
- e: Xe.whitespaceBeforeAttrs + Xe.rawAttrs,
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, Xe.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]), B = F > 0 || re && !ae.current, Xe = (0, A.useRef)(!1);
130346
+ }, [t, M]), Xe = F > 0 || re && !ae.current, B = (0, A.useRef)(!1);
130341
130347
  if ((0, A.useEffect)(() => {
130342
- Xe.current || F > 0 && (Xe.current = !0, y?.());
130348
+ B.current || F > 0 && (B.current = !0, y?.());
130343
130349
  }, [F, y]), (0, A.useEffect)(() => {
130344
- if (!B || !R) return;
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
- }, [B, R]), L) return /* @__PURE__ */ (0, O.jsx)(O7, {
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), B = (0, A.useCallback)(() => {
135736
+ }, [He, ue]), [Je, Ye] = (0, A.useState)(!1), Xe = (0, A.useCallback)(() => {
135731
135737
  ue(!1), Ye(!0);
135732
- }, [ue]), { user: Xe } = KIe(f ? c : void 0), Ze = GIe({
135738
+ }, [ue]), { user: B } = KIe(f ? c : void 0), Ze = GIe({
135733
135739
  isManaged: Ee,
135734
135740
  enableFreeTierUpgrade: f,
135735
- isAuthenticated: Xe != null
135736
- }) ? { onLoginClick: B } : 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({
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