@decocms/mesh 2.55.0 → 2.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DnrpASG2.js → AlertCircle-D0dYVV_C.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CkGaUN6o.js → ArrowLeft-DaBwGT1h.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cc09RZY4.js → ArrowUp-j0Zx2i-T.js} +1 -1
- package/dist/client/assets/{Check-BYHlfTQr.js → Check-DxEsBW6A.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cyh9WMp0.js → ChevronDown-BLLsYwZi.js} +1 -1
- package/dist/client/assets/{Code01-B62YyryF.js → Code01-q6RjOjO2.js} +1 -1
- package/dist/client/assets/{Copy01-GHFquEvX.js → Copy01-CiRHbRil.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-C6El5T66.js → DotsHorizontal-D_i29myt.js} +1 -1
- package/dist/client/assets/{DotsVertical-DtC1yLil.js → DotsVertical-YtFig9Al.js} +1 -1
- package/dist/client/assets/{Download01-C5tBRZHe.js → Download01-ColP9k0s.js} +1 -1
- package/dist/client/assets/{Edit01-CCTivbEj.js → Edit01-CvwEhkEB.js} +1 -1
- package/dist/client/assets/{File06-CDFdF5Nr.js → File06-VVEb2XPf.js} +1 -1
- package/dist/client/assets/{FilterLines-4yPP_gAU.js → FilterLines-C6u5hl0S.js} +1 -1
- package/dist/client/assets/{FlipBackward-Bb3ib1Bh.js → FlipBackward-Bwy_5A0g.js} +1 -1
- package/dist/client/assets/{Grid01-C4O4Aknh.js → Grid01-C2ELbDxI.js} +1 -1
- package/dist/client/assets/{Home02-D2riSlnv.js → Home02-D8O3gYg1.js} +1 -1
- package/dist/client/assets/{Image01-CYRE6pGN.js → Image01-BV4jTRkm.js} +1 -1
- package/dist/client/assets/{Inbox01-CV_5S91p.js → Inbox01-nY-CiFPV.js} +1 -1
- package/dist/client/assets/{InfoCircle-DnMMetUy.js → InfoCircle-BMyKDxax.js} +1 -1
- package/dist/client/assets/{Key01-CLADbyO4.js → Key01-BdALywUo.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DgcGDmdL.js → LinkExternal01-CNdI9age.js} +1 -1
- package/dist/client/assets/{List-Cai2-K9Z.js → List-DALRRs8f.js} +1 -1
- package/dist/client/assets/{Loading01-B-TyaLAR.js → Loading01-Ck4DHeCz.js} +1 -1
- package/dist/client/assets/{Lock01-Blk8_ONM.js → Lock01-CTXkP_M4.js} +1 -1
- package/dist/client/assets/{Pin01-GbJJn2vw.js → Pin01-Dn3xisY_.js} +1 -1
- package/dist/client/assets/{Play-Bw-s0SW4.js → Play-BRWhqcey.js} +1 -1
- package/dist/client/assets/{Plus-Cxc7BtkQ.js → Plus-CWYnIbbQ.js} +1 -1
- package/dist/client/assets/{SearchMd-CpKLo2Zn.js → SearchMd-BwwEmX02.js} +1 -1
- package/dist/client/assets/{Share07-BB-7HQgT.js → Share07-BFonVbaA.js} +1 -1
- package/dist/client/assets/{Terminal-DF70HZ2S.js → Terminal-DBu0XX3z.js} +1 -1
- package/dist/client/assets/{Trash01-BvwhK6Vg.js → Trash01-O2qCmwMn.js} +1 -1
- package/dist/client/assets/{Upload01-B6Wi4Y6P.js → Upload01-DI7SlvsT.js} +1 -1
- package/dist/client/assets/{Users03-Ba_1xVKB.js → Users03-BmQGs7qi.js} +1 -1
- package/dist/client/assets/{X-CODbfs2H.js → X-DfKEMSAq.js} +1 -1
- package/dist/client/assets/{XClose-BaVIBBzB.js → XClose--VE6Uxj9.js} +1 -1
- package/dist/client/assets/{agent-detail-BwU_iOlG.js → agent-detail-z7HVUEos.js} +1 -1
- package/dist/client/assets/{agents-BIH6gREs.js → agents-BrJ8JJdU.js} +1 -1
- package/dist/client/assets/{alert-dialog-C_OXD-MA.js → alert-dialog-BehqkAiu.js} +1 -1
- package/dist/client/assets/{auth-catchall-BCQx1ruw.js → auth-catchall-D4TSd1Ye.js} +1 -1
- package/dist/client/assets/{avatar-D8AIxV6P.js → avatar-brRXoKvO.js} +1 -1
- package/dist/client/assets/{badge-CpVCYFMG.js → badge-CngTAfQv.js} +1 -1
- package/dist/client/assets/{binder-BEyDSNRs.js → binder-CIKIGv1N.js} +1 -1
- package/dist/client/assets/{button-B2KLvXEr.js → button-BHD-W54e.js} +1 -1
- package/dist/client/assets/{card-DlXZ7U9Z.js → card-CDL86Pnt.js} +1 -1
- package/dist/client/assets/{checkbox-DaoCFuj8.js → checkbox-CCyLipUT.js} +1 -1
- package/dist/client/assets/{circle-alert-Bm5Q_veV.js → circle-alert-DgFpoHtR.js} +1 -1
- package/dist/client/assets/{collection-detail-C1oHfNP9.js → collection-detail-13BCxPKs.js} +1 -1
- package/dist/client/assets/{collection-display-button-BTGoT8ci.js → collection-display-button-D7y47NmT.js} +1 -1
- package/dist/client/assets/{collection-header-Be7RY6CQ.js → collection-header-BH0hMpwH.js} +1 -1
- package/dist/client/assets/{collection-page-RrsDnv83.js → collection-page-D7qrDAdO.js} +1 -1
- package/dist/client/assets/{collection-search-DD9gszSV.js → collection-search-DriJZFj9.js} +1 -1
- package/dist/client/assets/{collection-tab-3ZZSVcZ8.js → collection-tab-CcL8qVIp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BSy03JYc.js → collection-table-wrapper-XQuXSlg_.js} +1 -1
- package/dist/client/assets/connect-BAmGV9_O.js +1 -0
- package/dist/client/assets/{connection-card-BJ8nkB6q.js → connection-card-DXxyylc0.js} +1 -1
- package/dist/client/assets/{connection-detail-DVHoUY1Q.js → connection-detail-D-r8wdLm.js} +1 -1
- package/dist/client/assets/{connections-B5_ch0b8.js → connections-u-2LGaVH.js} +1 -1
- package/dist/client/assets/constants--B4rZxpd.js +1 -0
- package/dist/client/assets/{constants-BecaK2Q7.js → constants-B-pBHHtD.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-kmOZjs4K.js → create-organization-dialog-B9AunrOf.js} +1 -1
- package/dist/client/assets/{dialog-cWpa0tjW.js → dialog-pQaEse5h.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DDACOXnG.js → dropdown-menu-D88t_1GY.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-nceYO9tV.js → dynamic-plugin-layout-D_WzC1mY.js} +1 -1
- package/dist/client/assets/{empty-state-CysqrplM.js → empty-state-NBwahr1o.js} +1 -1
- package/dist/client/assets/{empty-state-BRRevprM.js → empty-state-eAV0ZWF3.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CyAPCgjC.js → env-vars-editor-B0hNi1Xe.js} +1 -1
- package/dist/client/assets/{error-boundary-D2FqiSoM.js → error-boundary-DVK1pLb7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DG_diqa3.js → extract-connection-data-BKsqjhg6.js} +1 -1
- package/dist/client/assets/{file-browser-BbtVlE62.js → file-browser-BAc2Lle0.js} +2 -2
- package/dist/client/assets/{form-ChHRavtv.js → form-CilxoLBx.js} +1 -1
- package/dist/client/assets/{grid-view-BPn6qgmX.js → grid-view-HgHaVP5u.js} +1 -1
- package/dist/client/assets/{home-hstgKRny.js → home-BplrQ6hr.js} +1 -1
- package/dist/client/assets/{index-DIxYn0kb.js → index-BAsk5kiO.js} +1 -1
- package/dist/client/assets/index-BE9VxaVK.js +1 -0
- package/dist/client/assets/{index-CKyh6XBg.js → index-BuKAiFTQ.js} +1 -1
- package/dist/client/assets/{index-DhY2K4tp.js → index-C1WEmg2h.js} +12 -12
- package/dist/client/assets/{index-mQwl56Q0.js → index-CmaBy21Y.js} +1 -1
- package/dist/client/assets/{index-rms_W4V6.js → index-DAh_kZ0g.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-C_cEPa52.js → infiniteQueryObserver-C9HxWVU4.js} +1 -1
- package/dist/client/assets/{input-BkeUe06e.js → input-RCMmufsJ.js} +1 -1
- package/dist/client/assets/{layout-CdihDKq7.js → layout-DjRPo0f0.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BkUFqNvo.js → localstorage-keys-DYY-WP6R.js} +1 -1
- package/dist/client/assets/{login-B4do1VXN.js → login-B66-dBlb.js} +1 -1
- package/dist/client/assets/mcp-oauth-BPHDdGDM.js +1 -0
- package/dist/client/assets/{mcp-server-card-ZLodfuxh.js → mcp-server-card-ClUnyTeG.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-ChazypwB.js → mcp-server-detail-DjK313CG.js} +2 -2
- package/dist/client/assets/{members-DIUQDq49.js → members-BiBJtYHt.js} +1 -1
- package/dist/client/assets/{monaco-editor-CF8xOd0f.js → monaco-editor-Vlv3xLsL.js} +1 -1
- package/dist/client/assets/{monitoring-BXGU01Kc.js → monitoring-CFHx7vto.js} +1 -1
- package/dist/client/assets/{oauth-callback-CqnMpdvf.js → oauth-callback-CnDURlld.js} +1 -1
- package/dist/client/assets/{page-DcHPZKZc.js → page-C-5nFDs7.js} +1 -1
- package/dist/client/assets/{page-CLam7tfm.js → page-CuldkWOh.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-xde8P8_T.js → pin-to-sidebar-button-BqldlKO8.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DBQd886H.js → plugin-empty-state-Cvb8CkFY.js} +1 -1
- package/dist/client/assets/{plugin-header-BzN93bFk.js → plugin-header-CPf3xeql.js} +1 -1
- package/dist/client/assets/{plugins-DTGBld4c.js → plugins-CEjaHdFO.js} +1 -1
- package/dist/client/assets/{popover-BQ4fAaba.js → popover-CuFXrDp7.js} +1 -1
- package/dist/client/assets/{registry-utils-CubAr1ep.js → registry-utils-DQ7VA2Vu.js} +1 -1
- package/dist/client/assets/{resizable-CBbQ2mtO.js → resizable-DNHv_vEu.js} +1 -1
- package/dist/client/assets/{resource-tabs-PgIUUqJg.js → resource-tabs-B1t9TZZp.js} +1 -1
- package/dist/client/assets/{select-DtbOgYEp.js → select-C93bGKrw.js} +1 -1
- package/dist/client/assets/{settings-Bpg3bFrL.js → settings-DzBM5dB5.js} +1 -1
- package/dist/client/assets/{shell-layout-OPZoFrI9.js → shell-layout-Du03vu_F.js} +1 -1
- package/dist/client/assets/{spinner-BtXJc_eZ.js → spinner-ClVwh8PC.js} +1 -1
- package/dist/client/assets/{store-invite-BEl6VykZ.js → store-invite-DMm7m90Q.js} +1 -1
- package/dist/client/assets/{switch-DsnDxQXG.js → switch-CczEwfhr.js} +1 -1
- package/dist/client/assets/{textarea-BANZCPie.js → textarea-DkpJZOQj.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CqX9WN4g.js → tool-set-selector-BcnjHVtB.js} +1 -1
- package/dist/client/assets/{tools-list-BRzmSp1i.js → tools-list-C2rBUSqb.js} +1 -1
- package/dist/client/assets/{tooltip-Dwcc1k71.js → tooltip-HFuN7GTj.js} +1 -1
- package/dist/client/assets/{typewriter-title-Bay0uuB9.js → typewriter-title-RQ8hypt2.js} +1 -1
- package/dist/client/assets/{use-binding--VZ7Y5Ef.js → use-binding-EEeU2eYF.js} +1 -1
- package/dist/client/assets/{use-collections-8Kj36wYP.js → use-collections-D-6KNpdU.js} +1 -1
- package/dist/client/assets/{use-connection-DfqjO6nz.js → use-connection-z2hJ-uqu.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-lWx9_XWS.js → use-create-virtual-mcp-0twT7MZg.js} +1 -1
- package/dist/client/assets/{use-list-state-vBhSzyur.js → use-list-state-BTo0-e9z.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DioGpWDr.js → use-mcp-prompts-B8mueLey.js} +1 -1
- package/dist/client/assets/{use-members-E4uqx9v1.js → use-members-BEYt2fvB.js} +1 -1
- package/dist/client/assets/{use-mobile-C29nHXu6.js → use-mobile-DmEMdkp7.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BSUJceGn.js → use-organization-settings-D0xJfqnQ.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BsVUpxvH.js → use-virtual-mcp-BfKCjW0R.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cq-2vEQG.js +1 -0
- package/dist/client/assets/{useMutation-5hMjZ_Ks.js → useMutation-D2ghwSsm.js} +1 -1
- package/dist/client/assets/useQuery-CiLTpy4Q.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CLtTg2VY.js → view-mode-toggle-CAFyQEy3.js} +1 -1
- package/dist/client/assets/{workflow-Iz076qQ_.js → workflow-BCWkw-sy.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +10 -10
- package/dist/server/migrate.js +5 -5
- package/dist/server/server.js +109 -109
- package/package.json +1 -1
- package/dist/client/assets/connect-BXWPEVv8.js +0 -1
- package/dist/client/assets/constants-lBJFsDYc.js +0 -1
- package/dist/client/assets/index-B5YD-rJR.js +0 -1
- package/dist/client/assets/mcp-oauth-Z4D16Uoq.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BTaBTa8y.js +0 -1
- package/dist/client/assets/useQuery-D0z2lKje.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as F,bx as q,j as e,by as O,Y as R,r as A,ab as f,a as L}from"./index-rms_W4V6.js";import{u as U}from"./useQuery-D0z2lKje.js";import{u as P}from"./useMutation-5hMjZ_Ks.js";import{B as w}from"./button-B2KLvXEr.js";import{C as v,a as k}from"./card-DlXZ7U9Z.js";import{o as K,i as Q,a as D}from"./mcp-oauth-Z4D16Uoq.js";import{c as z,C as H,a as b}from"./circle-alert-Bm5Q_veV.js";const J=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Y=z("external-link",J);const B=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],C=z("loader-circle",B);const W=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],V=z("refresh-cw",W),G=t=>{const n=F.c(6);let r;n[0]!==t?({...r}=t,n[0]=t,n[1]=r):r=n[1];const{theme:a}=q(),m=a===void 0?"system":a;let o;n[2]===Symbol.for("react.memo_cache_sentinel")?(o={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=o):o=n[2];let u;return n[3]!==r||n[4]!==m?(u=e.jsx(O,{theme:m,className:"toaster group",style:o,...r}),n[3]=r,n[4]=m,n[5]=u):u=n[5],u},S={session:t=>["user-sandbox-session",t]};function X({sessionId:t,onComplete:n,onError:r}){const a=R(),[h,m]=A.useState(null),{data:o,isLoading:u,error:g}=U({queryKey:S.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const i=await s.json();throw new Error(i.error||"Failed to load session")}return s.json()}}),I=P({mutationFn:async({appName:s,connectionId:i})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:i})});if(!l.ok){const d=await l.json();throw new Error(d.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:S.session(t)})}}),x=P({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const i=await s.json();throw new Error(i.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(f.success("Setup complete!"),a.invalidateQueries({queryKey:S.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const i=s instanceof Error?s:new Error("Failed to complete");f.error(i.message),r?.(i)}}),E=async s=>{m(s.app_name);const i=s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket";let l=null;i&&(l=K());try{const d=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!d.ok){const N=await d.json();throw new Error(N.error||"Failed to provision connection")}const j=(await d.json()).connection_id;if(i){const N=`/mcp/${j}`,_=await Q({url:N,token:null});if(!_.isAuthenticated&&_.supportsOAuth){if(!l)throw new Error("Popup was blocked. Please allow popups for this site and try again.");f.info("Opening authentication window...");const c=await D({connectionId:j,clientName:s.title,timeout:3e5,popupWindow:l});if(c.error)throw new Error(c.error);if(c.tokenInfo){const T=await fetch(`/api/connections/${j}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!T.ok){const M=await T.json().catch(()=>({}));throw new Error(M.error||"Failed to save authentication tokens. Please try again.")}}}else l?.close()}await I.mutateAsync({appName:s.app_name,connectionId:j}),f.success(`${s.title} connected successfully`)}catch(d){l?.close(),console.error("Connection error:",d);const y=d instanceof Error?d:new Error("Failed to connect");f.error(y.message),r?.(y)}finally{m(null)}},$=o?.apps.every(s=>s.status.configured),p=o?.session.status==="completed";return u?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(C,{className:"size-8 animate-spin text-muted-foreground"})}):g?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(v,{className:"max-w-md w-full",children:e.jsx(k,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(H,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:g instanceof Error?g.message:"Failed to load"})]})]})})})}):o?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(G,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[o.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:o.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:o.template.title}),o.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:o.template.description})]}),p&&e.jsx(v,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(k,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(b,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:o.apps.map(s=>e.jsx(v,{children:e.jsx(k,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(b,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!p&&e.jsx(w,{size:"sm",onClick:()=>E(s),disabled:h!==null||x.isPending,children:h===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!p&&e.jsxs(w,{size:"sm",variant:"outline",onClick:()=>E(s),disabled:h!==null||x.isPending,children:[e.jsx(V,{className:"size-4 mr-2"}),"Reconnect"]}),p&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(b,{className:"size-4 text-green-500"})})]})})},s.app_name))}),$&&!p&&e.jsx("div",{className:"mt-6",children:e.jsx(w,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(o.session.expires_at).toLocaleString()]})})]})]}):null}function ie(){const t=F.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:r}=L(n);let a;return t[1]!==r?(a=e.jsx(X,{sessionId:r}),t[1]=r,t[2]=a):a=t[2],a}export{ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as t,F as a}from"./index-rms_W4V6.js";const e=t(a,{target:"draft-7"});export{e as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as r,L as i,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-rms_W4V6.js";import{u as M,a as g,b as f,c as x,d as A,e as L,f as S}from"./use-collections-8Kj36wYP.js";import{u as y,a as h,b as K}from"./use-connection-DfqjO6nz.js";import{S as s}from"./constants-BecaK2Q7.js";import{K as T,a as b,W as O,c as W,g as w,b as V,d as _,e as E,f as I,u as Q}from"./constants-BecaK2Q7.js";import{g as j,l as G,a as U,r as k,u as v,b as F,c as H}from"./use-mcp-prompts-DioGpWDr.js";import{u as N,a as Y,b as q}from"./use-virtual-mcp-BsVUpxvH.js";import{a as B,h as X,i as Z,o as $}from"./mcp-oauth-Z4D16Uoq.js";import"./useMutation-5hMjZ_Ks.js";import"./useQuery-D0z2lKje.js";export{r as ConnectionEntitySchema,T as KEYS,i as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,b as SELF_MCP_ALIAS_ID,s as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,O as WellKnownOrgMCPId,B as authenticateMcp,W as createMCPClient,j as getPrompt,w as getWellKnownCommunityRegistryConnection,V as getWellKnownDecopilotAgent,_ as getWellKnownMcpStudioConnection,E as getWellKnownOpenRouterConnection,I as getWellKnownRegistryConnection,X as handleOAuthCallback,Z as isConnectionAuthenticated,c as isStdioParameters,G as listPrompts,U as listResources,$ as openOAuthPopup,P as parseVirtualUrl,k as readResource,M as useCollectionActions,g as useCollectionItem,f as useCollectionList,y as useConnection,h as useConnectionActions,K as useConnections,Q as useMCPClient,v as useMCPPromptsList,F as useMCPPromptsListQuery,H as useMCPResourcesListQuery,x as useMCPToolCall,A as useMCPToolCallMutation,L as useMCPToolCallQuery,S as useMCPToolsListQuery,p as useProjectContext,N as useVirtualMCP,Y as useVirtualMCPActions,q as useVirtualMCPs};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a7 as L,a8 as R,a9 as V,aa as H}from"./index-rms_W4V6.js";function b(t){let e=0;for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);e=(e<<5)-e+o,e=e&e}return Math.abs(e).toString(16)}const O=new Map,M="mcp:oauth:callback:";class x{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_popupWindow;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${window.location.origin}/oauth/callback`,this._windowMode=e.windowMode??"popup",this._popupWindow=e.popupWindow??null;const n=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",...n&&{scope:n}},O.set(b(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){if(this._windowMode==="tab")window.open(e.toString(),"_blank")||(window.location.href=e.toString());else{if(this._popupWindow&&!this._popupWindow.closed){this._popupWindow.location.href=e.toString(),this._popupWindow.focus();return}const n=600,o=700,r=window.screenX+(window.outerWidth-n)/2,c=window.screenY+(window.outerHeight-o)/2;if(!window.open(e.toString(),"mcp-oauth",`width=${n},height=${o},left=${r},top=${c},popup=yes`))throw new Error("OAuth popup was blocked. Please allow popups for this site and try again.")}}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(){O.delete(b(this.serverUrl))}}const I=600,T=700;function J(){const t=window.screenX+(window.outerWidth-I)/2,e=window.screenY+(window.outerHeight-T)/2;return window.open("about:blank","mcp-oauth",`width=${I},height=${T},left=${t},top=${e},popup=yes`)}async function K(t){const e=t.meshUrl??window.location.origin,n=new URL(`/mcp/${t.connectionId}`,e),o=new x({serverUrl:n.href,clientName:t.clientName,clientUri:t.clientUri,callbackUrl:t.callbackUrl,scope:t.scope,windowMode:t.windowMode,popupWindow:t.popupWindow});try{const r=new Promise((s,u)=>{const _=t.timeout||12e4;let h,w=!1;const C=o.state(),m=`${M}${C}`,d=()=>{window.removeEventListener("message",S),window.removeEventListener("storage",y),clearTimeout(h);try{localStorage.removeItem(m)}catch{}},g=async l=>{if(w)return;if(w=!0,!l.success){d(),u(new Error(l.error||"OAuth authentication failed"));return}const{code:f,state:P}=l;if(!f){d(),u(new Error("Missing authorization code"));return}if(o.getStoredState()!==P){d(),u(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const v=(await L(n))?.authorization_servers?.[0]||n,U=await R(v),p=o.clientInformation();if(!p){d(),u(new Error("Client information not found"));return}const $=o.codeVerifier(),W=await V(v,{metadata:U,clientInformation:p,authorizationCode:f,codeVerifier:$,redirectUri:o.redirectUrl,resource:new URL(n)});d(),s({tokens:W,clientId:p.client_id??null,clientSecret:"client_secret"in p?p.client_secret:null,tokenEndpoint:U?.token_endpoint??null})}catch(A){d(),u(A)}},S=async l=>{l.origin===window.location.origin&&l.data?.type==="mcp:oauth:callback"&&await g(l.data)},y=async l=>{if(!(l.key!==m||!l.newValue))try{const f=JSON.parse(l.newValue);await g(f)}catch{}};window.addEventListener("message",S),window.addEventListener("storage",y),h=setTimeout(()=>{w||(w=!0,d(),u(new Error("OAuth authentication timeout")))},_)});if(await H(o,{serverUrl:n})==="REDIRECT"){const s=await r;return{token:s.tokens.access_token,tokenInfo:{accessToken:s.tokens.access_token,refreshToken:s.tokens.refresh_token??null,expiresIn:s.tokens.expires_in??null,scope:s.tokens.scope??null,clientId:s.clientId,clientSecret:s.clientSecret,tokenEndpoint:s.tokenEndpoint},error:null}}const a=o.tokens(),i=o.clientInformation();return{token:a?.access_token||null,tokenInfo:a?{accessToken:a.access_token,refreshToken:a.refresh_token??null,expiresIn:a.expires_in??null,scope:a.scope??null,clientId:i?.client_id??null,clientSecret:i&&"client_secret"in i?i.client_secret:null,tokenEndpoint:null}:null,error:null}}catch(r){return{token:null,tokenInfo:null,error:r instanceof Error?r.message:String(r)}}finally{o.cleanup()}}function k(t,e){if(window.opener&&!window.opener.closed)return window.opener.postMessage(t,window.location.origin),!0;if(e)try{const n=`${M}${e}`;return localStorage.setItem(n,JSON.stringify(t)),!0}catch{}return!1}async function Y(){const t=new URLSearchParams(window.location.search),e=t.get("code");let n=t.get("state");const o=t.get("error"),r=t.get("error_description");let c=n;if(n)try{const i=atob(n),s=JSON.parse(i);s.clientState&&(c=s.clientState)}catch{}if(o){const i=r||o;return k({type:"mcp:oauth:callback",success:!1,error:i},c),{success:!1,error:i}}if(!e||!n){const i="Missing code or state parameter";return k({type:"mcp:oauth:callback",success:!1,error:i},c),{success:!1,error:i}}return n=c||n,k({type:"mcp:oauth:callback",success:!0,code:e,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function E(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function N(t){try{const e=E();return(e?new URL(t,e):new URL(t)).pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}async function z(t,e){try{const n=`/api/connections/${t}/oauth-token/status`,o=e?new URL(n,e).href:n,r=await fetch(o,{credentials:e?"omit":"include"});return r.ok?{hasToken:(await r.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function F({url:t,token:e,meshUrl:n}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const r=await fetch(t,{method:"POST",headers:o,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"}}})}),c=N(t),a=E(),i=n??(a?new URL(t,a).origin:new URL(t).origin);if(r.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(c?await z(c,i):{hasToken:!1}).hasToken};let s;try{const h=await r.json();s=h.error||h.message}catch{}return r.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:s||`HTTP ${r.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!r.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:s||`HTTP ${r.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o.message}}}export{K as a,Y as h,F as i,J as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-C_cEPa52.js";import{a0 as i}from"./index-rms_W4V6.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a0 as u,a1 as s}from"./index-rms_W4V6.js";function o(e,r){return u(e,s,r)}export{o as u};
|