@decocms/mesh 2.16.0 → 2.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/client/assets/{AlertCircle-B2oZTglS.js → AlertCircle-rclbzics.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DNHIvCfQ.js → ArrowLeft-ClViT7Hc.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-B6oTANSV.js → ArrowUp-BsQNKzS-.js} +1 -1
  4. package/dist/client/assets/{Check-BzuFSftX.js → Check-C2R_Lcai.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BczYL0OZ.js → ChevronDown-CGAmRXVd.js} +1 -1
  6. package/dist/client/assets/{Code01-DNXaHLqw.js → Code01-CVOtW_Yi.js} +1 -1
  7. package/dist/client/assets/{Copy01-Biw66bGV.js → Copy01-BvrgG3_u.js} +1 -1
  8. package/dist/client/assets/{DotsHorizontal-ZLYpFz0w.js → DotsHorizontal-D-_ECokQ.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-cBsSXBlU.js → DotsVertical-BeOWu8ww.js} +1 -1
  10. package/dist/client/assets/{Download01-Cq2AKtAL.js → Download01-C4VXJ4rj.js} +1 -1
  11. package/dist/client/assets/{Edit01-BjOfQM8B.js → Edit01-CkDEl3XN.js} +1 -1
  12. package/dist/client/assets/{File06-BNhcqwLq.js → File06-DcfM98WM.js} +1 -1
  13. package/dist/client/assets/{FilterLines-CoWRaycl.js → FilterLines-BFhYlm1G.js} +1 -1
  14. package/dist/client/assets/{FlipBackward-CuLGV5oo.js → FlipBackward-Bz0fRANc.js} +1 -1
  15. package/dist/client/assets/{GitBranch01-DkToEQj6.js → GitBranch01-Bc0tKWvO.js} +1 -1
  16. package/dist/client/assets/{Grid01-uV0oBuV3.js → Grid01-SL4tYH2-.js} +1 -1
  17. package/dist/client/assets/{Home02-B5sox49B.js → Home02-C2IjHPBI.js} +1 -1
  18. package/dist/client/assets/{Image01-DMLU_ak3.js → Image01-BQtv4av4.js} +1 -1
  19. package/dist/client/assets/{Inbox01-BfxyUVOc.js → Inbox01-Dq00_28Z.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-D6SOLGfY.js → InfoCircle-Cr1Ezl_g.js} +1 -1
  21. package/dist/client/assets/{Key01-DY1coeHQ.js → Key01-nM2KN2wI.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-DMezlNGG.js → LinkExternal01-Cek4l5LT.js} +1 -1
  23. package/dist/client/assets/{List-CVC8X3kY.js → List-DhHX60HN.js} +1 -1
  24. package/dist/client/assets/{Loading01-CvuvLhSA.js → Loading01-CpEccvEO.js} +1 -1
  25. package/dist/client/assets/{Lock01-ByXncGT3.js → Lock01-DkAqto6l.js} +1 -1
  26. package/dist/client/assets/{MessageChatSquare-Dd7UGbcR.js → MessageChatSquare-B8VNN8W_.js} +1 -1
  27. package/dist/client/assets/{Play-D53Ipg7b.js → Play-gy0OXoTQ.js} +1 -1
  28. package/dist/client/assets/{Plus-emJv0cyE.js → Plus-DjzFfDDP.js} +1 -1
  29. package/dist/client/assets/{SearchMd-4bGqWhO7.js → SearchMd-Cg2el-z8.js} +1 -1
  30. package/dist/client/assets/{Terminal-Dwvrrbxm.js → Terminal-Kg8grfTZ.js} +1 -1
  31. package/dist/client/assets/{Trash01-C9fgHihQ.js → Trash01-BnAfsqRe.js} +1 -1
  32. package/dist/client/assets/{Upload01-CRvHyAuf.js → Upload01-DRgz8NgE.js} +1 -1
  33. package/dist/client/assets/{X-DwZFSRlE.js → X-CBga9b95.js} +1 -1
  34. package/dist/client/assets/{XClose-bVRJhtCU.js → XClose-DEljIF8n.js} +1 -1
  35. package/dist/client/assets/{alert-dialog-NsN0mz0A.js → alert-dialog-BNxiLvEc.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-CZQOowpQ.js → auth-catchall-DeehfEMz.js} +1 -1
  37. package/dist/client/assets/{avatar-Bim2Jxhy.js → avatar-BXyXgGjh.js} +1 -1
  38. package/dist/client/assets/{badge-DbLa101x.js → badge-Ctdv4gxt.js} +1 -1
  39. package/dist/client/assets/{binder-52kHlP5R.js → binder-BxrAqFdA.js} +1 -1
  40. package/dist/client/assets/{button-CTJokKKi.js → button-C0pnkZlC.js} +1 -1
  41. package/dist/client/assets/{card-D3-N0Ziq.js → card-DUUk5B6T.js} +1 -1
  42. package/dist/client/assets/{checkbox-Bio0mokg.js → checkbox-DSzJrlMA.js} +1 -1
  43. package/dist/client/assets/{collection-detail-kd5gJHzz.js → collection-detail-iIrZ-zZ-.js} +1 -1
  44. package/dist/client/assets/{collection-display-button-D4xA64Pp.js → collection-display-button-DDxBelrQ.js} +1 -1
  45. package/dist/client/assets/{collection-header-CDIKZA15.js → collection-header-d89fPnWN.js} +1 -1
  46. package/dist/client/assets/{collection-page-DkTZhP29.js → collection-page-DvY1awQQ.js} +1 -1
  47. package/dist/client/assets/{collection-search-NLGzx5Aj.js → collection-search-DFSn4A42.js} +1 -1
  48. package/dist/client/assets/{collection-tab-CHEJ77P0.js → collection-tab-J4NMpB8P.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-Cmwf3-Zd.js → collection-table-wrapper-CB1f1HNV.js} +1 -1
  50. package/dist/client/assets/{connection-CVA8jPCa.js → connection-CMutAR-q.js} +1 -1
  51. package/dist/client/assets/{connection-card-DSQeBo5D.js → connection-card-DJA7LSPP.js} +1 -1
  52. package/dist/client/assets/connection-detail-AyiveTST.js +1 -0
  53. package/dist/client/assets/{connections-BQG75-F0.js → connections-B5sVjhUZ.js} +1 -1
  54. package/dist/client/assets/constants-Bx2xP4ra.js +1 -0
  55. package/dist/client/assets/{create-organization-dialog-Bax-UsKr.js → create-organization-dialog-FpknJphA.js} +1 -1
  56. package/dist/client/assets/{dialog-Bn93qdaz.js → dialog-DGipxHKv.js} +1 -1
  57. package/dist/client/assets/{dropdown-menu-BoZzHM67.js → dropdown-menu-DXIsFCVQ.js} +1 -1
  58. package/dist/client/assets/{dynamic-plugin-layout-CQi3lnCP.js → dynamic-plugin-layout-p6uYyMI7.js} +1 -1
  59. package/dist/client/assets/{empty-state-Dm-ohURa.js → empty-state-BOQ8a8rM.js} +1 -1
  60. package/dist/client/assets/{empty-state-Bcd1wXFS.js → empty-state-CsVvxFp9.js} +1 -1
  61. package/dist/client/assets/{env-vars-editor-ckaYIpuZ.js → env-vars-editor-DsDwdS2I.js} +1 -1
  62. package/dist/client/assets/{error-boundary-BoSqgCtj.js → error-boundary-CiihS5J_.js} +1 -1
  63. package/dist/client/assets/{extract-connection-data-CxTJQ988.js → extract-connection-data-CZNqSTSO.js} +1 -1
  64. package/dist/client/assets/{file-browser-Dn-I1IiE.js → file-browser-DtPxgmLq.js} +2 -2
  65. package/dist/client/assets/{form-CG-hsJ5c.js → form-Cq3oH5p8.js} +1 -1
  66. package/dist/client/assets/{gateway-detail-BQDBMjd9.js → gateway-detail-Ds9jNsAy.js} +1 -1
  67. package/dist/client/assets/{gateways-DSACPdOv.js → gateways--0F8usoj.js} +1 -1
  68. package/dist/client/assets/{grid-view-hvwfrwye.js → grid-view-DCCLpGyL.js} +1 -1
  69. package/dist/client/assets/{home-CeFBBPsp.js → home-C6YGDrtN.js} +1 -1
  70. package/dist/client/assets/{index-j6TJSjaV.js → index-BEGxRCwV.js} +5 -5
  71. package/dist/client/assets/{index-CRZ1ToW0.js → index-BPAz_Wmi.js} +1 -1
  72. package/dist/client/assets/{index-2KSfo6Ol.css → index-CCciYu2S.css} +1 -1
  73. package/dist/client/assets/{index-CmErlMVO.js → index-Ct-XKtSm.js} +1 -1
  74. package/dist/client/assets/{index-CrProqmQ.js → index-lLPOJwFP.js} +19 -19
  75. package/dist/client/assets/index-sjg7ALLH.js +25 -0
  76. package/dist/client/assets/{infiniteQueryObserver-lRzj3Gw2.js → infiniteQueryObserver-Cg5Uwm-m.js} +1 -1
  77. package/dist/client/assets/{input-DfBpU_ty.js → input-BtvEWyY7.js} +1 -1
  78. package/dist/client/assets/{layout-AUAvH2H1.js → layout-D_5LiG9u.js} +1 -1
  79. package/dist/client/assets/{lazy-highlighter-VlHU8Y-l.js → lazy-highlighter-D262jDd3.js} +1 -1
  80. package/dist/client/assets/{localstorage-keys-CRSC1wcG.js → localstorage-keys-CrsmSVIa.js} +1 -1
  81. package/dist/client/assets/{login-DuLQYRHx.js → login-D-eNDgSJ.js} +1 -1
  82. package/dist/client/assets/mcp-oauth-BlRDBNPG.js +1 -0
  83. package/dist/client/assets/{mcp-server-card-CXVHhw09.js → mcp-server-card-h4-acR5C.js} +1 -1
  84. package/dist/client/assets/{mcp-server-detail-DRgWtEnz.js → mcp-server-detail-BIJFOf-1.js} +1 -1
  85. package/dist/client/assets/{members-D2GPpEvZ.js → members-JDeSn8de.js} +1 -1
  86. package/dist/client/assets/{monaco-editor-Ch4QGmXS.js → monaco-editor-h8_XpHnI.js} +1 -1
  87. package/dist/client/assets/{monitoring-DvqA7AuH.js → monitoring-B5veKGER.js} +12 -12
  88. package/dist/client/assets/{oauth-callback-B2iJ-cIh.js → oauth-callback-B7GGjmT2.js} +1 -1
  89. package/dist/client/assets/{page-CekK7zPt.js → page-DRfRpAk9.js} +1 -1
  90. package/dist/client/assets/{page-CTarFbC4.js → page-JPTyFV98.js} +1 -1
  91. package/dist/client/assets/{pin-to-sidebar-button-BsMAQ8Vt.js → pin-to-sidebar-button-DNtnmSb8.js} +1 -1
  92. package/dist/client/assets/{plugin-empty-state-Dy73LUEA.js → plugin-empty-state-DrcgOOcq.js} +1 -1
  93. package/dist/client/assets/{plugin-header-B_tffoXS.js → plugin-header-riFgGbiI.js} +1 -1
  94. package/dist/client/assets/{plugins-CR5Q-iDa.js → plugins-DoB7Ko8p.js} +1 -1
  95. package/dist/client/assets/{popover-BZ-FzZWz.js → popover-pNwa1deQ.js} +1 -1
  96. package/dist/client/assets/{project-context-provider-DaHOfM4z.js → project-context-provider-BMHXD39x.js} +1 -1
  97. package/dist/client/assets/{registry-utils-D0mO6LZ4.js → registry-utils-BkBVcE6w.js} +1 -1
  98. package/dist/client/assets/{resizable-BPD0-alN.js → resizable-jz1SBMEc.js} +1 -1
  99. package/dist/client/assets/{resource-tabs-JnmKNHPF.js → resource-tabs-DqRWX41r.js} +1 -1
  100. package/dist/client/assets/{select-IfWnHVgm.js → select-COJ5S7Rq.js} +1 -1
  101. package/dist/client/assets/{settings-DjC9FBse.js → settings-CmNkIvY0.js} +1 -1
  102. package/dist/client/assets/{shell-layout-Bd8yx5uJ.js → shell-layout-B43W-k9I.js} +1 -1
  103. package/dist/client/assets/{spinner-C88Uk3Mq.js → spinner-Deoz6N0J.js} +1 -1
  104. package/dist/client/assets/{switch-DoEPJ6LK.js → switch-Z2NGTQao.js} +1 -1
  105. package/dist/client/assets/{textarea-BqnrlDDE.js → textarea-fD103gtG.js} +1 -1
  106. package/dist/client/assets/{tool-set-selector-DRO7hzfM.js → tool-set-selector-SxQbDynN.js} +1 -1
  107. package/dist/client/assets/{tools-list-CLVUgs1o.js → tools-list-9lgpWeKJ.js} +1 -1
  108. package/dist/client/assets/{tooltip-NmHBw1SB.js → tooltip-D0yN_jPS.js} +1 -1
  109. package/dist/client/assets/{use-binding-BeRgkTto.js → use-binding-bdIG4ysm.js} +1 -1
  110. package/dist/client/assets/{use-collections-KXXQm2MI.js → use-collections-DiH8BH96.js} +1 -1
  111. package/dist/client/assets/{use-connection-BpwLfga7.js → use-connection-BvgGy_ae.js} +1 -1
  112. package/dist/client/assets/use-connection-resources-CazBLQYp.js +1 -0
  113. package/dist/client/assets/{use-create-gateway-CCdAKPuZ.js → use-create-gateway-DWTCcW8J.js} +1 -1
  114. package/dist/client/assets/{use-gateway-CvXTgd1x.js → use-gateway-Blme6XE1.js} +1 -1
  115. package/dist/client/assets/{use-gateway-system-prompt-DppzttmJ.js → use-gateway-system-prompt-DfRYNjlK.js} +1 -1
  116. package/dist/client/assets/{use-list-state-lFbY6EbW.js → use-list-state-C9VeGRXh.js} +1 -1
  117. package/dist/client/assets/{use-mcp-Dd1lbCPb.js → use-mcp-ByUu9rNa.js} +1 -1
  118. package/dist/client/assets/{use-members-BPs6PrLQ.js → use-members-A4eH5Mug.js} +1 -1
  119. package/dist/client/assets/{use-mobile-C5bi3iKH.js → use-mobile-DQFSnNx5.js} +1 -1
  120. package/dist/client/assets/{use-organization-settings-D1QvFxpy.js → use-organization-settings-CFfwAQvt.js} +1 -1
  121. package/dist/client/assets/{use-tool-call-VFE826W3.js → use-tool-call-q6DaczOv.js} +1 -1
  122. package/dist/client/assets/useInfiniteQuery-c0A7IUcG.js +1 -0
  123. package/dist/client/assets/{useMutation-BTJq9RED.js → useMutation-8xrpFP-l.js} +1 -1
  124. package/dist/client/assets/useQuery-CLJFoOtO.js +1 -0
  125. package/dist/client/assets/{value-_xkD4VBb.js → value-_3bvT1Yq.js} +1 -1
  126. package/dist/client/assets/{view-mode-toggle-DcZ2e_Ag.js → view-mode-toggle-C7lGZNG7.js} +1 -1
  127. package/dist/client/assets/{workflow-B-4ovCZr.js → workflow-DBXd52Rn.js} +1 -1
  128. package/dist/client/index.html +2 -2
  129. package/dist/server/cli.js +22 -22
  130. package/dist/server/server.js +38 -38
  131. package/package.json +1 -1
  132. package/dist/client/assets/connection-detail-BRtmbxOA.js +0 -1
  133. package/dist/client/assets/constants-DDPe3rq3.js +0 -1
  134. package/dist/client/assets/index-EGRg6aHg.js +0 -25
  135. package/dist/client/assets/mcp-oauth-BuyvGrP4.js +0 -1
  136. package/dist/client/assets/use-connection-resources-LbJAvV0-.js +0 -1
  137. package/dist/client/assets/useInfiniteQuery-DwjnurDK.js +0 -1
  138. package/dist/client/assets/useQuery-5B4EpEmL.js +0 -1
