@decocms/mesh 1.0.8 → 1.0.10

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 (111) hide show
  1. package/dist/client/assets/{AlertCircle-BOdIbqIs.js → AlertCircle-zCOLtXNG.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft--mrEcY9t.js → ArrowLeft-b0UM4Vui.js} +1 -1
  3. package/dist/client/assets/{Calendar-FEvoSB5L.js → Calendar-Cxw5FKll.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-DCY43SXR.js → CheckCircle-U8-nit8x.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BQbWxkfW.js → ChevronDown-BFYjmmoG.js} +1 -1
  6. package/dist/client/assets/{Clock-B2GhwaAI.js → Clock-qZko4uak.js} +1 -1
  7. package/dist/client/assets/{Copy01-CNQxqLRw.js → Copy01-XN5V21c6.js} +1 -1
  8. package/dist/client/assets/{CpuChip02-BiTasWbD.js → CpuChip02-Nhk4zHXl.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-D0xC4MY4.js → DotsVertical-CcNQsTaW.js} +1 -1
  10. package/dist/client/assets/{File06-CginPRn9.js → File06-DB55FK-Z.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-GzTSxN9T.js → GitBranch01-CM-ab6hS.js} +1 -1
  12. package/dist/client/assets/{Inbox01-D9KmcOy8.js → Inbox01-CIzt2AdR.js} +1 -1
  13. package/dist/client/assets/{InfoCircle-D8mTtKdA.js → InfoCircle-ChxTTkMX.js} +1 -1
  14. package/dist/client/assets/{Key01-e6YzBDTD.js → Key01-DYiMWoz_.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-NfJeAPv5.js → LinkExternal01-CBZhTXC0.js} +1 -1
  16. package/dist/client/assets/{Loading01-CCRghFAi.js → Loading01-Dtm2TLlA.js} +1 -1
  17. package/dist/client/assets/{Plus-Bu89Xdvq.js → Plus-DF_I5mml.js} +1 -1
  18. package/dist/client/assets/{SearchMd-9OvHwtrD.js → SearchMd-C_ak4ze3.js} +1 -1
  19. package/dist/client/assets/{Terminal-CS-oYY6X.js → Terminal-4DdepWh9.js} +1 -1
  20. package/dist/client/assets/{Trash01-D6Jd-C-A.js → Trash01-FYPMjpVf.js} +1 -1
  21. package/dist/client/assets/{Upload01-p9mtwUJO.js → Upload01-BYeEw9Vy.js} +1 -1
  22. package/dist/client/assets/{X-CPWcGQX-.js → X-BTsWwO_U.js} +1 -1
  23. package/dist/client/assets/{XClose-Bg1dQbEQ.js → XClose-CY6vd_0A.js} +1 -1
  24. package/dist/client/assets/{alert-dialog-C5WdCZb7.js → alert-dialog-DhxQ40TA.js} +2 -2
  25. package/dist/client/assets/auth-CfgXQhXI.js +1 -0
  26. package/dist/client/assets/{auth-catchall-BXbesUXT.js → auth-catchall-CohlC3Pb.js} +1 -1
  27. package/dist/client/assets/{avatar-_r3OideF.js → avatar-CcUZFpwU.js} +1 -1
  28. package/dist/client/assets/{badge-C0Qf1_P5.js → badge-CgUwfcKq.js} +1 -1
  29. package/dist/client/assets/{button-C6Q9i6bB.js → button-DuitHSR8.js} +1 -1
  30. package/dist/client/assets/{card-CkqxLUmD.js → card-DkEpNms8.js} +1 -1
  31. package/dist/client/assets/{checkbox-BrNiXyG6.js → checkbox-DTaSeum9.js} +1 -1
  32. package/dist/client/assets/{collection-detail-D9-8PQpD.js → collection-detail-Dvc6iyHF.js} +2 -2
  33. package/dist/client/assets/{collection-display-button-CapIICNB.js → collection-display-button-DgDdVSTg.js} +1 -1
  34. package/dist/client/assets/{collection-header-xspJxL_F.js → collection-header-D-wXFMG4.js} +1 -1
  35. package/dist/client/assets/{collection-page-BcW_e2hi.js → collection-page-AFIAghtr.js} +1 -1
  36. package/dist/client/assets/{collection-search-BP4aaz_a.js → collection-search-OoKPetka.js} +1 -1
  37. package/dist/client/assets/{collection-table-wrapper-BqYO84av.js → collection-table-wrapper-DEVlTpj8.js} +1 -1
  38. package/dist/client/assets/{connection-card-CVvPIgot.js → connection-card-CVX6Dj6b.js} +1 -1
  39. package/dist/client/assets/{connection-detail-JBGxZxkM.js → connection-detail-C_uPOJ6z.js} +1 -1
  40. package/dist/client/assets/{connections-B74A-ujA.js → connections-DoAE9QhX.js} +1 -1
  41. package/dist/client/assets/{core-CrBooOPa.js → core-BMfBj0bw.js} +1 -1
  42. package/dist/client/assets/{create-organization-dialog-DKjCEIp0.js → create-organization-dialog-C_xVF_Jl.js} +1 -1
  43. package/dist/client/assets/{dialog-wqLP6s8y.js → dialog-Dl9CupEb.js} +1 -1
  44. package/dist/client/assets/{dropdown-menu-Cf1-ucSW.js → dropdown-menu-CPQpNQmn.js} +1 -1
  45. package/dist/client/assets/env-vars-editor-BcyBU5xA.js +1 -0
  46. package/dist/client/assets/{error-boundary-BvHIgIeG.js → error-boundary-DMJQCmxn.js} +1 -1
  47. package/dist/client/assets/extract-connection-data-Bt1_1dQ8.js +1 -0
  48. package/dist/client/assets/{form-eTDr0W4q.js → form-BfiwCHdz.js} +1 -1
  49. package/dist/client/assets/{formatDistanceToNow-BxzU2by2.js → formatDistanceToNow-BmkU67cZ.js} +1 -1
  50. package/dist/client/assets/{gateway-detail-DKkqklk0.js → gateway-detail-ZknLelfM.js} +1 -1
  51. package/dist/client/assets/{gateways-BhKn-EFm.js → gateways-BAQA-e5y.js} +1 -1
  52. package/dist/client/assets/{home-DI8Z0JFU.js → home-BzOK0WeX.js} +1 -1
  53. package/dist/client/assets/index-CCNaUj2A.js +156 -0
  54. package/dist/client/assets/{index-CZhZ_SKX.js → index-DR-B7Y1Z.js} +1 -1
  55. package/dist/client/assets/{index-BWHtrgim.js → index-T7OaHK12.js} +1 -1
  56. package/dist/client/assets/{index-CZLUv0P3.js → index-be58e1VX.js} +3 -3
  57. package/dist/client/assets/{input-CRJkMCdz.js → input-YU6lpVgW.js} +1 -1
  58. package/dist/client/assets/json-BnmF_c7J.js +1 -0
  59. package/dist/client/assets/{json-syntax-highlighter-B03842aR.js → json-syntax-highlighter-Dve1WRV4.js} +2 -2
  60. package/dist/client/assets/{layout-6uTC86JS.js → layout-n40g10Oh.js} +1 -1
  61. package/dist/client/assets/{lazy-highlighter-BSMDGfqn.js → lazy-highlighter-BY_mRZdt.js} +1 -1
  62. package/dist/client/assets/{localstorage-keys-CcQMsGvY.js → localstorage-keys-BphvZ-YX.js} +1 -1
  63. package/dist/client/assets/{login-DGpMcH9O.js → login-CJi6KFGq.js} +1 -1
  64. package/dist/client/assets/mcp-oauth-CvO1Z13d.js +1 -0
  65. package/dist/client/assets/{members-F8i7vdZR.js → members-UHyk3Nn4.js} +1 -1
  66. package/dist/client/assets/{monitoring-C2lb19h6.js → monitoring-65mgE8O0.js} +1 -1
  67. package/dist/client/assets/{oauth-callback-DtKkmmTQ.js → oauth-callback-KqixmXKf.js} +1 -1
  68. package/dist/client/assets/{page-DIUi9KSN.js → page-DmmG4y1n.js} +1 -1
  69. package/dist/client/assets/{popover-Un-VhPfR.js → popover-PTQF8Dbg.js} +1 -1
  70. package/dist/client/assets/prism-light-0RxCg8xt.js +1 -0
  71. package/dist/client/assets/{resizable-Dnzm7-QR.js → resizable-BF9gWgPg.js} +45 -47
  72. package/dist/client/assets/{resource-tabs-BYy3Anud.js → resource-tabs-Dx5v9tHv.js} +1 -1
  73. package/dist/client/assets/{select-7BtgByyw.js → select-C4QWjnSz.js} +1 -1
  74. package/dist/client/assets/{settings-rADjIbaj.js → settings-UndPSfwX.js} +1 -1
  75. package/dist/client/assets/{shell-layout-CvvtwN5U.js → shell-layout-BLjMALRt.js} +1 -1
  76. package/dist/client/assets/{spinner-DveBEBL5.js → spinner-CNb2mD_9.js} +1 -1
  77. package/dist/client/assets/{store-BiC_Wlh-.js → store-CGyOcqhE.js} +1 -1
  78. package/dist/client/assets/{store-app-detail-D_pvzf3Y.js → store-app-detail-BQ4UUaoG.js} +1 -1
  79. package/dist/client/assets/{switch-Bbk1L7Rg.js → switch-BmVnuO_C.js} +1 -1
  80. package/dist/client/assets/{tools-list-CUD0lf51.js → tools-list-BV-qlQqF.js} +1 -1
  81. package/dist/client/assets/{tooltip-CZ2WJBN2.js → tooltip-CqCXb38Z.js} +1 -1
  82. package/dist/client/assets/{types-BqGYxJd7.js → types-Bm46njUN.js} +1 -1
  83. package/dist/client/assets/use-binding-DdwsXkNS.js +34 -0
  84. package/dist/client/assets/{use-connection-B9lcLaJ5.js → use-connection-BbvAiBvg.js} +1 -1
  85. package/dist/client/assets/{use-connection-resources-DixC-5o3.js → use-connection-resources-D-1-SK-8.js} +1 -1
  86. package/dist/client/assets/{use-gateway-t9P_FOn3.js → use-gateway-L1UQyU7-.js} +1 -1
  87. package/dist/client/assets/{use-list-state-BYLR5Bm8.js → use-list-state-DVYCFUpb.js} +1 -1
  88. package/dist/client/assets/{use-mcp-Bi_aHqdL.js → use-mcp-CWOlOW9q.js} +1 -1
  89. package/dist/client/assets/{use-members-DaneJZgJ.js → use-members-Dyh_-7GU.js} +1 -1
  90. package/dist/client/assets/{use-mobile-_A8zw_eW.js → use-mobile-B0xRFGhT.js} +1 -1
  91. package/dist/client/assets/{use-organization-settings-DsAkGjtI.js → use-organization-settings-fWTyw7VB.js} +1 -1
  92. package/dist/client/assets/{use-tool-call-DdkMQUZF.js → use-tool-call-CVPTtLoG.js} +1 -1
  93. package/dist/client/assets/useQuery-C4GPpw7d.js +1 -0
  94. package/dist/client/assets/utils-o1atviYh.js +1 -0
  95. package/dist/client/assets/{view-mode-toggle-DHnvkOqv.js → view-mode-toggle-DOtHoBLN.js} +1 -1
  96. package/dist/client/assets/{well-known-mcp-C4yFJOry.js → well-known-mcp-d1wcdFCF.js} +1 -1
  97. package/dist/client/index.html +1 -1
  98. package/dist/server/cli.js +188 -216
  99. package/dist/server/migrate.js +141 -168
  100. package/dist/server/server.js +185 -213
  101. package/package.json +3 -4
  102. package/dist/client/assets/auth-PBZStuMm.js +0 -26
  103. package/dist/client/assets/env-vars-editor-Clod5sfm.js +0 -1
  104. package/dist/client/assets/extract-connection-data-CbrawrDX.js +0 -1
  105. package/dist/client/assets/index-Cvm_GyUI.js +0 -118
  106. package/dist/client/assets/json-CcI2X6AJ.js +0 -1
  107. package/dist/client/assets/mcp-oauth-DQCyGoJw.js +0 -1
  108. package/dist/client/assets/prism-light-DUBQ6Lm-.js +0 -1
  109. package/dist/client/assets/use-binding-B349nAGS.js +0 -38
  110. package/dist/client/assets/useQuery-DhoA2M5z.js +0 -1
  111. package/dist/client/assets/utils-CYeWJWkG.js +0 -1
