@decocms/mesh 2.17.0 → 2.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/client/assets/{AlertCircle-DOBZDZTf.js → AlertCircle-Dvl19Bxu.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CiX5attk.js → ArrowLeft-CNcRcLHi.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Cb5IgbXf.js → ArrowUp-Dj1nFRfD.js} +1 -1
  4. package/dist/client/assets/{Check-D_y2LGJG.js → Check-MZfXJ4EP.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CK8tBMwt.js → ChevronDown-BPwd0ESk.js} +1 -1
  6. package/dist/client/assets/{Code01-CHaKquD7.js → Code01-ZM8AfORO.js} +1 -1
  7. package/dist/client/assets/{Copy01-DEYUyyKa.js → Copy01-DoisEbOD.js} +1 -1
  8. package/dist/client/assets/{DotsHorizontal-CJj2K5Fj.js → DotsHorizontal-2xfLjpUM.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-DBgin8Gd.js → DotsVertical-CRTSoELg.js} +1 -1
  10. package/dist/client/assets/{Download01-D480FrAl.js → Download01-DzrQfwIZ.js} +1 -1
  11. package/dist/client/assets/{Edit01-C2wyoLl_.js → Edit01-BVpBBN26.js} +1 -1
  12. package/dist/client/assets/{File06-Dss_qxDP.js → File06-DvtIjhz0.js} +1 -1
  13. package/dist/client/assets/{FilterLines-BIIc2m5u.js → FilterLines-DkNJkoIH.js} +1 -1
  14. package/dist/client/assets/{FlipBackward-C6tD49bS.js → FlipBackward-938bk6QK.js} +1 -1
  15. package/dist/client/assets/{GitBranch01-CCs9Y7UL.js → GitBranch01-HnfHVRyp.js} +1 -1
  16. package/dist/client/assets/{Grid01-CPcgzk-j.js → Grid01-tEwYXVxO.js} +1 -1
  17. package/dist/client/assets/{Home02-B2DfszMd.js → Home02-9SuE7ucu.js} +1 -1
  18. package/dist/client/assets/{Image01-CWiMChMV.js → Image01-vvKwvz0g.js} +1 -1
  19. package/dist/client/assets/{Inbox01-E54Xv1AH.js → Inbox01-Cekk6aOf.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-C1Hk7qxK.js → InfoCircle-BXonO5qh.js} +1 -1
  21. package/dist/client/assets/{Key01-D3jgPHnl.js → Key01-DqRe3I-7.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-DXt_okRr.js → LinkExternal01-BGOs7vaA.js} +1 -1
  23. package/dist/client/assets/{List-vJTsFkGC.js → List-j3ISho_T.js} +1 -1
  24. package/dist/client/assets/{Loading01-CXxLrMyp.js → Loading01-ByRd3GAn.js} +1 -1
  25. package/dist/client/assets/{Lock01-C0IcfwAr.js → Lock01-BYKl-IKI.js} +1 -1
  26. package/dist/client/assets/{MessageChatSquare-BAK3msQ9.js → MessageChatSquare-Dfdgo-IV.js} +1 -1
  27. package/dist/client/assets/{Play-D5UR01Yp.js → Play-DqeIwNA2.js} +1 -1
  28. package/dist/client/assets/{Plus-BwqRnIpw.js → Plus-B6dO5J-T.js} +1 -1
  29. package/dist/client/assets/{SearchMd-B72GLhSo.js → SearchMd-RcsY4Qc3.js} +1 -1
  30. package/dist/client/assets/{Terminal-C6oII67o.js → Terminal-CM4NRPaq.js} +1 -1
  31. package/dist/client/assets/{Trash01-pQsQJfD7.js → Trash01-RdHotUor.js} +1 -1
  32. package/dist/client/assets/{Upload01-CPXoheIk.js → Upload01-B5lhw8CF.js} +1 -1
  33. package/dist/client/assets/{X-Ta7e64fd.js → X-JFPiVUa4.js} +1 -1
  34. package/dist/client/assets/{XClose-COWRVEvP.js → XClose-d9N07C9C.js} +1 -1
  35. package/dist/client/assets/{alert-dialog-CwDNNTWs.js → alert-dialog-DIpJg2Aj.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-DOIkjlbS.js → auth-catchall-B2l1mrMK.js} +1 -1
  37. package/dist/client/assets/{avatar-Bbu1o6br.js → avatar-C9xlNN_x.js} +1 -1
  38. package/dist/client/assets/{badge-BF26aj7r.js → badge--29UzF2m.js} +1 -1
  39. package/dist/client/assets/{binder-CZMsXyzM.js → binder-nBmgAoSK.js} +1 -1
  40. package/dist/client/assets/{button-CKEM3eQL.js → button-CJFU-RdP.js} +1 -1
  41. package/dist/client/assets/{card-2L27xRvH.js → card-BARP50i4.js} +1 -1
  42. package/dist/client/assets/{checkbox-D-u8zfFA.js → checkbox-D4qUNjlU.js} +1 -1
  43. package/dist/client/assets/{collection-detail-DRvlQkfI.js → collection-detail-DBx57h0R.js} +1 -1
  44. package/dist/client/assets/{collection-display-button-BRmjKmXA.js → collection-display-button-DWT4ZvIF.js} +1 -1
  45. package/dist/client/assets/{collection-header-DxthRGYV.js → collection-header-DiGbkMTg.js} +1 -1
  46. package/dist/client/assets/{collection-page-D_yHhDuI.js → collection-page-b1I6uH8W.js} +1 -1
  47. package/dist/client/assets/{collection-search-B1XW3AZu.js → collection-search-D3Bd0Mm5.js} +1 -1
  48. package/dist/client/assets/{collection-tab-tjhO7Mrn.js → collection-tab-V_ZAHQk2.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-D0Ju0-U8.js → collection-table-wrapper-DToPOpkG.js} +1 -1
  50. package/dist/client/assets/{connection-iGG9vveH.js → connection-Cgb7Z5-V.js} +1 -1
  51. package/dist/client/assets/{connection-card-DtL0ugHI.js → connection-card-B6jH4I7L.js} +1 -1
  52. package/dist/client/assets/connection-detail-DOeKZy2u.js +1 -0
  53. package/dist/client/assets/connections-DIPInEqh.js +1 -0
  54. package/dist/client/assets/constants-CRsABbUy.js +1 -0
  55. package/dist/client/assets/{create-organization-dialog-eRNW8Qxh.js → create-organization-dialog-BCm-rEBq.js} +1 -1
  56. package/dist/client/assets/{dialog-CDtau8Kt.js → dialog-DVaRsY11.js} +1 -1
  57. package/dist/client/assets/{dropdown-menu-wWS-zaMN.js → dropdown-menu-L8DDYrma.js} +1 -1
  58. package/dist/client/assets/{dynamic-plugin-layout-DputRlYb.js → dynamic-plugin-layout-BGqw6KSh.js} +1 -1
  59. package/dist/client/assets/{empty-state-CVNEuxZY.js → empty-state-DSfHkDug.js} +1 -1
  60. package/dist/client/assets/{empty-state-BHbK0lgC.js → empty-state-DltMEOY9.js} +1 -1
  61. package/dist/client/assets/{env-vars-editor-C51mNjyA.js → env-vars-editor-OFOnChaG.js} +1 -1
  62. package/dist/client/assets/{error-boundary-Bcxx4rfP.js → error-boundary-BcexB_yc.js} +1 -1
  63. package/dist/client/assets/{extract-connection-data-Dpmksiuo.js → extract-connection-data-CdV5tpm8.js} +1 -1
  64. package/dist/client/assets/{file-browser-BGJT68ml.js → file-browser-lBeJR8bC.js} +2 -2
  65. package/dist/client/assets/{form-V7XQlTI9.js → form-0xzFj1MQ.js} +1 -1
  66. package/dist/client/assets/{gateway-detail-Dwo3tRMv.js → gateway-detail-BjMZrPhA.js} +1 -1
  67. package/dist/client/assets/gateways-Los1KR32.js +1 -0
  68. package/dist/client/assets/{grid-view-D8luahOM.js → grid-view-5k-Ei6pR.js} +1 -1
  69. package/dist/client/assets/{home-BzIxKv5R.js → home-BPOuMXWN.js} +1 -1
  70. package/dist/client/assets/{index-H8waGLZX.js → index-B2ZzxrDd.js} +19 -19
  71. package/dist/client/assets/{index-D93bwXlh.js → index-DYB_vmtw.js} +1 -1
  72. package/dist/client/assets/{index-Dm3KUy-5.js → index-LUG2SkNP.js} +4 -4
  73. package/dist/client/assets/index-Wmq2F9D5.js +25 -0
  74. package/dist/client/assets/{index-BuhwJgoT.js → index-sGJO5Tbg.js} +1 -1
  75. package/dist/client/assets/{infiniteQueryObserver-CorNdPTl.js → infiniteQueryObserver-2ElA8vy3.js} +1 -1
  76. package/dist/client/assets/{input-B_S0H_Hl.js → input-BptR4gs0.js} +1 -1
  77. package/dist/client/assets/{layout-CSDcjZIC.js → layout-CuyqJIpj.js} +1 -1
  78. package/dist/client/assets/{lazy-highlighter-C9yEt-oj.js → lazy-highlighter-BsXV5-Cp.js} +1 -1
  79. package/dist/client/assets/{localstorage-keys-bcceq1xC.js → localstorage-keys-1ChkoQpJ.js} +1 -1
  80. package/dist/client/assets/{login-BYnVwbER.js → login-9aWtH8iv.js} +1 -1
  81. package/dist/client/assets/mcp-oauth-DlEOJMOg.js +1 -0
  82. package/dist/client/assets/{mcp-server-card-_ATNoXTX.js → mcp-server-card-QpfLcKhp.js} +1 -1
  83. package/dist/client/assets/{mcp-server-detail-DObA9nLB.js → mcp-server-detail-C1ZMmcCI.js} +1 -1
  84. package/dist/client/assets/{members-BebBEAXI.js → members-BivX1Wff.js} +1 -1
  85. package/dist/client/assets/{monaco-editor-DKdQnknl.js → monaco-editor-eqnLepiA.js} +1 -1
  86. package/dist/client/assets/{monitoring-CDDlEqUx.js → monitoring-CsAomsG7.js} +12 -12
  87. package/dist/client/assets/{oauth-callback-gzfkrrQW.js → oauth-callback-tqvl2JmB.js} +1 -1
  88. package/dist/client/assets/{page-Do6tc7Ak.js → page-9g38EhhR.js} +1 -1
  89. package/dist/client/assets/{page-CLLgwmPE.js → page-DF7HRrxe.js} +1 -1
  90. package/dist/client/assets/{pin-to-sidebar-button-NqMT4AF7.js → pin-to-sidebar-button-SoohzyKD.js} +1 -1
  91. package/dist/client/assets/{plugin-empty-state-CsEwK0UI.js → plugin-empty-state-B7nLCaEJ.js} +1 -1
  92. package/dist/client/assets/{plugin-header-DMvUkTVw.js → plugin-header-Cohl5yJx.js} +1 -1
  93. package/dist/client/assets/{plugins-femIOaN7.js → plugins-B4XhV1NA.js} +1 -1
  94. package/dist/client/assets/{popover-CUHksX3w.js → popover-DMQ4A4gY.js} +1 -1
  95. package/dist/client/assets/{project-context-provider-DTbOrAFq.js → project-context-provider-CwANTiF8.js} +1 -1
  96. package/dist/client/assets/{registry-utils-C5W-BZ_1.js → registry-utils-CYM7CTQI.js} +1 -1
  97. package/dist/client/assets/{resizable-BEUt05S8.js → resizable-DPX1GbOQ.js} +1 -1
  98. package/dist/client/assets/{resource-tabs-kfeiBQEL.js → resource-tabs-s8Be9X3Q.js} +1 -1
  99. package/dist/client/assets/{select-H2esePZI.js → select-ChLkm3Du.js} +1 -1
  100. package/dist/client/assets/{settings-DO0PkWA0.js → settings-CtF0WgEW.js} +1 -1
  101. package/dist/client/assets/{shell-layout-Bx8F46Gf.js → shell-layout-CF_ayOPu.js} +1 -1
  102. package/dist/client/assets/{spinner-BZhaf6l_.js → spinner-CwrVDgbN.js} +1 -1
  103. package/dist/client/assets/{switch-CIfCfD81.js → switch-CcWa_MNs.js} +1 -1
  104. package/dist/client/assets/{textarea-CC9KHQpw.js → textarea-DvOGbg2w.js} +1 -1
  105. package/dist/client/assets/{tool-set-selector-Cty6fXdH.js → tool-set-selector-CcjC51rS.js} +1 -1
  106. package/dist/client/assets/{tools-list-rrG-PiCB.js → tools-list-CZQCbddf.js} +1 -1
  107. package/dist/client/assets/{tooltip-DixY1Sbc.js → tooltip-BZp1NNfI.js} +1 -1
  108. package/dist/client/assets/{use-binding-CPqdk4GE.js → use-binding-kpHhQeiR.js} +1 -1
  109. package/dist/client/assets/{use-collections-S6OVeMx0.js → use-collections-BI8SI9I-.js} +1 -1
  110. package/dist/client/assets/{use-connection-C_QQYkok.js → use-connection-By0HWGmn.js} +1 -1
  111. package/dist/client/assets/{use-connection-resources-h_CY6VEc.js → use-connection-resources-CIndv_xt.js} +1 -1
  112. package/dist/client/assets/{use-create-gateway-eDGGqEOS.js → use-create-gateway-DpNvhifN.js} +1 -1
  113. package/dist/client/assets/{use-gateway-DMJjVwlU.js → use-gateway-BzFnbg51.js} +1 -1
  114. package/dist/client/assets/{use-gateway-system-prompt-CfIIyZId.js → use-gateway-system-prompt-DKg33ZMa.js} +1 -1
  115. package/dist/client/assets/{use-list-state-Bt6QEhtR.js → use-list-state-cqgmpDXc.js} +1 -1
  116. package/dist/client/assets/{use-mcp-DuKh-Xf7.js → use-mcp-BY7dWO4N.js} +1 -1
  117. package/dist/client/assets/{use-members-Hsme2FMs.js → use-members-DuUTyG85.js} +1 -1
  118. package/dist/client/assets/{use-mobile-Bh6onNnL.js → use-mobile-DHVQc88b.js} +1 -1
  119. package/dist/client/assets/{use-organization-settings-C4u9V1Gg.js → use-organization-settings-C3rL2iPZ.js} +1 -1
  120. package/dist/client/assets/{use-tool-call-BSVniqlJ.js → use-tool-call-CuYepGvY.js} +1 -1
  121. package/dist/client/assets/useInfiniteQuery-Dbym_GhP.js +1 -0
  122. package/dist/client/assets/{useMutation-DXyBs08e.js → useMutation-Lj6qQmhH.js} +1 -1
  123. package/dist/client/assets/useQuery-DVzj5fVO.js +1 -0
  124. package/dist/client/assets/{value-EQeDZr5M.js → value-Cetx24MZ.js} +1 -1
  125. package/dist/client/assets/{view-mode-toggle-CoxeG-5F.js → view-mode-toggle-Df6PEFKi.js} +1 -1
  126. package/dist/client/assets/{workflow-CdkAFtfl.js → workflow-DiN6vHw9.js} +1 -1
  127. package/dist/client/index.html +1 -1
  128. package/dist/server/cli.js +208 -208
  129. package/dist/server/migrate.js +186 -186
  130. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
  131. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
  132. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
  133. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +43 -0
  134. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +45 -0
  135. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +46 -0
  136. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
  137. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
  138. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs +46 -0
  139. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
  140. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +83 -0
  141. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +83 -0
  142. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
  143. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js.map +1 -0
  144. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
  145. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs.map +1 -0
  146. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
  147. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
  148. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
  149. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js.map +1 -0
  150. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
  151. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs.map +1 -0
  152. package/dist/server/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
  153. package/dist/server/server.js +202 -202
  154. package/package.json +1 -1
  155. package/dist/client/assets/connection-detail-CfQ3feir.js +0 -1
  156. package/dist/client/assets/connections-D3zmX0Z9.js +0 -1
  157. package/dist/client/assets/constants-rLrKmanL.js +0 -1
  158. package/dist/client/assets/gateways-zERSWoJy.js +0 -1
  159. package/dist/client/assets/index-COEG5bG9.js +0 -25
  160. package/dist/client/assets/mcp-oauth-BQzIgGw8.js +0 -1
  161. package/dist/client/assets/useInfiniteQuery-BYo7uk8S.js +0 -1
  162. package/dist/client/assets/useQuery-9rHAo5k0.js +0 -1
@@ -1 +0,0 @@
1
- import{bF as T,bG as P,bH as V,bI as $}from"./index-H8waGLZX.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{I as u}from"./infiniteQueryObserver-CorNdPTl.js";import{U as i}from"./index-H8waGLZX.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-H8waGLZX.js";function o(e,r){return u(e,s,r)}export{o as u};