@@ -1 +0,0 @@
1
- import{bF as T,bG as P,bH as V,bI as $}from"./index-CrProqmQ.js";function A(n){let e=0;for(let t=0;t<n.length;t++){const o=n.charCodeAt(t);e=(e<<5)-e+o,e=e&e}return Math.abs(e).toString(16)}const U=new Map,I="mcp:oauth:callback:";class L{serverUrl;_clientMetadata;_redirectUrl;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${window.location.origin}/oauth/callback`;const t=e.scope?Array.isArray(e.scope)?e.scope.join(" "):e.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:e.clientName??"@decocms/mesh MCP client",...t&&{scope:t}},U.set(A(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(e){this._clientInfo=e}tokens(){return this._tokens??void 0}saveTokens(e){this._tokens=e}redirectToAuthorization(e){const a=window.screenX+(window.outerWidth-600)/2,s=window.screenY+(window.outerHeight-700)/2;window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${a},top=${s},popup=yes`)}saveCodeVerifier(e){this._codeVerifier=e}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){U.delete(A(this.serverUrl))}}async function x(n){const e=new URL(`/mcp/${n.connectionId}`,window.location.origin),t=new L({serverUrl:e.href,clientName:n.clientName,clientUri:n.clientUri,callbackUrl:n.callbackUrl,scope:n.scope});try{const o=new Promise((r,c)=>{const b=n.timeout||12e4;let w,h=!1;const E=t.state(),_=`${I}${E}`,l=()=>{window.removeEventListener("message",m),window.removeEventListener("storage",g),clearTimeout(w);try{localStorage.removeItem(_)}catch{}},k=async i=>{if(h)return;if(h=!0,!i.success){l(),c(new Error(i.error||"OAuth authentication failed"));return}const{code:f,state:C}=i;if(!f){l(),c(new Error("Missing authorization code"));return}if(t.getStoredState()!==C){l(),c(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const S=(await T(e))?.authorization_servers?.[0]||e,y=await P(S),d=t.clientInformation();if(!d){l(),c(new Error("Client information not found"));return}const M=t.codeVerifier(),O=await V(S,{metadata:y,clientInformation:d,authorizationCode:f,codeVerifier:M,redirectUri:t.redirectUrl,resource:new URL(e)});l(),r({tokens:O,clientId:d.client_id??null,clientSecret:"client_secret"in d?d.client_secret:null,tokenEndpoint:y?.token_endpoint??null})}catch(v){l(),c(v)}},m=async i=>{i.origin===window.location.origin&&i.data?.type==="mcp:oauth:callback"&&await k(i.data)},g=async i=>{if(!(i.key!==_||!i.newValue))try{const f=JSON.parse(i.newValue);await k(f)}catch{}};window.addEventListener("message",m),window.addEventListener("storage",g),w=setTimeout(()=>{h||(h=!0,l(),c(new Error("OAuth authentication timeout")))},b)});if(await $(t,{serverUrl:e})==="REDIRECT"){const r=await o;return{token:r.tokens.access_token,tokenInfo:{accessToken:r.tokens.access_token,refreshToken:r.tokens.refresh_token??null,expiresIn:r.tokens.expires_in??null,scope:r.tokens.scope??null,clientId:r.clientId,clientSecret:r.clientSecret,tokenEndpoint:r.tokenEndpoint},error:null}}const s=t.tokens(),u=t.clientInformation();return{token:s?.access_token||null,tokenInfo:s?{accessToken:s.access_token,refreshToken:s.refresh_token??null,expiresIn:s.expires_in??null,scope:s.scope??null,clientId:u?.client_id??null,clientSecret:u&&"client_secret"in u?u.client_secret:null,tokenEndpoint:null}:null,error:null}}catch(o){return{token:null,tokenInfo:null,error:o instanceof Error?o.message:String(o)}}finally{t.cleanup()}}function p(n,e){if(window.opener&&!window.opener.closed)return window.opener.postMessage(n,window.location.origin),!0;if(e)try{const t=`${I}${e}`;return localStorage.setItem(t,JSON.stringify(n)),!0}catch{}return!1}async function N(){const n=new URLSearchParams(window.location.search),e=n.get("code");let t=n.get("state");const o=n.get("error"),a=n.get("error_description");let s=t;if(t)try{const r=atob(t),c=JSON.parse(r);c.clientState&&(s=c.clientState)}catch{}if(o){const r=a||o;return p({type:"mcp:oauth:callback",success:!1,error:r},s),{success:!1,error:r}}if(!e||!t){const r="Missing code or state parameter";return p({type:"mcp:oauth:callback",success:!1,error:r},s),{success:!1,error:r}}return t=s||t,p({type:"mcp:oauth:callback",success:!0,code:e,state:t},t)?{success:!0}:{success:!1,error:"Parent window not available"}}async function H({url:n,token:e}){try{const t=new Headers;t.set("Content-Type","application/json"),t.set("Accept","application/json, text/event-stream");const o=await fetch(n,{method:"POST",headers:t,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})});if(o.ok)return{isAuthenticated:!0,supportsOAuth:!0};let a;try{const r=await o.json();a=r.error||r.message}catch{}return o.status>=500?{isAuthenticated:!1,supportsOAuth:!1,error:a||`HTTP ${o.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!o.headers.get("WWW-Authenticate"),error:a||`HTTP ${o.status}`}}catch(t){return console.error("[isConnectionAuthenticated] Error:",t),{isAuthenticated:!1,supportsOAuth:!1,error:t.message}}}export{x as a,N as h,H as i};
@@ -1 +0,0 @@
1
- import{c as f,K as l}from"./index-CrProqmQ.js";import{u as y}from"./index-CRZ1ToW0.js";async function h(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const o=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-prompts",version:"1.0.0"}}})});if(!o.ok)return[];if((await o.json()).error)return[];const i=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!i.ok)return[];const r=await i.json();return r.error?[]:r.result?.prompts||[]}catch{return[]}}function P(t){const e=f.c(13);let s;e[0]!==t?(s=t.map(q),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s?(o={queries:s},e[2]=s,e[3]=o):o=e[3];const n=y(o);let i,r;if(e[4]!==t||e[5]!==n){r=new Map;let p;e[8]!==n?(p=n.some(j),e[8]=n,e[9]=p):p=e[9],i=p,t.forEach((u,m)=>{const c=n[m];c?.data?r.set(u,c.data.map(d)):r.set(u,[])}),e[4]=t,e[5]=n,e[6]=i,e[7]=r}else i=e[6],r=e[7];let a;return e[10]!==i||e[11]!==r?(a={promptsMap:r,isLoading:i},e[10]=i,e[11]=r,e[12]=a):a=e[12],a}function d(t){return{name:t.name,description:t.description}}function j(t){return t.isLoading}function q(t){return{queryKey:l.connectionPrompts(t),queryFn:()=>h(t),staleTime:6e4,retry:!1}}async function w(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const o=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-resources",version:"1.0.0"}}})});if(!o.ok)return[];if((await o.json()).error)return[];const i=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"resources/list",params:{}})});if(!i.ok)return[];const r=await i.json();return r.error?[]:r.result?.resources||[]}catch{return[]}}function $(t){const e=f.c(13);let s;e[0]!==t?(s=t.map(O),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s?(o={queries:s},e[2]=s,e[3]=o):o=e[3];const n=y(o);let i,r;if(e[4]!==t||e[5]!==n){r=new Map;let p;e[8]!==n?(p=n.some(g),e[8]=n,e[9]=p):p=e[9],i=p,t.forEach((u,m)=>{const c=n[m];c?.data?r.set(u,c.data.map(S)):r.set(u,[])}),e[4]=t,e[5]=n,e[6]=i,e[7]=r}else i=e[6],r=e[7];let a;return e[10]!==i||e[11]!==r?(a={resourcesMap:r,isLoading:i},e[10]=i,e[11]=r,e[12]=a):a=e[12],a}function S(t){return{uri:t.uri,name:t.name,description:t.description}}function g(t){return t.isLoading}function O(t){return{queryKey:l.connectionResources(t),queryFn:()=>w(t),staleTime:6e4,retry:!1}}export{$ as a,P as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-lRzj3Gw2.js";import{U as i}from"./index-CrProqmQ.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{U as u,b4 as s}from"./index-CrProqmQ.js";function o(e,r){return u(e,s,r)}export{o as u};