@@ -1 +0,0 @@
1
- import{aj as o}from"./index-Cvm_GyUI.js";import{r}from"./json-BESjz4hO.js";var s=r();const e=o(s);export{e as default};
@@ -1 +0,0 @@
1
- import{aa as I,ab as V,ac as P,a6 as T}from"./auth-PBZStuMm.js";function S(r){let e=0;for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);e=(e<<5)-e+n,e=e&e}return Math.abs(e).toString(16)}const A=new Map,U="mcp:oauth:callback:";class ${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}},A.set(S(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 l=window.screenX+(window.outerWidth-600)/2,a=window.screenY+(window.outerHeight-700)/2;window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${l},top=${a},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(){A.delete(S(this.serverUrl))}}async function R(r){const e=new URL(`/mcp/${r.connectionId}`,window.location.origin),t=new $({serverUrl:e.href,clientName:r.clientName,clientUri:r.clientUri,callbackUrl:r.callbackUrl,scope:r.scope});try{const n=new Promise((c,o)=>{const u=r.timeout||12e4;let w,h=!1;const b=t.state(),p=`${U}${b}`,i=()=>{if(!h){h=!0,window.removeEventListener("message",g),window.removeEventListener("storage",_),clearTimeout(w);try{localStorage.removeItem(p)}catch{}}},m=async s=>{if(h)return;if(!s.success){i(),o(new Error(s.error||"OAuth authentication failed"));return}const{code:d,state:C}=s;if(!d){i(),o(new Error("Missing authorization code"));return}if(t.getStoredState()!==C){i(),o(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const k=(await I(e))?.authorization_servers?.[0]||e,M=await V(k),y=t.clientInformation();if(!y){i(),o(new Error("Client information not found"));return}const O=t.codeVerifier(),E=await P(k,{metadata:M,clientInformation:y,authorizationCode:d,codeVerifier:O,redirectUri:t.redirectUrl,resource:new URL(e)});i(),c(E)}catch(v){i(),o(v)}},g=async s=>{s.origin===window.location.origin&&s.data?.type==="mcp:oauth:callback"&&await m(s.data)},_=async s=>{if(!(s.key!==p||!s.newValue))try{const d=JSON.parse(s.newValue);await m(d)}catch{}};window.addEventListener("message",g),window.addEventListener("storage",_),w=setTimeout(()=>{i(),o(new Error("OAuth authentication timeout"))},u)});return await T(t,{serverUrl:e})==="REDIRECT"?{token:(await n).access_token,error:null}:{token:t.tokens()?.access_token||null,error:null}}catch(n){return{token:null,error:n instanceof Error?n.message:String(n)}}finally{t.cleanup()}}function f(r,e){if(window.opener&&!window.opener.closed)return window.opener.postMessage(r,window.location.origin),!0;if(e)try{const t=`${U}${e}`;return localStorage.setItem(t,JSON.stringify(r)),!0}catch{}return!1}async function N(){const r=new URLSearchParams(window.location.search),e=r.get("code");let t=r.get("state");const n=r.get("error"),l=r.get("error_description");let a=t;if(t)try{const o=atob(t),u=JSON.parse(o);u.clientState&&(a=u.clientState)}catch{}if(n){const o=l||n;return f({type:"mcp:oauth:callback",success:!1,error:o},a),{success:!1,error:o}}if(!e||!t){const o="Missing code or state parameter";return f({type:"mcp:oauth:callback",success:!1,error:o},a),{success:!1,error:o}}return t=a||t,f({type:"mcp:oauth:callback",success:!0,code:e,state:t},t)?{success:!0}:{success:!1,error:"Parent window not available"}}async function D({url:r,token:e}){try{const t=new Headers;t.set("Content-Type","application/json"),t.set("Accept","application/json, text/event-stream");const n=await fetch(r,{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(n.ok)return{isAuthenticated:!0,supportsOAuth:!0};const a=!!n.headers.get("WWW-Authenticate");let c;try{const o=await n.json();c=o.error||o.message}catch{}return{isAuthenticated:!1,supportsOAuth:a,error:c||`HTTP ${n.status}`}}catch(t){return console.error("[isConnectionAuthenticated] Error:",t),{isAuthenticated:!1,supportsOAuth:!1,error:t.message}}}export{R as a,N as h,D as i};
@@ -1 +0,0 @@
1
- import{r as o,h as i}from"./core-CrBooOPa.js";import{aj as s}from"./index-Cvm_GyUI.js";var g=o();const t=s(g);var e=i(t,{});e.registerLanguage=function(a,r){return t.register(r)};e.alias=function(a,r){return t.alias(a,r)};export{e as default};